@capillarytech/blaze-ui 1.1.0-alpha.1 → 1.2.2

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.
Files changed (72) hide show
  1. package/dist/CapAlert/index.js +85 -9
  2. package/dist/CapAlert/index.js.map +1 -1
  3. package/dist/CapButton/index.js +104 -78
  4. package/dist/CapButton/index.js.map +1 -1
  5. package/dist/CapCard/index.js +85 -9
  6. package/dist/CapCard/index.js.map +1 -1
  7. package/dist/CapCheckbox/index.js +86 -10
  8. package/dist/CapCheckbox/index.js.map +1 -1
  9. package/dist/CapColumn/index.js +85 -9
  10. package/dist/CapColumn/index.js.map +1 -1
  11. package/dist/CapDivider/index.js +85 -9
  12. package/dist/CapDivider/index.js.map +1 -1
  13. package/dist/CapDropdown/index.js +85 -9
  14. package/dist/CapDropdown/index.js.map +1 -1
  15. package/dist/CapForm/index.js +85 -9
  16. package/dist/CapForm/index.js.map +1 -1
  17. package/dist/CapFormItem/index.js +85 -9
  18. package/dist/CapFormItem/index.js.map +1 -1
  19. package/dist/CapIcon/CapIcon.d.ts.map +1 -1
  20. package/dist/CapIcon/index.js +103 -77
  21. package/dist/CapIcon/index.js.map +1 -1
  22. package/dist/CapLabel/index.js +85 -9
  23. package/dist/CapLabel/index.js.map +1 -1
  24. package/dist/CapMenu/index.js +85 -9
  25. package/dist/CapMenu/index.js.map +1 -1
  26. package/dist/CapRadio/index.js +86 -10
  27. package/dist/CapRadio/index.js.map +1 -1
  28. package/dist/CapRow/index.js +85 -9
  29. package/dist/CapRow/index.js.map +1 -1
  30. package/dist/CapSwitch/index.js +85 -9
  31. package/dist/CapSwitch/index.js.map +1 -1
  32. package/dist/CapTab/index.js +85 -9
  33. package/dist/CapTab/index.js.map +1 -1
  34. package/dist/CapTable/index.js +17213 -13
  35. package/dist/CapTable/index.js.map +1 -1
  36. package/dist/CapTooltip/index.js +85 -9
  37. package/dist/CapTooltip/index.js.map +1 -1
  38. package/dist/CapTooltipWithInfo/index.js +105 -79
  39. package/dist/CapTooltipWithInfo/index.js.map +1 -1
  40. package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts +20 -19
  41. package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +1 -1
  42. package/dist/CapUnifiedSelect/CustomDropdown.d.ts +46 -0
  43. package/dist/CapUnifiedSelect/CustomDropdown.d.ts.map +1 -0
  44. package/dist/CapUnifiedSelect/DropdownHeader.d.ts +10 -0
  45. package/dist/CapUnifiedSelect/DropdownHeader.d.ts.map +1 -0
  46. package/dist/CapUnifiedSelect/components.d.ts +9 -0
  47. package/dist/CapUnifiedSelect/components.d.ts.map +1 -0
  48. package/dist/CapUnifiedSelect/constants.d.ts +31 -0
  49. package/dist/CapUnifiedSelect/constants.d.ts.map +1 -0
  50. package/dist/CapUnifiedSelect/enhanceOptions.d.ts +8 -0
  51. package/dist/CapUnifiedSelect/enhanceOptions.d.ts.map +1 -0
  52. package/dist/CapUnifiedSelect/index.js +1909 -479
  53. package/dist/CapUnifiedSelect/index.js.map +1 -1
  54. package/dist/CapUnifiedSelect/testData.d.ts +75 -0
  55. package/dist/CapUnifiedSelect/testData.d.ts.map +1 -0
  56. package/dist/CapUnifiedSelect/types.d.ts +46 -0
  57. package/dist/CapUnifiedSelect/types.d.ts.map +1 -0
  58. package/dist/CapUnifiedSelect/useCapUnifiedSelect.d.ts +48 -0
  59. package/dist/CapUnifiedSelect/useCapUnifiedSelect.d.ts.map +1 -0
  60. package/dist/CapUnifiedSelect/useInfiniteScroll.d.ts +27 -0
  61. package/dist/CapUnifiedSelect/useInfiniteScroll.d.ts.map +1 -0
  62. package/dist/CapUnifiedSelect/utils.d.ts +45 -0
  63. package/dist/CapUnifiedSelect/utils.d.ts.map +1 -0
  64. package/dist/index.js +19298 -788
  65. package/dist/index.js.map +1 -1
  66. package/dist/styled/variables.d.ts +1 -0
  67. package/dist/styled/variables.d.ts.map +1 -1
  68. package/dist/styled/variables.scss +1 -0
  69. package/dist/utils/index.js.map +1 -1
  70. package/dist/utils/styles.d.ts +1 -1
  71. package/dist/utils/styles.d.ts.map +1 -1
  72. package/package.json +150 -15
