funda-ui 4.2.375 → 4.2.445

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -4186,36 +4186,309 @@ var __webpack_exports__ = {};
4186
4186
  // This entry need to be wrapped in an IIFE because it need to be in strict mode.
4187
4187
  (() => {
4188
4188
  "use strict";
4189
+ // ESM COMPAT FLAG
4189
4190
  __webpack_require__.r(__webpack_exports__);
4190
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
4191
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
4192
- /* harmony export */ });
4193
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(787);
4194
- /* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
4195
- /* harmony import */ var funda_utils__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(456);
4196
- /* harmony import */ var funda_utils__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(funda_utils__WEBPACK_IMPORTED_MODULE_1__);
4197
- var _excluded = ["wrapperClassName", "wrapperMinHeight", "wrapperMinWidth", "availableHeaderTitle", "selectedHeaderTitle", "selectedHeaderNote", "removeAllBtnLabel", "addAllBtnLabel", "iconAdd", "iconRemove", "hierarchical", "indentation", "doubleIndent", "options", "disabled", "required", "value", "label", "name", "id", "extractValueByBrackets", "style", "data", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange"];
4198
- function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
4199
- function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4200
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4191
+
4192
+ // EXPORTS
4193
+ __webpack_require__.d(__webpack_exports__, {
4194
+ "default": () => (/* binding */ src)
4195
+ });
4196
+
4197
+ // EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
4198
+ var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
4199
+ var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
4200
+ // EXTERNAL MODULE: ../Utils/dist/cjs/index.js
4201
+ var cjs = __webpack_require__(456);
4202
+ ;// CONCATENATED MODULE: ./src/multiple-select-utils/func.ts
4203
+ /**
4204
+ * Format indent value
4205
+ * @param {String|Array} inputData
4206
+ * @param {String} placeholder
4207
+ * @returns {String|Array}
4208
+ */
4209
+ function formatIndentVal(inputData, placeholder) {
4210
+ var reVar = new RegExp(placeholder, 'g');
4211
+ if (Array.isArray(inputData)) {
4212
+ return inputData.map(function (s) {
4213
+ return String(s).replace(reVar, '').replace(/\&nbsp;/ig, '');
4214
+ });
4215
+ } else {
4216
+ var _txt = typeof inputData === 'string' ? inputData : inputData.toString();
4217
+ return _txt.replace(reVar, '').replace(/\&nbsp;/ig, '');
4218
+ }
4219
+ }
4220
+
4221
+ /**
4222
+ * Determine whether the option exists
4223
+ * @param val
4224
+ * @returns
4225
+ */
4226
+ function multiSelControlOptionExist(arr, val) {
4227
+ var _data = arr.filter(Boolean);
4228
+ return _data.map(function (v) {
4229
+ return v.toString();
4230
+ }).includes(val.toString());
4231
+ }
4232
+ ;// CONCATENATED MODULE: ./src/ItemList.tsx
4201
4233
  function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
4202
4234
  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."); }
4235
+ 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); }
4203
4236
  function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
4204
4237
  function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
