From 489b72dc8f37fbe10be2a6e3292cf5fbe4679d34 Mon Sep 17 00:00:00 2001 From: Hyyan Abo Fakher Date: Wed, 13 Jul 2022 11:48:18 +0200 Subject: [PATCH] fix(js): :bug: `gw_setSortModel` should not apply the order be default --- client/dist/bbj-grid-widget.js | 45598 +++++++++++++-------------- client/dist/bbj-grid-widget.min.js | 512 +- client/dist/report.html | 4 +- client/src/api/columns.js | 2 +- 4 files changed, 22486 insertions(+), 23630 deletions(-) diff --git a/client/dist/bbj-grid-widget.js b/client/dist/bbj-grid-widget.js index f747d921..83b93702 100644 --- a/client/dist/bbj-grid-widget.js +++ b/client/dist/bbj-grid-widget.js @@ -81,4160 +81,3981 @@ /******/ /******/ /******/ // Load entry module and return exports -/******/ return __webpack_require__(__webpack_require__.s = 0); +/******/ return __webpack_require__(__webpack_require__.s = 40); /******/ }) /************************************************************************/ -/******/ ({ - -/***/ "./node_modules/autocompleter/autocomplete.js": -/*!****************************************************!*\ - !*** ./node_modules/autocompleter/autocomplete.js ***! - \****************************************************/ -/*! no static exports found */ +/******/ ([ +/* 0 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_RESULT__; -function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } -(function (global, factory) { - ( false ? undefined : _typeof(exports)) === 'object' && typeof module !== 'undefined' ? module.exports = factory() : true ? !(__WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.call(exports, __webpack_require__, exports, module)) : - __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__)) : (undefined); -})(void 0, function () { - 'use strict'; - /* - * https://github.com/kraaden/autocomplete - * Copyright (c) 2016 Denys Krasnoshchok - * MIT License - */ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.gw_getDocument = gw_getDocument; +exports.gw_getWindow = gw_getWindow; +exports.gw_escape = gw_escape; +exports.gw_uuid = gw_uuid; +exports.gw_getGrid = gw_getGrid; +exports.gw_addGrid = gw_addGrid; - function autocomplete(settings) { - // just an alias to minimize JS file size - var doc = document; - var container = doc.createElement("div"); - var containerStyle = container.style; - var userAgent = navigator.userAgent; - var mobileFirefox = userAgent.indexOf("Firefox") !== -1 && userAgent.indexOf("Mobile") !== -1; - var debounceWaitMs = settings.debounceWaitMs || 0; - var preventSubmit = settings.preventSubmit || false; // 'keyup' event will not be fired on Mobile Firefox, so we have to use 'input' event instead +/* + * This file is part of the BBjGridExWidget plugin. + * (c) Basis Europe + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ - var keyUpEventName = mobileFirefox ? "input" : "keyup"; - var items = []; - var inputValue = ""; - var minLen = 2; - var showOnFocus = settings.showOnFocus; - var selected; - var keypressCounter = 0; - var debounceTimer; +/** + * Get document + * + * Get the document instance according to the current BBj env + * + * @return {Object} Document instance + */ +function gw_getDocument() { + return typeof $doc !== 'undefined' ? $doc : document; +} +/** + * Get window + * + * Get the window instance according to the current BBj env + * + * @return {Object} Window instance + */ - if (settings.minLength !== undefined) { - minLen = settings.minLength; - } - if (!settings.input) { - throw new Error("input undefined"); - } +function gw_getWindow() { + return typeof $wnd !== 'undefined' ? $wnd : window; +} +/** + * Escape Value + * + * Change null and undefined to empty string + * + * @param {*} value + * + * @return {String} escaped value + */ - var input = settings.input; - container.className = "autocomplete " + (settings.className || ""); // IOS implementation for fixed positioning has many bugs, so we will use absolute positioning - containerStyle.position = "absolute"; - /** - * Detach the container from DOM - */ +function gw_escape(value) { + return value !== null && value !== undefined ? value : ''; +} +/** + * Generate a unique uuid + * @see https://stackoverflow.com/questions/105034/create-guid-uuid-in-javascript + */ - function detach() { - var parent = container.parentNode; - if (parent) { - parent.removeChild(container); - } - } - /** - * Clear debouncing timer if assigned - */ +function gw_uuid() { + return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) { + var r = Math.random() * 16 | 0, + v = c == 'x' ? r : r & 0x3 | 0x8; + return v.toString(16); + }); +} +/** + * Get Grid + * + * Retrieve the grid instance from `window.BBjGridExWidget` array + * + * @param {String} id The grid's id + * + * @return {Object|null} The grid's instance ofr null + * @throws TypeError when the grid instance is not found + */ - function clearDebounceTimer() { - if (debounceTimer) { - window.clearTimeout(debounceTimer); - } - } - /** - * Attach the container to DOM - */ +function gw_getGrid(id) { + window.BBjGridExWidget = window.BBjGridExWidget || {}; + var grid = window.BBjGridExWidget[id] || null; + if (!grid) { + var registeredGrids = JSON.stringify(Object.keys(window.BBjGridExWidget)); //getFuncArgs(func).forEach((key, i) => argsObj[key] = args[i]); - function attach() { - if (!container.parentNode) { - doc.body.appendChild(container); - } - } - /** - * Check if container for autocomplete is displayed - */ + throw new TypeError("\n\n[Grid Not Found] The method asked for non-existent grid instance.\n-------------------------------------------------------------------\nRequired Grid Id : ".concat(id, " \nRegistered Grids : ").concat(registeredGrids, "\n")); + } + return grid; +} +/** + * Add Grid + * + * Store a new grid instance by in the `window.BBjGridExWidget` array + * + * @param {String} id The grid's id + * @param {Object} options The grid's options + * + * @return {Object} Stored grid + */ - function containerDisplayed() { - return !!container.parentNode; - } - /** - * Clear autocomplete state and hide container - */ +function gw_addGrid(id, options) { + window.BBjGridExWidget = window.BBjGridExWidget || {}; + window.BBjGridExWidget[id] = options; + return gw_getGrid(id); +} - function clear() { - // prevent the update call if there are pending AJAX requests - keypressCounter++; - items = []; - inputValue = ""; - selected = undefined; - detach(); - } - /** - * Update autocomplete position - */ +/***/ }), +/* 1 */ +/***/ (function(module, exports, __webpack_require__) { +"use strict"; - function updatePosition() { - if (!containerDisplayed()) { - return; - } - containerStyle.height = "auto"; - containerStyle.width = input.offsetWidth + "px"; - var maxHeight = 0; - var inputRect; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.gw_debounce = gw_debounce; +exports.gw_sendEvent = gw_sendEvent; +exports.gw_parseNode = gw_parseNode; +exports.gw_parseNodeFromEvent = gw_parseNodeFromEvent; - function calc() { - var docEl = doc.documentElement; - var clientTop = docEl.clientTop || doc.body.clientTop || 0; - var clientLeft = docEl.clientLeft || doc.body.clientLeft || 0; - var scrollTop = window.pageYOffset || docEl.scrollTop; - var scrollLeft = window.pageXOffset || docEl.scrollLeft; - inputRect = input.getBoundingClientRect(); - var top = inputRect.top + input.offsetHeight + scrollTop - clientTop; - var left = inputRect.left + scrollLeft - clientLeft; - containerStyle.top = top + "px"; - containerStyle.left = left + "px"; - maxHeight = window.innerHeight - (inputRect.top + input.offsetHeight); +var _utilities = __webpack_require__(0); - if (maxHeight < 0) { - maxHeight = 0; - } +/* eslint-disable no-prototype-builtins */ - containerStyle.top = top + "px"; - containerStyle.bottom = ""; - containerStyle.left = left + "px"; - containerStyle.maxHeight = maxHeight + "px"; - } // the calc method must be called twice, otherwise the calculation may be wrong on resize event (chrome browser) +/* + * This file is part of the BBjGridExWidget plugin. + * (c) Basis Europe + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +/** https://davidwalsh.name/javascript-debounce-function */ +function gw_debounce(func, wait, immediate) { + var timeout; + return function () { + var context = this, + args = arguments; - calc(); - calc(); + var later = function later() { + timeout = null; - if (settings.customize && inputRect) { - settings.customize(input, inputRect, container, maxHeight); + if (!immediate) { + func.apply(context, args); } - } - /** - * Redraw the autocomplete div element with suggestions - */ - - - function update() { - // delete all children from autocomplete DOM container - while (container.firstChild) { - container.removeChild(container.firstChild); - } // function for rendering autocomplete suggestions + }; + var callNow = immediate && !timeout; + clearTimeout(timeout); + timeout = setTimeout(later, wait); - var render = function render(item, currentValue) { - var itemElement = doc.createElement("div"); - itemElement.textContent = item.label || ""; - return itemElement; - }; + if (callNow) { + func.apply(context, args); + } + }; +} +/** + * Send an event to BBj side + * + * @param {Array} context the grid's context + * @param {*} payload the event payload + * @param {String} eventId the event's id + */ - if (settings.render) { - render = settings.render; - } // function to render autocomplete groups +function gw_sendEvent(context) { + var payload = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; + var eventId = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : []; + var registeredInterests = context.interests || []; - var renderGroup = function renderGroup(groupName, currentValue) { - var groupDiv = doc.createElement("div"); - groupDiv.textContent = groupName; - return groupDiv; - }; + if (registeredInterests.includes(eventId)) { + var div = (0, _utilities.gw_getDocument)().getElementById("".concat(context.id)); // bui or webapp - if (settings.renderGroup) { - renderGroup = settings.renderGroup; - } + if ([5, 6].indexOf(context.platform) > -1) { + var htmlviewId = "htmlview-".concat(context.id); + var container = (0, _utilities.gw_getDocument)().getElementsByClassName(htmlviewId)[0]; - var fragment = doc.createDocumentFragment(); - var prevGroup = "#9?$"; - items.forEach(function (item) { - if (item.group && item.group !== prevGroup) { - prevGroup = item.group; - var groupDiv = renderGroup(item.group, inputValue); + if (typeof container.basisDispatchCustomEvent === 'function') { + container.basisDispatchCustomEvent(div, payload); + } else { + window.basisDispatchCustomEvent(div, payload); + } + } else { + window.basisDispatchCustomEvent(div, payload); + } + } +} +/** + * @typedef {Object} BBjGridExWidgetRow + * + * @property {number} id + * @property {number} index + * @property {number} parentKey + * @property {number} childIndex + * @property {boolean} selected + */ - if (groupDiv) { - groupDiv.className += " group"; - fragment.appendChild(groupDiv); - } - } +/** + * Parse a node as BBjGridExWidgetRow + * + * @param {Object} node ag grid node + * @param {Object} context ag grid context + * + * @returns {BBjGridExWidgetRow|Boolean} object formatted as BBjGridExWidgetRow. + * false if the node is for group node + */ - var div = render(item, inputValue); - if (div) { - div.addEventListener("click", function (ev) { - settings.onSelect(item, input); - clear(); - ev.preventDefault(); - ev.stopPropagation(); - }); +function gw_parseNode(node, context) { + if (true === node.group) { + return false; + } // we do not manage groups - if (item === selected) { - div.className += " selected"; - } - fragment.appendChild(div); - } - }); - container.appendChild(fragment); + var getRowNodeId = node.rowPinned ? '__ROW_INDEX' : context.getRowNodeId; + return { + i: context.hasOwnProperty('getRowNodeId') && node.data[getRowNodeId] ? node.data[getRowNodeId] : node.id, + // id + x: node.rowIndex, + // index + p: node.hasOwnProperty('parent') && node.parent.hasOwnProperty('key') ? node.parent.key : '', + // parent key + c: node.rowPinned ? -1 : node.childIndex, + //childIndex + s: Boolean(node.selected), + // selected + // client row + cr: context.hasOwnProperty('includeClientRowData') && context['includeClientRowData'] === true ? node.data : null, + pp: node.rowPinned // pin position - if (items.length < 1) { - if (settings.emptyMsg) { - var empty = doc.createElement("div"); - empty.className = "empty"; - empty.textContent = settings.emptyMsg; - container.appendChild(empty); - } else { - clear(); - return; - } - } + }; +} +/** + * Parse node from event + * + * Parse node in the paSsed event as BBjGridExWidgetRow + * + * @param {Object} e + * + * @returns {BBjGridExWidgetRow} + */ - attach(); - updatePosition(); - updateScroll(); - } - function updateIfDisplayed() { - if (containerDisplayed()) { - update(); - } - } +function gw_parseNodeFromEvent(e) { + return gw_parseNode(e.node, e.context); +} - function resizeEventHandler() { - updateIfDisplayed(); - } +/***/ }), +/* 2 */ +/***/ (function(module, exports, __webpack_require__) { - function scrollEventHandler(e) { - if (e.target !== container) { - updateIfDisplayed(); - } else { - e.preventDefault(); - } - } +"use strict"; - function keyupEventHandler(ev) { - var keyCode = ev.which || ev.keyCode || 0; - var ignore = [38 - /* Up */ - , 13 - /* Enter */ - , 27 - /* Esc */ - , 39 - /* Right */ - , 37 - /* Left */ - , 16 - /* Shift */ - , 17 - /* Ctrl */ - , 18 - /* Alt */ - , 20 - /* CapsLock */ - , 91 - /* WindowsKey */ - , 9 - /* Tab */ - ]; - for (var _i = 0, ignore_1 = ignore; _i < ignore_1.length; _i++) { - var key = ignore_1[_i]; +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - if (keyCode === key) { - return; - } - } +var g; // This works in non-strict mode - if (keyCode >= 112 - /* F1 */ - && keyCode <= 123 - /* F12 */ - ) { - return; - } // the down key is used to open autocomplete +g = function () { + return this; +}(); +try { + // This works if eval is allowed (see CSP) + g = g || new Function("return this")(); +} catch (e) { + // This works if the window reference is available + if ((typeof window === "undefined" ? "undefined" : _typeof(window)) === "object") g = window; +} // g can still be undefined, but nothing to do about it... +// We return undefined, instead of nothing here, so it's +// easier to handle this case. if(!global) { ...} - if (keyCode === 40 - /* Down */ - && containerDisplayed()) { - return; - } - startFetch(0 - /* Keyboard */ - ); - } - /** - * Automatically move scroll bar if selected item is not visible - */ +module.exports = g; +/***/ }), +/* 3 */ +/***/ (function(module, exports, __webpack_require__) { - function updateScroll() { - var elements = container.getElementsByClassName("selected"); +"use strict"; - if (elements.length > 0) { - var element = elements[0]; // make group visible - var previous = element.previousElementSibling; +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.GW_EVENT_READY = exports.GW_EVENT_FILTER_CHANGED = exports.GW_EVENT_KEYPRESS = exports.GW_EVENT_RANGE_SELECTION_CHANGED = exports.GW_EVENT_GRID_STATE_CHANGE = exports.GW_EVENT_ROW_VALUE_CHANGED = exports.GW_EVENT_ROW_EDITING_STOPPED = exports.GW_EVENT_ROW_EDITING_STARTED = exports.GW_EVENT_CELL_VALUE_CHANGED = exports.GW_EVENT_CELL_EDITING_STOPPED = exports.GW_EVENT_CELL_EDITING_STARTED = exports.GW_EVENT_CELL_DOUBLE_CLICK = exports.GW_EVENT_CELL_CLICK = exports.GW_EVENT_ROW_DOUBLE_CLICK = exports.GW_EVENT_ROW_CLICK = exports.GW_EVENT_ROW_SELECT = void 0; - if (previous && previous.className.indexOf("group") !== -1 && !previous.previousElementSibling) { - element = previous; - } +/* + * This file is part of the BBjGridExWidget plugin. + * (c) Basis Europe + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +// selection constants +var GW_EVENT_ROW_SELECT = 69; +exports.GW_EVENT_ROW_SELECT = GW_EVENT_ROW_SELECT; +var GW_EVENT_ROW_CLICK = 5011; +exports.GW_EVENT_ROW_CLICK = GW_EVENT_ROW_CLICK; +var GW_EVENT_ROW_DOUBLE_CLICK = 52; +exports.GW_EVENT_ROW_DOUBLE_CLICK = GW_EVENT_ROW_DOUBLE_CLICK; +var GW_EVENT_CELL_CLICK = 5001; +exports.GW_EVENT_CELL_CLICK = GW_EVENT_CELL_CLICK; +var GW_EVENT_CELL_DOUBLE_CLICK = 5002; // editing constants - if (element.offsetTop < container.scrollTop) { - container.scrollTop = element.offsetTop; - } else { - var selectBottom = element.offsetTop + element.offsetHeight; - var containerBottom = container.scrollTop + container.offsetHeight; - - if (selectBottom > containerBottom) { - container.scrollTop += selectBottom - containerBottom; - } - } - } - } - /** - * Select the previous item in suggestions - */ - - - function selectPrev() { - if (items.length < 1) { - selected = undefined; - } else { - if (selected === items[0]) { - selected = items[items.length - 1]; - } else { - for (var i = items.length - 1; i > 0; i--) { - if (selected === items[i] || i === 1) { - selected = items[i - 1]; - break; - } - } - } - } - } - /** - * Select the next item in suggestions - */ - - - function selectNext() { - if (items.length < 1) { - selected = undefined; - } - - if (!selected || selected === items[items.length - 1]) { - selected = items[0]; - return; - } - - for (var i = 0; i < items.length - 1; i++) { - if (selected === items[i]) { - selected = items[i + 1]; - break; - } - } - } - - function keydownEventHandler(ev) { - var keyCode = ev.which || ev.keyCode || 0; - - if (keyCode === 38 - /* Up */ - || keyCode === 40 - /* Down */ - || keyCode === 27 - /* Esc */ - ) { - var containerIsDisplayed = containerDisplayed(); - - if (keyCode === 27 - /* Esc */ - ) { - clear(); - } else { - if (!containerDisplayed || items.length < 1) { - return; - } +exports.GW_EVENT_CELL_DOUBLE_CLICK = GW_EVENT_CELL_DOUBLE_CLICK; +var GW_EVENT_CELL_EDITING_STARTED = 5003; +exports.GW_EVENT_CELL_EDITING_STARTED = GW_EVENT_CELL_EDITING_STARTED; +var GW_EVENT_CELL_EDITING_STOPPED = 5004; +exports.GW_EVENT_CELL_EDITING_STOPPED = GW_EVENT_CELL_EDITING_STOPPED; +var GW_EVENT_CELL_VALUE_CHANGED = 5005; +exports.GW_EVENT_CELL_VALUE_CHANGED = GW_EVENT_CELL_VALUE_CHANGED; +var GW_EVENT_ROW_EDITING_STARTED = 5006; +exports.GW_EVENT_ROW_EDITING_STARTED = GW_EVENT_ROW_EDITING_STARTED; +var GW_EVENT_ROW_EDITING_STOPPED = 5007; +exports.GW_EVENT_ROW_EDITING_STOPPED = GW_EVENT_ROW_EDITING_STOPPED; +var GW_EVENT_ROW_VALUE_CHANGED = 5012; // state constants - keyCode === 38 - /* Up */ - ? selectPrev() : selectNext(); - update(); - } +exports.GW_EVENT_ROW_VALUE_CHANGED = GW_EVENT_ROW_VALUE_CHANGED; +var GW_EVENT_GRID_STATE_CHANGE = 5008; // range selection - ev.preventDefault(); +exports.GW_EVENT_GRID_STATE_CHANGE = GW_EVENT_GRID_STATE_CHANGE; +var GW_EVENT_RANGE_SELECTION_CHANGED = 5009; // keyboard events - if (containerIsDisplayed) { - ev.stopPropagation(); - } +exports.GW_EVENT_RANGE_SELECTION_CHANGED = GW_EVENT_RANGE_SELECTION_CHANGED; +var GW_EVENT_KEYPRESS = 5010; // filters - return; - } +exports.GW_EVENT_KEYPRESS = GW_EVENT_KEYPRESS; +var GW_EVENT_FILTER_CHANGED = 5013; // ready - if (keyCode === 13 - /* Enter */ - ) { - if (selected) { - settings.onSelect(selected, input); - clear(); - } +exports.GW_EVENT_FILTER_CHANGED = GW_EVENT_FILTER_CHANGED; +var GW_EVENT_READY = 5014; +exports.GW_EVENT_READY = GW_EVENT_READY; - if (preventSubmit) { - ev.preventDefault(); - } - } - } +/***/ }), +/* 4 */ +/***/ (function(module, exports, __webpack_require__) { - function focusEventHandler() { - if (showOnFocus) { - startFetch(1 - /* Focus */ - ); - } - } +"use strict"; - function startFetch(trigger) { - // if multiple keys were pressed, before we get update from server, - // this may cause redrawing our autocomplete multiple times after the last key press. - // to avoid this, the number of times keyboard was pressed will be - // saved and checked before redraw our autocomplete box. - var savedKeypressCounter = ++keypressCounter; - var val = input.value; - if (val.length >= minLen || trigger === 1 - /* Focus */ - ) { - clearDebounceTimer(); - debounceTimer = window.setTimeout(function () { - settings.fetch(val, function (elements) { - if (keypressCounter === savedKeypressCounter && elements) { - items = elements; - inputValue = val; - selected = items.length > 0 ? items[0] : undefined; - update(); - } - }, 0 - /* Keyboard */ - ); - }, trigger === 0 - /* Keyboard */ - ? debounceWaitMs : 0); - } else { - clear(); - } - } +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - function blurEventHandler() { - // we need to delay clear, because when we click on an item, blur will be called before click and remove items from DOM - setTimeout(function () { - if (doc.activeElement !== input) { - clear(); - } - }, 200); - } - /** - * Fixes #26: on long clicks focus will be lost and onSelect method will not be called - */ +var _Symbol2 = _interopRequireDefault(__webpack_require__(9)); +var _getRawTag = _interopRequireDefault(__webpack_require__(68)); - container.addEventListener("mousedown", function (evt) { - evt.stopPropagation(); - evt.preventDefault(); - }); - /** - * Fixes #30: autocomplete closes when scrollbar is clicked in IE - * See: https://stackoverflow.com/a/9210267/13172349 - */ +var _objectToString = _interopRequireDefault(__webpack_require__(69)); - container.addEventListener("focus", function () { - return input.focus(); - }); - /** - * This function will remove DOM elements and clear event handlers - */ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - function destroy() { - input.removeEventListener("focus", focusEventHandler); - input.removeEventListener("keydown", keydownEventHandler); - input.removeEventListener(keyUpEventName, keyupEventHandler); - input.removeEventListener("blur", blurEventHandler); - window.removeEventListener("resize", resizeEventHandler); - doc.removeEventListener("scroll", scrollEventHandler, true); - clearDebounceTimer(); - clear(); - } // setup event handlers +/** `Object#toString` result references. */ +var nullTag = '[object Null]', + undefinedTag = '[object Undefined]'; +/** Built-in value references. */ +var symToStringTag = _Symbol2.default ? _Symbol2.default.toStringTag : undefined; +/** + * The base implementation of `getTag` without fallbacks for buggy environments. + * + * @private + * @param {*} value The value to query. + * @returns {string} Returns the `toStringTag`. + */ - input.addEventListener("keydown", keydownEventHandler); - input.addEventListener(keyUpEventName, keyupEventHandler); - input.addEventListener("blur", blurEventHandler); - input.addEventListener("focus", focusEventHandler); - window.addEventListener("resize", resizeEventHandler); - doc.addEventListener("scroll", scrollEventHandler, true); - return { - destroy: destroy - }; +function baseGetTag(value) { + if (value == null) { + return value === undefined ? undefinedTag : nullTag; } - return autocomplete; -}); + return symToStringTag && symToStringTag in Object(value) ? (0, _getRawTag.default)(value) : (0, _objectToString.default)(value); +} -/***/ }), +var _default = baseGetTag; +exports.default = _default; -/***/ "./node_modules/babel-loader/lib/index.js?!./node_modules/basis-aggrid-components/dist/basis-aggrid-components.js": -/*!**********************************************************************************************************************!*\ - !*** ./node_modules/babel-loader/lib??ref--4!./node_modules/basis-aggrid-components/dist/basis-aggrid-components.js ***! - \**********************************************************************************************************************/ -/*! no static exports found */ +/***/ }), +/* 5 */ /***/ (function(module, exports, __webpack_require__) { "use strict"; -/* WEBPACK VAR INJECTION */(function(module) {var __WEBPACK_AMD_DEFINE_FACTORY__, __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__; - -function _typeof2(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof2 = function _typeof2(obj) { return typeof obj; }; } else { _typeof2 = function _typeof2(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof2(obj); } - -(function webpackUniversalModuleDefinition(root, factory) { - if (( false ? undefined : _typeof2(exports)) === 'object' && ( false ? undefined : _typeof2(module)) === 'object') module.exports = factory();else if (true) !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_FACTORY__ = (factory), - __WEBPACK_AMD_DEFINE_RESULT__ = (typeof __WEBPACK_AMD_DEFINE_FACTORY__ === 'function' ? - (__WEBPACK_AMD_DEFINE_FACTORY__.apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__)) : __WEBPACK_AMD_DEFINE_FACTORY__), - __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));else {} -})(typeof self !== 'undefined' ? self : void 0, function () { - return ( - /******/ - function (modules) { - // webpackBootstrap - /******/ - // The module cache - /******/ - var installedModules = {}; - /******/ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - /******/ - // The require function +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - /******/ +/** + * Checks if `value` is object-like. A value is object-like if it's not `null` + * and has a `typeof` result of "object". + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + * @example + * + * _.isObjectLike({}); + * // => true + * + * _.isObjectLike([1, 2, 3]); + * // => true + * + * _.isObjectLike(_.noop); + * // => false + * + * _.isObjectLike(null); + * // => false + */ +function isObjectLike(value) { + return value != null && _typeof(value) == 'object'; +} - function __webpack_require__(moduleId) { - /******/ +var _default = isObjectLike; +exports.default = _default; - /******/ - // Check if module is in cache +/***/ }), +/* 6 */ +/***/ (function(module, exports, __webpack_require__) { - /******/ - if (installedModules[moduleId]) { - /******/ - return installedModules[moduleId].exports; - /******/ - } - /******/ - // Create a new module (and put it into the cache) +"use strict"; - /******/ +module.exports = function (module) { + if (!module.webpackPolyfill) { + module.deprecate = function () {}; - var module = installedModules[moduleId] = { - /******/ - i: moduleId, + module.paths = []; // module.parent = undefined by default - /******/ - l: false, + if (!module.children) module.children = []; + Object.defineProperty(module, "loaded", { + enumerable: true, + get: function get() { + return module.l; + } + }); + Object.defineProperty(module, "id", { + enumerable: true, + get: function get() { + return module.i; + } + }); + module.webpackPolyfill = 1; + } - /******/ - exports: {} - /******/ + return module; +}; - }; - /******/ +/***/ }), +/* 7 */ +/***/ (function(module, exports, __webpack_require__) { - /******/ - // Execute the module function +"use strict"; - /******/ +/** + * [Recursively parses a stringified JSON] + * @param {[type]} jsonString [stringified json to parse] + * @return {[type]} [normalized Javascript object] + */ - modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); - /******/ +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - /******/ - // Flag the module as loaded +function deepParseJson(jsonString) { + // if not stringified json rather a simple string value then JSON.parse will throw error + // otherwise continue recursion + if (typeof jsonString === 'string') { + try { + return deepParseJson(JSON.parse(jsonString)); + } catch (err) { + return jsonString; + } + } else if (Array.isArray(jsonString)) { + // if an array is received, map over the array and deepParse each value + return jsonString.map(function (val) { + return deepParseJson(val); + }); + } else if (_typeof(jsonString) === 'object' && jsonString !== null) { + // if an object is received then deepParse each element in the object + // typeof null returns 'object' too, so we have to eliminate that + return Object.keys(jsonString).reduce(function (obj, key) { + obj[key] = deepParseJson(jsonString[key]); + return obj; + }, {}); + } else { + // otherwise return whatever was received + return jsonString; + } +} - /******/ +module.exports = { + deepParseJson: deepParseJson +}; - module.l = true; - /******/ +/***/ }), +/* 8 */ +/***/ (function(module, exports, __webpack_require__) { - /******/ - // Return the exports of the module +"use strict"; - /******/ - return module.exports; - /******/ - } - /******/ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - /******/ +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - /******/ - // expose the modules object (__webpack_modules__) +/** + * Checks if `value` is the + * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types) + * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`) + * + * @static + * @memberOf _ + * @since 0.1.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is an object, else `false`. + * @example + * + * _.isObject({}); + * // => true + * + * _.isObject([1, 2, 3]); + * // => true + * + * _.isObject(_.noop); + * // => true + * + * _.isObject(null); + * // => false + */ +function isObject(value) { + var type = _typeof(value); - /******/ + return value != null && (type == 'object' || type == 'function'); +} +var _default = isObject; +exports.default = _default; - __webpack_require__.m = modules; - /******/ +/***/ }), +/* 9 */ +/***/ (function(module, exports, __webpack_require__) { - /******/ - // expose the module cache +"use strict"; - /******/ - __webpack_require__.c = installedModules; - /******/ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - /******/ - // define getter function for harmony exports +var _root = _interopRequireDefault(__webpack_require__(10)); - /******/ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - __webpack_require__.d = function (exports, name, getter) { - /******/ - if (!__webpack_require__.o(exports, name)) { - /******/ - Object.defineProperty(exports, name, { - /******/ - configurable: false, +/** Built-in value references. */ +var _Symbol = _root.default.Symbol; +var _default = _Symbol; +exports.default = _default; - /******/ - enumerable: true, +/***/ }), +/* 10 */ +/***/ (function(module, exports, __webpack_require__) { - /******/ - get: getter - /******/ +"use strict"; - }); - /******/ - } - /******/ - }; - /******/ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - /******/ - // getDefaultExport function for compatibility with non-harmony modules +var _freeGlobal = _interopRequireDefault(__webpack_require__(25)); - /******/ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } +function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } - __webpack_require__.n = function (module) { - /******/ - var getter = module && module.__esModule ? - /******/ - function getDefault() { - return module['default']; - } : - /******/ - function getModuleExports() { - return module; - }; - /******/ +/** Detect free variable `self`. */ +var freeSelf = (typeof self === "undefined" ? "undefined" : _typeof(self)) == 'object' && self && self.Object === Object && self; +/** Used as a reference to the global object. */ - __webpack_require__.d(getter, 'a', getter); - /******/ +var root = _freeGlobal.default || freeSelf || Function('return this')(); +var _default = root; +exports.default = _default; +/***/ }), +/* 11 */ +/***/ (function(module, exports, __webpack_require__) { - return getter; - /******/ - }; - /******/ +"use strict"; - /******/ - // Object.prototype.hasOwnProperty.call - /******/ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; +/** + * Performs a + * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero) + * comparison between two values to determine if they are equivalent. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to compare. + * @param {*} other The other value to compare. + * @returns {boolean} Returns `true` if the values are equivalent, else `false`. + * @example + * + * var object = { 'a': 1 }; + * var other = { 'a': 1 }; + * + * _.eq(object, object); + * // => true + * + * _.eq(object, other); + * // => false + * + * _.eq('a', 'a'); + * // => true + * + * _.eq('a', Object('a')); + * // => false + * + * _.eq(NaN, NaN); + * // => true + */ +function eq(value, other) { + return value === other || value !== value && other !== other; +} - __webpack_require__.o = function (object, property) { - return Object.prototype.hasOwnProperty.call(object, property); - }; - /******/ +var _default = eq; +exports.default = _default; - /******/ - // __webpack_public_path__ +/***/ }), +/* 12 */ +/***/ (function(module, exports, __webpack_require__) { - /******/ +"use strict"; - __webpack_require__.p = ""; - /******/ +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = void 0; - /******/ - // Load entry module and return exports +var _isFunction = _interopRequireDefault(__webpack_require__(24)); - /******/ +var _isLength = _interopRequireDefault(__webpack_require__(30)); - return __webpack_require__(__webpack_require__.s = 42); - /******/ - }( - /************************************************************************/ +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } - /******/ - [ - /* 0 */ +/** + * Checks if `value` is array-like. A value is considered array-like if it's + * not a function and has a `value.length` that's an integer greater than or + * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`. + * + * @static + * @memberOf _ + * @since 4.0.0 + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is array-like, else `false`. + * @example + * + * _.isArrayLike([1, 2, 3]); + * // => true + * + * _.isArrayLike(document.body.children); + * // => true + * + * _.isArrayLike('abc'); + * // => true + * + * _.isArrayLike(_.noop); + * // => false + */ +function isArrayLike(value) { + return value != null && (0, _isLength.default)(value.length) && !(0, _isFunction.default)(value); +} - /***/ - function (module, __webpack_exports__, __webpack_require__) { - "use strict"; - /* harmony import */ +var _default = isArrayLike; +exports.default = _default; - var __WEBPACK_IMPORTED_MODULE_0__Component__ = __webpack_require__(45); - /* - * This file is part of basis-aggrid-components lib. - * (c) Basis Europe - * - * For the full copyright and license information, please view the LICENSE - * file that was distributed with this source code. - */ +/***/ }), +/* 13 */ +/***/ (function(module, exports, __webpack_require__) { - /* harmony default export */ +/* + MIT License http://www.opensource.org/licenses/mit-license.php + Author Tobias Koppers @sokra +*/ +var stylesInDom = {}; - __webpack_exports__["a"] = __WEBPACK_IMPORTED_MODULE_0__Component__["a" - /* default */ - ]; - /***/ - }, - /* 1 */ +var memoize = function (fn) { + var memo; - /***/ - function (module, __webpack_exports__, __webpack_require__) { - "use strict"; - /* harmony export (immutable) */ + return function () { + if (typeof memo === "undefined") memo = fn.apply(this, arguments); + return memo; + }; +}; - __webpack_exports__["a"] = autobind; - /* harmony import */ +var isOldIE = memoize(function () { + // Test for IE <= 9 as proposed by Browserhacks + // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 + // Tests for existence of standard globals is to allow style-loader + // to operate correctly into non-standard environments + // @see https://github.com/webpack-contrib/style-loader/issues/177 + return window && document && document.all && !window.atob; +}); - var __WEBPACK_IMPORTED_MODULE_0__private_utils__ = __webpack_require__(7); +var getTarget = function (target) { + return document.querySelector(target); +}; - function _toConsumableArray(arr) { - return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); - } +var getElement = (function (fn) { + var memo = {}; - function _nonIterableSpread() { - throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); - } + return function(target) { + // If passing function in options, then use it for resolve "head" element. + // Useful for Shadow Root style i.e + // { + // insertInto: function () { return document.querySelector("#foo").shadowRoot } + // } + if (typeof target === 'function') { + return target(); + } + if (typeof memo[target] === "undefined") { + var styleTarget = getTarget.call(this, target); + // Special case to return head of iframe instead of iframe itself + if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { + try { + // This will throw an exception if access to iframe is blocked + // due to cross-origin restrictions + styleTarget = styleTarget.contentDocument.head; + } catch(e) { + styleTarget = null; + } + } + memo[target] = styleTarget; + } + return memo[target] + }; +})(); - function _unsupportedIterableToArray(o, minLen) { - if (!o) return; - if (typeof o === "string") return _arrayLikeToArray(o, minLen); - var n = Object.prototype.toString.call(o).slice(8, -1); - if (n === "Object" && o.constructor) n = o.constructor.name; - if (n === "Map" || n === "Set") return Array.from(o); - if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); - } +var singleton = null; +var singletonCounter = 0; +var stylesInsertedAtTop = []; - function _iterableToArray(iter) { - if (typeof Symbol !== "undefined" && Symbol.iterator in Object(iter)) return Array.from(iter); - } +var fixUrls = __webpack_require__(122); - function _arrayWithoutHoles(arr) { - if (Array.isArray(arr)) return _arrayLikeToArray(arr); - } +module.exports = function(list, options) { + if (typeof DEBUG !== "undefined" && DEBUG) { + if (typeof document !== "object") throw new Error("The style-loader cannot be used in a non-browser environment"); + } - function _arrayLikeToArray(arr, len) { - if (len == null || len > arr.length) len = arr.length; + options = options || {}; - for (var i = 0, arr2 = new Array(len); i < len; i++) { - arr2[i] = arr[i]; - } + options.attrs = typeof options.attrs === "object" ? options.attrs : {}; - return arr2; - } + // Force single-tag solution on IE6-9, which has a hard limit on the # of