@@ -1,6 +1,669 @@
1
1
  /******/ (() => { // webpackBootstrap
2
2
  /******/ var __webpack_modules__ = ({
3
3
 
4
+ /***/ 455:
5
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
6
+
7
+ "use strict";
8
+
9
+
10
+ exports.__esModule = true;
11
+ exports.SelectAllCheckbox = exports.NoResult = void 0;
12
+ var _antdV = __webpack_require__(4273);
13
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
14
+ var _react = _interopRequireDefault(__webpack_require__(9206));
15
+ var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
16
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
17
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
18
+ var _constants = __webpack_require__(9788);
19
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
20
+ var _jsxRuntime = __webpack_require__(4848);
21
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
22
+ const NoResult = _ref => {
23
+ let {
24
+ noResultCustomText,
25
+ className,
26
+ showUpload,
27
+ options,
28
+ noResultCustomIcon
29
+ } = _ref;
30
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
31
+ className: (0, _classnames.default)(className, _styles.default['cap-unified-select-no-result']),
32
+ align: "middle",
33
+ gap: 8,
34
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
35
+ type: noResultCustomIcon,
36
+ size: "m"
37
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
38
+ className: _styles.default['cap-unified-select-no-result-text'],
39
+ children: showUpload && (options == null ? void 0 : options.length) === 0 ? noResultCustomText : _constants.DEFAULTS.NO_RESULT_TEXT
40
+ })]
41
+ });
42
+ };
43
+
44
+ /**
45
+ * SelectAllCheckbox component for selecting/deselecting all available options
46
+ * Only shown for multi-select with static data
47
+ */
48
+ exports.NoResult = NoResult;
49
+ const SelectAllCheckbox = _ref2 => {
50
+ let {
51
+ currentItems,
52
+ tempValue,
53
+ setTempValue,
54
+ processTreeData,
55
+ disabled = false
56
+ } = _ref2;
57
+ const {
58
+ leafValues = []
59
+ } = processTreeData ? processTreeData(currentItems) : {};
60
+ const totalAvailable = leafValues.length;
61
+ const leafSet = new Set(leafValues);
62
+ const selectedInScope = Array.isArray(tempValue) ? tempValue.filter(v => leafSet.has(v)).length : 0;
63
+ const allChecked = totalAvailable > 0 && selectedInScope === totalAvailable;
64
+ const indeterminate = selectedInScope > 0 && selectedInScope < totalAvailable;
65
+ const handleChange = e => {
66
+ if (disabled) {
67
+ return;
68
+ }
69
+ if (e.target.checked) {
70
+ const merged = new Set(Array.isArray(tempValue) ? tempValue : []);
71
+ leafValues.forEach(v => merged.add(v));
72
+ setTempValue(Array.from(merged));
73
+ } else {
74
+ const toRemove = new Set(leafValues);
75
+ const next = (Array.isArray(tempValue) ? tempValue : []).filter(v => !toRemove.has(v));
76
+ setTempValue(next);
77
+ }
78
+ };
79
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
80
+ className: _styles.default['cap-unified-select-select-all-container'],
81
+ align: "middle",
82
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Checkbox, {
83
+ className: _styles.default['cap-unified-select-select-all-checkbox'],
84
+ checked: allChecked,
85
+ indeterminate: indeterminate,
86
+ onChange: handleChange,
87
+ disabled: disabled,
88
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
89
+ type: "label14",
90
+ className: _styles.default['cap-unified-select-select-all-label'],
91
+ children: "Select all"
92
+ })
93
+ })
94
+ });
95
+ };
96
+ exports.SelectAllCheckbox = SelectAllCheckbox;
97
+
98
+ /***/ }),
99
+
100
+ /***/ 480:
101
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
102
+
103
+ "use strict";
104
+
105
+
106
+ exports.__esModule = true;
107
+ exports.useCapUnifiedSelect = void 0;
108
+ var _react = __webpack_require__(9206);
109
+ var _constants = __webpack_require__(9788);
110
+ var _useInfiniteScroll = __webpack_require__(9103);
111
+ var _utils = __webpack_require__(8052);
112
+ const useCapUnifiedSelect = _ref => {
113
+ let {
114
+ type: _type,
115
+ options,
116
+ value,
117
+ onChange,
118
+ staticValue,
119
+ onSearch,
120
+ searchDebounce,
121
+ searchBasedOn,
122
+ onConfirm,
123
+ resetSearch,
124
+ resetData,
125
+ fetchMissingOptions,
126
+ onPopupScroll,
127
+ hasMore,
128
+ customPopupRender,
129
+ isMulti,
130
+ disabled = false
131
+ } = _ref;
132
+ const [searchText, setSearchText] = (0, _react.useState)('');
133
+ const [tempValue, setTempValue] = (0, _react.useState)(value);
134
+ const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
135
+ const [isSearching, setIsSearching] = (0, _react.useState)(false);
136
+ const [isResettingData, setIsResettingData] = (0, _react.useState)(false);
137
+ const [orderedOptions, setOrderedOptions] = (0, _react.useState)(null);
138
+ const searchTimeoutRef = (0, _react.useRef)(null);
139
+ const optionsRef = (0, _react.useRef)(options);
140
+ const selectedItemsCacheRef = (0, _react.useRef)(new Map());
141
+ const lastSearchQueryRef = (0, _react.useRef)('');
142
+ const searchClearedTimeRef = (0, _react.useRef)(null);
143
+ const prevOptionsRef = (0, _react.useRef)(options);
144
+ const prevOptionsBeforeResetRef = (0, _react.useRef)(options);
145
+ const initialSortDoneRef = (0, _react.useRef)(false);
146
+ const hasInteractedRef = (0, _react.useRef)(false);
147
+ const initialTempValueRef = (0, _react.useRef)(value);
148
+ const resetDataCalledRef = (0, _react.useRef)(false);
149
+ const resetDataCalledTimeRef = (0, _react.useRef)(null);
150
+ const fetchMissingOptionsCalledRef = (0, _react.useRef)(false);
151
+ const lastMissingValuesRef = (0, _react.useRef)('');
152
+
153
+ // Infinite scroll hook
154
+ const {
155
+ isLoadingOnScroll,
156
+ resetScrollState,
157
+ scrollTriggerOptionsCountRef
158
+ } = (0, _useInfiniteScroll.useInfiniteScroll)({
159
+ onPopupScroll,
160
+ hasMore,
161
+ options,
162
+ dropdownOpen,
163
+ optionsRef,
164
+ hasInteractedRef
165
+ });
166
+ (0, _react.useEffect)(() => {
167
+ if (!fetchMissingOptions) {
168
+ return;
169
+ }
170
+ if (options.length === 0) {
171
+ return;
172
+ }
173
+ const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
174
+ if (hasActiveSearch) {
175
+ return;
176
+ }
177
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
178
+ if (selectedValues.length === 0) {
179
+ fetchMissingOptionsCalledRef.current = false;
180
+ lastMissingValuesRef.current = '';
181
+ return;
182
+ }
183
+ const missingValues = (0, _utils.findMissingValues)(selectedValues, options);
184
+ if (missingValues.length === 0) {
185
+ fetchMissingOptionsCalledRef.current = false;
186
+ lastMissingValuesRef.current = '';
187
+ return;
188
+ }
189
+ const missingValuesKey = [...missingValues].sort().join(',');
190
+ if (!fetchMissingOptionsCalledRef.current || lastMissingValuesRef.current !== missingValuesKey) {
191
+ fetchMissingOptionsCalledRef.current = true;
192
+ lastMissingValuesRef.current = missingValuesKey;
193
+ fetchMissingOptions([...missingValues]);
194
+ }
195
+ }, [value, options, fetchMissingOptions, staticValue]);
196
+ (0, _react.useEffect)(() => {
197
+ 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;
198
+ if (!isEqual) {
199
+ setTempValue(value);
200
+ setOrderedOptions(null);
201
+ }
202
+ // eslint-disable-next-line react-hooks/exhaustive-deps
203
+ }, [value]);
204
+ (0, _react.useEffect)(() => {
205
+ const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
206
+ const findAndCacheOption = (opts, val) => {
207
+ for (const opt of opts) {
208
+ if (opt.value === val) {
209
+ selectedItemsCacheRef.current.set(val, opt);
210
+ return true;
211
+ }
212
+ if (opt.children && opt.children.length > 0) {
213
+ if (findAndCacheOption(opt.children, val)) {
214
+ return true;
215
+ }
216
+ }
217
+ }
218
+ return false;
219
+ };
220
+ currentSelected.forEach(val => {
221
+ if (!selectedItemsCacheRef.current.has(val)) {
222
+ findAndCacheOption(options, val);
223
+ }
224
+ });
225
+ const selectedSet = new Set(currentSelected);
226
+ selectedItemsCacheRef.current.forEach((_, value) => {
227
+ if (!selectedSet.has(value)) {
228
+ selectedItemsCacheRef.current.delete(value);
229
+ }
230
+ });
231
+ }, [tempValue, options]);
232
+ (0, _react.useEffect)(() => {
233
+ if (orderedOptions) {
234
+ const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
235
+ const allSelectedStillExist = currentSelected.every(val => (0, _utils.findValueInOptions)(options, val));
236
+ if (!allSelectedStillExist) {
237
+ setOrderedOptions(null);
238
+ }
239
+ }
240
+ }, [options, orderedOptions, tempValue]);
241
+ const debounceTimeout = searchDebounce != null ? searchDebounce : _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE;
242
+
243
+ // Cleanup timeouts on unmount
244
+ (0, _react.useEffect)(() => {
245
+ return () => {
246
+ if (searchTimeoutRef.current) {
247
+ clearTimeout(searchTimeoutRef.current);
248
+ }
249
+ };
250
+ }, []);
251
+ (0, _react.useEffect)(() => {
252
+ const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
253
+ if (staticValue || !isSearching || !hasSearchQuery) {
254
+ prevOptionsRef.current = options;
255
+ return;
256
+ }
257
+ const optionsChanged = prevOptionsRef.current !== options || prevOptionsRef.current.length !== options.length;
258
+ const searchCleared = lastSearchQueryRef.current === '';
259
+ const timeSinceCleared = searchClearedTimeRef.current ? Date.now() - searchClearedTimeRef.current : Infinity;
260
+ const hasOptionsData = options.length > 0;
261
+ const clearedSearchReady = searchCleared && hasOptionsData && timeSinceCleared > _constants.TIMEOUTS.SEARCH_CLEARED_TIMEOUT;
262
+ if (optionsChanged || clearedSearchReady) {
263
+ const timeoutId = setTimeout(() => {
264
+ setIsSearching(false);
265
+ prevOptionsRef.current = options;
266
+ if (searchCleared) {
267
+ searchClearedTimeRef.current = null;
268
+ }
269
+ }, _constants.TIMEOUTS.SEARCH_STATE_UPDATE_DELAY);
270
+ return () => clearTimeout(timeoutId);
271
+ }
272
+ prevOptionsRef.current = options;
273
+ }, [options, staticValue, isSearching]);
274
+ (0, _react.useEffect)(() => {
275
+ const hasSearchQuery = lastSearchQueryRef.current !== null && lastSearchQueryRef.current !== undefined;
276
+ if (!isSearching || staticValue || !hasSearchQuery) {
277
+ return;
278
+ }
279
+ const searchCleared = lastSearchQueryRef.current === '';
280
+ const timeoutDuration = searchCleared ? debounceTimeout + _constants.TIMEOUTS.SEARCH_CLEARED_BUFFER : debounceTimeout + _constants.TIMEOUTS.SEARCH_REGULAR_BUFFER;
281
+ const fallbackTimeout = setTimeout(() => {
282
+ setIsSearching(false);
283
+ searchClearedTimeRef.current = null;
284
+ }, timeoutDuration);
285
+ return () => clearTimeout(fallbackTimeout);
286
+ }, [isSearching, staticValue, debounceTimeout, options.length]);
287
+ (0, _react.useEffect)(() => {
288
+ if (!isResettingData) {
289
+ prevOptionsBeforeResetRef.current = options;
290
+ resetDataCalledTimeRef.current = null;
291
+ return;
292
+ }
293
+ const prevOptions = prevOptionsBeforeResetRef.current;
294
+ const currentOptions = options;
295
+ const optionsChanged = prevOptions !== currentOptions || prevOptions.length !== currentOptions.length || prevOptions.length === currentOptions.length && prevOptions.length > 0 && prevOptions.some((prevOpt, idx) => {
296
+ const currentOpt = currentOptions[idx];
297
+ return !currentOpt || prevOpt.value !== currentOpt.value || prevOpt.label !== currentOpt.label;
298
+ });
299
+ const timeSinceReset = resetDataCalledTimeRef.current ? Date.now() - resetDataCalledTimeRef.current : Infinity;
300
+ const hasDataAfterTimeout = currentOptions.length > 0 && timeSinceReset > _constants.TIMEOUTS.RESET_DATA_MIN_TIME && timeSinceReset < _constants.TIMEOUTS.RESET_DATA_MAX_TIME;
301
+ if (optionsChanged || hasDataAfterTimeout) {
302
+ setIsResettingData(false);
303
+ prevOptionsBeforeResetRef.current = currentOptions;
304
+ resetDataCalledTimeRef.current = null;
305
+ }
306
+ }, [options, isResettingData]);
307
+ (0, _react.useEffect)(() => {
308
+ if (!isResettingData) {
309
+ return;
310
+ }
311
+ const fallbackTimeout = setTimeout(() => {
312
+ setIsResettingData(false);
313
+ prevOptionsBeforeResetRef.current = options;
314
+ resetDataCalledTimeRef.current = null;
315
+ }, _constants.TIMEOUTS.RESET_DATA_TIMEOUT);
316
+ return () => clearTimeout(fallbackTimeout);
317
+ }, [isResettingData, options]);
318
+
319
+ /**
320
+ * Unified helper function to call resetData with proper state management.
321
+ * This centralizes all resetData logic to avoid duplication and ensure consistency.
322
+ *
323
+ * @param shouldReset - Whether to actually call resetData (based on conditions)
324
+ */
325
+ const callResetData = (0, _react.useCallback)(function (shouldReset) {
326
+ if (shouldReset === void 0) {
327
+ shouldReset = true;
328
+ }
329
+ if (!resetData || !shouldReset || options.length === 0) {
330
+ return;
331
+ }
332
+ prevOptionsBeforeResetRef.current = options;
333
+ setIsResettingData(true);
334
+ resetDataCalledRef.current = true;
335
+ resetDataCalledTimeRef.current = Date.now();
336
+ resetData();
337
+ }, [resetData, options]);
338
+ const handleSearch = (0, _react.useCallback)(query => {
339
+ if (searchTimeoutRef.current) {
340
+ clearTimeout(searchTimeoutRef.current);
341
+ }
342
+ const trimmedQuery = query.trim();
343
+ const wasSearching = lastSearchQueryRef.current !== '';
344
+ const isNowCleared = trimmedQuery === '';
345
+ if (wasSearching && isNowCleared) {
346
+ searchClearedTimeRef.current = Date.now();
347
+ } else if (!isNowCleared) {
348
+ searchClearedTimeRef.current = null;
349
+ }
350
+ lastSearchQueryRef.current = trimmedQuery;
351
+ if (trimmedQuery.length > 0 || lastSearchQueryRef.current.length > 0) {
352
+ hasInteractedRef.current = true;
353
+ }
354
+
355
+ // Reset data when search is cleared (search term length < 1)
356
+ // This handles requirement: "when search term is length less than 1 that is no search needed"
357
+ // and "when click on X in searched term then we are resetting the data to the initial page"
358
+ if (isNowCleared && wasSearching && !staticValue) {
359
+ callResetData();
360
+ }
361
+ if (!staticValue && onSearch) {
362
+ setIsSearching(true);
363
+ searchTimeoutRef.current = setTimeout(() => {
364
+ onSearch(trimmedQuery);
365
+ }, debounceTimeout);
366
+ } else if (!trimmedQuery) {
367
+ setIsSearching(false);
368
+ } else {
369
+ setIsSearching(true);
370
+ searchTimeoutRef.current = setTimeout(() => {
371
+ setIsSearching(false);
372
+ }, _constants.TIMEOUTS.STATIC_SEARCH_DELAY);
373
+ }
374
+ }, [onSearch, staticValue, debounceTimeout, callResetData]);
375
+ const prevOptionsCountBeforeFetchMissingRef = (0, _react.useRef)(options.length);
376
+ const prevOptionsBeforeFetchMissingRef = (0, _react.useRef)(options);
377
+ (0, _react.useEffect)(() => {
378
+ if (!orderedOptions || !onPopupScroll) {
379
+ return;
380
+ }
381
+ const currentOptions = options;
382
+ const optionsCountIncreased = currentOptions.length > scrollTriggerOptionsCountRef.current;
383
+ if (optionsCountIncreased && scrollTriggerOptionsCountRef.current > 0) {
384
+ const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
385
+ if (selectedValues.length > 0) {
386
+ const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
387
+ setOrderedOptions(reordered);
388
+ scrollTriggerOptionsCountRef.current = currentOptions.length;
389
+ }
390
+ }
391
+ // eslint-disable-next-line react-hooks/exhaustive-deps
392
+ }, [options, orderedOptions, onPopupScroll, tempValue]);
393
+ (0, _react.useEffect)(() => {
394
+ if (!fetchMissingOptions) {
395
+ prevOptionsCountBeforeFetchMissingRef.current = options.length;
396
+ prevOptionsBeforeFetchMissingRef.current = options;
397
+ return;
398
+ }
399
+ const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
400
+ if (hasActiveSearch) {
401
+ return;
402
+ }
403
+ const currentOptions = options;
404
+ const currentSelectedValues = Array.isArray(value) ? value : value ? [value] : [];
405
+ const tempSelectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
406
+ const selectedValues = tempSelectedValues.length > 0 ? tempSelectedValues : currentSelectedValues;
407
+ if (selectedValues.length === 0) {
408
+ prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
409
+ prevOptionsBeforeFetchMissingRef.current = currentOptions;
410
+ return;
411
+ }
412
+ const prevOptions = prevOptionsBeforeFetchMissingRef.current;
413
+ const optionsCountIncreased = currentOptions.length > prevOptionsCountBeforeFetchMissingRef.current;
414
+ const optionsChanged = prevOptions !== currentOptions || optionsCountIncreased;
415
+ const hasNewlyFetchedSelectedItems = (() => {
416
+ if (selectedValues.length === 0 || !optionsChanged) {
417
+ return false;
418
+ }
419
+ const previouslyMissingValues = selectedValues.filter(val => !(0, _utils.findValueInOptions)(prevOptions, val));
420
+ if (previouslyMissingValues.length === 0) {
421
+ return false;
422
+ }
423
+ const nowPresentValues = previouslyMissingValues.filter(val => (0, _utils.findValueInOptions)(currentOptions, val));
424
+ return nowPresentValues.length > 0;
425
+ })();
426
+ if (optionsChanged && hasNewlyFetchedSelectedItems) {
427
+ const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
428
+ setOrderedOptions(reordered);
429
+ }
430
+ prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
431
+ prevOptionsBeforeFetchMissingRef.current = currentOptions;
432
+ }, [options, value, tempValue, fetchMissingOptions, staticValue]);
433
+ (0, _react.useEffect)(() => {
434
+ if (initialSortDoneRef.current || !(options != null && options.length)) {
435
+ return;
436
+ }
437
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
438
+ if (selectedValues.length === 0) {
439
+ initialSortDoneRef.current = true;
440
+ return;
441
+ }
442
+ const hasSelectedInOptions = selectedValues.some(val => (0, _utils.findValueInOptions)(options, val));
443
+ if (hasSelectedInOptions) {
444
+ const reordered = (0, _utils.reorderOptionsBySelection)(options, selectedValues);
445
+ setOrderedOptions(reordered);
446
+ }
447
+ initialSortDoneRef.current = true;
448
+ }, [options, value]);
449
+
450
+ // Data source computation (raw, without React component enhancement)
451
+ const dataSource = (0, _react.useMemo)(() => {
452
+ return (0, _utils.prepareDataSource)(options, orderedOptions, searchText, value, staticValue, selectedItemsCacheRef.current);
453
+ }, [options, orderedOptions, searchText, value, staticValue]);
454
+
455
+ // Filtered tree
456
+ const filteredTree = (0, _react.useMemo)(() => {
457
+ const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
458
+ return (0, _utils.filterTreeData)(dataSource, searchText.trim(), searchBasedOn, selectedValues.length > 0 ? selectedValues : undefined);
459
+ }, [dataSource, searchText, searchBasedOn, tempValue]);
460
+
461
+ // Tree maps and selected count
462
+ const treeMaps = (0, _react.useMemo)(() => (0, _utils.buildTreeMaps)(options), [options]);
463
+ const selectedLeafCount = (0, _react.useMemo)(() => (0, _utils.countSelectedLeaves)(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
464
+ const displayValue = dropdownOpen ? tempValue : value;
465
+ const handleConfirm = (0, _react.useCallback)(() => {
466
+ hasInteractedRef.current = true;
467
+ const optionsToReorder = options;
468
+ if (isMulti && Array.isArray(tempValue) && tempValue.length > 0) {
469
+ const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, tempValue);
470
+ setOrderedOptions(reordered);
471
+ } else if (!isMulti && tempValue && !Array.isArray(tempValue)) {
472
+ const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, [tempValue]);
473
+ setOrderedOptions(reordered);
474
+ } else {
475
+ setOrderedOptions(null);
476
+ }
477
+ onChange == null || onChange(tempValue);
478
+ setDropdownOpen(false);
479
+ setIsSearching(false);
480
+
481
+ // Check if there was an active search before clearing it
482
+ const hadActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
483
+
484
+ // Clear search-related state and timeouts (same as X button behavior)
485
+ if (resetSearch) {
486
+ setSearchText('');
487
+ if (hadActiveSearch) {
488
+ searchClearedTimeRef.current = Date.now();
489
+ } else {
490
+ searchClearedTimeRef.current = null;
491
+ }
492
+ lastSearchQueryRef.current = '';
493
+ }
494
+
495
+ // Clear any pending search timeouts
496
+ if (searchTimeoutRef.current) {
497
+ clearTimeout(searchTimeoutRef.current);
498
+ searchTimeoutRef.current = null;
499
+ }
500
+
501
+ // If there was an active search, trigger onSearch('') to reset data (same as X button)
502
+ // This ensures the parent component resets the options back to initial state
503
+ if (hadActiveSearch && !staticValue && onSearch) {
504
+ onSearch('');
505
+ }
506
+
507
+ // Call resetData if there was an active search that we're resetting
508
+ // This handles requirement: "when user click confirm & clear button"
509
+ // Reset data back to initial state after a search + confirm
510
+ callResetData(hadActiveSearch || options.length > 0);
511
+ onConfirm == null || onConfirm(tempValue);
512
+ }, [onChange, onConfirm, tempValue, resetSearch, isMulti, options, callResetData, staticValue, onSearch]);
513
+ const handleClearAll = (0, _react.useCallback)(() => {
514
+ const cleared = isMulti ? [] : undefined;
515
+ setSearchText('');
516
+ setIsSearching(false);
517
+ lastSearchQueryRef.current = '';
518
+ searchClearedTimeRef.current = null;
519
+ if (searchTimeoutRef.current) {
520
+ clearTimeout(searchTimeoutRef.current);
521
+ searchTimeoutRef.current = null;
522
+ }
523
+ resetScrollState();
524
+ setOrderedOptions(null);
525
+ initialSortDoneRef.current = false;
526
+ hasInteractedRef.current = false;
527
+ resetDataCalledRef.current = false;
528
+ fetchMissingOptionsCalledRef.current = false;
529
+ lastMissingValuesRef.current = '';
530
+ setTempValue(cleared);
531
+ onChange == null || onChange(cleared);
532
+ setDropdownOpen(false);
533
+
534
+ // Call resetData when user clicks clear button
535
+ // This handles requirement: "when user click confirm & clear button"
536
+ callResetData();
537
+ }, [isMulti, onChange, callResetData, resetScrollState]);
538
+ const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
539
+ if (open) {
540
+ initialTempValueRef.current = value;
541
+ hasInteractedRef.current = false;
542
+ resetDataCalledRef.current = false;
543
+ fetchMissingOptionsCalledRef.current = false;
544
+ lastMissingValuesRef.current = '';
545
+ if (searchTimeoutRef.current) {
546
+ clearTimeout(searchTimeoutRef.current);
547
+ searchTimeoutRef.current = null;
548
+ }
549
+ setIsSearching(false);
550
+ searchClearedTimeRef.current = null;
551
+ resetScrollState();
552
+ if (isResettingData) {
553
+ setIsResettingData(false);
554
+ prevOptionsBeforeResetRef.current = options;
555
+ resetDataCalledTimeRef.current = null;
556
+ }
557
+ } else {
558
+ if (!customPopupRender) {
559
+ onChange == null || onChange(tempValue);
560
+ } else {
561
+ setTempValue(value);
562
+ }
563
+ if (resetSearch) {
564
+ setSearchText('');
565
+ setIsSearching(false);
566
+ lastSearchQueryRef.current = '';
567
+ searchClearedTimeRef.current = null;
568
+ }
569
+ resetScrollState();
570
+
571
+ // Call resetData when dropdown closes if user interacted and resetData wasn't called yet
572
+ if (hasInteractedRef.current && !resetDataCalledRef.current) {
573
+ callResetData();
574
+ } else if (!hasInteractedRef.current) {
575
+ if (searchTimeoutRef.current) {
576
+ clearTimeout(searchTimeoutRef.current);
577
+ searchTimeoutRef.current = null;
578
+ }
579
+ setIsSearching(false);
580
+ setIsResettingData(false);
581
+ lastSearchQueryRef.current = '';
582
+ }
583
+ hasInteractedRef.current = false;
584
+ }
585
+ setDropdownOpen(open);
586
+ }, [customPopupRender, value, onChange, tempValue, resetSearch, callResetData, options, isResettingData, resetScrollState]);
587
+ const handleSearchChange = (0, _react.useCallback)(e => {
588
+ const query = e.target.value;
589
+ setSearchText(query);
590
+ handleSearch(query);
591
+ }, [handleSearch]);
592
+ const handleSearchKeyDown = (0, _react.useCallback)(e => {
593
+ if (e.key === 'Backspace' || e.key === 'Delete') {
594
+ e.stopPropagation();
595
+ }
596
+ if (e.key === 'Escape' && searchText.length > 0) {
597
+ e.stopPropagation();
598
+ }
599
+ }, [searchText]);
600
+
601
+ /**
602
+ * Helper function to handle resetData call when value is cleared.
603
+ * Only resets data if there was an active search, as resetting on every unselect
604
+ * would be too aggressive and could reset data unnecessarily when user simply unselects.
605
+ *
606
+ * This addresses the question: "If user unselects or clears current selection then do we need to call resetData?"
607
+ * Answer: Only if there was an active search query, to avoid unnecessary resets.
608
+ */
609
+ const handleResetDataOnClear = (0, _react.useCallback)(() => {
610
+ // Only reset data if there was an active search query
611
+ // This prevents unnecessary resets when user simply unselects without searching
612
+ const hadActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
613
+ callResetData(hadActiveSearch);
614
+ }, [staticValue, callResetData]);
615
+ const handleSingleSelectChange = (0, _react.useCallback)(newValue => {
616
+ if (disabled) {
617
+ return;
618
+ }
619
+ if (newValue === undefined || newValue === null) {
620
+ handleResetDataOnClear();
621
+ }
622
+ onChange == null || onChange(newValue);
623
+ }, [onChange, disabled, handleResetDataOnClear]);
624
+ const handleMultiSelectChange = (0, _react.useCallback)(newValue => {
625
+ if (disabled) {
626
+ return;
627
+ }
628
+ const initialValue = initialTempValueRef.current;
629
+ 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;
630
+ if (hasChanged) {
631
+ hasInteractedRef.current = true;
632
+ }
633
+ if (newValue === undefined || newValue === null || Array.isArray(newValue) && newValue.length === 0) {
634
+ handleResetDataOnClear();
635
+ }
636
+ setTempValue(newValue);
637
+ }, [disabled, handleResetDataOnClear]);
638
+ return {
639
+ searchText,
640
+ setSearchText,
641
+ tempValue,
642
+ setTempValue,
643
+ dropdownOpen,
644
+ isSearching,
645
+ isLoadingOnScroll,
646
+ isResettingData,
647
+ orderedOptions,
648
+ filteredTree,
649
+ treeMaps,
650
+ selectedLeafCount,
651
+ displayValue,
652
+ handleSearch,
653
+ handleSearchChange,
654
+ handleSearchKeyDown,
655
+ handleConfirm,
656
+ handleClearAll,
657
+ handleDropdownVisibilityChange,
658
+ handleSingleSelectChange,
659
+ handleMultiSelectChange,
660
+ selectedItemsCacheRef
661
+ };
662
+ };
663
+ exports.useCapUnifiedSelect = useCapUnifiedSelect;
664
+
665
+ /***/ }),
666
+
4
667
  /***/ 540:
5
668
  /***/ ((module) => {
6
669
 
@@ -35,6 +698,20 @@ var f=__webpack_require__(9206),k=Symbol.for("react.element"),l=Symbol.for("reac
35
698
  function q(c,a,g){var b,d={},e=null,h=null;void 0!==g&&(e=""+g);void 0!==a.key&&(e=""+a.key);void 0!==a.ref&&(h=a.ref);for(b in a)m.call(a,b)&&!p.hasOwnProperty(b)&&(d[b]=a[b]);if(c&&c.defaultProps)for(b in a=c.defaultProps,a)void 0===d[b]&&(d[b]=a[b]);return{$$typeof:k,type:c,key:e,ref:h,props:d,_owner:n.current}}exports.Fragment=l;exports.jsx=q;exports.jsxs=q;
36
699
 
37
700
 
701
+ /***/ }),
702
+
703
+ /***/ 1549:
704
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
705
+
706
+ "use strict";
707
+
708
+
709
+ exports.__esModule = true;
710
+ exports["default"] = void 0;
711
+ var _CapSpin = _interopRequireDefault(__webpack_require__(7579));
712
+ exports["default"] = _CapSpin.default;
713
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
714
+
38
715
  /***/ }),
39
716
 
40
717
  /***/ 1601:
@@ -72,6 +749,102 @@ ___CSS_LOADER_EXPORT___.locals = {
72
749
  module.exports = ___CSS_LOADER_EXPORT___;
73
750
 
74
751
 
752
+ /***/ }),
753
+
754
+ /***/ 1879:
755
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
756
+
757
+ "use strict";
758
+
759
+
760
+ exports.__esModule = true;
761
+ exports.enhanceOptionsWithComponents = void 0;
762
+ var _react = _interopRequireDefault(__webpack_require__(9206));
763
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
764
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
765
+ var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
766
+ var _constants = __webpack_require__(9788);
767
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
768
+ var _jsxRuntime = __webpack_require__(4848);
769
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
770
+ 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); }
771
+ /**
772
+ * Enhances options with React components for rendering
773
+ * Adds decorated titles with suffixes and tooltips
774
+ */
775
+ const enhanceOptionsWithComponents = (options, type) => {
776
+ if (!(options != null && options.length)) return [];
777
+ const isTree = type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT;
778
+ const enhanceOptions = opts => opts.map(opt => {
779
+ const displayText = (opt == null ? void 0 : opt.label) || (opt == null ? void 0 : opt.value);
780
+ const tooltipTitle = opt == null ? void 0 : opt.hoverText;
781
+ const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
782
+ className: _styles.default['cap-unified-select-option-with-suffix'],
783
+ justify: "space-between",
784
+ align: "middle",
785
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
786
+ className: _styles.default['cap-unified-select-option-label'],
787
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
788
+ type: "label14",
789
+ className: _styles.default['truncate-text'],
790
+ title: tooltipTitle,
791
+ children: displayText
792
+ })
793
+ }), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
794
+ className: _styles.default['cap-unified-select-option-end'],
795
+ children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
796
+ className: _styles.default['cap-unified-select-option-suffix'],
797
+ children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
798
+ title: opt == null ? void 0 : opt.optionSuffixInfo
799
+ })]
800
+ }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
801
+ title: opt == null ? void 0 : opt.optionTooltipInfo
802
+ })]
803
+ })]
804
+ });
805
+ return _extends({}, opt, {
806
+ title: decoratedTitle,
807
+ label: opt == null ? void 0 : opt.label,
808
+ children: opt != null && opt.children ? enhanceOptions(opt.children) : []
809
+ });
810
+ });
811
+ if (isTree) {
812
+ return enhanceOptions(options);
813
+ }
814
+ return options.map(opt => {
815
+ const displayText = (opt == null ? void 0 : opt.label) || (opt == null ? void 0 : opt.value);
816
+ const tooltipTitle = opt == null ? void 0 : opt.hoverText;
817
+ return _extends({}, opt, {
818
+ title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
819
+ className: _styles.default['cap-unified-select-option-with-suffix'],
820
+ justify: "space-between",
821
+ align: "middle",
822
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
823
+ className: _styles.default['cap-unified-select-option-label'],
824
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
825
+ type: "label14",
826
+ className: _styles.default['truncate-text'],
827
+ title: tooltipTitle,
828
+ children: displayText
829
+ })
830
+ }), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
831
+ className: _styles.default['cap-unified-select-option-end'],
832
+ children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
833
+ className: _styles.default['cap-unified-select-option-suffix'],
834
+ children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
835
+ title: opt == null ? void 0 : opt.optionSuffixInfo
836
+ })]
837
+ }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
838
+ title: opt == null ? void 0 : opt.optionTooltipInfo
839
+ })]
840
+ })]
841
+ }),
842
+ label: opt == null ? void 0 : opt.label
843
+ });
844
+ });
845
+ };
846
+ exports.enhanceOptionsWithComponents = enhanceOptionsWithComponents;
847
+
75
848
  /***/ }),
76
849
 
77
850
  /***/ 2119:
@@ -116,7 +889,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
116
889
 
117
890
  exports.__esModule = true;
118
891
  exports["default"] = void 0;
119
- var _classnames = _interopRequireDefault(__webpack_require__(2678));
892
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
120
893
  var _react = _interopRequireDefault(__webpack_require__(9206));
121
894
  var _styles = _interopRequireDefault(__webpack_require__(4939));
122
895
  var _jsxRuntime = __webpack_require__(4848);
@@ -181,14 +954,6 @@ var _default = exports["default"] = CapLabelWithStatic;
181
954
 
182
955
  /***/ }),
183
956
 
184
- /***/ 2678:
185
- /***/ ((module) => {
186
-
187
- "use strict";
188
- module.exports = require("classnames");
189
-
190
- /***/ }),
191
-
192
957
  /***/ 3737:
193
958
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
194
959
 
@@ -212,7 +977,7 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
212
977
  exports.__esModule = true;
213
978
  exports["default"] = void 0;
214
979
  var _antdV = __webpack_require__(4273);
215
- var _classnames = _interopRequireDefault(__webpack_require__(2678));
980
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
216
981
  var _react = _interopRequireDefault(__webpack_require__(9206));
217
982
  var _styles = _interopRequireDefault(__webpack_require__(5765));
218
983
  var _jsxRuntime = __webpack_require__(4848);
@@ -467,7 +1232,7 @@ module.exports = domAPI;
467
1232
 
468
1233
  exports.__esModule = true;
469
1234
  exports["default"] = void 0;
470
- var _classnames = _interopRequireDefault(__webpack_require__(2678));
1235
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
471
1236
  var _react = _interopRequireDefault(__webpack_require__(9206));
472
1237
  var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
473
1238
  var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
@@ -743,175 +1508,47 @@ ___CSS_LOADER_EXPORT___.locals = {
743
1508
  "label32": `blaze-ui-label32`,
744
1509
  "label33": `blaze-ui-label33`,
745
1510
  "cap-label-div": `blaze-ui-cap-label-div`,
746
- "cap-label-span": `blaze-ui-cap-label-span`
747
- };
748
- module.exports = ___CSS_LOADER_EXPORT___;
749
-
750
-
751
- /***/ }),
752
-
753
- /***/ 5353:
754
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
755
-
756
- "use strict";
757
-
758
-
759
- exports.__esModule = true;
760
- exports["default"] = void 0;
761
- var _antdV = __webpack_require__(4273);
762
- var _classnames = _interopRequireDefault(__webpack_require__(2678));
763
- var _react = _interopRequireWildcard(__webpack_require__(9206));
764
- var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
765
- var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
766
- var _CapRow = _interopRequireDefault(__webpack_require__(7375));
767
- var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
768
- var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
769
- var _styles = _interopRequireDefault(__webpack_require__(8263));
770
- var _jsxRuntime = __webpack_require__(4848);
771
- const _excluded = ["type", "options", "value", "onChange", "placeholder", "className", "style", "isError", "errorMessage", "containerClassName", "popoverClassName", "allowClear", "headerLabel", "onUpload", "tooltip", "bylineText", "disabled", "showUpload", "customPopupRender", "showSearch", "searchBasedOn", "onConfirm", "clearText", "noResultCustomText", "noResultCustomIcon", "readOnly"];
772
- function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
773
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
774
- function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
775
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); }
776
- const SELECT_TYPES = {
777
- SELECT: 'select',
778
- MULTI_SELECT: 'multiSelect',
779
- TREE_SELECT: 'treeSelect',
780
- MULTI_TREE_SELECT: 'multiTreeSelect'
781
- };
782
- const NoResult = _ref => {
783
- let {
784
- noResultCustomText,
785
- className,
786
- showUpload,
787
- options,
788
- noResultCustomIcon
789
- } = _ref;
790
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
791
- className: (0, _classnames.default)(className, _styles.default['cap-unified-select-no-result']),
792
- align: "middle",
793
- gap: 8,
794
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
795
- type: noResultCustomIcon,
796
- size: "m"
797
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
798
- className: _styles.default['cap-unified-select-no-result-text'],
799
- children: showUpload && (options == null ? void 0 : options.length) === 0 ? noResultCustomText : 'No results found'
800
- })]
801
- });
802
- };
803
- const SelectAllCheckbox = _ref2 => {
804
- let {
805
- currentItems,
806
- tempValue,
807
- setTempValue,
808
- processTreeData
809
- } = _ref2;
810
- const {
811
- leafValues = []
812
- } = processTreeData ? processTreeData(currentItems) : {};
813
- const totalAvailable = leafValues.length;
814
- const leafSet = new Set(leafValues);
815
- const selectedInScope = Array.isArray(tempValue) ? tempValue.filter(v => leafSet.has(v)).length : 0;
816
- const allChecked = totalAvailable > 0 && selectedInScope === totalAvailable;
817
- const indeterminate = selectedInScope > 0 && selectedInScope < totalAvailable;
818
- const handleChange = e => {
819
- if (e.target.checked) {
820
- const merged = new Set(Array.isArray(tempValue) ? tempValue : []);
821
- leafValues.forEach(v => merged.add(v));
822
- setTempValue(Array.from(merged));
823
- } else {
824
- const toRemove = new Set(leafValues);
825
- const next = (Array.isArray(tempValue) ? tempValue : []).filter(v => !toRemove.has(v));
826
- setTempValue(next);
827
- }
828
- };
829
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
830
- className: _styles.default['cap-unified-select-select-all-container'],
831
- align: "middle",
832
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Checkbox, {
833
- className: _styles.default['cap-unified-select-select-all-checkbox'],
834
- checked: allChecked,
835
- indeterminate: indeterminate,
836
- onChange: handleChange,
837
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
838
- type: "label14",
839
- className: _styles.default['cap-unified-select-select-all-label'],
840
- children: "Select all"
841
- })
842
- })
843
- });
844
- };
845
- const buildTreeMaps = nodes => {
846
- const result = {
847
- leafValues: [],
848
- parentChildMap: {},
849
- nodeMap: {}
850
- };
851
- if (!nodes) return result;
852
- const traverse = items => {
853
- items == null || items.forEach(item => {
854
- if (item.value !== undefined) {
855
- result.nodeMap[item.value] = item;
856
- if (item != null && item.children && item.children.length > 0) {
857
- result.parentChildMap[item.value] = item.children.map(child => child == null ? void 0 : child.value).filter(v => v !== undefined);
858
- traverse(item.children);
859
- } else {
860
- result.leafValues.push(item.value);
861
- }
862
- }
863
- });
864
- };
865
- traverse(nodes);
866
- return result;
867
- };
868
- const countSelectedLeaves = (treeMaps, selectedValues) => {
869
- var _treeMaps$leafValues;
870
- if (!Array.isArray(selectedValues) || !(selectedValues != null && selectedValues.length)) return 0;
871
- const expandedSet = new Set(selectedValues);
872
- const processNode = value => {
873
- var _treeMaps$parentChild;
874
- const children = treeMaps == null || (_treeMaps$parentChild = treeMaps.parentChildMap) == null ? void 0 : _treeMaps$parentChild[value];
875
- if (!children) return;
876
- children == null || children.forEach(childValue => {
877
- expandedSet.add(childValue);
878
- processNode(childValue);
879
- });
880
- };
881
- selectedValues == null || selectedValues.forEach(processNode);
882
- return (treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.reduce((count, leaf) => expandedSet.has(leaf) ? count + 1 : count, 0)) || 0;
883
- };
884
- const filterTreeData = function (data, search, searchBasedOn) {
885
- if (searchBasedOn === void 0) {
886
- searchBasedOn = 'label';
887
- }
888
- if (!(data != null && data.length) || !search) return data;
889
- const searchLower = search.toLowerCase();
890
- const nodeMatchesSearch = node => {
891
- var _node$value, _node$key, _ref3, _node$label;
892
- const target = searchBasedOn === 'value' ? String((_node$value = node == null ? void 0 : node.value) != null ? _node$value : '') : searchBasedOn === 'key' ? String((_node$key = node == null ? void 0 : node.key) != null ? _node$key : '') : String((_ref3 = (_node$label = node == null ? void 0 : node.label) != null ? _node$label : node == null ? void 0 : node.title) != null ? _ref3 : '');
893
- return target.toLowerCase().includes(searchLower);
894
- };
895
- const loop = items => items.reduce((acc, item) => {
896
- var _item$children;
897
- if (!item) return acc;
898
- const children = item != null && (_item$children = item.children) != null && _item$children.length ? loop(item.children) : [];
899
- if (nodeMatchesSearch(item) || children.length) {
900
- acc.push(_extends({}, item, {
901
- children
902
- }));
903
- }
904
- return acc;
905
- }, []);
906
- return loop(data);
1511
+ "cap-label-span": `blaze-ui-cap-label-span`
907
1512
  };
