@capillarytech/blaze-ui 1.0.3-alpha.15 → 1.0.3-alpha.19
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/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts +53 -0
- package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/CustomDropdown.d.ts +46 -0
- package/dist/CapUnifiedSelect/CustomDropdown.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/DropdownHeader.d.ts +10 -0
- package/dist/CapUnifiedSelect/DropdownHeader.d.ts.map +1 -0
- package/{CapUnifiedSelect → dist/CapUnifiedSelect}/constants.d.ts +7 -7
- package/dist/CapUnifiedSelect/constants.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/enhanceOptions.d.ts +8 -0
- package/dist/CapUnifiedSelect/enhanceOptions.d.ts.map +1 -0
- package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.js +1558 -1208
- package/dist/CapUnifiedSelect/index.js.map +1 -0
- package/{CapUnifiedSelect → dist/CapUnifiedSelect}/types.d.ts +1 -0
- package/dist/CapUnifiedSelect/types.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/useCapUnifiedSelect.d.ts +48 -0
- package/dist/CapUnifiedSelect/useCapUnifiedSelect.d.ts.map +1 -0
- package/dist/CapUnifiedSelect/useInfiniteScroll.d.ts +27 -0
- package/dist/CapUnifiedSelect/useInfiniteScroll.d.ts.map +1 -0
- package/{CapUnifiedSelect → dist/CapUnifiedSelect}/utils.d.ts +11 -0
- package/{CapUnifiedSelect → dist/CapUnifiedSelect}/utils.d.ts.map +1 -1
- package/{index.js → dist/index.js} +1722 -1371
- package/dist/index.js.map +1 -0
- package/{styled → dist/styled}/variables.d.ts +1 -0
- package/{styled → dist/styled}/variables.d.ts.map +1 -1
- package/{styled → dist/styled}/variables.scss +1 -0
- package/package.json +199 -101
- package/CapUnifiedSelect/CapUnifiedSelect.d.ts +0 -133
- package/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +0 -1
- package/CapUnifiedSelect/constants.d.ts.map +0 -1
- package/CapUnifiedSelect/index.js.map +0 -1
- package/CapUnifiedSelect/types.d.ts.map +0 -1
- package/index.js.map +0 -1
- /package/{CapAlert → dist/CapAlert}/CapAlert.d.ts +0 -0
- /package/{CapAlert → dist/CapAlert}/CapAlert.d.ts.map +0 -0
- /package/{CapAlert → dist/CapAlert}/CapAlert.test.d.ts +0 -0
- /package/{CapAlert → dist/CapAlert}/CapAlert.test.d.ts.map +0 -0
- /package/{CapAlert → dist/CapAlert}/index.d.ts +0 -0
- /package/{CapAlert → dist/CapAlert}/index.d.ts.map +0 -0
- /package/{CapAlert → dist/CapAlert}/index.js +0 -0
- /package/{CapAlert → dist/CapAlert}/index.js.map +0 -0
- /package/{CapButton → dist/CapButton}/CapButton.d.ts +0 -0
- /package/{CapButton → dist/CapButton}/CapButton.d.ts.map +0 -0
- /package/{CapButton → dist/CapButton}/CapButton.test.d.ts +0 -0
- /package/{CapButton → dist/CapButton}/CapButton.test.d.ts.map +0 -0
- /package/{CapButton → dist/CapButton}/index.d.ts +0 -0
- /package/{CapButton → dist/CapButton}/index.d.ts.map +0 -0
- /package/{CapButton → dist/CapButton}/index.js +0 -0
- /package/{CapButton → dist/CapButton}/index.js.map +0 -0
- /package/{CapCard → dist/CapCard}/CapCard.d.ts +0 -0
- /package/{CapCard → dist/CapCard}/CapCard.d.ts.map +0 -0
- /package/{CapCard → dist/CapCard}/CapCard.test.d.ts +0 -0
- /package/{CapCard → dist/CapCard}/CapCard.test.d.ts.map +0 -0
- /package/{CapCard → dist/CapCard}/index.d.ts +0 -0
- /package/{CapCard → dist/CapCard}/index.d.ts.map +0 -0
- /package/{CapCard → dist/CapCard}/index.js +0 -0
- /package/{CapCard → dist/CapCard}/index.js.map +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.d.ts +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.d.ts.map +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.test.d.ts +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.test.d.ts.map +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/index.d.ts +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/index.d.ts.map +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/index.js +0 -0
- /package/{CapCheckbox → dist/CapCheckbox}/index.js.map +0 -0
- /package/{CapColumn → dist/CapColumn}/CapColumn.d.ts +0 -0
- /package/{CapColumn → dist/CapColumn}/CapColumn.d.ts.map +0 -0
- /package/{CapColumn → dist/CapColumn}/CapColumn.test.d.ts +0 -0
- /package/{CapColumn → dist/CapColumn}/CapColumn.test.d.ts.map +0 -0
- /package/{CapColumn → dist/CapColumn}/index.d.ts +0 -0
- /package/{CapColumn → dist/CapColumn}/index.d.ts.map +0 -0
- /package/{CapColumn → dist/CapColumn}/index.js +0 -0
- /package/{CapColumn → dist/CapColumn}/index.js.map +0 -0
- /package/{CapDivider → dist/CapDivider}/CapDivider.d.ts +0 -0
- /package/{CapDivider → dist/CapDivider}/CapDivider.d.ts.map +0 -0
- /package/{CapDivider → dist/CapDivider}/CapDivider.test.d.ts +0 -0
- /package/{CapDivider → dist/CapDivider}/CapDivider.test.d.ts.map +0 -0
- /package/{CapDivider → dist/CapDivider}/index.d.ts +0 -0
- /package/{CapDivider → dist/CapDivider}/index.d.ts.map +0 -0
- /package/{CapDivider → dist/CapDivider}/index.js +0 -0
- /package/{CapDivider → dist/CapDivider}/index.js.map +0 -0
- /package/{CapDropdown → dist/CapDropdown}/CapDropdown.d.ts +0 -0
- /package/{CapDropdown → dist/CapDropdown}/CapDropdown.d.ts.map +0 -0
- /package/{CapDropdown → dist/CapDropdown}/CapDropdown.test.d.ts +0 -0
- /package/{CapDropdown → dist/CapDropdown}/CapDropdown.test.d.ts.map +0 -0
- /package/{CapDropdown → dist/CapDropdown}/index.d.ts +0 -0
- /package/{CapDropdown → dist/CapDropdown}/index.d.ts.map +0 -0
- /package/{CapDropdown → dist/CapDropdown}/index.js +0 -0
- /package/{CapDropdown → dist/CapDropdown}/index.js.map +0 -0
- /package/{CapForm → dist/CapForm}/CapForm.d.ts +0 -0
- /package/{CapForm → dist/CapForm}/CapForm.d.ts.map +0 -0
- /package/{CapForm → dist/CapForm}/CapForm.test.d.ts +0 -0
- /package/{CapForm → dist/CapForm}/CapForm.test.d.ts.map +0 -0
- /package/{CapForm → dist/CapForm}/index.d.ts +0 -0
- /package/{CapForm → dist/CapForm}/index.d.ts.map +0 -0
- /package/{CapForm → dist/CapForm}/index.js +0 -0
- /package/{CapForm → dist/CapForm}/index.js.map +0 -0
- /package/{CapFormItem → dist/CapFormItem}/CapFormItem.d.ts +0 -0
- /package/{CapFormItem → dist/CapFormItem}/CapFormItem.d.ts.map +0 -0
- /package/{CapFormItem → dist/CapFormItem}/CapFormItem.test.d.ts +0 -0
- /package/{CapFormItem → dist/CapFormItem}/CapFormItem.test.d.ts.map +0 -0
- /package/{CapFormItem → dist/CapFormItem}/index.d.ts +0 -0
- /package/{CapFormItem → dist/CapFormItem}/index.d.ts.map +0 -0
- /package/{CapFormItem → dist/CapFormItem}/index.js +0 -0
- /package/{CapFormItem → dist/CapFormItem}/index.js.map +0 -0
- /package/{CapIcon → dist/CapIcon}/CapIcon.d.ts +0 -0
- /package/{CapIcon → dist/CapIcon}/CapIcon.d.ts.map +0 -0
- /package/{CapIcon → dist/CapIcon}/CapIcon.test.d.ts +0 -0
- /package/{CapIcon → dist/CapIcon}/CapIcon.test.d.ts.map +0 -0
- /package/{CapIcon → dist/CapIcon}/index.d.ts +0 -0
- /package/{CapIcon → dist/CapIcon}/index.d.ts.map +0 -0
- /package/{CapIcon → dist/CapIcon}/index.js +0 -0
- /package/{CapIcon → dist/CapIcon}/index.js.map +0 -0
- /package/{CapInput → dist/CapInput}/CapInput.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/CapInput.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/CapInput.test.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/CapInput.test.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/Number.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/Number.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/Number.test.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/Number.test.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/Search.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/Search.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/Search.test.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/Search.test.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/TextArea.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/TextArea.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/TextArea.test.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/TextArea.test.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/index.d.ts +0 -0
- /package/{CapInput → dist/CapInput}/index.d.ts.map +0 -0
- /package/{CapInput → dist/CapInput}/index.js +0 -0
- /package/{CapInput → dist/CapInput}/index.js.map +0 -0
- /package/{CapLabel → dist/CapLabel}/CapLabel.d.ts +0 -0
- /package/{CapLabel → dist/CapLabel}/CapLabel.d.ts.map +0 -0
- /package/{CapLabel → dist/CapLabel}/CapLabel.test.d.ts +0 -0
- /package/{CapLabel → dist/CapLabel}/CapLabel.test.d.ts.map +0 -0
- /package/{CapLabel → dist/CapLabel}/index.d.ts +0 -0
- /package/{CapLabel → dist/CapLabel}/index.d.ts.map +0 -0
- /package/{CapLabel → dist/CapLabel}/index.js +0 -0
- /package/{CapLabel → dist/CapLabel}/index.js.map +0 -0
- /package/{CapMenu → dist/CapMenu}/CapMenu.d.ts +0 -0
- /package/{CapMenu → dist/CapMenu}/CapMenu.d.ts.map +0 -0
- /package/{CapMenu → dist/CapMenu}/CapMenu.test.d.ts +0 -0
- /package/{CapMenu → dist/CapMenu}/CapMenu.test.d.ts.map +0 -0
- /package/{CapMenu → dist/CapMenu}/index.d.ts +0 -0
- /package/{CapMenu → dist/CapMenu}/index.d.ts.map +0 -0
- /package/{CapMenu → dist/CapMenu}/index.js +0 -0
- /package/{CapMenu → dist/CapMenu}/index.js.map +0 -0
- /package/{CapRadio → dist/CapRadio}/CapRadio.d.ts +0 -0
- /package/{CapRadio → dist/CapRadio}/CapRadio.d.ts.map +0 -0
- /package/{CapRadio → dist/CapRadio}/CapRadio.test.d.ts +0 -0
- /package/{CapRadio → dist/CapRadio}/CapRadio.test.d.ts.map +0 -0
- /package/{CapRadio → dist/CapRadio}/index.d.ts +0 -0
- /package/{CapRadio → dist/CapRadio}/index.d.ts.map +0 -0
- /package/{CapRadio → dist/CapRadio}/index.js +0 -0
- /package/{CapRadio → dist/CapRadio}/index.js.map +0 -0
- /package/{CapRow → dist/CapRow}/CapRow.d.ts +0 -0
- /package/{CapRow → dist/CapRow}/CapRow.d.ts.map +0 -0
- /package/{CapRow → dist/CapRow}/CapRow.test.d.ts +0 -0
- /package/{CapRow → dist/CapRow}/CapRow.test.d.ts.map +0 -0
- /package/{CapRow → dist/CapRow}/index.d.ts +0 -0
- /package/{CapRow → dist/CapRow}/index.d.ts.map +0 -0
- /package/{CapRow → dist/CapRow}/index.js +0 -0
- /package/{CapRow → dist/CapRow}/index.js.map +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.d.ts +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.d.ts.map +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.test.d.ts +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.test.d.ts.map +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/index.d.ts +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/index.d.ts.map +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/index.js +0 -0
- /package/{CapSkeleton → dist/CapSkeleton}/index.js.map +0 -0
- /package/{CapSpin → dist/CapSpin}/CapSpin.d.ts +0 -0
- /package/{CapSpin → dist/CapSpin}/CapSpin.d.ts.map +0 -0
- /package/{CapSpin → dist/CapSpin}/CapSpin.test.d.ts +0 -0
- /package/{CapSpin → dist/CapSpin}/CapSpin.test.d.ts.map +0 -0
- /package/{CapSpin → dist/CapSpin}/index.d.ts +0 -0
- /package/{CapSpin → dist/CapSpin}/index.d.ts.map +0 -0
- /package/{CapSpin → dist/CapSpin}/index.js +0 -0
- /package/{CapSpin → dist/CapSpin}/index.js.map +0 -0
- /package/{CapSwitch → dist/CapSwitch}/CapSwitch.d.ts +0 -0
- /package/{CapSwitch → dist/CapSwitch}/CapSwitch.d.ts.map +0 -0
- /package/{CapSwitch → dist/CapSwitch}/CapSwitch.test.d.ts +0 -0
- /package/{CapSwitch → dist/CapSwitch}/CapSwitch.test.d.ts.map +0 -0
- /package/{CapSwitch → dist/CapSwitch}/index.d.ts +0 -0
- /package/{CapSwitch → dist/CapSwitch}/index.d.ts.map +0 -0
- /package/{CapSwitch → dist/CapSwitch}/index.js +0 -0
- /package/{CapSwitch → dist/CapSwitch}/index.js.map +0 -0
- /package/{CapTab → dist/CapTab}/CapTab.d.ts +0 -0
- /package/{CapTab → dist/CapTab}/CapTab.d.ts.map +0 -0
- /package/{CapTab → dist/CapTab}/CapTab.test.d.ts +0 -0
- /package/{CapTab → dist/CapTab}/CapTab.test.d.ts.map +0 -0
- /package/{CapTab → dist/CapTab}/index.d.ts +0 -0
- /package/{CapTab → dist/CapTab}/index.d.ts.map +0 -0
- /package/{CapTab → dist/CapTab}/index.js +0 -0
- /package/{CapTab → dist/CapTab}/index.js.map +0 -0
- /package/{CapTable → dist/CapTable}/CapTable.d.ts +0 -0
- /package/{CapTable → dist/CapTable}/CapTable.d.ts.map +0 -0
- /package/{CapTable → dist/CapTable}/CapTable.test.d.ts +0 -0
- /package/{CapTable → dist/CapTable}/CapTable.test.d.ts.map +0 -0
- /package/{CapTable → dist/CapTable}/index.d.ts +0 -0
- /package/{CapTable → dist/CapTable}/index.d.ts.map +0 -0
- /package/{CapTable → dist/CapTable}/index.js +0 -0
- /package/{CapTable → dist/CapTable}/index.js.map +0 -0
- /package/{CapTable → dist/CapTable}/loadable.d.ts +0 -0
- /package/{CapTable → dist/CapTable}/loadable.d.ts.map +0 -0
- /package/{CapTable → dist/CapTable}/loadable.test.d.ts +0 -0
- /package/{CapTable → dist/CapTable}/loadable.test.d.ts.map +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.d.ts +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.d.ts.map +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.test.d.ts +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.test.d.ts.map +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/index.d.ts +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/index.d.ts.map +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/index.js +0 -0
- /package/{CapTestSelect → dist/CapTestSelect}/index.js.map +0 -0
- /package/{CapTooltip → dist/CapTooltip}/CapTooltip.d.ts +0 -0
- /package/{CapTooltip → dist/CapTooltip}/CapTooltip.d.ts.map +0 -0
- /package/{CapTooltip → dist/CapTooltip}/CapTooltip.test.d.ts +0 -0
- /package/{CapTooltip → dist/CapTooltip}/CapTooltip.test.d.ts.map +0 -0
- /package/{CapTooltip → dist/CapTooltip}/index.d.ts +0 -0
- /package/{CapTooltip → dist/CapTooltip}/index.d.ts.map +0 -0
- /package/{CapTooltip → dist/CapTooltip}/index.js +0 -0
- /package/{CapTooltip → dist/CapTooltip}/index.js.map +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.d.ts +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.d.ts.map +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.test.d.ts +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.test.d.ts.map +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.d.ts +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.d.ts.map +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.js +0 -0
- /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.js.map +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/CapUnifiedSelect.test.d.ts +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/CapUnifiedSelect.test.d.ts.map +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/components.d.ts +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/components.d.ts.map +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.d.ts +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.d.ts.map +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/messages.d.ts +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/messages.d.ts.map +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/testData.d.ts +0 -0
- /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/testData.d.ts.map +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.d.ts +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.d.ts.map +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.js +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.js.map +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.test.d.ts +0 -0
- /package/{LocaleHoc → dist/LocaleHoc}/index.test.d.ts.map +0 -0
- /package/{assets → dist/assets}/upload.svg +0 -0
- /package/{index.d.ts → dist/index.d.ts} +0 -0
- /package/{index.d.ts.map → dist/index.d.ts.map} +0 -0
- /package/{utils → dist/utils}/fonts.d.ts +0 -0
- /package/{utils → dist/utils}/fonts.d.ts.map +0 -0
- /package/{utils → dist/utils}/fonts.test.d.ts +0 -0
- /package/{utils → dist/utils}/fonts.test.d.ts.map +0 -0
- /package/{utils → dist/utils}/index.d.ts +0 -0
- /package/{utils → dist/utils}/index.d.ts.map +0 -0
- /package/{utils → dist/utils}/index.js +0 -0
- /package/{utils → dist/utils}/index.js.map +0 -0
- /package/{utils → dist/utils}/styles.d.ts +0 -0
- /package/{utils → dist/utils}/styles.d.ts.map +0 -0
|
@@ -793,326 +793,893 @@ exports.SelectAllCheckbox = SelectAllCheckbox;
|
|
|
793
793
|
|
|
794
794
|
/***/ }),
|
|
795
795
|
|
|
796
|
-
/***/
|
|
797
|
-
/***/ ((module) => {
|
|
798
|
-
|
|
799
|
-
"use strict";
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
/* istanbul ignore next */
|
|
803
|
-
function insertStyleElement(options) {
|
|
804
|
-
var element = document.createElement("style");
|
|
805
|
-
options.setAttributes(element, options.attributes);
|
|
806
|
-
options.insert(element, options.options);
|
|
807
|
-
return element;
|
|
808
|
-
}
|
|
809
|
-
module.exports = insertStyleElement;
|
|
810
|
-
|
|
811
|
-
/***/ }),
|
|
812
|
-
|
|
813
|
-
/***/ 628:
|
|
814
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
815
|
-
|
|
816
|
-
"use strict";
|
|
817
|
-
__webpack_require__.r(__webpack_exports__);
|
|
818
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
819
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
820
|
-
/* harmony export */ });
|
|
821
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
|
|
822
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
823
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
|
|
824
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
825
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
|
|
826
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
827
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
|
|
828
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
829
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
|
|
830
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
831
|
-
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5573);
|
|
832
|
-
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
|
|
833
|
-
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
834
|
-
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
|
|
835
|
-
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
var options = {};
|
|
848
|
-
|
|
849
|
-
;
|
|
850
|
-
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
851
|
-
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
852
|
-
options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
853
|
-
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
854
|
-
|
|
855
|
-
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()) && (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) ? (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) : undefined);
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
/***/ }),
|
|
864
|
-
|
|
865
|
-
/***/ 845:
|
|
866
|
-
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
867
|
-
|
|
868
|
-
"use strict";
|
|
869
|
-
__webpack_require__.r(__webpack_exports__);
|
|
870
|
-
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
871
|
-
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
872
|
-
/* harmony export */ });
|
|
873
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
|
|
874
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
875
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
|
|
876
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
877
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
|
|
878
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
879
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
|
|
880
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
881
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
|
|
882
|
-
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
883
|
-
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3366);
|
|
884
|
-
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
|
|
885
|
-
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
886
|
-
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
|
|
887
|
-
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
var options = {};
|
|
900
|
-
|
|
901
|
-
;
|
|
902
|
-
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
903
|
-
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
904
|
-
options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
905
|
-
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
906
|
-
|
|
907
|
-
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()) && (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) ? (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) : undefined);
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
/***/ }),
|
|
916
|
-
|
|
917
|
-
/***/ 895:
|
|
796
|
+
/***/ 480:
|
|
918
797
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
919
798
|
|
|
920
799
|
"use strict";
|
|
921
800
|
|
|
922
801
|
|
|
923
802
|
exports.__esModule = true;
|
|
924
|
-
exports
|
|
925
|
-
var
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
932
|
-
|
|
803
|
+
exports.useCapUnifiedSelect = void 0;
|
|
804
|
+
var _react = __webpack_require__(9206);
|
|
805
|
+
var _constants = __webpack_require__(9788);
|
|
806
|
+
var _useInfiniteScroll = __webpack_require__(9103);
|
|
807
|
+
var _utils = __webpack_require__(8052);
|
|
808
|
+
const useCapUnifiedSelect = _ref => {
|
|
809
|
+
let {
|
|
810
|
+
type: _type,
|
|
811
|
+
options,
|
|
812
|
+
value,
|
|
813
|
+
onChange,
|
|
814
|
+
staticValue,
|
|
815
|
+
onSearch,
|
|
816
|
+
searchDebounce,
|
|
817
|
+
searchBasedOn,
|
|
818
|
+
onConfirm,
|
|
819
|
+
resetSearch,
|
|
820
|
+
resetData,
|
|
821
|
+
fetchMissingOptions,
|
|
822
|
+
onPopupScroll,
|
|
823
|
+
hasMore,
|
|
824
|
+
customPopupRender,
|
|
825
|
+
isMulti,
|
|
826
|
+
disabled = false
|
|
827
|
+
} = _ref;
|
|
828
|
+
const [searchText, setSearchText] = (0, _react.useState)('');
|
|
829
|
+
const [tempValue, setTempValue] = (0, _react.useState)(value);
|
|
830
|
+
const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
|
|
831
|
+
const [isSearching, setIsSearching] = (0, _react.useState)(false);
|
|
832
|
+
const [isResettingData, setIsResettingData] = (0, _react.useState)(false);
|
|
833
|
+
const [orderedOptions, setOrderedOptions] = (0, _react.useState)(null);
|
|
834
|
+
const searchTimeoutRef = (0, _react.useRef)(null);
|
|
835
|
+
const optionsRef = (0, _react.useRef)(options);
|
|
836
|
+
const selectedItemsCacheRef = (0, _react.useRef)(new Map());
|
|
837
|
+
const lastSearchQueryRef = (0, _react.useRef)('');
|
|
838
|
+
const searchClearedTimeRef = (0, _react.useRef)(null);
|
|
839
|
+
const prevOptionsRef = (0, _react.useRef)(options);
|
|
840
|
+
const prevOptionsBeforeResetRef = (0, _react.useRef)(options);
|
|
841
|
+
const initialSortDoneRef = (0, _react.useRef)(false);
|
|
842
|
+
const hasInteractedRef = (0, _react.useRef)(false);
|
|
843
|
+
const initialTempValueRef = (0, _react.useRef)(value);
|
|
844
|
+
const resetDataCalledRef = (0, _react.useRef)(false);
|
|
845
|
+
const resetDataCalledTimeRef = (0, _react.useRef)(null);
|
|
846
|
+
const fetchMissingOptionsCalledRef = (0, _react.useRef)(false);
|
|
847
|
+
const lastMissingValuesRef = (0, _react.useRef)('');
|
|
933
848
|
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
849
|
+
// Infinite scroll hook
|
|
850
|
+
const {
|
|
851
|
+
isLoadingOnScroll,
|
|
852
|
+
resetScrollState,
|
|
853
|
+
scrollTriggerOptionsCountRef
|
|
854
|
+
} = (0, _useInfiniteScroll.useInfiniteScroll)({
|
|
855
|
+
onPopupScroll,
|
|
856
|
+
hasMore,
|
|
857
|
+
options,
|
|
858
|
+
dropdownOpen,
|
|
859
|
+
optionsRef,
|
|
860
|
+
hasInteractedRef
|
|
861
|
+
});
|
|
862
|
+
(0, _react.useEffect)(() => {
|
|
863
|
+
if (!fetchMissingOptions) {
|
|
864
|
+
return;
|
|
865
|
+
}
|
|
866
|
+
if (options.length === 0) {
|
|
867
|
+
return;
|
|
868
|
+
}
|
|
869
|
+
const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
|
|
870
|
+
if (hasActiveSearch) {
|
|
871
|
+
return;
|
|
872
|
+
}
|
|
873
|
+
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
874
|
+
if (selectedValues.length === 0) {
|
|
875
|
+
fetchMissingOptionsCalledRef.current = false;
|
|
876
|
+
lastMissingValuesRef.current = '';
|
|
877
|
+
return;
|
|
878
|
+
}
|
|
879
|
+
const missingValues = (0, _utils.findMissingValues)(selectedValues, options);
|
|
880
|
+
if (missingValues.length === 0) {
|
|
881
|
+
fetchMissingOptionsCalledRef.current = false;
|
|
882
|
+
lastMissingValuesRef.current = '';
|
|
883
|
+
return;
|
|
884
|
+
}
|
|
885
|
+
const missingValuesKey = [...missingValues].sort().join(',');
|
|
886
|
+
if (!fetchMissingOptionsCalledRef.current || lastMissingValuesRef.current !== missingValuesKey) {
|
|
887
|
+
fetchMissingOptionsCalledRef.current = true;
|
|
888
|
+
lastMissingValuesRef.current = missingValuesKey;
|
|
889
|
+
fetchMissingOptions([...missingValues]);
|
|
890
|
+
}
|
|
891
|
+
}, [value, options, fetchMissingOptions, staticValue]);
|
|
892
|
+
(0, _react.useEffect)(() => {
|
|
893
|
+
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;
|
|
894
|
+
if (!isEqual) {
|
|
895
|
+
setTempValue(value);
|
|
896
|
+
setOrderedOptions(null);
|
|
897
|
+
}
|
|
898
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
899
|
+
}, [value]);
|
|
900
|
+
(0, _react.useEffect)(() => {
|
|
901
|
+
const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
902
|
+
const findAndCacheOption = (opts, val) => {
|
|
903
|
+
for (const opt of opts) {
|
|
904
|
+
if (opt.value === val) {
|
|
905
|
+
selectedItemsCacheRef.current.set(val, opt);
|
|
906
|
+
return true;
|
|
907
|
+
}
|
|
908
|
+
if (opt.children && opt.children.length > 0) {
|
|
909
|
+
if (findAndCacheOption(opt.children, val)) {
|
|
910
|
+
return true;
|
|
911
|
+
}
|
|
912
|
+
}
|
|
913
|
+
}
|
|
914
|
+
return false;
|
|
915
|
+
};
|
|
916
|
+
currentSelected.forEach(val => {
|
|
917
|
+
if (!selectedItemsCacheRef.current.has(val)) {
|
|
918
|
+
findAndCacheOption(options, val);
|
|
919
|
+
}
|
|
920
|
+
});
|
|
921
|
+
const selectedSet = new Set(currentSelected);
|
|
922
|
+
selectedItemsCacheRef.current.forEach((_, value) => {
|
|
923
|
+
if (!selectedSet.has(value)) {
|
|
924
|
+
selectedItemsCacheRef.current.delete(value);
|
|
925
|
+
}
|
|
926
|
+
});
|
|
927
|
+
}, [tempValue, options]);
|
|
928
|
+
(0, _react.useEffect)(() => {
|
|
929
|
+
if (orderedOptions) {
|
|
930
|
+
const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
931
|
+
const allSelectedStillExist = currentSelected.every(val => (0, _utils.findValueInOptions)(options, val));
|
|
932
|
+
if (!allSelectedStillExist) {
|
|
933
|
+
setOrderedOptions(null);
|
|
934
|
+
}
|
|
935
|
+
}
|
|
936
|
+
}, [options, orderedOptions, tempValue]);
|
|
937
|
+
const debounceTimeout = searchDebounce != null ? searchDebounce : _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE;
|
|
954
938
|
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
939
|
+
// Cleanup timeouts on unmount
|
|
940
|
+
(0, _react.useEffect)(() => {
|
|
941
|
+
return () => {
|
|
942
|
+
if (searchTimeoutRef.current) {
|
|
943
|
+
clearTimeout(searchTimeoutRef.current);
|
|
944
|
+
}
|
|
945
|
+
};
|
|
946
|
+
}, []);
|
|
947
|
+
(0, _react.useEffect)(() => {
|
|
948
|
+
const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
|
|
949
|
+
if (staticValue || !isSearching || !hasSearchQuery) {
|
|
950
|
+
prevOptionsRef.current = options;
|
|
951
|
+
return;
|
|
952
|
+
}
|
|
953
|
+
const optionsChanged = prevOptionsRef.current !== options || prevOptionsRef.current.length !== options.length;
|
|
954
|
+
const searchCleared = lastSearchQueryRef.current === '';
|
|
955
|
+
const timeSinceCleared = searchClearedTimeRef.current ? Date.now() - searchClearedTimeRef.current : Infinity;
|
|
956
|
+
const hasOptionsData = options.length > 0;
|
|
957
|
+
const clearedSearchReady = searchCleared && hasOptionsData && timeSinceCleared > _constants.TIMEOUTS.SEARCH_CLEARED_TIMEOUT;
|
|
958
|
+
if (optionsChanged || clearedSearchReady) {
|
|
959
|
+
const timeoutId = setTimeout(() => {
|
|
960
|
+
setIsSearching(false);
|
|
961
|
+
prevOptionsRef.current = options;
|
|
962
|
+
if (searchCleared) {
|
|
963
|
+
searchClearedTimeRef.current = null;
|
|
964
|
+
}
|
|
965
|
+
}, _constants.TIMEOUTS.SEARCH_STATE_UPDATE_DELAY);
|
|
966
|
+
return () => clearTimeout(timeoutId);
|
|
967
|
+
}
|
|
968
|
+
prevOptionsRef.current = options;
|
|
969
|
+
}, [options, staticValue, isSearching]);
|
|
970
|
+
(0, _react.useEffect)(() => {
|
|
971
|
+
const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
|
|
972
|
+
if (!isSearching || staticValue || !hasSearchQuery) {
|
|
973
|
+
return;
|
|
974
|
+
}
|
|
975
|
+
const searchCleared = lastSearchQueryRef.current === '';
|
|
976
|
+
const timeoutDuration = searchCleared ? debounceTimeout + _constants.TIMEOUTS.SEARCH_CLEARED_BUFFER : debounceTimeout + _constants.TIMEOUTS.SEARCH_REGULAR_BUFFER;
|
|
977
|
+
const fallbackTimeout = setTimeout(() => {
|
|
978
|
+
setIsSearching(false);
|
|
979
|
+
searchClearedTimeRef.current = null;
|
|
980
|
+
}, timeoutDuration);
|
|
981
|
+
return () => clearTimeout(fallbackTimeout);
|
|
982
|
+
}, [isSearching, staticValue, debounceTimeout, options.length]);
|
|
983
|
+
(0, _react.useEffect)(() => {
|
|
984
|
+
if (!isResettingData) {
|
|
985
|
+
prevOptionsBeforeResetRef.current = options;
|
|
986
|
+
resetDataCalledTimeRef.current = null;
|
|
987
|
+
return;
|
|
988
|
+
}
|
|
989
|
+
const prevOptions = prevOptionsBeforeResetRef.current;
|
|
990
|
+
const currentOptions = options;
|
|
991
|
+
const optionsChanged = prevOptions !== currentOptions || prevOptions.length !== currentOptions.length || prevOptions.length === currentOptions.length && prevOptions.length > 0 && prevOptions.some((prevOpt, idx) => {
|
|
992
|
+
const currentOpt = currentOptions[idx];
|
|
993
|
+
return !currentOpt || prevOpt.value !== currentOpt.value || prevOpt.label !== currentOpt.label;
|
|
994
|
+
});
|
|
995
|
+
const timeSinceReset = resetDataCalledTimeRef.current ? Date.now() - resetDataCalledTimeRef.current : Infinity;
|
|
996
|
+
const hasDataAfterTimeout = currentOptions.length > 0 && timeSinceReset > _constants.TIMEOUTS.RESET_DATA_MIN_TIME && timeSinceReset < _constants.TIMEOUTS.RESET_DATA_MAX_TIME;
|
|
997
|
+
if (optionsChanged || hasDataAfterTimeout) {
|
|
998
|
+
setIsResettingData(false);
|
|
999
|
+
prevOptionsBeforeResetRef.current = currentOptions;
|
|
1000
|
+
resetDataCalledTimeRef.current = null;
|
|
1001
|
+
}
|
|
1002
|
+
}, [options, isResettingData]);
|
|
1003
|
+
(0, _react.useEffect)(() => {
|
|
1004
|
+
if (!isResettingData) {
|
|
1005
|
+
return;
|
|
1006
|
+
}
|
|
1007
|
+
const fallbackTimeout = setTimeout(() => {
|
|
1008
|
+
setIsResettingData(false);
|
|
1009
|
+
prevOptionsBeforeResetRef.current = options;
|
|
1010
|
+
resetDataCalledTimeRef.current = null;
|
|
1011
|
+
}, _constants.TIMEOUTS.RESET_DATA_TIMEOUT);
|
|
1012
|
+
return () => clearTimeout(fallbackTimeout);
|
|
1013
|
+
}, [isResettingData, options]);
|
|
964
1014
|
|
|
965
|
-
|
|
1015
|
+
/**
|
|
1016
|
+
* Unified helper function to call resetData with proper state management.
|
|
1017
|
+
* This centralizes all resetData logic to avoid duplication and ensure consistency.
|
|
1018
|
+
*
|
|
1019
|
+
* @param shouldReset - Whether to actually call resetData (based on conditions)
|
|
1020
|
+
*/
|
|
1021
|
+
const callResetData = (0, _react.useCallback)(function (shouldReset) {
|
|
1022
|
+
if (shouldReset === void 0) {
|
|
1023
|
+
shouldReset = true;
|
|
1024
|
+
}
|
|
1025
|
+
if (!resetData || !shouldReset || options.length === 0) {
|
|
1026
|
+
return;
|
|
1027
|
+
}
|
|
1028
|
+
prevOptionsBeforeResetRef.current = options;
|
|
1029
|
+
setIsResettingData(true);
|
|
1030
|
+
resetDataCalledRef.current = true;
|
|
1031
|
+
resetDataCalledTimeRef.current = Date.now();
|
|
1032
|
+
resetData();
|
|
1033
|
+
}, [resetData, options]);
|
|
1034
|
+
const handleSearch = (0, _react.useCallback)(query => {
|
|
1035
|
+
if (searchTimeoutRef.current) {
|
|
1036
|
+
clearTimeout(searchTimeoutRef.current);
|
|
1037
|
+
}
|
|
1038
|
+
const trimmedQuery = query.trim();
|
|
1039
|
+
const wasSearching = lastSearchQueryRef.current !== '';
|
|
1040
|
+
const isNowCleared = trimmedQuery === '';
|
|
1041
|
+
if (wasSearching && isNowCleared) {
|
|
1042
|
+
searchClearedTimeRef.current = Date.now();
|
|
1043
|
+
} else if (!isNowCleared) {
|
|
1044
|
+
searchClearedTimeRef.current = null;
|
|
1045
|
+
}
|
|
1046
|
+
lastSearchQueryRef.current = trimmedQuery;
|
|
1047
|
+
if (trimmedQuery.length > 0 || lastSearchQueryRef.current.length > 0) {
|
|
1048
|
+
hasInteractedRef.current = true;
|
|
1049
|
+
}
|
|
966
1050
|
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1051
|
+
// Reset data when search is cleared (search term length < 1)
|
|
1052
|
+
// This handles requirement: "when search term is length less than 1 that is no search needed"
|
|
1053
|
+
// and "when click on X in searched term then we are resetting the data to the initial page"
|
|
1054
|
+
if (isNowCleared && wasSearching && !staticValue) {
|
|
1055
|
+
callResetData();
|
|
1056
|
+
}
|
|
1057
|
+
if (!staticValue && onSearch) {
|
|
1058
|
+
setIsSearching(true);
|
|
1059
|
+
searchTimeoutRef.current = setTimeout(() => {
|
|
1060
|
+
onSearch(trimmedQuery);
|
|
1061
|
+
}, debounceTimeout);
|
|
1062
|
+
} else if (!trimmedQuery) {
|
|
1063
|
+
setIsSearching(false);
|
|
1064
|
+
} else {
|
|
1065
|
+
setIsSearching(true);
|
|
1066
|
+
searchTimeoutRef.current = setTimeout(() => {
|
|
1067
|
+
setIsSearching(false);
|
|
1068
|
+
}, _constants.TIMEOUTS.STATIC_SEARCH_DELAY);
|
|
1069
|
+
}
|
|
1070
|
+
}, [onSearch, staticValue, debounceTimeout, callResetData]);
|
|
1071
|
+
const prevOptionsCountBeforeFetchMissingRef = (0, _react.useRef)(options.length);
|
|
1072
|
+
const prevOptionsBeforeFetchMissingRef = (0, _react.useRef)(options);
|
|
1073
|
+
(0, _react.useEffect)(() => {
|
|
1074
|
+
if (!orderedOptions || !onPopupScroll) {
|
|
1075
|
+
return;
|
|
1076
|
+
}
|
|
1077
|
+
const currentOptions = options;
|
|
1078
|
+
const optionsCountIncreased = currentOptions.length > scrollTriggerOptionsCountRef.current;
|
|
1079
|
+
if (optionsCountIncreased && scrollTriggerOptionsCountRef.current > 0) {
|
|
1080
|
+
const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1081
|
+
if (selectedValues.length > 0) {
|
|
1082
|
+
const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
|
|
1083
|
+
setOrderedOptions(reordered);
|
|
1084
|
+
scrollTriggerOptionsCountRef.current = currentOptions.length;
|
|
1085
|
+
}
|
|
1086
|
+
}
|
|
1087
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
1088
|
+
}, [options, orderedOptions, onPopupScroll, tempValue]);
|
|
1089
|
+
(0, _react.useEffect)(() => {
|
|
1090
|
+
if (!fetchMissingOptions) {
|
|
1091
|
+
prevOptionsCountBeforeFetchMissingRef.current = options.length;
|
|
1092
|
+
prevOptionsBeforeFetchMissingRef.current = options;
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
|
|
1096
|
+
if (hasActiveSearch) {
|
|
1097
|
+
return;
|
|
1098
|
+
}
|
|
1099
|
+
const currentOptions = options;
|
|
1100
|
+
const currentSelectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
1101
|
+
const tempSelectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1102
|
+
const selectedValues = tempSelectedValues.length > 0 ? tempSelectedValues : currentSelectedValues;
|
|
1103
|
+
if (selectedValues.length === 0) {
|
|
1104
|
+
prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
|
|
1105
|
+
prevOptionsBeforeFetchMissingRef.current = currentOptions;
|
|
1106
|
+
return;
|
|
1107
|
+
}
|
|
1108
|
+
const prevOptions = prevOptionsBeforeFetchMissingRef.current;
|
|
1109
|
+
const optionsCountIncreased = currentOptions.length > prevOptionsCountBeforeFetchMissingRef.current;
|
|
1110
|
+
const optionsChanged = prevOptions !== currentOptions || optionsCountIncreased;
|
|
1111
|
+
const hasNewlyFetchedSelectedItems = (() => {
|
|
1112
|
+
if (selectedValues.length === 0 || !optionsChanged) {
|
|
1113
|
+
return false;
|
|
1114
|
+
}
|
|
1115
|
+
const previouslyMissingValues = selectedValues.filter(val => !(0, _utils.findValueInOptions)(prevOptions, val));
|
|
1116
|
+
if (previouslyMissingValues.length === 0) {
|
|
1117
|
+
return false;
|
|
1118
|
+
}
|
|
1119
|
+
const nowPresentValues = previouslyMissingValues.filter(val => (0, _utils.findValueInOptions)(currentOptions, val));
|
|
1120
|
+
return nowPresentValues.length > 0;
|
|
1121
|
+
})();
|
|
1122
|
+
if (optionsChanged && hasNewlyFetchedSelectedItems) {
|
|
1123
|
+
const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
|
|
1124
|
+
setOrderedOptions(reordered);
|
|
1125
|
+
}
|
|
1126
|
+
prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
|
|
1127
|
+
prevOptionsBeforeFetchMissingRef.current = currentOptions;
|
|
1128
|
+
}, [options, value, tempValue, fetchMissingOptions, staticValue]);
|
|
1129
|
+
(0, _react.useEffect)(() => {
|
|
1130
|
+
if (initialSortDoneRef.current || !(options != null && options.length)) {
|
|
1131
|
+
return;
|
|
1132
|
+
}
|
|
1133
|
+
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
1134
|
+
if (selectedValues.length === 0) {
|
|
1135
|
+
initialSortDoneRef.current = true;
|
|
1136
|
+
return;
|
|
1137
|
+
}
|
|
1138
|
+
const hasSelectedInOptions = selectedValues.some(val => (0, _utils.findValueInOptions)(options, val));
|
|
1139
|
+
if (hasSelectedInOptions) {
|
|
1140
|
+
const reordered = (0, _utils.reorderOptionsBySelection)(options, selectedValues);
|
|
1141
|
+
setOrderedOptions(reordered);
|
|
1142
|
+
}
|
|
1143
|
+
initialSortDoneRef.current = true;
|
|
1144
|
+
}, [options, value]);
|
|
972
1145
|
|
|
973
|
-
|
|
1146
|
+
// Data source computation (raw, without React component enhancement)
|
|
1147
|
+
const dataSource = (0, _react.useMemo)(() => {
|
|
1148
|
+
return (0, _utils.prepareDataSource)(options, orderedOptions, searchText, value, staticValue, selectedItemsCacheRef.current);
|
|
1149
|
+
}, [options, orderedOptions, searchText, value, staticValue]);
|
|
974
1150
|
|
|
1151
|
+
// Filtered tree
|
|
1152
|
+
const filteredTree = (0, _react.useMemo)(() => {
|
|
1153
|
+
const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
1154
|
+
return (0, _utils.filterTreeData)(dataSource, searchText.trim(), searchBasedOn, selectedValues.length > 0 ? selectedValues : undefined);
|
|
1155
|
+
}, [dataSource, searchText, searchBasedOn, tempValue]);
|
|
975
1156
|
|
|
1157
|
+
// Tree maps and selected count
|
|
1158
|
+
const treeMaps = (0, _react.useMemo)(() => (0, _utils.buildTreeMaps)(options), [options]);
|
|
1159
|
+
const selectedLeafCount = (0, _react.useMemo)(() => (0, _utils.countSelectedLeaves)(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
|
|
1160
|
+
const displayValue = dropdownOpen ? tempValue : value;
|
|
1161
|
+
const handleConfirm = (0, _react.useCallback)(() => {
|
|
1162
|
+
hasInteractedRef.current = true;
|
|
1163
|
+
const optionsToReorder = options;
|
|
1164
|
+
if (isMulti && Array.isArray(tempValue) && tempValue.length > 0) {
|
|
1165
|
+
const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, tempValue);
|
|
1166
|
+
setOrderedOptions(reordered);
|
|
1167
|
+
} else if (!isMulti && tempValue && !Array.isArray(tempValue)) {
|
|
1168
|
+
const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, [tempValue]);
|
|
1169
|
+
setOrderedOptions(reordered);
|
|
1170
|
+
} else {
|
|
1171
|
+
setOrderedOptions(null);
|
|
1172
|
+
}
|
|
1173
|
+
onChange == null || onChange(tempValue);
|
|
1174
|
+
setDropdownOpen(false);
|
|
1175
|
+
setIsSearching(false);
|
|
976
1176
|
|
|
1177
|
+
// Check if there was an active search before clearing it
|
|
1178
|
+
const hadActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
|
|
977
1179
|
|
|
978
|
-
|
|
1180
|
+
// Clear search-related state and timeouts (same as X button behavior)
|
|
1181
|
+
if (resetSearch) {
|
|
1182
|
+
setSearchText('');
|
|
1183
|
+
if (hadActiveSearch) {
|
|
1184
|
+
searchClearedTimeRef.current = Date.now();
|
|
1185
|
+
} else {
|
|
1186
|
+
searchClearedTimeRef.current = null;
|
|
1187
|
+
}
|
|
1188
|
+
lastSearchQueryRef.current = '';
|
|
1189
|
+
}
|
|
979
1190
|
|
|
1191
|
+
// Clear any pending search timeouts
|
|
1192
|
+
if (searchTimeoutRef.current) {
|
|
1193
|
+
clearTimeout(searchTimeoutRef.current);
|
|
1194
|
+
searchTimeoutRef.current = null;
|
|
1195
|
+
}
|
|
980
1196
|
|
|
981
|
-
|
|
1197
|
+
// If there was an active search, trigger onSearch('') to reset data (same as X button)
|
|
1198
|
+
// This ensures the parent component resets the options back to initial state
|
|
1199
|
+
if (hadActiveSearch && !staticValue && onSearch) {
|
|
1200
|
+
onSearch('');
|
|
1201
|
+
}
|
|
982
1202
|
|
|
983
|
-
|
|
984
|
-
|
|
1203
|
+
// Call resetData if there was an active search that we're resetting
|
|
1204
|
+
// This handles requirement: "when user click confirm & clear button"
|
|
1205
|
+
// Reset data back to initial state after a search + confirm
|
|
1206
|
+
callResetData(hadActiveSearch || options.length > 0);
|
|
1207
|
+
onConfirm == null || onConfirm(tempValue);
|
|
1208
|
+
}, [onChange, onConfirm, tempValue, resetSearch, isMulti, options, callResetData, staticValue, onSearch]);
|
|
1209
|
+
const handleClearAll = (0, _react.useCallback)(() => {
|
|
1210
|
+
const cleared = isMulti ? [] : undefined;
|
|
1211
|
+
setSearchText('');
|
|
1212
|
+
setIsSearching(false);
|
|
1213
|
+
lastSearchQueryRef.current = '';
|
|
1214
|
+
searchClearedTimeRef.current = null;
|
|
1215
|
+
if (searchTimeoutRef.current) {
|
|
1216
|
+
clearTimeout(searchTimeoutRef.current);
|
|
1217
|
+
searchTimeoutRef.current = null;
|
|
1218
|
+
}
|
|
1219
|
+
resetScrollState();
|
|
1220
|
+
setOrderedOptions(null);
|
|
1221
|
+
initialSortDoneRef.current = false;
|
|
1222
|
+
hasInteractedRef.current = false;
|
|
1223
|
+
resetDataCalledRef.current = false;
|
|
1224
|
+
fetchMissingOptionsCalledRef.current = false;
|
|
1225
|
+
lastMissingValuesRef.current = '';
|
|
1226
|
+
setTempValue(cleared);
|
|
1227
|
+
onChange == null || onChange(cleared);
|
|
1228
|
+
setDropdownOpen(false);
|
|
985
1229
|
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1230
|
+
// Call resetData when user clicks clear button
|
|
1231
|
+
// This handles requirement: "when user click confirm & clear button"
|
|
1232
|
+
callResetData();
|
|
1233
|
+
}, [isMulti, onChange, callResetData, resetScrollState]);
|
|
1234
|
+
const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
|
|
1235
|
+
if (open) {
|
|
1236
|
+
initialTempValueRef.current = value;
|
|
1237
|
+
hasInteractedRef.current = false;
|
|
1238
|
+
resetDataCalledRef.current = false;
|
|
1239
|
+
fetchMissingOptionsCalledRef.current = false;
|
|
1240
|
+
lastMissingValuesRef.current = '';
|
|
1241
|
+
if (searchTimeoutRef.current) {
|
|
1242
|
+
clearTimeout(searchTimeoutRef.current);
|
|
1243
|
+
searchTimeoutRef.current = null;
|
|
1244
|
+
}
|
|
1245
|
+
setIsSearching(false);
|
|
1246
|
+
searchClearedTimeRef.current = null;
|
|
1247
|
+
resetScrollState();
|
|
1248
|
+
if (isResettingData) {
|
|
1249
|
+
setIsResettingData(false);
|
|
1250
|
+
prevOptionsBeforeResetRef.current = options;
|
|
1251
|
+
resetDataCalledTimeRef.current = null;
|
|
1252
|
+
}
|
|
1253
|
+
} else {
|
|
1254
|
+
if (!customPopupRender) {
|
|
1255
|
+
onChange == null || onChange(tempValue);
|
|
1256
|
+
} else {
|
|
1257
|
+
setTempValue(value);
|
|
1258
|
+
}
|
|
1259
|
+
if (resetSearch) {
|
|
1260
|
+
setSearchText('');
|
|
1261
|
+
setIsSearching(false);
|
|
1262
|
+
lastSearchQueryRef.current = '';
|
|
1263
|
+
searchClearedTimeRef.current = null;
|
|
1264
|
+
}
|
|
1265
|
+
resetScrollState();
|
|
1001
1266
|
|
|
1002
|
-
|
|
1003
|
-
|
|
1267
|
+
// Call resetData when dropdown closes if user interacted and resetData wasn't called yet
|
|
1268
|
+
if (hasInteractedRef.current && !resetDataCalledRef.current) {
|
|
1269
|
+
callResetData();
|
|
1270
|
+
} else if (!hasInteractedRef.current) {
|
|
1271
|
+
if (searchTimeoutRef.current) {
|
|
1272
|
+
clearTimeout(searchTimeoutRef.current);
|
|
1273
|
+
searchTimeoutRef.current = null;
|
|
1274
|
+
}
|
|
1275
|
+
setIsSearching(false);
|
|
1276
|
+
setIsResettingData(false);
|
|
1277
|
+
lastSearchQueryRef.current = '';
|
|
1278
|
+
}
|
|
1279
|
+
hasInteractedRef.current = false;
|
|
1280
|
+
}
|
|
1281
|
+
setDropdownOpen(open);
|
|
1282
|
+
}, [customPopupRender, value, onChange, tempValue, resetSearch, callResetData, options, isResettingData, resetScrollState]);
|
|
1283
|
+
const handleSearchChange = (0, _react.useCallback)(e => {
|
|
1284
|
+
const query = e.target.value;
|
|
1285
|
+
setSearchText(query);
|
|
1286
|
+
handleSearch(query);
|
|
1287
|
+
}, [handleSearch]);
|
|
1288
|
+
const handleSearchKeyDown = (0, _react.useCallback)(e => {
|
|
1289
|
+
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
1290
|
+
e.stopPropagation();
|
|
1291
|
+
}
|
|
1292
|
+
if (e.key === 'Escape' && searchText.length > 0) {
|
|
1293
|
+
e.stopPropagation();
|
|
1294
|
+
}
|
|
1295
|
+
}, [searchText]);
|
|
1004
1296
|
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1297
|
+
/**
|
|
1298
|
+
* Helper function to handle resetData call when value is cleared.
|
|
1299
|
+
* Only resets data if there was an active search, as resetting on every unselect
|
|
1300
|
+
* would be too aggressive and could reset data unnecessarily when user simply unselects.
|
|
1301
|
+
*
|
|
1302
|
+
* This addresses the question: "If user unselects or clears current selection then do we need to call resetData?"
|
|
1303
|
+
* Answer: Only if there was an active search query, to avoid unnecessary resets.
|
|
1304
|
+
*/
|
|
1305
|
+
const handleResetDataOnClear = (0, _react.useCallback)(() => {
|
|
1306
|
+
// Only reset data if there was an active search query
|
|
1307
|
+
// This prevents unnecessary resets when user simply unselects without searching
|
|
1308
|
+
const hadActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
|
|
1309
|
+
callResetData(hadActiveSearch);
|
|
1310
|
+
}, [staticValue, callResetData]);
|
|
1311
|
+
const handleSingleSelectChange = (0, _react.useCallback)(newValue => {
|
|
1312
|
+
if (disabled) {
|
|
1313
|
+
return;
|
|
1314
|
+
}
|
|
1315
|
+
if (newValue === undefined || newValue === null) {
|
|
1316
|
+
handleResetDataOnClear();
|
|
1317
|
+
}
|
|
1318
|
+
onChange == null || onChange(newValue);
|
|
1319
|
+
}, [onChange, disabled, handleResetDataOnClear]);
|
|
1320
|
+
const handleMultiSelectChange = (0, _react.useCallback)(newValue => {
|
|
1321
|
+
if (disabled) {
|
|
1322
|
+
return;
|
|
1323
|
+
}
|
|
1324
|
+
const initialValue = initialTempValueRef.current;
|
|
1325
|
+
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;
|
|
1326
|
+
if (hasChanged) {
|
|
1327
|
+
hasInteractedRef.current = true;
|
|
1328
|
+
}
|
|
1329
|
+
if (newValue === undefined || newValue === null || Array.isArray(newValue) && newValue.length === 0) {
|
|
1330
|
+
handleResetDataOnClear();
|
|
1331
|
+
}
|
|
1332
|
+
setTempValue(newValue);
|
|
1333
|
+
}, [disabled, handleResetDataOnClear]);
|
|
1334
|
+
return {
|
|
1335
|
+
searchText,
|
|
1336
|
+
setSearchText,
|
|
1337
|
+
tempValue,
|
|
1338
|
+
setTempValue,
|
|
1339
|
+
dropdownOpen,
|
|
1340
|
+
isSearching,
|
|
1341
|
+
isLoadingOnScroll,
|
|
1342
|
+
isResettingData,
|
|
1343
|
+
orderedOptions,
|
|
1344
|
+
filteredTree,
|
|
1345
|
+
treeMaps,
|
|
1346
|
+
selectedLeafCount,
|
|
1347
|
+
displayValue,
|
|
1348
|
+
handleSearch,
|
|
1349
|
+
handleSearchChange,
|
|
1350
|
+
handleSearchKeyDown,
|
|
1351
|
+
handleConfirm,
|
|
1352
|
+
handleClearAll,
|
|
1353
|
+
handleDropdownVisibilityChange,
|
|
1354
|
+
handleSingleSelectChange,
|
|
1355
|
+
handleMultiSelectChange,
|
|
1356
|
+
selectedItemsCacheRef
|
|
1357
|
+
};
|
|
1014
1358
|
};
|
|
1015
|
-
|
|
1016
|
-
|
|
1359
|
+
exports.useCapUnifiedSelect = useCapUnifiedSelect;
|
|
1017
1360
|
|
|
1018
1361
|
/***/ }),
|
|
1019
1362
|
|
|
1020
|
-
/***/
|
|
1363
|
+
/***/ 540:
|
|
1021
1364
|
/***/ ((module) => {
|
|
1022
1365
|
|
|
1023
1366
|
"use strict";
|
|
1024
1367
|
|
|
1025
1368
|
|
|
1026
1369
|
/* istanbul ignore next */
|
|
1027
|
-
function
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
styleElement.removeChild(styleElement.firstChild);
|
|
1033
|
-
}
|
|
1034
|
-
styleElement.appendChild(document.createTextNode(css));
|
|
1035
|
-
}
|
|
1370
|
+
function insertStyleElement(options) {
|
|
1371
|
+
var element = document.createElement("style");
|
|
1372
|
+
options.setAttributes(element, options.attributes);
|
|
1373
|
+
options.insert(element, options.options);
|
|
1374
|
+
return element;
|
|
1036
1375
|
}
|
|
1037
|
-
module.exports =
|
|
1376
|
+
module.exports = insertStyleElement;
|
|
1038
1377
|
|
|
1039
1378
|
/***/ }),
|
|
1040
1379
|
|
|
1041
|
-
/***/
|
|
1042
|
-
/***/ ((__unused_webpack_module,
|
|
1380
|
+
/***/ 628:
|
|
1381
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1043
1382
|
|
|
1044
1383
|
"use strict";
|
|
1384
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1385
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1386
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1387
|
+
/* harmony export */ });
|
|
1388
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
|
|
1389
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
1390
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
|
|
1391
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
1392
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
|
|
1393
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
1394
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
|
|
1395
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
1396
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
|
|
1397
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
1398
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5573);
|
|
1399
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
|
|
1400
|
+
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
1401
|
+
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
|
|
1402
|
+
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
1045
1403
|
|
|
1404
|
+
|
|
1405
|
+
|
|
1406
|
+
|
|
1407
|
+
|
|
1408
|
+
|
|
1409
|
+
|
|
1410
|
+
|
|
1411
|
+
|
|
1412
|
+
|
|
1046
1413
|
|
|
1047
|
-
|
|
1048
|
-
exports["default"] = void 0;
|
|
1049
|
-
var _antdV = __webpack_require__(4273);
|
|
1050
|
-
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
1051
|
-
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
1052
|
-
var _styles = _interopRequireDefault(__webpack_require__(7519));
|
|
1053
|
-
var _jsxRuntime = __webpack_require__(4848);
|
|
1054
|
-
const _excluded = ["className", "children"];
|
|
1055
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1056
|
-
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); }
|
|
1057
|
-
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; }
|
|
1058
|
-
const clsPrefix = 'cap-column-v2';
|
|
1059
|
-
const CapColumn = _ref => {
|
|
1060
|
-
let {
|
|
1061
|
-
className,
|
|
1062
|
-
children
|
|
1063
|
-
} = _ref,
|
|
1064
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1065
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1066
|
-
className: _styles.default['cap-column-wrapper'],
|
|
1067
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Col, _extends({}, rest, {
|
|
1068
|
-
className: (0, _classnames.default)(_styles.default[clsPrefix], className),
|
|
1069
|
-
children: _react.default.Children.toArray(children)
|
|
1070
|
-
}))
|
|
1071
|
-
});
|
|
1072
|
-
};
|
|
1073
|
-
var _default = exports["default"] = CapColumn;
|
|
1414
|
+
var options = {};
|
|
1074
1415
|
|
|
1075
|
-
|
|
1416
|
+
;
|
|
1417
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
1418
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
1419
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
1420
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
1076
1421
|
|
|
1077
|
-
|
|
1078
|
-
/***/ ((module) => {
|
|
1422
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
|
|
1079
1423
|
|
|
1080
|
-
"use strict";
|
|
1081
1424
|
|
|
1082
1425
|
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
if (!cssMapping) {
|
|
1087
|
-
return content;
|
|
1088
|
-
}
|
|
1089
|
-
if (typeof btoa === "function") {
|
|
1090
|
-
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
|
|
1091
|
-
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
1092
|
-
var sourceMapping = "/*# ".concat(data, " */");
|
|
1093
|
-
return [content].concat([sourceMapping]).join("\n");
|
|
1094
|
-
}
|
|
1095
|
-
return [content].join("\n");
|
|
1096
|
-
};
|
|
1426
|
+
|
|
1427
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()) && (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) ? (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) : undefined);
|
|
1428
|
+
|
|
1097
1429
|
|
|
1098
1430
|
/***/ }),
|
|
1099
1431
|
|
|
1100
|
-
/***/
|
|
1101
|
-
/***/ ((__unused_webpack_module,
|
|
1432
|
+
/***/ 845:
|
|
1433
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1102
1434
|
|
|
1103
1435
|
"use strict";
|
|
1436
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1437
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1438
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1439
|
+
/* harmony export */ });
|
|
1440
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
|
|
1441
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
1442
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
|
|
1443
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
1444
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
|
|
1445
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
1446
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
|
|
1447
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
1448
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
|
|
1449
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
1450
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3366);
|
|
1451
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
|
|
1452
|
+
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
1453
|
+
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
|
|
1454
|
+
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
1104
1455
|
|
|
1456
|
+
|
|
1457
|
+
|
|
1458
|
+
|
|
1459
|
+
|
|
1460
|
+
|
|
1461
|
+
|
|
1462
|
+
|
|
1463
|
+
|
|
1464
|
+
|
|
1105
1465
|
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1466
|
+
var options = {};
|
|
1467
|
+
|
|
1468
|
+
;
|
|
1469
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
1470
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
1471
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
1472
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
1473
|
+
|
|
1474
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
|
|
1475
|
+
|
|
1476
|
+
|
|
1477
|
+
|
|
1478
|
+
|
|
1479
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()) && (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) ? (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) : undefined);
|
|
1480
|
+
|
|
1481
|
+
|
|
1482
|
+
/***/ }),
|
|
1483
|
+
|
|
1484
|
+
/***/ 895:
|
|
1485
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1486
|
+
|
|
1487
|
+
"use strict";
|
|
1488
|
+
|
|
1489
|
+
|
|
1490
|
+
exports.__esModule = true;
|
|
1491
|
+
exports["default"] = void 0;
|
|
1492
|
+
var _CapColumn = _interopRequireDefault(__webpack_require__(1243));
|
|
1493
|
+
exports["default"] = _CapColumn.default;
|
|
1494
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1495
|
+
|
|
1496
|
+
/***/ }),
|
|
1497
|
+
|
|
1498
|
+
/***/ 925:
|
|
1499
|
+
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
1500
|
+
|
|
1501
|
+
"use strict";
|
|
1502
|
+
__webpack_require__.r(__webpack_exports__);
|
|
1503
|
+
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
1504
|
+
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
1505
|
+
/* harmony export */ });
|
|
1506
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
|
|
1507
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
|
|
1508
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
|
|
1509
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
|
|
1510
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
|
|
1511
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
|
|
1512
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
|
|
1513
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
|
|
1514
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
|
|
1515
|
+
/* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
|
|
1516
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5074);
|
|
1517
|
+
/* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
|
|
1518
|
+
/* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
|
|
1519
|
+
/* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
|
|
1520
|
+
/* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
|
|
1521
|
+
|
|
1522
|
+
|
|
1523
|
+
|
|
1524
|
+
|
|
1525
|
+
|
|
1526
|
+
|
|
1527
|
+
|
|
1528
|
+
|
|
1529
|
+
|
|
1530
|
+
|
|
1531
|
+
|
|
1532
|
+
var options = {};
|
|
1533
|
+
|
|
1534
|
+
;
|
|
1535
|
+
options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
|
|
1536
|
+
options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
|
|
1537
|
+
options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
|
|
1538
|
+
options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
|
|
1539
|
+
|
|
1540
|
+
var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
|
|
1541
|
+
|
|
1542
|
+
|
|
1543
|
+
|
|
1544
|
+
|
|
1545
|
+
/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()) && (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) ? (_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default().locals) : undefined);
|
|
1546
|
+
|
|
1547
|
+
|
|
1548
|
+
/***/ }),
|
|
1549
|
+
|
|
1550
|
+
/***/ 1020:
|
|
1551
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1552
|
+
|
|
1553
|
+
"use strict";
|
|
1554
|
+
/**
|
|
1555
|
+
* @license React
|
|
1556
|
+
* react-jsx-runtime.production.min.js
|
|
1557
|
+
*
|
|
1558
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
1559
|
+
*
|
|
1560
|
+
* This source code is licensed under the MIT license found in the
|
|
1561
|
+
* LICENSE file in the root directory of this source tree.
|
|
1562
|
+
*/
|
|
1563
|
+
var f=__webpack_require__(9206),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
|
|
1564
|
+
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;
|
|
1565
|
+
|
|
1566
|
+
|
|
1567
|
+
/***/ }),
|
|
1568
|
+
|
|
1569
|
+
/***/ 1047:
|
|
1570
|
+
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1571
|
+
|
|
1572
|
+
// Imports
|
|
1573
|
+
var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
|
|
1574
|
+
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
|
|
1575
|
+
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
|
|
1576
|
+
// Module
|
|
1577
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-dropdown-wrapper .ant-dropdown{min-width:14.286rem}.blaze-ui-cap-dropdown-wrapper .ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item{padding:.857rem 1.714rem}.blaze-ui-cap-dropdown-wrapper .ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-item:hover,.blaze-ui-cap-dropdown-wrapper .ant-dropdown .ant-dropdown-menu .ant-dropdown-menu-submenu-title:hover{background-color:#faf9f4}`, ""]);
|
|
1578
|
+
// Exports
|
|
1579
|
+
___CSS_LOADER_EXPORT___.locals = {
|
|
1580
|
+
"cap-dropdown-wrapper": `blaze-ui-cap-dropdown-wrapper`
|
|
1581
|
+
};
|
|
1582
|
+
module.exports = ___CSS_LOADER_EXPORT___;
|
|
1583
|
+
|
|
1584
|
+
|
|
1585
|
+
/***/ }),
|
|
1586
|
+
|
|
1587
|
+
/***/ 1113:
|
|
1588
|
+
/***/ ((module) => {
|
|
1589
|
+
|
|
1590
|
+
"use strict";
|
|
1591
|
+
|
|
1592
|
+
|
|
1593
|
+
/* istanbul ignore next */
|
|
1594
|
+
function styleTagTransform(css, styleElement) {
|
|
1595
|
+
if (styleElement.styleSheet) {
|
|
1596
|
+
styleElement.styleSheet.cssText = css;
|
|
1597
|
+
} else {
|
|
1598
|
+
while (styleElement.firstChild) {
|
|
1599
|
+
styleElement.removeChild(styleElement.firstChild);
|
|
1600
|
+
}
|
|
1601
|
+
styleElement.appendChild(document.createTextNode(css));
|
|
1602
|
+
}
|
|
1603
|
+
}
|
|
1604
|
+
module.exports = styleTagTransform;
|
|
1605
|
+
|
|
1606
|
+
/***/ }),
|
|
1607
|
+
|
|
1608
|
+
/***/ 1243:
|
|
1609
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1610
|
+
|
|
1611
|
+
"use strict";
|
|
1612
|
+
|
|
1613
|
+
|
|
1614
|
+
exports.__esModule = true;
|
|
1615
|
+
exports["default"] = void 0;
|
|
1616
|
+
var _antdV = __webpack_require__(4273);
|
|
1617
|
+
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
1618
|
+
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
1619
|
+
var _styles = _interopRequireDefault(__webpack_require__(7519));
|
|
1620
|
+
var _jsxRuntime = __webpack_require__(4848);
|
|
1621
|
+
const _excluded = ["className", "children"];
|
|
1622
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1623
|
+
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); }
|
|
1624
|
+
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; }
|
|
1625
|
+
const clsPrefix = 'cap-column-v2';
|
|
1626
|
+
const CapColumn = _ref => {
|
|
1627
|
+
let {
|
|
1628
|
+
className,
|
|
1629
|
+
children
|
|
1630
|
+
} = _ref,
|
|
1631
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1632
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1633
|
+
className: _styles.default['cap-column-wrapper'],
|
|
1634
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Col, _extends({}, rest, {
|
|
1635
|
+
className: (0, _classnames.default)(_styles.default[clsPrefix], className),
|
|
1636
|
+
children: _react.default.Children.toArray(children)
|
|
1637
|
+
}))
|
|
1638
|
+
});
|
|
1639
|
+
};
|
|
1640
|
+
var _default = exports["default"] = CapColumn;
|
|
1641
|
+
|
|
1642
|
+
/***/ }),
|
|
1643
|
+
|
|
1644
|
+
/***/ 1354:
|
|
1645
|
+
/***/ ((module) => {
|
|
1646
|
+
|
|
1647
|
+
"use strict";
|
|
1648
|
+
|
|
1649
|
+
|
|
1650
|
+
module.exports = function (item) {
|
|
1651
|
+
var content = item[1];
|
|
1652
|
+
var cssMapping = item[3];
|
|
1653
|
+
if (!cssMapping) {
|
|
1654
|
+
return content;
|
|
1655
|
+
}
|
|
1656
|
+
if (typeof btoa === "function") {
|
|
1657
|
+
var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(cssMapping))));
|
|
1658
|
+
var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64);
|
|
1659
|
+
var sourceMapping = "/*# ".concat(data, " */");
|
|
1660
|
+
return [content].concat([sourceMapping]).join("\n");
|
|
1661
|
+
}
|
|
1662
|
+
return [content].join("\n");
|
|
1663
|
+
};
|
|
1664
|
+
|
|
1665
|
+
/***/ }),
|
|
1666
|
+
|
|
1667
|
+
/***/ 1479:
|
|
1668
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1669
|
+
|
|
1670
|
+
"use strict";
|
|
1671
|
+
|
|
1672
|
+
|
|
1673
|
+
exports.__esModule = true;
|
|
1674
|
+
exports["default"] = void 0;
|
|
1675
|
+
var _antdV = __webpack_require__(4273);
|
|
1676
|
+
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
1677
|
+
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
1678
|
+
var _styles = _interopRequireDefault(__webpack_require__(5020));
|
|
1679
|
+
var _jsxRuntime = __webpack_require__(4848);
|
|
1680
|
+
const _excluded = ["panes", "className", "animated", "type", "size", "tabPosition"],
|
|
1681
|
+
_excluded2 = ["content"];
|
|
1682
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1116
1683
|
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); }
|
|
1117
1684
|
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; }
|
|
1118
1685
|
const {
|
|
@@ -1216,42 +1783,137 @@ module.exports = ___CSS_LOADER_EXPORT___;
|
|
|
1216
1783
|
|
|
1217
1784
|
/***/ }),
|
|
1218
1785
|
|
|
1219
|
-
/***/
|
|
1786
|
+
/***/ 1879:
|
|
1220
1787
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1221
1788
|
|
|
1222
1789
|
"use strict";
|
|
1223
1790
|
|
|
1224
1791
|
|
|
1225
1792
|
exports.__esModule = true;
|
|
1226
|
-
exports
|
|
1227
|
-
var _antdV = __webpack_require__(4273);
|
|
1793
|
+
exports.enhanceOptionsWithComponents = void 0;
|
|
1228
1794
|
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
1229
1795
|
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
1230
|
-
var
|
|
1796
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
|
|
1797
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(7375));
|
|
1798
|
+
var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
|
|
1799
|
+
var _constants = __webpack_require__(9788);
|
|
1800
|
+
var _styles = _interopRequireDefault(__webpack_require__(8263));
|
|
1231
1801
|
var _jsxRuntime = __webpack_require__(4848);
|
|
1232
|
-
const _excluded = ["className", "type"];
|
|
1233
1802
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1234
1803
|
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); }
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
className:
|
|
1247
|
-
|
|
1248
|
-
|
|
1804
|
+
/**
|
|
1805
|
+
* Enhances options with React components for rendering
|
|
1806
|
+
* Adds decorated titles with suffixes and tooltips
|
|
1807
|
+
*/
|
|
1808
|
+
const enhanceOptionsWithComponents = (options, type) => {
|
|
1809
|
+
if (!(options != null && options.length)) return [];
|
|
1810
|
+
const isTree = type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT;
|
|
1811
|
+
const enhanceOptions = opts => opts.map(opt => {
|
|
1812
|
+
const displayText = (opt == null ? void 0 : opt.hoverText) || (opt == null ? void 0 : opt.label);
|
|
1813
|
+
const tooltipTitle = (opt == null ? void 0 : opt.hoverText) || undefined;
|
|
1814
|
+
const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
1815
|
+
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
1816
|
+
justify: "space-between",
|
|
1817
|
+
align: "middle",
|
|
1818
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1819
|
+
className: (0, _classnames.default)(_styles.default['cap-unified-select-option-label'], _styles.default['truncate-text']),
|
|
1820
|
+
title: tooltipTitle,
|
|
1821
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
1822
|
+
type: "label14",
|
|
1823
|
+
children: displayText
|
|
1824
|
+
})
|
|
1825
|
+
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1826
|
+
className: _styles.default['cap-unified-select-option-end'],
|
|
1827
|
+
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
1828
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
1829
|
+
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1830
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
1831
|
+
})]
|
|
1832
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1833
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
1834
|
+
})]
|
|
1835
|
+
})]
|
|
1836
|
+
});
|
|
1837
|
+
return _extends({}, opt, {
|
|
1838
|
+
title: decoratedTitle,
|
|
1839
|
+
label: opt == null ? void 0 : opt.label,
|
|
1840
|
+
children: opt != null && opt.children ? enhanceOptions(opt.children) : []
|
|
1841
|
+
});
|
|
1249
1842
|
});
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1843
|
+
if (isTree) {
|
|
1844
|
+
return enhanceOptions(options);
|
|
1845
|
+
}
|
|
1846
|
+
return options.map(opt => {
|
|
1847
|
+
const displayText = (opt == null ? void 0 : opt.hoverText) || (opt == null ? void 0 : opt.label);
|
|
1848
|
+
const tooltipTitle = (opt == null ? void 0 : opt.hoverText) || undefined;
|
|
1849
|
+
return _extends({}, opt, {
|
|
1850
|
+
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
1851
|
+
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
1852
|
+
justify: "space-between",
|
|
1853
|
+
align: "middle",
|
|
1854
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1855
|
+
className: (0, _classnames.default)(_styles.default['cap-unified-select-option-label'], _styles.default['truncate-text']),
|
|
1856
|
+
title: tooltipTitle,
|
|
1857
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
1858
|
+
type: "label14",
|
|
1859
|
+
children: displayText
|
|
1860
|
+
})
|
|
1861
|
+
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
1862
|
+
className: _styles.default['cap-unified-select-option-end'],
|
|
1863
|
+
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
1864
|
+
className: _styles.default['cap-unified-select-option-suffix'],
|
|
1865
|
+
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1866
|
+
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
1867
|
+
})]
|
|
1868
|
+
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
1869
|
+
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
1870
|
+
})]
|
|
1871
|
+
})]
|
|
1872
|
+
}),
|
|
1873
|
+
label: opt == null ? void 0 : opt.label
|
|
1874
|
+
});
|
|
1875
|
+
});
|
|
1876
|
+
};
|
|
1877
|
+
exports.enhanceOptionsWithComponents = enhanceOptionsWithComponents;
|
|
1878
|
+
|
|
1879
|
+
/***/ }),
|
|
1880
|
+
|
|
1881
|
+
/***/ 2077:
|
|
1882
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
1883
|
+
|
|
1884
|
+
"use strict";
|
|
1885
|
+
|
|
1886
|
+
|
|
1887
|
+
exports.__esModule = true;
|
|
1888
|
+
exports["default"] = void 0;
|
|
1889
|
+
var _antdV = __webpack_require__(4273);
|
|
1890
|
+
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
1891
|
+
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
1892
|
+
var _styles = _interopRequireDefault(__webpack_require__(4107));
|
|
1893
|
+
var _jsxRuntime = __webpack_require__(4848);
|
|
1894
|
+
const _excluded = ["className", "type"];
|
|
1895
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
1896
|
+
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); }
|
|
1897
|
+
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; }
|
|
1898
|
+
const clsPrefix = 'cap-alert-v2';
|
|
1899
|
+
const CapAlert = _ref => {
|
|
1900
|
+
let {
|
|
1901
|
+
className,
|
|
1902
|
+
type = 'info'
|
|
1903
|
+
} = _ref,
|
|
1904
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
1905
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
1906
|
+
className: _styles.default['cap-alert-wrapper'],
|
|
1907
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Alert, _extends({
|
|
1908
|
+
className: (0, _classnames.default)(_styles.default[clsPrefix], className),
|
|
1909
|
+
type: type
|
|
1910
|
+
}, rest))
|
|
1911
|
+
});
|
|
1912
|
+
};
|
|
1913
|
+
var _default = exports["default"] = CapAlert;
|
|
1914
|
+
|
|
1915
|
+
/***/ }),
|
|
1916
|
+
|
|
1255
1917
|
/***/ 2119:
|
|
1256
1918
|
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {
|
|
1257
1919
|
|
|
@@ -20458,1069 +21120,234 @@ module.exports = ___CSS_LOADER_EXPORT___;
|
|
|
20458
21120
|
|
|
20459
21121
|
|
|
20460
21122
|
/***/ }),
|
|
20461
|
-
|
|
20462
|
-
/***/ 5346:
|
|
20463
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
20464
|
-
|
|
20465
|
-
"use strict";
|
|
20466
|
-
|
|
20467
|
-
|
|
20468
|
-
exports.__esModule = true;
|
|
20469
|
-
exports["default"] = void 0;
|
|
20470
|
-
var _CapDivider = _interopRequireDefault(__webpack_require__(4795));
|
|
20471
|
-
exports["default"] = _CapDivider.default;
|
|
20472
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20473
|
-
|
|
20474
|
-
/***/ }),
|
|
20475
|
-
|
|
20476
|
-
/***/ 5353:
|
|
20477
|
-
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
20478
|
-
|
|
20479
|
-
"use strict";
|
|
20480
|
-
|
|
20481
|
-
|
|
20482
|
-
exports.__esModule = true;
|
|
20483
|
-
exports["default"] = void 0;
|
|
20484
|
-
var _antdV = __webpack_require__(4273);
|
|
20485
|
-
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
20486
|
-
var _react = _interopRequireWildcard(__webpack_require__(9206));
|
|
20487
|
-
var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
|
|
20488
|
-
var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
|
|
20489
|
-
var _CapRow = _interopRequireDefault(__webpack_require__(7375));
|
|
20490
|
-
var
|
|
20491
|
-
var
|
|
20492
|
-
var
|
|
20493
|
-
var
|
|
20494
|
-
var
|
|
20495
|
-
var _styles = _interopRequireDefault(__webpack_require__(8263));
|
|
20496
|
-
var
|
|
20497
|
-
var _jsxRuntime = __webpack_require__(4848);
|
|
20498
|
-
const _excluded = ["type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "uploadLabel", "tooltip", "bylineText", "disabled", "showUpload", "customPopupRender", "showSearch", "searchBasedOn", "onSearch", "searchDebounce", "onConfirm", "clearText", "noResultCustomText", "noResultCustomIcon", "readOnly", "staticValue", "onFooterDownloadChange", "onPopupScroll", "hasMore", "enableVirtualization", "virtualRowHeight", "resetSearch", "resetData", "fetchMissingOptions"];
|
|
20499
|
-
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); }
|
|
20500
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
20501
|
-
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); }
|
|
20502
|
-
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; }
|
|
20503
|
-
const CapUnifiedSelect = _ref => {
|
|
20504
|
-
let {
|
|
20505
|
-
type = _constants.SELECT_TYPES.SELECT,
|
|
20506
|
-
options = [],
|
|
20507
|
-
value,
|
|
20508
|
-
onChange,
|
|
20509
|
-
placeholder = _constants.DEFAULTS.PLACEHOLDER,
|
|
20510
|
-
className = '',
|
|
20511
|
-
style,
|
|
20512
|
-
isError = false,
|
|
20513
|
-
errorMessage,
|
|
20514
|
-
containerClassName,
|
|
20515
|
-
popoverClassName,
|
|
20516
|
-
allowClear = false,
|
|
20517
|
-
headerLabel,
|
|
20518
|
-
onUpload,
|
|
20519
|
-
uploadLabel = _constants.DEFAULTS.UPLOAD_LABEL,
|
|
20520
|
-
tooltip,
|
|
20521
|
-
bylineText,
|
|
20522
|
-
disabled = false,
|
|
20523
|
-
showUpload = false,
|
|
20524
|
-
customPopupRender = true,
|
|
20525
|
-
showSearch = true,
|
|
20526
|
-
searchBasedOn = 'label',
|
|
20527
|
-
onSearch,
|
|
20528
|
-
searchDebounce = _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE,
|
|
20529
|
-
onConfirm,
|
|
20530
|
-
clearText = _constants.DEFAULTS.CLEAR_TEXT,
|
|
20531
|
-
noResultCustomText = _constants.DEFAULTS.NO_RESULT_TEXT,
|
|
20532
|
-
noResultCustomIcon = _constants.DEFAULTS.NO_RESULT_ICON,
|
|
20533
|
-
readOnly = false,
|
|
20534
|
-
staticValue = true,
|
|
20535
|
-
onFooterDownloadChange,
|
|
20536
|
-
onPopupScroll,
|
|
20537
|
-
hasMore = true,
|
|
20538
|
-
enableVirtualization = false,
|
|
20539
|
-
virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
|
|
20540
|
-
resetSearch = true,
|
|
20541
|
-
resetData,
|
|
20542
|
-
fetchMissingOptions
|
|
20543
|
-
} = _ref,
|
|
20544
|
-
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
20545
|
-
const
|
|
20546
|
-
const
|
|
20547
|
-
|
|
20548
|
-
|
|
20549
|
-
|
|
20550
|
-
|
|
20551
|
-
|
|
20552
|
-
|
|
20553
|
-
|
|
20554
|
-
|
|
20555
|
-
|
|
20556
|
-
|
|
20557
|
-
|
|
20558
|
-
|
|
20559
|
-
|
|
20560
|
-
|
|
20561
|
-
|
|
20562
|
-
|
|
20563
|
-
|
|
20564
|
-
|
|
20565
|
-
|
|
20566
|
-
|
|
20567
|
-
|
|
20568
|
-
|
|
20569
|
-
|
|
20570
|
-
|
|
20571
|
-
|
|
20572
|
-
|
|
20573
|
-
|
|
20574
|
-
|
|
20575
|
-
|
|
20576
|
-
|
|
20577
|
-
|
|
20578
|
-
|
|
20579
|
-
|
|
20580
|
-
|
|
20581
|
-
|
|
20582
|
-
|
|
20583
|
-
|
|
20584
|
-
|
|
20585
|
-
|
|
20586
|
-
|
|
20587
|
-
|
|
20588
|
-
|
|
20589
|
-
|
|
20590
|
-
|
|
20591
|
-
|
|
20592
|
-
|
|
20593
|
-
const
|
|
20594
|
-
|
|
20595
|
-
|
|
20596
|
-
|
|
20597
|
-
|
|
20598
|
-
|
|
20599
|
-
|
|
20600
|
-
|
|
20601
|
-
fetchMissingOptionsCalledRef.current = true;
|
|
20602
|
-
lastMissingValuesRef.current = missingValuesKey;
|
|
20603
|
-
fetchMissingOptions([...missingValues]);
|
|
20604
|
-
}
|
|
20605
|
-
}, [value, options, fetchMissingOptions, staticValue]);
|
|
20606
|
-
(0, _react.useEffect)(() => {
|
|
20607
|
-
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;
|
|
20608
|
-
if (!isEqual) {
|
|
20609
|
-
setTempValue(value);
|
|
20610
|
-
setOrderedOptions(null);
|
|
20611
|
-
}
|
|
20612
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
20613
|
-
}, [value]);
|
|
20614
|
-
(0, _react.useEffect)(() => {
|
|
20615
|
-
const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
20616
|
-
const findAndCacheOption = (opts, val) => {
|
|
20617
|
-
for (const opt of opts) {
|
|
20618
|
-
if (opt.value === val) {
|
|
20619
|
-
selectedItemsCacheRef.current.set(val, opt);
|
|
20620
|
-
return true;
|
|
20621
|
-
}
|
|
20622
|
-
if (opt.children && opt.children.length > 0) {
|
|
20623
|
-
if (findAndCacheOption(opt.children, val)) {
|
|
20624
|
-
return true;
|
|
20625
|
-
}
|
|
20626
|
-
}
|
|
20627
|
-
}
|
|
20628
|
-
return false;
|
|
20629
|
-
};
|
|
20630
|
-
currentSelected.forEach(val => {
|
|
20631
|
-
if (!selectedItemsCacheRef.current.has(val)) {
|
|
20632
|
-
findAndCacheOption(options, val);
|
|
20633
|
-
}
|
|
20634
|
-
});
|
|
20635
|
-
const selectedSet = new Set(currentSelected);
|
|
20636
|
-
selectedItemsCacheRef.current.forEach((_, value) => {
|
|
20637
|
-
if (!selectedSet.has(value)) {
|
|
20638
|
-
selectedItemsCacheRef.current.delete(value);
|
|
20639
|
-
}
|
|
20640
|
-
});
|
|
20641
|
-
}, [tempValue, options]);
|
|
20642
|
-
(0, _react.useEffect)(() => {
|
|
20643
|
-
if (orderedOptions) {
|
|
20644
|
-
const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
20645
|
-
const checkValueExists = (opts, val) => {
|
|
20646
|
-
for (const opt of opts) {
|
|
20647
|
-
if (opt.value === val) return true;
|
|
20648
|
-
if (opt.children && opt.children.length > 0) {
|
|
20649
|
-
if (checkValueExists(opt.children, val)) return true;
|
|
20650
|
-
}
|
|
20651
|
-
}
|
|
20652
|
-
return false;
|
|
20653
|
-
};
|
|
20654
|
-
const allSelectedStillExist = currentSelected.every(val => checkValueExists(options, val));
|
|
20655
|
-
if (!allSelectedStillExist) {
|
|
20656
|
-
setOrderedOptions(null);
|
|
20657
|
-
}
|
|
20658
|
-
}
|
|
20659
|
-
}, [options, orderedOptions, tempValue]);
|
|
20660
|
-
const debounceTimeout = searchDebounce != null ? searchDebounce : _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE;
|
|
20661
|
-
(0, _react.useEffect)(() => {
|
|
20662
|
-
optionsRef.current = options;
|
|
20663
|
-
}, [options]);
|
|
20664
|
-
(0, _react.useEffect)(() => {
|
|
20665
|
-
return () => {
|
|
20666
|
-
if (searchTimeoutRef.current) {
|
|
20667
|
-
clearTimeout(searchTimeoutRef.current);
|
|
20668
|
-
}
|
|
20669
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
20670
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
20671
|
-
}
|
|
20672
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
20673
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
20674
|
-
}
|
|
20675
|
-
};
|
|
20676
|
-
}, []);
|
|
20677
|
-
(0, _react.useEffect)(() => {
|
|
20678
|
-
const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
|
|
20679
|
-
if (staticValue || !isSearching || !hasSearchQuery) {
|
|
20680
|
-
prevOptionsRef.current = options;
|
|
20681
|
-
return;
|
|
20682
|
-
}
|
|
20683
|
-
const optionsChanged = prevOptionsRef.current !== options || prevOptionsRef.current.length !== options.length;
|
|
20684
|
-
const searchCleared = lastSearchQueryRef.current === '';
|
|
20685
|
-
const timeSinceCleared = searchClearedTimeRef.current ? Date.now() - searchClearedTimeRef.current : Infinity;
|
|
20686
|
-
const hasOptionsData = options.length > 0;
|
|
20687
|
-
const clearedSearchReady = searchCleared && hasOptionsData && timeSinceCleared > _constants.TIMEOUTS.SEARCH_CLEARED_TIMEOUT;
|
|
20688
|
-
if (optionsChanged || clearedSearchReady) {
|
|
20689
|
-
const timeoutId = setTimeout(() => {
|
|
20690
|
-
setIsSearching(false);
|
|
20691
|
-
prevOptionsRef.current = options;
|
|
20692
|
-
if (searchCleared) {
|
|
20693
|
-
searchClearedTimeRef.current = null;
|
|
20694
|
-
}
|
|
20695
|
-
}, _constants.TIMEOUTS.SEARCH_STATE_UPDATE_DELAY);
|
|
20696
|
-
return () => clearTimeout(timeoutId);
|
|
20697
|
-
}
|
|
20698
|
-
prevOptionsRef.current = options;
|
|
20699
|
-
}, [options, staticValue, isSearching]);
|
|
20700
|
-
(0, _react.useEffect)(() => {
|
|
20701
|
-
const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
|
|
20702
|
-
if (!isSearching || staticValue || !hasSearchQuery) {
|
|
20703
|
-
return;
|
|
20704
|
-
}
|
|
20705
|
-
const searchCleared = lastSearchQueryRef.current === '';
|
|
20706
|
-
const timeoutDuration = searchCleared ? debounceTimeout + _constants.TIMEOUTS.SEARCH_CLEARED_BUFFER : debounceTimeout + _constants.TIMEOUTS.SEARCH_REGULAR_BUFFER;
|
|
20707
|
-
const fallbackTimeout = setTimeout(() => {
|
|
20708
|
-
setIsSearching(false);
|
|
20709
|
-
searchClearedTimeRef.current = null;
|
|
20710
|
-
}, timeoutDuration);
|
|
20711
|
-
return () => clearTimeout(fallbackTimeout);
|
|
20712
|
-
}, [isSearching, staticValue, debounceTimeout, options.length]);
|
|
20713
|
-
(0, _react.useEffect)(() => {
|
|
20714
|
-
if (!isResettingData) {
|
|
20715
|
-
prevOptionsBeforeResetRef.current = options;
|
|
20716
|
-
resetDataCalledTimeRef.current = null;
|
|
20717
|
-
return;
|
|
20718
|
-
}
|
|
20719
|
-
const prevOptions = prevOptionsBeforeResetRef.current;
|
|
20720
|
-
const currentOptions = options;
|
|
20721
|
-
const optionsChanged = prevOptions !== currentOptions || prevOptions.length !== currentOptions.length || prevOptions.length === currentOptions.length && prevOptions.length > 0 && prevOptions.some((prevOpt, idx) => {
|
|
20722
|
-
const currentOpt = currentOptions[idx];
|
|
20723
|
-
return !currentOpt || prevOpt.value !== currentOpt.value || prevOpt.label !== currentOpt.label;
|
|
20724
|
-
});
|
|
20725
|
-
const timeSinceReset = resetDataCalledTimeRef.current ? Date.now() - resetDataCalledTimeRef.current : Infinity;
|
|
20726
|
-
const hasDataAfterTimeout = currentOptions.length > 0 && timeSinceReset > _constants.TIMEOUTS.RESET_DATA_MIN_TIME && timeSinceReset < _constants.TIMEOUTS.RESET_DATA_MAX_TIME;
|
|
20727
|
-
if (optionsChanged || hasDataAfterTimeout) {
|
|
20728
|
-
setIsResettingData(false);
|
|
20729
|
-
prevOptionsBeforeResetRef.current = currentOptions;
|
|
20730
|
-
resetDataCalledTimeRef.current = null;
|
|
20731
|
-
}
|
|
20732
|
-
}, [options, isResettingData]);
|
|
20733
|
-
(0, _react.useEffect)(() => {
|
|
20734
|
-
if (!isResettingData) {
|
|
20735
|
-
return;
|
|
20736
|
-
}
|
|
20737
|
-
const fallbackTimeout = setTimeout(() => {
|
|
20738
|
-
setIsResettingData(false);
|
|
20739
|
-
prevOptionsBeforeResetRef.current = options;
|
|
20740
|
-
resetDataCalledTimeRef.current = null;
|
|
20741
|
-
}, _constants.TIMEOUTS.RESET_DATA_TIMEOUT);
|
|
20742
|
-
return () => clearTimeout(fallbackTimeout);
|
|
20743
|
-
}, [isResettingData, options]);
|
|
20744
|
-
(0, _react.useEffect)(() => {
|
|
20745
|
-
if (!hasMore && isLoadingOnScroll) {
|
|
20746
|
-
setIsLoadingOnScroll(false);
|
|
20747
|
-
isScrollProcessingRef.current = false;
|
|
20748
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
20749
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
20750
|
-
scrollLoadingTimeoutRef.current = null;
|
|
20751
|
-
}
|
|
20752
|
-
}
|
|
20753
|
-
}, [hasMore, isLoadingOnScroll]);
|
|
20754
|
-
(0, _react.useEffect)(() => {
|
|
20755
|
-
if (!isLoadingOnScroll) {
|
|
20756
|
-
prevOptionsCountRef.current = options.length;
|
|
20757
|
-
prevOptionsRefForScroll.current = options;
|
|
20758
|
-
}
|
|
20759
|
-
if (!isLoadingOnScroll || !onPopupScroll) {
|
|
20760
|
-
return;
|
|
20761
|
-
}
|
|
20762
|
-
const optionsCountIncreased = options.length > prevOptionsCountRef.current;
|
|
20763
|
-
const optionsContentChanged = (() => {
|
|
20764
|
-
const prevCount = prevOptionsCountRef.current;
|
|
20765
|
-
const currentCount = options.length;
|
|
20766
|
-
if (prevCount !== currentCount) {
|
|
20767
|
-
return true;
|
|
20768
|
-
}
|
|
20769
|
-
if (currentCount > 0 && prevCount > 0 && prevOptionsRefForScroll.current.length > 0) {
|
|
20770
|
-
const prevOptions = prevOptionsRefForScroll.current;
|
|
20771
|
-
const lastPrevOption = prevOptions[prevOptions.length - 1];
|
|
20772
|
-
const lastCurrentOption = options[options.length - 1];
|
|
20773
|
-
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)) {
|
|
20774
|
-
return true;
|
|
20775
|
-
}
|
|
20776
|
-
}
|
|
20777
|
-
return false;
|
|
20778
|
-
})();
|
|
20779
|
-
if (optionsCountIncreased || optionsContentChanged) {
|
|
20780
|
-
setIsLoadingOnScroll(false);
|
|
20781
|
-
isScrollProcessingRef.current = false;
|
|
20782
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
20783
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
20784
|
-
scrollLoadingTimeoutRef.current = null;
|
|
20785
|
-
}
|
|
20786
|
-
prevOptionsCountRef.current = options.length;
|
|
20787
|
-
prevOptionsRefForScroll.current = options;
|
|
20788
|
-
}
|
|
20789
|
-
}, [options, isLoadingOnScroll, onPopupScroll]);
|
|
20790
|
-
const handleSearch = (0, _react.useCallback)(query => {
|
|
20791
|
-
if (searchTimeoutRef.current) {
|
|
20792
|
-
clearTimeout(searchTimeoutRef.current);
|
|
20793
|
-
}
|
|
20794
|
-
const trimmedQuery = query.trim();
|
|
20795
|
-
const wasSearching = lastSearchQueryRef.current !== '';
|
|
20796
|
-
const isNowCleared = trimmedQuery === '';
|
|
20797
|
-
if (wasSearching && isNowCleared) {
|
|
20798
|
-
searchClearedTimeRef.current = Date.now();
|
|
20799
|
-
} else if (!isNowCleared) {
|
|
20800
|
-
searchClearedTimeRef.current = null;
|
|
20801
|
-
}
|
|
20802
|
-
lastSearchQueryRef.current = trimmedQuery;
|
|
20803
|
-
if (trimmedQuery.length > 0 || lastSearchQueryRef.current.length > 0) {
|
|
20804
|
-
hasInteractedRef.current = true;
|
|
20805
|
-
}
|
|
20806
|
-
if (!staticValue && onSearch) {
|
|
20807
|
-
setIsSearching(true);
|
|
20808
|
-
searchTimeoutRef.current = setTimeout(() => {
|
|
20809
|
-
onSearch(trimmedQuery);
|
|
20810
|
-
}, debounceTimeout);
|
|
20811
|
-
} else if (!trimmedQuery) {
|
|
20812
|
-
setIsSearching(false);
|
|
20813
|
-
} else {
|
|
20814
|
-
setIsSearching(true);
|
|
20815
|
-
searchTimeoutRef.current = setTimeout(() => {
|
|
20816
|
-
setIsSearching(false);
|
|
20817
|
-
}, _constants.TIMEOUTS.STATIC_SEARCH_DELAY);
|
|
20818
|
-
}
|
|
20819
|
-
}, [onSearch, staticValue, debounceTimeout]);
|
|
20820
|
-
const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
20821
|
-
const isTree = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
20822
|
-
const mergedOptions = (0, _react.useMemo)(() => {
|
|
20823
|
-
return options;
|
|
20824
|
-
}, [options]);
|
|
20825
|
-
const prevOptionsCountBeforeFetchMissingRef = (0, _react.useRef)(options.length);
|
|
20826
|
-
const prevOptionsBeforeFetchMissingRef = (0, _react.useRef)(options);
|
|
20827
|
-
(0, _react.useEffect)(() => {
|
|
20828
|
-
if (!orderedOptions || !onPopupScroll) {
|
|
20829
|
-
return;
|
|
20830
|
-
}
|
|
20831
|
-
const currentOptions = options;
|
|
20832
|
-
const optionsCountIncreased = currentOptions.length > scrollTriggerOptionsCountRef.current;
|
|
20833
|
-
if (optionsCountIncreased && scrollTriggerOptionsCountRef.current > 0) {
|
|
20834
|
-
const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
20835
|
-
if (selectedValues.length > 0) {
|
|
20836
|
-
const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
|
|
20837
|
-
setOrderedOptions(reordered);
|
|
20838
|
-
scrollTriggerOptionsCountRef.current = currentOptions.length;
|
|
20839
|
-
}
|
|
20840
|
-
}
|
|
20841
|
-
}, [options, orderedOptions, onPopupScroll, tempValue]);
|
|
20842
|
-
(0, _react.useEffect)(() => {
|
|
20843
|
-
if (!fetchMissingOptions) {
|
|
20844
|
-
prevOptionsCountBeforeFetchMissingRef.current = options.length;
|
|
20845
|
-
prevOptionsBeforeFetchMissingRef.current = options;
|
|
20846
|
-
return;
|
|
20847
|
-
}
|
|
20848
|
-
|
|
20849
|
-
// For API-driven data, don't reorder options during active search
|
|
20850
|
-
// Only reorder when there's no search query or search is cleared
|
|
20851
|
-
const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
|
|
20852
|
-
if (hasActiveSearch) {
|
|
20853
|
-
return;
|
|
20854
|
-
}
|
|
20855
|
-
const currentOptions = options;
|
|
20856
|
-
const currentSelectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
20857
|
-
const tempSelectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
20858
|
-
const selectedValues = tempSelectedValues.length > 0 ? tempSelectedValues : currentSelectedValues;
|
|
20859
|
-
if (selectedValues.length === 0) {
|
|
20860
|
-
prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
|
|
20861
|
-
prevOptionsBeforeFetchMissingRef.current = currentOptions;
|
|
20862
|
-
return;
|
|
20863
|
-
}
|
|
20864
|
-
const prevOptions = prevOptionsBeforeFetchMissingRef.current;
|
|
20865
|
-
const optionsCountIncreased = currentOptions.length > prevOptionsCountBeforeFetchMissingRef.current;
|
|
20866
|
-
const optionsChanged = prevOptions !== currentOptions || optionsCountIncreased;
|
|
20867
|
-
const hasNewlyFetchedSelectedItems = (() => {
|
|
20868
|
-
if (selectedValues.length === 0 || !optionsChanged) {
|
|
20869
|
-
return false;
|
|
20870
|
-
}
|
|
20871
|
-
const previouslyMissingValues = selectedValues.filter(val => !(0, _utils.findValueInOptions)(prevOptions, val));
|
|
20872
|
-
if (previouslyMissingValues.length === 0) {
|
|
20873
|
-
return false;
|
|
20874
|
-
}
|
|
20875
|
-
const nowPresentValues = previouslyMissingValues.filter(val => (0, _utils.findValueInOptions)(currentOptions, val));
|
|
20876
|
-
return nowPresentValues.length > 0;
|
|
20877
|
-
})();
|
|
20878
|
-
if (optionsChanged && hasNewlyFetchedSelectedItems) {
|
|
20879
|
-
const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
|
|
20880
|
-
setOrderedOptions(reordered);
|
|
20881
|
-
}
|
|
20882
|
-
prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
|
|
20883
|
-
prevOptionsBeforeFetchMissingRef.current = currentOptions;
|
|
20884
|
-
}, [options, value, tempValue, fetchMissingOptions, staticValue]);
|
|
20885
|
-
(0, _react.useEffect)(() => {
|
|
20886
|
-
if (initialSortDoneRef.current || !(options != null && options.length)) {
|
|
20887
|
-
return;
|
|
20888
|
-
}
|
|
20889
|
-
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
20890
|
-
if (selectedValues.length === 0) {
|
|
20891
|
-
initialSortDoneRef.current = true;
|
|
20892
|
-
return;
|
|
20893
|
-
}
|
|
20894
|
-
const checkValueExists = (opts, val) => {
|
|
20895
|
-
for (const opt of opts) {
|
|
20896
|
-
if (opt.value === val) return true;
|
|
20897
|
-
if (opt.children && opt.children.length > 0) {
|
|
20898
|
-
if (checkValueExists(opt.children, val)) return true;
|
|
20899
|
-
}
|
|
20900
|
-
}
|
|
20901
|
-
return false;
|
|
20902
|
-
};
|
|
20903
|
-
const hasSelectedInOptions = selectedValues.some(val => checkValueExists(options, val));
|
|
20904
|
-
if (hasSelectedInOptions) {
|
|
20905
|
-
const reordered = (0, _utils.reorderOptionsBySelection)(options, selectedValues);
|
|
20906
|
-
setOrderedOptions(reordered);
|
|
20907
|
-
}
|
|
20908
|
-
initialSortDoneRef.current = true;
|
|
20909
|
-
}, [options, value]);
|
|
20910
|
-
const dataSource = (0, _react.useMemo)(() => {
|
|
20911
|
-
const sourceOptions = searchText.trim() ? mergedOptions : orderedOptions || mergedOptions;
|
|
20912
|
-
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
20913
|
-
const hasSearchQuery = searchText.trim().length > 0;
|
|
20914
|
-
|
|
20915
|
-
// For API-driven data, don't append virtual options during search
|
|
20916
|
-
// Only show search results when searching
|
|
20917
|
-
const shouldAppendVirtualOptions = staticValue || !hasSearchQuery;
|
|
20918
|
-
const missingSelectedValues = [];
|
|
20919
|
-
if (shouldAppendVirtualOptions && selectedValues.length > 0) {
|
|
20920
|
-
selectedValues.forEach(val => {
|
|
20921
|
-
if (!(0, _utils.findValueInOptions)(sourceOptions, val)) {
|
|
20922
|
-
missingSelectedValues.push(val);
|
|
20923
|
-
}
|
|
20924
|
-
});
|
|
20925
|
-
}
|
|
20926
|
-
const virtualOptions = missingSelectedValues.map(val => {
|
|
20927
|
-
const cachedOption = selectedItemsCacheRef.current.get(val);
|
|
20928
|
-
return _extends({
|
|
20929
|
-
value: val,
|
|
20930
|
-
label: (cachedOption == null ? void 0 : cachedOption.label) || String(val),
|
|
20931
|
-
key: (cachedOption == null ? void 0 : cachedOption.key) || val,
|
|
20932
|
-
title: cachedOption == null ? void 0 : cachedOption.title,
|
|
20933
|
-
optionSuffix: cachedOption == null ? void 0 : cachedOption.optionSuffix,
|
|
20934
|
-
optionSuffixInfo: cachedOption == null ? void 0 : cachedOption.optionSuffixInfo,
|
|
20935
|
-
optionTooltipInfo: cachedOption == null ? void 0 : cachedOption.optionTooltipInfo,
|
|
20936
|
-
disabled: cachedOption == null ? void 0 : cachedOption.disabled
|
|
20937
|
-
}, (cachedOption == null ? void 0 : cachedOption.children) && {
|
|
20938
|
-
children: cachedOption.children
|
|
20939
|
-
});
|
|
20940
|
-
});
|
|
20941
|
-
const allOptions = hasSearchQuery ? [...sourceOptions, ...virtualOptions] : [...virtualOptions, ...sourceOptions];
|
|
20942
|
-
if (!(allOptions != null && allOptions.length)) return [];
|
|
20943
|
-
const enhanceOptions = opts => opts.map(opt => {
|
|
20944
|
-
const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
20945
|
-
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
20946
|
-
justify: "space-between",
|
|
20947
|
-
align: "middle",
|
|
20948
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20949
|
-
className: _styles.default['cap-unified-select-option-label'],
|
|
20950
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
20951
|
-
type: "label14",
|
|
20952
|
-
children: opt == null ? void 0 : opt.label
|
|
20953
|
-
})
|
|
20954
|
-
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20955
|
-
className: _styles.default['cap-unified-select-option-end'],
|
|
20956
|
-
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
20957
|
-
className: _styles.default['cap-unified-select-option-suffix'],
|
|
20958
|
-
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
20959
|
-
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
20960
|
-
})]
|
|
20961
|
-
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
20962
|
-
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
20963
|
-
})]
|
|
20964
|
-
})]
|
|
20965
|
-
});
|
|
20966
|
-
return _extends({}, opt, {
|
|
20967
|
-
title: decoratedTitle,
|
|
20968
|
-
label: opt == null ? void 0 : opt.label,
|
|
20969
|
-
children: opt != null && opt.children ? enhanceOptions(opt.children) : []
|
|
20970
|
-
});
|
|
20971
|
-
});
|
|
20972
|
-
return isTree ? enhanceOptions(allOptions) : allOptions.map(opt => _extends({}, opt, {
|
|
20973
|
-
title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
20974
|
-
className: _styles.default['cap-unified-select-option-with-suffix'],
|
|
20975
|
-
justify: "space-between",
|
|
20976
|
-
align: "middle",
|
|
20977
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
20978
|
-
className: _styles.default['cap-unified-select-option-label'],
|
|
20979
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
20980
|
-
type: "label14",
|
|
20981
|
-
children: opt == null ? void 0 : opt.label
|
|
20982
|
-
})
|
|
20983
|
-
}), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
20984
|
-
className: _styles.default['cap-unified-select-option-end'],
|
|
20985
|
-
children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
20986
|
-
className: _styles.default['cap-unified-select-option-suffix'],
|
|
20987
|
-
children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
20988
|
-
title: opt == null ? void 0 : opt.optionSuffixInfo
|
|
20989
|
-
})]
|
|
20990
|
-
}), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
20991
|
-
title: opt == null ? void 0 : opt.optionTooltipInfo
|
|
20992
|
-
})]
|
|
20993
|
-
})]
|
|
20994
|
-
}),
|
|
20995
|
-
label: opt == null ? void 0 : opt.label
|
|
20996
|
-
}));
|
|
20997
|
-
}, [isTree, mergedOptions, orderedOptions, searchText, value, staticValue]);
|
|
20998
|
-
const filteredTree = (0, _react.useMemo)(() => {
|
|
20999
|
-
const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
21000
|
-
return (0, _utils.filterTreeData)(dataSource, searchText.trim(), searchBasedOn, selectedValues.length > 0 ? selectedValues : undefined);
|
|
21001
|
-
}, [dataSource, searchText, searchBasedOn, tempValue]);
|
|
21002
|
-
const treeMaps = (0, _react.useMemo)(() => (0, _utils.buildTreeMaps)(options), [options]);
|
|
21003
|
-
const selectedLeafCount = (0, _react.useMemo)(() => (0, _utils.countSelectedLeaves)(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
|
|
21004
|
-
const displayValue = dropdownOpen ? tempValue : value;
|
|
21005
|
-
const suffix = (0, _react.useMemo)(() => {
|
|
21006
|
-
const count = Array.isArray(displayValue) ? displayValue == null ? void 0 : displayValue.length : displayValue ? 1 : 0;
|
|
21007
|
-
const renderTooltipTitle = values => {
|
|
21008
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21009
|
-
className: _styles.default['cap-unified-select-more-tooltip-content'],
|
|
21010
|
-
children: values.map((val, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21011
|
-
children: val
|
|
21012
|
-
}, "cap-unified-select-tooltip-item-" + val + "-" + idx))
|
|
21013
|
-
});
|
|
21014
|
-
};
|
|
21015
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
21016
|
-
children: [isMulti && count > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
21017
|
-
className: _styles.default['cap-unified-select-more-text'],
|
|
21018
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltip.default, {
|
|
21019
|
-
title: renderTooltipTitle(Array.isArray(displayValue) ? displayValue.slice(1) : []),
|
|
21020
|
-
placement: "bottom",
|
|
21021
|
-
overlayClassName: _styles.default['cap-unified-select-more-tooltip'],
|
|
21022
|
-
arrowPointAtCenter: true,
|
|
21023
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
21024
|
-
children: ["+", count - 1, " more"]
|
|
21025
|
-
})
|
|
21026
|
-
})
|
|
21027
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
21028
|
-
className: _styles.default['cap-unified-select-suffix-icon'],
|
|
21029
|
-
type: dropdownOpen ? 'up' : 'down',
|
|
21030
|
-
size: "xs"
|
|
21031
|
-
})]
|
|
21032
|
-
});
|
|
21033
|
-
}, [isMulti, displayValue, dropdownOpen]);
|
|
21034
|
-
const prefix = (0, _react.useMemo)(() => {
|
|
21035
|
-
if (isMulti && Array.isArray(displayValue) && (displayValue == null ? void 0 : displayValue.length) > 0) {
|
|
21036
|
-
var _treeMaps$nodeMap;
|
|
21037
|
-
const firstLeafValue = displayValue.find(val => {
|
|
21038
|
-
var _treeMaps$leafValues;
|
|
21039
|
-
return treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.includes(val);
|
|
21040
|
-
});
|
|
21041
|
-
return firstLeafValue ? (treeMaps == null || (_treeMaps$nodeMap = treeMaps.nodeMap) == null || (_treeMaps$nodeMap = _treeMaps$nodeMap[firstLeafValue]) == null ? void 0 : _treeMaps$nodeMap.label) || null : null;
|
|
21042
|
-
}
|
|
21043
|
-
return null;
|
|
21044
|
-
}, [isMulti, displayValue, treeMaps]);
|
|
21045
|
-
const handleConfirm = (0, _react.useCallback)(() => {
|
|
21046
|
-
hasInteractedRef.current = true;
|
|
21047
|
-
const optionsToReorder = mergedOptions;
|
|
21048
|
-
if (isMulti && Array.isArray(tempValue) && tempValue.length > 0) {
|
|
21049
|
-
const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, tempValue);
|
|
21050
|
-
setOrderedOptions(reordered);
|
|
21051
|
-
} else if (!isMulti && tempValue && !Array.isArray(tempValue)) {
|
|
21052
|
-
// For single select, move selected item to top
|
|
21053
|
-
const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, [tempValue]);
|
|
21054
|
-
setOrderedOptions(reordered);
|
|
21055
|
-
} else {
|
|
21056
|
-
// No selection, reset to original order
|
|
21057
|
-
setOrderedOptions(null);
|
|
21058
|
-
}
|
|
21059
|
-
onChange == null || onChange(tempValue);
|
|
21060
|
-
setDropdownOpen(false);
|
|
21061
|
-
setIsSearching(false);
|
|
21062
|
-
searchClearedTimeRef.current = null;
|
|
21063
|
-
if (resetSearch) {
|
|
21064
|
-
setSearchText('');
|
|
21065
|
-
lastSearchQueryRef.current = '';
|
|
21066
|
-
}
|
|
21067
|
-
if (resetData && mergedOptions.length > 0) {
|
|
21068
|
-
prevOptionsBeforeResetRef.current = mergedOptions;
|
|
21069
|
-
setIsResettingData(true);
|
|
21070
|
-
resetDataCalledRef.current = true;
|
|
21071
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
21072
|
-
resetData();
|
|
21073
|
-
}
|
|
21074
|
-
onConfirm == null || onConfirm(tempValue);
|
|
21075
|
-
}, [onChange, onConfirm, tempValue, resetSearch, isMulti, mergedOptions, resetData]);
|
|
21076
|
-
const handleClearAll = (0, _react.useCallback)(() => {
|
|
21077
|
-
// Reset all state as if it's a fresh dropdown
|
|
21078
|
-
const cleared = isMulti ? [] : undefined;
|
|
21079
|
-
|
|
21080
|
-
// Clear search state
|
|
21081
|
-
setSearchText('');
|
|
21082
|
-
setIsSearching(false);
|
|
21083
|
-
lastSearchQueryRef.current = '';
|
|
21084
|
-
searchClearedTimeRef.current = null;
|
|
21085
|
-
|
|
21086
|
-
// Clear timeouts
|
|
21087
|
-
if (searchTimeoutRef.current) {
|
|
21088
|
-
clearTimeout(searchTimeoutRef.current);
|
|
21089
|
-
searchTimeoutRef.current = null;
|
|
21090
|
-
}
|
|
21091
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
21092
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
21093
|
-
scrollLoadingTimeoutRef.current = null;
|
|
21094
|
-
}
|
|
21095
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
21096
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
21097
|
-
scrollThrottleTimeoutRef.current = null;
|
|
21098
|
-
}
|
|
21099
|
-
|
|
21100
|
-
// Reset scroll state
|
|
21101
|
-
setIsLoadingOnScroll(false);
|
|
21102
|
-
isScrollProcessingRef.current = false;
|
|
21103
|
-
scrollContainerRef.current = null;
|
|
21104
|
-
|
|
21105
|
-
// Reset ordered options
|
|
21106
|
-
setOrderedOptions(null);
|
|
21107
|
-
initialSortDoneRef.current = false;
|
|
21108
|
-
|
|
21109
|
-
// Reset interaction flags
|
|
21110
|
-
hasInteractedRef.current = false;
|
|
21111
|
-
resetDataCalledRef.current = false;
|
|
21112
|
-
fetchMissingOptionsCalledRef.current = false;
|
|
21113
|
-
lastMissingValuesRef.current = '';
|
|
21114
|
-
|
|
21115
|
-
// Reset temp value and call onChange (same as allowClear X button)
|
|
21116
|
-
setTempValue(cleared);
|
|
21117
|
-
onChange == null || onChange(cleared);
|
|
21118
|
-
|
|
21119
|
-
// Close dropdown
|
|
21120
|
-
setDropdownOpen(false);
|
|
21121
|
-
|
|
21122
|
-
// Reset data if needed (same as allowClear X button behavior)
|
|
21123
|
-
if (resetData && options.length > 0) {
|
|
21124
|
-
prevOptionsBeforeResetRef.current = options;
|
|
21125
|
-
setIsResettingData(true);
|
|
21126
|
-
resetDataCalledRef.current = true;
|
|
21127
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
21128
|
-
resetData();
|
|
21129
|
-
}
|
|
21130
|
-
}, [isMulti, onChange, resetData, options]);
|
|
21131
|
-
const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
|
|
21132
|
-
if (readOnly || disabled) {
|
|
21133
|
-
return;
|
|
21134
|
-
}
|
|
21135
|
-
if (open) {
|
|
21136
|
-
initialTempValueRef.current = value;
|
|
21137
|
-
hasInteractedRef.current = false;
|
|
21138
|
-
resetDataCalledRef.current = false;
|
|
21139
|
-
fetchMissingOptionsCalledRef.current = false;
|
|
21140
|
-
lastMissingValuesRef.current = '';
|
|
21141
|
-
if (searchTimeoutRef.current) {
|
|
21142
|
-
clearTimeout(searchTimeoutRef.current);
|
|
21143
|
-
searchTimeoutRef.current = null;
|
|
21144
|
-
}
|
|
21145
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
21146
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
21147
|
-
scrollLoadingTimeoutRef.current = null;
|
|
21148
|
-
}
|
|
21149
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
21150
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
21151
|
-
scrollThrottleTimeoutRef.current = null;
|
|
21152
|
-
}
|
|
21153
|
-
setIsSearching(false);
|
|
21154
|
-
searchClearedTimeRef.current = null;
|
|
21155
|
-
setIsLoadingOnScroll(false);
|
|
21156
|
-
isScrollProcessingRef.current = false;
|
|
21157
|
-
if (isResettingData) {
|
|
21158
|
-
setIsResettingData(false);
|
|
21159
|
-
prevOptionsBeforeResetRef.current = options;
|
|
21160
|
-
resetDataCalledTimeRef.current = null;
|
|
21161
|
-
}
|
|
21162
|
-
} else {
|
|
21163
|
-
if (!customPopupRender) {
|
|
21164
|
-
onChange == null || onChange(tempValue);
|
|
21165
|
-
} else {
|
|
21166
|
-
setTempValue(value);
|
|
21167
|
-
}
|
|
21168
|
-
if (resetSearch) {
|
|
21169
|
-
setSearchText('');
|
|
21170
|
-
setIsSearching(false);
|
|
21171
|
-
lastSearchQueryRef.current = '';
|
|
21172
|
-
searchClearedTimeRef.current = null;
|
|
21173
|
-
}
|
|
21174
|
-
setIsLoadingOnScroll(false);
|
|
21175
|
-
isScrollProcessingRef.current = false;
|
|
21176
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
21177
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
21178
|
-
scrollLoadingTimeoutRef.current = null;
|
|
21179
|
-
}
|
|
21180
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
21181
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
21182
|
-
scrollThrottleTimeoutRef.current = null;
|
|
21183
|
-
}
|
|
21184
|
-
scrollContainerRef.current = null;
|
|
21185
|
-
if (resetData && hasInteractedRef.current && !resetDataCalledRef.current && options.length > 0) {
|
|
21186
|
-
prevOptionsBeforeResetRef.current = options;
|
|
21187
|
-
setIsResettingData(true);
|
|
21188
|
-
resetDataCalledRef.current = true;
|
|
21189
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
21190
|
-
resetData();
|
|
21191
|
-
} else if (!hasInteractedRef.current) {
|
|
21192
|
-
if (searchTimeoutRef.current) {
|
|
21193
|
-
clearTimeout(searchTimeoutRef.current);
|
|
21194
|
-
searchTimeoutRef.current = null;
|
|
21195
|
-
}
|
|
21196
|
-
setIsSearching(false);
|
|
21197
|
-
setIsResettingData(false);
|
|
21198
|
-
lastSearchQueryRef.current = '';
|
|
21199
|
-
}
|
|
21200
|
-
hasInteractedRef.current = false;
|
|
21201
|
-
}
|
|
21202
|
-
setDropdownOpen(open);
|
|
21203
|
-
}, [customPopupRender, value, onChange, tempValue, readOnly, disabled, resetSearch, resetData, options, isResettingData]);
|
|
21204
|
-
const handleFooterDownload = (0, _react.useCallback)(() => {
|
|
21205
|
-
const currentValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
21206
|
-
onFooterDownloadChange == null || onFooterDownloadChange(currentValues);
|
|
21207
|
-
}, [tempValue, onFooterDownloadChange]);
|
|
21208
|
-
const handleUpload = (0, _react.useCallback)(() => {
|
|
21209
|
-
onUpload == null || onUpload();
|
|
21210
|
-
setDropdownOpen(false);
|
|
21211
|
-
}, [onUpload]);
|
|
21212
|
-
const handleSearchChange = (0, _react.useCallback)(e => {
|
|
21213
|
-
const query = e.target.value;
|
|
21214
|
-
setSearchText(query);
|
|
21215
|
-
handleSearch(query);
|
|
21216
|
-
}, [handleSearch]);
|
|
21217
|
-
const handleSearchKeyDown = (0, _react.useCallback)(e => {
|
|
21218
|
-
if (e.key === 'Backspace' || e.key === 'Delete') {
|
|
21219
|
-
e.stopPropagation();
|
|
21220
|
-
}
|
|
21221
|
-
if (e.key === 'Escape' && searchText.length > 0) {
|
|
21222
|
-
e.stopPropagation();
|
|
21223
|
-
}
|
|
21224
|
-
}, [searchText]);
|
|
21225
|
-
const handleScroll = (0, _react.useCallback)(event => {
|
|
21226
|
-
if (!onPopupScroll) return;
|
|
21227
|
-
const target = event.target;
|
|
21228
|
-
if (!target) return;
|
|
21229
|
-
const isNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
|
|
21230
|
-
if (!isNearBottom) {
|
|
21231
|
-
isScrollProcessingRef.current = false;
|
|
21232
|
-
return;
|
|
21233
|
-
}
|
|
21234
|
-
if (isScrollProcessingRef.current) return;
|
|
21235
|
-
if (isLoadingOnScroll) return;
|
|
21236
|
-
if (!hasMore) {
|
|
21237
|
-
isScrollProcessingRef.current = false;
|
|
21238
|
-
return;
|
|
21239
|
-
}
|
|
21240
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
21241
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
21242
|
-
}
|
|
21243
|
-
isScrollProcessingRef.current = true;
|
|
21244
|
-
scrollThrottleTimeoutRef.current = setTimeout(() => {
|
|
21245
|
-
const stillNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
|
|
21246
|
-
if (!stillNearBottom || isLoadingOnScroll || !hasMore) {
|
|
21247
|
-
isScrollProcessingRef.current = false;
|
|
21248
|
-
return;
|
|
21249
|
-
}
|
|
21250
|
-
const currentOptions = optionsRef.current;
|
|
21251
|
-
prevOptionsCountRef.current = currentOptions.length;
|
|
21252
|
-
prevOptionsRefForScroll.current = currentOptions;
|
|
21253
|
-
scrollTriggerOptionsCountRef.current = currentOptions.length;
|
|
21254
|
-
setIsLoadingOnScroll(true);
|
|
21255
|
-
if (scrollLoadingTimeoutRef.current) {
|
|
21256
|
-
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
21257
|
-
scrollLoadingTimeoutRef.current = null;
|
|
21258
|
-
}
|
|
21259
|
-
hasInteractedRef.current = true;
|
|
21260
|
-
onPopupScroll();
|
|
21261
|
-
scrollLoadingTimeoutRef.current = setTimeout(() => {
|
|
21262
|
-
setIsLoadingOnScroll(prev => {
|
|
21263
|
-
if (prev) {
|
|
21264
|
-
scrollLoadingTimeoutRef.current = null;
|
|
21265
|
-
isScrollProcessingRef.current = false;
|
|
21266
|
-
return false;
|
|
21267
|
-
}
|
|
21268
|
-
return prev;
|
|
21269
|
-
});
|
|
21270
|
-
}, _constants.TIMEOUTS.SCROLL_LOADING_TIMEOUT);
|
|
21271
|
-
}, 150);
|
|
21272
|
-
}, [onPopupScroll, isLoadingOnScroll, hasMore]);
|
|
21273
|
-
(0, _react.useEffect)(() => {
|
|
21274
|
-
if (!onPopupScroll || !dropdownOpen) return;
|
|
21275
|
-
const timeoutId = setTimeout(() => {
|
|
21276
|
-
const findScrollContainer = () => {
|
|
21277
|
-
const dropdowns = document.querySelectorAll('.ant-select-dropdown:not(.ant-select-dropdown-hidden)');
|
|
21278
|
-
if (dropdowns.length === 0) return null;
|
|
21279
|
-
const dropdown = Array.from(dropdowns).pop();
|
|
21280
|
-
if (!dropdown) return null;
|
|
21281
|
-
const treeList = dropdown.querySelector('.ant-select-tree-list-holder');
|
|
21282
|
-
if (treeList && treeList.scrollHeight > treeList.clientHeight) {
|
|
21283
|
-
return treeList;
|
|
21284
|
-
}
|
|
21285
|
-
const virtualList = dropdown.querySelector('.rc-virtual-list-holder');
|
|
21286
|
-
if (virtualList && virtualList.scrollHeight > virtualList.clientHeight) {
|
|
21287
|
-
return virtualList;
|
|
21288
|
-
}
|
|
21289
|
-
if (dropdown.scrollHeight > dropdown.clientHeight) {
|
|
21290
|
-
return dropdown;
|
|
21291
|
-
}
|
|
21292
|
-
return null;
|
|
21293
|
-
};
|
|
21294
|
-
const scrollContainer = findScrollContainer();
|
|
21295
|
-
if (scrollContainer) {
|
|
21296
|
-
scrollContainerRef.current = scrollContainer;
|
|
21297
|
-
scrollContainer.addEventListener('scroll', handleScroll, {
|
|
21298
|
-
passive: true
|
|
21299
|
-
});
|
|
21300
|
-
}
|
|
21301
|
-
}, _constants.TIMEOUTS.SCROLL_CONTAINER_DELAY);
|
|
21302
|
-
return () => {
|
|
21303
|
-
clearTimeout(timeoutId);
|
|
21304
|
-
if (scrollThrottleTimeoutRef.current) {
|
|
21305
|
-
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
21306
|
-
scrollThrottleTimeoutRef.current = null;
|
|
21307
|
-
}
|
|
21308
|
-
if (scrollContainerRef.current) {
|
|
21309
|
-
scrollContainerRef.current.removeEventListener('scroll', handleScroll);
|
|
21310
|
-
scrollContainerRef.current = null;
|
|
21311
|
-
}
|
|
21312
|
-
isScrollProcessingRef.current = false;
|
|
21123
|
+
|
|
21124
|
+
/***/ 5346:
|
|
21125
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
21126
|
+
|
|
21127
|
+
"use strict";
|
|
21128
|
+
|
|
21129
|
+
|
|
21130
|
+
exports.__esModule = true;
|
|
21131
|
+
exports["default"] = void 0;
|
|
21132
|
+
var _CapDivider = _interopRequireDefault(__webpack_require__(4795));
|
|
21133
|
+
exports["default"] = _CapDivider.default;
|
|
21134
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21135
|
+
|
|
21136
|
+
/***/ }),
|
|
21137
|
+
|
|
21138
|
+
/***/ 5353:
|
|
21139
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
21140
|
+
|
|
21141
|
+
"use strict";
|
|
21142
|
+
|
|
21143
|
+
|
|
21144
|
+
exports.__esModule = true;
|
|
21145
|
+
exports["default"] = void 0;
|
|
21146
|
+
var _antdV = __webpack_require__(4273);
|
|
21147
|
+
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
21148
|
+
var _react = _interopRequireWildcard(__webpack_require__(9206));
|
|
21149
|
+
var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
|
|
21150
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
|
|
21151
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(7375));
|
|
21152
|
+
var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
|
|
21153
|
+
var _constants = __webpack_require__(9788);
|
|
21154
|
+
var _CustomDropdown = __webpack_require__(8033);
|
|
21155
|
+
var _DropdownHeader = __webpack_require__(9315);
|
|
21156
|
+
var _enhanceOptions = __webpack_require__(1879);
|
|
21157
|
+
var _styles = _interopRequireDefault(__webpack_require__(8263));
|
|
21158
|
+
var _useCapUnifiedSelect = __webpack_require__(480);
|
|
21159
|
+
var _jsxRuntime = __webpack_require__(4848);
|
|
21160
|
+
const _excluded = ["type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "uploadLabel", "tooltip", "bylineText", "disabled", "showUpload", "customPopupRender", "showSearch", "searchBasedOn", "onSearch", "searchDebounce", "onConfirm", "clearText", "noResultCustomText", "noResultCustomIcon", "readOnly", "staticValue", "onFooterDownloadChange", "onPopupScroll", "hasMore", "enableVirtualization", "virtualRowHeight", "resetSearch", "resetData", "fetchMissingOptions"];
|
|
21161
|
+
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); }
|
|
21162
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21163
|
+
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); }
|
|
21164
|
+
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; }
|
|
21165
|
+
const CapUnifiedSelect = _ref => {
|
|
21166
|
+
let {
|
|
21167
|
+
type = _constants.SELECT_TYPES.SELECT,
|
|
21168
|
+
options = [],
|
|
21169
|
+
value,
|
|
21170
|
+
onChange,
|
|
21171
|
+
placeholder = _constants.DEFAULTS.PLACEHOLDER,
|
|
21172
|
+
className = '',
|
|
21173
|
+
style,
|
|
21174
|
+
isError = false,
|
|
21175
|
+
errorMessage,
|
|
21176
|
+
containerClassName,
|
|
21177
|
+
popoverClassName,
|
|
21178
|
+
allowClear = false,
|
|
21179
|
+
headerLabel,
|
|
21180
|
+
onUpload,
|
|
21181
|
+
uploadLabel = _constants.DEFAULTS.UPLOAD_LABEL,
|
|
21182
|
+
tooltip,
|
|
21183
|
+
bylineText,
|
|
21184
|
+
disabled = false,
|
|
21185
|
+
showUpload = false,
|
|
21186
|
+
customPopupRender = true,
|
|
21187
|
+
showSearch = true,
|
|
21188
|
+
searchBasedOn = 'label',
|
|
21189
|
+
onSearch,
|
|
21190
|
+
searchDebounce = _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE,
|
|
21191
|
+
onConfirm,
|
|
21192
|
+
clearText = _constants.DEFAULTS.CLEAR_TEXT,
|
|
21193
|
+
noResultCustomText = _constants.DEFAULTS.NO_RESULT_TEXT,
|
|
21194
|
+
noResultCustomIcon = _constants.DEFAULTS.NO_RESULT_ICON,
|
|
21195
|
+
readOnly = false,
|
|
21196
|
+
staticValue = true,
|
|
21197
|
+
onFooterDownloadChange,
|
|
21198
|
+
onPopupScroll,
|
|
21199
|
+
hasMore = true,
|
|
21200
|
+
enableVirtualization = false,
|
|
21201
|
+
virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
|
|
21202
|
+
resetSearch = true,
|
|
21203
|
+
resetData,
|
|
21204
|
+
fetchMissingOptions
|
|
21205
|
+
} = _ref,
|
|
21206
|
+
rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
21207
|
+
const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
|
|
21208
|
+
const {
|
|
21209
|
+
searchText,
|
|
21210
|
+
tempValue,
|
|
21211
|
+
setTempValue,
|
|
21212
|
+
dropdownOpen,
|
|
21213
|
+
isSearching,
|
|
21214
|
+
isLoadingOnScroll,
|
|
21215
|
+
isResettingData,
|
|
21216
|
+
filteredTree: rawFilteredTree,
|
|
21217
|
+
treeMaps,
|
|
21218
|
+
selectedLeafCount,
|
|
21219
|
+
displayValue,
|
|
21220
|
+
handleSearchChange,
|
|
21221
|
+
handleSearchKeyDown,
|
|
21222
|
+
handleConfirm,
|
|
21223
|
+
handleClearAll,
|
|
21224
|
+
handleDropdownVisibilityChange,
|
|
21225
|
+
handleSingleSelectChange,
|
|
21226
|
+
handleMultiSelectChange
|
|
21227
|
+
} = (0, _useCapUnifiedSelect.useCapUnifiedSelect)({
|
|
21228
|
+
type,
|
|
21229
|
+
options,
|
|
21230
|
+
value,
|
|
21231
|
+
onChange,
|
|
21232
|
+
staticValue,
|
|
21233
|
+
onSearch,
|
|
21234
|
+
searchDebounce,
|
|
21235
|
+
searchBasedOn,
|
|
21236
|
+
onConfirm,
|
|
21237
|
+
resetSearch,
|
|
21238
|
+
resetData,
|
|
21239
|
+
fetchMissingOptions,
|
|
21240
|
+
onPopupScroll,
|
|
21241
|
+
hasMore,
|
|
21242
|
+
customPopupRender,
|
|
21243
|
+
isMulti,
|
|
21244
|
+
disabled
|
|
21245
|
+
});
|
|
21246
|
+
|
|
21247
|
+
// Enhance filtered tree with React components
|
|
21248
|
+
const filteredTree = (0, _react.useMemo)(() => {
|
|
21249
|
+
if (!(rawFilteredTree != null && rawFilteredTree.length)) return [];
|
|
21250
|
+
return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type);
|
|
21251
|
+
}, [rawFilteredTree, type]);
|
|
21252
|
+
|
|
21253
|
+
// Suffix icon with "more" tooltip
|
|
21254
|
+
const suffix = (0, _react.useMemo)(() => {
|
|
21255
|
+
const count = Array.isArray(displayValue) ? displayValue == null ? void 0 : displayValue.length : displayValue ? 1 : 0;
|
|
21256
|
+
const renderTooltipTitle = values => {
|
|
21257
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21258
|
+
className: _styles.default['cap-unified-select-more-tooltip-content'],
|
|
21259
|
+
children: values.map((val, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21260
|
+
children: val
|
|
21261
|
+
}, "cap-unified-select-tooltip-item-" + val + "-" + idx))
|
|
21262
|
+
});
|
|
21313
21263
|
};
|
|
21314
|
-
}, [onPopupScroll, dropdownOpen, handleScroll]);
|
|
21315
|
-
const renderHeader = (0, _react.useMemo)(() => {
|
|
21316
|
-
if (!headerLabel && !tooltip) return null;
|
|
21317
21264
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
21318
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.
|
|
21319
|
-
className:
|
|
21320
|
-
children:
|
|
21321
|
-
|
|
21322
|
-
|
|
21323
|
-
|
|
21324
|
-
|
|
21325
|
-
|
|
21326
|
-
|
|
21327
|
-
iconProps: {
|
|
21328
|
-
disabled
|
|
21329
|
-
}
|
|
21330
|
-
})]
|
|
21331
|
-
}), bylineText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21332
|
-
className: _styles.default['cap-unified-select-header-byline-text'],
|
|
21333
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
21334
|
-
className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-byline-text']),
|
|
21335
|
-
children: bylineText
|
|
21336
|
-
})
|
|
21337
|
-
})]
|
|
21338
|
-
});
|
|
21339
|
-
}, [headerLabel, tooltip, bylineText, disabled]);
|
|
21340
|
-
const renderCustomDropdown = (0, _react.useCallback)(menu => {
|
|
21341
|
-
if (!customPopupRender) return menu;
|
|
21342
|
-
const currentItems = filteredTree;
|
|
21343
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21344
|
-
className: (0, _classnames.default)(popoverClassName, _styles.default[type + "-popup-container"]),
|
|
21345
|
-
children: [showSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21346
|
-
className: _styles.default['cap-unified-select-search-container'],
|
|
21347
|
-
align: "middle",
|
|
21348
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Input, {
|
|
21349
|
-
prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
21350
|
-
type: "search",
|
|
21351
|
-
size: "s",
|
|
21352
|
-
className: _styles.default['cap-unified-select-search-icon']
|
|
21353
|
-
}),
|
|
21354
|
-
placeholder: _constants.DEFAULTS.SEARCH_PLACEHOLDER,
|
|
21355
|
-
variant: "borderless",
|
|
21356
|
-
value: searchText,
|
|
21357
|
-
onChange: handleSearchChange,
|
|
21358
|
-
onKeyDown: handleSearchKeyDown,
|
|
21359
|
-
allowClear: true,
|
|
21360
|
-
disabled: disabled
|
|
21361
|
-
})
|
|
21362
|
-
}), isMulti && showUpload && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
21363
|
-
className: _styles.default['cap-unified-select-upload-container'],
|
|
21364
|
-
align: "middle",
|
|
21365
|
-
onClick: handleUpload,
|
|
21366
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
21367
|
-
type: "upload",
|
|
21368
|
-
size: "s",
|
|
21369
|
-
className: _styles.default['cap-unified-select-upload-icon']
|
|
21370
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
21371
|
-
type: "label14",
|
|
21372
|
-
className: _styles.default['cap-unified-select-upload-label'],
|
|
21373
|
-
children: uploadLabel
|
|
21374
|
-
})]
|
|
21375
|
-
}), isMulti && staticValue && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectAllCheckbox, {
|
|
21376
|
-
currentItems: currentItems,
|
|
21377
|
-
tempValue: Array.isArray(tempValue) ? tempValue : undefined,
|
|
21378
|
-
setTempValue: val => setTempValue(val),
|
|
21379
|
-
processTreeData: _utils.buildTreeMaps,
|
|
21380
|
-
disabled: disabled
|
|
21381
|
-
}), currentItems.length === 0 ? isSearching || isResettingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21382
|
-
className: _styles.default['cap-unified-select-loading-container'],
|
|
21383
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21384
|
-
align: "middle",
|
|
21385
|
-
justify: "center",
|
|
21386
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
21387
|
-
size: "small"
|
|
21388
|
-
})
|
|
21389
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21390
|
-
align: "middle",
|
|
21391
|
-
justify: "center",
|
|
21392
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
21393
|
-
type: "label14",
|
|
21394
|
-
children: "Loading..."
|
|
21265
|
+
children: [isMulti && count > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
21266
|
+
className: _styles.default['cap-unified-select-more-text'],
|
|
21267
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltip.default, {
|
|
21268
|
+
title: renderTooltipTitle(Array.isArray(displayValue) ? displayValue.slice(1) : []),
|
|
21269
|
+
placement: "bottom",
|
|
21270
|
+
overlayClassName: _styles.default['cap-unified-select-more-tooltip'],
|
|
21271
|
+
arrowPointAtCenter: true,
|
|
21272
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
|
|
21273
|
+
children: ["+", count - 1, " more"]
|
|
21395
21274
|
})
|
|
21396
|
-
})]
|
|
21397
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoResult, {
|
|
21398
|
-
noResultCustomText: noResultCustomText,
|
|
21399
|
-
className: className,
|
|
21400
|
-
showUpload: showUpload,
|
|
21401
|
-
options: options,
|
|
21402
|
-
noResultCustomIcon: noResultCustomIcon
|
|
21403
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21404
|
-
className: _styles.default['cap-unified-select-menu-wrapper'],
|
|
21405
|
-
children: [menu, (isSearching || isResettingData) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21406
|
-
className: _styles.default['cap-unified-select-loading-overlay'],
|
|
21407
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21408
|
-
align: "middle",
|
|
21409
|
-
justify: "center",
|
|
21410
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
21411
|
-
size: "small"
|
|
21412
|
-
})
|
|
21413
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21414
|
-
align: "middle",
|
|
21415
|
-
justify: "center",
|
|
21416
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
21417
|
-
type: "label14",
|
|
21418
|
-
children: "Loading..."
|
|
21419
|
-
})
|
|
21420
|
-
})]
|
|
21421
|
-
}), isLoadingOnScroll && onPopupScroll && hasMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21422
|
-
className: _styles.default['cap-unified-select-loading-overlay'],
|
|
21423
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21424
|
-
align: "middle",
|
|
21425
|
-
justify: "center",
|
|
21426
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
21427
|
-
size: "small"
|
|
21428
|
-
})
|
|
21429
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21430
|
-
align: "middle",
|
|
21431
|
-
justify: "center",
|
|
21432
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
21433
|
-
type: "label14",
|
|
21434
|
-
children: "Loading..."
|
|
21435
|
-
})
|
|
21436
|
-
})]
|
|
21437
|
-
})]
|
|
21438
|
-
}), currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
21439
|
-
className: _styles.default['cap-unified-select-confirm-container'],
|
|
21440
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
21441
|
-
className: _styles.default['cap-unified-select-confirm-button-group'],
|
|
21442
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
|
|
21443
|
-
type: "primary",
|
|
21444
|
-
size: "small",
|
|
21445
|
-
className: _styles.default['cap-unified-select-confirm-button'],
|
|
21446
|
-
onClick: handleConfirm,
|
|
21447
|
-
disabled: disabled || selectedLeafCount === 0,
|
|
21448
|
-
children: "Confirm"
|
|
21449
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
|
|
21450
|
-
type: "text",
|
|
21451
|
-
className: _styles.default['cap-unified-select-cancel-button'],
|
|
21452
|
-
size: "small",
|
|
21453
|
-
onClick: handleClearAll,
|
|
21454
|
-
disabled: disabled,
|
|
21455
|
-
children: clearText
|
|
21456
|
-
}), onFooterDownloadChange && selectedLeafCount > 0 && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
21457
|
-
className: _styles.default['cap-unified-select-footer-download-container'],
|
|
21458
|
-
align: "middle",
|
|
21459
|
-
onClick: handleFooterDownload,
|
|
21460
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
21461
|
-
type: "download",
|
|
21462
|
-
size: "s",
|
|
21463
|
-
className: _styles.default['cap-unified-select-footer-download-icon']
|
|
21464
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
|
|
21465
|
-
className: _styles.default['cap-unified-select-footer-download-label'],
|
|
21466
|
-
children: [selectedLeafCount, " selected"]
|
|
21467
|
-
})]
|
|
21468
|
-
})]
|
|
21469
|
-
})
|
|
21470
|
-
}), (type === _constants.SELECT_TYPES.SELECT || type === _constants.SELECT_TYPES.TREE_SELECT) && allowClear && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
21471
|
-
className: _styles.default['cap-unified-select-tree-clear-container'],
|
|
21472
|
-
onClick: handleClearAll,
|
|
21473
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
21474
|
-
className: _styles.default['cap-unified-select-tree-clear-label'],
|
|
21475
|
-
children: clearText
|
|
21476
21275
|
})
|
|
21276
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
21277
|
+
className: _styles.default['cap-unified-select-suffix-icon'],
|
|
21278
|
+
type: dropdownOpen ? 'up' : 'down',
|
|
21279
|
+
size: "xs"
|
|
21477
21280
|
})]
|
|
21478
21281
|
});
|
|
21479
|
-
}, [
|
|
21282
|
+
}, [isMulti, displayValue, dropdownOpen]);
|
|
21283
|
+
|
|
21284
|
+
// Prefix for multi-select (first selected item label)
|
|
21285
|
+
const prefix = (0, _react.useMemo)(() => {
|
|
21286
|
+
if (isMulti && Array.isArray(displayValue) && (displayValue == null ? void 0 : displayValue.length) > 0) {
|
|
21287
|
+
var _treeMaps$nodeMap;
|
|
21288
|
+
const firstLeafValue = displayValue.find(val => {
|
|
21289
|
+
var _treeMaps$leafValues;
|
|
21290
|
+
return treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.includes(val);
|
|
21291
|
+
});
|
|
21292
|
+
return firstLeafValue ? (treeMaps == null || (_treeMaps$nodeMap = treeMaps.nodeMap) == null || (_treeMaps$nodeMap = _treeMaps$nodeMap[firstLeafValue]) == null ? void 0 : _treeMaps$nodeMap.label) || null : null;
|
|
21293
|
+
}
|
|
21294
|
+
return null;
|
|
21295
|
+
}, [isMulti, displayValue, treeMaps]);
|
|
21296
|
+
|
|
21297
|
+
// Handle upload
|
|
21298
|
+
const handleUpload = () => {
|
|
21299
|
+
onUpload == null || onUpload();
|
|
21300
|
+
handleDropdownVisibilityChange(false);
|
|
21301
|
+
};
|
|
21302
|
+
|
|
21303
|
+
// Render custom dropdown
|
|
21304
|
+
const renderCustomDropdown = menu => {
|
|
21305
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomDropdown.CustomDropdown, {
|
|
21306
|
+
menu: menu,
|
|
21307
|
+
customPopupRender: customPopupRender,
|
|
21308
|
+
filteredTree: filteredTree,
|
|
21309
|
+
searchText: searchText,
|
|
21310
|
+
showSearch: showSearch,
|
|
21311
|
+
handleSearchChange: handleSearchChange,
|
|
21312
|
+
handleSearchKeyDown: handleSearchKeyDown,
|
|
21313
|
+
disabled: disabled,
|
|
21314
|
+
isMulti: isMulti,
|
|
21315
|
+
showUpload: showUpload,
|
|
21316
|
+
uploadLabel: uploadLabel,
|
|
21317
|
+
handleUpload: handleUpload,
|
|
21318
|
+
staticValue: staticValue,
|
|
21319
|
+
tempValue: tempValue,
|
|
21320
|
+
setTempValue: setTempValue,
|
|
21321
|
+
isSearching: isSearching,
|
|
21322
|
+
isResettingData: isResettingData,
|
|
21323
|
+
isLoadingOnScroll: isLoadingOnScroll,
|
|
21324
|
+
onPopupScroll: onPopupScroll,
|
|
21325
|
+
hasMore: hasMore,
|
|
21326
|
+
noResultCustomText: noResultCustomText,
|
|
21327
|
+
noResultCustomIcon: noResultCustomIcon,
|
|
21328
|
+
options: options,
|
|
21329
|
+
className: className,
|
|
21330
|
+
type: type,
|
|
21331
|
+
selectedLeafCount: selectedLeafCount,
|
|
21332
|
+
handleConfirm: handleConfirm,
|
|
21333
|
+
handleClearAll: handleClearAll,
|
|
21334
|
+
clearText: clearText,
|
|
21335
|
+
onFooterDownloadChange: onFooterDownloadChange,
|
|
21336
|
+
allowClear: allowClear,
|
|
21337
|
+
popoverClassName: popoverClassName
|
|
21338
|
+
});
|
|
21339
|
+
};
|
|
21480
21340
|
const combinedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(containerClassName, _styles.default['cap-unified-tree-select'], {
|
|
21481
21341
|
[_styles.default['cap-unified-tree-select-readonly']]: readOnly
|
|
21482
21342
|
}, className), [containerClassName, className, readOnly]);
|
|
21483
|
-
const handleSingleSelectChange = (0, _react.useCallback)(newValue => {
|
|
21484
|
-
if (disabled) {
|
|
21485
|
-
return;
|
|
21486
|
-
}
|
|
21487
|
-
if (newValue !== initialTempValueRef.current) {
|
|
21488
|
-
hasInteractedRef.current = true;
|
|
21489
|
-
}
|
|
21490
|
-
if (newValue === undefined || newValue === null) {
|
|
21491
|
-
if (resetData && options.length > 0) {
|
|
21492
|
-
prevOptionsBeforeResetRef.current = options;
|
|
21493
|
-
setIsResettingData(true);
|
|
21494
|
-
resetDataCalledRef.current = true;
|
|
21495
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
21496
|
-
resetData();
|
|
21497
|
-
}
|
|
21498
|
-
}
|
|
21499
|
-
onChange == null || onChange(newValue);
|
|
21500
|
-
}, [onChange, resetData, options, disabled]);
|
|
21501
|
-
const handleMultiSelectChange = (0, _react.useCallback)(newValue => {
|
|
21502
|
-
if (disabled) {
|
|
21503
|
-
return;
|
|
21504
|
-
}
|
|
21505
|
-
const initialValue = initialTempValueRef.current;
|
|
21506
|
-
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;
|
|
21507
|
-
if (hasChanged) {
|
|
21508
|
-
hasInteractedRef.current = true;
|
|
21509
|
-
}
|
|
21510
|
-
if (newValue === undefined || newValue === null || Array.isArray(newValue) && newValue.length === 0) {
|
|
21511
|
-
if (resetData && options.length > 0) {
|
|
21512
|
-
prevOptionsBeforeResetRef.current = options;
|
|
21513
|
-
setIsResettingData(true);
|
|
21514
|
-
resetDataCalledRef.current = true;
|
|
21515
|
-
resetDataCalledTimeRef.current = Date.now();
|
|
21516
|
-
resetData();
|
|
21517
|
-
}
|
|
21518
|
-
}
|
|
21519
|
-
setTempValue(newValue);
|
|
21520
|
-
}, [resetData, options, disabled]);
|
|
21521
21343
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
21522
21344
|
className: className,
|
|
21523
|
-
children: [
|
|
21345
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DropdownHeader.DropdownHeader, {
|
|
21346
|
+
headerLabel: headerLabel,
|
|
21347
|
+
tooltip: tooltip,
|
|
21348
|
+
bylineText: bylineText,
|
|
21349
|
+
disabled: disabled
|
|
21350
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.TreeSelect, _extends({
|
|
21524
21351
|
treeData: filteredTree,
|
|
21525
21352
|
value: customPopupRender ? tempValue : value,
|
|
21526
21353
|
treeNodeLabelProp: "label",
|
|
@@ -21548,7 +21375,7 @@ const CapUnifiedSelect = _ref => {
|
|
|
21548
21375
|
onOpenChange: handleDropdownVisibilityChange,
|
|
21549
21376
|
virtual: !enableVirtualization,
|
|
21550
21377
|
popupMatchSelectWidth: false,
|
|
21551
|
-
disabled: disabled,
|
|
21378
|
+
disabled: disabled || readOnly,
|
|
21552
21379
|
filterTreeNode: false,
|
|
21553
21380
|
listHeight: _constants.DEFAULTS.LIST_HEIGHT,
|
|
21554
21381
|
listItemHeight: virtualRowHeight,
|
|
@@ -22985,6 +22812,209 @@ module.exports = domAPI;
|
|
|
22985
22812
|
|
|
22986
22813
|
/***/ }),
|
|
22987
22814
|
|
|
22815
|
+
/***/ 8033:
|
|
22816
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
22817
|
+
|
|
22818
|
+
"use strict";
|
|
22819
|
+
|
|
22820
|
+
|
|
22821
|
+
exports.__esModule = true;
|
|
22822
|
+
exports.CustomDropdown = void 0;
|
|
22823
|
+
var _antdV = __webpack_require__(4273);
|
|
22824
|
+
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
22825
|
+
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
22826
|
+
var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
|
|
22827
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
|
|
22828
|
+
var _CapRow = _interopRequireDefault(__webpack_require__(7375));
|
|
22829
|
+
var _CapSpin = _interopRequireDefault(__webpack_require__(1549));
|
|
22830
|
+
var _components = __webpack_require__(455);
|
|
22831
|
+
var _constants = __webpack_require__(9788);
|
|
22832
|
+
var _styles = _interopRequireDefault(__webpack_require__(8263));
|
|
22833
|
+
var _utils = __webpack_require__(8052);
|
|
22834
|
+
var _jsxRuntime = __webpack_require__(4848);
|
|
22835
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22836
|
+
const CustomDropdown = _ref => {
|
|
22837
|
+
let {
|
|
22838
|
+
menu,
|
|
22839
|
+
customPopupRender,
|
|
22840
|
+
filteredTree,
|
|
22841
|
+
searchText,
|
|
22842
|
+
showSearch,
|
|
22843
|
+
handleSearchChange,
|
|
22844
|
+
handleSearchKeyDown,
|
|
22845
|
+
disabled,
|
|
22846
|
+
isMulti,
|
|
22847
|
+
showUpload,
|
|
22848
|
+
uploadLabel,
|
|
22849
|
+
handleUpload,
|
|
22850
|
+
staticValue,
|
|
22851
|
+
tempValue,
|
|
22852
|
+
setTempValue,
|
|
22853
|
+
isSearching,
|
|
22854
|
+
isResettingData,
|
|
22855
|
+
isLoadingOnScroll,
|
|
22856
|
+
onPopupScroll,
|
|
22857
|
+
hasMore,
|
|
22858
|
+
noResultCustomText,
|
|
22859
|
+
noResultCustomIcon,
|
|
22860
|
+
options,
|
|
22861
|
+
className,
|
|
22862
|
+
type,
|
|
22863
|
+
selectedLeafCount,
|
|
22864
|
+
handleConfirm,
|
|
22865
|
+
handleClearAll,
|
|
22866
|
+
clearText,
|
|
22867
|
+
onFooterDownloadChange,
|
|
22868
|
+
allowClear,
|
|
22869
|
+
popoverClassName
|
|
22870
|
+
} = _ref;
|
|
22871
|
+
if (!customPopupRender) return menu;
|
|
22872
|
+
const currentItems = filteredTree;
|
|
22873
|
+
const handleFooterDownload = () => {
|
|
22874
|
+
const currentValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
|
|
22875
|
+
onFooterDownloadChange == null || onFooterDownloadChange(currentValues);
|
|
22876
|
+
};
|
|
22877
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22878
|
+
className: (0, _classnames.default)(popoverClassName, _styles.default[type + "-popup-container"]),
|
|
22879
|
+
children: [showSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22880
|
+
className: _styles.default['cap-unified-select-search-container'],
|
|
22881
|
+
align: "middle",
|
|
22882
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Input, {
|
|
22883
|
+
prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
22884
|
+
type: "search",
|
|
22885
|
+
size: "s",
|
|
22886
|
+
className: _styles.default['cap-unified-select-search-icon']
|
|
22887
|
+
}),
|
|
22888
|
+
placeholder: _constants.DEFAULTS.SEARCH_PLACEHOLDER,
|
|
22889
|
+
variant: "borderless",
|
|
22890
|
+
value: searchText,
|
|
22891
|
+
onChange: handleSearchChange,
|
|
22892
|
+
onKeyDown: handleSearchKeyDown,
|
|
22893
|
+
allowClear: true,
|
|
22894
|
+
disabled: disabled
|
|
22895
|
+
})
|
|
22896
|
+
}), isMulti && showUpload && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
22897
|
+
className: _styles.default['cap-unified-select-upload-container'],
|
|
22898
|
+
align: "middle",
|
|
22899
|
+
onClick: handleUpload,
|
|
22900
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
22901
|
+
type: "upload",
|
|
22902
|
+
size: "s",
|
|
22903
|
+
className: _styles.default['cap-unified-select-upload-icon']
|
|
22904
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
22905
|
+
type: "label14",
|
|
22906
|
+
className: _styles.default['cap-unified-select-upload-label'],
|
|
22907
|
+
children: uploadLabel
|
|
22908
|
+
})]
|
|
22909
|
+
}), isMulti && staticValue && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectAllCheckbox, {
|
|
22910
|
+
currentItems: currentItems,
|
|
22911
|
+
tempValue: Array.isArray(tempValue) ? tempValue : undefined,
|
|
22912
|
+
setTempValue: val => setTempValue(val),
|
|
22913
|
+
processTreeData: _utils.buildTreeMaps,
|
|
22914
|
+
disabled: disabled
|
|
22915
|
+
}), currentItems.length === 0 ? isSearching || isResettingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22916
|
+
className: _styles.default['cap-unified-select-loading-container'],
|
|
22917
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22918
|
+
align: "middle",
|
|
22919
|
+
justify: "center",
|
|
22920
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
22921
|
+
size: "small"
|
|
22922
|
+
})
|
|
22923
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22924
|
+
align: "middle",
|
|
22925
|
+
justify: "center",
|
|
22926
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
22927
|
+
type: "label14",
|
|
22928
|
+
children: "Loading..."
|
|
22929
|
+
})
|
|
22930
|
+
})]
|
|
22931
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoResult, {
|
|
22932
|
+
noResultCustomText: noResultCustomText,
|
|
22933
|
+
className: className,
|
|
22934
|
+
showUpload: showUpload,
|
|
22935
|
+
options: options,
|
|
22936
|
+
noResultCustomIcon: noResultCustomIcon
|
|
22937
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22938
|
+
className: _styles.default['cap-unified-select-menu-wrapper'],
|
|
22939
|
+
children: [menu, (isSearching || isResettingData) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22940
|
+
className: _styles.default['cap-unified-select-loading-overlay'],
|
|
22941
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22942
|
+
align: "middle",
|
|
22943
|
+
justify: "center",
|
|
22944
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
22945
|
+
size: "small"
|
|
22946
|
+
})
|
|
22947
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22948
|
+
align: "middle",
|
|
22949
|
+
justify: "center",
|
|
22950
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
22951
|
+
type: "label14",
|
|
22952
|
+
children: "Loading..."
|
|
22953
|
+
})
|
|
22954
|
+
})]
|
|
22955
|
+
}), isLoadingOnScroll && onPopupScroll && hasMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22956
|
+
className: _styles.default['cap-unified-select-loading-overlay'],
|
|
22957
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22958
|
+
align: "middle",
|
|
22959
|
+
justify: "center",
|
|
22960
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
|
|
22961
|
+
size: "small"
|
|
22962
|
+
})
|
|
22963
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
22964
|
+
align: "middle",
|
|
22965
|
+
justify: "center",
|
|
22966
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
22967
|
+
type: "label14",
|
|
22968
|
+
children: "Loading..."
|
|
22969
|
+
})
|
|
22970
|
+
})]
|
|
22971
|
+
})]
|
|
22972
|
+
}), currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
22973
|
+
className: _styles.default['cap-unified-select-confirm-container'],
|
|
22974
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
22975
|
+
className: _styles.default['cap-unified-select-confirm-button-group'],
|
|
22976
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
|
|
22977
|
+
type: "primary",
|
|
22978
|
+
size: "small",
|
|
22979
|
+
className: _styles.default['cap-unified-select-confirm-button'],
|
|
22980
|
+
onClick: handleConfirm,
|
|
22981
|
+
disabled: disabled || selectedLeafCount === 0,
|
|
22982
|
+
children: "Confirm"
|
|
22983
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
|
|
22984
|
+
type: "text",
|
|
22985
|
+
className: _styles.default['cap-unified-select-cancel-button'],
|
|
22986
|
+
size: "small",
|
|
22987
|
+
onClick: handleClearAll,
|
|
22988
|
+
disabled: disabled,
|
|
22989
|
+
children: clearText
|
|
22990
|
+
}), onFooterDownloadChange && selectedLeafCount > 0 && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
|
|
22991
|
+
className: _styles.default['cap-unified-select-footer-download-container'],
|
|
22992
|
+
align: "middle",
|
|
22993
|
+
onClick: handleFooterDownload,
|
|
22994
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
|
|
22995
|
+
type: "download",
|
|
22996
|
+
size: "s",
|
|
22997
|
+
className: _styles.default['cap-unified-select-footer-download-icon']
|
|
22998
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
|
|
22999
|
+
className: _styles.default['cap-unified-select-footer-download-label'],
|
|
23000
|
+
children: [selectedLeafCount, " selected"]
|
|
23001
|
+
})]
|
|
23002
|
+
})]
|
|
23003
|
+
})
|
|
23004
|
+
}), (type === _constants.SELECT_TYPES.SELECT || type === _constants.SELECT_TYPES.TREE_SELECT) && allowClear && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
|
|
23005
|
+
className: _styles.default['cap-unified-select-tree-clear-container'],
|
|
23006
|
+
onClick: handleClearAll,
|
|
23007
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
23008
|
+
className: _styles.default['cap-unified-select-tree-clear-label'],
|
|
23009
|
+
children: clearText
|
|
23010
|
+
})
|
|
23011
|
+
})]
|
|
23012
|
+
});
|
|
23013
|
+
};
|
|
23014
|
+
exports.CustomDropdown = CustomDropdown;
|
|
23015
|
+
|
|
23016
|
+
/***/ }),
|
|
23017
|
+
|
|
22988
23018
|
/***/ 8052:
|
|
22989
23019
|
/***/ ((__unused_webpack_module, exports) => {
|
|
22990
23020
|
|
|
@@ -22992,7 +23022,7 @@ module.exports = domAPI;
|
|
|
22992
23022
|
|
|
22993
23023
|
|
|
22994
23024
|
exports.__esModule = true;
|
|
22995
|
-
exports.reorderOptionsBySelection = exports.findValueInOptions = exports.findMissingValues = exports.filterTreeData = exports.countSelectedLeaves = exports.buildTreeMaps = void 0;
|
|
23025
|
+
exports.reorderOptionsBySelection = exports.prepareDataSource = exports.getScrollContainer = exports.findValueInOptions = exports.findMissingValues = exports.filterTreeData = exports.countSelectedLeaves = exports.buildTreeMaps = void 0;
|
|
22996
23026
|
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); }
|
|
22997
23027
|
/**
|
|
22998
23028
|
* Builds tree maps for efficient tree operations
|
|
@@ -23144,24 +23174,9 @@ const reorderOptionsBySelection = (opts, selectedOrder) => {
|
|
|
23144
23174
|
return topLevelItem;
|
|
23145
23175
|
}
|
|
23146
23176
|
|
|
23147
|
-
// Recursively search in children
|
|
23148
|
-
const searchInChildren = items => {
|
|
23149
|
-
for (const item of items) {
|
|
23150
|
-
if (item.value === targetValue) {
|
|
23151
|
-
return true; // Found it
|
|
23152
|
-
}
|
|
23153
|
-
if (item.children && item.children.length > 0) {
|
|
23154
|
-
if (searchInChildren(item.children)) {
|
|
23155
|
-
return true;
|
|
23156
|
-
}
|
|
23157
|
-
}
|
|
23158
|
-
}
|
|
23159
|
-
return false;
|
|
23160
|
-
};
|
|
23161
|
-
|
|
23162
23177
|
// If found in this top-level item's children, return the top-level item
|
|
23163
23178
|
if (topLevelItem.children && topLevelItem.children.length > 0) {
|
|
23164
|
-
if (
|
|
23179
|
+
if (findValueInOptions(topLevelItem.children, targetValue)) {
|
|
23165
23180
|
return topLevelItem;
|
|
23166
23181
|
}
|
|
23167
23182
|
}
|
|
@@ -23208,7 +23223,69 @@ const reorderOptionsBySelection = (opts, selectedOrder) => {
|
|
|
23208
23223
|
// Return selected items first (in selection order), then unselected items
|
|
23209
23224
|
return [...selectedItems, ...unselectedItems];
|
|
23210
23225
|
};
|
|
23226
|
+
|
|
23227
|
+
/**
|
|
23228
|
+
* Prepares data source with virtual options for selected values not in current options
|
|
23229
|
+
* Returns raw options without React component enhancement
|
|
23230
|
+
*/
|
|
23211
23231
|
exports.reorderOptionsBySelection = reorderOptionsBySelection;
|
|
23232
|
+
const prepareDataSource = (options, orderedOptions, searchText, value, staticValue, selectedItemsCache) => {
|
|
23233
|
+
const sourceOptions = searchText.trim() ? options : orderedOptions || options;
|
|
23234
|
+
const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
|
|
23235
|
+
const hasSearchQuery = searchText.trim().length > 0;
|
|
23236
|
+
const shouldAppendVirtualOptions = staticValue || !hasSearchQuery;
|
|
23237
|
+
const missingSelectedValues = [];
|
|
23238
|
+
if (shouldAppendVirtualOptions && selectedValues.length > 0) {
|
|
23239
|
+
selectedValues.forEach(val => {
|
|
23240
|
+
if (!findValueInOptions(sourceOptions, val)) {
|
|
23241
|
+
missingSelectedValues.push(val);
|
|
23242
|
+
}
|
|
23243
|
+
});
|
|
23244
|
+
}
|
|
23245
|
+
const virtualOptions = missingSelectedValues.map(val => {
|
|
23246
|
+
const cachedOption = selectedItemsCache.get(val);
|
|
23247
|
+
return _extends({
|
|
23248
|
+
value: val,
|
|
23249
|
+
label: (cachedOption == null ? void 0 : cachedOption.label) || String(val),
|
|
23250
|
+
key: (cachedOption == null ? void 0 : cachedOption.key) || val,
|
|
23251
|
+
title: cachedOption == null ? void 0 : cachedOption.title,
|
|
23252
|
+
optionSuffix: cachedOption == null ? void 0 : cachedOption.optionSuffix,
|
|
23253
|
+
optionSuffixInfo: cachedOption == null ? void 0 : cachedOption.optionSuffixInfo,
|
|
23254
|
+
optionTooltipInfo: cachedOption == null ? void 0 : cachedOption.optionTooltipInfo,
|
|
23255
|
+
disabled: cachedOption == null ? void 0 : cachedOption.disabled
|
|
23256
|
+
}, (cachedOption == null ? void 0 : cachedOption.children) && {
|
|
23257
|
+
children: cachedOption.children
|
|
23258
|
+
});
|
|
23259
|
+
});
|
|
23260
|
+
const allOptions = hasSearchQuery ? [...sourceOptions, ...virtualOptions] : [...virtualOptions, ...sourceOptions];
|
|
23261
|
+
return allOptions != null && allOptions.length ? allOptions : [];
|
|
23262
|
+
};
|
|
23263
|
+
|
|
23264
|
+
/**
|
|
23265
|
+
* Finds the scrollable container element within the dropdown
|
|
23266
|
+
* Checks for tree list holder, virtual list holder, or dropdown itself
|
|
23267
|
+
* Returns the first scrollable container found, or null if none
|
|
23268
|
+
*/
|
|
23269
|
+
exports.prepareDataSource = prepareDataSource;
|
|
23270
|
+
const getScrollContainer = () => {
|
|
23271
|
+
const dropdowns = document.querySelectorAll('.ant-select-dropdown:not(.ant-select-dropdown-hidden)');
|
|
23272
|
+
if (dropdowns.length === 0) return null;
|
|
23273
|
+
const dropdown = Array.from(dropdowns).pop();
|
|
23274
|
+
if (!dropdown) return null;
|
|
23275
|
+
const treeList = dropdown.querySelector('.ant-select-tree-list-holder');
|
|
23276
|
+
if (treeList && treeList.scrollHeight > treeList.clientHeight) {
|
|
23277
|
+
return treeList;
|
|
23278
|
+
}
|
|
23279
|
+
const virtualList = dropdown.querySelector('.rc-virtual-list-holder');
|
|
23280
|
+
if (virtualList && virtualList.scrollHeight > virtualList.clientHeight) {
|
|
23281
|
+
return virtualList;
|
|
23282
|
+
}
|
|
23283
|
+
if (dropdown.scrollHeight > dropdown.clientHeight) {
|
|
23284
|
+
return dropdown;
|
|
23285
|
+
}
|
|
23286
|
+
return null;
|
|
23287
|
+
};
|
|
23288
|
+
exports.getScrollContainer = getScrollContainer;
|
|
23212
23289
|
|
|
23213
23290
|
/***/ }),
|
|
23214
23291
|
|
|
@@ -23377,6 +23454,227 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
23377
23454
|
|
|
23378
23455
|
/***/ }),
|
|
23379
23456
|
|
|
23457
|
+
/***/ 9103:
|
|
23458
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23459
|
+
|
|
23460
|
+
"use strict";
|
|
23461
|
+
|
|
23462
|
+
|
|
23463
|
+
exports.__esModule = true;
|
|
23464
|
+
exports.useInfiniteScroll = void 0;
|
|
23465
|
+
var _react = __webpack_require__(9206);
|
|
23466
|
+
var _constants = __webpack_require__(9788);
|
|
23467
|
+
var _utils = __webpack_require__(8052);
|
|
23468
|
+
/**
|
|
23469
|
+
* Custom hook for handling infinite scroll/pagination in dropdown
|
|
23470
|
+
* Manages scroll event listeners, loading states, and triggers onPopupScroll callback
|
|
23471
|
+
*/
|
|
23472
|
+
const useInfiniteScroll = _ref => {
|
|
23473
|
+
let {
|
|
23474
|
+
onPopupScroll,
|
|
23475
|
+
hasMore,
|
|
23476
|
+
options,
|
|
23477
|
+
dropdownOpen,
|
|
23478
|
+
optionsRef,
|
|
23479
|
+
hasInteractedRef
|
|
23480
|
+
} = _ref;
|
|
23481
|
+
const [isLoadingOnScroll, setIsLoadingOnScroll] = (0, _react.useState)(false);
|
|
23482
|
+
const scrollContainerRef = (0, _react.useRef)(null);
|
|
23483
|
+
const scrollLoadingTimeoutRef = (0, _react.useRef)(null);
|
|
23484
|
+
const isScrollProcessingRef = (0, _react.useRef)(false);
|
|
23485
|
+
const scrollThrottleTimeoutRef = (0, _react.useRef)(null);
|
|
23486
|
+
const prevOptionsRefForScroll = (0, _react.useRef)(options);
|
|
23487
|
+
const scrollTriggerOptionsCountRef = (0, _react.useRef)(options.length);
|
|
23488
|
+
const prevOptionsCountRef = (0, _react.useRef)(options.length);
|
|
23489
|
+
(0, _react.useEffect)(() => {
|
|
23490
|
+
optionsRef.current = options;
|
|
23491
|
+
}, [options, optionsRef]);
|
|
23492
|
+
(0, _react.useEffect)(() => {
|
|
23493
|
+
return () => {
|
|
23494
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23495
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23496
|
+
}
|
|
23497
|
+
if (scrollThrottleTimeoutRef.current) {
|
|
23498
|
+
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
23499
|
+
}
|
|
23500
|
+
};
|
|
23501
|
+
}, []);
|
|
23502
|
+
(0, _react.useEffect)(() => {
|
|
23503
|
+
if (!hasMore && isLoadingOnScroll) {
|
|
23504
|
+
setIsLoadingOnScroll(false);
|
|
23505
|
+
isScrollProcessingRef.current = false;
|
|
23506
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23507
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23508
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23509
|
+
}
|
|
23510
|
+
}
|
|
23511
|
+
}, [hasMore, isLoadingOnScroll]);
|
|
23512
|
+
|
|
23513
|
+
/**
|
|
23514
|
+
* PRIMARY MECHANISM: Detect when API call completes by monitoring options changes
|
|
23515
|
+
* When onPopupScroll() is called, it triggers an API call. When the API completes,
|
|
23516
|
+
* the options prop will change (new data loaded). This effect detects that change
|
|
23517
|
+
* and sets loading to false, which is the correct way to handle API completion.
|
|
23518
|
+
*
|
|
23519
|
+
* This is the primary mechanism for detecting API completion when onPopupScroll
|
|
23520
|
+
* doesn't return a Promise (backward compatibility).
|
|
23521
|
+
*/
|
|
23522
|
+
(0, _react.useEffect)(() => {
|
|
23523
|
+
if (!isLoadingOnScroll) {
|
|
23524
|
+
prevOptionsCountRef.current = options.length;
|
|
23525
|
+
prevOptionsRefForScroll.current = options;
|
|
23526
|
+
return;
|
|
23527
|
+
}
|
|
23528
|
+
if (!onPopupScroll) {
|
|
23529
|
+
return;
|
|
23530
|
+
}
|
|
23531
|
+
const optionsCountIncreased = options.length > prevOptionsCountRef.current;
|
|
23532
|
+
const optionsContentChanged = (() => {
|
|
23533
|
+
const prevCount = prevOptionsCountRef.current;
|
|
23534
|
+
const currentCount = options.length;
|
|
23535
|
+
if (prevCount !== currentCount) {
|
|
23536
|
+
return true;
|
|
23537
|
+
}
|
|
23538
|
+
if (currentCount > 0 && prevCount > 0 && prevOptionsRefForScroll.current.length > 0) {
|
|
23539
|
+
const prevOptions = prevOptionsRefForScroll.current;
|
|
23540
|
+
const lastPrevOption = prevOptions[prevOptions.length - 1];
|
|
23541
|
+
const lastCurrentOption = options[options.length - 1];
|
|
23542
|
+
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)) {
|
|
23543
|
+
return true;
|
|
23544
|
+
}
|
|
23545
|
+
}
|
|
23546
|
+
return false;
|
|
23547
|
+
})();
|
|
23548
|
+
if (optionsCountIncreased || optionsContentChanged) {
|
|
23549
|
+
setIsLoadingOnScroll(false);
|
|
23550
|
+
isScrollProcessingRef.current = false;
|
|
23551
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23552
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23553
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23554
|
+
}
|
|
23555
|
+
prevOptionsCountRef.current = options.length;
|
|
23556
|
+
prevOptionsRefForScroll.current = options;
|
|
23557
|
+
}
|
|
23558
|
+
}, [options, isLoadingOnScroll, onPopupScroll]);
|
|
23559
|
+
const handleScroll = (0, _react.useCallback)(event => {
|
|
23560
|
+
if (!onPopupScroll) return;
|
|
23561
|
+
const target = event.target;
|
|
23562
|
+
if (!target) return;
|
|
23563
|
+
const isNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
|
|
23564
|
+
if (!isNearBottom) {
|
|
23565
|
+
isScrollProcessingRef.current = false;
|
|
23566
|
+
return;
|
|
23567
|
+
}
|
|
23568
|
+
if (isScrollProcessingRef.current) return;
|
|
23569
|
+
if (isLoadingOnScroll) return;
|
|
23570
|
+
if (!hasMore) {
|
|
23571
|
+
isScrollProcessingRef.current = false;
|
|
23572
|
+
return;
|
|
23573
|
+
}
|
|
23574
|
+
if (scrollThrottleTimeoutRef.current) {
|
|
23575
|
+
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
23576
|
+
}
|
|
23577
|
+
isScrollProcessingRef.current = true;
|
|
23578
|
+
scrollThrottleTimeoutRef.current = setTimeout(() => {
|
|
23579
|
+
const stillNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
|
|
23580
|
+
if (!stillNearBottom || isLoadingOnScroll || !hasMore) {
|
|
23581
|
+
isScrollProcessingRef.current = false;
|
|
23582
|
+
return;
|
|
23583
|
+
}
|
|
23584
|
+
const currentOptions = optionsRef.current;
|
|
23585
|
+
prevOptionsCountRef.current = currentOptions.length;
|
|
23586
|
+
prevOptionsRefForScroll.current = currentOptions;
|
|
23587
|
+
scrollTriggerOptionsCountRef.current = currentOptions.length;
|
|
23588
|
+
setIsLoadingOnScroll(true);
|
|
23589
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23590
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23591
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23592
|
+
}
|
|
23593
|
+
hasInteractedRef.current = true;
|
|
23594
|
+
const scrollResult = onPopupScroll();
|
|
23595
|
+
if (scrollResult && typeof scrollResult === 'object' && 'then' in scrollResult) {
|
|
23596
|
+
Promise.resolve(scrollResult).then(() => {
|
|
23597
|
+
setIsLoadingOnScroll(false);
|
|
23598
|
+
isScrollProcessingRef.current = false;
|
|
23599
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23600
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23601
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23602
|
+
}
|
|
23603
|
+
}).catch(() => {
|
|
23604
|
+
setIsLoadingOnScroll(false);
|
|
23605
|
+
isScrollProcessingRef.current = false;
|
|
23606
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23607
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23608
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23609
|
+
}
|
|
23610
|
+
});
|
|
23611
|
+
}
|
|
23612
|
+
scrollLoadingTimeoutRef.current = setTimeout(() => {
|
|
23613
|
+
setIsLoadingOnScroll(prev => {
|
|
23614
|
+
if (prev) {
|
|
23615
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23616
|
+
isScrollProcessingRef.current = false;
|
|
23617
|
+
return false;
|
|
23618
|
+
}
|
|
23619
|
+
return prev;
|
|
23620
|
+
});
|
|
23621
|
+
}, _constants.TIMEOUTS.SCROLL_LOADING_TIMEOUT);
|
|
23622
|
+
}, 150);
|
|
23623
|
+
}, [onPopupScroll, isLoadingOnScroll, hasMore, optionsRef, hasInteractedRef]);
|
|
23624
|
+
(0, _react.useEffect)(() => {
|
|
23625
|
+
if (!onPopupScroll || !dropdownOpen) return;
|
|
23626
|
+
const timeoutId = setTimeout(() => {
|
|
23627
|
+
const scrollContainer = (0, _utils.getScrollContainer)();
|
|
23628
|
+
if (scrollContainer) {
|
|
23629
|
+
scrollContainerRef.current = scrollContainer;
|
|
23630
|
+
scrollContainer.addEventListener('scroll', handleScroll, {
|
|
23631
|
+
passive: true
|
|
23632
|
+
});
|
|
23633
|
+
}
|
|
23634
|
+
}, _constants.TIMEOUTS.SCROLL_CONTAINER_DELAY);
|
|
23635
|
+
return () => {
|
|
23636
|
+
clearTimeout(timeoutId);
|
|
23637
|
+
if (scrollThrottleTimeoutRef.current) {
|
|
23638
|
+
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
23639
|
+
scrollThrottleTimeoutRef.current = null;
|
|
23640
|
+
}
|
|
23641
|
+
if (scrollContainerRef.current) {
|
|
23642
|
+
scrollContainerRef.current.removeEventListener('scroll', handleScroll);
|
|
23643
|
+
scrollContainerRef.current = null;
|
|
23644
|
+
}
|
|
23645
|
+
isScrollProcessingRef.current = false;
|
|
23646
|
+
};
|
|
23647
|
+
}, [onPopupScroll, dropdownOpen, handleScroll]);
|
|
23648
|
+
|
|
23649
|
+
/**
|
|
23650
|
+
* Reset scroll state - used when clearing or closing dropdown
|
|
23651
|
+
*/
|
|
23652
|
+
const resetScrollState = (0, _react.useCallback)(() => {
|
|
23653
|
+
setIsLoadingOnScroll(false);
|
|
23654
|
+
isScrollProcessingRef.current = false;
|
|
23655
|
+
if (scrollLoadingTimeoutRef.current) {
|
|
23656
|
+
clearTimeout(scrollLoadingTimeoutRef.current);
|
|
23657
|
+
scrollLoadingTimeoutRef.current = null;
|
|
23658
|
+
}
|
|
23659
|
+
if (scrollThrottleTimeoutRef.current) {
|
|
23660
|
+
clearTimeout(scrollThrottleTimeoutRef.current);
|
|
23661
|
+
scrollThrottleTimeoutRef.current = null;
|
|
23662
|
+
}
|
|
23663
|
+
if (scrollContainerRef.current) {
|
|
23664
|
+
scrollContainerRef.current.removeEventListener('scroll', handleScroll);
|
|
23665
|
+
scrollContainerRef.current = null;
|
|
23666
|
+
}
|
|
23667
|
+
}, [handleScroll]);
|
|
23668
|
+
return {
|
|
23669
|
+
isLoadingOnScroll,
|
|
23670
|
+
resetScrollState,
|
|
23671
|
+
scrollTriggerOptionsCountRef
|
|
23672
|
+
};
|
|
23673
|
+
};
|
|
23674
|
+
exports.useInfiniteScroll = useInfiniteScroll;
|
|
23675
|
+
|
|
23676
|
+
/***/ }),
|
|
23677
|
+
|
|
23380
23678
|
/***/ 9162:
|
|
23381
23679
|
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
|
|
23382
23680
|
|
|
@@ -23437,6 +23735,56 @@ module.exports = require("react");
|
|
|
23437
23735
|
|
|
23438
23736
|
/***/ }),
|
|
23439
23737
|
|
|
23738
|
+
/***/ 9315:
|
|
23739
|
+
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23740
|
+
|
|
23741
|
+
"use strict";
|
|
23742
|
+
|
|
23743
|
+
|
|
23744
|
+
exports.__esModule = true;
|
|
23745
|
+
exports.DropdownHeader = void 0;
|
|
23746
|
+
var _classnames = _interopRequireDefault(__webpack_require__(6942));
|
|
23747
|
+
var _react = _interopRequireDefault(__webpack_require__(9206));
|
|
23748
|
+
var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
|
|
23749
|
+
var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
|
|
23750
|
+
var _styles = _interopRequireDefault(__webpack_require__(8263));
|
|
23751
|
+
var _jsxRuntime = __webpack_require__(4848);
|
|
23752
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
23753
|
+
const DropdownHeader = _ref => {
|
|
23754
|
+
let {
|
|
23755
|
+
headerLabel,
|
|
23756
|
+
tooltip,
|
|
23757
|
+
bylineText,
|
|
23758
|
+
disabled = false
|
|
23759
|
+
} = _ref;
|
|
23760
|
+
if (!headerLabel && !tooltip) return null;
|
|
23761
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
23762
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
|
|
23763
|
+
className: (0, _classnames.default)(_styles.default['cap-unified-select-header-wrapper'], disabled && _styles.default.disabled, _styles.default['cap-unified-select-header']),
|
|
23764
|
+
children: [headerLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
23765
|
+
type: "label16",
|
|
23766
|
+
className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-label']),
|
|
23767
|
+
children: headerLabel
|
|
23768
|
+
}), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
|
|
23769
|
+
title: tooltip,
|
|
23770
|
+
className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-tooltip']),
|
|
23771
|
+
iconProps: {
|
|
23772
|
+
disabled
|
|
23773
|
+
}
|
|
23774
|
+
})]
|
|
23775
|
+
}), bylineText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
|
|
23776
|
+
className: _styles.default['cap-unified-select-header-byline-text'],
|
|
23777
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
|
|
23778
|
+
className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-byline-text']),
|
|
23779
|
+
children: bylineText
|
|
23780
|
+
})
|
|
23781
|
+
})]
|
|
23782
|
+
});
|
|
23783
|
+
};
|
|
23784
|
+
exports.DropdownHeader = DropdownHeader;
|
|
23785
|
+
|
|
23786
|
+
/***/ }),
|
|
23787
|
+
|
|
23440
23788
|
/***/ 9395:
|
|
23441
23789
|
/***/ ((__unused_webpack_module, exports, __webpack_require__) => {
|
|
23442
23790
|
|
|
@@ -23508,7 +23856,7 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
|
|
|
23508
23856
|
var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
|
|
23509
23857
|
var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
|
|
23510
23858
|
// Module
|
|
23511
|
-
___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 .blaze-ui-cap-unified-select-more-text{cursor:pointer;color:#091e42;margin-right:.286rem;position:relative}.blaze-ui-cap-unified-select-container.ant-select-disabled .blaze-ui-cap-unified-select-more-text{color:unset !important;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-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;color:unset !important}.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:unset !important;line-height:1.429rem}.blaze-ui-cap-unified-select-container .ant-select-disabled .ant-select-prefix{color:unset !important}.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;gap:.857rem;flex-wrap:nowrap}.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;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-footer-download-container .blaze-ui-cap-unified-select-footer-download-label{color:#2466ea;font-family:Roboto,sans-serif;font-weight:400;font-style:normal;font-size:.857rem;line-height:1.143rem;letter-spacing:0;white-space:nowrap;display:inline-flex;align-items:center}.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-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;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}`, ""]);
|
|
23859
|
+
___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 .blaze-ui-cap-unified-select-more-text{cursor:pointer;color:#091e42;margin-right:.286rem;position:relative}.blaze-ui-cap-unified-select-container.ant-select-disabled .blaze-ui-cap-unified-select-more-text{color:unset !important;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-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;color:unset !important}.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:unset !important;line-height:1.429rem}.blaze-ui-cap-unified-select-container .ant-select-disabled .ant-select-prefix{color:unset !important}.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;gap:.857rem;flex-wrap:nowrap}.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;display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;line-height:1}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-footer-download-container .blaze-ui-cap-unified-select-footer-download-label{color:#2466ea;font-family:Roboto,sans-serif;font-weight:400;font-style:normal;font-size:.857rem;line-height:1.143rem;letter-spacing:0;white-space:nowrap;display:inline-flex;align-items:center}.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-label.blaze-ui-truncate-text{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-label.blaze-ui-truncate-text .cap-label{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.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-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;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}`, ""]);
|
|
23512
23860
|
// Exports
|
|
23513
23861
|
___CSS_LOADER_EXPORT___.locals = {
|
|
23514
23862
|
"cap-unified-select-header-wrapper": `blaze-ui-cap-unified-select-header-wrapper`,
|
|
@@ -23548,6 +23896,7 @@ ___CSS_LOADER_EXPORT___.locals = {
|
|
|
23548
23896
|
"cap-unified-select-loading-overlay": `blaze-ui-cap-unified-select-loading-overlay`,
|
|
23549
23897
|
"cap-unified-select-option-with-suffix": `blaze-ui-cap-unified-select-option-with-suffix`,
|
|
23550
23898
|
"cap-unified-select-option-label": `blaze-ui-cap-unified-select-option-label`,
|
|
23899
|
+
"truncate-text": `blaze-ui-truncate-text`,
|
|
23551
23900
|
"cap-unified-select-option-end": `blaze-ui-cap-unified-select-option-end`,
|
|
23552
23901
|
"cap-unified-select-option-suffix": `blaze-ui-cap-unified-select-option-suffix`,
|
|
23553
23902
|
"cap-tooltip-with-info": `blaze-ui-cap-tooltip-with-info`,
|
|
@@ -23566,12 +23915,13 @@ module.exports = ___CSS_LOADER_EXPORT___;
|
|
|
23566
23915
|
|
|
23567
23916
|
exports.__esModule = true;
|
|
23568
23917
|
exports.TIMEOUTS = exports.SELECT_TYPES = exports.DEFAULTS = void 0;
|
|
23569
|
-
|
|
23570
|
-
SELECT
|
|
23571
|
-
MULTI_SELECT
|
|
23572
|
-
TREE_SELECT
|
|
23573
|
-
MULTI_TREE_SELECT
|
|
23574
|
-
|
|
23918
|
+
let SELECT_TYPES = exports.SELECT_TYPES = /*#__PURE__*/function (SELECT_TYPES) {
|
|
23919
|
+
SELECT_TYPES["SELECT"] = "select";
|
|
23920
|
+
SELECT_TYPES["MULTI_SELECT"] = "multiSelect";
|
|
23921
|
+
SELECT_TYPES["TREE_SELECT"] = "treeSelect";
|
|
23922
|
+
SELECT_TYPES["MULTI_TREE_SELECT"] = "multiTreeSelect";
|
|
23923
|
+
return SELECT_TYPES;
|
|
23924
|
+
}({});
|
|
23575
23925
|
const TIMEOUTS = exports.TIMEOUTS = {
|
|
23576
23926
|
DEFAULT_SEARCH_DEBOUNCE: 300,
|
|
23577
23927
|
SEARCH_STATE_UPDATE_DELAY: 100,
|
|
@@ -23725,7 +24075,7 @@ var _default = exports["default"] = LocaleHoc;
|
|
|
23725
24075
|
|
|
23726
24076
|
exports.__esModule = true;
|
|
23727
24077
|
exports.CAP_SPACE_52 = exports.CAP_SPACE_48 = exports.CAP_SPACE_44 = exports.CAP_SPACE_42 = exports.CAP_SPACE_40 = exports.CAP_SPACE_36 = exports.CAP_SPACE_32 = exports.CAP_SPACE_28 = exports.CAP_SPACE_24 = exports.CAP_SPACE_23 = exports.CAP_SPACE_20 = exports.CAP_SPACE_19 = exports.CAP_SPACE_18 = exports.CAP_SPACE_16 = exports.CAP_SPACE_12 = exports.CAP_SPACE_08 = exports.CAP_SPACE_06 = exports.CAP_SPACE_04 = exports.CAP_SPACE_03 = exports.CAP_SPACE_02 = exports.CAP_SPACE_01 = exports.CAP_SPACE_00 = exports.CAP_SECONDARY = exports.CAP_RED03 = exports.CAP_RED02 = exports.CAP_RED01 = exports.CAP_RED = exports.CAP_PURPLE04 = exports.CAP_PURPLE03 = exports.CAP_PURPLE02 = exports.CAP_PURPLE01 = exports.CAP_PURPLE = exports.CAP_PRIMARY = exports.CAP_PINK = exports.CAP_PALE_GREY = exports.CAP_ORANGE02 = exports.CAP_ORANGE01 = exports.CAP_ORANGE = exports.CAP_ICON = exports.CAP_GREEN02 = exports.CAP_GREEN01 = exports.CAP_G20 = exports.CAP_G19 = exports.CAP_G18 = exports.CAP_G17 = exports.CAP_G16 = exports.CAP_G15 = exports.CAP_G14 = exports.CAP_G13 = exports.CAP_G12 = exports.CAP_G11 = exports.CAP_G10 = exports.CAP_G09 = exports.CAP_G08 = exports.CAP_G07 = exports.CAP_G06 = exports.CAP_G05 = exports.CAP_G04 = exports.CAP_G03 = exports.CAP_G02 = exports.CAP_G01 = exports.CAP_COLOR_27 = exports.CAP_COLOR_26 = exports.CAP_COLOR_25 = exports.CAP_COLOR_24 = exports.CAP_COLOR_23 = exports.CAP_COLOR_22 = exports.CAP_COLOR_21 = exports.CAP_COLOR_20 = exports.CAP_COLOR_19 = exports.CAP_COLOR_18 = exports.CAP_COLOR_17 = exports.CAP_COLOR_16 = exports.CAP_COLOR_15 = exports.CAP_COLOR_14 = exports.CAP_COLOR_13 = exports.CAP_COLOR_12 = exports.CAP_COLOR_11 = exports.CAP_COLOR_10 = exports.CAP_COLOR_09 = exports.CAP_COLOR_08 = exports.CAP_COLOR_07 = exports.CAP_COLOR_06 = exports.CAP_COLOR_05 = exports.CAP_COLOR_04 = exports.CAP_COLOR_03 = exports.CAP_COLOR_02 = exports.CAP_COLOR_01 = exports.CAP_BLUE02 = exports.CAP_BLUE01 = exports.CAP_BLUE = exports.CAP_BLACK_ALPHA01 = exports.CAP_BLACK = exports.BUTTON_HEIGHT = exports.BORDER_WIDTH_2 = exports.BORDER_WIDTH_1 = exports.BG_08 = exports.BG_03 = exports.BG_02 = exports.BG_01 = void 0;
|
|
23728
|
-
exports.TRANSITION_ALL = exports.SPACING_32 = exports.SPACING_24 = exports.SPACING_16 = exports.SPACING_12 = exports.SPACING_08 = exports.SPACING_04 = exports.RADIUS_08 = exports.RADIUS_04 = exports.NORMAL_LINE_HEIGHT = exports.INPUT_HEIGHT = exports.ICON_SIZE_XS = exports.ICON_SIZE_S = exports.ICON_SIZE_M = exports.ICON_SIZE_L = exports.FONT_WEIGHT_REGULAR = exports.FONT_WEIGHT_MEDIUM = exports.FONT_SIZE_VS = exports.FONT_SIZE_VL = exports.FONT_SIZE_S = exports.FONT_SIZE_M = exports.FONT_SIZE_L = exports.FONT_FAMILY = exports.FONT_COLOR_06 = exports.FONT_COLOR_05 = exports.FONT_COLOR_04 = exports.FONT_COLOR_03 = exports.FONT_COLOR_02 = exports.FONT_COLOR_01 = exports.COLOR_WARNING = exports.COLOR_SUCCESS = exports.COLOR_INFO = exports.COLOR_ERROR = exports.CAP_YELLOW02 = exports.CAP_YELLOW01 = exports.CAP_YELLOW = exports.CAP_WHITE = exports.CAP_SPACE_80 = exports.CAP_SPACE_72 = exports.CAP_SPACE_64 = exports.CAP_SPACE_60 = exports.CAP_SPACE_56 = void 0;
|
|
24078
|
+
exports.TRANSITION_ALL = exports.SPACING_32 = exports.SPACING_24 = exports.SPACING_16 = exports.SPACING_12 = exports.SPACING_08 = exports.SPACING_04 = exports.RADIUS_08 = exports.RADIUS_04 = exports.NORMAL_LINE_HEIGHT = exports.INPUT_HEIGHT = exports.ICON_SIZE_XS = exports.ICON_SIZE_S = exports.ICON_SIZE_M = exports.ICON_SIZE_L = exports.FONT_WEIGHT_REGULAR = exports.FONT_WEIGHT_MEDIUM = exports.FONT_SIZE_VS = exports.FONT_SIZE_VL = exports.FONT_SIZE_S = exports.FONT_SIZE_M = exports.FONT_SIZE_L = exports.FONT_FAMILY = exports.FONT_COLOR_06 = exports.FONT_COLOR_05 = exports.FONT_COLOR_04 = exports.FONT_COLOR_03 = exports.FONT_COLOR_02 = exports.FONT_COLOR_01 = exports.COLOR_WARNING = exports.COLOR_SUCCESS = exports.COLOR_INFO = exports.COLOR_ERROR = exports.CAP_YELLOW02 = exports.CAP_YELLOW01 = exports.CAP_YELLOW = exports.CAP_WHITE_OVERLAY = exports.CAP_WHITE = exports.CAP_SPACE_80 = exports.CAP_SPACE_72 = exports.CAP_SPACE_64 = exports.CAP_SPACE_60 = exports.CAP_SPACE_56 = void 0;
|
|
23729
24079
|
/* Color Palette */
|
|
23730
24080
|
//========================
|
|
23731
24081
|
|
|
@@ -23790,6 +24140,7 @@ const CAP_G18 = exports.CAP_G18 = '#dcdee2';
|
|
|
23790
24140
|
const CAP_G19 = exports.CAP_G19 = '#8a9ab2';
|
|
23791
24141
|
const CAP_G20 = exports.CAP_G20 = '#c2c2c2';
|
|
23792
24142
|
const CAP_WHITE = exports.CAP_WHITE = '#ffffff';
|
|
24143
|
+
const CAP_WHITE_OVERLAY = exports.CAP_WHITE_OVERLAY = 'rgba(255, 255, 255, 0.8)';
|
|
23793
24144
|
const CAP_BLACK = exports.CAP_BLACK = '#000000';
|
|
23794
24145
|
const CAP_BLACK_ALPHA01 = exports.CAP_BLACK_ALPHA01 = '#00000022';
|
|
23795
24146
|
|