diff options
author | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-03-25 15:44:25 +0000 |
---|---|---|
committer | Luke "Jared" Bennett <lbennett@gitlab.com> | 2017-04-05 17:44:14 +0100 |
commit | 8bdfee8ba5fb0a8f48501e63274c8f9ce5708007 (patch) | |
tree | 4234d7580889dbdb62e2a52ffda0ad985d63c63f /app | |
parent | c2cb2fb4731f7e7fbc7093be3b6e019f1f4d2d9c (diff) | |
download | gitlab-ce-8bdfee8ba5fb0a8f48501e63274c8f9ce5708007.tar.gz |
Prep for moving droplab to npm
Diffstat (limited to 'app')
9 files changed, 15 insertions, 1638 deletions
diff --git a/app/assets/javascripts/droplab/droplab.js b/app/assets/javascripts/droplab/droplab.js deleted file mode 100644 index d1d8447d165..00000000000 --- a/app/assets/javascripts/droplab/droplab.js +++ /dev/null @@ -1,953 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 14); -/******/ }) -/************************************************************************/ -/******/ ([ -/* 0 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var DATA_TRIGGER = 'data-dropdown-trigger'; -var DATA_DROPDOWN = 'data-dropdown'; -var SELECTED_CLASS = 'droplab-item-selected'; -var ACTIVE_CLASS = 'droplab-item-active'; - -exports.DATA_TRIGGER = DATA_TRIGGER; -exports.DATA_DROPDOWN = DATA_DROPDOWN; -exports.SELECTED_CLASS = SELECTED_CLASS; -exports.ACTIVE_CLASS = ACTIVE_CLASS; - -/***/ }), -/* 1 */ -/***/ (function(module, exports) { - -// Polyfill for creating CustomEvents on IE9/10/11 - -// code pulled from: -// https://github.com/d4tocchini/customevent-polyfill -// https://developer.mozilla.org/en-US/docs/Web/API/CustomEvent#Polyfill - -try { - var ce = new window.CustomEvent('test'); - ce.preventDefault(); - if (ce.defaultPrevented !== true) { - // IE has problems with .preventDefault() on custom events - // http://stackoverflow.com/questions/23349191 - throw new Error('Could not prevent default'); - } -} catch(e) { - var CustomEvent = function(event, params) { - var evt, origPrevent; - params = params || { - bubbles: false, - cancelable: false, - detail: undefined - }; - - evt = document.createEvent("CustomEvent"); - evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail); - origPrevent = evt.preventDefault; - evt.preventDefault = function () { - origPrevent.call(this); - try { - Object.defineProperty(this, 'defaultPrevented', { - get: function () { - return true; - } - }); - } catch(e) { - this.defaultPrevented = true; - } - }; - return evt; - }; - - CustomEvent.prototype = window.Event.prototype; - window.CustomEvent = CustomEvent; // expose definition to window -} - - -/***/ }), -/* 2 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _dropdown = __webpack_require__(9); - -var _dropdown2 = _interopRequireDefault(_dropdown); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var Hook = function Hook(trigger, list, plugins, config) { - this.trigger = trigger; - this.list = new _dropdown2.default(list); - this.type = 'Hook'; - this.event = 'click'; - this.plugins = plugins || []; - this.config = config || {}; - this.id = trigger.id; -}; - -Object.assign(Hook.prototype, { - - addEvents: function addEvents() {}, - - constructor: Hook -}); - -exports.default = Hook; - -/***/ }), -/* 3 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _constants = __webpack_require__(0); - -var utils = { - toCamelCase: function toCamelCase(attr) { - return this.camelize(attr.split('-').slice(1).join(' ')); - }, - t: function t(s, d) { - for (var p in d) { - if (Object.prototype.hasOwnProperty.call(d, p)) { - s = s.replace(new RegExp('{{' + p + '}}', 'g'), d[p]); - } - } - return s; - }, - camelize: function camelize(str) { - return str.replace(/(?:^\w|[A-Z]|\b\w)/g, function (letter, index) { - return index === 0 ? letter.toLowerCase() : letter.toUpperCase(); - }).replace(/\s+/g, ''); - }, - closest: function closest(thisTag, stopTag) { - while (thisTag && thisTag.tagName !== stopTag && thisTag.tagName !== 'HTML') { - thisTag = thisTag.parentNode; - } - return thisTag; - }, - isDropDownParts: function isDropDownParts(target) { - if (!target || target.tagName === 'HTML') return false; - return target.hasAttribute(_constants.DATA_TRIGGER) || target.hasAttribute(_constants.DATA_DROPDOWN); - } -}; - -exports.default = utils; - -/***/ }), -/* 4 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -__webpack_require__(1); - -var _hook_button = __webpack_require__(10); - -var _hook_button2 = _interopRequireDefault(_hook_button); - -var _hook_input = __webpack_require__(11); - -var _hook_input2 = _interopRequireDefault(_hook_input); - -var _utils = __webpack_require__(3); - -var _utils2 = _interopRequireDefault(_utils); - -var _keyboard = __webpack_require__(12); - -var _keyboard2 = _interopRequireDefault(_keyboard); - -var _constants = __webpack_require__(0); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var DropLab = function DropLab() { - this.ready = false; - this.hooks = []; - this.queuedData = []; - this.config = {}; - - this.eventWrapper = {}; -}; - -Object.assign(DropLab.prototype, { - loadStatic: function loadStatic() { - var dropdownTriggers = [].slice.apply(document.querySelectorAll('[' + _constants.DATA_TRIGGER + ']')); - this.addHooks(dropdownTriggers); - }, - - addData: function addData() { - var args = [].slice.apply(arguments); - this.applyArgs(args, '_addData'); - }, - - setData: function setData() { - var args = [].slice.apply(arguments); - this.applyArgs(args, '_setData'); - }, - - destroy: function destroy() { - this.hooks.forEach(function (hook) { - return hook.destroy(); - }); - this.hooks = []; - this.removeEvents(); - }, - - applyArgs: function applyArgs(args, methodName) { - if (this.ready) return this[methodName].apply(this, args); - - this.queuedData = this.queuedData || []; - this.queuedData.push(args); - }, - - _addData: function _addData(trigger, data) { - this._processData(trigger, data, 'addData'); - }, - - _setData: function _setData(trigger, data) { - this._processData(trigger, data, 'setData'); - }, - - _processData: function _processData(trigger, data, methodName) { - this.hooks.forEach(function (hook) { - if (Array.isArray(trigger)) hook.list[methodName](trigger); - - if (hook.trigger.id === trigger) hook.list[methodName](data); - }); - }, - - addEvents: function addEvents() { - this.eventWrapper.documentClicked = this.documentClicked.bind(this); - document.addEventListener('click', this.eventWrapper.documentClicked); - }, - - documentClicked: function documentClicked(e) { - var thisTag = e.target; - - if (thisTag.tagName !== 'UL') thisTag = _utils2.default.closest(thisTag, 'UL'); - if (_utils2.default.isDropDownParts(thisTag, this.hooks) || _utils2.default.isDropDownParts(e.target, this.hooks)) return; - - this.hooks.forEach(function (hook) { - return hook.list.hide(); - }); - }, - - removeEvents: function removeEvents() { - document.removeEventListener('click', this.eventWrapper.documentClicked); - }, - - changeHookList: function changeHookList(trigger, list, plugins, config) { - var _this = this; - - var availableTrigger = typeof trigger === 'string' ? document.getElementById(trigger) : trigger; - - this.hooks.forEach(function (hook, i) { - hook.list.list.dataset.dropdownActive = false; - - if (hook.trigger !== availableTrigger) return; - - hook.destroy(); - _this.hooks.splice(i, 1); - _this.addHook(availableTrigger, list, plugins, config); - }); - }, - - addHook: function addHook(hook, list, plugins, config) { - var availableHook = typeof hook === 'string' ? document.querySelector(hook) : hook; - var availableList = void 0; - - if (typeof list === 'string') { - availableList = document.querySelector(list); - } else if (list instanceof Element) { - availableList = list; - } else { - availableList = document.querySelector(hook.dataset[_utils2.default.toCamelCase(_constants.DATA_TRIGGER)]); - } - - availableList.dataset.dropdownActive = true; - - var HookObject = availableHook.tagName === 'INPUT' ? _hook_input2.default : _hook_button2.default; - this.hooks.push(new HookObject(availableHook, availableList, plugins, config)); - - return this; - }, - - addHooks: function addHooks(hooks, plugins, config) { - var _this2 = this; - - hooks.forEach(function (hook) { - return _this2.addHook(hook, null, plugins, config); - }); - return this; - }, - - setConfig: function setConfig(obj) { - this.config = obj; - }, - - fireReady: function fireReady() { - var readyEvent = new CustomEvent('ready.dl', { - detail: { - dropdown: this - } - }); - document.dispatchEvent(readyEvent); - - this.ready = true; - }, - - init: function init(hook, list, plugins, config) { - var _this3 = this; - - hook ? this.addHook(hook, list, plugins, config) : this.loadStatic(); - - this.addEvents(); - - (0, _keyboard2.default)(); - - this.fireReady(); - - this.queuedData.forEach(function (data) { - return _this3.addData(data); - }); - this.queuedData = []; - - return this; - } -}); - -exports.default = DropLab; - -/***/ }), -/* 5 */, -/* 6 */, -/* 7 */, -/* 8 */, -/* 9 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _Object$assign; - -__webpack_require__(1); - -var _utils = __webpack_require__(3); - -var _utils2 = _interopRequireDefault(_utils); - -var _constants = __webpack_require__(0); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } - -var DropDown = function DropDown(list) { - this.currentIndex = 0; - this.hidden = true; - this.list = typeof list === 'string' ? document.querySelector(list) : list; - this.items = []; - - this.eventWrapper = {}; - - this.getItems(); - this.initTemplateString(); - this.addEvents(); - - this.initialState = list.innerHTML; -}; - -Object.assign(DropDown.prototype, (_Object$assign = { - getItems: function getItems() { - this.items = [].slice.call(this.list.querySelectorAll('li')); - return this.items; - }, - - initTemplateString: function initTemplateString() { - var items = this.items || this.getItems(); - - var templateString = ''; - if (items.length > 0) templateString = items[items.length - 1].outerHTML; - this.templateString = templateString; - - return this.templateString; - }, - - clickEvent: function clickEvent(e) { - var selected = _utils2.default.closest(e.target, 'LI'); - if (!selected) return; - - this.addSelectedClass(selected); - - e.preventDefault(); - this.hide(); - - var listEvent = new CustomEvent('click.dl', { - detail: { - list: this, - selected: selected, - data: e.target.dataset - } - }); - this.list.dispatchEvent(listEvent); - }, - - addSelectedClass: function addSelectedClass(selected) { - this.removeSelectedClasses(); - selected.classList.add(_constants.SELECTED_CLASS); - }, - - removeSelectedClasses: function removeSelectedClasses() { - var items = this.items || this.getItems(); - - items.forEach(function (item) { - return item.classList.remove(_constants.SELECTED_CLASS); - }); - }, - - addEvents: function addEvents() { - this.eventWrapper.clickEvent = this.clickEvent.bind(this); - this.list.addEventListener('click', this.eventWrapper.clickEvent); - }, - - toggle: function toggle() { - this.hidden ? this.show() : this.hide(); - }, - - setData: function setData(data) { - this.data = data; - this.render(data); - }, - - addData: function addData(data) { - this.data = (this.data || []).concat(data); - this.render(this.data); - }, - - render: function render(data) { - var children = data ? data.map(this.renderChildren.bind(this)) : []; - var renderableList = this.list.querySelector('ul[data-dynamic]') || this.list; - - renderableList.innerHTML = children.join(''); - }, - - renderChildren: function renderChildren(data) { - var html = _utils2.default.t(this.templateString, data); - var template = document.createElement('div'); - - template.innerHTML = html; - this.setImagesSrc(template); - template.firstChild.style.display = data.droplab_hidden ? 'none' : 'block'; - - return template.firstChild.outerHTML; - }, - - setImagesSrc: function setImagesSrc(template) { - var images = [].slice.call(template.querySelectorAll('img[data-src]')); - - images.forEach(function (image) { - image.src = image.getAttribute('data-src'); - image.removeAttribute('data-src'); - }); - }, - - show: function show() { - if (!this.hidden) return; - this.list.style.display = 'block'; - this.currentIndex = 0; - this.hidden = false; - }, - - hide: function hide() { - if (this.hidden) return; - this.list.style.display = 'none'; - this.currentIndex = 0; - this.hidden = true; - } - -}, _defineProperty(_Object$assign, 'toggle', function toggle() { - this.hidden ? this.show() : this.hide(); -}), _defineProperty(_Object$assign, 'destroy', function destroy() { - this.hide(); - this.list.removeEventListener('click', this.eventWrapper.clickEvent); -}), _Object$assign)); - -exports.default = DropDown; - -/***/ }), -/* 10 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -__webpack_require__(1); - -var _hook = __webpack_require__(2); - -var _hook2 = _interopRequireDefault(_hook); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var HookButton = function HookButton(trigger, list, plugins, config) { - _hook2.default.call(this, trigger, list, plugins, config); - - this.type = 'button'; - this.event = 'click'; - - this.eventWrapper = {}; - - this.addEvents(); - this.addPlugins(); -}; - -HookButton.prototype = Object.create(_hook2.default.prototype); - -Object.assign(HookButton.prototype, { - addPlugins: function addPlugins() { - var _this = this; - - this.plugins.forEach(function (plugin) { - return plugin.init(_this); - }); - }, - - clicked: function clicked(e) { - var buttonEvent = new CustomEvent('click.dl', { - detail: { - hook: this - }, - bubbles: true, - cancelable: true - }); - e.target.dispatchEvent(buttonEvent); - - this.list.toggle(); - }, - - addEvents: function addEvents() { - this.eventWrapper.clicked = this.clicked.bind(this); - this.trigger.addEventListener('click', this.eventWrapper.clicked); - }, - - removeEvents: function removeEvents() { - this.trigger.removeEventListener('click', this.eventWrapper.clicked); - }, - - restoreInitialState: function restoreInitialState() { - this.list.list.innerHTML = this.list.initialState; - }, - - removePlugins: function removePlugins() { - this.plugins.forEach(function (plugin) { - return plugin.destroy(); - }); - }, - - destroy: function destroy() { - this.restoreInitialState(); - - this.removeEvents(); - this.removePlugins(); - }, - - constructor: HookButton -}); - -exports.default = HookButton; - -/***/ }), -/* 11 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -__webpack_require__(1); - -var _hook = __webpack_require__(2); - -var _hook2 = _interopRequireDefault(_hook); - -function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - -var HookInput = function HookInput(trigger, list, plugins, config) { - _hook2.default.call(this, trigger, list, plugins, config); - - this.type = 'input'; - this.event = 'input'; - - this.eventWrapper = {}; - - this.addEvents(); - this.addPlugins(); -}; - -Object.assign(HookInput.prototype, { - addPlugins: function addPlugins() { - var _this = this; - - this.plugins.forEach(function (plugin) { - return plugin.init(_this); - }); - }, - - addEvents: function addEvents() { - this.eventWrapper.mousedown = this.mousedown.bind(this); - this.eventWrapper.input = this.input.bind(this); - this.eventWrapper.keyup = this.keyup.bind(this); - this.eventWrapper.keydown = this.keydown.bind(this); - - this.trigger.addEventListener('mousedown', this.eventWrapper.mousedown); - this.trigger.addEventListener('input', this.eventWrapper.input); - this.trigger.addEventListener('keyup', this.eventWrapper.keyup); - this.trigger.addEventListener('keydown', this.eventWrapper.keydown); - }, - - removeEvents: function removeEvents() { - this.hasRemovedEvents = true; - - this.trigger.removeEventListener('mousedown', this.eventWrapper.mousedown); - this.trigger.removeEventListener('input', this.eventWrapper.input); - this.trigger.removeEventListener('keyup', this.eventWrapper.keyup); - this.trigger.removeEventListener('keydown', this.eventWrapper.keydown); - }, - - input: function input(e) { - if (this.hasRemovedEvents) return; - - this.list.show(); - - var inputEvent = new CustomEvent('input.dl', { - detail: { - hook: this, - text: e.target.value - }, - bubbles: true, - cancelable: true - }); - e.target.dispatchEvent(inputEvent); - }, - - mousedown: function mousedown(e) { - if (this.hasRemovedEvents) return; - - var mouseEvent = new CustomEvent('mousedown.dl', { - detail: { - hook: this, - text: e.target.value - }, - bubbles: true, - cancelable: true - }); - e.target.dispatchEvent(mouseEvent); - }, - - keyup: function keyup(e) { - if (this.hasRemovedEvents) return; - - this.keyEvent(e, 'keyup.dl'); - }, - - keydown: function keydown(e) { - if (this.hasRemovedEvents) return; - - this.keyEvent(e, 'keydown.dl'); - }, - - keyEvent: function keyEvent(e, eventName) { - this.list.show(); - - var keyEvent = new CustomEvent(eventName, { - detail: { - hook: this, - text: e.target.value, - which: e.which, - key: e.key - }, - bubbles: true, - cancelable: true - }); - e.target.dispatchEvent(keyEvent); - }, - - restoreInitialState: function restoreInitialState() { - this.list.list.innerHTML = this.list.initialState; - }, - - removePlugins: function removePlugins() { - this.plugins.forEach(function (plugin) { - return plugin.destroy(); - }); - }, - - destroy: function destroy() { - this.restoreInitialState(); - - this.removeEvents(); - this.removePlugins(); - - this.list.destroy(); - } -}); - -exports.default = HookInput; - -/***/ }), -/* 12 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _constants = __webpack_require__(0); - -var Keyboard = function Keyboard() { - var currentKey; - var currentFocus; - var isUpArrow = false; - var isDownArrow = false; - var removeHighlight = function removeHighlight(list) { - var itemElements = Array.prototype.slice.call(list.list.querySelectorAll('li:not(.divider)'), 0); - var listItems = []; - for (var i = 0; i < itemElements.length; i++) { - var listItem = itemElements[i]; - listItem.classList.remove(_constants.ACTIVE_CLASS); - - if (listItem.style.display !== 'none') { - listItems.push(listItem); - } - } - return listItems; - }; - - var setMenuForArrows = function setMenuForArrows(list) { - var listItems = removeHighlight(list); - if (list.currentIndex > 0) { - if (!listItems[list.currentIndex - 1]) { - list.currentIndex = list.currentIndex - 1; - } - - if (listItems[list.currentIndex - 1]) { - var el = listItems[list.currentIndex - 1]; - var filterDropdownEl = el.closest('.filter-dropdown'); - el.classList.add(_constants.ACTIVE_CLASS); - - if (filterDropdownEl) { - var filterDropdownBottom = filterDropdownEl.offsetHeight; - var elOffsetTop = el.offsetTop - 30; - - if (elOffsetTop > filterDropdownBottom) { - filterDropdownEl.scrollTop = elOffsetTop - filterDropdownBottom; - } - } - } - } - }; - - var mousedown = function mousedown(e) { - var list = e.detail.hook.list; - removeHighlight(list); - list.show(); - list.currentIndex = 0; - isUpArrow = false; - isDownArrow = false; - }; - var selectItem = function selectItem(list) { - var listItems = removeHighlight(list); - var currentItem = listItems[list.currentIndex - 1]; - var listEvent = new CustomEvent('click.dl', { - detail: { - list: list, - selected: currentItem, - data: currentItem.dataset - } - }); - list.list.dispatchEvent(listEvent); - list.hide(); - }; - - var keydown = function keydown(e) { - var typedOn = e.target; - var list = e.detail.hook.list; - var currentIndex = list.currentIndex; - isUpArrow = false; - isDownArrow = false; - - if (e.detail.which) { - currentKey = e.detail.which; - if (currentKey === 13) { - selectItem(e.detail.hook.list); - return; - } - if (currentKey === 38) { - isUpArrow = true; - } - if (currentKey === 40) { - isDownArrow = true; - } - } else if (e.detail.key) { - currentKey = e.detail.key; - if (currentKey === 'Enter') { - selectItem(e.detail.hook.list); - return; - } - if (currentKey === 'ArrowUp') { - isUpArrow = true; - } - if (currentKey === 'ArrowDown') { - isDownArrow = true; - } - } - if (isUpArrow) { - currentIndex--; - } - if (isDownArrow) { - currentIndex++; - } - if (currentIndex < 0) { - currentIndex = 0; - } - list.currentIndex = currentIndex; - setMenuForArrows(e.detail.hook.list); - }; - - document.addEventListener('mousedown.dl', mousedown); - document.addEventListener('keydown.dl', keydown); -}; - -exports.default = Keyboard; - -/***/ }), -/* 13 */, -/* 14 */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); - -var _droplab = __webpack_require__(4); - -Object.keys(_droplab).forEach(function (key) { - if (key === "default" || key === "__esModule") return; - Object.defineProperty(exports, key, { - enumerable: true, - get: function get() { - return _droplab[key]; - } - }); -}); - -/***/ }) -/******/ ]); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgOTMzZmY3ZDVlZDM5M2RjNjNiY2EiLCJ3ZWJwYWNrOi8vLy4vc3JjL2NvbnN0YW50cy5qcyIsIndlYnBhY2s6Ly8vLi9+L2N1c3RvbS1ldmVudC1wb2x5ZmlsbC9jdXN0b20tZXZlbnQtcG9seWZpbGwuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2hvb2suanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL3V0aWxzLmpzIiwid2VicGFjazovLy8uL3NyYy9kcm9wbGFiLmpzIiwid2VicGFjazovLy8uL3NyYy9kcm9wZG93bi5qcyIsIndlYnBhY2s6Ly8vLi9zcmMvaG9va19idXR0b24uanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2hvb2tfaW5wdXQuanMiLCJ3ZWJwYWNrOi8vLy4vc3JjL2tleWJvYXJkLmpzIiwid2VicGFjazovLy8uL3NyYy9pbmRleC5qcyJdLCJuYW1lcyI6WyJEQVRBX1RSSUdHRVIiLCJEQVRBX0RST1BET1dOIiwiU0VMRUNURURfQ0xBU1MiLCJBQ1RJVkVfQ0xBU1MiLCJIb29rIiwidHJpZ2dlciIsImxpc3QiLCJwbHVnaW5zIiwiY29uZmlnIiwidHlwZSIsImV2ZW50IiwiaWQiLCJPYmplY3QiLCJhc3NpZ24iLCJwcm90b3R5cGUiLCJhZGRFdmVudHMiLCJjb25zdHJ1Y3RvciIsInV0aWxzIiwidG9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IHZhciBsaXN0ID0gZS5kZXRhaWwuaG9vay5saXN0O1xuICAgIHZhciBjdXJyZW50SW5kZXggPSBsaXN0LmN1cnJlbnRJbmRleDtcbiAgICBpc1VwQXJyb3cgPSBmYWxzZTtcbiAgICBpc0Rvd25BcnJvdyA9IGZhbHNlO1xuXG4gICAgaWYoZS5kZXRhaWwud2hpY2gpe1xuICAgICAgY3VycmVudEtleSA9IGUuZGV0YWlsLndoaWNoO1xuICAgICAgaWYoY3VycmVudEtleSA9PT0gMTMpe1xuICAgICAgICBzZWxlY3RJdGVtKGUuZGV0YWlsLmhvb2subGlzdCk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmKGN1cnJlbnRLZXkgPT09IDM4KSB7XG4gICAgICAgIGlzVXBBcnJvdyA9IHRydWU7XG4gICAgICB9XG4gICAgICBpZihjdXJyZW50S2V5ID09PSA0MCkge1xuICAgICAgICBpc0Rvd25BcnJvdyA9IHRydWU7XG4gICAgICB9XG4gICAgfSBlbHNlIGlmKGUuZGV0YWlsLmtleSkge1xuICAgICAgY3VycmVudEtleSA9IGUuZGV0YWlsLmtleTtcbiAgICAgIGlmKGN1cnJlbnRLZXkgPT09ICdFbnRlcicpe1xuICAgICAgICBzZWxlY3RJdGVtKGUuZGV0YWlsLmhvb2subGlzdCk7XG4gICAgICAgIHJldHVybjtcbiAgICAgIH1cbiAgICAgIGlmKGN1cnJlbnRLZXkgPT09ICdBcnJvd1VwJykge1xuICAgICAgICBpc1VwQXJyb3cgPSB0cnVlO1xuICAgICAgfVxuICAgICAgaWYoY3VycmVudEtleSA9PT0gJ0Fycm93RG93bicpIHtcbiAgICAgICAgaXNEb3duQXJyb3cgPSB0cnVlO1xuICAgICAgfVxuICAgIH1cbiAgICBpZihpc1VwQXJyb3cpeyBjdXJyZW50SW5kZXgtLTsgfVxuICAgIGlmKGlzRG93bkFycm93KXsgY3VycmVudEluZGV4Kys7IH1cbiAgICBpZihjdXJyZW50SW5kZXggPCAwKXsgY3VycmVudEluZGV4ID0gMDsgfVxuICAgIGxpc3QuY3VycmVudEluZGV4ID0gY3VycmVudEluZGV4O1xuICAgIHNldE1lbnVGb3JBcnJvd3MoZS5kZXRhaWwuaG9vay5saXN0KTtcbiAgfTtcblxuICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24uZGwnLCBtb3VzZWRvd24pO1xuICBkb2N1bWVudC5hZGRFdmVudExpc3RlbmVyKCdrZXlkb3duLmRsJywga2V5ZG93bik7XG59O1xuXG5leHBvcnQgZGVmYXVsdCBLZXlib2FyZDtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9rZXlib2FyZC5qcyIsImV4cG9ydCAqIGZyb20gJy4vZHJvcGxhYic7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvaW5kZXguanMiXSwic291cmNlUm9vdCI6IiJ9
\ No newline at end of file diff --git a/app/assets/javascripts/droplab/plugins/ajax.js b/app/assets/javascripts/droplab/plugins/ajax.js deleted file mode 100644 index afc423b7f0e..00000000000 --- a/app/assets/javascripts/droplab/plugins/ajax.js +++ /dev/null @@ -1,157 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 5); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 5: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -function droplabAjaxException(message) { - this.message = message; -} - -var droplabAjax = { - _loadUrlData: function _loadUrlData(url) { - var self = this; - return new Promise(function (resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onreadystatechange = function () { - if (xhr.readyState === XMLHttpRequest.DONE) { - if (xhr.status === 200) { - var data = JSON.parse(xhr.responseText); - self.cache[url] = data; - return resolve(data); - } else { - return reject([xhr.responseText, xhr.status]); - } - } - }; - xhr.send(); - }); - }, - _loadData: function _loadData(data, config, self) { - if (config.loadingTemplate) { - var dataLoadingTemplate = self.hook.list.list.querySelector('[data-loading-template]'); - if (dataLoadingTemplate) dataLoadingTemplate.outerHTML = self.listTemplate; - } - - if (!self.destroyed) self.hook.list[config.method].call(self.hook.list, data); - }, - init: function init(hook) { - var self = this; - self.destroyed = false; - self.cache = self.cache || {}; - var config = hook.config.droplabAjax; - this.hook = hook; - if (!config || !config.endpoint || !config.method) { - return; - } - if (config.method !== 'setData' && config.method !== 'addData') { - return; - } - if (config.loadingTemplate) { - var dynamicList = hook.list.list.querySelector('[data-dynamic]'); - var loadingTemplate = document.createElement('div'); - loadingTemplate.innerHTML = config.loadingTemplate; - loadingTemplate.setAttribute('data-loading-template', ''); - this.listTemplate = dynamicList.outerHTML; - dynamicList.outerHTML = loadingTemplate.outerHTML; - } - if (self.cache[config.endpoint]) { - self._loadData(self.cache[config.endpoint], config, self); - } else { - this._loadUrlData(config.endpoint).then(function (d) { - self._loadData(d, config, self); - }).catch(function (e) { - throw new droplabAjaxException(e.message || e); - }); - } - }, - destroy: function destroy() { - this.destroyed = true; - - var dynamicList = this.hook.list.list.querySelector('[data-dynamic]'); - if (this.listTemplate && dynamicList) { - dynamicList.outerHTML = this.listTemplate; - } - } -}; - -exports.default = droplabAjax; - -/***/ }) - -/******/ }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgOTMzZmY3ZDVlZDM5M2RjNjNiY2E/MGFiZioqKioqKioqIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL2FqYXgvYWpheC5qcz8yMTc4Il0sIm5hbWVzIjpbImRyb3BsYWJBamF4RXhjZXB0aW9uIiwibWVzc2FnZSIsImRyb3BsYWJBamF4IiwiX2xvYWRVcmxEYXRhIiwidXJsIiwic2VsZiIsIlByb21pc2UiLCJyZXNvbHZlIiwicmVqZWN0IiwieGhyIiwiWE1MSHR0cFJlcXVlc3QiLCJvcGVuIiwib25yZWFkeXN0YXRlY2hhbmdlIiwicmVhZHlTdGF0ZSIsIkRPTkUiLCJzdGF0dXMiLCJkYXRhIiwiSlNPTiIsInBhcnNlIiwicmVzcG9uc2VUZXh0Ii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AgfSBlbHNlIHtcbiAgICAgIHRoaXMuX2xvYWRVcmxEYXRhKGNvbmZpZy5lbmRwb2ludClcbiAgICAgICAgLnRoZW4oZnVuY3Rpb24oZCkge1xuICAgICAgICAgIHNlbGYuX2xvYWREYXRhKGQsIGNvbmZpZywgc2VsZik7XG4gICAgICAgIH0pLmNhdGNoKGZ1bmN0aW9uKGUpIHtcbiAgICAgICAgICB0aHJvdyBuZXcgZHJvcGxhYkFqYXhFeGNlcHRpb24oZS5tZXNzYWdlIHx8IGUpO1xuICAgICAgICB9KTtcbiAgICB9XG4gIH0sXG4gIGRlc3Ryb3k6IGZ1bmN0aW9uKCkge1xuICAgIHRoaXMuZGVzdHJveWVkID0gdHJ1ZTtcblxuICAgIHZhciBkeW5hbWljTGlzdCA9IHRoaXMuaG9vay5saXN0Lmxpc3QucXVlcnlTZWxlY3RvcignW2RhdGEtZHluYW1pY10nKTtcbiAgICBpZiAodGhpcy5saXN0VGVtcGxhdGUgJiYgZHluYW1pY0xpc3QpIHtcbiAgICAgIGR5bmFtaWNMaXN0Lm91dGVySFRNTCA9IHRoaXMubGlzdFRlbXBsYXRlO1xuICAgIH1cbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgZHJvcGxhYkFqYXg7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvcGx1Z2lucy9hamF4L2FqYXguanMiXSwic291cmNlUm9vdCI6IiJ9
\ No newline at end of file diff --git a/app/assets/javascripts/droplab/plugins/ajax_filter.js b/app/assets/javascripts/droplab/plugins/ajax_filter.js deleted file mode 100644 index 3e6532c7709..00000000000 --- a/app/assets/javascripts/droplab/plugins/ajax_filter.js +++ /dev/null @@ -1,214 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 6); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 6: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var droplabAjaxFilter = { - init: function init(hook) { - this.destroyed = false; - this.hook = hook; - this.notLoading(); - - this.eventWrapper = {}; - this.eventWrapper.debounceTrigger = this.debounceTrigger.bind(this); - this.hook.trigger.addEventListener('keydown.dl', this.eventWrapper.debounceTrigger); - this.hook.trigger.addEventListener('focus', this.eventWrapper.debounceTrigger); - - this.trigger(true); - }, - - notLoading: function notLoading() { - this.loading = false; - }, - - debounceTrigger: function debounceTrigger(e) { - var NON_CHARACTER_KEYS = [16, 17, 18, 20, 37, 38, 39, 40, 91, 93]; - var invalidKeyPressed = NON_CHARACTER_KEYS.indexOf(e.detail.which || e.detail.keyCode) > -1; - var focusEvent = e.type === 'focus'; - if (invalidKeyPressed || this.loading) { - return; - } - if (this.timeout) { - clearTimeout(this.timeout); - } - this.timeout = setTimeout(this.trigger.bind(this, focusEvent), 200); - }, - - trigger: function trigger(getEntireList) { - var config = this.hook.config.droplabAjaxFilter; - var searchValue = this.trigger.value; - if (!config || !config.endpoint || !config.searchKey) { - return; - } - if (config.searchValueFunction) { - searchValue = config.searchValueFunction(); - } - if (config.loadingTemplate && this.hook.list.data === undefined || this.hook.list.data.length === 0) { - var dynamicList = this.hook.list.list.querySelector('[data-dynamic]'); - var loadingTemplate = document.createElement('div'); - loadingTemplate.innerHTML = config.loadingTemplate; - loadingTemplate.setAttribute('data-loading-template', true); - this.listTemplate = dynamicList.outerHTML; - dynamicList.outerHTML = loadingTemplate.outerHTML; - } - if (getEntireList) { - searchValue = ''; - } - if (config.searchKey === searchValue) { - return this.list.show(); - } - this.loading = true; - var params = config.params || {}; - params[config.searchKey] = searchValue; - var self = this; - self.cache = self.cache || {}; - var url = config.endpoint + this.buildParams(params); - var urlCachedData = self.cache[url]; - if (urlCachedData) { - self._loadData(urlCachedData, config, self); - } else { - this._loadUrlData(url).then(function (data) { - self._loadData(data, config, self); - }); - } - }, - - _loadUrlData: function _loadUrlData(url) { - var self = this; - return new Promise(function (resolve, reject) { - var xhr = new XMLHttpRequest(); - xhr.open('GET', url, true); - xhr.onreadystatechange = function () { - if (xhr.readyState === XMLHttpRequest.DONE) { - if (xhr.status === 200) { - var data = JSON.parse(xhr.responseText); - self.cache[url] = data; - return resolve(data); - } else { - return reject([xhr.responseText, xhr.status]); - } - } - }; - xhr.send(); - }); - }, - - _loadData: function _loadData(data, config, self) { - var list = self.hook.list; - if (config.loadingTemplate && list.data === undefined || list.data.length === 0) { - var dataLoadingTemplate = list.list.querySelector('[data-loading-template]'); - if (dataLoadingTemplate) { - dataLoadingTemplate.outerHTML = self.listTemplate; - } - } - if (!self.destroyed) { - var hookListChildren = list.list.children; - var onlyDynamicList = hookListChildren.length === 1 && hookListChildren[0].hasAttribute('data-dynamic'); - if (onlyDynamicList && data.length === 0) { - list.hide(); - } - list.setData.call(list, data); - } - self.notLoading(); - list.currentIndex = 0; - }, - - buildParams: function buildParams(params) { - if (!params) return ''; - var paramsArray = Object.keys(params).map(function (param) { - return param + '=' + (params[param] || ''); - }); - return '?' + paramsArray.join('&'); - }, - - destroy: function destroy() { - if (this.timeout) { - clearTimeout(this.timeout); - } - - this.destroyed = true; - this.hook.trigger.removeEventListener('keydown.dl', this.eventWrapper.debounceTrigger); - this.hook.trigger.removeEventListener('focus', this.eventWrapper.debounceTrigger); - } -}; - -exports.default = droplabAjaxFilter; - -/***/ }) - -/******/ }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgOTMzZmY3ZDVlZDM5M2RjNjNiY2E/MGFiZioqKioqKioiLCJ3ZWJwYWNrOi8vLy4vc3JjL3BsdWdpbnMvYWpheF9maWx0ZXIvYWpheF9maWx0ZXIuanM/YzNlNSJdLCJuYW1lcyI6WyJkcm9wbGFiQWpheEZpbHRlciIsImluaXQiLCJob29rIiwiZGVzdHJveWVkIiwibm90TG9hZGluZyIsImV2ZW50V3JhcHBlciIsImRlYm91bmNlVHJpZ2dlciIsImJpbmQiLCJ0cmlnZ2VyIiwiYWRkRXZlbnRMaXN0ZW5lciIsImxvYWRpbmciLCJlIiwiTk9OX0NIQVJBQ1RFUl9LRVlTIiwiaW52YWxpZEtleVByZXNzZWQiLCJpbmRleE9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KTtcbiAgICB0aGlzLmhvb2sudHJpZ2dlci5yZW1vdmVFdmVudExpc3RlbmVyKCdmb2N1cycsIHRoaXMuZXZlbnRXcmFwcGVyLmRlYm91bmNlVHJpZ2dlcik7XG4gIH1cbn07XG5cbmV4cG9ydCBkZWZhdWx0IGRyb3BsYWJBamF4RmlsdGVyO1xuXG5cblxuLy8gV0VCUEFDSyBGT09URVIgLy9cbi8vIC4vc3JjL3BsdWdpbnMvYWpheF9maWx0ZXIvYWpheF9maWx0ZXIuanMiXSwic291cmNlUm9vdCI6IiJ9
\ No newline at end of file diff --git a/app/assets/javascripts/droplab/plugins/filter.js b/app/assets/javascripts/droplab/plugins/filter.js deleted file mode 100644 index 3d81fbd7d2f..00000000000 --- a/app/assets/javascripts/droplab/plugins/filter.js +++ /dev/null @@ -1,172 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 7); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 7: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var droplabFilter = { - keydown: function keydown(e) { - var hiddenCount = 0; - var dataHiddenCount = 0; - - var list = e.detail.hook.list; - var data = list.data; - var value = e.detail.hook.trigger.value.toLowerCase(); - var config = e.detail.hook.config.droplabFilter; - var matches = []; - var filterFunction; - // will only work on dynamically set data - if (!data) { - return; - } - - if (config && config.filterFunction && typeof config.filterFunction === 'function') { - filterFunction = config.filterFunction; - } else { - filterFunction = function filterFunction(o) { - // cheap string search - o.droplab_hidden = o[config.template].toLowerCase().indexOf(value) === -1; - return o; - }; - } - - dataHiddenCount = data.filter(function (o) { - return !o.droplab_hidden; - }).length; - - matches = data.map(function (o) { - return filterFunction(o, value); - }); - - hiddenCount = matches.filter(function (o) { - return !o.droplab_hidden; - }).length; - - if (dataHiddenCount !== hiddenCount) { - list.render(matches); - list.currentIndex = 0; - } - }, - - debounceKeydown: function debounceKeydown(e) { - if ([13, // enter - 16, // shift - 17, // ctrl - 18, // alt - 20, // caps lock - 37, // left arrow - 38, // up arrow - 39, // right arrow - 40, // down arrow - 91, // left window - 92, // right window - 93].indexOf(e.detail.which || e.detail.keyCode) > -1) return; - - if (this.timeout) clearTimeout(this.timeout); - this.timeout = setTimeout(this.keydown.bind(this, e), 200); - }, - - init: function init(hook) { - var config = hook.config.droplabFilter; - - if (!config || !config.template) return; - - this.hook = hook; - - this.eventWrapper = {}; - this.eventWrapper.debounceKeydown = this.debounceKeydown.bind(this); - - this.hook.trigger.addEventListener('keydown.dl', this.eventWrapper.debounceKeydown); - this.hook.trigger.addEventListener('mousedown.dl', this.eventWrapper.debounceKeydown); - }, - - destroy: function destroy() { - this.hook.trigger.removeEventListener('keydown.dl', this.eventWrapper.debounceKeydown); - this.hook.trigger.removeEventListener('mousedown.dl', this.eventWrapper.debounceKeydown); - - var dynamicList = this.hook.list.list.querySelector('[data-dynamic]'); - if (this.listTemplate && dynamicList) { - dynamicList.outerHTML = this.listTemplate; - } - } -}; - -exports.default = droplabFilter; - -/***/ }) - -/******/ }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgOTMzZmY3ZDVlZDM5M2RjNjNiY2E/MGFiZioqKioqKiIsIndlYnBhY2s6Ly8vLi9zcmMvcGx1Z2lucy9maWx0ZXIvZmlsdGVyLmpzP2Y0MWEiXSwibmFtZXMiOlsiZHJvcGxhYkZpbHRlciIsImtleWRvd24iLCJlIiwiaGlkZGVuQ291bnQiLCJkYXRhSGlkZGVuQ291bnQiLCJsaXN0IiwiZGV0YWlsIiwiaG9vayIsImRhdGEiLCJ2YWx1ZSIsInRyaWdnZXIiLCJ0b0xvd2VyQ2FzZSIsImNvbmZpZyIsIm1hdGNoZXMiLCJmaWx0ZXJGdW5jdGlvbiIsIm8iLCJkcm9wbGFiX2hpZGRlbiIsInRlbXBsYXRlIiwiaW5kZXhPZiIsImZpbHRlciIsImxlbmd0aCIsIm1hcCIsInJlbmRlciIsImN1cnJlbnRJbmRleCIsImRlYm91bmNlS2V5ZG93biIsIndoaWNoIiwia2V5Q29kZSIsInRpbWVvdXQiLCJjbGVhclR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mhvb2sudHJpZ2dlci5hZGRFdmVudExpc3RlbmVyKCdtb3VzZWRvd24uZGwnLCB0aGlzLmV2ZW50V3JhcHBlci5kZWJvdW5jZUtleWRvd24pO1xuICB9LFxuXG4gIGRlc3Ryb3k6IGZ1bmN0aW9uIGRlc3Ryb3koKSB7XG4gICAgdGhpcy5ob29rLnRyaWdnZXIucmVtb3ZlRXZlbnRMaXN0ZW5lcigna2V5ZG93bi5kbCcsIHRoaXMuZXZlbnRXcmFwcGVyLmRlYm91bmNlS2V5ZG93bik7XG4gICAgdGhpcy5ob29rLnRyaWdnZXIucmVtb3ZlRXZlbnRMaXN0ZW5lcignbW91c2Vkb3duLmRsJywgdGhpcy5ldmVudFdyYXBwZXIuZGVib3VuY2VLZXlkb3duKTtcblxuICAgIHZhciBkeW5hbWljTGlzdCA9IHRoaXMuaG9vay5saXN0Lmxpc3QucXVlcnlTZWxlY3RvcignW2RhdGEtZHluYW1pY10nKTtcbiAgICBpZiAodGhpcy5saXN0VGVtcGxhdGUgJiYgZHluYW1pY0xpc3QpIHtcbiAgICAgIGR5bmFtaWNMaXN0Lm91dGVySFRNTCA9IHRoaXMubGlzdFRlbXBsYXRlO1xuICAgIH1cbiAgfVxufTtcblxuZXhwb3J0IGRlZmF1bHQgZHJvcGxhYkZpbHRlcjtcblxuXG5cbi8vIFdFQlBBQ0sgRk9PVEVSIC8vXG4vLyAuL3NyYy9wbHVnaW5zL2ZpbHRlci9maWx0ZXIuanMiXSwic291cmNlUm9vdCI6IiJ9
\ No newline at end of file diff --git a/app/assets/javascripts/droplab/plugins/input_setter.js b/app/assets/javascripts/droplab/plugins/input_setter.js deleted file mode 100644 index 2ee9a796634..00000000000 --- a/app/assets/javascripts/droplab/plugins/input_setter.js +++ /dev/null @@ -1,127 +0,0 @@ -/******/ (function(modules) { // webpackBootstrap -/******/ // The module cache -/******/ var installedModules = {}; -/******/ -/******/ // The require function -/******/ function __webpack_require__(moduleId) { -/******/ -/******/ // Check if module is in cache -/******/ if(installedModules[moduleId]) -/******/ return installedModules[moduleId].exports; -/******/ -/******/ // Create a new module (and put it into the cache) -/******/ var module = installedModules[moduleId] = { -/******/ i: moduleId, -/******/ l: false, -/******/ exports: {} -/******/ }; -/******/ -/******/ // Execute the module function -/******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); -/******/ -/******/ // Flag the module as loaded -/******/ module.l = true; -/******/ -/******/ // Return the exports of the module -/******/ return module.exports; -/******/ } -/******/ -/******/ -/******/ // expose the modules object (__webpack_modules__) -/******/ __webpack_require__.m = modules; -/******/ -/******/ // expose the module cache -/******/ __webpack_require__.c = installedModules; -/******/ -/******/ // identity function for calling harmony imports with the correct context -/******/ __webpack_require__.i = function(value) { return value; }; -/******/ -/******/ // define getter function for harmony exports -/******/ __webpack_require__.d = function(exports, name, getter) { -/******/ if(!__webpack_require__.o(exports, name)) { -/******/ Object.defineProperty(exports, name, { -/******/ configurable: false, -/******/ enumerable: true, -/******/ get: getter -/******/ }); -/******/ } -/******/ }; -/******/ -/******/ // getDefaultExport function for compatibility with non-harmony modules -/******/ __webpack_require__.n = function(module) { -/******/ var getter = module && module.__esModule ? -/******/ function getDefault() { return module['default']; } : -/******/ function getModuleExports() { return module; }; -/******/ __webpack_require__.d(getter, 'a', getter); -/******/ return getter; -/******/ }; -/******/ -/******/ // Object.prototype.hasOwnProperty.call -/******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; -/******/ -/******/ // __webpack_public_path__ -/******/ __webpack_require__.p = ""; -/******/ -/******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 8); -/******/ }) -/************************************************************************/ -/******/ ({ - -/***/ 8: -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -Object.defineProperty(exports, "__esModule", { - value: true -}); -var droplabInputSetter = { - init: function init(hook) { - this.hook = hook; - this.config = hook.config.droplabInputSetter || (this.hook.config.droplabInputSetter = {}); - - this.eventWrapper = {}; - - this.addEvents(); - }, - addEvents: function addEvents() { - this.eventWrapper.setInputs = this.setInputs.bind(this); - this.hook.list.list.addEventListener('click.dl', this.eventWrapper.setInputs); - }, - removeEvents: function removeEvents() { - this.hook.list.list.removeEventListener('click.dl', this.eventWrapper.setInputs); - }, - setInputs: function setInputs(e) { - var _this = this; - - var selectedItem = e.detail.selected; - - if (!Array.isArray(this.config)) this.config = [this.config]; - - this.config.forEach(function (config) { - return _this.setInput(config, selectedItem); - }); - }, - setInput: function setInput(config, selectedItem) { - var input = config.input || this.hook.trigger; - var newValue = selectedItem.getAttribute(config.valueAttribute); - - if (input.tagName === 'INPUT') { - input.value = newValue; - } else { - input.textContent = newValue; - } - }, - destroy: function destroy() { - this.removeEvents(); - } -}; - -exports.default = droplabInputSetter; - -/***/ }) - -/******/ }); -//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIndlYnBhY2s6Ly8vd2VicGFjay9ib290c3RyYXAgOTMzZmY3ZDVlZDM5M2RjNjNiY2E/MGFiZioqKioqIiwid2VicGFjazovLy8uL3NyYy9wbHVnaW5zL2lucHV0X3NldHRlci9pbnB1dF9zZXR0ZXIuanM/NTY5NyJdLCJuYW1lcyI6WyJkcm9wbGFiSW5wdXRTZXR0ZXIiLCJpbml0IiwiaG9vayIsImNvbmZpZyIsImV2ZW50V3JhcHBlciIsImFkZEV2ZW50cyIsInNldElucHV0cyIsImJpbmQiLCJsaXN0IiwiYWRkRXZlbnRMaXN0ZW5lciIsInJlbW92ZUV2ZW50cyIsInJlbW92ZUV2ZW50TGlzdGVuZXIiLCJlIiwic2VsZWN0ZWRJdGVtIiwiZGV0YWlsIiwic2VsZWN0ZWQiLCJBcnJheSIsImlzQXJyYXkiLCJmb3JFYWNoIiwic2V0SW5wdXQiLCJpbnB1dCIsInRyaWdnZXIiLCJuZXdWYWx1ZSIsImdldEF0dHJpYnV0ZSIsInZhbHVlQXR0cmlidXRlIiwidGFnTmFtZSIsInZhbHVlIiwidGV4d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ICAgICBpbnB1dC50ZXh0Q29udGVudCA9IG5ld1ZhbHVlO1xuICAgIH1cbiAgfSxcblxuICBkZXN0cm95KCkge1xuICAgIHRoaXMucmVtb3ZlRXZlbnRzKCk7XG4gIH0sXG59O1xuXG5leHBvcnQgZGVmYXVsdCBkcm9wbGFiSW5wdXRTZXR0ZXI7XG5cblxuXG4vLyBXRUJQQUNLIEZPT1RFUiAvL1xuLy8gLi9zcmMvcGx1Z2lucy9pbnB1dF9zZXR0ZXIvaW5wdXRfc2V0dGVyLmpzIl0sInNvdXJjZVJvb3QiOiIifQ==
\ No newline at end of file diff --git a/app/assets/javascripts/filtered_search/dropdown_hint.js b/app/assets/javascripts/filtered_search/dropdown_hint.js index d3401dd0838..527037c08eb 100644 --- a/app/assets/javascripts/filtered_search/dropdown_hint.js +++ b/app/assets/javascripts/filtered_search/dropdown_hint.js @@ -1,4 +1,4 @@ -import droplabFilter from '../droplab/plugins/filter'; +import Filter from '@gitlab-org/droplab/dist/plugins/Filter'; require('./filtered_search_dropdown'); @@ -7,7 +7,7 @@ require('./filtered_search_dropdown'); constructor(droplab, dropdown, input, filter) { super(droplab, dropdown, input, filter); this.config = { - droplabFilter: { + Filter: { template: 'hint', filterFunction: gl.DropdownUtils.filterHint.bind(null, input), }, @@ -68,12 +68,12 @@ require('./filtered_search_dropdown'); } }); - this.droplab.changeHookList(this.hookId, this.dropdown, [droplabFilter], this.config); + this.droplab.changeHookList(this.hookId, this.dropdown, [Filter], this.config); this.droplab.setData(this.hookId, dropdownData); } init() { - this.droplab.addHook(this.input, this.dropdown, [droplabFilter], this.config).init(); + this.droplab.addHook(this.input, this.dropdown, [Filter], this.config).init(); } } diff --git a/app/assets/javascripts/filtered_search/dropdown_non_user.js b/app/assets/javascripts/filtered_search/dropdown_non_user.js index c30e673f8ba..48c2135aca3 100644 --- a/app/assets/javascripts/filtered_search/dropdown_non_user.js +++ b/app/assets/javascripts/filtered_search/dropdown_non_user.js @@ -1,5 +1,5 @@ -import droplabAjax from '../droplab/plugins/ajax'; -import droplabFilter from '../droplab/plugins/filter'; +import Ajax from '@gitlab-org/droplab/dist/plugins/Ajax'; +import Filter from '@gitlab-org/droplab/dist/plugins/Filter'; require('./filtered_search_dropdown'); @@ -9,12 +9,12 @@ require('./filtered_search_dropdown'); super(droplab, dropdown, input, filter); this.symbol = symbol; this.config = { - droplabAjax: { + Ajax: { endpoint, method: 'setData', loadingTemplate: this.loadingTemplate, }, - droplabFilter: { + Filter: { filterFunction: gl.DropdownUtils.filterWithSymbol.bind(null, this.symbol, input), template: 'title', }, @@ -30,13 +30,13 @@ require('./filtered_search_dropdown'); renderContent(forceShowList = false) { this.droplab - .changeHookList(this.hookId, this.dropdown, [droplabAjax, droplabFilter], this.config); + .changeHookList(this.hookId, this.dropdown, [Ajax, Filter], this.config); super.renderContent(forceShowList); } init() { this.droplab - .addHook(this.input, this.dropdown, [droplabAjax, droplabFilter], this.config).init(); + .addHook(this.input, this.dropdown, [Ajax, Filter], this.config).init(); } } diff --git a/app/assets/javascripts/filtered_search/dropdown_user.js b/app/assets/javascripts/filtered_search/dropdown_user.js index fe95ccb41f8..1661a4c5da2 100644 --- a/app/assets/javascripts/filtered_search/dropdown_user.js +++ b/app/assets/javascripts/filtered_search/dropdown_user.js @@ -1,4 +1,4 @@ -import droplabAjaxFilter from '../droplab/plugins/ajax_filter'; +import AjaxFilter from '@gitlab-org/droplab/dist/plugins/AjaxFilter'; require('./filtered_search_dropdown'); @@ -7,7 +7,7 @@ require('./filtered_search_dropdown'); constructor(droplab, dropdown, input, filter) { super(droplab, dropdown, input, filter); this.config = { - droplabAjaxFilter: { + AjaxFilter: { endpoint: `${gon.relative_url_root || ''}/autocomplete/users.json`, searchKey: 'search', params: { @@ -28,7 +28,7 @@ require('./filtered_search_dropdown'); } renderContent(forceShowList = false) { - this.droplab.changeHookList(this.hookId, this.dropdown, [droplabAjaxFilter], this.config); + this.droplab.changeHookList(this.hookId, this.dropdown, [AjaxFilter], this.config); super.renderContent(forceShowList); } @@ -56,7 +56,7 @@ require('./filtered_search_dropdown'); } init() { - this.droplab.addHook(this.input, this.dropdown, [droplabAjaxFilter], this.config).init(); + this.droplab.addHook(this.input, this.dropdown, [AjaxFilter], this.config).init(); } } diff --git a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js index 29aa4c1bb44..f5d6a85a4da 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js +++ b/app/assets/javascripts/filtered_search/filtered_search_dropdown_manager.js @@ -1,4 +1,4 @@ -import DropLab from '../droplab/droplab'; +import DropLab from '@gitlab-org/droplab'; import FilteredSearchContainer from './container'; (() => { |