908
- const CapUnifiedSelect = _ref4 => {
1513
+ module.exports = ___CSS_LOADER_EXPORT___;
1514
+
1515
+
1516
+ /***/ }),
1517
+
1518
+ /***/ 5353:
1519
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1520
+
1521
+ "use strict";
1522
+
1523
+
1524
+ exports.__esModule = true;
1525
+ exports["default"] = void 0;
1526
+ var _antdV = __webpack_require__(4273);
1527
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1528
+ var _react = _interopRequireWildcard(__webpack_require__(9206));
1529
+ var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
1530
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
1531
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
1532
+ var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
1533
+ var _constants = __webpack_require__(9788);
1534
+ var _CustomDropdown = __webpack_require__(8033);
1535
+ var _DropdownHeader = __webpack_require__(9315);
1536
+ var _enhanceOptions = __webpack_require__(1879);
1537
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
1538
+ var _useCapUnifiedSelect = __webpack_require__(480);
1539
+ var _jsxRuntime = __webpack_require__(4848);
1540
+ 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"];
1541
+ 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); }
1542
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1543
+ 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); }
1544
+ 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; }
1545
+ const CapUnifiedSelect = _ref => {
909
1546
  let {
910
- type = SELECT_TYPES.SELECT,
1547
+ type = _constants.SELECT_TYPES.SELECT,
911
1548
  options = [],
912
1549
  value,
913
1550
  onChange,
914
- placeholder = 'Select an option',
1551
+ placeholder = _constants.DEFAULTS.PLACEHOLDER,
915
1552
  className = '',
916
1553
  style,
917
1554
  isError = false,
@@ -921,6 +1558,7 @@ const CapUnifiedSelect = _ref4 => {
921
1558
  allowClear = false,
922
1559
  headerLabel,
923
1560
  onUpload,
1561
+ uploadLabel = _constants.DEFAULTS.UPLOAD_LABEL,
924
1562
  tooltip,
925
1563
  bylineText,
926
1564
  disabled = false,
@@ -928,69 +1566,71 @@ const CapUnifiedSelect = _ref4 => {
928
1566
  customPopupRender = true,
929
1567
  showSearch = true,
930
1568
  searchBasedOn = 'label',
1569
+ onSearch,
1570
+ searchDebounce = _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE,
931
1571
  onConfirm,
932
- clearText = 'Clear',
933
- noResultCustomText = 'No results found',
934
- noResultCustomIcon = 'warning',
935
- readOnly = false
936
- } = _ref4,
937
- rest = _objectWithoutPropertiesLoose(_ref4, _excluded);
938
- const [searchText, setSearchText] = (0, _react.useState)('');
939
- const [tempValue, setTempValue] = (0, _react.useState)(value);
940
- const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
941
- (0, _react.useEffect)(() => {
942
- const isEqual = Array.isArray(value) && Array.isArray(tempValue) ? (value == null ? void 0 : value.length) === (tempValue == null ? void 0 : tempValue.length) && value.every(v => Array.isArray(tempValue) && tempValue.includes(v)) : value === tempValue;
943
- if (!isEqual) setTempValue(value);
944
- }, [value]);
945
- const isMulti = (0, _react.useMemo)(() => type === SELECT_TYPES.MULTI_SELECT || type === SELECT_TYPES.MULTI_TREE_SELECT, [type]);
946
- const isTree = (0, _react.useMemo)(() => type === SELECT_TYPES.TREE_SELECT || type === SELECT_TYPES.MULTI_TREE_SELECT, [type]);
947
- const dataSource = (0, _react.useMemo)(() => {
948
- if (!(options != null && options.length)) return [];
949
- const enhanceOptions = opts => opts.map(opt => {
950
- const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
951
- className: _styles.default['cap-unified-select-option-with-suffix'],
952
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
953
- type: "label14",
954
- className: _styles.default['cap-unified-select-option-label'],
955
- children: opt == null ? void 0 : opt.label
956
- }), (opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
957
- className: _styles.default['cap-unified-select-option-suffix'],
958
- children: [opt == null ? void 0 : opt.optionSuffix, ' ', (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
959
- title: opt == null ? void 0 : opt.optionSuffixInfo
960
- })]
961
- }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
962
- title: opt == null ? void 0 : opt.optionTooltipInfo
963
- })]
964
- });
965
- return _extends({}, opt, {
966
- title: decoratedTitle,
967
- label: opt == null ? void 0 : opt.label,
968
- children: opt != null && opt.children ? enhanceOptions(opt.children) : []
969
- });
970
- });
971
- return isTree ? enhanceOptions(options) : options.map(opt => _extends({}, opt, {
972
- title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
973
- className: _styles.default['cap-unified-select-option-with-suffix'],
974
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
975
- type: "label14",
976
- className: _styles.default['cap-unified-select-option-label'],
977
- children: opt == null ? void 0 : opt.label
978
- }), (opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
979
- className: _styles.default['cap-unified-select-option-suffix'],
980
- children: [opt == null ? void 0 : opt.optionSuffix, ' ', (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
981
- title: opt == null ? void 0 : opt.optionSuffixInfo
982
- })]
983
- }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
984
- title: opt == null ? void 0 : opt.optionTooltipInfo
985
- })]
986
- }),
987
- label: opt == null ? void 0 : opt.label
988
- }));
989
- }, [isTree, options]);
990
- const filteredTree = (0, _react.useMemo)(() => filterTreeData(dataSource, searchText, searchBasedOn), [dataSource, searchText, searchBasedOn]);
991
- const treeMaps = (0, _react.useMemo)(() => buildTreeMaps(options), [options]);
992
- const selectedLeafCount = (0, _react.useMemo)(() => countSelectedLeaves(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
993
- const displayValue = dropdownOpen ? tempValue : value;
1572
+ clearText = _constants.DEFAULTS.CLEAR_TEXT,
1573
+ noResultCustomText = _constants.DEFAULTS.NO_RESULT_TEXT,
1574
+ noResultCustomIcon = _constants.DEFAULTS.NO_RESULT_ICON,
1575
+ readOnly = false,
1576
+ staticValue = true,
1577
+ onFooterDownloadChange,
1578
+ onPopupScroll,
1579
+ hasMore = true,
1580
+ enableVirtualization = false,
1581
+ virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
1582
+ resetSearch = true,
1583
+ resetData,
1584
+ fetchMissingOptions
1585
+ } = _ref,
1586
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
1587
+ const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
1588
+ const {
1589
+ searchText,
1590
+ tempValue,
1591
+ setTempValue,
1592
+ dropdownOpen,
1593
+ isSearching,
1594
+ isLoadingOnScroll,
1595
+ isResettingData,
1596
+ filteredTree: rawFilteredTree,
1597
+ treeMaps,
1598
+ selectedLeafCount,
1599
+ displayValue,
1600
+ handleSearchChange,
1601
+ handleSearchKeyDown,
1602
+ handleConfirm,
1603
+ handleClearAll,
1604
+ handleDropdownVisibilityChange,
1605
+ handleSingleSelectChange,
1606
+ handleMultiSelectChange
1607
+ } = (0, _useCapUnifiedSelect.useCapUnifiedSelect)({
1608
+ type,
1609
+ options,
1610
+ value,
1611
+ onChange,
1612
+ staticValue,
1613
+ onSearch,
1614
+ searchDebounce,
1615
+ searchBasedOn,
1616
+ onConfirm,
1617
+ resetSearch,
1618
+ resetData,
1619
+ fetchMissingOptions,
1620
+ onPopupScroll,
1621
+ hasMore,
1622
+ customPopupRender,
1623
+ isMulti,
1624
+ disabled
1625
+ });
1626
+
1627
+ // Enhance filtered tree with React components
1628
+ const filteredTree = (0, _react.useMemo)(() => {
1629
+ if (!(rawFilteredTree != null && rawFilteredTree.length)) return [];
1630
+ return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type);
1631
+ }, [rawFilteredTree, type]);
1632
+
1633
+ // Suffix icon with "more" tooltip
994
1634
  const suffix = (0, _react.useMemo)(() => {
995
1635
  const count = Array.isArray(displayValue) ? displayValue == null ? void 0 : displayValue.length : displayValue ? 1 : 0;
996
1636
  const renderTooltipTitle = values => {
@@ -1020,151 +1660,78 @@ const CapUnifiedSelect = _ref4 => {
1020
1660
  })]
1021
1661
  });
1022
1662
  }, [isMulti, displayValue, dropdownOpen]);
1663
+
1664
+ // Prefix for multi-select (first selected item label)
1023
1665
  const prefix = (0, _react.useMemo)(() => {
1024
1666
  if (isMulti && Array.isArray(displayValue) && (displayValue == null ? void 0 : displayValue.length) > 0) {
1025
1667
  var _treeMaps$nodeMap;
1026
1668
  const firstLeafValue = displayValue.find(val => {
1027
- var _treeMaps$leafValues2;
1028
- return treeMaps == null || (_treeMaps$leafValues2 = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues2.includes(val);
1669
+ var _treeMaps$leafValues;
1670
+ return treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.includes(val);
1029
1671
  });
1030
1672
  return firstLeafValue ? (treeMaps == null || (_treeMaps$nodeMap = treeMaps.nodeMap) == null || (_treeMaps$nodeMap = _treeMaps$nodeMap[firstLeafValue]) == null ? void 0 : _treeMaps$nodeMap.label) || null : null;
1031
1673
  }
1032
1674
  return null;
1033
1675
  }, [isMulti, displayValue, treeMaps]);
1034
- const handleConfirm = (0, _react.useCallback)(() => {
1035
- onChange == null || onChange(tempValue);
1036
- setDropdownOpen(false);
1037
- setSearchText('');
1038
- onConfirm == null || onConfirm(tempValue);
1039
- }, [onChange, onConfirm, tempValue]);
1040
- const handleClearAll = (0, _react.useCallback)(() => {
1041
- const cleared = isMulti ? [] : undefined;
1042
- setTempValue(cleared);
1043
- onChange == null || onChange(cleared);
1044
- setDropdownOpen(false);
1045
- }, [isMulti, onChange]);
1046
- const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
1047
- if (readOnly) {
1048
- return;
1049
- }
1050
- if (!open && !customPopupRender) {
1051
- onChange == null || onChange(tempValue);
1052
- } else if (!open) {
1053
- setTempValue(value);
1054
- }
1055
- setDropdownOpen(open);
1056
- }, [customPopupRender, value, onChange, tempValue, readOnly]);
1057
- const renderHeader = (0, _react.useMemo)(() => {
1058
- if (!headerLabel && !tooltip) return null;
1059
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1060
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1061
- className: (0, _classnames.default)(_styles.default['cap-unified-select-header-wrapper'], disabled && _styles.default.disabled, _styles.default['cap-unified-select-header']),
1062
- children: [headerLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1063
- type: "label16",
1064
- className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-label']),
1065
- children: headerLabel
1066
- }), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
1067
- title: tooltip,
1068
- className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-tooltip']),
1069
- iconProps: {
1070
- disabled
1071
- }
1072
- })]
1073
- }), bylineText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1074
- className: _styles.default['cap-unified-select-header-byline-text'],
1075
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1076
- className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-byline-text']),
1077
- children: bylineText
1078
- })
1079
- })]
1080
- });
1081
- }, [headerLabel, tooltip, bylineText, disabled]);
1082
- const renderCustomDropdown = (0, _react.useCallback)(menu => {
1083
- if (!customPopupRender) return menu;
1084
- const currentItems = filteredTree;
1085
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1086
- className: (0, _classnames.default)(popoverClassName, _styles.default[type + "-popup-container"]),
1087
- children: [showSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1088
- className: _styles.default['cap-unified-select-search-container'],
1089
- align: "middle",
1090
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Input, {
1091
- prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1092
- type: "search",
1093
- size: "s",
1094
- className: _styles.default['cap-unified-select-search-icon']
1095
- }),
1096
- placeholder: "Search",
1097
- variant: "borderless",
1098
- value: searchText,
1099
- onChange: e => setSearchText(e.target.value),
1100
- allowClear: true
1101
- })
1102
- }), isMulti && showUpload && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1103
- className: _styles.default['cap-unified-select-upload-container'],
1104
- align: "middle",
1105
- onClick: onUpload,
1106
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1107
- type: "upload",
1108
- size: "s",
1109
- className: _styles.default['cap-unified-select-upload-icon']
1110
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1111
- type: "label14",
1112
- className: _styles.default['cap-unified-select-upload-label'],
1113
- children: "Upload"
1114
- })]
1115
- }), isMulti && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(SelectAllCheckbox, {
1116
- currentItems: currentItems,
1117
- tempValue: Array.isArray(tempValue) ? tempValue : undefined,
1118
- setTempValue: val => setTempValue(val),
1119
- processTreeData: buildTreeMaps
1120
- }), currentItems.length === 0 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(NoResult, {
1121
- noResultCustomText: noResultCustomText,
1122
- className: className,
1123
- showUpload: showUpload,
1124
- options: options,
1125
- noResultCustomIcon: noResultCustomIcon
1126
- }) : menu, currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1127
- className: _styles.default['cap-unified-select-confirm-container'],
1128
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1129
- className: _styles.default['cap-unified-select-confirm-button-group'],
1130
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
1131
- type: "primary",
1132
- size: "small",
1133
- className: _styles.default['cap-unified-select-confirm-button'],
1134
- onClick: handleConfirm,
1135
- disabled: selectedLeafCount === 0,
1136
- children: "Confirm"
1137
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
1138
- type: "text",
1139
- className: _styles.default['cap-unified-select-cancel-button'],
1140
- size: "small",
1141
- onClick: handleClearAll,
1142
- children: clearText
1143
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
1144
- className: _styles.default['cap-unified-select-selected-count'],
1145
- children: [selectedLeafCount, " selected"]
1146
- })]
1147
- })
1148
- }), (type === SELECT_TYPES.SELECT || type === SELECT_TYPES.TREE_SELECT) && allowClear && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1149
- className: _styles.default['cap-unified-select-tree-clear-container'],
1150
- onClick: handleClearAll,
1151
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1152
- className: _styles.default['cap-unified-select-tree-clear-label'],
1153
- children: clearText
1154
- })
1155
- })]
1676
+
1677
+ // Handle upload
1678
+ const handleUpload = () => {
1679
+ onUpload == null || onUpload();
1680
+ handleDropdownVisibilityChange(false);
1681
+ };
1682
+
1683
+ // Render custom dropdown
1684
+ const renderCustomDropdown = menu => {
1685
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomDropdown.CustomDropdown, {
1686
+ menu: menu,
1687
+ customPopupRender: customPopupRender,
1688
+ filteredTree: filteredTree,
1689
+ searchText: searchText,
1690
+ showSearch: showSearch,
1691
+ handleSearchChange: handleSearchChange,
1692
+ handleSearchKeyDown: handleSearchKeyDown,
1693
+ disabled: disabled,
1694
+ isMulti: isMulti,
1695
+ showUpload: showUpload,
1696
+ uploadLabel: uploadLabel,
1697
+ handleUpload: handleUpload,
1698
+ staticValue: staticValue,
1699
+ tempValue: tempValue,
1700
+ setTempValue: setTempValue,
1701
+ isSearching: isSearching,
1702
+ isResettingData: isResettingData,
1703
+ isLoadingOnScroll: isLoadingOnScroll,
1704
+ onPopupScroll: onPopupScroll,
1705
+ hasMore: hasMore,
1706
+ noResultCustomText: noResultCustomText,
1707
+ noResultCustomIcon: noResultCustomIcon,
1708
+ options: options,
1709
+ className: className,
1710
+ type: type,
1711
+ selectedLeafCount: selectedLeafCount,
1712
+ handleConfirm: handleConfirm,
1713
+ handleClearAll: handleClearAll,
1714
+ clearText: clearText,
1715
+ onFooterDownloadChange: onFooterDownloadChange,
1716
+ allowClear: allowClear,
1717
+ popoverClassName: popoverClassName
1156
1718
  });