4238
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4239
+
4240
+
4241
+
4242
+
4243
+ /* Recursively nested components to traverse nodes
4244
+ -------------------------------------------------*/
4245
+
4246
+ var ItemList = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, externalRef) {
4247
+ var root = props.root,
4248
+ listContainerClassName = props.listContainerClassName,
4249
+ valSelected = props.valSelected,
4250
+ indentStr = props.indentStr,
4251
+ iconAdd = props.iconAdd,
4252
+ iconRemove = props.iconRemove,
4253
+ selected = props.selected,
4254
+ onSelect = props.onSelect,
4255
+ alternateCollapse = props.alternateCollapse,
4256
+ first = props.first,
4257
+ arrow = props.arrow,
4258
+ childClassName = props.childClassName,
4259
+ data = props.data;
4260
+ var listContainerRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4261
+ var activeClass = function activeClass(el, mode) {
4262
+ var classname = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 'active';
4263
+ if (mode === 'add') {
4264
+ el.classList.add(classname);
4265
+ } else {
4266
+ el.classList.remove(classname);
4267
+ }
4268
+ };
4269
+ var closeChild = function closeChild(hyperlink, ul) {
4270
+ if (ul.length === 0) return;
4271
+ activeClass(hyperlink, 'remove');
4272
+ hyperlink.setAttribute('aria-expanded', 'false');
4273
+ activeClass(hyperlink.parentNode, 'remove');
4274
+
4275
+ //to close
4276
+ [].slice.call(ul).forEach(function (element) {
4277
+ element.style.maxHeight = 0;
4278
+ });
4279
+ };
4280
+ var openChild = function openChild(hyperlink, ul) {
4281
+ if (ul.length === 0) return;
4282
+ activeClass(hyperlink, 'add');
4283
+ hyperlink.setAttribute('aria-expanded', 'true');
4284
+ activeClass(hyperlink.parentNode, 'add');
4285
+
4286
+ // init <ul> height
4287
+ [].slice.call(ul).forEach(function (_curUl) {
4288
+ var allHeight = [].slice.call(_curUl.querySelectorAll('li')).map(function (_curLi) {
4289
+ return _curLi.scrollHeight;
4290
+ });
4291
+
4292
+ // Prevent missing height, causing the last element to be clipped
4293
+ var maxHeight = Math.max.apply(Math, _toConsumableArray(allHeight));
4294
+ allHeight.push(maxHeight * 3);
4295
+
4296
+ //
4297
+ var totalHeight = allHeight.reduce(function (accumulator, currentValue) {
4298
+ return accumulator + currentValue;
4299
+ }, 0);
4300
+
4301
+ // Prevent the use of iframe or other situations where the height is 0
4302
+ _curUl.style.maxHeight = "".concat(totalHeight == 0 ? 999 : totalHeight, "px");
4303
+ });
4304
+ };
4305
+ function handleClick(e) {
4306
+ e.preventDefault();
4307
+ e.stopPropagation();
4308
+ var hyperlink = e.currentTarget.querySelector('div');
4309
+ var subElement = (0,cjs.getNextSiblings)(hyperlink, 'ul');
4310
+
4311
+ // hide child if expandedLink doesn't exist, on the contrary
4312
+ //=====================
4313
+ if (hyperlink.getAttribute('aria-expanded') === 'false' || hyperlink.getAttribute('aria-expanded') === null) {
4314
+ //Hide all other siblings of the selected <ul>
4315
+ if (alternateCollapse) {
4316
+ [].slice.call(listContainerRef.current.children).forEach(function (li) {
4317
+ activeClass(li, 'remove');
4318
+ var _li = li.firstChild;
4319
+ activeClass(_li, 'remove');
4320
+ _li.setAttribute('aria-expanded', false);
4321
+ [].slice.call((0,cjs.getNextSiblings)(_li, 'ul')).forEach(function (element) {
4322
+ element.style.maxHeight = 0;
4323
+ });
4324
+ });
4325
+ }
4326
+
4327
+ //open current
4328
+ openChild(hyperlink, subElement);
4329
+ } else {
4330
+ //close current
4331
+ closeChild(hyperlink, subElement);
4332
+ }
4333
+ }
4334
+ function arrowGenerator() {
4335
+ return arrow ? arrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
4336
+ viewBox: "0 0 22 22",
4337
+ width: "8px"
4338
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
4339
+ d: "m345.44 248.29l-194.29 194.28c-12.359 12.365-32.397 12.365-44.75 0-12.354-12.354-12.354-32.391 0-44.744l171.91-171.91-171.91-171.9c-12.354-12.359-12.354-32.394 0-44.748 12.354-12.359 32.391-12.359 44.75 0l194.29 194.28c6.177 6.18 9.262 14.271 9.262 22.366 0 8.099-3.091 16.196-9.267 22.373",
4340
+ transform: "matrix(.03541-.00013.00013.03541 2.98 3.02)",
4341
+ fill: "#a5a5a5"
4342
+ }));
4343
+ }
4344
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4345
+ if (root !== null && data.length > 0) {
4346
+ // Activate current item
4347
+ //=====================
4348
+ var allItems = listContainerRef.current ? [].slice.call(root.querySelectorAll(".".concat(childClassName, " div"))).map(function (item) {
4349
+ var _item$parentNode$clas;
4350
+ return {
4351
+ el: item,
4352
+ actived: (_item$parentNode$clas = item.parentNode.classList) !== null && _item$parentNode$clas !== void 0 && _item$parentNode$clas.contains('active') ? true : false,
4353
+ expandedLink: document.body.contains(item.parentNode.parentNode.previousSibling) ? item.parentNode.parentNode.previousSibling : false
4354
+ };
4355
+ }) : [];
4356
+ allItems.forEach(function (hyperlink) {
4357
+ // Expand the currently active item by default
4358
+ if (hyperlink.actived) {
4359
+ hyperlink.el.setAttribute('aria-expanded', 'true');
4360
+ if (hyperlink.expandedLink) {
4361
+ var expandedLink = hyperlink.expandedLink; // <a>
4362
+ activeClass(expandedLink.parentNode, 'add');
4363
+ expandedLink.setAttribute('aria-expanded', true);
4364
+ }
4365
+
4366
+ // init <ul> height
4367
+ var ul = (0,cjs.getNextSiblings)(hyperlink.el, 'ul');
4368
+ [].slice.call(ul).forEach(function (_curUl) {
4369
+ var allHeight = [].slice.call(_curUl.querySelectorAll('li')).map(function (_curLi) {
4370
+ return _curLi.scrollHeight;
4371
+ });
4372
+
4373
+ // Prevent missing height, causing the last element to be clipped
4374
+ var maxHeight = Math.max.apply(Math, _toConsumableArray(allHeight));
4375
+ allHeight.push(maxHeight * 3);
4376
+
4377
+ //
4378
+ var totalHeight = allHeight.reduce(function (accumulator, currentValue) {
4379
+ return accumulator + currentValue;
4380
+ }, 0);
4381
+
4382
+ // Prevent the use of iframe or other situations where the height is 0
4383
+ _curUl.style.maxHeight = "".concat(totalHeight == 0 ? 999 : totalHeight, "px");
4384
+ });
4385
+ }
4386
+ });
4387
+ }
4388
+ }, [data]);
4389
+ if (data) {
4390
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("ul", {
4391
+ className: "".concat(listContainerClassName || '', " ").concat(childClassName),
4392
+ style: !first ? {
4393
+ maxHeight: '0px'
4394
+ } : {},
4395
+ ref: function ref(node) {
4396
+ listContainerRef.current = node;
4397
+ if (typeof externalRef === 'function') {
4398
+ externalRef(node);
4399
+ } else if (externalRef) {
4400
+ externalRef.current = node;
4401
+ }
4402
+ }
4403
+ }, data ? data.map(function (item, i) {
4404
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
4405
+ key: selected ? 'item-selected' + i : 'item' + i,
4406
+ className: selected ? 'selected' : "".concat(item.disabled ? 'disabled' : '', " ").concat(multiSelControlOptionExist(valSelected, item.value) ? 'hide' : ''),
4407
+ "data-index": i,
4408
+ "data-value": "".concat(item.value),
4409
+ "data-label": "".concat(item.label),
4410
+ "data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
4411
+ "data-disabled": item.disabled || 'false',
4412
+ "data-querystring": "".concat(typeof item.queryString === 'undefined' ? '' : item.queryString),
4413
+ "data-itemdata": JSON.stringify(item),
4414
+ onClick: selected ? function () {
4415
+ return void 0;
4416
+ } : handleClick
4417
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("strong", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4418
+ dangerouslySetInnerHTML: {
4419
+ __html: selected ? typeof item.listItemLabel === 'undefined' ? formatIndentVal(item.label, indentStr) : formatIndentVal(item.listItemLabel, indentStr) : typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel
4420
+ }
4421
+ }), item.children && item.children.length > 0 && !selected ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4422
+ className: "arrow"
4423
+ }, arrowGenerator()) : ''), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", {
4424
+ onClick: function onClick(e) {
4425
+ e.stopPropagation();
4426
+ onSelect(e.target.closest('li'));
4427
+ }
4428
+ }, selected ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, iconRemove ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, iconRemove) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
4429
+ width: "15px",
4430
+ height: "15px",
4431
+ viewBox: "0 0 24 24",
4432
+ fill: "none"
4433
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
4434
+ fillRule: "evenodd",
4435
+ clipRule: "evenodd",
4436
+ d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z",
4437
+ fill: "#000"
4438
+ })))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, iconAdd ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, iconAdd) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
4439
+ width: "15px",
4440
+ height: "15px",
4441
+ viewBox: "0 0 24 24",
4442
+ fill: "none"
4443
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
4444
+ d: "M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16 12.75H12.75V16C12.75 16.41 12.41 16.75 12 16.75C11.59 16.75 11.25 16.41 11.25 16V12.75H8C7.59 12.75 7.25 12.41 7.25 12C7.25 11.59 7.59 11.25 8 11.25H11.25V8C11.25 7.59 11.59 7.25 12 7.25C12.41 7.25 12.75 7.59 12.75 8V11.25H16C16.41 11.25 16.75 11.59 16.75 12C16.75 12.41 16.41 12.75 16 12.75Z",
4445
+ fill: "#000"
4446
+ })))))), item.children && /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(ItemList, {
4447
+ root: root,
4448
+ listContainerClassName: listContainerClassName,
4449
+ ref: externalRef,
4450
+ indentStr: indentStr,
4451
+ valSelected: valSelected,
4452
+ iconAdd: iconAdd,
4453
+ iconRemove: iconRemove,
4454
+ onSelect: onSelect,
4455
+ first: false,
4456
+ arrow: arrow,
4457
+ data: item.children,
4458
+ childClassName: childClassName
4459
+ }));
4460
+ }) : null));
4461
+ } else {
4462
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null);
4463
+ }
4464
+ });
4465
+ /* harmony default export */ const src_ItemList = (ItemList);
4466
+ ;// CONCATENATED MODULE: ./src/index.tsx
4467
+ var _excluded = ["wrapperClassName", "childClassName", "wrapperMinHeight", "wrapperMinWidth", "availableHeaderTitle", "selectedHeaderTitle", "selectedHeaderNote", "removeAllBtnLabel", "addAllBtnLabel", "iconAdd", "iconRemove", "hierarchical", "indentation", "doubleIndent", "alternateCollapse", "arrow", "options", "disabled", "required", "value", "label", "name", "id", "extractValueByBrackets", "style", "data", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "fetchCallback", "onFetch", "onChange"];
4468
+ function _regeneratorRuntime() { "use strict"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ _regeneratorRuntime = function _regeneratorRuntime() { return exports; }; var exports = {}, Op = Object.prototype, hasOwn = Op.hasOwnProperty, defineProperty = Object.defineProperty || function (obj, key, desc) { obj[key] = desc.value; }, $Symbol = "function" == typeof Symbol ? Symbol : {}, iteratorSymbol = $Symbol.iterator || "@@iterator", asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator", toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag"; function define(obj, key, value) { return Object.defineProperty(obj, key, { value: value, enumerable: !0, configurable: !0, writable: !0 }), obj[key]; } try { define({}, ""); } catch (err) { define = function define(obj, key, value) { return obj[key] = value; }; } function wrap(innerFn, outerFn, self, tryLocsList) { var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator, generator = Object.create(protoGenerator.prototype), context = new Context(tryLocsList || []); return defineProperty(generator, "_invoke", { value: makeInvokeMethod(innerFn, self, context) }), generator; } function tryCatch(fn, obj, arg) { try { return { type: "normal", arg: fn.call(obj, arg) }; } catch (err) { return { type: "throw", arg: err }; } } exports.wrap = wrap; var ContinueSentinel = {}; function Generator() {} function GeneratorFunction() {} function GeneratorFunctionPrototype() {} var IteratorPrototype = {}; define(IteratorPrototype, iteratorSymbol, function () { return this; }); var getProto = Object.getPrototypeOf, NativeIteratorPrototype = getProto && getProto(getProto(values([]))); NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype); var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype); function defineIteratorMethods(prototype) { ["next", "throw", "return"].forEach(function (method) { define(prototype, method, function (arg) { return this._invoke(method, arg); }); }); } function AsyncIterator(generator, PromiseImpl) { function invoke(method, arg, resolve, reject) { var record = tryCatch(generator[method], generator, arg); if ("throw" !== record.type) { var result = record.arg, value = result.value; return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) { invoke("next", value, resolve, reject); }, function (err) { invoke("throw", err, resolve, reject); }) : PromiseImpl.resolve(value).then(function (unwrapped) { result.value = unwrapped, resolve(result); }, function (error) { return invoke("throw", error, resolve, reject); }); } reject(record.arg); } var previousPromise; defineProperty(this, "_invoke", { value: function value(method, arg) { function callInvokeWithMethodAndArg() { return new PromiseImpl(function (resolve, reject) { invoke(method, arg, resolve, reject); }); } return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg(); } }); } function makeInvokeMethod(innerFn, self, context) { var state = "suspendedStart"; return function (method, arg) { if ("executing" === state) throw new Error("Generator is already running"); if ("completed" === state) { if ("throw" === method) throw arg; return doneResult(); } for (context.method = method, context.arg = arg;;) { var delegate = context.delegate; if (delegate) { var delegateResult = maybeInvokeDelegate(delegate, context); if (delegateResult) { if (delegateResult === ContinueSentinel) continue; return delegateResult; } } if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) { if ("suspendedStart" === state) throw state = "completed", context.arg; context.dispatchException(context.arg); } else "return" === context.method && context.abrupt("return", context.arg); state = "executing"; var record = tryCatch(innerFn, self, context); if ("normal" === record.type) { if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue; return { value: record.arg, done: context.done }; } "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg); } }; } function maybeInvokeDelegate(delegate, context) { var methodName = context.method, method = delegate.iterator[methodName]; if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel; var record = tryCatch(method, delegate.iterator, context.arg); if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel; var info = record.arg; return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel); } function pushTryEntry(locs) { var entry = { tryLoc: locs[0] }; 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry); } function resetTryEntry(entry) { var record = entry.completion || {}; record.type = "normal", delete record.arg, entry.completion = record; } function Context(tryLocsList) { this.tryEntries = [{ tryLoc: "root" }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0); } function values(iterable) { if (iterable) { var iteratorMethod = iterable[iteratorSymbol]; if (iteratorMethod) return iteratorMethod.call(iterable); if ("function" == typeof iterable.next) return iterable; if (!isNaN(iterable.length)) { var i = -1, next = function next() { for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next; return next.value = undefined, next.done = !0, next; }; return next.next = next; } } return { next: doneResult }; } function doneResult() { return { value: undefined, done: !0 }; } return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", { value: GeneratorFunctionPrototype, configurable: !0 }), defineProperty(GeneratorFunctionPrototype, "constructor", { value: GeneratorFunction, configurable: !0 }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) { var ctor = "function" == typeof genFun && genFun.constructor; return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name)); }, exports.mark = function (genFun) { return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun; }, exports.awrap = function (arg) { return { __await: arg }; }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () { return this; }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) { void 0 === PromiseImpl && (PromiseImpl = Promise); var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl); return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) { return result.done ? result.value : iter.next(); }); }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () { return this; }), define(Gp, "toString", function () { return "[object Generator]"; }), exports.keys = function (val) { var object = Object(val), keys = []; for (var key in object) keys.push(key); return keys.reverse(), function next() { for (; keys.length;) { var key = keys.pop(); if (key in object) return next.value = key, next.done = !1, next; } return next.done = !0, next; }; }, exports.values = values, Context.prototype = { constructor: Context, reset: function reset(skipTempReset) { if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined); }, stop: function stop() { this.done = !0; var rootRecord = this.tryEntries[0].completion; if ("throw" === rootRecord.type) throw rootRecord.arg; return this.rval; }, dispatchException: function dispatchException(exception) { if (this.done) throw exception; var context = this; function handle(loc, caught) { return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught; } for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i], record = entry.completion; if ("root" === entry.tryLoc) return handle("end"); if (entry.tryLoc <= this.prev) { var hasCatch = hasOwn.call(entry, "catchLoc"), hasFinally = hasOwn.call(entry, "finallyLoc"); if (hasCatch && hasFinally) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } else if (hasCatch) { if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0); } else { if (!hasFinally) throw new Error("try statement without catch or finally"); if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc); } } } }, abrupt: function abrupt(type, arg) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) { var finallyEntry = entry; break; } } finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null); var record = finallyEntry ? finallyEntry.completion : {}; return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record); }, complete: function complete(record, afterLoc) { if ("throw" === record.type) throw record.arg; return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel; }, finish: function finish(finallyLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel; } }, "catch": function _catch(tryLoc) { for (var i = this.tryEntries.length - 1; i >= 0; --i) { var entry = this.tryEntries[i]; if (entry.tryLoc === tryLoc) { var record = entry.completion; if ("throw" === record.type) { var thrown = record.arg; resetTryEntry(entry); } return thrown; } } throw new Error("illegal catch attempt"); }, delegateYield: function delegateYield(iterable, resultName, nextLoc) { return this.delegate = { iterator: values(iterable), resultName: resultName, nextLoc: nextLoc }, "next" === this.method && (this.arg = undefined), ContinueSentinel; } }, exports; }
4469
+ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
4470
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
4471
+ function src_toConsumableArray(arr) { return src_arrayWithoutHoles(arr) || src_iterableToArray(arr) || src_unsupportedIterableToArray(arr) || src_nonIterableSpread(); }
4472
+ function src_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."); }
4473
+ function src_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
4474
+ function src_arrayWithoutHoles(arr) { if (Array.isArray(arr)) return src_arrayLikeToArray(arr); }
4205
4475
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { Promise.resolve(value).then(_next, _throw); } }
4206
4476
  function _asyncToGenerator(fn) { return function () { var self = this, args = arguments; return new Promise(function (resolve, reject) { var gen = fn.apply(self, args); function _next(value) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value); } function _throw(err) { asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err); } _next(undefined); }); }; }
