@capillarytech/blaze-ui 1.0.3-alpha.9 → 1.1.0-alpha.0
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/{CapAlert → dist/CapAlert}/index.js +9 -85
- package/dist/CapAlert/index.js.map +1 -0
- package/{CapButton → dist/CapButton}/index.js +78 -104
- package/dist/CapButton/index.js.map +1 -0
- package/{CapCard → dist/CapCard}/index.js +9 -85
- package/dist/CapCard/index.js.map +1 -0
- package/{CapCheckbox → dist/CapCheckbox}/index.js +10 -86
- package/dist/CapCheckbox/index.js.map +1 -0
- package/{CapColumn → dist/CapColumn}/index.js +9 -85
- package/dist/CapColumn/index.js.map +1 -0
- package/{CapDivider → dist/CapDivider}/index.js +9 -85
- package/dist/CapDivider/index.js.map +1 -0
- package/{CapDropdown → dist/CapDropdown}/index.js +9 -85
- package/dist/CapDropdown/index.js.map +1 -0
- package/{CapForm → dist/CapForm}/index.js +9 -85
- package/dist/CapForm/index.js.map +1 -0
- package/{CapFormItem → dist/CapFormItem}/index.js +9 -85
- package/dist/CapFormItem/index.js.map +1 -0
- package/{CapIcon → dist/CapIcon}/index.js +77 -103
- package/dist/CapIcon/index.js.map +1 -0
- package/{CapLabel → dist/CapLabel}/index.js +9 -85
- package/dist/CapLabel/index.js.map +1 -0
- package/{CapMenu → dist/CapMenu}/index.js +9 -85
- package/dist/CapMenu/index.js.map +1 -0
- package/{CapRadio → dist/CapRadio}/index.js +10 -86
- package/dist/CapRadio/index.js.map +1 -0
- package/{CapRow → dist/CapRow}/index.js +9 -85
- package/dist/CapRow/index.js.map +1 -0
- package/{CapSwitch → dist/CapSwitch}/index.js +9 -85
- package/dist/CapSwitch/index.js.map +1 -0
- package/{CapTab → dist/CapTab}/index.js +9 -85
- package/dist/CapTab/index.js.map +1 -0
- package/dist/CapTable/index.js +1115 -0
- package/dist/CapTable/index.js.map +1 -0
- package/{CapTooltip → dist/CapTooltip}/index.js +9 -85
- package/dist/CapTooltip/index.js.map +1 -0
- package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.js +79 -105
- package/dist/CapTooltipWithInfo/index.js.map +1 -0
- package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.js +148 -1367
- package/dist/CapUnifiedSelect/index.js.map +1 -0
- package/dist/index.js +5872 -0
- package/dist/index.js.map +1 -0
- package/{utils → dist/utils}/index.js.map +1 -1
- package/package.json +112 -160
- package/CapAlert/CapAlert.d.ts +0 -12
- package/CapAlert/CapAlert.d.ts.map +0 -1
- package/CapAlert/CapAlert.test.d.ts +0 -2
- package/CapAlert/CapAlert.test.d.ts.map +0 -1
- package/CapAlert/index.d.ts +0 -3
- package/CapAlert/index.d.ts.map +0 -1
- package/CapAlert/index.js.map +0 -1
- package/CapButton/CapButton.d.ts +0 -11
- package/CapButton/CapButton.d.ts.map +0 -1
- package/CapButton/CapButton.test.d.ts +0 -2
- package/CapButton/CapButton.test.d.ts.map +0 -1
- package/CapButton/index.d.ts +0 -3
- package/CapButton/index.d.ts.map +0 -1
- package/CapButton/index.js.map +0 -1
- package/CapCard/CapCard.d.ts +0 -9
- package/CapCard/CapCard.d.ts.map +0 -1
- package/CapCard/CapCard.test.d.ts +0 -2
- package/CapCard/CapCard.test.d.ts.map +0 -1
- package/CapCard/index.d.ts +0 -3
- package/CapCard/index.d.ts.map +0 -1
- package/CapCard/index.js.map +0 -1
- package/CapCheckbox/CapCheckbox.d.ts +0 -17
- package/CapCheckbox/CapCheckbox.d.ts.map +0 -1
- package/CapCheckbox/CapCheckbox.test.d.ts +0 -2
- package/CapCheckbox/CapCheckbox.test.d.ts.map +0 -1
- package/CapCheckbox/index.d.ts +0 -3
- package/CapCheckbox/index.d.ts.map +0 -1
- package/CapCheckbox/index.js.map +0 -1
- package/CapColumn/CapColumn.d.ts +0 -9
- package/CapColumn/CapColumn.d.ts.map +0 -1
- package/CapColumn/CapColumn.test.d.ts +0 -2
- package/CapColumn/CapColumn.test.d.ts.map +0 -1
- package/CapColumn/index.d.ts +0 -3
- package/CapColumn/index.d.ts.map +0 -1
- package/CapColumn/index.js.map +0 -1
- package/CapDivider/CapDivider.d.ts +0 -9
- package/CapDivider/CapDivider.d.ts.map +0 -1
- package/CapDivider/CapDivider.test.d.ts +0 -2
- package/CapDivider/CapDivider.test.d.ts.map +0 -1
- package/CapDivider/index.d.ts +0 -3
- package/CapDivider/index.d.ts.map +0 -1
- package/CapDivider/index.js.map +0 -1
- package/CapDropdown/CapDropdown.d.ts +0 -20
- package/CapDropdown/CapDropdown.d.ts.map +0 -1
- package/CapDropdown/CapDropdown.test.d.ts +0 -2
- package/CapDropdown/CapDropdown.test.d.ts.map +0 -1
- package/CapDropdown/index.d.ts +0 -3
- package/CapDropdown/index.d.ts.map +0 -1
- package/CapDropdown/index.js.map +0 -1
- package/CapForm/CapForm.d.ts +0 -10
- package/CapForm/CapForm.d.ts.map +0 -1
- package/CapForm/CapForm.test.d.ts +0 -2
- package/CapForm/CapForm.test.d.ts.map +0 -1
- package/CapForm/index.d.ts +0 -3
- package/CapForm/index.d.ts.map +0 -1
- package/CapForm/index.js.map +0 -1
- package/CapFormItem/CapFormItem.d.ts +0 -13
- package/CapFormItem/CapFormItem.d.ts.map +0 -1
- package/CapFormItem/CapFormItem.test.d.ts +0 -2
- package/CapFormItem/CapFormItem.test.d.ts.map +0 -1
- package/CapFormItem/index.d.ts +0 -3
- package/CapFormItem/index.d.ts.map +0 -1
- package/CapFormItem/index.js.map +0 -1
- package/CapIcon/CapIcon.d.ts +0 -31
- package/CapIcon/CapIcon.d.ts.map +0 -1
- package/CapIcon/CapIcon.test.d.ts +0 -2
- package/CapIcon/CapIcon.test.d.ts.map +0 -1
- package/CapIcon/index.d.ts +0 -3
- package/CapIcon/index.d.ts.map +0 -1
- package/CapIcon/index.js.map +0 -1
- package/CapInput/CapInput.d.ts +0 -11
- package/CapInput/CapInput.d.ts.map +0 -1
- package/CapInput/CapInput.test.d.ts +0 -2
- package/CapInput/CapInput.test.d.ts.map +0 -1
- package/CapInput/Number.d.ts +0 -9
- package/CapInput/Number.d.ts.map +0 -1
- package/CapInput/Number.test.d.ts +0 -2
- package/CapInput/Number.test.d.ts.map +0 -1
- package/CapInput/Search.d.ts +0 -9
- package/CapInput/Search.d.ts.map +0 -1
- package/CapInput/Search.test.d.ts +0 -2
- package/CapInput/Search.test.d.ts.map +0 -1
- package/CapInput/TextArea.d.ts +0 -9
- package/CapInput/TextArea.d.ts.map +0 -1
- package/CapInput/TextArea.test.d.ts +0 -2
- package/CapInput/TextArea.test.d.ts.map +0 -1
- package/CapInput/index.d.ts +0 -9
- package/CapInput/index.d.ts.map +0 -1
- package/CapLabel/CapLabel.d.ts +0 -23
- package/CapLabel/CapLabel.d.ts.map +0 -1
- package/CapLabel/CapLabel.test.d.ts +0 -2
- package/CapLabel/CapLabel.test.d.ts.map +0 -1
- package/CapLabel/index.d.ts +0 -3
- package/CapLabel/index.d.ts.map +0 -1
- package/CapLabel/index.js.map +0 -1
- package/CapMenu/CapMenu.d.ts +0 -27
- package/CapMenu/CapMenu.d.ts.map +0 -1
- package/CapMenu/CapMenu.test.d.ts +0 -2
- package/CapMenu/CapMenu.test.d.ts.map +0 -1
- package/CapMenu/index.d.ts +0 -3
- package/CapMenu/index.d.ts.map +0 -1
- package/CapMenu/index.js.map +0 -1
- package/CapRadio/CapRadio.d.ts +0 -18
- package/CapRadio/CapRadio.d.ts.map +0 -1
- package/CapRadio/CapRadio.test.d.ts +0 -2
- package/CapRadio/CapRadio.test.d.ts.map +0 -1
- package/CapRadio/index.d.ts +0 -3
- package/CapRadio/index.d.ts.map +0 -1
- package/CapRadio/index.js.map +0 -1
- package/CapRow/CapRow.d.ts +0 -27
- package/CapRow/CapRow.d.ts.map +0 -1
- package/CapRow/CapRow.test.d.ts +0 -2
- package/CapRow/CapRow.test.d.ts.map +0 -1
- package/CapRow/index.d.ts +0 -3
- package/CapRow/index.d.ts.map +0 -1
- package/CapRow/index.js.map +0 -1
- package/CapSkeleton/CapSkeleton.d.ts +0 -8
- package/CapSkeleton/CapSkeleton.d.ts.map +0 -1
- package/CapSkeleton/CapSkeleton.test.d.ts +0 -2
- package/CapSkeleton/CapSkeleton.test.d.ts.map +0 -1
- package/CapSkeleton/index.d.ts +0 -3
- package/CapSkeleton/index.d.ts.map +0 -1
- package/CapSpin/CapSpin.d.ts +0 -8
- package/CapSpin/CapSpin.d.ts.map +0 -1
- package/CapSpin/CapSpin.test.d.ts +0 -2
- package/CapSpin/CapSpin.test.d.ts.map +0 -1
- package/CapSpin/index.d.ts +0 -3
- package/CapSpin/index.d.ts.map +0 -1
- package/CapSwitch/CapSwitch.d.ts +0 -12
- package/CapSwitch/CapSwitch.d.ts.map +0 -1
- package/CapSwitch/CapSwitch.test.d.ts +0 -2
- package/CapSwitch/CapSwitch.test.d.ts.map +0 -1
- package/CapSwitch/index.d.ts +0 -3
- package/CapSwitch/index.d.ts.map +0 -1
- package/CapSwitch/index.js.map +0 -1
- package/CapTab/CapTab.d.ts +0 -21
- package/CapTab/CapTab.d.ts.map +0 -1
- package/CapTab/CapTab.test.d.ts +0 -2
- package/CapTab/CapTab.test.d.ts.map +0 -1
- package/CapTab/index.d.ts +0 -3
- package/CapTab/index.d.ts.map +0 -1
- package/CapTab/index.js.map +0 -1
- package/CapTable/CapTable.d.ts +0 -27
- package/CapTable/CapTable.d.ts.map +0 -1
- package/CapTable/CapTable.test.d.ts +0 -2
- package/CapTable/CapTable.test.d.ts.map +0 -1
- package/CapTable/index.d.ts +0 -3
- package/CapTable/index.d.ts.map +0 -1
- package/CapTable/index.js +0 -18315
- package/CapTable/index.js.map +0 -1
- package/CapTable/loadable.d.ts +0 -5
- package/CapTable/loadable.d.ts.map +0 -1
- package/CapTable/loadable.test.d.ts +0 -2
- package/CapTable/loadable.test.d.ts.map +0 -1
- package/CapTestSelect/CapTestSelect.d.ts +0 -24
- package/CapTestSelect/CapTestSelect.d.ts.map +0 -1
- package/CapTestSelect/CapTestSelect.test.d.ts +0 -2
- package/CapTestSelect/CapTestSelect.test.d.ts.map +0 -1
- package/CapTestSelect/index.d.ts +0 -3
- package/CapTestSelect/index.d.ts.map +0 -1
- package/CapTooltip/CapTooltip.d.ts +0 -10
- package/CapTooltip/CapTooltip.d.ts.map +0 -1
- package/CapTooltip/CapTooltip.test.d.ts +0 -2
- package/CapTooltip/CapTooltip.test.d.ts.map +0 -1
- package/CapTooltip/index.d.ts +0 -3
- package/CapTooltip/index.d.ts.map +0 -1
- package/CapTooltip/index.js.map +0 -1
- package/CapTooltipWithInfo/CapTooltipWithInfo.d.ts +0 -18
- package/CapTooltipWithInfo/CapTooltipWithInfo.d.ts.map +0 -1
- package/CapTooltipWithInfo/CapTooltipWithInfo.test.d.ts +0 -2
- package/CapTooltipWithInfo/CapTooltipWithInfo.test.d.ts.map +0 -1
- package/CapTooltipWithInfo/index.d.ts +0 -3
- package/CapTooltipWithInfo/index.d.ts.map +0 -1
- package/CapTooltipWithInfo/index.js.map +0 -1
- package/CapUnifiedSelect/CapUnifiedSelect.d.ts +0 -153
- package/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +0 -1
- package/CapUnifiedSelect/CapUnifiedSelect.test.d.ts +0 -2
- package/CapUnifiedSelect/CapUnifiedSelect.test.d.ts.map +0 -1
- package/CapUnifiedSelect/constants.d.ts +0 -57
- package/CapUnifiedSelect/constants.d.ts.map +0 -1
- package/CapUnifiedSelect/index.d.ts +0 -3
- package/CapUnifiedSelect/index.d.ts.map +0 -1
- package/CapUnifiedSelect/index.js.map +0 -1
- package/CapUnifiedSelect/messages.d.ts +0 -24
- package/CapUnifiedSelect/messages.d.ts.map +0 -1
- package/CapUnifiedSelect/testData.d.ts +0 -107
- package/CapUnifiedSelect/testData.d.ts.map +0 -1
- package/LocaleHoc/index.d.ts +0 -9
- package/LocaleHoc/index.d.ts.map +0 -1
- package/LocaleHoc/index.test.d.ts +0 -2
- package/LocaleHoc/index.test.d.ts.map +0 -1
- package/index.d.ts +0 -54
- package/index.d.ts.map +0 -1
- package/index.js +0 -24170
- package/index.js.map +0 -1
- package/styled/variables.d.ts +0 -150
- package/styled/variables.d.ts.map +0 -1
- package/utils/fonts.d.ts +0 -49
- package/utils/fonts.d.ts.map +0 -1
- package/utils/fonts.test.d.ts +0 -2
- package/utils/fonts.test.d.ts.map +0 -1
- package/utils/index.d.ts +0 -44
- package/utils/index.d.ts.map +0 -1
- package/utils/styles.d.ts +0 -19
- package/utils/styles.d.ts.map +0 -1
- /package/{CapInput → dist/CapInput}/index.js +0 -0
- /package/{CapInput → dist/CapInput}/index.js.map +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/index.js +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/index.js.map +0 -0
- /package/{CapSpin → dist/CapSpin}/index.js +0 -0
- /package/{CapSpin → dist/CapSpin}/index.js.map +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/index.js +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/index.js.map +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.js +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.js.map +0 -0
- /package/{assets → dist/assets}/upload.svg +0 -0
- /package/{styled → dist/styled}/variables.scss +0 -0
- /package/{utils → dist/utils}/index.js +0 -0
|
@@ -35,20 +35,6 @@ var f=__webpack_require__(9206),k=Symbol.for("react.element"),l=Symbol.for("reac
|
|
|
35
35
|
function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
|
|
36
36
|
|
|
37
37
|
|
|
38
|
-
/***/ }),
|
|
39
|
-
|
|
40
|
-
/***/ 1549:
|
|
41
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
42
|
-
|
|
43
|
-
"use strict";
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
exports.__esModule = true;
|
|
47
|
-
exports["default"] = void 0;
|
|
48
|
-
var _CapSpin = _interopRequireDefault(__webpack_require__(7579));
|
|
49
|
-
exports["default"] = _CapSpin.default;
|
|
50
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
51
|
-
|
|
52
38
|
/***/ }),
|
|
53
39
|
|
|
54
40
|
/***/ 1601:
|
|
@@ -130,7 +116,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
130
116
|
|
|
131
117
|
exports.__esModule = true;
|
|
132
118
|
exports["default"] = void 0;
|
|
133
|
-
var _classnames = _interopRequireDefault(__webpack_require__(
|
|
119
|
+
var _classnames = _interopRequireDefault(__webpack_require__(2678));
|
|
134
120
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
135
121
|
var _styles = _interopRequireDefault(__webpack_require__(4939));
|
|
136
122
|
var _jsxRuntime = __webpack_require__(4848);
|
|
@@ -195,6 +181,14 @@ var _default = exports["default"] = CapLabelWithStatic;
|
|
|
195
181
|
|
|
196
182
|
/***/ }),
|
|
197
183
|
|
|
184
|
+
/***/ 2678:
|
|
185
|
+
/***/ ((module) => {
|
|
186
|
+
|
|
187
|
+
"use strict";
|
|
188
|
+
module.exports = require("classnames");
|
|
189
|
+
|
|
190
|
+
/***/ }),
|
|
191
|
+
|
|
198
192
|
/***/ 3737:
|
|
199
193
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
200
194
|
|
|
@@ -218,7 +212,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
218
212
|
exports.__esModule = true;
|
|
219
213
|
exports["default"] = void 0;
|
|
220
214
|
var _antdV = __webpack_require__(4273);
|
|
221
|
-
var _classnames = _interopRequireDefault(__webpack_require__(
|
|
215
|
+
var _classnames = _interopRequireDefault(__webpack_require__(2678));
|
|
222
216
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
223
217
|
var _styles = _interopRequireDefault(__webpack_require__(5765));
|
|
224
218
|
var _jsxRuntime = __webpack_require__(4848);
|
|
@@ -473,7 +467,7 @@ module.exports = domAPI;
|
|
|
473
467
|
|
|
474
468
|
exports.__esModule = true;
|
|
475
469
|
exports["default"] = void 0;
|
|
476
|
-
var _classnames = _interopRequireDefault(__webpack_require__(
|
|
470
|
+
var _classnames = _interopRequireDefault(__webpack_require__(2678));
|
|
477
471
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
478
472
|
var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
|
|
479
473
|
var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
|
|
@@ -765,22 +759,26 @@ module.exports = ___CSS_LOADER_EXPORT___;
|
|
|
765
759
|
exports.__esModule = true;
|
|
766
760
|
exports["default"] = void 0;
|
|
767
761
|
var _antdV = __webpack_require__(4273);
|
|
768
|
-
var _classnames = _interopRequireDefault(__webpack_require__(
|
|
762
|
+
var _classnames = _interopRequireDefault(__webpack_require__(2678));
|
|
769
763
|
var _react = _interopRequireWildcard(__webpack_require__(9206));
|
|
770
764
|
var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
|
|
771
765
|
var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
|
|
772
766
|
var _CapRow = _interopRequireDefault(__webpack_require__(7375));
|
|
773
|
-
var _CapSpin = _interopRequireDefault(__webpack_require__(1549));
|
|
774
767
|
var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
|
|
775
768
|
var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
|
|
776
|
-
var _constants = __webpack_require__(9788);
|
|
777
769
|
var _styles = _interopRequireDefault(__webpack_require__(8263));
|
|
778
770
|
var _jsxRuntime = __webpack_require__(4848);
|
|
779
|
-
const _excluded = ["type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "
|
|
771
|
+
const _excluded = ["type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "tooltip", "bylineText", "disabled", "showUpload", "customPopupRender", "showSearch", "searchBasedOn", "onConfirm", "clearText", "noResultCustomText", "noResultCustomIcon", "readOnly"];
|
|
780
772
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
781
773
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
782
774
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
783
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
775
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
776
|
+
const SELECT_TYPES = {
|
|
777
|
+
SELECT: 'select',
|
|
778
|
+
MULTI_SELECT: 'multiSelect',
|
|
779
|
+
TREE_SELECT: 'treeSelect',
|
|
780
|
+
MULTI_TREE_SELECT: 'multiTreeSelect'
|
|
781
|
+
};
|
|
784
782
|
const NoResult = _ref => {
|
|
785
783
|
let {
|
|
786
784
|
noResultCustomText,
|
|
@@ -798,7 +796,7 @@ const NoResult = _ref => {
|
|
|
798
796
|
size: "m"
|
|
799
797
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
800
798
|
className: _styles.default['cap-unified-select-no-result-text'],
|
|
801
|
-
children: showUpload && (options == null ? void 0 : options.length) === 0 ? noResultCustomText :
|
|
799
|
+
children: showUpload && (options == null ? void 0 : options.length) === 0 ? noResultCustomText : 'No results found'
|
|
802
800
|
})]
|
|
803
801
|
});
|
|
804
802
|
};
|
|
@@ -883,27 +881,22 @@ const countSelectedLeaves = (treeMaps, selectedValues) => {
|
|
|
883
881
|
selectedValues == null || selectedValues.forEach(processNode);
|
|
884
882
|
return (treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.reduce((count, leaf) => expandedSet.has(leaf) ? count + 1 : count, 0)) || 0;
|
|
885
883
|
};
|
|
886
|
-
const filterTreeData = function (data, search, searchBasedOn
|
|
884
|
+
const filterTreeData = function (data, search, searchBasedOn) {
|
|
887
885
|
if (searchBasedOn === void 0) {
|
|
888
886
|
searchBasedOn = 'label';
|
|
889
887
|
}
|
|
890
888
|
if (!(data != null && data.length) || !search) return data;
|
|
891
889
|
const searchLower = search.toLowerCase();
|
|
892
|
-
const selectedSet = new Set(selectedValues || []);
|
|
893
890
|
const nodeMatchesSearch = node => {
|
|
894
891
|
var _node$value, _node$key, _ref3, _node$label;
|
|
895
892
|
const target = searchBasedOn === 'value' ? String((_node$value = node == null ? void 0 : node.value) != null ? _node$value : '') : searchBasedOn === 'key' ? String((_node$key = node == null ? void 0 : node.key) != null ? _node$key : '') : String((_ref3 = (_node$label = node == null ? void 0 : node.label) != null ? _node$label : node == null ? void 0 : node.title) != null ? _ref3 : '');
|
|
896
893
|
return target.toLowerCase().includes(searchLower);
|
|
897
894
|
};
|
|
898
|
-
const isNodeSelected = node => {
|
|
899
|
-
return node.value !== undefined && selectedSet.has(node.value);
|
|
900
|
-
};
|
|
901
895
|
const loop = items => items.reduce((acc, item) => {
|
|
902
896
|
var _item$children;
|
|
903
897
|
if (!item) return acc;
|
|
904
898
|
const children = item != null && (_item$children = item.children) != null && _item$children.length ? loop(item.children) : [];
|
|
905
|
-
|
|
906
|
-
if (nodeMatchesSearch(item) || isNodeSelected(item) || children.length) {
|
|
899
|
+
if (nodeMatchesSearch(item) || children.length) {
|
|
907
900
|
acc.push(_extends({}, item, {
|
|
908
901
|
children
|
|
909
902
|
}));
|
|
@@ -914,11 +907,11 @@ const filterTreeData = function (data, search, searchBasedOn, selectedValues) {
|
|
|
914
907
|
};
|
|
915
908
|
const CapUnifiedSelect = _ref4 => {
|
|
916
909
|
let {
|
|
917
|
-
type =
|
|
910
|
+
type = SELECT_TYPES.SELECT,
|
|
918
911
|
options = [],
|
|
919
912
|
value,
|
|
920
913
|
onChange,
|
|
921
|
-
placeholder =
|
|
914
|
+
placeholder = 'Select an option',
|
|
922
915
|
className = '',
|
|
923
916
|
style,
|
|
924
917
|
isError = false,
|
|
@@ -928,7 +921,6 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
928
921
|
allowClear = false,
|
|
929
922
|
headerLabel,
|
|
930
923
|
onUpload,
|
|
931
|
-
uploadLabel = _constants.DEFAULTS.UPLOAD_LABEL,
|
|
932
924
|
tooltip,
|
|
933
925
|
bylineText,
|
|
934
926
|
disabled = false,
|
|
@@ -936,672 +928,38 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
936
928
|
customPopupRender = true,
|
|
937
929
|
showSearch = true,
|
|
938
930
|
searchBasedOn = 'label',
|
|
939
|
-
onSearch,
|
|
940
|
-
searchDebounce = _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE,
|
|
941
931
|
onConfirm,
|
|
942
|
-
clearText =
|
|
943
|
-
noResultCustomText =
|
|
944
|
-
noResultCustomIcon =
|
|
945
|
-
readOnly = false
|
|
946
|
-
staticValue = true,
|
|
947
|
-
onFooterDownloadChange,
|
|
948
|
-
onPopupScroll,
|
|
949
|
-
hasMore = true,
|
|
950
|
-
enableVirtualization = false,
|
|
951
|
-
virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
|
|
952
|
-
resetSearch = true,
|
|
953
|
-
resetData,
|
|
954
|
-
fetchMissingOptions
|
|
932
|
+
clearText = 'Clear',
|
|
933
|
+
noResultCustomText = 'No results found',
|
|
934
|
+
noResultCustomIcon = 'warning',
|
|
935
|
+
readOnly = false
|
|
955
936
|
} = _ref4,
|
|
956
937
|
rest = _objectWithoutPropertiesLoose(_ref4, _excluded);
|
|
957
938
|
const [searchText, setSearchText] = (0, _react.useState)('');
|
|
958
939
|
const [tempValue, setTempValue] = (0, _react.useState)(value);
|
|
959
940
|
const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
|
|
960
|
-
const [isSearching, setIsSearching] = (0, _react.useState)(false);
|
|
961
|
-
const [isLoadingOnScroll, setIsLoadingOnScroll] = (0, _react.useState)(false);
|
|
962
|
-
const [isResettingData, setIsResettingData] = (0, _react.useState)(false);
|
|
963
|
-
// Store ordered options after confirm (selected items moved to top based on selection order)
|
|
964
|
-
const [orderedOptions, setOrderedOptions] = (0, _react.useState)(null);
|
|
965
|
-
const searchTimeoutRef = (0, _react.useRef)(null);
|
|
966
|
-
const scrollContainerRef = (0, _react.useRef)(null);
|
|
967
|
-
const scrollLoadingTimeoutRef = (0, _react.useRef)(null);
|
|
968
|
-
// Track if scroll handler is currently processing to prevent duplicate calls
|
|
969
|
-
const isScrollProcessingRef = (0, _react.useRef)(false);
|
|
970
|
-
// Throttle ref for scroll events
|
|
971
|
-
const scrollThrottleTimeoutRef = (0, _react.useRef)(null);
|
|
972
|
-
// Ref to track options for scroll handler (avoids recreating handleScroll)
|
|
973
|
-
const optionsRef = (0, _react.useRef)(options);
|
|
974
|
-
// Cache of selected items from async results to preserve them during search
|
|
975
|
-
const selectedItemsCacheRef = (0, _react.useRef)(new Map());
|
|
976
|
-
// Track the last search query to detect when options update after search
|
|
977
|
-
const lastSearchQueryRef = (0, _react.useRef)('');
|
|
978
|
-
// Track when search was cleared to help clear loading state
|
|
979
|
-
const searchClearedTimeRef = (0, _react.useRef)(null);
|
|
980
|
-
// Track previous options to detect when they change after a search
|
|
981
|
-
const prevOptionsRef = (0, _react.useRef)(options);
|
|
982
|
-
// Track previous options before resetData is called to detect when options update
|
|
983
|
-
const prevOptionsBeforeResetRef = (0, _react.useRef)(options);
|
|
984
|
-
// Track previous options count to detect when options change after scroll
|
|
985
|
-
const prevOptionsCountRef = (0, _react.useRef)(options.length);
|
|
986
|
-
// Track previous options to detect when options change (even if count stays same)
|
|
987
|
-
const prevOptionsRefForScroll = (0, _react.useRef)(options);
|
|
988
|
-
// Track options count when scroll was triggered (for orderedOptions update)
|
|
989
|
-
const scrollTriggerOptionsCountRef = (0, _react.useRef)(options.length);
|
|
990
|
-
// Track if initial sort has been done (only sort once on initial load with selected values)
|
|
991
|
-
const initialSortDoneRef = (0, _react.useRef)(false);
|
|
992
|
-
// Track if user has interacted with the dropdown during current session (selected, searched, etc.)
|
|
993
|
-
const hasInteractedRef = (0, _react.useRef)(false);
|
|
994
|
-
// Track the initial tempValue when dropdown opens to detect if user made changes
|
|
995
|
-
const initialTempValueRef = (0, _react.useRef)(value);
|
|
996
|
-
// Track if resetData was already called in the current session to prevent duplicate calls
|
|
997
|
-
const resetDataCalledRef = (0, _react.useRef)(false);
|
|
998
|
-
// Track when resetData was called to help clear loading state
|
|
999
|
-
const resetDataCalledTimeRef = (0, _react.useRef)(null);
|
|
1000
|
-
// Track if fetchMissingOptions was already called to prevent duplicate calls
|
|
1001
|
-
const fetchMissingOptionsCalledRef = (0, _react.useRef)(false);
|
|
1002
|
-
// Track the last missing values that were sent to prevent duplicate calls with same values
|
|
1003
|
-
const lastMissingValuesRef = (0, _react.useRef)('');
|
|
1004
|
-
|
|
1005
|
-
// Helper function to check if a value exists in options (recursive for tree structures)
|
|
1006
|
-
const findValueInOptions = (0, _react.useCallback)((opts, targetValue) => {
|
|
1007
|
-
for (const opt of opts) {
|
|
1008
|
-
if (opt.value === targetValue) {
|
|
1009
|
-
return true;
|
|
1010
|
-
}
|
|
1011
|
-
if (opt.children && opt.children.length > 0) {
|
|
1012
|
-
if (findValueInOptions(opt.children, targetValue)) {
|
|
1013
|
-
return true;
|
|
1014
|
-
}
|
|
1015
|
-
}
|
|
1016
|
-
}
|
|
1017
|
-
return false;
|
|
1018
|
-
}, []);
|
|
1019
|
-
|
|
1020
|
-
// Helper function to find missing selected values
|
|
1021
|
-
const findMissingValues = (0, _react.useCallback)((selectedValues, currentOptions) => {
|
|
1022
|
-
if (!selectedValues.length || !currentOptions.length) {
|
|
1023
|
-
return selectedValues;
|
|
1024
|
-
}
|
|
1025
|
-
return selectedValues.filter(val => !findValueInOptions(currentOptions, val));
|
|
1026
|
-
}, [findValueInOptions]);
|
|
1027
|
-
|
|
1028
|
-
// Check for missing options and call fetchMissingOptions if needed
|
|
1029
|
-
(0, _react.useEffect)(() => {
|
|
1030
|
-
// Only check if fetchMissingOptions is provided
|
|
1031
|
-
if (!fetchMissingOptions) {
|
|
1032
|
-
return;
|
|
1033
|
-
}
|
|
1034
|
-
|
|
1035
|
-
// Get current selected values
|
|
1036
|
-
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
1037
|
-
if (selectedValues.length === 0) {
|
|
1038
|
-
// No selected values, reset the tracking
|
|
1039
|
-
fetchMissingOptionsCalledRef.current = false;
|
|
1040
|
-
lastMissingValuesRef.current = '';
|
|
1041
|
-
return;
|
|
1042
|
-
}
|
|
1043
|
-
|
|
1044
|
-
// Find missing values
|
|
1045
|
-
const missingValues = findMissingValues(selectedValues, options);
|
|
1046
|
-
|
|
1047
|
-
// If no missing values, reset tracking and return
|
|
1048
|
-
if (missingValues.length === 0) {
|
|
1049
|
-
fetchMissingOptionsCalledRef.current = false;
|
|
1050
|
-
lastMissingValuesRef.current = '';
|
|
1051
|
-
return;
|
|
1052
|
-
}
|
|
1053
|
-
|
|
1054
|
-
// Create a sorted string representation of missing values for comparison
|
|
1055
|
-
// Use slice() to avoid mutating the original array
|
|
1056
|
-
const missingValuesKey = [...missingValues].sort().join(',');
|
|
1057
|
-
|
|
1058
|
-
// Only call if:
|
|
1059
|
-
// 1. We haven't called it before, OR
|
|
1060
|
-
// 2. The missing values have changed (different values are missing now)
|
|
1061
|
-
if (!fetchMissingOptionsCalledRef.current || lastMissingValuesRef.current !== missingValuesKey) {
|
|
1062
|
-
fetchMissingOptionsCalledRef.current = true;
|
|
1063
|
-
lastMissingValuesRef.current = missingValuesKey;
|
|
1064
|
-
// Call the developer's function with missing values (pass a copy to avoid mutation)
|
|
1065
|
-
fetchMissingOptions([...missingValues]);
|
|
1066
|
-
}
|
|
1067
|
-
}, [value, options, fetchMissingOptions, findMissingValues]);
|
|
1068
941
|
(0, _react.useEffect)(() => {
|
|
1069
942
|
const isEqual = Array.isArray(value) && Array.isArray(tempValue) ? (value == null ? void 0 : value.length) === (tempValue == null ? void 0 : tempValue.length) && value.every(v => Array.isArray(tempValue) && tempValue.includes(v)) : value === tempValue;
|
|
1070
|
-
if (!isEqual)
|
|
1071
|
-
setTempValue(value);
|
|
1072
|
-
// Reset ordered options when value changes from outside
|
|
1073
|
-
setOrderedOptions(null);
|
|
1074
|
-
}
|
|
1075
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
943
|
+
if (!isEqual) setTempValue(value);
|
|
1076
944
|
}, [value]);
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
(0, _react.useEffect)(() => {
|
|
1080
|
-
const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1081
|
-
|
|
1082
|
-
// Store selected items in cache for persistence
|
|
1083
|
-
const findAndCacheOption = (opts, val) => {
|
|
1084
|
-
for (const opt of opts) {
|
|
1085
|
-
if (opt.value === val) {
|
|
1086
|
-
selectedItemsCacheRef.current.set(val, opt);
|
|
1087
|
-
return true;
|
|
1088
|
-
}
|
|
1089
|
-
if (opt.children && opt.children.length > 0) {
|
|
1090
|
-
if (findAndCacheOption(opt.children, val)) {
|
|
1091
|
-
return true;
|
|
1092
|
-
}
|
|
1093
|
-
}
|
|
1094
|
-
}
|
|
1095
|
-
return false;
|
|
1096
|
-
};
|
|
1097
|
-
currentSelected.forEach(val => {
|
|
1098
|
-
if (!selectedItemsCacheRef.current.has(val)) {
|
|
1099
|
-
findAndCacheOption(options, val);
|
|
1100
|
-
}
|
|
1101
|
-
});
|
|
1102
|
-
|
|
1103
|
-
// Clean up cache for unselected items
|
|
1104
|
-
const selectedSet = new Set(currentSelected);
|
|
1105
|
-
selectedItemsCacheRef.current.forEach((_, value) => {
|
|
1106
|
-
if (!selectedSet.has(value)) {
|
|
1107
|
-
selectedItemsCacheRef.current.delete(value);
|
|
1108
|
-
}
|
|
1109
|
-
});
|
|
1110
|
-
}, [tempValue, options]);
|
|
1111
|
-
|
|
1112
|
-
// Reset ordered options when options change, but only if it would invalidate the current ordering
|
|
1113
|
-
// This prevents resetting when options are updated via onSearch/onScroll but selected items still exist
|
|
1114
|
-
(0, _react.useEffect)(() => {
|
|
1115
|
-
// Only reset if we have orderedOptions and the current value's items are no longer in options
|
|
1116
|
-
if (orderedOptions) {
|
|
1117
|
-
const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1118
|
-
|
|
1119
|
-
// Check if all selected values still exist in the new options
|
|
1120
|
-
const checkValueExists = (opts, val) => {
|
|
1121
|
-
for (const opt of opts) {
|
|
1122
|
-
if (opt.value === val) return true;
|
|
1123
|
-
if (opt.children && opt.children.length > 0) {
|
|
1124
|
-
if (checkValueExists(opt.children, val)) return true;
|
|
1125
|
-
}
|
|
1126
|
-
}
|
|
1127
|
-
return false;
|
|
1128
|
-
};
|
|
1129
|
-
|
|
1130
|
-
// If any selected value is missing from new options, reset ordering
|
|
1131
|
-
const allSelectedStillExist = currentSelected.every(val => checkValueExists(options, val));
|
|
1132
|
-
if (!allSelectedStillExist) {
|
|
1133
|
-
setOrderedOptions(null);
|
|
1134
|
-
}
|
|
1135
|
-
// Otherwise, keep the ordering even if options changed (e.g., via onSearch adding more items)
|
|
1136
|
-
} else {
|
|
1137
|
-
// No ordering set, nothing to reset
|
|
1138
|
-
}
|
|
1139
|
-
}, [options, orderedOptions, tempValue]);
|
|
1140
|
-
|
|
1141
|
-
// Extract debounce timeout (extracted early for use in useEffects)
|
|
1142
|
-
const debounceTimeout = searchDebounce != null ? searchDebounce : _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE;
|
|
1143
|
-
|
|
1144
|
-
// Keep optionsRef in sync with options
|
|
1145
|
-
(0, _react.useEffect)(() => {
|
|
1146
|
-
optionsRef.current = options;
|
|
1147
|
-
}, [options]);
|
|
1148
|
-
|
|
1149
|
-
// Cleanup timeouts on unmount
|
|
1150
|
-
(0, _react.useEffect)(() => {
|
|
1151
|
-
return () => {
|
|
1152
|
-
if (searchTimeoutRef.current) {
|
|
1153
|
-
clearTimeout(searchTimeoutRef.current);
|
|
1154
|
-
}
|
|
1155
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
1156
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
1157
|
-
}
|
|
1158
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
1159
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
1160
|
-
}
|
|
1161
|
-
};
|
|
1162
|
-
}, []);
|
|
1163
|
-
|
|
1164
|
-
// Detect when options update after a search to clear loading state
|
|
1165
|
-
// This prevents showing "No results found" before data arrives
|
|
1166
|
-
(0, _react.useEffect)(() => {
|
|
1167
|
-
// Only handle this for API-based searches (staticValue = false)
|
|
1168
|
-
// Check if lastSearchQueryRef has been set (including empty string for cleared search)
|
|
1169
|
-
const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
|
|
1170
|
-
if (staticValue || !isSearching || !hasSearchQuery) {
|
|
1171
|
-
prevOptionsRef.current = options;
|
|
1172
|
-
return;
|
|
1173
|
-
}
|
|
1174
|
-
|
|
1175
|
-
// Check if options actually changed (reference or content)
|
|
1176
|
-
const optionsChanged = prevOptionsRef.current !== options || prevOptionsRef.current.length !== options.length;
|
|
1177
|
-
|
|
1178
|
-
// Also check if search was cleared (empty string) and enough time has passed
|
|
1179
|
-
// This handles the case where clearing search reloads initial data that might be the same reference
|
|
1180
|
-
const searchCleared = lastSearchQueryRef.current === '';
|
|
1181
|
-
const timeSinceCleared = searchClearedTimeRef.current ? Date.now() - searchClearedTimeRef.current : Infinity;
|
|
1182
|
-
const hasOptionsData = options.length > 0;
|
|
1183
|
-
// Wait at least SEARCH_CLEARED_TIMEOUT after search is cleared to allow API call to complete
|
|
1184
|
-
const clearedSearchReady = searchCleared && hasOptionsData && timeSinceCleared > _constants.TIMEOUTS.SEARCH_CLEARED_TIMEOUT;
|
|
1185
|
-
if (optionsChanged || clearedSearchReady) {
|
|
1186
|
-
// Options updated after search - data has arrived
|
|
1187
|
-
// Use a small delay to ensure state updates are processed
|
|
1188
|
-
const timeoutId = setTimeout(() => {
|
|
1189
|
-
setIsSearching(false);
|
|
1190
|
-
prevOptionsRef.current = options;
|
|
1191
|
-
// Clear timestamp when search loading is cleared
|
|
1192
|
-
if (searchCleared) {
|
|
1193
|
-
searchClearedTimeRef.current = null;
|
|
1194
|
-
}
|
|
1195
|
-
}, _constants.TIMEOUTS.SEARCH_STATE_UPDATE_DELAY);
|
|
1196
|
-
return () => clearTimeout(timeoutId);
|
|
1197
|
-
}
|
|
1198
|
-
prevOptionsRef.current = options;
|
|
1199
|
-
}, [options, staticValue, isSearching]);
|
|
1200
|
-
|
|
1201
|
-
// Fallback: Clear searching state after a reasonable timeout to prevent infinite loading
|
|
1202
|
-
// This handles edge cases where options might not change reference but data has arrived
|
|
1203
|
-
// Also handles error cases where options don't update after search
|
|
1204
|
-
(0, _react.useEffect)(() => {
|
|
1205
|
-
// Check if lastSearchQueryRef has been set (including empty string for cleared search)
|
|
1206
|
-
const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
|
|
1207
|
-
if (!isSearching || staticValue || !hasSearchQuery) {
|
|
1208
|
-
return;
|
|
1209
|
-
}
|
|
1210
|
-
|
|
1211
|
-
// For cleared search (empty string), use a shorter timeout since it should reload initial data quickly
|
|
1212
|
-
// For regular search, use debounce timeout + buffer
|
|
1213
|
-
const searchCleared = lastSearchQueryRef.current === '';
|
|
1214
|
-
const timeoutDuration = searchCleared ? debounceTimeout + _constants.TIMEOUTS.SEARCH_CLEARED_BUFFER // Shorter timeout for cleared search
|
|
1215
|
-
: debounceTimeout + _constants.TIMEOUTS.SEARCH_REGULAR_BUFFER; // Longer timeout for regular search
|
|
1216
|
-
|
|
1217
|
-
// Calculate timeout: debounce timeout + a small buffer for API response
|
|
1218
|
-
// This ensures we wait for the API call to complete before showing "No results"
|
|
1219
|
-
// For error cases where options don't update, this will clear loading state
|
|
1220
|
-
const fallbackTimeout = setTimeout(() => {
|
|
1221
|
-
setIsSearching(false);
|
|
1222
|
-
searchClearedTimeRef.current = null; // Clear search cleared timestamp
|
|
1223
|
-
}, timeoutDuration);
|
|
1224
|
-
return () => clearTimeout(fallbackTimeout);
|
|
1225
|
-
}, [isSearching, staticValue, debounceTimeout, options.length]);
|
|
1226
|
-
|
|
1227
|
-
// Detect when options update after resetData is called to clear loading state
|
|
1228
|
-
(0, _react.useEffect)(() => {
|
|
1229
|
-
if (!isResettingData) {
|
|
1230
|
-
// Update ref even when not resetting to keep it in sync
|
|
1231
|
-
prevOptionsBeforeResetRef.current = options;
|
|
1232
|
-
// Clear timestamp when not resetting
|
|
1233
|
-
resetDataCalledTimeRef.current = null;
|
|
1234
|
-
return;
|
|
1235
|
-
}
|
|
1236
|
-
|
|
1237
|
-
// Check if options actually changed (reference, length, or content)
|
|
1238
|
-
// Compare against the options that existed before resetData was called
|
|
1239
|
-
const prevOptions = prevOptionsBeforeResetRef.current;
|
|
1240
|
-
const currentOptions = options;
|
|
1241
|
-
|
|
1242
|
-
// More robust comparison: check reference, length, or any content differences
|
|
1243
|
-
const optionsChanged = prevOptions !== currentOptions || prevOptions.length !== currentOptions.length ||
|
|
1244
|
-
// Deep comparison: check if any option values or labels changed
|
|
1245
|
-
prevOptions.length === currentOptions.length && prevOptions.length > 0 && prevOptions.some((prevOpt, idx) => {
|
|
1246
|
-
const currentOpt = currentOptions[idx];
|
|
1247
|
-
return !currentOpt || prevOpt.value !== currentOpt.value || prevOpt.label !== currentOpt.label;
|
|
1248
|
-
});
|
|
1249
|
-
|
|
1250
|
-
// Additional check: if enough time has passed since resetData was called
|
|
1251
|
-
// and we have options data, assume data has loaded even if comparison didn't detect change
|
|
1252
|
-
const timeSinceReset = resetDataCalledTimeRef.current ? Date.now() - resetDataCalledTimeRef.current : Infinity;
|
|
1253
|
-
const hasDataAfterTimeout = currentOptions.length > 0 && timeSinceReset > _constants.TIMEOUTS.RESET_DATA_MIN_TIME && timeSinceReset < _constants.TIMEOUTS.RESET_DATA_MAX_TIME;
|
|
1254
|
-
|
|
1255
|
-
// If options changed or enough time has passed with data, clear the loading state
|
|
1256
|
-
if (optionsChanged || hasDataAfterTimeout) {
|
|
1257
|
-
// Options updated after resetData - data has arrived
|
|
1258
|
-
// Clear immediately without delay for faster response
|
|
1259
|
-
setIsResettingData(false);
|
|
1260
|
-
prevOptionsBeforeResetRef.current = currentOptions;
|
|
1261
|
-
resetDataCalledTimeRef.current = null;
|
|
1262
|
-
}
|
|
1263
|
-
}, [options, isResettingData]);
|
|
1264
|
-
|
|
1265
|
-
// Fallback: Clear resetData loading state after a reasonable timeout
|
|
1266
|
-
// This handles edge cases where options might not change reference but data has arrived
|
|
1267
|
-
(0, _react.useEffect)(() => {
|
|
1268
|
-
if (!isResettingData) {
|
|
1269
|
-
return;
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
// Set a timeout to clear loading state if options don't update
|
|
1273
|
-
// Reduced timeout to 1 second for faster recovery
|
|
1274
|
-
const fallbackTimeout = setTimeout(() => {
|
|
1275
|
-
setIsResettingData(false);
|
|
1276
|
-
// Update ref to current options to prevent false positives in future comparisons
|
|
1277
|
-
prevOptionsBeforeResetRef.current = options;
|
|
1278
|
-
// Clear timestamp
|
|
1279
|
-
resetDataCalledTimeRef.current = null;
|
|
1280
|
-
}, _constants.TIMEOUTS.RESET_DATA_TIMEOUT);
|
|
1281
|
-
return () => clearTimeout(fallbackTimeout);
|
|
1282
|
-
}, [isResettingData, options]);
|
|
1283
|
-
|
|
1284
|
-
// Clear loading state when hasMore becomes false (all items exhausted)
|
|
1285
|
-
(0, _react.useEffect)(() => {
|
|
1286
|
-
if (!hasMore && isLoadingOnScroll) {
|
|
1287
|
-
setIsLoadingOnScroll(false);
|
|
1288
|
-
isScrollProcessingRef.current = false;
|
|
1289
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
1290
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
1291
|
-
scrollLoadingTimeoutRef.current = null;
|
|
1292
|
-
}
|
|
1293
|
-
}
|
|
1294
|
-
}, [hasMore, isLoadingOnScroll]);
|
|
1295
|
-
|
|
1296
|
-
// Detect when options change after scroll to clear loading overlay
|
|
1297
|
-
(0, _react.useEffect)(() => {
|
|
1298
|
-
// Always update refs when options change (when not loading)
|
|
1299
|
-
// This ensures we track the current state for next scroll detection
|
|
1300
|
-
if (!isLoadingOnScroll) {
|
|
1301
|
-
prevOptionsCountRef.current = options.length;
|
|
1302
|
-
// Store a reference to the options array for comparison
|
|
1303
|
-
// We'll compare by length and last item to detect changes
|
|
1304
|
-
prevOptionsRefForScroll.current = options;
|
|
1305
|
-
}
|
|
1306
|
-
|
|
1307
|
-
// Only check for changes if we're currently loading from scroll
|
|
1308
|
-
if (!isLoadingOnScroll || !onPopupScroll) {
|
|
1309
|
-
return;
|
|
1310
|
-
}
|
|
1311
|
-
|
|
1312
|
-
// Check if options count increased (new data loaded via append)
|
|
1313
|
-
const optionsCountIncreased = options.length > prevOptionsCountRef.current;
|
|
1314
|
-
|
|
1315
|
-
// Check if options content changed (even if count is same - replacement scenario)
|
|
1316
|
-
// Compare the last option to detect if new data was appended
|
|
1317
|
-
const optionsContentChanged = (() => {
|
|
1318
|
-
const prevCount = prevOptionsCountRef.current;
|
|
1319
|
-
const currentCount = options.length;
|
|
1320
|
-
|
|
1321
|
-
// If count changed, definitely content changed
|
|
1322
|
-
if (prevCount !== currentCount) {
|
|
1323
|
-
return true;
|
|
1324
|
-
}
|
|
1325
|
-
|
|
1326
|
-
// If count is same, check if last option changed (indicates new data appended/replaced)
|
|
1327
|
-
if (currentCount > 0 && prevCount > 0 && prevOptionsRefForScroll.current.length > 0) {
|
|
1328
|
-
const prevOptions = prevOptionsRefForScroll.current;
|
|
1329
|
-
const lastPrevOption = prevOptions[prevOptions.length - 1];
|
|
1330
|
-
const lastCurrentOption = options[options.length - 1];
|
|
1331
|
-
|
|
1332
|
-
// If last option is different, content changed
|
|
1333
|
-
if ((lastPrevOption == null ? void 0 : lastPrevOption.value) !== (lastCurrentOption == null ? void 0 : lastCurrentOption.value) || (lastPrevOption == null ? void 0 : lastPrevOption.label) !== (lastCurrentOption == null ? void 0 : lastCurrentOption.label)) {
|
|
1334
|
-
return true;
|
|
1335
|
-
}
|
|
1336
|
-
}
|
|
1337
|
-
return false;
|
|
1338
|
-
})();
|
|
1339
|
-
|
|
1340
|
-
// Clear loading if options changed (either count increased or content changed)
|
|
1341
|
-
// This handles both append (count increase) and replace (content change) scenarios
|
|
1342
|
-
if (optionsCountIncreased || optionsContentChanged) {
|
|
1343
|
-
// Options updated after scroll - data has arrived, clear loading overlay
|
|
1344
|
-
setIsLoadingOnScroll(false);
|
|
1345
|
-
// Reset processing flag to allow next scroll event
|
|
1346
|
-
isScrollProcessingRef.current = false;
|
|
1347
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
1348
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
1349
|
-
scrollLoadingTimeoutRef.current = null;
|
|
1350
|
-
}
|
|
1351
|
-
|
|
1352
|
-
// Update refs to track the new state after options change
|
|
1353
|
-
// This is critical for detecting subsequent scroll loads
|
|
1354
|
-
prevOptionsCountRef.current = options.length;
|
|
1355
|
-
prevOptionsRefForScroll.current = options;
|
|
1356
|
-
}
|
|
1357
|
-
}, [options, isLoadingOnScroll, onPopupScroll]);
|
|
1358
|
-
|
|
1359
|
-
// Handle search with debouncing
|
|
1360
|
-
const handleSearch = (0, _react.useCallback)(query => {
|
|
1361
|
-
// Clear existing timeout
|
|
1362
|
-
if (searchTimeoutRef.current) {
|
|
1363
|
-
clearTimeout(searchTimeoutRef.current);
|
|
1364
|
-
}
|
|
1365
|
-
const trimmedQuery = query.trim();
|
|
1366
|
-
|
|
1367
|
-
// Track when search is cleared (empty string after having a query)
|
|
1368
|
-
const wasSearching = lastSearchQueryRef.current !== '';
|
|
1369
|
-
const isNowCleared = trimmedQuery === '';
|
|
1370
|
-
if (wasSearching && isNowCleared) {
|
|
1371
|
-
searchClearedTimeRef.current = Date.now();
|
|
1372
|
-
} else if (!isNowCleared) {
|
|
1373
|
-
searchClearedTimeRef.current = null;
|
|
1374
|
-
}
|
|
1375
|
-
|
|
1376
|
-
// Track the search query to detect when options update
|
|
1377
|
-
lastSearchQueryRef.current = trimmedQuery;
|
|
1378
|
-
|
|
1379
|
-
// Mark as interacted if user typed something (even if they clear it later)
|
|
1380
|
-
if (trimmedQuery.length > 0 || lastSearchQueryRef.current.length > 0) {
|
|
1381
|
-
hasInteractedRef.current = true;
|
|
1382
|
-
}
|
|
1383
|
-
|
|
1384
|
-
// For API-based searches (staticValue = false), always call onSearch
|
|
1385
|
-
// This allows the developer to reload all initial data when search is cleared
|
|
1386
|
-
if (!staticValue && onSearch) {
|
|
1387
|
-
// Set loading state for both empty and non-empty queries
|
|
1388
|
-
setIsSearching(true);
|
|
1389
|
-
|
|
1390
|
-
// Debounce the search callback
|
|
1391
|
-
searchTimeoutRef.current = setTimeout(() => {
|
|
1392
|
-
// Send the search input (empty string when cleared, or the actual query)
|
|
1393
|
-
onSearch(trimmedQuery);
|
|
1394
|
-
// For API-based searches, keep isSearching true until options update
|
|
1395
|
-
// This prevents showing "No results found" before data arrives
|
|
1396
|
-
}, debounceTimeout);
|
|
1397
|
-
} else if (!trimmedQuery) {
|
|
1398
|
-
// For static searches, if query is empty, just reset the state
|
|
1399
|
-
setIsSearching(false);
|
|
1400
|
-
} else {
|
|
1401
|
-
// For static searches with content, show brief loading indicator
|
|
1402
|
-
// Set loading state briefly to show user feedback
|
|
1403
|
-
setIsSearching(true);
|
|
1404
|
-
// Clear loading state after a short delay (filtering is instant but we show feedback)
|
|
1405
|
-
searchTimeoutRef.current = setTimeout(() => {
|
|
1406
|
-
setIsSearching(false);
|
|
1407
|
-
}, _constants.TIMEOUTS.STATIC_SEARCH_DELAY);
|
|
1408
|
-
}
|
|
1409
|
-
}, [onSearch, staticValue, debounceTimeout]);
|
|
1410
|
-
const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
1411
|
-
const isTree = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
1412
|
-
|
|
1413
|
-
// Use options directly since pagination is handled by the developer
|
|
1414
|
-
const mergedOptions = (0, _react.useMemo)(() => {
|
|
1415
|
-
return options;
|
|
1416
|
-
}, [options]);
|
|
1417
|
-
|
|
1418
|
-
// Helper function to reorder options based on selection order
|
|
1419
|
-
// Selected items are moved to top in the order they were selected
|
|
1420
|
-
// For tree structures, maintains parent-child relationships
|
|
1421
|
-
// For flat lists, directly reorders items
|
|
1422
|
-
// Works for all data types: flat lists, tree structures, nested trees
|
|
1423
|
-
const reorderOptionsBySelection = (0, _react.useCallback)((opts, selectedOrder) => {
|
|
1424
|
-
if (!Array.isArray(selectedOrder) || selectedOrder.length === 0 || !(opts != null && opts.length)) {
|
|
1425
|
-
return opts;
|
|
1426
|
-
}
|
|
1427
|
-
const selectedSet = new Set(selectedOrder);
|
|
1428
|
-
const selectedItems = [];
|
|
1429
|
-
const unselectedItems = [];
|
|
1430
|
-
const processedTopLevelValues = new Set();
|
|
1431
|
-
|
|
1432
|
-
// Deep clone helper to avoid mutating original items
|
|
1433
|
-
const deepCloneItem = item => {
|
|
1434
|
-
return _extends({}, item, {
|
|
1435
|
-
children: item.children ? item.children.map(deepCloneItem) : undefined
|
|
1436
|
-
});
|
|
1437
|
-
};
|
|
1438
|
-
|
|
1439
|
-
// Find the top-level item that contains the selected value
|
|
1440
|
-
// For flat lists, returns the item itself
|
|
1441
|
-
// For tree structures, returns the top-level parent from opts
|
|
1442
|
-
const findTopLevelItem = targetValue => {
|
|
1443
|
-
// First, find which top-level item in opts contains this value
|
|
1444
|
-
for (const topLevelItem of opts) {
|
|
1445
|
-
// Check if this top-level item itself matches
|
|
1446
|
-
if (topLevelItem.value === targetValue) {
|
|
1447
|
-
return topLevelItem;
|
|
1448
|
-
}
|
|
1449
|
-
|
|
1450
|
-
// Recursively search in children
|
|
1451
|
-
const searchInChildren = items => {
|
|
1452
|
-
for (const item of items) {
|
|
1453
|
-
if (item.value === targetValue) {
|
|
1454
|
-
return true; // Found it
|
|
1455
|
-
}
|
|
1456
|
-
if (item.children && item.children.length > 0) {
|
|
1457
|
-
if (searchInChildren(item.children)) {
|
|
1458
|
-
return true;
|
|
1459
|
-
}
|
|
1460
|
-
}
|
|
1461
|
-
}
|
|
1462
|
-
return false;
|
|
1463
|
-
};
|
|
1464
|
-
|
|
1465
|
-
// If found in this top-level item's children, return the top-level item
|
|
1466
|
-
if (topLevelItem.children && topLevelItem.children.length > 0) {
|
|
1467
|
-
if (searchInChildren(topLevelItem.children)) {
|
|
1468
|
-
return topLevelItem;
|
|
1469
|
-
}
|
|
1470
|
-
}
|
|
1471
|
-
}
|
|
1472
|
-
return null;
|
|
1473
|
-
};
|
|
1474
|
-
|
|
1475
|
-
// Check if an item or any of its descendants is selected
|
|
1476
|
-
const hasSelectedDescendant = item => {
|
|
1477
|
-
if (item.value !== undefined && selectedSet.has(item.value)) {
|
|
1478
|
-
return true;
|
|
1479
|
-
}
|
|
1480
|
-
if (item.children && item.children.length > 0) {
|
|
1481
|
-
return item.children.some(child => hasSelectedDescendant(child));
|
|
1482
|
-
}
|
|
1483
|
-
return false;
|
|
1484
|
-
};
|
|
1485
|
-
|
|
1486
|
-
// Collect selected items in selection order
|
|
1487
|
-
selectedOrder.forEach(selectedVal => {
|
|
1488
|
-
const topLevelItem = findTopLevelItem(selectedVal);
|
|
1489
|
-
if (topLevelItem && topLevelItem.value !== undefined && !processedTopLevelValues.has(topLevelItem.value)) {
|
|
1490
|
-
// Clone the item to avoid mutating the original
|
|
1491
|
-
const clonedItem = deepCloneItem(topLevelItem);
|
|
1492
|
-
selectedItems.push(clonedItem);
|
|
1493
|
-
processedTopLevelValues.add(topLevelItem.value);
|
|
1494
|
-
}
|
|
1495
|
-
});
|
|
1496
|
-
|
|
1497
|
-
// Collect unselected items maintaining original order
|
|
1498
|
-
// For tree structures, only include top-level items that don't have any selected descendants
|
|
1499
|
-
opts.forEach(item => {
|
|
1500
|
-
if (item.value === undefined) {
|
|
1501
|
-
// Item without value, include as-is
|
|
1502
|
-
unselectedItems.push(deepCloneItem(item));
|
|
1503
|
-
} else if (!processedTopLevelValues.has(item.value)) {
|
|
1504
|
-
// Check if this item or any of its descendants is selected
|
|
1505
|
-
if (!hasSelectedDescendant(item)) {
|
|
1506
|
-
unselectedItems.push(deepCloneItem(item));
|
|
1507
|
-
}
|
|
1508
|
-
}
|
|
1509
|
-
});
|
|
1510
|
-
|
|
1511
|
-
// Return selected items first (in selection order), then unselected items
|
|
1512
|
-
return [...selectedItems, ...unselectedItems];
|
|
1513
|
-
}, []);
|
|
1514
|
-
|
|
1515
|
-
// Update orderedOptions when new options are appended via scroll (when items are selected)
|
|
1516
|
-
// This ensures new data appears even when items are selected
|
|
1517
|
-
(0, _react.useEffect)(() => {
|
|
1518
|
-
// Only update if we have orderedOptions (items are selected), onPopupScroll is provided,
|
|
1519
|
-
// and options increased from when scroll was triggered
|
|
1520
|
-
if (!orderedOptions || !onPopupScroll) {
|
|
1521
|
-
return;
|
|
1522
|
-
}
|
|
1523
|
-
const currentOptions = options;
|
|
1524
|
-
// Compare against the count when scroll was triggered, not the current ref value
|
|
1525
|
-
// This ensures we detect increases even if refs were updated in other useEffects
|
|
1526
|
-
const optionsCountIncreased = currentOptions.length > scrollTriggerOptionsCountRef.current;
|
|
1527
|
-
|
|
1528
|
-
// Only update if options increased from scroll trigger time
|
|
1529
|
-
// This prevents updating on other option changes (like search)
|
|
1530
|
-
if (optionsCountIncreased && scrollTriggerOptionsCountRef.current > 0) {
|
|
1531
|
-
const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1532
|
-
if (selectedValues.length > 0) {
|
|
1533
|
-
// Reorder the full options list (which now includes new options) to maintain selection order
|
|
1534
|
-
// This will put selected items at top and append new unselected items at bottom
|
|
1535
|
-
const reordered = reorderOptionsBySelection(currentOptions, selectedValues);
|
|
1536
|
-
setOrderedOptions(reordered);
|
|
1537
|
-
// Update the scroll trigger count for next scroll detection
|
|
1538
|
-
scrollTriggerOptionsCountRef.current = currentOptions.length;
|
|
1539
|
-
}
|
|
1540
|
-
}
|
|
1541
|
-
}, [options, orderedOptions, onPopupScroll, tempValue, reorderOptionsBySelection]);
|
|
1542
|
-
|
|
1543
|
-
// Sort selected items to top on initial load (only once)
|
|
1544
|
-
// This handles the case when user comes from another flow with pre-selected values
|
|
1545
|
-
(0, _react.useEffect)(() => {
|
|
1546
|
-
// Only do this once, and only if we have options and selected values
|
|
1547
|
-
if (initialSortDoneRef.current || !(options != null && options.length)) {
|
|
1548
|
-
return;
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
// Check if there are selected values
|
|
1552
|
-
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
1553
|
-
if (selectedValues.length === 0) {
|
|
1554
|
-
// No selected values, mark as done
|
|
1555
|
-
initialSortDoneRef.current = true;
|
|
1556
|
-
return;
|
|
1557
|
-
}
|
|
1558
|
-
|
|
1559
|
-
// Check if any selected values exist in options
|
|
1560
|
-
const checkValueExists = (opts, val) => {
|
|
1561
|
-
for (const opt of opts) {
|
|
1562
|
-
if (opt.value === val) return true;
|
|
1563
|
-
if (opt.children && opt.children.length > 0) {
|
|
1564
|
-
if (checkValueExists(opt.children, val)) return true;
|
|
1565
|
-
}
|
|
1566
|
-
}
|
|
1567
|
-
return false;
|
|
1568
|
-
};
|
|
1569
|
-
const hasSelectedInOptions = selectedValues.some(val => checkValueExists(options, val));
|
|
1570
|
-
if (hasSelectedInOptions) {
|
|
1571
|
-
// Reorder options to move selected items to top
|
|
1572
|
-
const reordered = reorderOptionsBySelection(options, selectedValues);
|
|
1573
|
-
setOrderedOptions(reordered);
|
|
1574
|
-
}
|
|
1575
|
-
|
|
1576
|
-
// Mark as done - only sort once on initial load
|
|
1577
|
-
initialSortDoneRef.current = true;
|
|
1578
|
-
}, [options, value, reorderOptionsBySelection]);
|
|
945
|
+
const isMulti = (0, _react.useMemo)(() => type === SELECT_TYPES.MULTI_SELECT || type === SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
946
|
+
const isTree = (0, _react.useMemo)(() => type === SELECT_TYPES.TREE_SELECT || type === SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
1579
947
|
const dataSource = (0, _react.useMemo)(() => {
|
|
1580
|
-
|
|
1581
|
-
// When not searching, use ordered options if available (selected items at top), otherwise use merged options
|
|
1582
|
-
const sourceOptions = searchText.trim() ? mergedOptions : orderedOptions || mergedOptions;
|
|
1583
|
-
if (!(sourceOptions != null && sourceOptions.length)) return [];
|
|
948
|
+
if (!(options != null && options.length)) return [];
|
|
1584
949
|
const enhanceOptions = opts => opts.map(opt => {
|
|
1585
950
|
const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
1586
951
|
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
1587
|
-
|
|
1588
|
-
|
|
1589
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
952
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
953
|
+
type: "label14",
|
|
1590
954
|
className: _styles.default['cap-unified-select-option-label'],
|
|
1591
|
-
children:
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
className: _styles.default['cap-unified-select-option-end'],
|
|
1597
|
-
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
1598
|
-
className: _styles.default['cap-unified-select-option-suffix'],
|
|
1599
|
-
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1600
|
-
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
1601
|
-
})]
|
|
1602
|
-
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1603
|
-
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
955
|
+
children: opt == null ? void 0 : opt.label
|
|
956
|
+
}), (opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
957
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
958
|
+
children: [opt == null ? void 0 : opt.optionSuffix, ' ', (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
959
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
1604
960
|
})]
|
|
961
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
962
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
1605
963
|
})]
|
|
1606
964
|
});
|
|
1607
965
|
return _extends({}, opt, {
|
|
@@ -1610,43 +968,26 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
1610
968
|
children: opt != null && opt.children ? enhanceOptions(opt.children) : []
|
|
1611
969
|
});
|
|
1612
970
|
});
|
|
1613
|
-
return isTree ? enhanceOptions(
|
|
971
|
+
return isTree ? enhanceOptions(options) : options.map(opt => _extends({}, opt, {
|
|
1614
972
|
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
1615
973
|
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
974
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
975
|
+
type: "label14",
|
|
1619
976
|
className: _styles.default['cap-unified-select-option-label'],
|
|
1620
|
-
children:
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
className: _styles.default['cap-unified-select-option-end'],
|
|
1626
|
-
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
1627
|
-
className: _styles.default['cap-unified-select-option-suffix'],
|
|
1628
|
-
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1629
|
-
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
1630
|
-
})]
|
|
1631
|
-
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1632
|
-
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
977
|
+
children: opt == null ? void 0 : opt.label
|
|
978
|
+
}), (opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
979
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
980
|
+
children: [opt == null ? void 0 : opt.optionSuffix, ' ', (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
981
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
1633
982
|
})]
|
|
983
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
984
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
1634
985
|
})]
|
|
1635
986
|
}),
|
|
1636
987
|
label: opt == null ? void 0 : opt.label
|
|
1637
988
|
}));
|
|
1638
|
-
}, [isTree,
|
|
1639
|
-
const filteredTree = (0, _react.useMemo)(() =>
|
|
1640
|
-
const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1641
|
-
const hasSearchQuery = searchText.trim().length > 0;
|
|
1642
|
-
|
|
1643
|
-
// If staticValue is true, use local filtering on existing options
|
|
1644
|
-
// If staticValue is false, still use local filtering for immediate feedback,
|
|
1645
|
-
// but onSearch callback will be triggered for parent to update options
|
|
1646
|
-
// During search, don't include selectedValues so only matching items are shown
|
|
1647
|
-
// When not searching, include selectedValues to show selected items
|
|
1648
|
-
return filterTreeData(dataSource, searchText.trim(), searchBasedOn, hasSearchQuery ? undefined : selectedValues);
|
|
1649
|
-
}, [dataSource, searchText, searchBasedOn, tempValue]);
|
|
989
|
+
}, [isTree, options]);
|
|
990
|
+
const filteredTree = (0, _react.useMemo)(() => filterTreeData(dataSource, searchText, searchBasedOn), [dataSource, searchText, searchBasedOn]);
|
|
1650
991
|
const treeMaps = (0, _react.useMemo)(() => buildTreeMaps(options), [options]);
|
|
1651
992
|
const selectedLeafCount = (0, _react.useMemo)(() => countSelectedLeaves(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
|
|
1652
993
|
const displayValue = dropdownOpen ? tempValue : value;
|
|
@@ -1691,344 +1032,28 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
1691
1032
|
return null;
|
|
1692
1033
|
}, [isMulti, displayValue, treeMaps]);
|
|
1693
1034
|
const handleConfirm = (0, _react.useCallback)(() => {
|
|
1694
|
-
// Mark as interacted since user clicked confirm (explicit action)
|
|
1695
|
-
hasInteractedRef.current = true;
|
|
1696
|
-
|
|
1697
|
-
// Reorder options based on selection order when confirm is clicked
|
|
1698
|
-
// Use mergedOptions to include paginated options if they exist
|
|
1699
|
-
const optionsToReorder = mergedOptions;
|
|
1700
|
-
if (isMulti && Array.isArray(tempValue) && tempValue.length > 0) {
|
|
1701
|
-
// Reorder the options (includes paginated if they exist)
|
|
1702
|
-
const reordered = reorderOptionsBySelection(optionsToReorder, tempValue);
|
|
1703
|
-
setOrderedOptions(reordered);
|
|
1704
|
-
} else if (!isMulti && tempValue && !Array.isArray(tempValue)) {
|
|
1705
|
-
// For single select, move selected item to top
|
|
1706
|
-
const reordered = reorderOptionsBySelection(optionsToReorder, [tempValue]);
|
|
1707
|
-
setOrderedOptions(reordered);
|
|
1708
|
-
} else {
|
|
1709
|
-
// No selection, reset to original order
|
|
1710
|
-
setOrderedOptions(null);
|
|
1711
|
-
}
|
|
1712
1035
|
onChange == null || onChange(tempValue);
|
|
1713
1036
|
setDropdownOpen(false);
|
|
1714
|
-
|
|
1715
|
-
setIsSearching(false);
|
|
1716
|
-
searchClearedTimeRef.current = null; // Clear search cleared timestamp
|
|
1717
|
-
// Clear search text on confirm only if resetSearch is true
|
|
1718
|
-
// This allows users to keep their search when reopening the dropdown if desired
|
|
1719
|
-
if (resetSearch) {
|
|
1720
|
-
setSearchText('');
|
|
1721
|
-
lastSearchQueryRef.current = ''; // Clear search query ref
|
|
1722
|
-
}
|
|
1723
|
-
// Call resetData to allow developer to reload initial data
|
|
1724
|
-
if (resetData) {
|
|
1725
|
-
// Store current options before calling resetData to detect when they update
|
|
1726
|
-
prevOptionsBeforeResetRef.current = mergedOptions;
|
|
1727
|
-
setIsResettingData(true);
|
|
1728
|
-
resetDataCalledRef.current = true;
|
|
1729
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
1730
|
-
resetData();
|
|
1731
|
-
}
|
|
1037
|
+
setSearchText('');
|
|
1732
1038
|
onConfirm == null || onConfirm(tempValue);
|
|
1733
|
-
}, [onChange, onConfirm, tempValue
|
|
1039
|
+
}, [onChange, onConfirm, tempValue]);
|
|
1734
1040
|
const handleClearAll = (0, _react.useCallback)(() => {
|
|
1735
|
-
// Mark as interacted since user clicked clear (explicit action)
|
|
1736
|
-
hasInteractedRef.current = true;
|
|
1737
1041
|
const cleared = isMulti ? [] : undefined;
|
|
1738
1042
|
setTempValue(cleared);
|
|
1739
1043
|
onChange == null || onChange(cleared);
|
|
1740
1044
|
setDropdownOpen(false);
|
|
1741
|
-
|
|
1742
|
-
if (resetData) {
|
|
1743
|
-
// Store current options before calling resetData to detect when they update
|
|
1744
|
-
prevOptionsBeforeResetRef.current = options;
|
|
1745
|
-
setIsResettingData(true);
|
|
1746
|
-
resetDataCalledRef.current = true;
|
|
1747
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
1748
|
-
resetData();
|
|
1749
|
-
}
|
|
1750
|
-
}, [isMulti, onChange, resetData, options]);
|
|
1045
|
+
}, [isMulti, onChange]);
|
|
1751
1046
|
const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
|
|
1752
1047
|
if (readOnly) {
|
|
1753
1048
|
return;
|
|
1754
1049
|
}
|
|
1755
|
-
if (open) {
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
initialTempValueRef.current = value;
|
|
1760
|
-
hasInteractedRef.current = false;
|
|
1761
|
-
resetDataCalledRef.current = false;
|
|
1762
|
-
// Reset fetchMissingOptions tracking to allow re-checking when dropdown opens
|
|
1763
|
-
fetchMissingOptionsCalledRef.current = false;
|
|
1764
|
-
lastMissingValuesRef.current = '';
|
|
1765
|
-
// Clear any pending search timeouts
|
|
1766
|
-
if (searchTimeoutRef.current) {
|
|
1767
|
-
clearTimeout(searchTimeoutRef.current);
|
|
1768
|
-
searchTimeoutRef.current = null;
|
|
1769
|
-
}
|
|
1770
|
-
// Clear any pending scroll loading timeouts
|
|
1771
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
1772
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
1773
|
-
scrollLoadingTimeoutRef.current = null;
|
|
1774
|
-
}
|
|
1775
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
1776
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
1777
|
-
scrollThrottleTimeoutRef.current = null;
|
|
1778
|
-
}
|
|
1779
|
-
// Reset loading states
|
|
1780
|
-
setIsSearching(false);
|
|
1781
|
-
searchClearedTimeRef.current = null; // Clear search cleared timestamp
|
|
1782
|
-
setIsLoadingOnScroll(false);
|
|
1783
|
-
isScrollProcessingRef.current = false;
|
|
1784
|
-
// Safety check: Clear isResettingData if it's still true when opening
|
|
1785
|
-
// This handles cases where options updated while dropdown was closed
|
|
1786
|
-
if (isResettingData) {
|
|
1787
|
-
setIsResettingData(false);
|
|
1788
|
-
// Update ref to current options to prevent false positives
|
|
1789
|
-
prevOptionsBeforeResetRef.current = options;
|
|
1790
|
-
// Clear timestamp
|
|
1791
|
-
resetDataCalledTimeRef.current = null;
|
|
1792
|
-
}
|
|
1793
|
-
} else {
|
|
1794
|
-
// Dropdown is closing
|
|
1795
|
-
if (!customPopupRender) {
|
|
1796
|
-
onChange == null || onChange(tempValue);
|
|
1797
|
-
} else {
|
|
1798
|
-
setTempValue(value);
|
|
1799
|
-
}
|
|
1800
|
-
// Clear search when closing (if enabled)
|
|
1801
|
-
if (resetSearch) {
|
|
1802
|
-
setSearchText('');
|
|
1803
|
-
setIsSearching(false);
|
|
1804
|
-
lastSearchQueryRef.current = ''; // Clear search query ref
|
|
1805
|
-
searchClearedTimeRef.current = null; // Clear search cleared timestamp
|
|
1806
|
-
}
|
|
1807
|
-
// Reset scroll loading state
|
|
1808
|
-
setIsLoadingOnScroll(false);
|
|
1809
|
-
isScrollProcessingRef.current = false;
|
|
1810
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
1811
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
1812
|
-
scrollLoadingTimeoutRef.current = null;
|
|
1813
|
-
}
|
|
1814
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
1815
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
1816
|
-
scrollThrottleTimeoutRef.current = null;
|
|
1817
|
-
}
|
|
1818
|
-
scrollContainerRef.current = null;
|
|
1819
|
-
|
|
1820
|
-
// Only call resetData if user actually interacted (selected, searched, etc.)
|
|
1821
|
-
// and resetData hasn't been called already in this session
|
|
1822
|
-
// This prevents multiple API calls when user just opens/closes without interaction
|
|
1823
|
-
if (resetData && hasInteractedRef.current && !resetDataCalledRef.current) {
|
|
1824
|
-
// Store current options before calling resetData to detect when they update
|
|
1825
|
-
prevOptionsBeforeResetRef.current = options;
|
|
1826
|
-
setIsResettingData(true);
|
|
1827
|
-
resetDataCalledRef.current = true;
|
|
1828
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
1829
|
-
resetData();
|
|
1830
|
-
} else if (!hasInteractedRef.current) {
|
|
1831
|
-
// User did nothing - reset everything as if it's a fresh load
|
|
1832
|
-
// Clear any pending operations
|
|
1833
|
-
if (searchTimeoutRef.current) {
|
|
1834
|
-
clearTimeout(searchTimeoutRef.current);
|
|
1835
|
-
searchTimeoutRef.current = null;
|
|
1836
|
-
}
|
|
1837
|
-
setIsSearching(false);
|
|
1838
|
-
setIsResettingData(false);
|
|
1839
|
-
// Reset search query ref
|
|
1840
|
-
lastSearchQueryRef.current = '';
|
|
1841
|
-
}
|
|
1842
|
-
|
|
1843
|
-
// Reset interaction flag for next session
|
|
1844
|
-
hasInteractedRef.current = false;
|
|
1050
|
+
if (!open && !customPopupRender) {
|
|
1051
|
+
onChange == null || onChange(tempValue);
|
|
1052
|
+
} else if (!open) {
|
|
1053
|
+
setTempValue(value);
|
|
1845
1054
|
}
|
|
1846
1055
|
setDropdownOpen(open);
|
|
1847
|
-
}, [customPopupRender, value, onChange, tempValue, readOnly
|
|
1848
|
-
const handleFooterDownload = (0, _react.useCallback)(() => {
|
|
1849
|
-
const currentValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1850
|
-
onFooterDownloadChange == null || onFooterDownloadChange(currentValues);
|
|
1851
|
-
}, [tempValue, onFooterDownloadChange]);
|
|
1852
|
-
const handleUpload = (0, _react.useCallback)(() => {
|
|
1853
|
-
onUpload == null || onUpload();
|
|
1854
|
-
setDropdownOpen(false);
|
|
1855
|
-
}, [onUpload]);
|
|
1856
|
-
const handleSearchChange = (0, _react.useCallback)(e => {
|
|
1857
|
-
const query = e.target.value;
|
|
1858
|
-
setSearchText(query);
|
|
1859
|
-
|
|
1860
|
-
// Trigger search handler (handles debouncing and minLength check)
|
|
1861
|
-
handleSearch(query);
|
|
1862
|
-
}, [handleSearch]);
|
|
1863
|
-
const handleSearchKeyDown = (0, _react.useCallback)(e => {
|
|
1864
|
-
// Stop propagation of backspace and delete keys to prevent TreeSelect from deselecting items
|
|
1865
|
-
// The input itself will handle the deletion, we just need to prevent TreeSelect from handling it
|
|
1866
|
-
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
1867
|
-
e.stopPropagation();
|
|
1868
|
-
}
|
|
1869
|
-
// Also stop Escape key to prevent dropdown from closing when clearing search
|
|
1870
|
-
if (e.key === 'Escape' && searchText.length > 0) {
|
|
1871
|
-
e.stopPropagation();
|
|
1872
|
-
}
|
|
1873
|
-
}, [searchText]);
|
|
1874
|
-
|
|
1875
|
-
// Handle scroll event - automatically checks if scroll is near bottom
|
|
1876
|
-
// Developer handles hasMore and isLoading conditions in onPopupScroll callback
|
|
1877
|
-
// Using refs to avoid recreating the callback when options change
|
|
1878
|
-
const handleScroll = (0, _react.useCallback)(event => {
|
|
1879
|
-
if (!onPopupScroll) return;
|
|
1880
|
-
const target = event.target;
|
|
1881
|
-
if (!target) return;
|
|
1882
|
-
|
|
1883
|
-
// Check if scroll is near bottom
|
|
1884
|
-
const isNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
|
|
1885
|
-
|
|
1886
|
-
// Only call onPopupScroll if scroll is near bottom
|
|
1887
|
-
// Developer will handle hasMore and isLoading checks inside the callback
|
|
1888
|
-
if (!isNearBottom) {
|
|
1889
|
-
// Reset processing flag when not near bottom
|
|
1890
|
-
isScrollProcessingRef.current = false;
|
|
1891
|
-
return;
|
|
1892
|
-
}
|
|
1893
|
-
|
|
1894
|
-
// Prevent multiple scroll triggers while already processing
|
|
1895
|
-
// This ensures we don't trigger multiple API calls simultaneously
|
|
1896
|
-
if (isScrollProcessingRef.current) return;
|
|
1897
|
-
|
|
1898
|
-
// Prevent multiple scroll triggers while already loading
|
|
1899
|
-
// This ensures loading state is managed properly and data loading completes
|
|
1900
|
-
if (isLoadingOnScroll) return;
|
|
1901
|
-
|
|
1902
|
-
// Don't trigger if there are no more items to load
|
|
1903
|
-
// This prevents showing loading state when all items are exhausted
|
|
1904
|
-
if (!hasMore) {
|
|
1905
|
-
isScrollProcessingRef.current = false;
|
|
1906
|
-
return;
|
|
1907
|
-
}
|
|
1908
|
-
|
|
1909
|
-
// Throttle scroll events to prevent rapid-fire API calls
|
|
1910
|
-
// Clear any existing throttle timeout
|
|
1911
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
1912
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
1913
|
-
}
|
|
1914
|
-
|
|
1915
|
-
// Set processing flag immediately to prevent duplicate calls
|
|
1916
|
-
isScrollProcessingRef.current = true;
|
|
1917
|
-
|
|
1918
|
-
// Throttle the actual API call to prevent multiple rapid triggers
|
|
1919
|
-
scrollThrottleTimeoutRef.current = setTimeout(() => {
|
|
1920
|
-
// Double-check we're still near bottom and not loading
|
|
1921
|
-
const stillNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
|
|
1922
|
-
// Also check if hasMore is still true (might have changed during throttle delay)
|
|
1923
|
-
if (!stillNearBottom || isLoadingOnScroll || !hasMore) {
|
|
1924
|
-
isScrollProcessingRef.current = false;
|
|
1925
|
-
return;
|
|
1926
|
-
}
|
|
1927
|
-
|
|
1928
|
-
// Store current options count and options reference before triggering load
|
|
1929
|
-
// This helps detect when new data arrives
|
|
1930
|
-
// Use ref to get current options without depending on options.length
|
|
1931
|
-
const currentOptions = optionsRef.current;
|
|
1932
|
-
prevOptionsCountRef.current = currentOptions.length;
|
|
1933
|
-
prevOptionsRefForScroll.current = currentOptions;
|
|
1934
|
-
// Also store the count at scroll trigger time for orderedOptions update
|
|
1935
|
-
scrollTriggerOptionsCountRef.current = currentOptions.length;
|
|
1936
|
-
|
|
1937
|
-
// Show loading indicator when scrolling near bottom
|
|
1938
|
-
// This happens before calling onPopupScroll to provide immediate feedback
|
|
1939
|
-
setIsLoadingOnScroll(true);
|
|
1940
|
-
|
|
1941
|
-
// Clear any existing timeout
|
|
1942
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
1943
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
1944
|
-
scrollLoadingTimeoutRef.current = null;
|
|
1945
|
-
}
|
|
1946
|
-
|
|
1947
|
-
// Mark as interacted when user scrolls (triggers data loading)
|
|
1948
|
-
hasInteractedRef.current = true;
|
|
1949
|
-
|
|
1950
|
-
// Call the developer's scroll handler - component already checked scroll position
|
|
1951
|
-
// Developer should check hasMore and isLoading inside the callback
|
|
1952
|
-
// This triggers the async data loading
|
|
1953
|
-
onPopupScroll();
|
|
1954
|
-
|
|
1955
|
-
// Set a fallback timeout to clear loading if options don't change
|
|
1956
|
-
// This prevents loading from staying forever if data never arrives
|
|
1957
|
-
// Using a longer timeout (10 seconds) to give enough time for slow API calls
|
|
1958
|
-
scrollLoadingTimeoutRef.current = setTimeout(() => {
|
|
1959
|
-
// Only clear if still loading (options change detection might have cleared it already)
|
|
1960
|
-
setIsLoadingOnScroll(prev => {
|
|
1961
|
-
if (prev) {
|
|
1962
|
-
// Clear the timeout reference when clearing loading state
|
|
1963
|
-
scrollLoadingTimeoutRef.current = null;
|
|
1964
|
-
// Reset processing flag when loading times out
|
|
1965
|
-
isScrollProcessingRef.current = false;
|
|
1966
|
-
return false;
|
|
1967
|
-
}
|
|
1968
|
-
return prev;
|
|
1969
|
-
});
|
|
1970
|
-
}, _constants.TIMEOUTS.SCROLL_LOADING_TIMEOUT);
|
|
1971
|
-
}, 150); // 150ms throttle to prevent rapid-fire events
|
|
1972
|
-
}, [onPopupScroll, isLoadingOnScroll, hasMore]);
|
|
1973
|
-
|
|
1974
|
-
// Setup scroll listener for onPopupScroll
|
|
1975
|
-
(0, _react.useEffect)(() => {
|
|
1976
|
-
if (!onPopupScroll || !dropdownOpen) return;
|
|
1977
|
-
|
|
1978
|
-
// Use a small delay to ensure DOM is ready
|
|
1979
|
-
const timeoutId = setTimeout(() => {
|
|
1980
|
-
// Find the scrollable container in the dropdown
|
|
1981
|
-
const findScrollContainer = () => {
|
|
1982
|
-
// Try to find the Ant Design dropdown scroll container
|
|
1983
|
-
// Look for dropdowns that are currently visible (not hidden)
|
|
1984
|
-
const dropdowns = document.querySelectorAll('.ant-select-dropdown:not(.ant-select-dropdown-hidden)');
|
|
1985
|
-
if (dropdowns.length === 0) return null;
|
|
1986
|
-
|
|
1987
|
-
// Get the last opened dropdown (most recent)
|
|
1988
|
-
const dropdown = Array.from(dropdowns).pop();
|
|
1989
|
-
if (!dropdown) return null;
|
|
1990
|
-
|
|
1991
|
-
// Look for the scrollable list container
|
|
1992
|
-
const treeList = dropdown.querySelector('.ant-select-tree-list-holder');
|
|
1993
|
-
if (treeList && treeList.scrollHeight > treeList.clientHeight) {
|
|
1994
|
-
return treeList;
|
|
1995
|
-
}
|
|
1996
|
-
|
|
1997
|
-
// Try alternative selectors
|
|
1998
|
-
const virtualList = dropdown.querySelector('.rc-virtual-list-holder');
|
|
1999
|
-
if (virtualList && virtualList.scrollHeight > virtualList.clientHeight) {
|
|
2000
|
-
return virtualList;
|
|
2001
|
-
}
|
|
2002
|
-
|
|
2003
|
-
// Fallback to dropdown itself if it's scrollable
|
|
2004
|
-
if (dropdown.scrollHeight > dropdown.clientHeight) {
|
|
2005
|
-
return dropdown;
|
|
2006
|
-
}
|
|
2007
|
-
return null;
|
|
2008
|
-
};
|
|
2009
|
-
const scrollContainer = findScrollContainer();
|
|
2010
|
-
if (scrollContainer) {
|
|
2011
|
-
scrollContainerRef.current = scrollContainer;
|
|
2012
|
-
scrollContainer.addEventListener('scroll', handleScroll, {
|
|
2013
|
-
passive: true
|
|
2014
|
-
});
|
|
2015
|
-
}
|
|
2016
|
-
}, _constants.TIMEOUTS.SCROLL_CONTAINER_DELAY);
|
|
2017
|
-
return () => {
|
|
2018
|
-
clearTimeout(timeoutId);
|
|
2019
|
-
// Clear throttle timeout when cleaning up
|
|
2020
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
2021
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
2022
|
-
scrollThrottleTimeoutRef.current = null;
|
|
2023
|
-
}
|
|
2024
|
-
if (scrollContainerRef.current) {
|
|
2025
|
-
scrollContainerRef.current.removeEventListener('scroll', handleScroll);
|
|
2026
|
-
scrollContainerRef.current = null;
|
|
2027
|
-
}
|
|
2028
|
-
// Reset processing flag when listener is removed
|
|
2029
|
-
isScrollProcessingRef.current = false;
|
|
2030
|
-
};
|
|
2031
|
-
}, [onPopupScroll, dropdownOpen, handleScroll]);
|
|
1056
|
+
}, [customPopupRender, value, onChange, tempValue, readOnly]);
|
|
2032
1057
|
const renderHeader = (0, _react.useMemo)(() => {
|
|
2033
1058
|
if (!headerLabel && !tooltip) return null;
|
|
2034
1059
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
@@ -2071,14 +1096,13 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
2071
1096
|
placeholder: "Search",
|
|
2072
1097
|
variant: "borderless",
|
|
2073
1098
|
value: searchText,
|
|
2074
|
-
onChange:
|
|
2075
|
-
onKeyDown: handleSearchKeyDown,
|
|
1099
|
+
onChange: e => setSearchText(e.target.value),
|
|
2076
1100
|
allowClear: true
|
|
2077
1101
|
})
|
|
2078
1102
|
}), isMulti && showUpload && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
2079
1103
|
className: _styles.default['cap-unified-select-upload-container'],
|
|
2080
1104
|
align: "middle",
|
|
2081
|
-
onClick:
|
|
1105
|
+
onClick: onUpload,
|
|
2082
1106
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
2083
1107
|
type: "upload",
|
|
2084
1108
|
size: "s",
|
|
@@ -2086,71 +1110,20 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
2086
1110
|
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2087
1111
|
type: "label14",
|
|
2088
1112
|
className: _styles.default['cap-unified-select-upload-label'],
|
|
2089
|
-
children:
|
|
1113
|
+
children: "Upload"
|
|
2090
1114
|
})]
|
|
2091
|
-
}), isMulti &&
|
|
1115
|
+
}), isMulti && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectAllCheckbox, {
|
|
2092
1116
|
currentItems: currentItems,
|
|
2093
1117
|
tempValue: Array.isArray(tempValue) ? tempValue : undefined,
|
|
2094
1118
|
setTempValue: val => setTempValue(val),
|
|
2095
1119
|
processTreeData: buildTreeMaps
|
|
2096
|
-
}), currentItems.length === 0 ?
|
|
2097
|
-
className: _styles.default['cap-unified-select-loading-container'],
|
|
2098
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2099
|
-
align: "middle",
|
|
2100
|
-
justify: "center",
|
|
2101
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
2102
|
-
size: "small"
|
|
2103
|
-
})
|
|
2104
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2105
|
-
align: "middle",
|
|
2106
|
-
justify: "center",
|
|
2107
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2108
|
-
type: "label14",
|
|
2109
|
-
children: "Loading..."
|
|
2110
|
-
})
|
|
2111
|
-
})]
|
|
2112
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(NoResult, {
|
|
1120
|
+
}), currentItems.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(NoResult, {
|
|
2113
1121
|
noResultCustomText: noResultCustomText,
|
|
2114
1122
|
className: className,
|
|
2115
1123
|
showUpload: showUpload,
|
|
2116
1124
|
options: options,
|
|
2117
1125
|
noResultCustomIcon: noResultCustomIcon
|
|
2118
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.
|
|
2119
|
-
className: _styles.default['cap-unified-select-menu-wrapper'],
|
|
2120
|
-
children: [menu, (isSearching || isResettingData) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2121
|
-
className: _styles.default['cap-unified-select-loading-overlay'],
|
|
2122
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2123
|
-
align: "middle",
|
|
2124
|
-
justify: "center",
|
|
2125
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
2126
|
-
size: "small"
|
|
2127
|
-
})
|
|
2128
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2129
|
-
align: "middle",
|
|
2130
|
-
justify: "center",
|
|
2131
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2132
|
-
type: "label14",
|
|
2133
|
-
children: "Loading..."
|
|
2134
|
-
})
|
|
2135
|
-
})]
|
|
2136
|
-
}), isLoadingOnScroll && onPopupScroll && hasMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2137
|
-
className: _styles.default['cap-unified-select-loading-overlay'],
|
|
2138
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2139
|
-
align: "middle",
|
|
2140
|
-
justify: "center",
|
|
2141
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
2142
|
-
size: "small"
|
|
2143
|
-
})
|
|
2144
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2145
|
-
align: "middle",
|
|
2146
|
-
justify: "center",
|
|
2147
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2148
|
-
type: "label14",
|
|
2149
|
-
children: "Loading..."
|
|
2150
|
-
})
|
|
2151
|
-
})]
|
|
2152
|
-
})]
|
|
2153
|
-
}), currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1126
|
+
}) : menu, currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
2154
1127
|
className: _styles.default['cap-unified-select-confirm-container'],
|
|
2155
1128
|
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
2156
1129
|
className: _styles.default['cap-unified-select-confirm-button-group'],
|
|
@@ -2167,21 +1140,12 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
2167
1140
|
size: "small",
|
|
2168
1141
|
onClick: handleClearAll,
|
|
2169
1142
|
children: clearText
|
|
2170
|
-
}),
|
|
2171
|
-
className: _styles.default['cap-unified-select-
|
|
2172
|
-
|
|
2173
|
-
onClick: handleFooterDownload,
|
|
2174
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
2175
|
-
type: "download",
|
|
2176
|
-
size: "s",
|
|
2177
|
-
className: _styles.default['cap-unified-select-footer-download-icon']
|
|
2178
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
|
|
2179
|
-
className: _styles.default['cap-unified-select-footer-download-label'],
|
|
2180
|
-
children: [selectedLeafCount, " selected"]
|
|
2181
|
-
})]
|
|
1143
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
|
|
1144
|
+
className: _styles.default['cap-unified-select-selected-count'],
|
|
1145
|
+
children: [selectedLeafCount, " selected"]
|
|
2182
1146
|
})]
|
|
2183
1147
|
})
|
|
2184
|
-
}), (type ===
|
|
1148
|
+
}), (type === SELECT_TYPES.SELECT || type === SELECT_TYPES.TREE_SELECT) && allowClear && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
2185
1149
|
className: _styles.default['cap-unified-select-tree-clear-container'],
|
|
2186
1150
|
onClick: handleClearAll,
|
|
2187
1151
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
@@ -2190,60 +1154,17 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
2190
1154
|
})
|
|
2191
1155
|
})]
|
|
2192
1156
|
});
|
|
2193
|
-
}, [customPopupRender, filteredTree, searchText, isMulti, showUpload,
|
|
1157
|
+
}, [customPopupRender, filteredTree, searchText, isMulti, showUpload, onUpload, noResultCustomText, noResultCustomIcon, options, type, tempValue, handleConfirm, handleClearAll, popoverClassName, className, selectedLeafCount, clearText, allowClear]);
|
|
2194
1158
|
const combinedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(containerClassName, _styles.default['cap-unified-tree-select'], {
|
|
2195
1159
|
[_styles.default['cap-unified-tree-select-readonly']]: readOnly
|
|
2196
1160
|
}, className), [containerClassName, className, readOnly]);
|
|
2197
|
-
|
|
2198
|
-
// Handle onChange for single select - detect clear button click and call resetData
|
|
2199
|
-
const handleSingleSelectChange = (0, _react.useCallback)(newValue => {
|
|
2200
|
-
// Mark as interacted if value changed from initial
|
|
2201
|
-
if (newValue !== initialTempValueRef.current) {
|
|
2202
|
-
hasInteractedRef.current = true;
|
|
2203
|
-
}
|
|
2204
|
-
|
|
2205
|
-
// If value is cleared (becomes undefined), call resetData
|
|
2206
|
-
if (newValue === undefined || newValue === null) {
|
|
2207
|
-
if (resetData) {
|
|
2208
|
-
// Store current options before calling resetData to detect when they update
|
|
2209
|
-
prevOptionsBeforeResetRef.current = options;
|
|
2210
|
-
setIsResettingData(true);
|
|
2211
|
-
resetDataCalledRef.current = true;
|
|
2212
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
2213
|
-
resetData();
|
|
2214
|
-
}
|
|
2215
|
-
}
|
|
2216
|
-
onChange == null || onChange(newValue);
|
|
2217
|
-
}, [onChange, resetData, options]);
|
|
2218
|
-
|
|
2219
|
-
// Handle onChange for multi select - detect clear and call resetData
|
|
2220
|
-
const handleMultiSelectChange = (0, _react.useCallback)(newValue => {
|
|
2221
|
-
// Mark as interacted if value changed from initial
|
|
2222
|
-
const initialValue = initialTempValueRef.current;
|
|
2223
|
-
const hasChanged = Array.isArray(newValue) && Array.isArray(initialValue) ? newValue.length !== initialValue.length || !newValue.every(v => initialValue.includes(v)) || !initialValue.every(v => newValue.includes(v)) : newValue !== initialValue;
|
|
2224
|
-
if (hasChanged) {
|
|
2225
|
-
hasInteractedRef.current = true;
|
|
2226
|
-
}
|
|
2227
|
-
// If value is cleared (becomes empty array or undefined), call resetData
|
|
2228
|
-
if (newValue === undefined || newValue === null || Array.isArray(newValue) && newValue.length === 0) {
|
|
2229
|
-
if (resetData) {
|
|
2230
|
-
// Store current options before calling resetData to detect when they update
|
|
2231
|
-
prevOptionsBeforeResetRef.current = options;
|
|
2232
|
-
setIsResettingData(true);
|
|
2233
|
-
resetDataCalledRef.current = true;
|
|
2234
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
2235
|
-
resetData();
|
|
2236
|
-
}
|
|
2237
|
-
}
|
|
2238
|
-
setTempValue(newValue);
|
|
2239
|
-
}, [resetData, options]);
|
|
2240
1161
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
2241
1162
|
className: className,
|
|
2242
1163
|
children: [renderHeader, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.TreeSelect, _extends({
|
|
2243
1164
|
treeData: filteredTree,
|
|
2244
1165
|
value: customPopupRender ? tempValue : value,
|
|
2245
1166
|
treeNodeLabelProp: "label",
|
|
2246
|
-
onChange: isMulti ?
|
|
1167
|
+
onChange: isMulti ? setTempValue : onChange,
|
|
2247
1168
|
placeholder: placeholder,
|
|
2248
1169
|
showSearch: false,
|
|
2249
1170
|
maxTagCount: 0,
|
|
@@ -2265,12 +1186,12 @@ const CapUnifiedSelect = _ref4 => {
|
|
|
2265
1186
|
showCheckedStrategy: _antdV.TreeSelect.SHOW_CHILD,
|
|
2266
1187
|
open: dropdownOpen,
|
|
2267
1188
|
onOpenChange: handleDropdownVisibilityChange,
|
|
2268
|
-
virtual:
|
|
1189
|
+
virtual: true,
|
|
2269
1190
|
popupMatchSelectWidth: false,
|
|
2270
1191
|
disabled: disabled,
|
|
2271
1192
|
filterTreeNode: false,
|
|
2272
|
-
listHeight:
|
|
2273
|
-
listItemHeight:
|
|
1193
|
+
listHeight: 256,
|
|
1194
|
+
listItemHeight: 32,
|
|
2274
1195
|
popupRender: renderCustomDropdown
|
|
2275
1196
|
}, rest)), isError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
2276
1197
|
className: _styles.default['cap-unified-select-status'],
|
|
@@ -2291,7 +1212,7 @@ var _default = exports["default"] = CapUnifiedSelect;
|
|
|
2291
1212
|
exports.__esModule = true;
|
|
2292
1213
|
exports["default"] = void 0;
|
|
2293
1214
|
var _antdV = __webpack_require__(4273);
|
|
2294
|
-
var _classnames = _interopRequireDefault(__webpack_require__(
|
|
1215
|
+
var _classnames = _interopRequireDefault(__webpack_require__(2678));
|
|
2295
1216
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
2296
1217
|
var _styles = _interopRequireDefault(__webpack_require__(7144));
|
|
2297
1218
|
var _jsxRuntime = __webpack_require__(4848);
|
|
@@ -2358,20 +1279,71 @@ var _default = exports["default"] = CapTooltip;
|
|
|
2358
1279
|
|
|
2359
1280
|
exports.__esModule = true;
|
|
2360
1281
|
exports["default"] = void 0;
|
|
2361
|
-
var
|
|
2362
|
-
var _classnames = _interopRequireDefault(__webpack_require__(
|
|
1282
|
+
var _icons = __webpack_require__(4627);
|
|
1283
|
+
var _classnames = _interopRequireDefault(__webpack_require__(2678));
|
|
2363
1284
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
2364
1285
|
var _styles = _interopRequireDefault(__webpack_require__(6426));
|
|
2365
1286
|
var _jsxRuntime = __webpack_require__(4848);
|
|
2366
1287
|
const _excluded = ["type", "size", "style", "className", "disabled", "spin", "rotate", "withBackground", "backgroundProps", "onClick", "textLabel", "component", "svgProps", "allowSvg", "color"],
|
|
2367
1288
|
_excluded2 = ["className"];
|
|
2368
1289
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
2369
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
2370
1290
|
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
2371
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2372
|
-
//
|
|
2373
|
-
const
|
|
2374
|
-
|
|
1291
|
+
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } // Import only commonly used icons directly for better tree-shaking
|
|
1292
|
+
// Explicit icon map for commonly used icons - enables tree-shaking
|
|
1293
|
+
const COMMON_ICONS_MAP = {
|
|
1294
|
+
'up': _icons.UpOutlined,
|
|
1295
|
+
'down': _icons.DownOutlined,
|
|
1296
|
+
'left': _icons.LeftOutlined,
|
|
1297
|
+
'right': _icons.RightOutlined,
|
|
1298
|
+
'search': _icons.SearchOutlined,
|
|
1299
|
+
'close': _icons.CloseOutlined,
|
|
1300
|
+
'check': _icons.CheckOutlined,
|
|
1301
|
+
'delete': _icons.DeleteOutlined,
|
|
1302
|
+
'edit': _icons.EditOutlined,
|
|
1303
|
+
'plus': _icons.PlusOutlined,
|
|
1304
|
+
'add': _icons.PlusOutlined,
|
|
1305
|
+
// alias
|
|
1306
|
+
'minus': _icons.MinusOutlined,
|
|
1307
|
+
'close-circle': _icons.CloseCircleOutlined,
|
|
1308
|
+
'check-circle': _icons.CheckCircleOutlined,
|
|
1309
|
+
'info-circle': _icons.InfoCircleOutlined,
|
|
1310
|
+
'exclamation-circle': _icons.ExclamationCircleOutlined,
|
|
1311
|
+
'warning': _icons.WarningOutlined,
|
|
1312
|
+
'loading': _icons.LoadingOutlined,
|
|
1313
|
+
'eye': _icons.EyeOutlined,
|
|
1314
|
+
'eye-invisible': _icons.EyeInvisibleOutlined,
|
|
1315
|
+
'upload': _icons.UploadOutlined,
|
|
1316
|
+
'download': _icons.DownloadOutlined,
|
|
1317
|
+
'file': _icons.FileOutlined,
|
|
1318
|
+
'folder': _icons.FolderOutlined,
|
|
1319
|
+
'setting': _icons.SettingOutlined,
|
|
1320
|
+
'user': _icons.UserOutlined,
|
|
1321
|
+
'calendar': _icons.CalendarOutlined,
|
|
1322
|
+
'clock-circle': _icons.ClockCircleOutlined,
|
|
1323
|
+
'filter': _icons.FilterOutlined,
|
|
1324
|
+
'sort-ascending': _icons.SortAscendingOutlined,
|
|
1325
|
+
'sort-descending': _icons.SortDescendingOutlined,
|
|
1326
|
+
'menu': _icons.MenuOutlined,
|
|
1327
|
+
'more': _icons.MoreOutlined,
|
|
1328
|
+
'question-circle': _icons.QuestionCircleOutlined,
|
|
1329
|
+
'arrow-left': _icons.ArrowLeftOutlined,
|
|
1330
|
+
'arrow-right': _icons.ArrowRightOutlined,
|
|
1331
|
+
'arrow-up': _icons.ArrowUpOutlined,
|
|
1332
|
+
'arrow-down': _icons.ArrowDownOutlined,
|
|
1333
|
+
'save': _icons.SaveOutlined,
|
|
1334
|
+
'copy': _icons.CopyOutlined,
|
|
1335
|
+
'home': _icons.HomeOutlined,
|
|
1336
|
+
'star': _icons.StarOutlined,
|
|
1337
|
+
'heart': _icons.HeartOutlined,
|
|
1338
|
+
'bell': _icons.BellOutlined,
|
|
1339
|
+
'mail': _icons.MailOutlined,
|
|
1340
|
+
'phone': _icons.PhoneOutlined,
|
|
1341
|
+
'lock': _icons.LockOutlined,
|
|
1342
|
+
'unlock': _icons.UnlockOutlined,
|
|
1343
|
+
'sync': _icons.SyncOutlined,
|
|
1344
|
+
'reload': _icons.ReloadOutlined,
|
|
1345
|
+
'plus-circle': _icons.PlusCircleOutlined,
|
|
1346
|
+
'minus-circle': _icons.MinusCircleOutlined
|
|
2375
1347
|
};
|
|
2376
1348
|
const getSvgIcon = function (type, svgProps) {
|
|
2377
1349
|
if (svgProps === void 0) {
|
|
@@ -2385,18 +1357,17 @@ const getSvgIcon = function (type, svgProps) {
|
|
|
2385
1357
|
};
|
|
2386
1358
|
const getAntIcon = type => {
|
|
2387
1359
|
if (!type) return null;
|
|
2388
|
-
|
|
2389
|
-
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
return iconsRecord[iconName] || iconsRecord[iconNameFilled] || iconsRecord[iconNameTwoTone] || null;
|
|
1360
|
+
|
|
1361
|
+
// First check the common icons map for better tree-shaking
|
|
1362
|
+
const lowerType = type.toLowerCase();
|
|
1363
|
+
if (COMMON_ICONS_MAP[lowerType]) {
|
|
1364
|
+
return COMMON_ICONS_MAP[lowerType];
|
|
1365
|
+
}
|
|
1366
|
+
|
|
1367
|
+
// For uncommon icons, warn in development
|
|
1368
|
+
if (false) // removed by dead control flow
|
|
1369
|
+
{}
|
|
1370
|
+
return null;
|
|
2400
1371
|
};
|
|
2401
1372
|
const CapIcon = _ref => {
|
|
2402
1373
|
let {
|
|
@@ -2769,90 +1740,6 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
2769
1740
|
module.exports = ___CSS_LOADER_EXPORT___;
|
|
2770
1741
|
|
|
2771
1742
|
|
|
2772
|
-
/***/ }),
|
|
2773
|
-
|
|
2774
|
-
/***/ 6942:
|
|
2775
|
-
/***/ ((module, exports) => {
|
|
2776
|
-
|
|
2777
|
-
var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
|
|
2778
|
-
Copyright (c) 2018 Jed Watson.
|
|
2779
|
-
Licensed under the MIT License (MIT), see
|
|
2780
|
-
http://jedwatson.github.io/classnames
|
|
2781
|
-
*/
|
|
2782
|
-
/* global define */
|
|
2783
|
-
|
|
2784
|
-
(function () {
|
|
2785
|
-
'use strict';
|
|
2786
|
-
|
|
2787
|
-
var hasOwn = {}.hasOwnProperty;
|
|
2788
|
-
|
|
2789
|
-
function classNames () {
|
|
2790
|
-
var classes = '';
|
|
2791
|
-
|
|
2792
|
-
for (var i = 0; i < arguments.length; i++) {
|
|
2793
|
-
var arg = arguments[i];
|
|
2794
|
-
if (arg) {
|
|
2795
|
-
classes = appendClass(classes, parseValue(arg));
|
|
2796
|
-
}
|
|
2797
|
-
}
|
|
2798
|
-
|
|
2799
|
-
return classes;
|
|
2800
|
-
}
|
|
2801
|
-
|
|
2802
|
-
function parseValue (arg) {
|
|
2803
|
-
if (typeof arg === 'string' || typeof arg === 'number') {
|
|
2804
|
-
return arg;
|
|
2805
|
-
}
|
|
2806
|
-
|
|
2807
|
-
if (typeof arg !== 'object') {
|
|
2808
|
-
return '';
|
|
2809
|
-
}
|
|
2810
|
-
|
|
2811
|
-
if (Array.isArray(arg)) {
|
|
2812
|
-
return classNames.apply(null, arg);
|
|
2813
|
-
}
|
|
2814
|
-
|
|
2815
|
-
if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
|
|
2816
|
-
return arg.toString();
|
|
2817
|
-
}
|
|
2818
|
-
|
|
2819
|
-
var classes = '';
|
|
2820
|
-
|
|
2821
|
-
for (var key in arg) {
|
|
2822
|
-
if (hasOwn.call(arg, key) && arg[key]) {
|
|
2823
|
-
classes = appendClass(classes, key);
|
|
2824
|
-
}
|
|
2825
|
-
}
|
|
2826
|
-
|
|
2827
|
-
return classes;
|
|
2828
|
-
}
|
|
2829
|
-
|
|
2830
|
-
function appendClass (value, newClass) {
|
|
2831
|
-
if (!newClass) {
|
|
2832
|
-
return value;
|
|
2833
|
-
}
|
|
2834
|
-
|
|
2835
|
-
if (value) {
|
|
2836
|
-
return value + ' ' + newClass;
|
|
2837
|
-
}
|
|
2838
|
-
|
|
2839
|
-
return value + newClass;
|
|
2840
|
-
}
|
|
2841
|
-
|
|
2842
|
-
if ( true && module.exports) {
|
|
2843
|
-
classNames.default = classNames;
|
|
2844
|
-
module.exports = classNames;
|
|
2845
|
-
} else if (true) {
|
|
2846
|
-
// register as 'classnames', consistent with npm package name
|
|
2847
|
-
!(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
|
|
2848
|
-
return classNames;
|
|
2849
|
-
}).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
|
|
2850
|
-
__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
|
|
2851
|
-
} else // removed by dead control flow
|
|
2852
|
-
{}
|
|
2853
|
-
}());
|
|
2854
|
-
|
|
2855
|
-
|
|
2856
1743
|
/***/ }),
|
|
2857
1744
|
|
|
2858
1745
|
/***/ 7144:
|
|
@@ -2921,37 +1808,6 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
2921
1808
|
|
|
2922
1809
|
/***/ }),
|
|
2923
1810
|
|
|
2924
|
-
/***/ 7579:
|
|
2925
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
2926
|
-
|
|
2927
|
-
"use strict";
|
|
2928
|
-
|
|
2929
|
-
|
|
2930
|
-
exports.__esModule = true;
|
|
2931
|
-
exports["default"] = void 0;
|
|
2932
|
-
var _antdV = __webpack_require__(4273);
|
|
2933
|
-
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
2934
|
-
var _jsxRuntime = __webpack_require__(4848);
|
|
2935
|
-
const _excluded = ["className"];
|
|
2936
|
-
/**
|
|
2937
|
-
* CapSpin - Migrated to Ant Design v5
|
|
2938
|
-
*/
|
|
2939
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
2940
|
-
function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
|
|
2941
|
-
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
2942
|
-
const CapSpin = _ref => {
|
|
2943
|
-
let {
|
|
2944
|
-
className
|
|
2945
|
-
} = _ref,
|
|
2946
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
2947
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Spin, _extends({
|
|
2948
|
-
className: className
|
|
2949
|
-
}, rest));
|
|
2950
|
-
};
|
|
2951
|
-
var _default = exports["default"] = CapSpin;
|
|
2952
|
-
|
|
2953
|
-
/***/ }),
|
|
2954
|
-
|
|
2955
1811
|
/***/ 7659:
|
|
2956
1812
|
/***/ ((module) => {
|
|
2957
1813
|
|
|
@@ -3075,7 +1931,7 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
|
|
|
3075
1931
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
|
|
3076
1932
|
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
|
|
3077
1933
|
// Module
|
|
3078
|
-
___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-unified-select-header-wrapper{display:flex;align-items:center}.blaze-ui-cap-unified-select-header-wrapper.blaze-ui-disabled{opacity:.5;cursor:not-allowed}.blaze-ui-cap-unified-select-header-wrapper .blaze-ui-cap-unified-select-header-label{font-family:"Roboto",sans-serif;font-weight:500;font-size:1rem;line-height:1.429rem;letter-spacing:0}.blaze-ui-cap-unified-select-header-byline-text{font-family:"Roboto",sans-serif;font-weight:400;font-size:.857rem;letter-spacing:0;color:#97a0af}.blaze-ui-cap-unified-select-container{text-align:justify;min-width:13.786rem}.blaze-ui-cap-unified-select-container.blaze-ui-disabled{cursor:not-allowed}.blaze-ui-cap-unified-select-container.ant-select-focused .ant-select-selector{border:.071rem solid #091e42 !important}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-more-text{cursor:pointer;color:#091e42;margin-right:.286rem;position:relative}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-suffix-icon{color:#7a869a}.blaze-ui-cap-unified-select-container .blaze-ui-cap-tooltip-with-info-icon{margin-top:.143rem}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select.blaze-ui-cap-unified-tree-select-readonly{pointer-events:none}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select.blaze-ui-cap-unified-tree-select-readonly .blaze-ui-cap-unified-select-more-text{pointer-events:auto}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select .ant-select-tree-treenode{padding-left:.286rem}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly .ant-select-selector{background-color:#fff;border-color:#ebecf0 !important;cursor:default}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly .ant-select-arrow{pointer-events:auto;color:#b3bac5}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:hover .ant-select-selector,.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:active .ant-select-selector,.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:focus .ant-select-selector{border-color:#ebecf0 !important}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-status{color:#ea213a}.blaze-ui-cap-unified-select-container .ant-select-outlined:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector{border-color:#7a869a}.blaze-ui-cap-unified-select-container .ant-select-selector{background-color:#fff !important;border:.071rem solid #7a869a !important;border-radius:.286rem !important}.blaze-ui-cap-unified-select-container .ant-select-selector .ant-select-selection-placeholder{pointer-events:unset;color:#97a0af;display:flex;align-items:center}.blaze-ui-cap-unified-select-container .ant-select-prefix{font-size:1rem;font-weight:400;color:#091e42;line-height:1.429rem}.blaze-ui-cap-unified-select-container .ant-input-affix-wrapper .ant-input-prefix{left:.857rem}.blaze-ui-cap-unified-select-container .ant-select-selector{border-color:#7a869a !important;box-shadow:none !important;outline:0}.blaze-ui-cap-unified-select-container .ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover{background-color:#47af46}.blaze-ui-cap-unified-select-container .ant-select-dropdown{margin-top:-0.571rem !important;border-radius:.286rem;background-color:#fff;box-shadow:0 .286rem .571rem -0.143rem rgba(9,30,66,.15),0 0 .071rem 0 rgba(9,30,66,.1);max-height:25.714rem;overflow:visible}.blaze-ui-cap-unified-select-container .ant-select-outlined.ant-select-multiple .ant-select-selection-wrap .ant-select-selection-item{background:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-container .ant-select-multiple .ant-select-selection-wrap .ant-select-selection-item,.blaze-ui-cap-unified-select-container .ant-select-selection-wrap .ant-select-selection-item{background:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-container .ant-select-multiple .ant-select-selection-wrap{align-self:center}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-search-container{border-bottom:.071rem solid #ebecf0 !important;line-height:2.857rem !important}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-search-container .blaze-ui-cap-unified-select-search-icon{color:#b3bac5}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-select-all-container{padding:.643rem 1.071rem;display:flex;align-items:center;border-bottom:.071rem solid #ebecf0;height:2.857rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-select-all-container .blaze-ui-cap-unified-select-select-all-checkbox{display:contents !important}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container{cursor:pointer;display:flex;align-items:center;border-bottom:.071rem solid #ebecf0;height:2.857rem;padding-left:1.143rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container .blaze-ui-cap-unified-select-upload-icon{color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container .blaze-ui-cap-unified-select-upload-label{margin-left:.857rem;color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container{display:flex;align-items:center;height:3.429rem;padding:.5rem;border-top:.071rem solid #ebecf0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group{display:flex;padding-left:.571rem;align-items:center;width:100%}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button{background-color:#47af46;height:2.286rem;width:6.714rem;color:#fff}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button:hover{background-color:#1f9a1d}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button:disabled{background-color:#a1d8a0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-cancel-button{border:rgba(0,0,0,0);box-shadow:none;width:5.714rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-selected-count{display:flex;margin-left:auto;font-size:.857rem;font-weight:400;line-height:1.143rem;color:#5e6c84}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container{display:flex;justify-content:center;align-items:center;height:2.857rem;border-top:.071rem solid #ebecf0;cursor:pointer;color:#091e42}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container:hover{background-color:#ebecf0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container .blaze-ui-cap-unified-select-tree-clear-label{font-size:1rem;font-weight:400}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-footer-download-container{cursor:pointer;display:flex;align-items:center;margin-left:auto;padding-right:1.143rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-footer-download-container:hover{opacity:.8}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-footer-download-container .blaze-ui-cap-unified-select-footer-download-icon{color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-footer-download-container .blaze-ui-cap-unified-select-footer-download-label{margin-left:.857rem;color:#2466ea;font-family:Roboto,sans-serif;font-weight:400;font-style:normal;font-size:.857rem;line-height:1.143rem;letter-spacing:0;text-align:right}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-no-result{display:flex;flex-direction:column;align-items:center;justify-content:center;height:14.286rem;color:#97a0af;font-size:1rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-no-result .blaze-ui-cap-unified-select-no-result-text{font-weight:500}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-loading-container{display:flex;flex-direction:column;align-items:center;justify-content:center;height:14.286rem;width:100%;gap:.571rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-loading-more{display:flex;align-items:center;justify-content:center;padding:.857rem;border-top:.071rem solid #ebecf0;color:#97a0af}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-menu-wrapper{position:relative;width:100%}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-loading-overlay{position:absolute;top:0;left:0;right:0;bottom:0;display:flex;flex-direction:column;align-items:center;justify-content:center;background-color:rgba(255,255,255,.8);z-index:10;gap:.571rem;color:#97a0af}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix{display:flex;justify-content:start;align-items:center;width:100%;height:100%;line-height:1.5;vertical-align:middle;flex:1}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-label{display:flex;align-items:center;flex-shrink:1;min-width:0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-end{display:flex;align-items:center;gap:.571rem;flex-shrink:0;margin-left:auto}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-suffix{display:flex;align-items:center;padding:0 .571rem;max-height:1.429rem;white-space:nowrap}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon{margin-top:.357rem;color:#42526e}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon .blaze-ui-cap-icon{color:#42526e}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu{margin-top:0 !important}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu .ant-select-dropdown-menu-item{padding:.571rem 1.714rem !important;height:unset !important;font-size:1rem !important}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu-item-disabled{color:rgba(0,0,0,.25) !important;cursor:not-allowed !important;line-height:1.428rem !important;font-size:1rem !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper{background-color:rgba(0,0,0,0);height:100%;display:flex;align-items:center}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper:hover{background-color:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode{height:2.857rem;margin-bottom:0;display:flex;align-items:center;width:100%}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode:hover{background-color:#fffbe6}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-selected{background-color:#f4f5f7 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled{cursor:not-allowed !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled .blaze-ui-cap-unified-select-option-label{color:#b3bac5}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled .blaze-ui-cap-icon{color:#b3bac5 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected{background-color:#f4f5f7}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-leaf .ant-select-tree-switcher-noop{display:none}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox{display:flex;align-items:center;justify-content:center;line-height:1;vertical-align:middle}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox .ant-select-tree-checkbox-inner{height:1.286rem;width:1.286rem;border:.143rem solid #b3bac5;border-radius:.286rem;display:flex;align-items:center;justify-content:center}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:hover{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner{background-color:#47af46 !important;border-color:#47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner::after{content:"";position:absolute;top:50%;left:50%;width:.714rem;height:.143rem;background-color:#fff;transform:translate(-50%, -50%);border-radius:.071rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper{border-radius:0;padding-left:.214rem;width:100%;display:flex;align-items:center}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper .ant-select-tree-title{width:100%;display:flex}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-indent{margin-left:.857rem;display:flex;align-items:center}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher{display:flex;align-items:center;justify-content:center}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher:not(.ant-select-tree-switcher-noop):hover:before{background-color:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher .ant-select-tree-switcher-icon{font-size:.857rem;margin-top:1.286rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-list-holder-inner{width:fit-content !important;min-width:100%}.blaze-ui-cap-unified-select-popup .ant-tree-select:hover .ant-select-selector{border-color:#7a869a}.blaze-ui-cap-unified-select-popup .ant-tree-select-focused .ant-select-selector,.blaze-ui-cap-unified-select-popup .ant-tree-select-open .ant-select-selector{border-color:#7a869a;box-shadow:none;outline:none}.blaze-ui-cap-unified-select-popup .ant-checkbox-inner{height:1.286rem;width:1.286rem;border:.143rem solid #b3bac5;border-radius:.286rem}.blaze-ui-cap-unified-select-popup .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover .ant-checkbox-checked:not(.ant-checkbox-disabled) .ant-checkbox-inner{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#47af46 !important;border-color:#47af46 !important}.blaze-ui-cap-unified-select-popup .ant-checkbox-indeterminate .ant-checkbox-inner::after{content:"";position:absolute;top:50%;left:50%;width:.714rem;height:.143rem;background-color:#fff;transform:translate(-50%, -50%);border-radius:.071rem}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper{padding-left:.571rem;border:none;box-shadow:none;border-radius:0;border-bottom:.071rem solid rgba(0,0,0,0);transition:border-color .2s ease}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper:hover{border-bottom:.071rem solid #7a869a !important;box-shadow:none}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper:focus-within{border-bottom:.071rem solid #091e42 !important;box-shadow:none;outline:none}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper .ant-input{border:none !important;box-shadow:none !important}`, ""]);
|
|
1934
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-unified-select-header-wrapper{display:flex;align-items:center}.blaze-ui-cap-unified-select-header-wrapper.blaze-ui-disabled{opacity:.5;cursor:not-allowed}.blaze-ui-cap-unified-select-header-wrapper .blaze-ui-cap-unified-select-header-label{font-family:"Roboto",sans-serif;font-weight:500;font-size:1rem;line-height:1.429rem;letter-spacing:0}.blaze-ui-cap-unified-select-header-byline-text{font-family:"Roboto",sans-serif;font-weight:400;font-size:.857rem;letter-spacing:0;color:#97a0af}.blaze-ui-cap-unified-select-container{text-align:justify;min-width:13.786rem}.blaze-ui-cap-unified-select-container.blaze-ui-disabled{cursor:not-allowed}.blaze-ui-cap-unified-select-container.ant-select-focused .ant-select-selector{border:1px solid #091e42 !important}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-more-text{cursor:pointer;color:#091e42;margin-right:.286rem;position:relative}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-suffix-icon{color:#7a869a}.blaze-ui-cap-unified-select-container .blaze-ui-cap-tooltip-with-info-icon{margin-top:.143rem}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select.blaze-ui-cap-unified-tree-select-readonly{pointer-events:none}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select.blaze-ui-cap-unified-tree-select-readonly .blaze-ui-cap-unified-select-more-text{pointer-events:auto}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select .ant-select-tree-treenode{padding-left:.286rem}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly .ant-select-selector{background-color:#fff;border-color:#ebecf0 !important;cursor:default}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly .ant-select-arrow{pointer-events:auto;color:#b3bac5}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:hover .ant-select-selector,.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:active .ant-select-selector,.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:focus .ant-select-selector{border-color:#ebecf0 !important}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-status{color:#ea213a}.blaze-ui-cap-unified-select-container .ant-select-outlined:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector{border-color:#7a869a}.blaze-ui-cap-unified-select-container .ant-select-selector{background-color:#fff !important;border:.071rem solid #7a869a !important;border-radius:.286rem !important}.blaze-ui-cap-unified-select-container .ant-select-selector .ant-select-selection-placeholder{pointer-events:unset;color:#97a0af;display:flex;align-items:center}.blaze-ui-cap-unified-select-container .ant-select-prefix{font-size:1rem;font-weight:400;color:#091e42;line-height:1.429rem}.blaze-ui-cap-unified-select-container .ant-input-affix-wrapper .ant-input-prefix{left:.857rem}.blaze-ui-cap-unified-select-container .ant-select-selector{border-color:#7a869a !important;box-shadow:none !important;outline:0}.blaze-ui-cap-unified-select-container .ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover{background-color:#47af46}.blaze-ui-cap-unified-select-container .ant-select-dropdown{margin-top:-0.571rem !important;border-radius:.286rem;background-color:#fff;box-shadow:0 .286rem .571rem -0.143rem rgba(9,30,66,.15),0 0 .071rem 0 rgba(9,30,66,.1);max-height:25.714rem;overflow:visible}.blaze-ui-cap-unified-select-container .ant-select-outlined.ant-select-multiple .ant-select-selection-wrap .ant-select-selection-item{background:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-container .ant-select-multiple .ant-select-selection-wrap .ant-select-selection-item,.blaze-ui-cap-unified-select-container .ant-select-selection-wrap .ant-select-selection-item{background:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-container .ant-select-multiple .ant-select-selection-wrap{align-self:center}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-search-container{border-bottom:.071rem solid #ebecf0 !important;line-height:2.857rem !important}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-search-container .blaze-ui-cap-unified-select-search-icon{color:#b3bac5}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-select-all-container{padding:.643rem 1.071rem;cursor:pointer;display:flex;align-items:center;border-bottom:.071rem solid #ebecf0;height:2.857rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-select-all-container .blaze-ui-cap-unified-select-select-all-checkbox{display:contents !important}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container{cursor:pointer;display:flex;align-items:center;border-bottom:.071rem solid #ebecf0;height:2.857rem;padding-left:1.143rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container .blaze-ui-cap-unified-select-upload-icon{color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container .blaze-ui-cap-unified-select-upload-label{margin-left:.857rem;color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container{display:flex;align-items:center;height:3.429rem;padding:.5rem;border-top:.071rem solid #ebecf0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group{display:flex;padding-left:.571rem;align-items:center}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button{background-color:#47af46;height:2.286rem;width:6.714rem;color:#fff}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button:hover{background-color:#1f9a1d}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button:disabled{background-color:#a1d8a0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-cancel-button{border:rgba(0,0,0,0);box-shadow:none;width:5.714rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-selected-count{display:flex;margin-left:auto;font-size:.857rem;font-weight:400;line-height:1.143rem;color:#5e6c84}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container{display:flex;justify-content:center;align-items:center;height:2.857rem;border-top:.071rem solid #ebecf0;cursor:pointer;color:#091e42}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container:hover{background-color:#ebecf0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container .blaze-ui-cap-unified-select-tree-clear-label{font-size:1rem;font-weight:400}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-no-result{display:flex;flex-direction:column;align-items:center;justify-content:center;height:14.286rem;color:#97a0af;font-size:1rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-no-result .blaze-ui-cap-unified-select-no-result-text{font-weight:500}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix{display:flex;justify-content:flex-start;align-items:center;width:100%;height:100%}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-label{flex:1}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-suffix{display:flex;align-items:center;padding:0 .571rem;max-height:1.429rem;white-space:nowrap;margin-left:.571rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info{margin-left:auto}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon{margin-top:.357rem;color:#42526e}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon .blaze-ui-cap-icon{color:#42526e}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu{margin-top:0 !important}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu .ant-select-dropdown-menu-item{padding:.571rem 1.714rem !important;height:unset !important;font-size:1rem !important}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu-item-disabled{color:rgba(0,0,0,.25) !important;cursor:not-allowed !important;line-height:1.428rem !important;font-size:1rem !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper{background-color:rgba(0,0,0,0);height:100%}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper:hover{background-color:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-active .ant-select-tree-node-content-wrapper{background-color:rgba(0,0,0,0) !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode{height:2.857rem;margin-bottom:0}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode:hover{background-color:#fffbe6}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-selected{background-color:#f4f5f7 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled{cursor:not-allowed !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled .blaze-ui-cap-unified-select-option-label{color:#b3bac5}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled .blaze-ui-cap-icon{color:#b3bac5 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected{background-color:#f4f5f7}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-leaf .ant-select-tree-switcher-noop{display:none}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox .ant-select-tree-checkbox-inner{height:1.286rem;width:1.286rem;border:.143rem solid #b3bac5;border-radius:.286rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:hover{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner{background-color:#47af46 !important;border-color:#47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner::after{content:"";position:absolute;top:50%;left:50%;width:.714rem;height:.143rem;background-color:#fff;transform:translate(-50%, -50%);border-radius:.071rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper{border-radius:0;padding-left:.214rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-indent{margin-left:.857rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher:not(.ant-select-tree-switcher-noop):hover:before{background-color:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher .ant-select-tree-switcher-icon{font-size:.857rem;margin-top:1.286rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-list-holder-inner{width:fit-content !important;min-width:100%}.blaze-ui-cap-unified-select-popup .ant-tree-select:hover .ant-select-selector{border-color:#7a869a}.blaze-ui-cap-unified-select-popup .ant-tree-select-focused .ant-select-selector,.blaze-ui-cap-unified-select-popup .ant-tree-select-open .ant-select-selector{border-color:#7a869a;box-shadow:none;outline:none}.blaze-ui-cap-unified-select-popup .ant-checkbox-inner{height:1.286rem;width:1.286rem;border:.143rem solid #b3bac5;border-radius:.286rem}.blaze-ui-cap-unified-select-popup .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover .ant-checkbox-checked:not(.ant-checkbox-disabled) .ant-checkbox-inner{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#47af46 !important;border-color:#47af46 !important}.blaze-ui-cap-unified-select-popup .ant-checkbox-indeterminate .ant-checkbox-inner::after{content:"";position:absolute;top:50%;left:50%;width:.714rem;height:.143rem;background-color:#fff;transform:translate(-50%, -50%);border-radius:.071rem}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper{padding-left:.571rem;border:none;box-shadow:none;border-radius:0;border-bottom:.071rem solid rgba(0,0,0,0);transition:border-color .2s ease}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper:hover{border-bottom:.071rem solid #7a869a !important;box-shadow:none}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper:focus-within{border-bottom:.071rem solid #091e42 !important;box-shadow:none;outline:none}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper .ant-input{border:none !important;box-shadow:none !important}`, ""]);
|
|
3079
1935
|
// Exports
|
|
3080
1936
|
___CSS_LOADER_EXPORT___.locals = {
|
|
3081
1937
|
"cap-unified-select-header-wrapper": `blaze-ui-cap-unified-select-header-wrapper`,
|
|
@@ -3104,18 +1960,10 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
3104
1960
|
"cap-unified-select-selected-count": `blaze-ui-cap-unified-select-selected-count`,
|
|
3105
1961
|
"cap-unified-select-tree-clear-container": `blaze-ui-cap-unified-select-tree-clear-container`,
|
|
3106
1962
|
"cap-unified-select-tree-clear-label": `blaze-ui-cap-unified-select-tree-clear-label`,
|
|
3107
|
-
"cap-unified-select-footer-download-container": `blaze-ui-cap-unified-select-footer-download-container`,
|
|
3108
|
-
"cap-unified-select-footer-download-icon": `blaze-ui-cap-unified-select-footer-download-icon`,
|
|
3109
|
-
"cap-unified-select-footer-download-label": `blaze-ui-cap-unified-select-footer-download-label`,
|
|
3110
1963
|
"cap-unified-select-no-result": `blaze-ui-cap-unified-select-no-result`,
|
|
3111
1964
|
"cap-unified-select-no-result-text": `blaze-ui-cap-unified-select-no-result-text`,
|
|
3112
|
-
"cap-unified-select-loading-container": `blaze-ui-cap-unified-select-loading-container`,
|
|
3113
|
-
"cap-unified-select-loading-more": `blaze-ui-cap-unified-select-loading-more`,
|
|
3114
|
-
"cap-unified-select-menu-wrapper": `blaze-ui-cap-unified-select-menu-wrapper`,
|
|
3115
|
-
"cap-unified-select-loading-overlay": `blaze-ui-cap-unified-select-loading-overlay`,
|
|
3116
1965
|
"cap-unified-select-option-with-suffix": `blaze-ui-cap-unified-select-option-with-suffix`,
|
|
3117
1966
|
"cap-unified-select-option-label": `blaze-ui-cap-unified-select-option-label`,
|
|
3118
|
-
"cap-unified-select-option-end": `blaze-ui-cap-unified-select-option-end`,
|
|
3119
1967
|
"cap-unified-select-option-suffix": `blaze-ui-cap-unified-select-option-suffix`,
|
|
3120
1968
|
"cap-tooltip-with-info": `blaze-ui-cap-tooltip-with-info`,
|
|
3121
1969
|
"cap-icon": `blaze-ui-cap-icon`
|
|
@@ -3123,73 +1971,6 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
3123
1971
|
module.exports = ___CSS_LOADER_EXPORT___;
|
|
3124
1972
|
|
|
3125
1973
|
|
|
3126
|
-
/***/ }),
|
|
3127
|
-
|
|
3128
|
-
/***/ 9788:
|
|
3129
|
-
/***/ ((__unused_webpack_module, exports) => {
|
|
3130
|
-
|
|
3131
|
-
"use strict";
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
exports.__esModule = true;
|
|
3135
|
-
exports.TIMEOUTS = exports.SELECT_TYPES = exports.DEFAULTS = void 0;
|
|
3136
|
-
/**
|
|
3137
|
-
* Select type constants for CapUnifiedSelect component
|
|
3138
|
-
*/
|
|
3139
|
-
const SELECT_TYPES = exports.SELECT_TYPES = {
|
|
3140
|
-
SELECT: 'select',
|
|
3141
|
-
MULTI_SELECT: 'multiSelect',
|
|
3142
|
-
TREE_SELECT: 'treeSelect',
|
|
3143
|
-
MULTI_TREE_SELECT: 'multiTreeSelect'
|
|
3144
|
-
};
|
|
3145
|
-
/**
|
|
3146
|
-
* Timeout constants (in milliseconds)
|
|
3147
|
-
*/
|
|
3148
|
-
const TIMEOUTS = exports.TIMEOUTS = {
|
|
3149
|
-
/** Default search debounce timeout */
|
|
3150
|
-
DEFAULT_SEARCH_DEBOUNCE: 300,
|
|
3151
|
-
/** Delay for state updates after search */
|
|
3152
|
-
SEARCH_STATE_UPDATE_DELAY: 100,
|
|
3153
|
-
/** Minimum time since search was cleared to consider data ready */
|
|
3154
|
-
SEARCH_CLEARED_TIMEOUT: 200,
|
|
3155
|
-
/** Buffer time added to debounce for cleared search */
|
|
3156
|
-
SEARCH_CLEARED_BUFFER: 300,
|
|
3157
|
-
/** Buffer time added to debounce for regular search */
|
|
3158
|
-
SEARCH_REGULAR_BUFFER: 500,
|
|
3159
|
-
/** Brief delay to show loading indicator for static search */
|
|
3160
|
-
STATIC_SEARCH_DELAY: 150,
|
|
3161
|
-
/** Timeout for resetData fallback (1 second) */
|
|
3162
|
-
RESET_DATA_TIMEOUT: 1000,
|
|
3163
|
-
/** Minimum time since resetData was called to consider data ready */
|
|
3164
|
-
RESET_DATA_MIN_TIME: 300,
|
|
3165
|
-
/** Maximum time since resetData was called to consider data ready */
|
|
3166
|
-
RESET_DATA_MAX_TIME: 2000,
|
|
3167
|
-
/** Fallback timeout for scroll loading (10 seconds) */
|
|
3168
|
-
SCROLL_LOADING_TIMEOUT: 10000,
|
|
3169
|
-
/** Delay before setting up scroll container listener */
|
|
3170
|
-
SCROLL_CONTAINER_DELAY: 100
|
|
3171
|
-
};
|
|
3172
|
-
|
|
3173
|
-
/**
|
|
3174
|
-
* Default values for component props
|
|
3175
|
-
*/
|
|
3176
|
-
const DEFAULTS = exports.DEFAULTS = {
|
|
3177
|
-
/** Default placeholder text */
|
|
3178
|
-
PLACEHOLDER: 'Select an option',
|
|
3179
|
-
/** Default upload button label */
|
|
3180
|
-
UPLOAD_LABEL: 'Upload',
|
|
3181
|
-
/** Default clear button text */
|
|
3182
|
-
CLEAR_TEXT: 'Clear',
|
|
3183
|
-
/** Default no results message */
|
|
3184
|
-
NO_RESULT_TEXT: 'No results found',
|
|
3185
|
-
/** Default no results icon */
|
|
3186
|
-
NO_RESULT_ICON: 'warning',
|
|
3187
|
-
/** Default virtual row height in pixels */
|
|
3188
|
-
VIRTUAL_ROW_HEIGHT: 32,
|
|
3189
|
-
/** Default list height in pixels */
|
|
3190
|
-
LIST_HEIGHT: 256
|
|
3191
|
-
};
|
|
3192
|
-
|
|
3193
1974
|
/***/ })
|
|
3194
1975
|
|
|
3195
1976
|
/******/ });
|