1157
- }, [customPopupRender, filteredTree, searchText, isMulti, showUpload, onUpload, noResultCustomText, noResultCustomIcon, options, type, tempValue, handleConfirm, handleClearAll, popoverClassName, className, selectedLeafCount, clearText, allowClear]);
1719
+ };
1158
1720
  const combinedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(containerClassName, _styles.default['cap-unified-tree-select'], {
1159
1721
  [_styles.default['cap-unified-tree-select-readonly']]: readOnly
1160
1722
  }, className), [containerClassName, className, readOnly]);
1161
1723
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1162
1724
  className: className,
1163
- children: [renderHeader, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.TreeSelect, _extends({
1725
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DropdownHeader.DropdownHeader, {
1726
+ headerLabel: headerLabel,
1727
+ tooltip: tooltip,
1728
+ bylineText: bylineText,
1729
+ disabled: disabled
1730
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.TreeSelect, _extends({
1164
1731
  treeData: filteredTree,
1165
1732
  value: customPopupRender ? tempValue : value,
1166
1733
  treeNodeLabelProp: "label",
1167
- onChange: isMulti ? setTempValue : onChange,
1734
+ onChange: isMulti ? handleMultiSelectChange : handleSingleSelectChange,
1168
1735
  placeholder: placeholder,
1169
1736
  showSearch: false,
1170
1737
  maxTagCount: 0,
@@ -1186,12 +1753,12 @@ const CapUnifiedSelect = _ref4 => {
1186
1753
  showCheckedStrategy: _antdV.TreeSelect.SHOW_CHILD,
1187
1754
  open: dropdownOpen,
1188
1755
  onOpenChange: handleDropdownVisibilityChange,
1189
- virtual: true,
1756
+ virtual: !enableVirtualization,
1190
1757
  popupMatchSelectWidth: false,
1191
- disabled: disabled,
1758
+ disabled: disabled || readOnly,
1192
1759
  filterTreeNode: false,
1193
- listHeight: 256,
1194
- listItemHeight: 32,
1760
+ listHeight: _constants.DEFAULTS.LIST_HEIGHT,
1761
+ listItemHeight: virtualRowHeight,
1195
1762
  popupRender: renderCustomDropdown
1196
1763
  }, rest)), isError && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1197
1764
  className: _styles.default['cap-unified-select-status'],
@@ -1212,7 +1779,7 @@ var _default = exports["default"] = CapUnifiedSelect;
1212
1779
  exports.__esModule = true;
1213
1780
  exports["default"] = void 0;
1214
1781
  var _antdV = __webpack_require__(4273);
1215
- var _classnames = _interopRequireDefault(__webpack_require__(2678));
1782
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1216
1783
  var _react = _interopRequireDefault(__webpack_require__(9206));
1217
1784
  var _styles = _interopRequireDefault(__webpack_require__(7144));
1218
1785
  var _jsxRuntime = __webpack_require__(4848);
@@ -1279,71 +1846,20 @@ var _default = exports["default"] = CapTooltip;
1279
1846
 
1280
1847
  exports.__esModule = true;
1281
1848
  exports["default"] = void 0;
1282
- var _icons = __webpack_require__(4627);
1283
- var _classnames = _interopRequireDefault(__webpack_require__(2678));
1849
+ var AntdIcons = _interopRequireWildcard(__webpack_require__(4627));
1850
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1284
1851
  var _react = _interopRequireDefault(__webpack_require__(9206));
1285
1852
  var _styles = _interopRequireDefault(__webpack_require__(6426));
1286
1853
  var _jsxRuntime = __webpack_require__(4848);
1287
1854
  const _excluded = ["type", "size", "style", "className", "disabled", "spin", "rotate", "withBackground", "backgroundProps", "onClick", "textLabel", "component", "svgProps", "allowSvg", "color"],
1288
1855
  _excluded2 = ["className"];
1289
1856
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1857
+ 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); }
1290
1858
  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; }
1291
- function _extends() { return _extends = Object.assign ? Object.assign.bind() : function (n) { for (var e = 1; e < arguments.length; e++) { var t = arguments[e]; for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]); } return n; }, _extends.apply(null, arguments); } // Import only commonly used icons directly for better tree-shaking
1292
- // Explicit icon map for commonly used icons - enables tree-shaking
1293
- const COMMON_ICONS_MAP = {
1294
- 'up': _icons.UpOutlined,
1295
- 'down': _icons.DownOutlined,
1296
- 'left': _icons.LeftOutlined,
1297
- 'right': _icons.RightOutlined,
1298
- 'search': _icons.SearchOutlined,
1299
- 'close': _icons.CloseOutlined,
1300
- 'check': _icons.CheckOutlined,
1301
- 'delete': _icons.DeleteOutlined,
1302
- 'edit': _icons.EditOutlined,
1303
- 'plus': _icons.PlusOutlined,
1304
- 'add': _icons.PlusOutlined,
1305
- // alias
1306
- 'minus': _icons.MinusOutlined,
1307
- 'close-circle': _icons.CloseCircleOutlined,
1308
- 'check-circle': _icons.CheckCircleOutlined,
1309
- 'info-circle': _icons.InfoCircleOutlined,
1310
- 'exclamation-circle': _icons.ExclamationCircleOutlined,
1311
- 'warning': _icons.WarningOutlined,
1312
- 'loading': _icons.LoadingOutlined,
1313
- 'eye': _icons.EyeOutlined,
1314
- 'eye-invisible': _icons.EyeInvisibleOutlined,
1315
- 'upload': _icons.UploadOutlined,
1316
- 'download': _icons.DownloadOutlined,
1317
- 'file': _icons.FileOutlined,
1318
- 'folder': _icons.FolderOutlined,
1319
- 'setting': _icons.SettingOutlined,
1320
- 'user': _icons.UserOutlined,
1321
- 'calendar': _icons.CalendarOutlined,
1322
- 'clock-circle': _icons.ClockCircleOutlined,
1323
- 'filter': _icons.FilterOutlined,
1324
- 'sort-ascending': _icons.SortAscendingOutlined,
1325
- 'sort-descending': _icons.SortDescendingOutlined,
1326
- 'menu': _icons.MenuOutlined,
1327
- 'more': _icons.MoreOutlined,
1328
- 'question-circle': _icons.QuestionCircleOutlined,
1329
- 'arrow-left': _icons.ArrowLeftOutlined,
1330
- 'arrow-right': _icons.ArrowRightOutlined,
1331
- 'arrow-up': _icons.ArrowUpOutlined,
1332
- 'arrow-down': _icons.ArrowDownOutlined,
1333
- 'save': _icons.SaveOutlined,
1334
- 'copy': _icons.CopyOutlined,
1335
- 'home': _icons.HomeOutlined,
1336
- 'star': _icons.StarOutlined,
1337
- 'heart': _icons.HeartOutlined,
1338
- 'bell': _icons.BellOutlined,
1339
- 'mail': _icons.MailOutlined,
1340
- 'phone': _icons.PhoneOutlined,
1341
- 'lock': _icons.LockOutlined,
1342
- 'unlock': _icons.UnlockOutlined,
1343
- 'sync': _icons.SyncOutlined,
1344
- 'reload': _icons.ReloadOutlined,
1345
- 'plus-circle': _icons.PlusCircleOutlined,
1346
- 'minus-circle': _icons.MinusCircleOutlined
1859
+ 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); }
1860
+ // Special mappings for common icon names
1861
+ const iconMapping = {
1862
+ add: 'plus'
1347
1863
  };
1348
1864
  const getSvgIcon = function (type, svgProps) {
1349
1865
  if (svgProps === void 0) {
@@ -1357,17 +1873,18 @@ const getSvgIcon = function (type, svgProps) {
1357
1873
  };
1358
1874
  const getAntIcon = type => {
1359
1875
  if (!type) return null;
1360
-
1361
- // First check the common icons map for better tree-shaking
1362
- const lowerType = type.toLowerCase();
1363
- if (COMMON_ICONS_MAP[lowerType]) {
1364
- return COMMON_ICONS_MAP[lowerType];
1365
- }
1366
-
1367
- // For uncommon icons, warn in development
1368
- if (false) // removed by dead control flow
1369
- {}
1370
- return null;
1876
+ // Use mapped name if available, otherwise use original type
1877
+ const mappedType = iconMapping[type.toLowerCase()] || type;
1878
+
1879
+ // Convert kebab-case to PascalCase for Ant Design icon naming
1880
+ const pascalCase = mappedType.split('-').map(part => part.charAt(0).toUpperCase() + part.slice(1)).join('');
1881
+
1882
+ // Try different naming conventions
1883
+ const iconName = pascalCase + "Outlined";
1884
+ const iconNameFilled = pascalCase + "Filled";
1885
+ const iconNameTwoTone = pascalCase + "TwoTone";
1886
+ const iconsRecord = AntdIcons;
1887
+ return iconsRecord[iconName] || iconsRecord[iconNameFilled] || iconsRecord[iconNameTwoTone] || null;
1371
1888
  };
1372
1889
  const CapIcon = _ref => {
1373
1890
  let {
@@ -1740,6 +2257,90 @@ ___CSS_LOADER_EXPORT___.locals = {
1740
2257
  module.exports = ___CSS_LOADER_EXPORT___;
1741
2258
 
1742
2259
 
2260
+ /***/ }),
2261
+
2262
+ /***/ 6942:
2263
+ /***/ ((module, exports) => {
2264
+
2265
+ var __WEBPACK_AMD_DEFINE_ARRAY__, __WEBPACK_AMD_DEFINE_RESULT__;/*!
2266
+ Copyright (c) 2018 Jed Watson.
2267
+ Licensed under the MIT License (MIT), see
2268
+ http://jedwatson.github.io/classnames
2269
+ */
2270
+ /* global define */
2271
+
2272
+ (function () {
2273
+ 'use strict';
2274
+
2275
+ var hasOwn = {}.hasOwnProperty;
2276
+
2277
+ function classNames () {
2278
+ var classes = '';
2279
+
2280
+ for (var i = 0; i < arguments.length; i++) {
2281
+ var arg = arguments[i];
2282
+ if (arg) {
2283
+ classes = appendClass(classes, parseValue(arg));
2284
+ }
2285
+ }
2286
+
2287
+ return classes;
2288
+ }
2289
+
2290
+ function parseValue (arg) {
2291
+ if (typeof arg === 'string' || typeof arg === 'number') {
2292
+ return arg;
2293
+ }
2294
+
2295
+ if (typeof arg !== 'object') {
2296
+ return '';
2297
+ }
2298
+
2299
+ if (Array.isArray(arg)) {
2300
+ return classNames.apply(null, arg);
2301
+ }
2302
+
2303
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
2304
+ return arg.toString();
2305
+ }
2306
+
2307
+ var classes = '';
2308
+
2309
+ for (var key in arg) {
2310
+ if (hasOwn.call(arg, key) && arg[key]) {
2311
+ classes = appendClass(classes, key);
2312
+ }
2313
+ }
2314
+
2315
+ return classes;
2316
+ }
2317
+
2318
+ function appendClass (value, newClass) {
2319
+ if (!newClass) {
2320
+ return value;
2321
+ }
2322
+
2323
+ if (value) {
2324
+ return value + ' ' + newClass;
2325
+ }
2326
+
2327
+ return value + newClass;
2328
+ }
2329
+
2330
+ if ( true && module.exports) {
2331
+ classNames.default = classNames;
2332
+ module.exports = classNames;
2333
+ } else if (true) {
2334
+ // register as 'classnames', consistent with npm package name
2335
+ !(__WEBPACK_AMD_DEFINE_ARRAY__ = [], __WEBPACK_AMD_DEFINE_RESULT__ = (function () {
2336
+ return classNames;
2337
+ }).apply(exports, __WEBPACK_AMD_DEFINE_ARRAY__),
2338
+ __WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));
2339
+ } else // removed by dead control flow
2340
+ {}
2341
+ }());
2342
+
2343
+
1743
2344
  /***/ }),
1744
2345
 
1745
2346
  /***/ 7144:
@@ -1789,63 +2390,571 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
1789
2390
 
1790
2391
 
1791
2392
 
1792
- /* 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);
2393
+ /* 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);
2394
+
2395
+
2396
+ /***/ }),
2397
+
2398
+ /***/ 7375:
2399
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2400
+
2401
+ "use strict";
2402
+
2403
+
2404
+ exports.__esModule = true;
2405
+ exports["default"] = void 0;
2406
+ var _CapRow = _interopRequireDefault(__webpack_require__(3837));
2407
+ exports["default"] = _CapRow.default;
2408
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
2409
+
2410
+ /***/ }),
2411
+
2412
+ /***/ 7579:
2413
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2414
+
2415
+ "use strict";
2416
+
2417
+
2418
+ exports.__esModule = true;
2419
+ exports["default"] = void 0;
2420
+ var _antdV = __webpack_require__(4273);
2421
+ var _react = _interopRequireDefault(__webpack_require__(9206));
2422
+ var _jsxRuntime = __webpack_require__(4848);
2423
+ const _excluded = ["className"];
2424
+ /**
2425
+ * CapSpin - Migrated to Ant Design v5
2426
+ */
2427
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
2428
+ 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); }
2429
+ 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; }
2430
+ const CapSpin = _ref => {
2431
+ let {
2432
+ className
2433
+ } = _ref,
2434
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
2435
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Spin, _extends({
2436
+ className: className
2437
+ }, rest));
2438
+ };
2439
+ var _default = exports["default"] = CapSpin;
2440
+
2441
+ /***/ }),
2442
+
2443
+ /***/ 7659:
2444
+ /***/ ((module) => {
2445
+
2446
+ "use strict";
2447
+
2448
+
2449
+ var memo = {};
2450
+
2451
+ /* istanbul ignore next */
2452
+ function getTarget(target) {
2453
+ if (typeof memo[target] === "undefined") {
2454
+ var styleTarget = document.querySelector(target);
2455
+
2456
+ // Special case to return head of iframe instead of iframe itself
2457
+ if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
2458
+ try {
2459
+ // This will throw an exception if access to iframe is blocked
2460
+ // due to cross-origin restrictions
2461
+ styleTarget = styleTarget.contentDocument.head;
2462
+ } catch (e) {
2463
+ // istanbul ignore next
2464
+ styleTarget = null;
2465
+ }
2466
+ }
2467
+ memo[target] = styleTarget;
2468
+ }
2469
+ return memo[target];
2470
+ }
2471
+
2472
+ /* istanbul ignore next */
2473
+ function insertBySelector(insert, style) {
2474
+ var target = getTarget(insert);
2475
+ if (!target) {
2476
+ throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
2477
+ }
2478
+ target.appendChild(style);
2479
+ }
2480
+ module.exports = insertBySelector;
2481
+
2482
+ /***/ }),
2483
+
2484
+ /***/ 8033:
2485
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2486
+
2487
+ "use strict";
2488
+
2489
+
2490
+ exports.__esModule = true;
2491
+ exports.CustomDropdown = void 0;
2492
+ var _antdV = __webpack_require__(4273);
2493
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
2494
+ var _react = _interopRequireDefault(__webpack_require__(9206));
2495
+ var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
2496
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
2497
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
2498
+ var _CapSpin = _interopRequireDefault(__webpack_require__(1549));
2499
+ var _components = __webpack_require__(455);
2500
+ var _constants = __webpack_require__(9788);
2501
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
2502
+ var _utils = __webpack_require__(8052);
2503
+ var _jsxRuntime = __webpack_require__(4848);
2504
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
2505
+ const CustomDropdown = _ref => {
2506
+ let {
2507
+ menu,
2508
+ customPopupRender,
2509
+ filteredTree,
2510
+ searchText,
2511
+ showSearch,
2512
+ handleSearchChange,
2513
+ handleSearchKeyDown,
2514
+ disabled,
2515
+ isMulti,
2516
+ showUpload,
2517
+ uploadLabel,
2518
+ handleUpload,
2519
+ staticValue,
2520
+ tempValue,
2521
+ setTempValue,
2522
+ isSearching,
2523
+ isResettingData,
2524
+ isLoadingOnScroll,
2525
+ onPopupScroll,
2526
+ hasMore,
2527
+ noResultCustomText,
2528
+ noResultCustomIcon,
2529
+ options,
2530
+ className,
2531
+ type,
2532
+ selectedLeafCount,
2533
+ handleConfirm,
2534
+ handleClearAll,
2535
+ clearText,
2536
+ onFooterDownloadChange,
2537
+ allowClear,
2538
+ popoverClassName
2539
+ } = _ref;
2540
+ if (!customPopupRender) return menu;
2541
+ const currentItems = filteredTree;
2542
+ const handleFooterDownload = () => {
2543
+ const currentValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
2544
+ onFooterDownloadChange == null || onFooterDownloadChange(currentValues);
2545
+ };
2546
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2547
+ className: (0, _classnames.default)(popoverClassName, _styles.default[type + "-popup-container"]),
2548
+ children: [showSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2549
+ className: _styles.default['cap-unified-select-search-container'],
2550
+ align: "middle",
2551
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Input, {
2552
+ prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
2553
+ type: "search",
2554
+ size: "s",
2555
+ className: _styles.default['cap-unified-select-search-icon']
2556
+ }),
2557
+ placeholder: _constants.DEFAULTS.SEARCH_PLACEHOLDER,
2558
+ variant: "borderless",
2559
+ value: searchText,
2560
+ onChange: handleSearchChange,
2561
+ onKeyDown: handleSearchKeyDown,
2562
+ allowClear: true,
2563
+ disabled: disabled
2564
+ })
2565
+ }), isMulti && showUpload && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
2566
+ className: _styles.default['cap-unified-select-upload-container'],
2567
+ align: "middle",
2568
+ onClick: handleUpload,
2569
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
2570
+ type: "upload",
2571
+ size: "s",
2572
+ className: _styles.default['cap-unified-select-upload-icon']
2573
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2574
+ type: "label14",
2575
+ className: _styles.default['cap-unified-select-upload-label'],
2576
+ children: uploadLabel
2577
+ })]
2578
+ }), isMulti && staticValue && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectAllCheckbox, {
2579
+ currentItems: currentItems,
2580
+ tempValue: Array.isArray(tempValue) ? tempValue : undefined,
2581
+ setTempValue: val => setTempValue(val),
2582
+ processTreeData: _utils.buildTreeMaps,
2583
+ disabled: disabled
2584
+ }), currentItems.length === 0 ? isSearching || isResettingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2585
+ className: _styles.default['cap-unified-select-loading-container'],
2586
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2587
+ align: "middle",
2588
+ justify: "center",
2589
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
2590
+ size: "small"
2591
+ })
2592
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2593
+ align: "middle",
2594
+ justify: "center",
2595
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2596
+ type: "label14",
2597
+ children: "Loading..."
2598
+ })
2599
+ })]
2600
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoResult, {
2601
+ noResultCustomText: noResultCustomText,
2602
+ className: className,
2603
+ showUpload: showUpload,
2604
+ options: options,
2605
+ noResultCustomIcon: noResultCustomIcon
2606
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2607
+ className: _styles.default['cap-unified-select-menu-wrapper'],
2608
+ children: [menu, (isSearching || isResettingData) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2609
+ className: _styles.default['cap-unified-select-loading-overlay'],
2610
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2611
+ align: "middle",
2612
+ justify: "center",
2613
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
2614
+ size: "small"
2615
+ })
2616
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2617
+ align: "middle",
2618
+ justify: "center",
2619
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2620
+ type: "label14",
2621
+ children: "Loading..."
2622
+ })
2623
+ })]
2624
+ }), isLoadingOnScroll && onPopupScroll && hasMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2625
+ className: _styles.default['cap-unified-select-loading-overlay'],
2626
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2627
+ align: "middle",
2628
+ justify: "center",
2629
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
2630
+ size: "small"
2631
+ })
2632
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2633
+ align: "middle",
2634
+ justify: "center",
2635
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2636
+ type: "label14",
2637
+ children: "Loading..."
2638
+ })
2639
+ })]
2640
+ })]
2641
+ }), currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2642
+ className: _styles.default['cap-unified-select-confirm-container'],
2643
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2644
+ className: _styles.default['cap-unified-select-confirm-button-group'],
2645
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
2646
+ type: "primary",
2647
+ size: "small",
2648
+ className: _styles.default['cap-unified-select-confirm-button'],
2649
+ onClick: handleConfirm,
2650
+ disabled: disabled || selectedLeafCount === 0,
2651
+ children: "Confirm"
2652
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
2653
+ type: "text",
2654
+ className: _styles.default['cap-unified-select-cancel-button'],
2655
+ size: "small",
2656
+ onClick: handleClearAll,
2657
+ disabled: disabled,
2658
+ children: clearText
2659
+ }), onFooterDownloadChange && selectedLeafCount > 0 && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
2660
+ className: _styles.default['cap-unified-select-footer-download-container'],
2661
+ align: "middle",
2662
+ onClick: handleFooterDownload,
2663
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
2664
+ type: "download",
2665
+ size: "s",
2666
+ className: _styles.default['cap-unified-select-footer-download-icon']
2667
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
2668
+ className: _styles.default['cap-unified-select-footer-download-label'],
2669
+ children: [selectedLeafCount, " selected"]
2670
+ })]
2671
+ })]
2672
+ })
2673
+ }), (type === _constants.SELECT_TYPES.SELECT || type === _constants.SELECT_TYPES.TREE_SELECT) && allowClear && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2674
+ className: _styles.default['cap-unified-select-tree-clear-container'],
2675
+ onClick: handleClearAll,
2676
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2677
+ className: _styles.default['cap-unified-select-tree-clear-label'],
2678
+ children: clearText
2679
+ })
2680
+ })]
2681
+ });
2682
+ };
2683
+ exports.CustomDropdown = CustomDropdown;
2684
+
2685
+ /***/ }),
2686
+
2687
+ /***/ 8052:
2688
+ /***/ ((__unused_webpack_module, exports) => {
2689
+
2690
+ "use strict";
2691
+
1793
2692
 
2693
+ exports.__esModule = true;
2694
+ exports.reorderOptionsBySelection = exports.prepareDataSource = exports.getScrollContainer = exports.findValueInOptions = exports.findMissingValues = exports.filterTreeData = exports.countSelectedLeaves = exports.buildTreeMaps = void 0;
2695
+ 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); }
2696
+ /**
2697
+ * Builds tree maps for efficient tree operations
2698
+ * Creates maps for leaf values, parent-child relationships, and node lookups
2699
+ */
2700
+ const buildTreeMaps = nodes => {
2701
+ const result = {
2702
+ leafValues: [],
2703
+ parentChildMap: {},
2704
+ nodeMap: {}
2705
+ };
2706
+ if (!nodes) return result;
2707
+ const traverse = items => {
2708
+ items == null || items.forEach(item => {
2709
+ if (item.value !== undefined) {
2710
+ result.nodeMap[item.value] = item;
2711
+ if (item != null && item.children && item.children.length > 0) {
2712
+ result.parentChildMap[item.value] = item.children.map(child => child == null ? void 0 : child.value).filter(v => v !== undefined);
2713
+ traverse(item.children);
2714
+ } else {
2715
+ result.leafValues.push(item.value);
2716
+ }
2717
+ }
2718
+ });
2719
+ };
2720
+ traverse(nodes);
2721
+ return result;
2722
+ };
1794
2723
 