4207
- function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4477
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || src_unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
4208
4478
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4209
- 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); }
4210
- function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4479
+ function src_unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return src_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 src_arrayLikeToArray(o, minLen); }
4480
+ function src_arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
4211
4481
  function _iterableToArrayLimit(arr, i) { var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"]; if (null != _i) { var _s, _e, _x, _r, _arr = [], _n = !0, _d = !1; try { if (_x = (_i = _i.call(arr)).next, 0 === i) { if (Object(_i) !== _i) return; _n = !1; } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0); } catch (err) { _d = !0, _e = err; } finally { try { if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return; } finally { if (_d) throw _e; } } return _arr; } }
4212
4482
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
4213
4483
  function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
4214
4484
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
4215
4485
 
4216
4486
 
4217
- var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardRef)(function (props, externalRef) {
4487
+
4488
+
4489
+ var MultipleSelect = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, externalRef) {
4218
4490
  var wrapperClassName = props.wrapperClassName,
4491
+ childClassName = props.childClassName,
4219
4492
  wrapperMinHeight = props.wrapperMinHeight,
4220
4493
  wrapperMinWidth = props.wrapperMinWidth,
4221
4494
  availableHeaderTitle = props.availableHeaderTitle,
@@ -4228,6 +4501,8 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4228
4501
  hierarchical = props.hierarchical,
4229
4502
  indentation = props.indentation,
4230
4503
  doubleIndent = props.doubleIndent,
4504
+ alternateCollapse = props.alternateCollapse,
4505
+ arrow = props.arrow,
4231
4506
  options = props.options,
4232
4507
  disabled = props.disabled,
4233
4508
  required = props.required,
@@ -4250,18 +4525,18 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4250
4525
  var INDENT_PLACEHOLDER = doubleIndent ? "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" : "&nbsp;&nbsp;&nbsp;&nbsp;";
4251
4526
  var INDENT_LAST_PLACEHOLDER = "".concat(typeof indentation !== 'undefined' && indentation !== '' ? "".concat(indentation, "&nbsp;&nbsp;") : '');
4252
4527
  var VALUE_BY_BRACKETS = typeof extractValueByBrackets === 'undefined' ? true : extractValueByBrackets;
4253
- var uniqueID = (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.useComId)();
4528
+ var uniqueID = (0,cjs.useComId)();
4254
4529
  var idRes = id || uniqueID;
4255
- var rootRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
4256
- var inputRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
4257
- var availableListRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
4258
- var selectedListRef = (0,react__WEBPACK_IMPORTED_MODULE_0__.useRef)(null);
4259
- var optionsRes = options ? (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.isJSON)(options) ? JSON.parse(options) : options : [];
4260
- var _useState = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
4530
+ var rootRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4531
+ var inputRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4532
+ var availableListRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4533
+ var selectedListRef = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useRef)(null);
4534
+ var optionsRes = options ? (0,cjs.isJSON)(options) ? JSON.parse(options) : options : [];
4535
+ var _useState = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
4261
4536
  _useState2 = _slicedToArray(_useState, 2),
4262
4537
  valSelectedData = _useState2[0],
4263
4538
  setValSelectedData = _useState2[1];
4264
- var _useState3 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)([]),
4539
+ var _useState3 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)([]),
4265
4540
  _useState4 = _slicedToArray(_useState3, 2),
