funda-ui 4.3.555 → 4.4.15
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.
- package/Date/index.js +104 -0
- package/EventCalendar/index.css +7 -0
- package/EventCalendar/index.d.ts +2 -0
- package/EventCalendar/index.js +228 -89
- package/EventCalendarTimeline/index.css +29 -1
- package/EventCalendarTimeline/index.d.ts +11 -1
- package/EventCalendarTimeline/index.js +796 -298
- package/MultipleSelect/index.js +1 -1
- package/NativeSelect/index.js +1 -1
- package/Select/index.css +17 -0
- package/Select/index.d.ts +1 -0
- package/Select/index.js +83 -38
- package/Table/index.d.ts +4 -4
- package/Table/index.js +17 -17
- package/Tree/index.js +1 -1
- package/Utils/date.d.ts +27 -1
- package/Utils/date.js +92 -0
- package/lib/cjs/Date/index.js +104 -0
- package/lib/cjs/EventCalendar/index.d.ts +2 -0
- package/lib/cjs/EventCalendar/index.js +228 -89
- package/lib/cjs/EventCalendarTimeline/index.d.ts +11 -1
- package/lib/cjs/EventCalendarTimeline/index.js +796 -298
- package/lib/cjs/MultipleSelect/index.js +1 -1
- package/lib/cjs/NativeSelect/index.js +1 -1
- package/lib/cjs/Select/index.d.ts +1 -0
- package/lib/cjs/Select/index.js +83 -38
- package/lib/cjs/Table/index.d.ts +4 -4
- package/lib/cjs/Table/index.js +17 -17
- package/lib/cjs/Tree/index.js +1 -1
- package/lib/cjs/Utils/date.d.ts +27 -1
- package/lib/cjs/Utils/date.js +92 -0
- package/lib/css/EventCalendar/index.css +7 -0
- package/lib/css/EventCalendarTimeline/index.css +29 -1
- package/lib/css/Select/index.css +17 -0
- package/lib/esm/EventCalendar/index.scss +9 -0
- package/lib/esm/EventCalendar/index.tsx +203 -156
- package/lib/esm/EventCalendarTimeline/index.scss +46 -1
- package/lib/esm/EventCalendarTimeline/index.tsx +815 -358
- package/lib/esm/MultipleSelect/ItemList.tsx +1 -1
- package/lib/esm/MultipleSelect/index.tsx +1 -1
- package/lib/esm/NativeSelect/index.tsx +1 -1
- package/lib/esm/Select/index.scss +36 -1
- package/lib/esm/Select/index.tsx +179 -30
- package/lib/esm/Table/Table.tsx +2 -2
- package/lib/esm/Table/TableCell.tsx +2 -2
- package/lib/esm/Table/TableRow.tsx +1 -1
- package/lib/esm/Table/index.tsx +4 -4
- package/lib/esm/Tree/TreeList.tsx +1 -1
- package/lib/esm/Utils/libs/date.ts +101 -1
- package/package.json +1 -1
- /package/lib/esm/MultipleSelect/{multiple-select-utils → utils}/func.ts +0 -0
- /package/lib/esm/NativeSelect/{native-select-utils → utils}/func.ts +0 -0
- /package/lib/esm/Select/{select-utils → utils}/func.ts +0 -0
- /package/lib/esm/Table/{table-utils → utils}/DragHandleSprite.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/SortSprite.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/TableFilter.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/ToggleSelection.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/func.ts +0 -0
- /package/lib/esm/Table/{table-utils → utils}/hooks/useTableDraggable.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/hooks/useTableKeyPress.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/hooks/useTableResponsive.tsx +0 -0
- /package/lib/esm/Table/{table-utils → utils}/hooks/useTableSort.tsx +0 -0
- /package/lib/esm/Tree/{tree-utils.ts → utils/func.ts} +0 -0
|
@@ -1898,7 +1898,7 @@ var convert = __webpack_require__(79);
|
|
|
1898
1898
|
var object = __webpack_require__(575);
|
|
1899
1899
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
1900
1900
|
var cls = __webpack_require__(188);
|
|
1901
|
-
;// CONCATENATED MODULE: ./src/
|
|
1901
|
+
;// CONCATENATED MODULE: ./src/utils/func.ts
|
|
1902
1902
|
/**
|
|
1903
1903
|
* Format indent value
|
|
1904
1904
|
* @param {String|Array} inputData
|
|
@@ -1201,7 +1201,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
1201
1201
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
1202
1202
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
1203
1203
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
1204
|
-
;// CONCATENATED MODULE: ./src/
|
|
1204
|
+
;// CONCATENATED MODULE: ./src/utils/func.ts
|
|
1205
1205
|
/**
|
|
1206
1206
|
* Format indent value
|
|
1207
1207
|
* @param {String|Array} inputData
|
|
@@ -92,6 +92,7 @@ export declare type SelectProps = {
|
|
|
92
92
|
onChange?: SelectOptionChangeFnType | null;
|
|
93
93
|
onBlur?: (e: any) => void;
|
|
94
94
|
onFocus?: (e: any) => void;
|
|
95
|
+
onKeyPressed?: (arg1: any, arg2: any, arg3: any) => void;
|
|
95
96
|
};
|
|
96
97
|
declare const Select: React.ForwardRefExoticComponent<SelectProps & React.RefAttributes<unknown>>;
|
|
97
98
|
export default Select;
|
package/lib/cjs/Select/index.js
CHANGED
|
@@ -3299,7 +3299,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
3299
3299
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
3300
3300
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_ = __webpack_require__(787);
|
|
3301
3301
|
var external_root_React_commonjs2_react_commonjs_react_amd_react_default = /*#__PURE__*/__webpack_require__.n(external_root_React_commonjs2_react_commonjs_react_amd_react_);
|
|
3302
|
-
;// CONCATENATED MODULE: ./src/
|
|
3302
|
+
;// CONCATENATED MODULE: ./src/utils/func.ts
|
|
3303
3303
|
/**
|
|
3304
3304
|
* Format indent value
|
|
3305
3305
|
* @param {String|Array} inputData
|
|
@@ -3438,7 +3438,7 @@ var bodyScrollLock = __webpack_require__(70);
|
|
|
3438
3438
|
// EXTERNAL MODULE: ../Utils/dist/cjs/cls.js
|
|
3439
3439
|
var cls = __webpack_require__(188);
|
|
3440
3440
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
3441
|
-
var _excluded = ["contentRef", "popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "exceededSidePosOffset", "multiSelect", "multiSelectEntireAreaTrigger", "multiSelectSelectedItemOnlyStatus", "renderSelectedValue", "disabled", "required", "defaultValue", "value", "label", "name", "readOnly", "placeholder", "id", "autoComplete", "autoCapitalize", "spellCheck", "options", "cleanTrigger", "lockBodyScroll", "hierarchical", "indentation", "doubleIndent", "style", "depth", "controlArrow", "winWidth", "tabIndex", "firstRequestAutoExec", "fetchTrigger", "fetchTriggerForDefaultData", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "data", "extractValueByBrackets", "fetchCallback", "onFetch", "onLoad", "onSelect", "onChange", "onBlur", "onFocus"];
|
|
3441
|
+
var _excluded = ["contentRef", "popupRef", "wrapperClassName", "controlClassName", "controlExClassName", "exceededSidePosOffset", "multiSelect", "multiSelectEntireAreaTrigger", "multiSelectSelectedItemOnlyStatus", "renderSelectedValue", "disabled", "required", "defaultValue", "value", "label", "name", "readOnly", "placeholder", "id", "autoComplete", "autoCapitalize", "spellCheck", "options", "cleanTrigger", "lockBodyScroll", "hierarchical", "indentation", "doubleIndent", "style", "depth", "controlArrow", "winWidth", "tabIndex", "firstRequestAutoExec", "fetchTrigger", "fetchTriggerForDefaultData", "fetchNoneInfo", "fetchUpdate", "fetchFuncAsync", "fetchFuncMethod", "fetchFuncMethodParams", "data", "extractValueByBrackets", "fetchCallback", "onFetch", "onLoad", "onSelect", "onChange", "onBlur", "onFocus", "onKeyPressed"];
|
|
3442
3442
|
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; }
|
|
3443
3443
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
3444
3444
|
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."); }
|
|
@@ -3530,10 +3530,11 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3530
3530
|
onChange = props.onChange,
|
|
3531
3531
|
onBlur = props.onBlur,
|
|
3532
3532
|
onFocus = props.onFocus,
|
|
3533
|
+
onKeyPressed = props.onKeyPressed,
|
|
3533
3534
|
attributes = _objectWithoutProperties(props, _excluded);
|
|
3534
3535
|
var DEPTH = depth || 1055; // the default value same as bootstrap
|
|
3535
|
-
var
|
|
3536
|
-
var LIVE_SEARCH_DISABLED =
|
|
3536
|
+
var MANUAL_REQ = typeof fetchTrigger !== 'undefined' && fetchTrigger === true ? true : false; // Manual requests
|
|
3537
|
+
var LIVE_SEARCH_DISABLED = !MANUAL_REQ && typeof window !== 'undefined' && typeof window['funda-ui__Select-disable-livesearch'] !== 'undefined' ? true : false; // Globally disable real-time search functionality (only valid for non-dynamic requests)
|
|
3537
3538
|
|
|
3538
3539
|
var FIRST_REQUEST_AUTO = typeof firstRequestAutoExec === 'undefined' ? true : firstRequestAutoExec;
|
|
3539
3540
|
var INPUT_READONLY = LIVE_SEARCH_DISABLED ? true : typeof readOnly === 'undefined' ? null : readOnly;
|
|
@@ -3865,7 +3866,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
3865
3866
|
// STEP 4: ===========
|
|
3866
3867
|
// value & label must be initialized
|
|
3867
3868
|
filterRes = [];
|
|
3868
|
-
if (
|
|
3869
|
+
if (MANUAL_REQ) {
|
|
3869
3870
|
// If a manual action is used to trigger the request
|
|
3870
3871
|
if (typeof fetchTriggerForDefaultData !== 'undefined' && fetchTriggerForDefaultData !== null && typeof (fetchTriggerForDefaultData === null || fetchTriggerForDefaultData === void 0 ? void 0 : fetchTriggerForDefaultData.values[0]) !== 'undefined') {
|
|
3871
3872
|
filterRes = [{
|
|
@@ -4346,7 +4347,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4346
4347
|
// hide list
|
|
4347
4348
|
setIsOpen(false);
|
|
4348
4349
|
if (!MULTI_SEL_VALID) popwinPosHide();
|
|
4349
|
-
if (
|
|
4350
|
+
if (MANUAL_REQ) {
|
|
4350
4351
|
// clean data
|
|
4351
4352
|
setOptionsData([]);
|
|
4352
4353
|
} else {
|
|
@@ -4394,7 +4395,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4394
4395
|
popwinNoMatchInit();
|
|
4395
4396
|
}, 500);
|
|
4396
4397
|
}
|
|
4397
|
-
if (
|
|
4398
|
+
if (MANUAL_REQ) {
|
|
4398
4399
|
// clean data
|
|
4399
4400
|
setOptionsData([]);
|
|
4400
4401
|
} else {
|
|
@@ -4402,6 +4403,11 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4402
4403
|
setOptionsData(orginalData);
|
|
4403
4404
|
}
|
|
4404
4405
|
|
|
4406
|
+
// When you select multiple times, it automatically focuses on the search input box
|
|
4407
|
+
if (MULTI_SEL_VALID) {
|
|
4408
|
+
selectInputRef.current.select();
|
|
4409
|
+
}
|
|
4410
|
+
|
|
4405
4411
|
// update temporary value
|
|
4406
4412
|
setControlTempValue('');
|
|
4407
4413
|
|
|
@@ -4412,6 +4418,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4412
4418
|
// This is also the element to apply the CSS '-webkit-overflow-scrolling: touch;' if desired.
|
|
4413
4419
|
if (LOCK_BODY_SCROLL) (0,bodyScrollLock.disableBodyScroll)(document.querySelector('body'));
|
|
4414
4420
|
}
|
|
4421
|
+
function fixFocusStatus() {
|
|
4422
|
+
// When selecting multiple times, in order to avoid losing
|
|
4423
|
+
if (MULTI_SEL_VALID) handleFocus(selectInputRef.current);
|
|
4424
|
+
}
|
|
4415
4425
|
function handleSelect(_x5) {
|
|
4416
4426
|
return _handleSelect.apply(this, arguments);
|
|
4417
4427
|
}
|
|
@@ -4691,7 +4701,10 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4691
4701
|
selectInputRef.current.blur();
|
|
4692
4702
|
}
|
|
4693
4703
|
}
|
|
4694
|
-
|
|
4704
|
+
|
|
4705
|
+
// Fixed an out-of-focus issue
|
|
4706
|
+
fixFocusStatus();
|
|
4707
|
+
case 13:
|
|
4695
4708
|
case "end":
|
|
4696
4709
|
return _context2.stop();
|
|
4697
4710
|
}
|
|
@@ -4783,6 +4796,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4783
4796
|
_values = _values2;
|
|
4784
4797
|
}
|
|
4785
4798
|
onChange === null || onChange === void 0 ? void 0 : onChange(selectInputRef.current, valueInputRef.current, multipleSelectionCallback(_values, _labels));
|
|
4799
|
+
|
|
4800
|
+
// Fixed an out-of-focus issue
|
|
4801
|
+
fixFocusStatus();
|
|
4786
4802
|
}
|
|
4787
4803
|
function handleCleanValue(event) {
|
|
4788
4804
|
if (typeof event !== 'undefined') {
|
|
@@ -4894,7 +4910,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4894
4910
|
inputVal = _args4.length > 0 && _args4[0] !== undefined ? _args4[0] : null;
|
|
4895
4911
|
_oparams = fetchFuncMethodParams || [];
|
|
4896
4912
|
_params = _oparams.map(function (item) {
|
|
4897
|
-
return item !== '$QUERY_STRING' ? item :
|
|
4913
|
+
return item !== '$QUERY_STRING' ? item : MANUAL_REQ ? '------' : '';
|
|
4898
4914
|
});
|
|
4899
4915
|
_context4.next = 5;
|
|
4900
4916
|
return fetchData(_params.join(','), finalRes(inputVal), inputVal);
|
|
@@ -4926,6 +4942,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4926
4942
|
|
|
4927
4943
|
//
|
|
4928
4944
|
handleChangeFetchSafe(val);
|
|
4945
|
+
|
|
4946
|
+
// Fixed an out-of-focus issue
|
|
4947
|
+
fixFocusStatus();
|
|
4929
4948
|
}
|
|
4930
4949
|
|
|
4931
4950
|
//
|
|
@@ -4937,7 +4956,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4937
4956
|
setControlTempValue('');
|
|
4938
4957
|
|
|
4939
4958
|
//
|
|
4940
|
-
onFocus === null || onFocus === void 0 ? void 0 : onFocus(
|
|
4959
|
+
onFocus === null || onFocus === void 0 ? void 0 : onFocus(selectInputRef.current);
|
|
4941
4960
|
}
|
|
4942
4961
|
function handleBlur(event) {
|
|
4943
4962
|
var _rootRef$current2;
|
|
@@ -4954,7 +4973,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
4954
4973
|
if (listContentRef.current) listContentRef.current.focus();
|
|
4955
4974
|
}
|
|
4956
4975
|
setTimeout(function () {
|
|
4957
|
-
onBlur === null || onBlur === void 0 ? void 0 : onBlur(
|
|
4976
|
+
onBlur === null || onBlur === void 0 ? void 0 : onBlur(selectInputRef.current);
|
|
4958
4977
|
}, 300);
|
|
4959
4978
|
}
|
|
4960
4979
|
function generateInputFocusStr() {
|
|
@@ -5006,40 +5025,41 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5006
5025
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
5007
5026
|
while (1) switch (_context5.prev = _context5.next) {
|
|
5008
5027
|
case 0:
|
|
5009
|
-
key = event.code;
|
|
5028
|
+
key = event.code; //
|
|
5029
|
+
onKeyPressed === null || onKeyPressed === void 0 ? void 0 : onKeyPressed(event, selectInputRef.current, valueInputRef.current);
|
|
5010
5030
|
if (isOpen) {
|
|
5011
|
-
_context5.next =
|
|
5031
|
+
_context5.next = 4;
|
|
5012
5032
|
break;
|
|
5013
5033
|
}
|
|
5014
5034
|
return _context5.abrupt("return");
|
|
5015
|
-
case
|
|
5035
|
+
case 4:
|
|
5016
5036
|
res = null;
|
|
5017
5037
|
if (!(key === 'Enter' || key === 'NumpadEnter')) {
|
|
5018
|
-
_context5.next =
|
|
5038
|
+
_context5.next = 16;
|
|
5019
5039
|
break;
|
|
5020
5040
|
}
|
|
5021
5041
|
event.preventDefault();
|
|
5022
5042
|
|
|
5023
5043
|
// Determine the "active" class name to avoid listening to other unused components of the same type
|
|
5024
5044
|
if (!(listRef.current === null || !rootRef.current.classList.contains('active'))) {
|
|
5025
|
-
_context5.next =
|
|
5045
|
+
_context5.next = 9;
|
|
5026
5046
|
break;
|
|
5027
5047
|
}
|
|
5028
5048
|
return _context5.abrupt("return");
|
|
5029
|
-
case
|
|
5049
|
+
case 9:
|
|
5030
5050
|
if (!(keyboardSelectedItem.current !== null && keyboardSelectedItem.current.classList.contains('disabled'))) {
|
|
5031
|
-
_context5.next =
|
|
5051
|
+
_context5.next = 11;
|
|
5032
5052
|
break;
|
|
5033
5053
|
}
|
|
5034
5054
|
return _context5.abrupt("return");
|
|
5035
|
-
case
|
|
5055
|
+
case 11:
|
|
5036
5056
|
if (!(listRef.current !== null)) {
|
|
5037
|
-
_context5.next =
|
|
5057
|
+
_context5.next = 16;
|
|
5038
5058
|
break;
|
|
5039
5059
|
}
|
|
5040
|
-
_context5.next =
|
|
5060
|
+
_context5.next = 14;
|
|
5041
5061
|
return listRef.current.dataset.data;
|
|
5042
|
-
case
|
|
5062
|
+
case 14:
|
|
5043
5063
|
currentIndex = _context5.sent;
|
|
5044
5064
|
if (typeof currentIndex !== 'undefined') {
|
|
5045
5065
|
currentData = optionsData[Number(currentIndex)];
|
|
@@ -5065,28 +5085,28 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5065
5085
|
selectInputRef.current.blur();
|
|
5066
5086
|
}
|
|
5067
5087
|
}
|
|
5068
|
-
case
|
|
5088
|
+
case 16:
|
|
5069
5089
|
if (!(key === 'ArrowUp')) {
|
|
5070
|
-
_context5.next =
|
|
5090
|
+
_context5.next = 20;
|
|
5071
5091
|
break;
|
|
5072
5092
|
}
|
|
5073
|
-
_context5.next =
|
|
5093
|
+
_context5.next = 19;
|
|
5074
5094
|
return optionFocus('decrease');
|
|
5075
|
-
case 18:
|
|
5076
|
-
res = _context5.sent;
|
|
5077
5095
|
case 19:
|
|
5096
|
+
res = _context5.sent;
|
|
5097
|
+
case 20:
|
|
5078
5098
|
if (!(key === 'ArrowDown')) {
|
|
5079
|
-
_context5.next =
|
|
5099
|
+
_context5.next = 24;
|
|
5080
5100
|
break;
|
|
5081
5101
|
}
|
|
5082
|
-
_context5.next =
|
|
5102
|
+
_context5.next = 23;
|
|
5083
5103
|
return optionFocus('increase');
|
|
5084
|
-
case 22:
|
|
5085
|
-
res = _context5.sent;
|
|
5086
5104
|
case 23:
|
|
5105
|
+
res = _context5.sent;
|
|
5106
|
+
case 24:
|
|
5087
5107
|
// temporary data
|
|
5088
5108
|
if (res !== null) listRef.current.dataset.data = res.dataset.index;
|
|
5089
|
-
case
|
|
5109
|
+
case 25:
|
|
5090
5110
|
case "end":
|
|
5091
5111
|
return _context5.stop();
|
|
5092
5112
|
}
|
|
@@ -5094,6 +5114,16 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5094
5114
|
}));
|
|
5095
5115
|
return _handleKeyPressed.apply(this, arguments);
|
|
5096
5116
|
}
|
|
5117
|
+
function handleDocOut(e) {
|
|
5118
|
+
if (e.target.closest('.custom-select__options-wrapper') === null && e.target.closest('.custom-select__wrapper') === null) {
|
|
5119
|
+
// cancel
|
|
5120
|
+
cancel();
|
|
5121
|
+
if (MULTI_SEL_VALID) popwinPosHide();
|
|
5122
|
+
|
|
5123
|
+
// DO NOT USE "handleBlur(null)"
|
|
5124
|
+
}
|
|
5125
|
+
}
|
|
5126
|
+
|
|
5097
5127
|
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
5098
5128
|
// Call a function when the component has been rendered completely
|
|
5099
5129
|
//--------------
|
|
@@ -5129,6 +5159,19 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5129
5159
|
}
|
|
5130
5160
|
}
|
|
5131
5161
|
}, []);
|
|
5162
|
+
|
|
5163
|
+
// Fixed an out-of-focus issue
|
|
5164
|
+
//--------------
|
|
5165
|
+
// !!! TIPS:
|
|
5166
|
+
// Fixed: When `fixFocusStatus()` is triggered, the above judgment will be invalidated, and this judgment will be used
|
|
5167
|
+
// Fixed: The pop-up window is not closed due to the mixing of business components
|
|
5168
|
+
(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.useEffect)(function () {
|
|
5169
|
+
document.addEventListener('pointerdown', handleDocOut);
|
|
5170
|
+
return function () {
|
|
5171
|
+
document.removeEventListener('pointerdown', handleDocOut);
|
|
5172
|
+
};
|
|
5173
|
+
}, [orginalData]); // Avoid the issue that `setOptionsData(orginalData)` sets the original value to empty on the first entry
|
|
5174
|
+
|
|
5132
5175
|
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, label ? /*#__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", {
|
|
5133
5176
|
className: "custom-select__label"
|
|
5134
5177
|
}, typeof label === 'string' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("label", {
|
|
@@ -5240,7 +5283,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5240
5283
|
'reverse': isOpen
|
|
5241
5284
|
}),
|
|
5242
5285
|
style: {
|
|
5243
|
-
display:
|
|
5286
|
+
display: MANUAL_REQ ? 'none' : 'inline-block'
|
|
5244
5287
|
}
|
|
5245
5288
|
}, controlArrow ? controlArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
5246
5289
|
width: "10px",
|
|
@@ -5258,7 +5301,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5258
5301
|
transform: "translate(56.000000, 160.000000)"
|
|
5259
5302
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
5260
5303
|
d: "M144,6525.39 L142.594,6524 L133.987,6532.261 L133.069,6531.38 L133.074,6531.385 L125.427,6524.045 L124,6525.414 C126.113,6527.443 132.014,6533.107 133.987,6535 C135.453,6533.594 134.024,6534.965 144,6525.39"
|
|
5261
|
-
})))))),
|
|
5304
|
+
})))))), MANUAL_REQ ? /*#__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("span", {
|
|
5262
5305
|
className: "custom-select-multi__control-searchbtn"
|
|
5263
5306
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
5264
5307
|
tabIndex: -1,
|
|
@@ -5300,7 +5343,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5300
5343
|
className: "custom-select-multi__list"
|
|
5301
5344
|
}, typeof multiSelectSelectedItemOnlyStatus !== 'undefined' ? /*#__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("li", {
|
|
5302
5345
|
className: "custom-select-multi__list-item-statusstring"
|
|
5303
|
-
}, typeof multiSelectSelectedItemOnlyStatus.itemsLabel === 'string' && controlArr.labels.length > 0 && controlArr.labels.length < optionsData.length ? multiSelectSelectedItemOnlyStatus.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel === 'string' && controlArr.labels.length === 0 ? multiSelectSelectedItemOnlyStatus.noneLabel : null, controlArr.labels.length > 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel === 'string' && controlArr.labels.length === optionsData.length ? multiSelectSelectedItemOnlyStatus.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel !== 'string' && controlArr.labels.length > 0 ? MULTI_SEL_SELECTED_STATUS.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel !== 'string' && controlArr.labels.length === 0 ? MULTI_SEL_SELECTED_STATUS.noneLabel : null, controlArr.labels.length > 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel !== 'string' && controlArr.labels.length === optionsData.length ? MULTI_SEL_SELECTED_STATUS.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof renderSelectedValue === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, renderSelectedValue(controlArr, handleMultiControlItemRemove)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, controlArr.labels.map(function (item, index) {
|
|
5346
|
+
}, MANUAL_REQ ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel === 'string' && controlArr.labels.length > 0 ? multiSelectSelectedItemOnlyStatus.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel === 'string' && controlArr.labels.length === 0 ? multiSelectSelectedItemOnlyStatus.noneLabel : null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel !== 'string' && controlArr.labels.length > 0 ? MULTI_SEL_SELECTED_STATUS.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel !== 'string' && controlArr.labels.length === 0 ? MULTI_SEL_SELECTED_STATUS.noneLabel : null) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel === 'string' && controlArr.labels.length > 0 && controlArr.labels.length < optionsData.length ? multiSelectSelectedItemOnlyStatus.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel === 'string' && controlArr.labels.length === 0 ? multiSelectSelectedItemOnlyStatus.noneLabel : null, controlArr.labels.length > 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel === 'string' && controlArr.labels.length === optionsData.length ? multiSelectSelectedItemOnlyStatus.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null, typeof multiSelectSelectedItemOnlyStatus.itemsLabel !== 'string' && controlArr.labels.length > 0 ? MULTI_SEL_SELECTED_STATUS.itemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null, typeof multiSelectSelectedItemOnlyStatus.noneLabel !== 'string' && controlArr.labels.length === 0 ? MULTI_SEL_SELECTED_STATUS.noneLabel : null, controlArr.labels.length > 0 ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof multiSelectSelectedItemOnlyStatus.allItemsLabel !== 'string' && controlArr.labels.length === optionsData.length ? MULTI_SEL_SELECTED_STATUS.allItemsLabel.replace('{num}', "".concat(controlArr.labels.length)) : null) : null))) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, typeof renderSelectedValue === 'function' ? /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, renderSelectedValue(controlArr, handleMultiControlItemRemove)) : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement((external_root_React_commonjs2_react_commonjs_react_amd_react_default()).Fragment, null, controlArr.labels.map(function (item, index) {
|
|
5304
5347
|
return /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("li", {
|
|
5305
5348
|
key: 'selected-item-' + index,
|
|
5306
5349
|
"data-value": controlArr.values[index],
|
|
@@ -5363,7 +5406,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5363
5406
|
'reverse': isOpen
|
|
5364
5407
|
}),
|
|
5365
5408
|
style: {
|
|
5366
|
-
display:
|
|
5409
|
+
display: MANUAL_REQ ? 'none' : 'inline-block'
|
|
5367
5410
|
}
|
|
5368
5411
|
}, controlArrow ? controlArrow : /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("svg", {
|
|
5369
5412
|
width: "10px",
|
|
@@ -5381,7 +5424,7 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5381
5424
|
transform: "translate(56.000000, 160.000000)"
|
|
5382
5425
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("path", {
|
|
5383
5426
|
d: "M144,6525.39 L142.594,6524 L133.987,6532.261 L133.069,6531.38 L133.074,6531.385 L125.427,6524.045 L124,6525.414 C126.113,6527.443 132.014,6533.107 133.987,6535 C135.453,6533.594 134.024,6534.965 144,6525.39"
|
|
5384
|
-
})))))),
|
|
5427
|
+
})))))), MANUAL_REQ ? /*#__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("span", {
|
|
5385
5428
|
className: "custom-select-multi__control-searchbtn"
|
|
5386
5429
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("button", {
|
|
5387
5430
|
tabIndex: -1,
|
|
@@ -5410,7 +5453,9 @@ var Select = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_
|
|
|
5410
5453
|
}, /*#__PURE__*/external_root_React_commonjs2_react_commonjs_react_amd_react_default().createElement("div", {
|
|
5411
5454
|
ref: listRef,
|
|
5412
5455
|
id: "custom-select__options-wrapper-".concat(idRes),
|
|
5413
|
-
className:
|
|
5456
|
+
className: (0,cls.combinedCls)('custom-select__options-wrapper list-group position-absolute border shadow small', {
|
|
5457
|
+
'multiple-selection': MULTI_SEL_VALID
|
|
5458
|
+
}),
|
|
5414
5459
|
style: {
|
|
5415
5460
|
zIndex: DEPTH,
|
|
5416
5461
|
width: WIN_WIDTH,
|
package/lib/cjs/Table/index.d.ts
CHANGED
|
@@ -6,7 +6,7 @@ export { default as TableFoot } from './TableFoot';
|
|
|
6
6
|
export { default as TableRow } from './TableRow';
|
|
7
7
|
export { default as TableColgroup } from './TableColgroup';
|
|
8
8
|
export { default as TableCaption } from './TableCaption';
|
|
9
|
-
export { default as TableFilter } from './
|
|
10
|
-
export { default as ToggleSelection } from './
|
|
11
|
-
export { default as DragHandleSprite } from './
|
|
12
|
-
export { default as SortSprite } from './
|
|
9
|
+
export { default as TableFilter } from './utils/TableFilter';
|
|
10
|
+
export { default as ToggleSelection } from './utils/ToggleSelection';
|
|
11
|
+
export { default as DragHandleSprite } from './utils/DragHandleSprite';
|
|
12
|
+
export { default as SortSprite } from './utils/SortSprite';
|
package/lib/cjs/Table/index.js
CHANGED
|
@@ -490,18 +490,18 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
490
490
|
|
|
491
491
|
// EXPORTS
|
|
492
492
|
__webpack_require__.d(__webpack_exports__, {
|
|
493
|
-
"DragHandleSprite": () => (/* reexport */
|
|
494
|
-
"SortSprite": () => (/* reexport */
|
|
493
|
+
"DragHandleSprite": () => (/* reexport */ utils_DragHandleSprite),
|
|
494
|
+
"SortSprite": () => (/* reexport */ utils_SortSprite),
|
|
495
495
|
"Table": () => (/* reexport */ src_Table),
|
|
496
496
|
"TableBody": () => (/* reexport */ src_TableBody),
|
|
497
497
|
"TableCaption": () => (/* reexport */ src_TableCaption),
|
|
498
498
|
"TableCell": () => (/* reexport */ src_TableCell),
|
|
499
499
|
"TableColgroup": () => (/* reexport */ src_TableColgroup),
|
|
500
|
-
"TableFilter": () => (/* reexport */
|
|
500
|
+
"TableFilter": () => (/* reexport */ utils_TableFilter),
|
|
501
501
|
"TableFoot": () => (/* reexport */ src_TableFoot),
|
|
502
502
|
"TableHead": () => (/* reexport */ src_TableHead),
|
|
503
503
|
"TableRow": () => (/* reexport */ src_TableRow),
|
|
504
|
-
"ToggleSelection": () => (/* reexport */
|
|
504
|
+
"ToggleSelection": () => (/* reexport */ utils_ToggleSelection)
|
|
505
505
|
});
|
|
506
506
|
|
|
507
507
|
// EXTERNAL MODULE: external {"root":"React","commonjs2":"react","commonjs":"react","amd":"react"}
|
|
@@ -523,7 +523,7 @@ var TableProvider = function TableProvider(props) {
|
|
|
523
523
|
}, children);
|
|
524
524
|
};
|
|
525
525
|
|
|
526
|
-
;// CONCATENATED MODULE: ./src/
|
|
526
|
+
;// CONCATENATED MODULE: ./src/utils/func.ts
|
|
527
527
|
function convertMapToArr(setData) {
|
|
528
528
|
var res = [];
|
|
529
529
|
var s = setData;
|
|
@@ -664,7 +664,7 @@ function removeCellFocusClassName(root) {
|
|
|
664
664
|
});
|
|
665
665
|
}
|
|
666
666
|
}
|
|
667
|
-
;// CONCATENATED MODULE: ./src/
|
|
667
|
+
;// CONCATENATED MODULE: ./src/utils/hooks/useTableResponsive.tsx
|
|
668
668
|
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
|
|
669
669
|
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."); }
|
|
670
670
|
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); }
|
|
@@ -744,7 +744,7 @@ function useTableResponsive(_ref, deps) {
|
|
|
744
744
|
}, [enabled, spyElement].concat(_toConsumableArray(deps)));
|
|
745
745
|
}
|
|
746
746
|
/* harmony default export */ const hooks_useTableResponsive = (useTableResponsive);
|
|
747
|
-
;// CONCATENATED MODULE: ./src/
|
|
747
|
+
;// CONCATENATED MODULE: ./src/utils/hooks/useTableDraggable.tsx
|
|
748
748
|
function useTableDraggable_toConsumableArray(arr) { return useTableDraggable_arrayWithoutHoles(arr) || useTableDraggable_iterableToArray(arr) || useTableDraggable_unsupportedIterableToArray(arr) || useTableDraggable_nonIterableSpread(); }
|
|
749
749
|
function useTableDraggable_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."); }
|
|
750
750
|
function useTableDraggable_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -1188,7 +1188,7 @@ var TableBody = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_rea
|
|
|
1188
1188
|
}), children));
|
|
1189
1189
|
});
|
|
1190
1190
|
/* harmony default export */ const src_TableBody = (TableBody);
|
|
1191
|
-
;// CONCATENATED MODULE: ./src/
|
|
1191
|
+
;// CONCATENATED MODULE: ./src/utils/hooks/useTableKeyPress.tsx
|
|
1192
1192
|
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); }
|
|
1193
1193
|
function useTableKeyPress_toConsumableArray(arr) { return useTableKeyPress_arrayWithoutHoles(arr) || useTableKeyPress_iterableToArray(arr) || useTableKeyPress_unsupportedIterableToArray(arr) || useTableKeyPress_nonIterableSpread(); }
|
|
1194
1194
|
function useTableKeyPress_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."); }
|
|
@@ -1566,7 +1566,7 @@ var TableCaption = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_
|
|
|
1566
1566
|
}), children));
|
|
1567
1567
|
});
|
|
1568
1568
|
/* harmony default export */ const src_TableCaption = (TableCaption);
|
|
1569
|
-
;// CONCATENATED MODULE: ./src/
|
|
1569
|
+
;// CONCATENATED MODULE: ./src/utils/TableFilter.tsx
|
|
1570
1570
|
|
|
1571
1571
|
|
|
1572
1572
|
var TableFilter = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, externalRef) {
|
|
@@ -1606,8 +1606,8 @@ var TableFilter = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_r
|
|
|
1606
1606
|
placeholder: placeholder || ''
|
|
1607
1607
|
}));
|
|
1608
1608
|
});
|
|
1609
|
-
/* harmony default export */ const
|
|
1610
|
-
;// CONCATENATED MODULE: ./src/
|
|
1609
|
+
/* harmony default export */ const utils_TableFilter = (TableFilter);
|
|
1610
|
+
;// CONCATENATED MODULE: ./src/utils/ToggleSelection.tsx
|
|
1611
1611
|
var ToggleSelection_excluded = ["contentRef", "row", "useRadio", "className", "indeterminate", "disabled", "name", "value", "onChange", "checked"];
|
|
1612
1612
|
function ToggleSelection_extends() { ToggleSelection_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 ToggleSelection_extends.apply(this, arguments); }
|
|
1613
1613
|
function ToggleSelection_slicedToArray(arr, i) { return ToggleSelection_arrayWithHoles(arr) || ToggleSelection_iterableToArrayLimit(arr, i) || ToggleSelection_unsupportedIterableToArray(arr, i) || ToggleSelection_nonIterableRest(); }
|
|
@@ -1785,8 +1785,8 @@ var ToggleSelection = /*#__PURE__*/(0,external_root_React_commonjs2_react_common
|
|
|
1785
1785
|
onChange: handleChange
|
|
1786
1786
|
}, attributes)) : null);
|
|
1787
1787
|
});
|
|
1788
|
-
/* harmony default export */ const
|
|
1789
|
-
;// CONCATENATED MODULE: ./src/
|
|
1788
|
+
/* harmony default export */ const utils_ToggleSelection = (ToggleSelection);
|
|
1789
|
+
;// CONCATENATED MODULE: ./src/utils/DragHandleSprite.tsx
|
|
1790
1790
|
|
|
1791
1791
|
|
|
1792
1792
|
var DragHandleSprite = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_react_amd_react_.forwardRef)(function (props, externalRef) {
|
|
@@ -1842,8 +1842,8 @@ var DragHandleSprite = /*#__PURE__*/(0,external_root_React_commonjs2_react_commo
|
|
|
1842
1842
|
strokeLinejoin: "round"
|
|
1843
1843
|
})))) : null);
|
|
1844
1844
|
});
|
|
1845
|
-
/* harmony default export */ const
|
|
1846
|
-
;// CONCATENATED MODULE: ./src/
|
|
1845
|
+
/* harmony default export */ const utils_DragHandleSprite = (DragHandleSprite);
|
|
1846
|
+
;// CONCATENATED MODULE: ./src/utils/hooks/useTableSort.tsx
|
|
1847
1847
|
function useTableSort_toConsumableArray(arr) { return useTableSort_arrayWithoutHoles(arr) || useTableSort_iterableToArray(arr) || useTableSort_unsupportedIterableToArray(arr) || useTableSort_nonIterableSpread(); }
|
|
1848
1848
|
function useTableSort_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."); }
|
|
1849
1849
|
function useTableSort_iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
|
|
@@ -1966,7 +1966,7 @@ function useTableSort(_ref, deps) {
|
|
|
1966
1966
|
};
|
|
1967
1967
|
}
|
|
1968
1968
|
/* harmony default export */ const hooks_useTableSort = (useTableSort);
|
|
1969
|
-
;// CONCATENATED MODULE: ./src/
|
|
1969
|
+
;// CONCATENATED MODULE: ./src/utils/SortSprite.tsx
|
|
1970
1970
|
|
|
1971
1971
|
|
|
1972
1972
|
|
|
@@ -2009,7 +2009,7 @@ var SortSprite = /*#__PURE__*/(0,external_root_React_commonjs2_react_commonjs_re
|
|
|
2009
2009
|
fill: "#000000"
|
|
2010
2010
|
})))) : null);
|
|
2011
2011
|
});
|
|
2012
|
-
/* harmony default export */ const
|
|
2012
|
+
/* harmony default export */ const utils_SortSprite = (SortSprite);
|
|
2013
2013
|
;// CONCATENATED MODULE: ./src/index.tsx
|
|
2014
2014
|
|
|
2015
2015
|
|
package/lib/cjs/Tree/index.js
CHANGED
|
@@ -1067,7 +1067,7 @@ var initAsyncItems = /*#__PURE__*/function () {
|
|
|
1067
1067
|
};
|
|
1068
1068
|
}();
|
|
1069
1069
|
|
|
1070
|
-
;// CONCATENATED MODULE: ./src/
|
|
1070
|
+
;// CONCATENATED MODULE: ./src/utils/func.ts
|
|
1071
1071
|
var removeItemOnce = function removeItemOnce(arr, key) {
|
|
1072
1072
|
return arr.filter(function (item) {
|
|
1073
1073
|
return item.key !== key;
|
package/lib/cjs/Utils/date.d.ts
CHANGED
|
@@ -57,6 +57,13 @@ declare const isValidDate: (v: string) => boolean;
|
|
|
57
57
|
* @returns {Date | String} yyyy-MM-dd
|
|
58
58
|
*/
|
|
59
59
|
declare function dateFormat(v: Date | string): Date | String;
|
|
60
|
+
/**
|
|
61
|
+
* Get date details
|
|
62
|
+
* @param {Date | String} v
|
|
63
|
+
* @param {Boolean} padZeroEnabled
|
|
64
|
+
* @typedef {Object} JSON
|
|
65
|
+
*/
|
|
66
|
+
declare function getDateDetails(v: Date | string, padZeroEnabled?: boolean): Record<string, string | number>;
|
|
60
67
|
/**
|
|
61
68
|
* Get calendar date
|
|
62
69
|
* @param {Date | String} v
|
|
@@ -188,4 +195,23 @@ declare function setDateDays(v: Date | string, offset: number, padZeroEnabled?:
|
|
|
188
195
|
* @returns {String} yyyy-MM-dd HH:mm:ss
|
|
189
196
|
*/
|
|
190
197
|
declare function timestampToDate(v: number, padZeroEnabled?: boolean): string;
|
|
191
|
-
|
|
198
|
+
/**
|
|
199
|
+
* Get the date of the specified month
|
|
200
|
+
* @param {Number} year
|
|
201
|
+
* @param {Number} month
|
|
202
|
+
* @returns {Array<string>}
|
|
203
|
+
*/
|
|
204
|
+
declare function getMonthDates(year: number, month: number): string[];
|
|
205
|
+
/**
|
|
206
|
+
* Get the date of the specified week (From Sunday)
|
|
207
|
+
* @param {Number} weekOffset
|
|
208
|
+
* @returns {Array<Date>}
|
|
209
|
+
*/
|
|
210
|
+
declare function getWeekDatesFromSun(weekOffset: number): Date[];
|
|
211
|
+
/**
|
|
212
|
+
* Get the date of the specified week (From Monday)
|
|
213
|
+
* @param {Number} weekOffset
|
|
214
|
+
* @returns {Array<Date>}
|
|
215
|
+
*/
|
|
216
|
+
declare function getWeekDatesFromMon(weekOffset: number): Date[];
|
|
217
|
+
export { isTimeString, getNow, padZero, dateFormat, getDateDetails, isValidDate, isValidHours, isValidMinutesAndSeconds, isValidYear, isValidMonth, isValidDay, getLastDayInMonth, getFirstAndLastMonthDay, getCalendarDate, getFullTime, getTodayDate, getCurrentMonth, getCurrentYear, getCurrentDay, getCurrentDate, getTomorrowDate, getYesterdayDate, getNextMonthDate, getPrevMonthDate, getNextYearDate, getPrevYearDate, getSpecifiedDate, setDateHours, setDateMinutes, setDateDays, timestampToDate, getMonthDates, getWeekDatesFromSun, getWeekDatesFromMon };
|