1795
- /***/ }),
2724
+ /**
2725
+ * Counts the number of selected leaf nodes in a tree structure
2726
+ * Handles parent-child relationships by expanding selected parent nodes
2727
+ */
2728
+ exports.buildTreeMaps = buildTreeMaps;
2729
+ const countSelectedLeaves = (treeMaps, selectedValues) => {
2730
+ var _treeMaps$leafValues;
2731
+ if (!Array.isArray(selectedValues) || !(selectedValues != null && selectedValues.length)) return 0;
2732
+ const expandedSet = new Set(selectedValues);
2733
+ const processNode = value => {
2734
+ var _treeMaps$parentChild;
2735
+ const children = treeMaps == null || (_treeMaps$parentChild = treeMaps.parentChildMap) == null ? void 0 : _treeMaps$parentChild[value];
2736
+ if (!children) return;
2737
+ children == null || children.forEach(childValue => {
2738
+ expandedSet.add(childValue);
2739
+ processNode(childValue);
2740
+ });
2741
+ };
2742
+ selectedValues == null || selectedValues.forEach(processNode);
2743
+ return (treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.reduce((count, leaf) => expandedSet.has(leaf) ? count + 1 : count, 0)) || 0;
2744
+ };
1796
2745
 
1797
- /***/ 7375:
1798
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2746
+ /**
2747
+ * Filters tree data based on search query
2748
+ * Includes nodes that match search OR are selected OR have matching children
2749
+ * Supports searching by label, value, or key
2750
+ */
2751
+ exports.countSelectedLeaves = countSelectedLeaves;
2752
+ const filterTreeData = function (data, search, searchBasedOn, selectedValues) {
2753
+ if (searchBasedOn === void 0) {
2754
+ searchBasedOn = 'label';
2755
+ }
2756
+ if (!(data != null && data.length) || !search) return data;
2757
+ const searchLower = search.toLowerCase();
2758
+ const selectedSet = new Set(selectedValues || []);
2759
+ const nodeMatchesSearch = node => {
2760
+ var _node$value, _node$key, _ref, _node$label;
2761
+ const target = searchBasedOn === 'value' ? String((_node$value = node == null ? void 0 : node.value) != null ? _node$value : '') : searchBasedOn === 'key' ? String((_node$key = node == null ? void 0 : node.key) != null ? _node$key : '') : String((_ref = (_node$label = node == null ? void 0 : node.label) != null ? _node$label : node == null ? void 0 : node.title) != null ? _ref : '');
2762
+ return target.toLowerCase().includes(searchLower);
2763
+ };
2764
+ const isNodeSelected = node => {
2765
+ return node.value !== undefined && selectedSet.has(node.value);
2766
+ };
2767
+ const loop = items => items.reduce((acc, item) => {
2768
+ var _item$children;
2769
+ if (!item) return acc;
2770
+ const children = item != null && (_item$children = item.children) != null && _item$children.length ? loop(item.children) : [];
2771
+ // Include node if: matches search OR is selected OR has matching children
2772
+ if (nodeMatchesSearch(item) || isNodeSelected(item) || children.length) {
2773
+ acc.push(_extends({}, item, {
2774
+ children
2775
+ }));
2776
+ }
2777
+ return acc;
2778
+ }, []);
2779
+ return loop(data);
2780
+ };
1799
2781
 
1800
- "use strict";
2782
+ /**
2783
+ * Checks if a value exists in options (recursive for tree structures)
2784
+ */
2785
+ exports.filterTreeData = filterTreeData;
2786
+ const findValueInOptions = (opts, targetValue) => {
2787
+ for (const opt of opts) {
2788
+ if (opt.value === targetValue) {
2789
+ return true;
2790
+ }
2791
+ if (opt.children && opt.children.length > 0) {
2792
+ if (findValueInOptions(opt.children, targetValue)) {
2793
+ return true;
2794
+ }
2795
+ }
2796
+ }
2797
+ return false;
2798
+ };
1801
2799
 
2800
+ /**
2801
+ * Finds selected values that don't exist in the current options
2802
+ */
2803
+ exports.findValueInOptions = findValueInOptions;
2804
+ const findMissingValues = (selectedValues, currentOptions) => {
2805
+ if (!selectedValues.length || !currentOptions.length) {
2806
+ return selectedValues;
2807
+ }
2808
+ return selectedValues.filter(val => !findValueInOptions(currentOptions, val));
2809
+ };
1802
2810
 