4266
4541
  valSelected = _useState4[0],
4267
4542
  setValSelected = _useState4[1];
@@ -4270,26 +4545,20 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4270
4545
  var optionsDataInit = optionsRes;
4271
4546
 
4272
4547
  //
4273
- var _useState5 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(''),
4548
+ var _useState5 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(''),
4274
4549
  _useState6 = _slicedToArray(_useState5, 2),
4275
4550
  changedSearchVal = _useState6[0],
4276
4551
  setChangedSearchVal = _useState6[1];
4277
4552
 
4278
4553
  //
4279
- var _useState7 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(optionsDataInit),
4554
+ var _useState7 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(optionsDataInit),
4280
4555
  _useState8 = _slicedToArray(_useState7, 2),
4281
4556
  dataInit = _useState8[0],
4282
4557
  setDataInit = _useState8[1];
4283
- var _useState9 = (0,react__WEBPACK_IMPORTED_MODULE_0__.useState)(false),
4558
+ var _useState9 = (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useState)(false),
4284
4559
  _useState10 = _slicedToArray(_useState9, 2),
4285
4560
  hasErr = _useState10[0],
4286
4561
  setHasErr = _useState10[1];
4287
- var multiSelControlOptionExist = function multiSelControlOptionExist(arr, val) {
4288
- var _data = arr.filter(Boolean);
4289
- return _data.map(function (v) {
4290
- return v.toString();
4291
- }).includes(val.toString());
4292
- };
4293
4562
  function fetchData(_x2) {
4294
4563
  return _fetchData.apply(this, arguments);
4295
4564
  }
@@ -4308,7 +4577,7 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4308
4577
  break;
4309
4578
  }
4310
4579
  _context.next = 4;
4311
- return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, _toConsumableArray(params.split(',')));
4580
+ return fetchFuncAsync["".concat(fetchFuncMethod)].apply(fetchFuncAsync, src_toConsumableArray(params.split(',')));
4312
4581
  case 4:
4313
4582
  response = _context.sent;
4314
4583
  _ORGIN_DATA = response.data; // reset data structure
@@ -4325,12 +4594,12 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4325
4594
 
4326
4595
  // Set hierarchical categories ( with sub-categories )
4327
4596
  if (hierarchical) {
4328
- _ORGIN_DATA = (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.addTreeDepth)(_ORGIN_DATA);
4329
- (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.addTreeIndent)(_ORGIN_DATA, INDENT_PLACEHOLDER, INDENT_LAST_PLACEHOLDER, 'label');
4597
+ _ORGIN_DATA = (0,cjs.addTreeDepth)(_ORGIN_DATA);
4598
+ (0,cjs.addTreeIndent)(_ORGIN_DATA, INDENT_PLACEHOLDER, INDENT_LAST_PLACEHOLDER, 'label');
4330
4599
  }
4331
4600
 
4332
4601
  // remove Duplicate objects from JSON Array