1803
- exports.__esModule = true;
1804
- exports["default"] = void 0;
1805
- var _CapRow = _interopRequireDefault(__webpack_require__(3837));
1806
- exports["default"] = _CapRow.default;
1807
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
2811
+ /**
2812
+ * Reorders options based on selection order
2813
+ * Selected items are moved to top in the order they were selected
2814
+ * For tree structures, maintains parent-child relationships
2815
+ * For flat lists, directly reorders items
2816
+ * Works for all data types: flat lists, tree structures, nested trees
2817
+ */
2818
+ exports.findMissingValues = findMissingValues;
2819
+ const reorderOptionsBySelection = (opts, selectedOrder) => {
2820
+ if (!Array.isArray(selectedOrder) || selectedOrder.length === 0 || !(opts != null && opts.length)) {
2821
+ return opts;
2822
+ }
2823
+ const selectedSet = new Set(selectedOrder);
2824
+ const selectedItems = [];
2825
+ const unselectedItems = [];
2826
+ const processedTopLevelValues = new Set();
2827
+
2828
+ // Deep clone helper to avoid mutating original items
2829
+ const deepCloneItem = item => {
2830
+ return _extends({}, item, {
2831
+ children: item.children ? item.children.map(deepCloneItem) : undefined
2832
+ });
2833
+ };
1808
2834
 
1809
- /***/ }),
2835
+ // Find the top-level item that contains the selected value
2836
+ // For flat lists, returns the item itself
2837
+ // For tree structures, returns the top-level parent from opts
2838
+ const findTopLevelItem = targetValue => {
2839
+ // First, find which top-level item in opts contains this value
2840
+ for (const topLevelItem of opts) {
2841
+ // Check if this top-level item itself matches
2842
+ if (topLevelItem.value === targetValue) {
2843
+ return topLevelItem;
2844
+ }
1810
2845
 
1811
- /***/ 7659:
1812
- /***/ ((module) => {
2846
+ // If found in this top-level item's children, return the top-level item
2847
+ if (topLevelItem.children && topLevelItem.children.length > 0) {
2848
+ if (findValueInOptions(topLevelItem.children, targetValue)) {
2849
+ return topLevelItem;
2850
+ }
2851
+ }
2852
+ }
2853
+ return null;
2854
+ };
1813
2855
 
1814
- "use strict";
2856
+ // Check if an item or any of its descendants is selected
2857
+ const hasSelectedDescendant = item => {
2858
+ if (item.value !== undefined && selectedSet.has(item.value)) {
2859
+ return true;
2860
+ }
2861
+ if (item.children && item.children.length > 0) {
2862
+ return item.children.some(child => hasSelectedDescendant(child));
2863
+ }
2864
+ return false;
2865
+ };
1815
2866
 
2867
+ // Collect selected items in selection order
2868
+ selectedOrder.forEach(selectedVal => {
2869
+ const topLevelItem = findTopLevelItem(selectedVal);
2870
+ if (topLevelItem && topLevelItem.value !== undefined && !processedTopLevelValues.has(topLevelItem.value)) {
2871
+ // Clone the item to avoid mutating the original
2872
+ const clonedItem = deepCloneItem(topLevelItem);
2873
+ selectedItems.push(clonedItem);
2874
+ processedTopLevelValues.add(topLevelItem.value);
2875
+ }
2876
+ });
1816
2877
 
1817
- var memo = {};
2878
+ // Collect unselected items maintaining original order
2879
+ // For tree structures, only include top-level items that don't have any selected descendants
2880
+ opts.forEach(item => {
2881
+ if (item.value === undefined) {
2882
+ // Item without value, include as-is
2883
+ unselectedItems.push(deepCloneItem(item));
2884
+ } else if (!processedTopLevelValues.has(item.value)) {
2885
+ // Check if this item or any of its descendants is selected
2886
+ if (!hasSelectedDescendant(item)) {
2887
+ unselectedItems.push(deepCloneItem(item));
2888
+ }
2889
+ }
2890
+ });
1818
2891
 
1819
- /* istanbul ignore next */
1820
- function getTarget(target) {
1821
- if (typeof memo[target] === "undefined") {
1822
- var styleTarget = document.querySelector(target);
2892
+ // Return selected items first (in selection order), then unselected items
2893
+ return [...selectedItems, ...unselectedItems];
2894
+ };
1823
2895
 
1824
- // Special case to return head of iframe instead of iframe itself
1825
- if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) {
1826
- try {
1827
- // This will throw an exception if access to iframe is blocked
1828
- // due to cross-origin restrictions
1829
- styleTarget = styleTarget.contentDocument.head;
1830
- } catch (e) {
1831
- // istanbul ignore next
1832
- styleTarget = null;
2896
+ /**
2897
+ * Prepares data source with virtual options for selected values not in current options
2898
+ * Returns raw options without React component enhancement
2899
+ */
2900
+ exports.reorderOptionsBySelection = reorderOptionsBySelection;
2901
+ const prepareDataSource = (options, orderedOptions, searchText, value, staticValue, selectedItemsCache) => {
2902
+ const sourceOptions = searchText.trim() ? options : orderedOptions || options;
2903
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
2904
+ const hasSearchQuery = searchText.trim().length > 0;
2905
+ const shouldAppendVirtualOptions = staticValue || !hasSearchQuery;
2906
+ const missingSelectedValues = [];
2907
+ if (shouldAppendVirtualOptions && selectedValues.length > 0) {
2908
+ selectedValues.forEach(val => {
2909
+ if (!findValueInOptions(sourceOptions, val)) {
2910
+ missingSelectedValues.push(val);
1833
2911
  }
1834
- }
1835
- memo[target] = styleTarget;
2912
+ });
1836
2913
  }
1837
- return memo[target];
1838
- }
2914
+ const virtualOptions = missingSelectedValues.map(val => {
2915
+ const cachedOption = selectedItemsCache.get(val);
2916
+ return _extends({
2917
+ value: val,
2918
+ label: (cachedOption == null ? void 0 : cachedOption.label) || String(val),
2919
+ key: (cachedOption == null ? void 0 : cachedOption.key) || val,
2920
+ title: cachedOption == null ? void 0 : cachedOption.title,
2921
+ optionSuffix: cachedOption == null ? void 0 : cachedOption.optionSuffix,
2922
+ optionSuffixInfo: cachedOption == null ? void 0 : cachedOption.optionSuffixInfo,
2923
+ optionTooltipInfo: cachedOption == null ? void 0 : cachedOption.optionTooltipInfo,
2924
+ disabled: cachedOption == null ? void 0 : cachedOption.disabled
2925
+ }, (cachedOption == null ? void 0 : cachedOption.children) && {
2926
+ children: cachedOption.children
2927
+ });
2928
+ });
2929
+ const allOptions = hasSearchQuery ? [...sourceOptions, ...virtualOptions] : [...virtualOptions, ...sourceOptions];
2930
+ return allOptions != null && allOptions.length ? allOptions : [];
2931
+ };
1839
2932
 
1840
- /* istanbul ignore next */
1841
- function insertBySelector(insert, style) {
1842
- var target = getTarget(insert);
1843
- if (!target) {
1844
- throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");
2933
+ /**
2934
+ * Finds the scrollable container element within the dropdown
2935
+ * Checks for tree list holder, virtual list holder, or dropdown itself
2936
+ * Returns the first scrollable container found, or null if none
2937
+ */
2938
+ exports.prepareDataSource = prepareDataSource;
2939
+ const getScrollContainer = () => {
2940
+ const dropdowns = document.querySelectorAll('.ant-select-dropdown:not(.ant-select-dropdown-hidden)');
2941
+ if (dropdowns.length === 0) return null;
2942
+ const dropdown = Array.from(dropdowns).pop();
2943
+ if (!dropdown) return null;
2944
+ const treeList = dropdown.querySelector('.ant-select-tree-list-holder');
2945
+ if (treeList && treeList.scrollHeight > treeList.clientHeight) {
2946
+ return treeList;
1845
2947
  }
1846
- target.appendChild(style);
1847
- }
1848
- module.exports = insertBySelector;
2948
+ const virtualList = dropdown.querySelector('.rc-virtual-list-holder');
2949
+ if (virtualList && virtualList.scrollHeight > virtualList.clientHeight) {
2950
+ return virtualList;
2951
+ }
2952
+ if (dropdown.scrollHeight > dropdown.clientHeight) {
2953
+ return dropdown;
2954
+ }
2955
+ return null;
2956
+ };
2957
+ exports.getScrollContainer = getScrollContainer;
1849
2958
 
1850
2959
  /***/ }),
1851
2960
 
@@ -1913,6 +3022,227 @@ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js
1913
3022
  /* 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);
1914
3023
 
1915
3024
 
3025
+ /***/ }),
3026
+
3027
+ /***/ 9103:
3028
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3029
+
3030
+ "use strict";
3031
+
3032
+
3033
+ exports.__esModule = true;
3034
+ exports.useInfiniteScroll = void 0;
3035
+ var _react = __webpack_require__(9206);
3036
+ var _constants = __webpack_require__(9788);
3037
+ var _utils = __webpack_require__(8052);
3038
+ /**
3039
+ * Custom hook for handling infinite scroll/pagination in dropdown
3040
+ * Manages scroll event listeners, loading states, and triggers onPopupScroll callback
3041
+ */
3042
+ const useInfiniteScroll = _ref => {
3043
+ let {
3044
+ onPopupScroll,
3045
+ hasMore,
3046
+ options,
3047
+ dropdownOpen,
3048
+ optionsRef,
3049
+ hasInteractedRef
3050
+ } = _ref;
3051
+ const [isLoadingOnScroll, setIsLoadingOnScroll] = (0, _react.useState)(false);
3052
+ const scrollContainerRef = (0, _react.useRef)(null);
3053
+ const scrollLoadingTimeoutRef = (0, _react.useRef)(null);
3054
+ const isScrollProcessingRef = (0, _react.useRef)(false);
3055
+ const scrollThrottleTimeoutRef = (0, _react.useRef)(null);
3056
+ const prevOptionsRefForScroll = (0, _react.useRef)(options);
3057
+ const scrollTriggerOptionsCountRef = (0, _react.useRef)(options.length);
3058
+ const prevOptionsCountRef = (0, _react.useRef)(options.length);
3059
+ (0, _react.useEffect)(() => {
3060
+ optionsRef.current = options;
3061
+ }, [options, optionsRef]);
3062
+ (0, _react.useEffect)(() => {
3063
+ return () => {
3064
+ if (scrollLoadingTimeoutRef.current) {
3065
+ clearTimeout(scrollLoadingTimeoutRef.current);
3066
+ }
3067
+ if (scrollThrottleTimeoutRef.current) {
3068
+ clearTimeout(scrollThrottleTimeoutRef.current);
3069
+ }
3070
+ };
3071
+ }, []);
3072
+ (0, _react.useEffect)(() => {
3073
+ if (!hasMore && isLoadingOnScroll) {
3074
+ setIsLoadingOnScroll(false);
3075
+ isScrollProcessingRef.current = false;
3076
+ if (scrollLoadingTimeoutRef.current) {
3077
+ clearTimeout(scrollLoadingTimeoutRef.current);
3078
+ scrollLoadingTimeoutRef.current = null;
3079
+ }
3080
+ }
3081
+ }, [hasMore, isLoadingOnScroll]);
3082
+
3083
+ /**
3084
+ * PRIMARY MECHANISM: Detect when API call completes by monitoring options changes
3085
+ * When onPopupScroll() is called, it triggers an API call. When the API completes,
3086
+ * the options prop will change (new data loaded). This effect detects that change
3087
+ * and sets loading to false, which is the correct way to handle API completion.
3088
+ *
3089
+ * This is the primary mechanism for detecting API completion when onPopupScroll
3090
+ * doesn't return a Promise (backward compatibility).
3091
+ */
3092
+ (0, _react.useEffect)(() => {
3093
+ if (!isLoadingOnScroll) {
3094
+ prevOptionsCountRef.current = options.length;
3095
+ prevOptionsRefForScroll.current = options;
3096
+ return;
3097
+ }
3098
+ if (!onPopupScroll) {
3099
+ return;
3100
+ }
3101
+ const optionsCountIncreased = options.length > prevOptionsCountRef.current;
3102
+ const optionsContentChanged = (() => {
3103
+ const prevCount = prevOptionsCountRef.current;
3104
+ const currentCount = options.length;
3105
+ if (prevCount !== currentCount) {
3106
+ return true;
3107
+ }
3108
+ if (currentCount > 0 && prevCount > 0 && prevOptionsRefForScroll.current.length > 0) {
3109
+ const prevOptions = prevOptionsRefForScroll.current;
3110
+ const lastPrevOption = prevOptions[prevOptions.length - 1];
3111
+ const lastCurrentOption = options[options.length - 1];
3112
+ 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)) {
3113
+ return true;
3114
+ }
3115
+ }
3116
+ return false;
3117
+ })();
3118
+ if (optionsCountIncreased || optionsContentChanged) {
3119
+ setIsLoadingOnScroll(false);
3120
+ isScrollProcessingRef.current = false;
3121
+ if (scrollLoadingTimeoutRef.current) {
3122
+ clearTimeout(scrollLoadingTimeoutRef.current);
3123
+ scrollLoadingTimeoutRef.current = null;
3124
+ }
3125
+ prevOptionsCountRef.current = options.length;
3126
+ prevOptionsRefForScroll.current = options;
3127
+ }
3128
+ }, [options, isLoadingOnScroll, onPopupScroll]);
3129
+ const handleScroll = (0, _react.useCallback)(event => {
3130
+ if (!onPopupScroll) return;
3131
+ const target = event.target;
3132
+ if (!target) return;
3133
+ const isNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
3134
+ if (!isNearBottom) {
3135
+ isScrollProcessingRef.current = false;
3136
+ return;
3137
+ }
3138
+ if (isScrollProcessingRef.current) return;
3139
+ if (isLoadingOnScroll) return;
3140
+ if (!hasMore) {
3141
+ isScrollProcessingRef.current = false;
3142
+ return;
3143
+ }
3144
+ if (scrollThrottleTimeoutRef.current) {
3145
+ clearTimeout(scrollThrottleTimeoutRef.current);
3146
+ }
3147
+ isScrollProcessingRef.current = true;
3148
+ scrollThrottleTimeoutRef.current = setTimeout(() => {
3149
+ const stillNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
3150
+ if (!stillNearBottom || isLoadingOnScroll || !hasMore) {
3151
+ isScrollProcessingRef.current = false;
3152
+ return;
3153
+ }
3154
+ const currentOptions = optionsRef.current;
3155
+ prevOptionsCountRef.current = currentOptions.length;
3156
+ prevOptionsRefForScroll.current = currentOptions;
3157
+ scrollTriggerOptionsCountRef.current = currentOptions.length;
3158
+ setIsLoadingOnScroll(true);
3159
+ if (scrollLoadingTimeoutRef.current) {
3160
+ clearTimeout(scrollLoadingTimeoutRef.current);
3161
+ scrollLoadingTimeoutRef.current = null;
3162
+ }
3163
+ hasInteractedRef.current = true;
3164
+ const scrollResult = onPopupScroll();
3165
+ if (scrollResult && typeof scrollResult === 'object' && 'then' in scrollResult) {
3166
+ Promise.resolve(scrollResult).then(() => {
3167
+ setIsLoadingOnScroll(false);
3168
+ isScrollProcessingRef.current = false;
3169
+ if (scrollLoadingTimeoutRef.current) {
3170
+ clearTimeout(scrollLoadingTimeoutRef.current);
3171
+ scrollLoadingTimeoutRef.current = null;
3172
+ }
3173
+ }).catch(() => {
3174
+ setIsLoadingOnScroll(false);
3175
+ isScrollProcessingRef.current = false;
3176
+ if (scrollLoadingTimeoutRef.current) {
3177
+ clearTimeout(scrollLoadingTimeoutRef.current);
3178
+ scrollLoadingTimeoutRef.current = null;
3179
+ }
3180
+ });
3181
+ }
3182
+ scrollLoadingTimeoutRef.current = setTimeout(() => {
3183
+ setIsLoadingOnScroll(prev => {
3184
+ if (prev) {
3185
+ scrollLoadingTimeoutRef.current = null;
3186
+ isScrollProcessingRef.current = false;
3187
+ return false;
3188
+ }
3189
+ return prev;
3190
+ });
3191
+ }, _constants.TIMEOUTS.SCROLL_LOADING_TIMEOUT);
3192
+ }, 150);
3193
+ }, [onPopupScroll, isLoadingOnScroll, hasMore, optionsRef, hasInteractedRef]);
3194
+ (0, _react.useEffect)(() => {
3195
+ if (!onPopupScroll || !dropdownOpen) return;
3196
+ const timeoutId = setTimeout(() => {
3197
+ const scrollContainer = (0, _utils.getScrollContainer)();
3198
+ if (scrollContainer) {
3199
+ scrollContainerRef.current = scrollContainer;
3200
+ scrollContainer.addEventListener('scroll', handleScroll, {
3201
+ passive: true
3202
+ });
3203
+ }
3204
+ }, _constants.TIMEOUTS.SCROLL_CONTAINER_DELAY);
3205
+ return () => {
3206
+ clearTimeout(timeoutId);
3207
+ if (scrollThrottleTimeoutRef.current) {
3208
+ clearTimeout(scrollThrottleTimeoutRef.current);
3209
+ scrollThrottleTimeoutRef.current = null;
3210
+ }
3211
+ if (scrollContainerRef.current) {
3212
+ scrollContainerRef.current.removeEventListener('scroll', handleScroll);
3213
+ scrollContainerRef.current = null;
3214
+ }
3215
+ isScrollProcessingRef.current = false;
3216
+ };
3217
+ }, [onPopupScroll, dropdownOpen, handleScroll]);
3218
+
3219
+ /**
3220
+ * Reset scroll state - used when clearing or closing dropdown
3221
+ */
3222
+ const resetScrollState = (0, _react.useCallback)(() => {
3223
+ setIsLoadingOnScroll(false);
3224
+ isScrollProcessingRef.current = false;
3225
+ if (scrollLoadingTimeoutRef.current) {
3226
+ clearTimeout(scrollLoadingTimeoutRef.current);
3227
+ scrollLoadingTimeoutRef.current = null;
3228
+ }
3229
+ if (scrollThrottleTimeoutRef.current) {
3230
+ clearTimeout(scrollThrottleTimeoutRef.current);
3231
+ scrollThrottleTimeoutRef.current = null;
3232
+ }
3233
+ if (scrollContainerRef.current) {
3234
+ scrollContainerRef.current.removeEventListener('scroll', handleScroll);
3235
+ scrollContainerRef.current = null;
3236
+ }
3237
+ }, [handleScroll]);
3238
+ return {
3239
+ isLoadingOnScroll,
3240
+ resetScrollState,
3241
+ scrollTriggerOptionsCountRef
3242
+ };
3243
+ };
3244
+ exports.useInfiniteScroll = useInfiniteScroll;
3245
+
1916
3246
  /***/ }),
1917
3247
 
1918
3248
  /***/ 9206:
@@ -1923,6 +3253,56 @@ module.exports = require("react");
1923
3253
 
1924
3254
  /***/ }),
1925
3255
 
3256
+ /***/ 9315:
3257
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3258
+
3259
+ "use strict";
3260
+
3261
+
3262
+ exports.__esModule = true;
3263
+ exports.DropdownHeader = void 0;
3264
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
3265
+ var _react = _interopRequireDefault(__webpack_require__(9206));
3266
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
3267
+ var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
3268
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
3269
+ var _jsxRuntime = __webpack_require__(4848);
3270
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
3271
+ const DropdownHeader = _ref => {
3272
+ let {
3273
+ headerLabel,
3274
+ tooltip,
3275
+ bylineText,
3276
+ disabled = false
3277
+ } = _ref;
3278
+ if (!headerLabel && !tooltip) return null;
3279
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
3280
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
3281
+ className: (0, _classnames.default)(_styles.default['cap-unified-select-header-wrapper'], disabled && _styles.default.disabled, _styles.default['cap-unified-select-header']),
3282
+ children: [headerLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
3283
+ type: "label16",
3284
+ className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-label']),
3285
+ children: headerLabel
3286
+ }), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
3287
+ title: tooltip,
3288
+ className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-tooltip']),
3289
+ iconProps: {
3290
+ disabled
3291
+ }
3292
+ })]
3293
+ }), bylineText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
3294
+ className: _styles.default['cap-unified-select-header-byline-text'],
3295
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
3296
+ className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-byline-text']),
3297
+ children: bylineText
3298
+ })
3299
+ })]
3300
+ });
3301
+ };
3302
+ exports.DropdownHeader = DropdownHeader;
3303
+
3304
+ /***/ }),
3305
+
1926
3306
  /***/ 9604:
1927
3307
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1928
3308
 
@@ -1931,7 +3311,7 @@ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
1931
3311
  var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1932
3312
  var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
1933
3313
  // Module
1934
- ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-unified-select-header-wrapper{display:flex;align-items:center}.blaze-ui-cap-unified-select-header-wrapper.blaze-ui-disabled{opacity:.5;cursor:not-allowed}.blaze-ui-cap-unified-select-header-wrapper .blaze-ui-cap-unified-select-header-label{font-family:"Roboto",sans-serif;font-weight:500;font-size:1rem;line-height:1.429rem;letter-spacing:0}.blaze-ui-cap-unified-select-header-byline-text{font-family:"Roboto",sans-serif;font-weight:400;font-size:.857rem;letter-spacing:0;color:#97a0af}.blaze-ui-cap-unified-select-container{text-align:justify;min-width:13.786rem}.blaze-ui-cap-unified-select-container.blaze-ui-disabled{cursor:not-allowed}.blaze-ui-cap-unified-select-container.ant-select-focused .ant-select-selector{border:1px solid #091e42 !important}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-more-text{cursor:pointer;color:#091e42;margin-right:.286rem;position:relative}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-suffix-icon{color:#7a869a}.blaze-ui-cap-unified-select-container .blaze-ui-cap-tooltip-with-info-icon{margin-top:.143rem}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select.blaze-ui-cap-unified-tree-select-readonly{pointer-events:none}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select.blaze-ui-cap-unified-tree-select-readonly .blaze-ui-cap-unified-select-more-text{pointer-events:auto}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select .ant-select-tree-treenode{padding-left:.286rem}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly .ant-select-selector{background-color:#fff;border-color:#ebecf0 !important;cursor:default}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly .ant-select-arrow{pointer-events:auto;color:#b3bac5}.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:hover .ant-select-selector,.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:active .ant-select-selector,.blaze-ui-cap-unified-select-container.blaze-ui-cap-unified-tree-select-readonly.ant-select-outlined:focus .ant-select-selector{border-color:#ebecf0 !important}.blaze-ui-cap-unified-select-container .blaze-ui-cap-unified-select-status{color:#ea213a}.blaze-ui-cap-unified-select-container .ant-select-outlined:not(.ant-select-disabled):not(.ant-select-customize-input):not(.ant-pagination-size-changer):hover .ant-select-selector{border-color:#7a869a}.blaze-ui-cap-unified-select-container .ant-select-selector{background-color:#fff !important;border:.071rem solid #7a869a !important;border-radius:.286rem !important}.blaze-ui-cap-unified-select-container .ant-select-selector .ant-select-selection-placeholder{pointer-events:unset;color:#97a0af;display:flex;align-items:center}.blaze-ui-cap-unified-select-container .ant-select-prefix{font-size:1rem;font-weight:400;color:#091e42;line-height:1.429rem}.blaze-ui-cap-unified-select-container .ant-input-affix-wrapper .ant-input-prefix{left:.857rem}.blaze-ui-cap-unified-select-container .ant-select-selector{border-color:#7a869a !important;box-shadow:none !important;outline:0}.blaze-ui-cap-unified-select-container .ant-btn-variant-solid:not(:disabled):not(.ant-btn-disabled):hover{background-color:#47af46}.blaze-ui-cap-unified-select-container .ant-select-dropdown{margin-top:-0.571rem !important;border-radius:.286rem;background-color:#fff;box-shadow:0 .286rem .571rem -0.143rem rgba(9,30,66,.15),0 0 .071rem 0 rgba(9,30,66,.1);max-height:25.714rem;overflow:visible}.blaze-ui-cap-unified-select-container .ant-select-outlined.ant-select-multiple .ant-select-selection-wrap .ant-select-selection-item{background:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-container .ant-select-multiple .ant-select-selection-wrap .ant-select-selection-item,.blaze-ui-cap-unified-select-container .ant-select-selection-wrap .ant-select-selection-item{background:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-container .ant-select-multiple .ant-select-selection-wrap{align-self:center}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-search-container{border-bottom:.071rem solid #ebecf0 !important;line-height:2.857rem !important}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-search-container .blaze-ui-cap-unified-select-search-icon{color:#b3bac5}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-select-all-container{padding:.643rem 1.071rem;cursor:pointer;display:flex;align-items:center;border-bottom:.071rem solid #ebecf0;height:2.857rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-select-all-container .blaze-ui-cap-unified-select-select-all-checkbox{display:contents !important}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container{cursor:pointer;display:flex;align-items:center;border-bottom:.071rem solid #ebecf0;height:2.857rem;padding-left:1.143rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container .blaze-ui-cap-unified-select-upload-icon{color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-upload-container .blaze-ui-cap-unified-select-upload-label{margin-left:.857rem;color:#2466ea}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container{display:flex;align-items:center;height:3.429rem;padding:.5rem;border-top:.071rem solid #ebecf0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group{display:flex;padding-left:.571rem;align-items:center}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button{background-color:#47af46;height:2.286rem;width:6.714rem;color:#fff}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button:hover{background-color:#1f9a1d}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-confirm-button:disabled{background-color:#a1d8a0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-cancel-button{border:rgba(0,0,0,0);box-shadow:none;width:5.714rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-confirm-container .blaze-ui-cap-unified-select-confirm-button-group .blaze-ui-cap-unified-select-selected-count{display:flex;margin-left:auto;font-size:.857rem;font-weight:400;line-height:1.143rem;color:#5e6c84}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container{display:flex;justify-content:center;align-items:center;height:2.857rem;border-top:.071rem solid #ebecf0;cursor:pointer;color:#091e42}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container:hover{background-color:#ebecf0}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-tree-clear-container .blaze-ui-cap-unified-select-tree-clear-label{font-size:1rem;font-weight:400}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-no-result{display:flex;flex-direction:column;align-items:center;justify-content:center;height:14.286rem;color:#97a0af;font-size:1rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-no-result .blaze-ui-cap-unified-select-no-result-text{font-weight:500}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix{display:flex;justify-content:flex-start;align-items:center;width:100%;height:100%}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-label{flex:1}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-unified-select-option-suffix{display:flex;align-items:center;padding:0 .571rem;max-height:1.429rem;white-space:nowrap;margin-left:.571rem}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info{margin-left:auto}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon{margin-top:.357rem;color:#42526e}.blaze-ui-cap-unified-select-popup .blaze-ui-cap-unified-select-option-with-suffix .blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon .blaze-ui-cap-icon{color:#42526e}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu{margin-top:0 !important}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu .ant-select-dropdown-menu-item{padding:.571rem 1.714rem !important;height:unset !important;font-size:1rem !important}.blaze-ui-cap-unified-select-popup .ant-select-dropdown .ant-select-dropdown-menu-item-disabled{color:rgba(0,0,0,.25) !important;cursor:not-allowed !important;line-height:1.428rem !important;font-size:1rem !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper{background-color:rgba(0,0,0,0);height:100%}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper:hover{background-color:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-active .ant-select-tree-node-content-wrapper{background-color:rgba(0,0,0,0) !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode{height:2.857rem;margin-bottom:0}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode:hover{background-color:#fffbe6}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-selected{background-color:#f4f5f7 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled{cursor:not-allowed !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled .blaze-ui-cap-unified-select-option-label{color:#b3bac5}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-disabled .blaze-ui-cap-icon{color:#b3bac5 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode.ant-select-tree-treenode-selected{background-color:#f4f5f7}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-treenode-leaf .ant-select-tree-switcher-noop{display:none}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox .ant-select-tree-checkbox-inner{height:1.286rem;width:1.286rem;border:.143rem solid #b3bac5;border-radius:.286rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox-checked .ant-select-tree-checkbox-inner:hover{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner{background-color:#47af46 !important;border-color:#47af46 !important}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-checkbox.ant-select-tree-checkbox-indeterminate .ant-select-tree-checkbox-inner::after{content:"";position:absolute;top:50%;left:50%;width:.714rem;height:.143rem;background-color:#fff;transform:translate(-50%, -50%);border-radius:.071rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-node-content-wrapper{border-radius:0;padding-left:.214rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-indent{margin-left:.857rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher:not(.ant-select-tree-switcher-noop):hover:before{background-color:rgba(0,0,0,0)}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-switcher .ant-select-tree-switcher-icon{font-size:.857rem;margin-top:1.286rem}.blaze-ui-cap-unified-select-popup .ant-select-tree .ant-select-tree-list-holder-inner{width:fit-content !important;min-width:100%}.blaze-ui-cap-unified-select-popup .ant-tree-select:hover .ant-select-selector{border-color:#7a869a}.blaze-ui-cap-unified-select-popup .ant-tree-select-focused .ant-select-selector,.blaze-ui-cap-unified-select-popup .ant-tree-select-open .ant-select-selector{border-color:#7a869a;box-shadow:none;outline:none}.blaze-ui-cap-unified-select-popup .ant-checkbox-inner{height:1.286rem;width:1.286rem;border:.143rem solid #b3bac5;border-radius:.286rem}.blaze-ui-cap-unified-select-popup .ant-checkbox-wrapper:not(.ant-checkbox-wrapper-disabled):hover .ant-checkbox-checked:not(.ant-checkbox-disabled) .ant-checkbox-inner{background-color:#47af46;border:.143rem solid #47af46 !important}.blaze-ui-cap-unified-select-popup .ant-checkbox-indeterminate .ant-checkbox-inner{background-color:#47af46 !important;border-color:#47af46 !important}.blaze-ui-cap-unified-select-popup .ant-checkbox-indeterminate .ant-checkbox-inner::after{content:"";position:absolute;top:50%;left:50%;width:.714rem;height:.143rem;background-color:#fff;transform:translate(-50%, -50%);border-radius:.071rem}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper{padding-left:.571rem;border:none;box-shadow:none;border-radius:0;border-bottom:.071rem solid rgba(0,0,0,0);transition:border-color .2s ease}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper:hover{border-bottom:.071rem solid #7a869a !important;box-shadow:none}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper:focus-within{border-bottom:.071rem solid #091e42 !important;box-shadow:none;outline:none}.blaze-ui-cap-unified-select-popup .ant-input-affix-wrapper .ant-input{border:none !important;box-shadow:none !important}`, ""]);
3314
+ ___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-selector .ant-select-selection-item{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;width:100%}.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-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.ant-select-tree-node-content-wrapper-normal{width:95%}.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: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}`, ""]);
1935
3315
  // Exports
1936
3316
  ___CSS_LOADER_EXPORT___.locals = {
1937
3317
  "cap-unified-select-header-wrapper": `blaze-ui-cap-unified-select-header-wrapper`,
@@ -1960,10 +3340,19 @@ ___CSS_LOADER_EXPORT___.locals = {
1960
3340
  "cap-unified-select-selected-count": `blaze-ui-cap-unified-select-selected-count`,
1961
3341
  "cap-unified-select-tree-clear-container": `blaze-ui-cap-unified-select-tree-clear-container`,
1962
3342
  "cap-unified-select-tree-clear-label": `blaze-ui-cap-unified-select-tree-clear-label`,
3343
+ "cap-unified-select-footer-download-container": `blaze-ui-cap-unified-select-footer-download-container`,
3344
+ "cap-unified-select-footer-download-icon": `blaze-ui-cap-unified-select-footer-download-icon`,
3345
+ "cap-unified-select-footer-download-label": `blaze-ui-cap-unified-select-footer-download-label`,
1963
3346
  "cap-unified-select-no-result": `blaze-ui-cap-unified-select-no-result`,
1964
3347
  "cap-unified-select-no-result-text": `blaze-ui-cap-unified-select-no-result-text`,
3348
+ "cap-unified-select-loading-container": `blaze-ui-cap-unified-select-loading-container`,
3349
+ "cap-unified-select-loading-more": `blaze-ui-cap-unified-select-loading-more`,
3350
+ "cap-unified-select-menu-wrapper": `blaze-ui-cap-unified-select-menu-wrapper`,
3351
+ "cap-unified-select-loading-overlay": `blaze-ui-cap-unified-select-loading-overlay`,
1965
3352
  "cap-unified-select-option-with-suffix": `blaze-ui-cap-unified-select-option-with-suffix`,
1966
3353
  "cap-unified-select-option-label": `blaze-ui-cap-unified-select-option-label`,
3354
+ "truncate-text": `blaze-ui-truncate-text`,
3355
+ "cap-unified-select-option-end": `blaze-ui-cap-unified-select-option-end`,
1967
3356
  "cap-unified-select-option-suffix": `blaze-ui-cap-unified-select-option-suffix`,
1968
3357
  "cap-tooltip-with-info": `blaze-ui-cap-tooltip-with-info`,
1969
3358
  "cap-icon": `blaze-ui-cap-icon`
@@ -1971,6 +3360,47 @@ ___CSS_LOADER_EXPORT___.locals = {
1971
3360
  module.exports = ___CSS_LOADER_EXPORT___;
1972
3361
 
1973
3362
 
3363
+ /***/ }),
3364
+
3365
+ /***/ 9788:
3366
+ /***/ ((__unused_webpack_module, exports) => {
3367
+
3368
+ "use strict";
3369
+
3370
+
3371
+ exports.__esModule = true;
3372
+ exports.TIMEOUTS = exports.SELECT_TYPES = exports.DEFAULTS = void 0;
3373
+ let SELECT_TYPES = exports.SELECT_TYPES = /*#__PURE__*/function (SELECT_TYPES) {
3374
+ SELECT_TYPES["SELECT"] = "select";
3375
+ SELECT_TYPES["MULTI_SELECT"] = "multiSelect";
3376
+ SELECT_TYPES["TREE_SELECT"] = "treeSelect";
3377
+ SELECT_TYPES["MULTI_TREE_SELECT"] = "multiTreeSelect";
3378
+ return SELECT_TYPES;
3379
+ }({});
3380
+ const TIMEOUTS = exports.TIMEOUTS = {
3381
+ DEFAULT_SEARCH_DEBOUNCE: 300,
3382
+ SEARCH_STATE_UPDATE_DELAY: 100,
3383
+ SEARCH_CLEARED_TIMEOUT: 200,
3384
+ SEARCH_CLEARED_BUFFER: 300,
3385
+ SEARCH_REGULAR_BUFFER: 500,
3386
+ STATIC_SEARCH_DELAY: 150,
3387
+ RESET_DATA_TIMEOUT: 1000,
3388
+ RESET_DATA_MIN_TIME: 300,
3389
+ RESET_DATA_MAX_TIME: 2000,
3390
+ SCROLL_LOADING_TIMEOUT: 10000,
3391
+ SCROLL_CONTAINER_DELAY: 100
3392
+ };
3393
+ const DEFAULTS = exports.DEFAULTS = {
3394
+ PLACEHOLDER: 'Select an option',
3395
+ UPLOAD_LABEL: 'Upload',
3396
+ CLEAR_TEXT: 'Clear',
3397
+ NO_RESULT_TEXT: 'No results found',
3398
+ NO_RESULT_ICON: 'warning',
3399
+ VIRTUAL_ROW_HEIGHT: 32,
3400
+ LIST_HEIGHT: 256,
3401
+ SEARCH_PLACEHOLDER: 'Search'
3402
+ };
3403
+
1974
3404
  /***/ })
1975
3405
 
1976
3406
  /******/ });