4333
- _ORGIN_DATA = (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
4602
+ _ORGIN_DATA = (0,cjs.removeArrDuplicateItems)(_ORGIN_DATA, 'value');
4334
4603
 
4335
4604
  //
4336
4605
  setDataInit(_ORGIN_DATA); // data must be initialized
@@ -4342,8 +4611,14 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4342
4611
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(_ORGIN_DATA);
4343
4612
  return _context.abrupt("return", _ORGIN_DATA);
4344
4613
  case 16:
4614
+ // Set hierarchical categories ( with sub-categories )
4615
+ if (hierarchical) {
4616
+ optionsDataInit = (0,cjs.addTreeDepth)(optionsDataInit);
4617
+ (0,cjs.addTreeIndent)(optionsDataInit, INDENT_PLACEHOLDER, INDENT_LAST_PLACEHOLDER, 'label');
4618
+ }
4619
+
4345
4620
  // remove Duplicate objects from JSON Array
4346
- optionsDataInit = (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.removeArrDuplicateItems)(optionsDataInit, 'value');
4621
+ optionsDataInit = (0,cjs.removeArrDuplicateItems)(optionsDataInit, 'value');
4347
4622
 
4348
4623
  //
4349
4624
  setDataInit(optionsDataInit); // data must be initialized
@@ -4354,7 +4629,7 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4354
4629
  //
4355
4630
  onFetch === null || onFetch === void 0 ? void 0 : onFetch(optionsDataInit);
4356
4631
  return _context.abrupt("return", optionsDataInit);
4357
- case 21:
4632
+ case 22:
4358
4633
  case "end":
4359
4634
  return _context.stop();
4360
4635
  }
@@ -4368,7 +4643,7 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4368
4643
  setValSelected([]);
4369
4644
  setValSelectedData([]);
4370
4645
  } else {
4371
- var _val = VALUE_BY_BRACKETS ? (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.extractContentsOfBrackets)(defaultValue) : defaultValue.trim().replace(/^\,|\,$/g, '').split(',');
4646
+ var _val = VALUE_BY_BRACKETS ? (0,cjs.extractContentsOfBrackets)(defaultValue) : defaultValue.trim().replace(/^\,|\,$/g, '').split(',');
4372
4647
  if (Array.isArray(_val)) {
4373
4648
  var _initVal = _val.filter(function (v) {
4374
4649
  return v !== '';
@@ -4400,8 +4675,8 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4400
4675
  return item == _val;
4401
4676
  });
4402
4677
  if (index !== -1) newData.splice(index, 1);
4403
- var _res = _val ? Array.from(new Set([_val].concat(_toConsumableArray(newData)))) : newData;
4404
- onChange === null || onChange === void 0 ? void 0 : onChange(_li, _res, VALUE_BY_BRACKETS ? (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.convertArrToValByBrackets)(_res) : _res.join(','), _data, 'add');
4678
+ var _res = _val ? Array.from(new Set([_val].concat(src_toConsumableArray(newData)))) : newData;
4679
+ onChange === null || onChange === void 0 ? void 0 : onChange(_li, _res, VALUE_BY_BRACKETS ? (0,cjs.convertArrToValByBrackets)(_res) : _res.join(','), _data, 'add');
4405
4680
 
4406
4681
  // hide current item
4407
4682
  _li.classList.add('hide');
@@ -4415,7 +4690,7 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4415
4690
  return item.value == _val;
4416
4691
  });
4417
4692
  if (index !== -1) newData.splice(index, 1);
4418
- var _res = _val ? Array.from(new Set([_data].concat(_toConsumableArray(newData)))) : newData;
4693
+ var _res = _val ? Array.from(new Set([_data].concat(src_toConsumableArray(newData)))) : newData;
4419
4694
  return _res;
4420
4695
  });
4421
4696
  }
@@ -4433,7 +4708,7 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4433
4708
  });
4434
4709
  if (index !== -1) newData.splice(index, 1);
4435
4710
  var _res = newData;
4436
- onChange === null || onChange === void 0 ? void 0 : onChange(_li, _res, VALUE_BY_BRACKETS ? (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.convertArrToValByBrackets)(_res) : _res.join(','), _data, 'remove');
4711
+ onChange === null || onChange === void 0 ? void 0 : onChange(_li, _res, VALUE_BY_BRACKETS ? (0,cjs.convertArrToValByBrackets)(_res) : _res.join(','), _data, 'remove');
4437
4712
 
4438
4713
  // show current item
4439
4714
  if (availableListRef.current) {
@@ -4497,22 +4772,22 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4497
4772
  }
4498
4773
  });
4499
4774
  }
4500
- (0,react__WEBPACK_IMPORTED_MODULE_0__.useEffect)(function () {
4775
+ (0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
4501
4776
  // data init
4502
4777
  //--------------
4503
4778
  var _params = fetchFuncMethodParams || [];
4504
4779
  fetchData(_params.join(','));
4505
4780
  }, [value, options, data]);
4506
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4781
+ return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4507
4782
  className: wrapperClassName || wrapperClassName === '' ? "m-select__wrapper ".concat(wrapperClassName) : "m-select__wrapper mb-3",
4508
4783
  ref: rootRef,
4509
4784
  style: {
4510
4785
  minWidth: WRAPPER_MIN_W === '' ? 'var(--m-select-wrapper-min-w)' : WRAPPER_MIN_W,
4511
4786
  minHeight: WRAPPER_MIN_H === '' ? 'var(--m-select-wrapper-min-h)' : WRAPPER_MIN_H
4512
4787
  }
4513
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4788
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4514
4789
  className: "m-select-diving-line"
4515
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", _extends({
4790
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", _extends({
4516
4791
  ref: function ref(node) {
4517
4792
  inputRef.current = node;
4518
4793
  if (typeof externalRef === 'function') {
@@ -4525,133 +4800,90 @@ var MultipleSelect = /*#__PURE__*/(0,react__WEBPACK_IMPORTED_MODULE_0__.forwardR
4525
4800
  type: "hidden",
4526
4801
  id: idRes,
4527
4802
  name: name,
4528
- value: VALUE_BY_BRACKETS ? (0,funda_utils__WEBPACK_IMPORTED_MODULE_1__.convertArrToValByBrackets)(valSelected) : valSelected.join(',') // do not use `defaultValue`
4803
+ value: VALUE_BY_BRACKETS ? (0,cjs.convertArrToValByBrackets)(valSelected) : valSelected.join(',') // do not use `defaultValue`
4529
4804
  ,
4530
4805
  onChange: function onChange() {
4531
4806
  return void 0;
4532
4807
  },
4533
4808
  required: required || null
4534
- }, attributes)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4809
+ }, attributes)), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4535
4810
  className: "m-select-inner"
4536
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4811
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4537
4812
  className: "m-select__available__container"
4538
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4813
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4539
4814
  className: "m-select__m-select__item-actions m-select__header"
4540
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4815
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4541
4816
  className: "m-select__search__container"
4542
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("input", {
4817
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("input", {
4543
4818
  type: "text",
4544
4819
  value: changedSearchVal,
4545
4820
  className: "m-select__search",
4546
4821
  onChange: handleChangeSearch
4547
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
4822
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("i", null, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
4548
4823
  width: "0.8em",
4549
4824
  height: "0.8em",
4550
4825
  fill: "#ddd",
4551
4826
  viewBox: "0 0 16 16"
4552
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4827
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
4553
4828
  d: "M12.027 9.92L16 13.95 14 16l-4.075-3.976A6.465 6.465 0 0 1 6.5 13C2.91 13 0 10.083 0 6.5 0 2.91 2.917 0 6.5 0 10.09 0 13 2.917 13 6.5a6.463 6.463 0 0 1-.973 3.42zM1.997 6.452c0 2.48 2.014 4.5 4.5 4.5 2.48 0 4.5-2.015 4.5-4.5 0-2.48-2.015-4.5-4.5-4.5-2.48 0-4.5 2.014-4.5 4.5z",
4554
4829
  fillRule: "evenodd"
4555
- })))), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
4830
+ })))), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4556
4831
  className: "m-select__title",
4557
4832
  dangerouslySetInnerHTML: {
4558
4833
  __html: "".concat(availableHeaderTitle || '')
4559
4834
  }
4560
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
4835
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
4561
4836
  href: "#",
4562
4837
  className: "m-select__btn--add-all",
4563
4838
  onClick: handleSelectAll
4564
- }, addAllBtnLabel || 'Add all')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", {
4565
- className: "m-select__available m-select__options-contentlist",
4566
- ref: availableListRef
4567
- }, dataInit ? dataInit.map(function (item, i) {
4568
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", {
4569
- key: 'item' + i,
4570
- className: "".concat(item.disabled ? 'disabled' : '', " ").concat(multiSelControlOptionExist(valSelected, item.value) ? 'hide' : ''),
4571
- "data-index": i,
4572
- "data-value": "".concat(item.value),
4573
- "data-label": "".concat(item.label),
4574
- "data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
4575
- "data-disabled": item.disabled || 'false',
4576
- "data-querystring": "".concat(typeof item.queryString === 'undefined' ? '' : item.queryString),
4577
- "data-itemdata": JSON.stringify(item)
4578
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", {
4579
- dangerouslySetInnerHTML: {
4580
- __html: typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel
4581
- }
4582
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
4583
- href: "#",
4584
- className: "m-select__item-action"
4585
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", {
4586
- onClick: function onClick(e) {
4587
- selectItem(e.target.closest('li'));
4588
- }
4589
- }, iconAdd ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconAdd) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
4590
- width: "15px",
4591
- height: "15px",
4592
- viewBox: "0 0 24 24",
4593
- fill: "none"
4594
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4595
- d: "M12 2C6.49 2 2 6.49 2 12C2 17.51 6.49 22 12 22C17.51 22 22 17.51 22 12C22 6.49 17.51 2 12 2ZM16 12.75H12.75V16C12.75 16.41 12.41 16.75 12 16.75C11.59 16.75 11.25 16.41 11.25 16V12.75H8C7.59 12.75 7.25 12.41 7.25 12C7.25 11.59 7.59 11.25 8 11.25H11.25V8C11.25 7.59 11.59 7.25 12 7.25C12.41 7.25 12.75 7.59 12.75 8V11.25H16C16.41 11.25 16.75 11.59 16.75 12C16.75 12.41 16.41 12.75 16 12.75Z",
4596
- fill: "#000"
4597
- })))));
4598
- }) : null)), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4839
+ }, addAllBtnLabel || 'Add all')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ItemList, {
4840
+ root: rootRef.current,
4841
+ listContainerClassName: "m-select__available m-select__options-contentlist",
4842
+ ref: availableListRef,
4843
+ indentStr: INDENT_LAST_PLACEHOLDER,
4844
+ valSelected: valSelected,
4845
+ iconAdd: iconAdd,
4846
+ onSelect: selectItem,
4847
+ alternateCollapse: alternateCollapse,
4848
+ first: true,
4849
+ arrow: arrow,
4850
+ data: dataInit,
4851
+ childClassName: childClassName || 'm-select__options-contentlist-custom'
4852
+ })), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4599
4853
  className: "m-select__selected__container"
4600
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("div", {
4854
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
4601
4855
  className: "m-select__m-select__item-actions m-select__header"
4602
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
4856
+ }, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4603
4857
  className: "m-select__count",
4604
4858
  dangerouslySetInnerHTML: {
4605
4859
  __html: "".concat(typeof selectedHeaderNote !== 'undefined' ? selectedHeaderNote.replace('{items_num}', valSelectedData.length) : '')
4606
4860
  }
4607
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
4861
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("span", {
4608
4862
  className: "m-select__title",
4609
4863
  dangerouslySetInnerHTML: {
4610
4864
  __html: "".concat(selectedHeaderTitle || '')
4611
4865
  }
4612
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
4866
+ }), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("a", {
4613
4867
  href: "#",
4614
4868
  className: "m-select__btn--remove-all",
4615
4869
  onClick: handleRemoveAll
4616
- }, removeAllBtnLabel || 'Remove all')), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("ul", {
4617
- className: "m-select__selected m-select__options-contentlist--sortable m-select__options-contentlist",
4618
- ref: selectedListRef
4619
- }, valSelectedData ? valSelectedData.map(function (item, i) {
4620
- return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("li", {
4621
- key: 'item-selected' + i,
4622
- className: "selected",
4623
- "data-index": i,
4624
- "data-value": "".concat(item.value),
4625
- "data-label": "".concat(item.label),
4626
- "data-list-item-label": "".concat(typeof item.listItemLabel === 'undefined' ? '' : item.listItemLabel),
4627
- "data-disabled": item.disabled || 'false',
4628
- "data-querystring": "".concat(typeof item.queryString === 'undefined' ? '' : item.queryString),
4629
- "data-itemdata": JSON.stringify(item)
4630
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("strong", {
4631
- dangerouslySetInnerHTML: {
4632
- __html: typeof item.listItemLabel === 'undefined' ? item.label : item.listItemLabel
4633
- }
4634
- }), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("a", {
4635
- href: "#",
4636
- className: "m-select__item-action"
4637
- })), /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("i", {
4638
- onClick: function onClick(e) {
4639
- removeItem(e.target.closest('li'));
4640
- }
4641
- }, iconRemove ? /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, iconRemove) : /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement((react__WEBPACK_IMPORTED_MODULE_0___default().Fragment), null, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("svg", {
4642
- width: "15px",
4643
- height: "15px",
4644
- viewBox: "0 0 24 24",
4645
- fill: "none"
4646
- }, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("path", {
4647
- fillRule: "evenodd",
4648
- clipRule: "evenodd",
4649
- d: "M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10ZM8 11a1 1 0 1 0 0 2h8a1 1 0 1 0 0-2H8Z",
4650
- fill: "#000"
4651
- })))));
4652
- }) : null)))));
4870
+ }, removeAllBtnLabel || 'Remove all')), /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement(src_ItemList, {
4871
+ root: rootRef.current,
4872
+ listContainerClassName: "m-select__selected m-select__options-contentlist--sortable m-select__options-contentlist",
4873
+ ref: selectedListRef,
4874
+ indentStr: INDENT_LAST_PLACEHOLDER,
4875
+ valSelected: valSelected,
4876
+ iconRemove: iconRemove,
4877
+ onSelect: removeItem,
4878
+ alternateCollapse: alternateCollapse,
4879
+ first: true,
4880
+ arrow: arrow,
4881
+ data: valSelectedData,
4882
+ childClassName: childClassName || 'm-select__options-contentlist--custom',
4883
+ selected: true
4884
+ })))));
4653
4885
  });
4654
- /* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = (MultipleSelect);
4886
+ /* harmony default export */ const src = (MultipleSelect);
4655
4887
  })();
4656
4888
 
4657
4889
  /******/ return __webpack_exports__;