@capillarytech/blaze-ui 1.0.3-alpha.15 → 1.0.3-alpha.16

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 (258) hide show
  1. package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts +47 -0
  2. package/dist/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +1 -0
  3. package/dist/CapUnifiedSelect/CustomDropdown.d.ts +40 -0
  4. package/dist/CapUnifiedSelect/CustomDropdown.d.ts.map +1 -0
  5. package/dist/CapUnifiedSelect/DropdownHeader.d.ts +10 -0
  6. package/dist/CapUnifiedSelect/DropdownHeader.d.ts.map +1 -0
  7. package/{CapUnifiedSelect → dist/CapUnifiedSelect}/constants.d.ts +7 -7
  8. package/dist/CapUnifiedSelect/constants.d.ts.map +1 -0
  9. package/dist/CapUnifiedSelect/enhanceOptions.d.ts +8 -0
  10. package/dist/CapUnifiedSelect/enhanceOptions.d.ts.map +1 -0
  11. package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.js +1839 -1599
  12. package/dist/CapUnifiedSelect/index.js.map +1 -0
  13. package/dist/CapUnifiedSelect/useCapUnifiedSelect.d.ts +48 -0
  14. package/dist/CapUnifiedSelect/useCapUnifiedSelect.d.ts.map +1 -0
  15. package/{CapUnifiedSelect → dist/CapUnifiedSelect}/utils.d.ts +5 -0
  16. package/{CapUnifiedSelect → dist/CapUnifiedSelect}/utils.d.ts.map +1 -1
  17. package/{index.js → dist/index.js} +16588 -16348
  18. package/dist/index.js.map +1 -0
  19. package/package.json +200 -101
  20. package/CapUnifiedSelect/CapUnifiedSelect.d.ts +0 -133
  21. package/CapUnifiedSelect/CapUnifiedSelect.d.ts.map +0 -1
  22. package/CapUnifiedSelect/constants.d.ts.map +0 -1
  23. package/CapUnifiedSelect/index.js.map +0 -1
  24. package/index.js.map +0 -1
  25. /package/{CapAlert → dist/CapAlert}/CapAlert.d.ts +0 -0
  26. /package/{CapAlert → dist/CapAlert}/CapAlert.d.ts.map +0 -0
  27. /package/{CapAlert → dist/CapAlert}/CapAlert.test.d.ts +0 -0
  28. /package/{CapAlert → dist/CapAlert}/CapAlert.test.d.ts.map +0 -0
  29. /package/{CapAlert → dist/CapAlert}/index.d.ts +0 -0
  30. /package/{CapAlert → dist/CapAlert}/index.d.ts.map +0 -0
  31. /package/{CapAlert → dist/CapAlert}/index.js +0 -0
  32. /package/{CapAlert → dist/CapAlert}/index.js.map +0 -0
  33. /package/{CapButton → dist/CapButton}/CapButton.d.ts +0 -0
  34. /package/{CapButton → dist/CapButton}/CapButton.d.ts.map +0 -0
  35. /package/{CapButton → dist/CapButton}/CapButton.test.d.ts +0 -0
  36. /package/{CapButton → dist/CapButton}/CapButton.test.d.ts.map +0 -0
  37. /package/{CapButton → dist/CapButton}/index.d.ts +0 -0
  38. /package/{CapButton → dist/CapButton}/index.d.ts.map +0 -0
  39. /package/{CapButton → dist/CapButton}/index.js +0 -0
  40. /package/{CapButton → dist/CapButton}/index.js.map +0 -0
  41. /package/{CapCard → dist/CapCard}/CapCard.d.ts +0 -0
  42. /package/{CapCard → dist/CapCard}/CapCard.d.ts.map +0 -0
  43. /package/{CapCard → dist/CapCard}/CapCard.test.d.ts +0 -0
  44. /package/{CapCard → dist/CapCard}/CapCard.test.d.ts.map +0 -0
  45. /package/{CapCard → dist/CapCard}/index.d.ts +0 -0
  46. /package/{CapCard → dist/CapCard}/index.d.ts.map +0 -0
  47. /package/{CapCard → dist/CapCard}/index.js +0 -0
  48. /package/{CapCard → dist/CapCard}/index.js.map +0 -0
  49. /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.d.ts +0 -0
  50. /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.d.ts.map +0 -0
  51. /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.test.d.ts +0 -0
  52. /package/{CapCheckbox → dist/CapCheckbox}/CapCheckbox.test.d.ts.map +0 -0
  53. /package/{CapCheckbox → dist/CapCheckbox}/index.d.ts +0 -0
  54. /package/{CapCheckbox → dist/CapCheckbox}/index.d.ts.map +0 -0
  55. /package/{CapCheckbox → dist/CapCheckbox}/index.js +0 -0
  56. /package/{CapCheckbox → dist/CapCheckbox}/index.js.map +0 -0
  57. /package/{CapColumn → dist/CapColumn}/CapColumn.d.ts +0 -0
  58. /package/{CapColumn → dist/CapColumn}/CapColumn.d.ts.map +0 -0
  59. /package/{CapColumn → dist/CapColumn}/CapColumn.test.d.ts +0 -0
  60. /package/{CapColumn → dist/CapColumn}/CapColumn.test.d.ts.map +0 -0
  61. /package/{CapColumn → dist/CapColumn}/index.d.ts +0 -0
  62. /package/{CapColumn → dist/CapColumn}/index.d.ts.map +0 -0
  63. /package/{CapColumn → dist/CapColumn}/index.js +0 -0
  64. /package/{CapColumn → dist/CapColumn}/index.js.map +0 -0
  65. /package/{CapDivider → dist/CapDivider}/CapDivider.d.ts +0 -0
  66. /package/{CapDivider → dist/CapDivider}/CapDivider.d.ts.map +0 -0
  67. /package/{CapDivider → dist/CapDivider}/CapDivider.test.d.ts +0 -0
  68. /package/{CapDivider → dist/CapDivider}/CapDivider.test.d.ts.map +0 -0
  69. /package/{CapDivider → dist/CapDivider}/index.d.ts +0 -0
  70. /package/{CapDivider → dist/CapDivider}/index.d.ts.map +0 -0
  71. /package/{CapDivider → dist/CapDivider}/index.js +0 -0
  72. /package/{CapDivider → dist/CapDivider}/index.js.map +0 -0
  73. /package/{CapDropdown → dist/CapDropdown}/CapDropdown.d.ts +0 -0
  74. /package/{CapDropdown → dist/CapDropdown}/CapDropdown.d.ts.map +0 -0
  75. /package/{CapDropdown → dist/CapDropdown}/CapDropdown.test.d.ts +0 -0
  76. /package/{CapDropdown → dist/CapDropdown}/CapDropdown.test.d.ts.map +0 -0
  77. /package/{CapDropdown → dist/CapDropdown}/index.d.ts +0 -0
  78. /package/{CapDropdown → dist/CapDropdown}/index.d.ts.map +0 -0
  79. /package/{CapDropdown → dist/CapDropdown}/index.js +0 -0
  80. /package/{CapDropdown → dist/CapDropdown}/index.js.map +0 -0
  81. /package/{CapForm → dist/CapForm}/CapForm.d.ts +0 -0
  82. /package/{CapForm → dist/CapForm}/CapForm.d.ts.map +0 -0
  83. /package/{CapForm → dist/CapForm}/CapForm.test.d.ts +0 -0
  84. /package/{CapForm → dist/CapForm}/CapForm.test.d.ts.map +0 -0
  85. /package/{CapForm → dist/CapForm}/index.d.ts +0 -0
  86. /package/{CapForm → dist/CapForm}/index.d.ts.map +0 -0
  87. /package/{CapForm → dist/CapForm}/index.js +0 -0
  88. /package/{CapForm → dist/CapForm}/index.js.map +0 -0
  89. /package/{CapFormItem → dist/CapFormItem}/CapFormItem.d.ts +0 -0
  90. /package/{CapFormItem → dist/CapFormItem}/CapFormItem.d.ts.map +0 -0
  91. /package/{CapFormItem → dist/CapFormItem}/CapFormItem.test.d.ts +0 -0
  92. /package/{CapFormItem → dist/CapFormItem}/CapFormItem.test.d.ts.map +0 -0
  93. /package/{CapFormItem → dist/CapFormItem}/index.d.ts +0 -0
  94. /package/{CapFormItem → dist/CapFormItem}/index.d.ts.map +0 -0
  95. /package/{CapFormItem → dist/CapFormItem}/index.js +0 -0
  96. /package/{CapFormItem → dist/CapFormItem}/index.js.map +0 -0
  97. /package/{CapIcon → dist/CapIcon}/CapIcon.d.ts +0 -0
  98. /package/{CapIcon → dist/CapIcon}/CapIcon.d.ts.map +0 -0
  99. /package/{CapIcon → dist/CapIcon}/CapIcon.test.d.ts +0 -0
  100. /package/{CapIcon → dist/CapIcon}/CapIcon.test.d.ts.map +0 -0
  101. /package/{CapIcon → dist/CapIcon}/index.d.ts +0 -0
  102. /package/{CapIcon → dist/CapIcon}/index.d.ts.map +0 -0
  103. /package/{CapIcon → dist/CapIcon}/index.js +0 -0
  104. /package/{CapIcon → dist/CapIcon}/index.js.map +0 -0
  105. /package/{CapInput → dist/CapInput}/CapInput.d.ts +0 -0
  106. /package/{CapInput → dist/CapInput}/CapInput.d.ts.map +0 -0
  107. /package/{CapInput → dist/CapInput}/CapInput.test.d.ts +0 -0
  108. /package/{CapInput → dist/CapInput}/CapInput.test.d.ts.map +0 -0
  109. /package/{CapInput → dist/CapInput}/Number.d.ts +0 -0
  110. /package/{CapInput → dist/CapInput}/Number.d.ts.map +0 -0
  111. /package/{CapInput → dist/CapInput}/Number.test.d.ts +0 -0
  112. /package/{CapInput → dist/CapInput}/Number.test.d.ts.map +0 -0
  113. /package/{CapInput → dist/CapInput}/Search.d.ts +0 -0
  114. /package/{CapInput → dist/CapInput}/Search.d.ts.map +0 -0
  115. /package/{CapInput → dist/CapInput}/Search.test.d.ts +0 -0
  116. /package/{CapInput → dist/CapInput}/Search.test.d.ts.map +0 -0
  117. /package/{CapInput → dist/CapInput}/TextArea.d.ts +0 -0
  118. /package/{CapInput → dist/CapInput}/TextArea.d.ts.map +0 -0
  119. /package/{CapInput → dist/CapInput}/TextArea.test.d.ts +0 -0
  120. /package/{CapInput → dist/CapInput}/TextArea.test.d.ts.map +0 -0
  121. /package/{CapInput → dist/CapInput}/index.d.ts +0 -0
  122. /package/{CapInput → dist/CapInput}/index.d.ts.map +0 -0
  123. /package/{CapInput → dist/CapInput}/index.js +0 -0
  124. /package/{CapInput → dist/CapInput}/index.js.map +0 -0
  125. /package/{CapLabel → dist/CapLabel}/CapLabel.d.ts +0 -0
  126. /package/{CapLabel → dist/CapLabel}/CapLabel.d.ts.map +0 -0
  127. /package/{CapLabel → dist/CapLabel}/CapLabel.test.d.ts +0 -0
  128. /package/{CapLabel → dist/CapLabel}/CapLabel.test.d.ts.map +0 -0
  129. /package/{CapLabel → dist/CapLabel}/index.d.ts +0 -0
  130. /package/{CapLabel → dist/CapLabel}/index.d.ts.map +0 -0
  131. /package/{CapLabel → dist/CapLabel}/index.js +0 -0
  132. /package/{CapLabel → dist/CapLabel}/index.js.map +0 -0
  133. /package/{CapMenu → dist/CapMenu}/CapMenu.d.ts +0 -0
  134. /package/{CapMenu → dist/CapMenu}/CapMenu.d.ts.map +0 -0
  135. /package/{CapMenu → dist/CapMenu}/CapMenu.test.d.ts +0 -0
  136. /package/{CapMenu → dist/CapMenu}/CapMenu.test.d.ts.map +0 -0
  137. /package/{CapMenu → dist/CapMenu}/index.d.ts +0 -0
  138. /package/{CapMenu → dist/CapMenu}/index.d.ts.map +0 -0
  139. /package/{CapMenu → dist/CapMenu}/index.js +0 -0
  140. /package/{CapMenu → dist/CapMenu}/index.js.map +0 -0
  141. /package/{CapRadio → dist/CapRadio}/CapRadio.d.ts +0 -0
  142. /package/{CapRadio → dist/CapRadio}/CapRadio.d.ts.map +0 -0
  143. /package/{CapRadio → dist/CapRadio}/CapRadio.test.d.ts +0 -0
  144. /package/{CapRadio → dist/CapRadio}/CapRadio.test.d.ts.map +0 -0
  145. /package/{CapRadio → dist/CapRadio}/index.d.ts +0 -0
  146. /package/{CapRadio → dist/CapRadio}/index.d.ts.map +0 -0
  147. /package/{CapRadio → dist/CapRadio}/index.js +0 -0
  148. /package/{CapRadio → dist/CapRadio}/index.js.map +0 -0
  149. /package/{CapRow → dist/CapRow}/CapRow.d.ts +0 -0
  150. /package/{CapRow → dist/CapRow}/CapRow.d.ts.map +0 -0
  151. /package/{CapRow → dist/CapRow}/CapRow.test.d.ts +0 -0
  152. /package/{CapRow → dist/CapRow}/CapRow.test.d.ts.map +0 -0
  153. /package/{CapRow → dist/CapRow}/index.d.ts +0 -0
  154. /package/{CapRow → dist/CapRow}/index.d.ts.map +0 -0
  155. /package/{CapRow → dist/CapRow}/index.js +0 -0
  156. /package/{CapRow → dist/CapRow}/index.js.map +0 -0
  157. /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.d.ts +0 -0
  158. /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.d.ts.map +0 -0
  159. /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.test.d.ts +0 -0
  160. /package/{CapSkeleton → dist/CapSkeleton}/CapSkeleton.test.d.ts.map +0 -0
  161. /package/{CapSkeleton → dist/CapSkeleton}/index.d.ts +0 -0
  162. /package/{CapSkeleton → dist/CapSkeleton}/index.d.ts.map +0 -0
  163. /package/{CapSkeleton → dist/CapSkeleton}/index.js +0 -0
  164. /package/{CapSkeleton → dist/CapSkeleton}/index.js.map +0 -0
  165. /package/{CapSpin → dist/CapSpin}/CapSpin.d.ts +0 -0
  166. /package/{CapSpin → dist/CapSpin}/CapSpin.d.ts.map +0 -0
  167. /package/{CapSpin → dist/CapSpin}/CapSpin.test.d.ts +0 -0
  168. /package/{CapSpin → dist/CapSpin}/CapSpin.test.d.ts.map +0 -0
  169. /package/{CapSpin → dist/CapSpin}/index.d.ts +0 -0
  170. /package/{CapSpin → dist/CapSpin}/index.d.ts.map +0 -0
  171. /package/{CapSpin → dist/CapSpin}/index.js +0 -0
  172. /package/{CapSpin → dist/CapSpin}/index.js.map +0 -0
  173. /package/{CapSwitch → dist/CapSwitch}/CapSwitch.d.ts +0 -0
  174. /package/{CapSwitch → dist/CapSwitch}/CapSwitch.d.ts.map +0 -0
  175. /package/{CapSwitch → dist/CapSwitch}/CapSwitch.test.d.ts +0 -0
  176. /package/{CapSwitch → dist/CapSwitch}/CapSwitch.test.d.ts.map +0 -0
  177. /package/{CapSwitch → dist/CapSwitch}/index.d.ts +0 -0
  178. /package/{CapSwitch → dist/CapSwitch}/index.d.ts.map +0 -0
  179. /package/{CapSwitch → dist/CapSwitch}/index.js +0 -0
  180. /package/{CapSwitch → dist/CapSwitch}/index.js.map +0 -0
  181. /package/{CapTab → dist/CapTab}/CapTab.d.ts +0 -0
  182. /package/{CapTab → dist/CapTab}/CapTab.d.ts.map +0 -0
  183. /package/{CapTab → dist/CapTab}/CapTab.test.d.ts +0 -0
  184. /package/{CapTab → dist/CapTab}/CapTab.test.d.ts.map +0 -0
  185. /package/{CapTab → dist/CapTab}/index.d.ts +0 -0
  186. /package/{CapTab → dist/CapTab}/index.d.ts.map +0 -0
  187. /package/{CapTab → dist/CapTab}/index.js +0 -0
  188. /package/{CapTab → dist/CapTab}/index.js.map +0 -0
  189. /package/{CapTable → dist/CapTable}/CapTable.d.ts +0 -0
  190. /package/{CapTable → dist/CapTable}/CapTable.d.ts.map +0 -0
  191. /package/{CapTable → dist/CapTable}/CapTable.test.d.ts +0 -0
  192. /package/{CapTable → dist/CapTable}/CapTable.test.d.ts.map +0 -0
  193. /package/{CapTable → dist/CapTable}/index.d.ts +0 -0
  194. /package/{CapTable → dist/CapTable}/index.d.ts.map +0 -0
  195. /package/{CapTable → dist/CapTable}/index.js +0 -0
  196. /package/{CapTable → dist/CapTable}/index.js.map +0 -0
  197. /package/{CapTable → dist/CapTable}/loadable.d.ts +0 -0
  198. /package/{CapTable → dist/CapTable}/loadable.d.ts.map +0 -0
  199. /package/{CapTable → dist/CapTable}/loadable.test.d.ts +0 -0
  200. /package/{CapTable → dist/CapTable}/loadable.test.d.ts.map +0 -0
  201. /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.d.ts +0 -0
  202. /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.d.ts.map +0 -0
  203. /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.test.d.ts +0 -0
  204. /package/{CapTestSelect → dist/CapTestSelect}/CapTestSelect.test.d.ts.map +0 -0
  205. /package/{CapTestSelect → dist/CapTestSelect}/index.d.ts +0 -0
  206. /package/{CapTestSelect → dist/CapTestSelect}/index.d.ts.map +0 -0
  207. /package/{CapTestSelect → dist/CapTestSelect}/index.js +0 -0
  208. /package/{CapTestSelect → dist/CapTestSelect}/index.js.map +0 -0
  209. /package/{CapTooltip → dist/CapTooltip}/CapTooltip.d.ts +0 -0
  210. /package/{CapTooltip → dist/CapTooltip}/CapTooltip.d.ts.map +0 -0
  211. /package/{CapTooltip → dist/CapTooltip}/CapTooltip.test.d.ts +0 -0
  212. /package/{CapTooltip → dist/CapTooltip}/CapTooltip.test.d.ts.map +0 -0
  213. /package/{CapTooltip → dist/CapTooltip}/index.d.ts +0 -0
  214. /package/{CapTooltip → dist/CapTooltip}/index.d.ts.map +0 -0
  215. /package/{CapTooltip → dist/CapTooltip}/index.js +0 -0
  216. /package/{CapTooltip → dist/CapTooltip}/index.js.map +0 -0
  217. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.d.ts +0 -0
  218. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.d.ts.map +0 -0
  219. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.test.d.ts +0 -0
  220. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/CapTooltipWithInfo.test.d.ts.map +0 -0
  221. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.d.ts +0 -0
  222. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.d.ts.map +0 -0
  223. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.js +0 -0
  224. /package/{CapTooltipWithInfo → dist/CapTooltipWithInfo}/index.js.map +0 -0
  225. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/CapUnifiedSelect.test.d.ts +0 -0
  226. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/CapUnifiedSelect.test.d.ts.map +0 -0
  227. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/components.d.ts +0 -0
  228. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/components.d.ts.map +0 -0
  229. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.d.ts +0 -0
  230. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/index.d.ts.map +0 -0
  231. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/messages.d.ts +0 -0
  232. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/messages.d.ts.map +0 -0
  233. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/testData.d.ts +0 -0
  234. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/testData.d.ts.map +0 -0
  235. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/types.d.ts +0 -0
  236. /package/{CapUnifiedSelect → dist/CapUnifiedSelect}/types.d.ts.map +0 -0
  237. /package/{LocaleHoc → dist/LocaleHoc}/index.d.ts +0 -0
  238. /package/{LocaleHoc → dist/LocaleHoc}/index.d.ts.map +0 -0
  239. /package/{LocaleHoc → dist/LocaleHoc}/index.js +0 -0
  240. /package/{LocaleHoc → dist/LocaleHoc}/index.js.map +0 -0
  241. /package/{LocaleHoc → dist/LocaleHoc}/index.test.d.ts +0 -0
  242. /package/{LocaleHoc → dist/LocaleHoc}/index.test.d.ts.map +0 -0
  243. /package/{assets → dist/assets}/upload.svg +0 -0
  244. /package/{index.d.ts → dist/index.d.ts} +0 -0
  245. /package/{index.d.ts.map → dist/index.d.ts.map} +0 -0
  246. /package/{styled → dist/styled}/variables.d.ts +0 -0
  247. /package/{styled → dist/styled}/variables.d.ts.map +0 -0
  248. /package/{styled → dist/styled}/variables.scss +0 -0
  249. /package/{utils → dist/utils}/fonts.d.ts +0 -0
  250. /package/{utils → dist/utils}/fonts.d.ts.map +0 -0
  251. /package/{utils → dist/utils}/fonts.test.d.ts +0 -0
  252. /package/{utils → dist/utils}/fonts.test.d.ts.map +0 -0
  253. /package/{utils → dist/utils}/index.d.ts +0 -0
  254. /package/{utils → dist/utils}/index.d.ts.map +0 -0
  255. /package/{utils → dist/utils}/index.js +0 -0
  256. /package/{utils → dist/utils}/index.js.map +0 -0
  257. /package/{utils → dist/utils}/styles.d.ts +0 -0
  258. /package/{utils → dist/utils}/styles.d.ts.map +0 -0
@@ -97,940 +97,135 @@ exports.SelectAllCheckbox = SelectAllCheckbox;
97
97
 
98
98
  /***/ }),
99
99
 
100
- /***/ 540:
101
- /***/ ((module) => {
102
-
103
- "use strict";
104
-
105
-
106
- /* istanbul ignore next */
107
- function insertStyleElement(options) {
108
- var element = document.createElement("style");
109
- options.setAttributes(element, options.attributes);
110
- options.insert(element, options.options);
111
- return element;
112
- }
113
- module.exports = insertStyleElement;
114
-
115
- /***/ }),
116
-
117
- /***/ 1020:
118
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
119
-
120
- "use strict";
121
- /**
122
- * @license React
123
- * react-jsx-runtime.production.min.js
124
- *
125
- * Copyright (c) Facebook, Inc. and its affiliates.
126
- *
127
- * This source code is licensed under the MIT license found in the
128
- * LICENSE file in the root directory of this source tree.
129
- */
130
- var f=__webpack_require__(9206),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
131
- 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;
132
-
133
-
134
- /***/ }),
135
-
136
- /***/ 1549:
137
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
138
-
139
- "use strict";
140
-
141
-
142
- exports.__esModule = true;
143
- exports["default"] = void 0;
144
- var _CapSpin = _interopRequireDefault(__webpack_require__(7579));
145
- exports["default"] = _CapSpin.default;
146
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
147
-
148
- /***/ }),
149
-
150
- /***/ 1601:
151
- /***/ ((module) => {
152
-
153
- "use strict";
154
-
155
-
156
- module.exports = function (i) {
157
- return i[1];
158
- };
159
-
160
- /***/ }),
161
-
162
- /***/ 1858:
163
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
164
-
165
- // Imports
166
- var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
167
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
168
- var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
169
- // Module
170
- ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-row-v2.blaze-ui-with-custom-width{width:auto}.blaze-ui-cap-row-v2.blaze-ui-with-custom-height{height:auto}.blaze-ui-cap-row-v2.blaze-ui-fill-space{flex:1}.blaze-ui-cap-row-v2.blaze-ui-full-width{width:100%}.blaze-ui-cap-row-v2.blaze-ui-full-height{height:100%}.blaze-ui-cap-row-v2.blaze-ui-ant-row-no-wrap{flex-wrap:nowrap}.blaze-ui-cap-row-v2.blaze-ui-with-gap{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}`, ""]);
171
- // Exports
172
- ___CSS_LOADER_EXPORT___.locals = {
173
- "cap-row-v2": `blaze-ui-cap-row-v2`,
174
- "with-custom-width": `blaze-ui-with-custom-width`,
175
- "with-custom-height": `blaze-ui-with-custom-height`,
176
- "fill-space": `blaze-ui-fill-space`,
177
- "full-width": `blaze-ui-full-width`,
178
- "full-height": `blaze-ui-full-height`,
179
- "ant-row-no-wrap": `blaze-ui-ant-row-no-wrap`,
180
- "with-gap": `blaze-ui-with-gap`
181
- };
182
- module.exports = ___CSS_LOADER_EXPORT___;
183
-
184
-
185
- /***/ }),
186
-
187
- /***/ 2119:
188
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
189
-
190
- // Imports
191
- var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
192
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
193
- var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
194
- // Module
195
- ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-tooltip-overlay-v2 .ant-tooltip-inner{background-color:#091e42;color:#fff;padding:.571rem .857rem;font-size:1rem;line-height:1.429rem;border-radius:.286rem;max-width:21.429rem;word-wrap:break-word}.blaze-ui-cap-tooltip-overlay-v2 .ant-tooltip-arrow::before{background-color:#091e42}.blaze-ui-button-disabled-tooltip-wrapper{display:inline-block;cursor:not-allowed}.blaze-ui-button-disabled-tooltip-wrapper .ant-btn[disabled]{pointer-events:none}.blaze-ui-cap-tooltip-wrapper{display:inline-block}`, ""]);
196
- // Exports
197
- ___CSS_LOADER_EXPORT___.locals = {
198
- "cap-tooltip-overlay-v2": `blaze-ui-cap-tooltip-overlay-v2`,
199
- "button-disabled-tooltip-wrapper": `blaze-ui-button-disabled-tooltip-wrapper`,
200
- "cap-tooltip-wrapper": `blaze-ui-cap-tooltip-wrapper`
201
- };
202
- module.exports = ___CSS_LOADER_EXPORT___;
203
-
204
-
205
- /***/ }),
206
-
207
- /***/ 2608:
208
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
209
-
210
- "use strict";
211
-
212
-
213
- exports.__esModule = true;
214
- exports["default"] = void 0;
215
- var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(4299));
216
- exports["default"] = _CapTooltipWithInfo.default;
217
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
218
-
219
- /***/ }),
220
-
221
- /***/ 2657:
222
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
223
-
224
- "use strict";
225
-
226
-
227
- exports.__esModule = true;
228
- exports["default"] = void 0;
229
- var _classnames = _interopRequireDefault(__webpack_require__(6942));
230
- var _react = _interopRequireDefault(__webpack_require__(9206));
231
- var _styles = _interopRequireDefault(__webpack_require__(4939));
232
- var _jsxRuntime = __webpack_require__(4848);
233
- const _excluded = ["children", "type", "className", "style", "fontWeight", "lineHeight"],
234
- _excluded2 = ["children", "type", "className", "style", "fontWeight", "lineHeight"];
235
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
236
- 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); }
237
- 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; }
238
- const CapLabel = _ref => {
239
- let {
240
- children,
241
- type = 'label1',
242
- className = '',
243
- style = {},
244
- fontWeight,
245
- lineHeight
246
- } = _ref,
247
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
248
- const labelStyle = _extends({}, fontWeight ? {
249
- fontWeight
250
- } : {}, lineHeight ? {
251
- lineHeight
252
- } : {}, style);
253
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _extends({
254
- className: (0, _classnames.default)(_styles.default['cap-label'], _styles.default['cap-label-div'], _styles.default[type], className),
255
- style: labelStyle
256
- }, rest, {
257
- children: children
258
- }));
259
- };
260
-
261
- // Static method for inline label
262
-
263
- const CapLabelInline = _ref2 => {
264
- let {
265
- children,
266
- type = 'label1',
267
- className = '',
268
- style = {},
269
- fontWeight,
270
- lineHeight
271
- } = _ref2,
272
- rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
273
- const labelStyle = _extends({}, fontWeight ? {
274
- fontWeight
275
- } : {}, lineHeight ? {
276
- lineHeight
277
- } : {}, style);
278
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _extends({
279
- className: (0, _classnames.default)(_styles.default['cap-label'], _styles.default['cap-label-span'], _styles.default[type], className),
280
- style: labelStyle
281
- }, rest, {
282
- children: children
283
- }));
284
- };
285
-
286
- // Extend the component type to include the static property
287
-
288
- const CapLabelWithStatic = CapLabel;
289
- CapLabelWithStatic.CapLabelInline = CapLabelInline;
290
- var _default = exports["default"] = CapLabelWithStatic;
291
-
292
- /***/ }),
293
-
294
- /***/ 3737:
295
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
296
-
297
- "use strict";
298
-
299
-
300
- exports.__esModule = true;
301
- exports["default"] = void 0;
302
- var _CapLabel = _interopRequireDefault(__webpack_require__(2657));
303
- exports["default"] = _CapLabel.default;
304
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
305
-
306
- /***/ }),
307
-
308
- /***/ 3837:
100
+ /***/ 480:
309
101
  /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
310
102
 
311
103
  "use strict";
312
104
 
313
105
 
314
106
  exports.__esModule = true;
315
- exports["default"] = void 0;
316
- var _antdV = __webpack_require__(4273);
317
- var _classnames = _interopRequireDefault(__webpack_require__(6942));
318
- var _react = _interopRequireDefault(__webpack_require__(9206));
319
- var _styles = _interopRequireDefault(__webpack_require__(5765));
320
- var _jsxRuntime = __webpack_require__(4848);
321
- const _excluded = ["children", "className", "style", "justify", "align", "gutter", "wrap", "width", "height", "margin", "padding", "fullWidth", "fullHeight", "fillSpace", "responsive", "vertical", "noWrap", "gap"];
322
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
323
- 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); }
324
- 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; }
325
- const CapRow = _ref => {
107
+ exports.useCapUnifiedSelect = void 0;
108
+ var _react = __webpack_require__(9206);
109
+ var _constants = __webpack_require__(9788);
110
+ var _utils = __webpack_require__(8052);
111
+ const useCapUnifiedSelect = _ref => {
326
112
  let {
327
- children,
328
- className = '',
329
- style = {},
330
- justify = 'start',
331
- align = 'top',
332
- gutter = 0,
333
- wrap = true,
334
- width,
335
- height,
336
- margin,
337
- padding,
338
- fullWidth = false,
339
- fullHeight = false,
340
- fillSpace = false,
341
- responsive = true,
342
- vertical: _vertical = false,
343
- noWrap = false,
344
- gap = null
345
- } = _ref,
346
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
347
- // Use either the gap property or gutter for spacing
348
- const gutterValue = gap !== null ? null : gutter;
349
- const wrapValue = noWrap ? false : wrap;
350
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Row, _extends({
351
- className: (0, _classnames.default)(_styles.default['cap-row-v2'], {
352
- [_styles.default['with-custom-width']]: width,
353
- [_styles.default['with-custom-height']]: height,
354
- [_styles.default['fill-space']]: fillSpace,
355
- [_styles.default['full-width']]: fullWidth,
356
- [_styles.default['full-height']]: fullHeight,
357
- [_styles.default['ant-row-no-wrap']]: noWrap,
358
- [_styles.default['with-gap']]: gap !== null
359
- }, className),
360
- style: _extends({}, gap !== null ? {
361
- gap: typeof gap === 'number' ? gap + "px" : Array.isArray(gap) ? gap.map(g => g + "px").join(' ') : gap
362
- } : {}, width ? {
363
- width: typeof width === 'number' ? width + "px" : width
364
- } : {}, height ? {
365
- height: typeof height === 'number' ? height + "px" : height
366
- } : {}, margin ? {
367
- margin: typeof margin === 'number' ? margin + "px" : margin
368
- } : {}, padding ? {
369
- padding: typeof padding === 'number' ? padding + "px" : padding
370
- } : {}, fullWidth ? {
371
- width: '100%'
372
- } : {}, fullHeight ? {
373
- height: '100%'
374
- } : {}, !responsive ? {
375
- display: 'flex',
376
- flexWrap: wrapValue ? 'wrap' : 'nowrap'
377
- } : {}, fillSpace ? {
378
- flex: 1
379
- } : {}, style),
380
- justify: justify,
381
- align: align,
382
- gutter: gutterValue,
383
- wrap: wrapValue
384
- }, rest, {
385
- children: children
386
- }));
387
- };
388
- var _default = exports["default"] = CapRow;
389
-
390
- /***/ }),
391
-
392
- /***/ 3883:
393
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
394
-
395
- // Imports
396
- var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
397
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
398
- var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
399
- // Module
400
- ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-tooltip-with-info{display:inline-flex;align-items:center;cursor:default}.blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon{color:#b3bac5;margin-left:.286rem;cursor:help}.blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon:hover{color:#dfe2e7}`, ""]);
401
- // Exports
402
- ___CSS_LOADER_EXPORT___.locals = {
403
- "cap-tooltip-with-info": `blaze-ui-cap-tooltip-with-info`,
404
- "cap-tooltip-with-info-icon": `blaze-ui-cap-tooltip-with-info-icon`
405
- };
406
- module.exports = ___CSS_LOADER_EXPORT___;
407
-
408
-
409
- /***/ }),
410
-
411
- /***/ 3948:
412
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
413
-
414
- "use strict";
415
- __webpack_require__.r(__webpack_exports__);
416
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
417
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
418
- /* harmony export */ });
419
- /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
420
- /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
421
- /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
422
- /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
423
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
424
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
425
- /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
426
- /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
427
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
428
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
429
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3883);
430
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
431
- /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
432
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
433
- /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
434
-
435
-
436
-
437
-
438
-
439
-
440
-
441
-
442
-
443
-
444
-
445
- var options = {};
446
-
447
- ;
448
- options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
449
- options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
450
- options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
451
- options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
452
-
453
- var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
454
-
455
-
456
-
457
-
458
- /* 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);
459
-
460
-
461
- /***/ }),
462
-
463
- /***/ 4273:
464
- /***/ ((module) => {
465
-
466
- "use strict";
467
- module.exports = require("antd-v5");
468
-
469
- /***/ }),
470
-
471
- /***/ 4284:
472
- /***/ ((module) => {
473
-
474
- "use strict";
475
-
476
-
477
- /* istanbul ignore next */
478
- var replaceText = function replaceText() {
479
- var textStore = [];
480
- return function replace(index, replacement) {
481
- textStore[index] = replacement;
482
- return textStore.filter(Boolean).join("\n");
483
- };
484
- }();
485
-
486
- /* istanbul ignore next */
487
- function apply(styleElement, index, remove, obj) {
488
- var css;
489
- if (remove) {
490
- css = "";
491
- } else {
492
- css = "";
493
- if (obj.supports) {
494
- css += "@supports (".concat(obj.supports, ") {");
495
- }
496
- if (obj.media) {
497
- css += "@media ".concat(obj.media, " {");
498
- }
499
- var needLayer = typeof obj.layer !== "undefined";
500
- if (needLayer) {
501
- css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
113
+ type: _type,
114
+ options,
115
+ value,
116
+ onChange,
117
+ staticValue,
118
+ onSearch,
119
+ searchDebounce,
120
+ searchBasedOn,
121
+ onConfirm,
122
+ resetSearch,
123
+ resetData,
124
+ fetchMissingOptions,
125
+ onPopupScroll,
126
+ hasMore,
127
+ customPopupRender,
128
+ isMulti,
129
+ disabled = false
130
+ } = _ref;
131
+ const [searchText, setSearchText] = (0, _react.useState)('');
132
+ const [tempValue, setTempValue] = (0, _react.useState)(value);
133
+ const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
134
+ const [isSearching, setIsSearching] = (0, _react.useState)(false);
135
+ const [isLoadingOnScroll, setIsLoadingOnScroll] = (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 scrollContainerRef = (0, _react.useRef)(null);
140
+ const scrollLoadingTimeoutRef = (0, _react.useRef)(null);
141
+ const isScrollProcessingRef = (0, _react.useRef)(false);
142
+ const scrollThrottleTimeoutRef = (0, _react.useRef)(null);
143
+ const optionsRef = (0, _react.useRef)(options);
144
+ const selectedItemsCacheRef = (0, _react.useRef)(new Map());
145
+ const lastSearchQueryRef = (0, _react.useRef)('');
146
+ const searchClearedTimeRef = (0, _react.useRef)(null);
147
+ const prevOptionsRef = (0, _react.useRef)(options);
148
+ const prevOptionsBeforeResetRef = (0, _react.useRef)(options);
149
+ const prevOptionsCountRef = (0, _react.useRef)(options.length);
150
+ const prevOptionsRefForScroll = (0, _react.useRef)(options);
151
+ const scrollTriggerOptionsCountRef = (0, _react.useRef)(options.length);
152
+ const initialSortDoneRef = (0, _react.useRef)(false);
153
+ const hasInteractedRef = (0, _react.useRef)(false);
154
+ const initialTempValueRef = (0, _react.useRef)(value);
155
+ const resetDataCalledRef = (0, _react.useRef)(false);
156
+ const resetDataCalledTimeRef = (0, _react.useRef)(null);
157
+ const fetchMissingOptionsCalledRef = (0, _react.useRef)(false);
158
+ const lastMissingValuesRef = (0, _react.useRef)('');
159
+ (0, _react.useEffect)(() => {
160
+ if (!fetchMissingOptions) {
161
+ return;
502
162
  }
503
- css += obj.css;
504
- if (needLayer) {
505
- css += "}";
163
+ if (options.length === 0) {
164
+ return;
506
165
  }
507
- if (obj.media) {
508
- css += "}";
166
+ const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
167
+ if (hasActiveSearch) {
168
+ return;
509
169
  }
510
- if (obj.supports) {
511
- css += "}";
170
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
171
+ if (selectedValues.length === 0) {
172
+ fetchMissingOptionsCalledRef.current = false;
173
+ lastMissingValuesRef.current = '';
174
+ return;
512
175
  }
513
- }
514
-
515
- // For old IE
516
- /* istanbul ignore if */
517
- if (styleElement.styleSheet) {
518
- styleElement.styleSheet.cssText = replaceText(index, css);
519
- } else {
520
- var cssNode = document.createTextNode(css);
521
- var childNodes = styleElement.childNodes;
522
- if (childNodes[index]) {
523
- styleElement.removeChild(childNodes[index]);
176
+ const missingValues = (0, _utils.findMissingValues)(selectedValues, options);
177
+ if (missingValues.length === 0) {
178
+ fetchMissingOptionsCalledRef.current = false;
179
+ lastMissingValuesRef.current = '';
180
+ return;
524
181
  }
525
- if (childNodes.length) {
526
- styleElement.insertBefore(cssNode, childNodes[index]);
527
- } else {
528
- styleElement.appendChild(cssNode);
182
+ const missingValuesKey = [...missingValues].sort().join(',');
183
+ if (!fetchMissingOptionsCalledRef.current || lastMissingValuesRef.current !== missingValuesKey) {
184
+ fetchMissingOptionsCalledRef.current = true;
185
+ lastMissingValuesRef.current = missingValuesKey;
186
+ fetchMissingOptions([...missingValues]);
529
187
  }
530
- }
531
- }
532
- var singletonData = {
533
- singleton: null,
534
- singletonCounter: 0
535
- };
536
-
537
- /* istanbul ignore next */
538
- function domAPI(options) {
539
- if (typeof document === "undefined") return {
540
- update: function update() {},
541
- remove: function remove() {}
542
- };
543
-
544
- // eslint-disable-next-line no-undef,no-use-before-define
545
- var styleIndex = singletonData.singletonCounter++;
546
- var styleElement =
547
- // eslint-disable-next-line no-undef,no-use-before-define
548
- singletonData.singleton || (
549
- // eslint-disable-next-line no-undef,no-use-before-define
550
- singletonData.singleton = options.insertStyleElement(options));
551
- return {
552
- update: function update(obj) {
553
- apply(styleElement, styleIndex, false, obj);
554
- },
555
- remove: function remove(obj) {
556
- apply(styleElement, styleIndex, true, obj);
188
+ }, [value, options, fetchMissingOptions, staticValue]);
189
+ (0, _react.useEffect)(() => {
190
+ 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;
191
+ if (!isEqual) {
192
+ setTempValue(value);
193
+ setOrderedOptions(null);
557
194
  }
558
- };
559
- }
560
- module.exports = domAPI;
561
-
562
- /***/ }),
563
-
564
- /***/ 4299:
565
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
566
-
567
- "use strict";
568
-
569
-
570
- exports.__esModule = true;
571
- exports["default"] = void 0;
572
- var _classnames = _interopRequireDefault(__webpack_require__(6942));
573
- var _react = _interopRequireDefault(__webpack_require__(9206));
574
- var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
575
- var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
576
- var _styles = _interopRequireDefault(__webpack_require__(3948));
577
- var _jsxRuntime = __webpack_require__(4848);
578
- const _excluded = ["title", "iconSize", "iconType", "placement", "trigger", "className", "tooltipProps", "iconProps"];
579
- /**
580
- * CapTooltipWithInfo - A component that combines an info icon with a tooltip
581
- * for displaying additional information on hover or other trigger events.
582
- */
583
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
584
- 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); }
585
- 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; }
586
- const CapTooltipWithInfo = _ref => {
587
- let {
588
- title,
589
- iconSize = 's',
590
- iconType = 'info-circle',
591
- placement = 'top',
592
- trigger = 'hover',
593
- className = '',
594
- tooltipProps = {},
595
- iconProps = {}
596
- } = _ref,
597
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
598
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _extends({
599
- className: (0, _classnames.default)(_styles.default['cap-tooltip-with-info'], className)
600
- }, rest, {
601
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltip.default, _extends({
602
- title: title,
603
- placement: placement,
604
- trigger: trigger
605
- }, tooltipProps, {
606
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
607
- className: _styles.default['cap-tooltip-with-info-icon'],
608
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, _extends({
609
- type: iconType,
610
- size: iconSize
611
- }, iconProps))
612
- })
613
- }))
614
- }));
615
- };
616
- var _default = exports["default"] = CapTooltipWithInfo;
617
-
618
- /***/ }),
619
-
620
- /***/ 4627:
621
- /***/ ((module) => {
622
-
623
- "use strict";
624
- module.exports = require("@ant-design-v5/icons");
625
-
626
- /***/ }),
627
-
628
- /***/ 4848:
629
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
630
-
631
- "use strict";
632
-
633
-
634
- if (true) {
635
- module.exports = __webpack_require__(1020);
636
- } else // removed by dead control flow
637
- {}
638
-
639
-
640
- /***/ }),
641
-
642
- /***/ 4939:
643
- /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
644
-
645
- "use strict";
646
- __webpack_require__.r(__webpack_exports__);
647
- /* harmony export */ __webpack_require__.d(__webpack_exports__, {
648
- /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
649
- /* harmony export */ });
650
- /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
651
- /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
652
- /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
653
- /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
654
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
655
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
656
- /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
657
- /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
658
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
659
- /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
660
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5216);
661
- /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
662
- /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
663
- /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
664
- /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
665
-
666
-
667
-
668
-
669
-
670
-
671
-
672
-
673
-
674
-
675
-
676
- var options = {};
677
-
678
- ;
679
- options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
680
- options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
681
- options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
682
- options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
683
-
684
- var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
685
-
686
-
687
-
688
-
689
- /* 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);
690
-
691
-
692
- /***/ }),
693
-
694
- /***/ 5056:
695
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
696
-
697
- "use strict";
698
-
699
-
700
- /* istanbul ignore next */
701
- function setAttributesWithoutAttributes(styleElement) {
702
- var nonce = true ? __webpack_require__.nc : 0;
703
- if (nonce) {
704
- styleElement.setAttribute("nonce", nonce);
705
- }
706
- }
707
- module.exports = setAttributesWithoutAttributes;
708
-
709
- /***/ }),
710
-
711
- /***/ 5072:
712
- /***/ ((module) => {
713
-
714
- "use strict";
715
-
716
-
717
- var stylesInDOM = [];
718
- function getIndexByIdentifier(identifier) {
719
- var result = -1;
720
- for (var i = 0; i < stylesInDOM.length; i++) {
721
- if (stylesInDOM[i].identifier === identifier) {
722
- result = i;
723
- break;
724
- }
725
- }
726
- return result;
727
- }
728
- function modulesToDom(list, options) {
729
- var idCountMap = {};
730
- var identifiers = [];
731
- for (var i = 0; i < list.length; i++) {
732
- var item = list[i];
733
- var id = options.base ? item[0] + options.base : item[0];
734
- var count = idCountMap[id] || 0;
735
- var identifier = "".concat(id, " ").concat(count);
736
- idCountMap[id] = count + 1;
737
- var indexByIdentifier = getIndexByIdentifier(identifier);
738
- var obj = {
739
- css: item[1],
740
- media: item[2],
741
- sourceMap: item[3],
742
- supports: item[4],
743
- layer: item[5]
195
+ // eslint-disable-next-line react-hooks/exhaustive-deps
196
+ }, [value]);
197
+ (0, _react.useEffect)(() => {
198
+ const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
199
+ const findAndCacheOption = (opts, val) => {
200
+ for (const opt of opts) {
201
+ if (opt.value === val) {
202
+ selectedItemsCacheRef.current.set(val, opt);
203
+ return true;
204
+ }
205
+ if (opt.children && opt.children.length > 0) {
206
+ if (findAndCacheOption(opt.children, val)) {
207
+ return true;
208
+ }
209
+ }
210
+ }
211
+ return false;
744
212
  };
745
- if (indexByIdentifier !== -1) {
746
- stylesInDOM[indexByIdentifier].references++;
747
- stylesInDOM[indexByIdentifier].updater(obj);
748
- } else {
749
- var updater = addElementStyle(obj, options);
750
- options.byIndex = i;
751
- stylesInDOM.splice(i, 0, {
752
- identifier: identifier,
753
- updater: updater,
754
- references: 1
755
- });
756
- }
757
- identifiers.push(identifier);
758
- }
759
- return identifiers;
760
- }
761
- function addElementStyle(obj, options) {
762
- var api = options.domAPI(options);
763
- api.update(obj);
764
- var updater = function updater(newObj) {
765
- if (newObj) {
766
- if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
767
- return;
213
+ currentSelected.forEach(val => {
214
+ if (!selectedItemsCacheRef.current.has(val)) {
215
+ findAndCacheOption(options, val);
768
216
  }
769
- api.update(obj = newObj);
770
- } else {
771
- api.remove();
772
- }
773
- };
774
- return updater;
775
- }
776
- module.exports = function (list, options) {
777
- options = options || {};
778
- list = list || [];
779
- var lastIdentifiers = modulesToDom(list, options);
780
- return function update(newList) {
781
- newList = newList || [];
782
- for (var i = 0; i < lastIdentifiers.length; i++) {
783
- var identifier = lastIdentifiers[i];
784
- var index = getIndexByIdentifier(identifier);
785
- stylesInDOM[index].references--;
786
- }
787
- var newLastIdentifiers = modulesToDom(newList, options);
788
- for (var _i = 0; _i < lastIdentifiers.length; _i++) {
789
- var _identifier = lastIdentifiers[_i];
790
- var _index = getIndexByIdentifier(_identifier);
791
- if (stylesInDOM[_index].references === 0) {
792
- stylesInDOM[_index].updater();
793
- stylesInDOM.splice(_index, 1);
794
- }
795
- }
796
- lastIdentifiers = newLastIdentifiers;
797
- };
798
- };
799
-
800
- /***/ }),
801
-
802
- /***/ 5216:
803
- /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
804
-
805
- // Imports
806
- var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
807
- var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
808
- var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
809
- // Module
810
- ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-label{font-family:"Roboto",sans-serif}.blaze-ui-cap-label.blaze-ui-label1{font-size:.857rem;color:#5e6c84;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label2{font-size:.857rem;color:#091e42;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label3{font-size:.857rem;color:#97a0af;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label4{font-size:.857rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label5{font-size:.714rem;color:#091e42;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label6{font-size:.857rem;color:#b3bac5;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label7{font-size:1rem;color:#5e6c84;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label8{font-size:.857rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label9{font-size:.857rem;color:#091e42;font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label10{font-size:.857rem;color:#fff;font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label11{font-size:.714rem;color:#5e6c84;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label12{font-size:.857rem;color:#fff;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label13{font-size:.714rem;color:#97a0af;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label14{font-size:1rem;color:#676e7c;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label15{font-size:1rem;color:#091e42;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label16{font-size:1rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label17{font-size:1.143rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label18{font-size:1rem;color:#5e6c84;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label19{font-size:.857rem;color:rgba(0,0,0,.8705882353);font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label20{font-size:1rem;color:#2466eb;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label21{font-size:.857rem;color:#2466eb;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label22{font-size:1.714rem;color:#5e6c84;font-weight:400;line-height:2rem}.blaze-ui-cap-label.blaze-ui-label23{font-size:1rem;color:#fff;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label24{font-size:1rem;color:#5e6c84;font-weight:400;line-height:1.429rem}.blaze-ui-cap-label.blaze-ui-label25{font-size:1rem;color:#5e6c84;font-weight:500;line-height:1.429rem}.blaze-ui-cap-label.blaze-ui-label26{font-size:.714rem;color:#091e42;font-weight:400;line-height:.857rem}.blaze-ui-cap-label.blaze-ui-label27{font-size:.857rem;color:#2466eb;font-weight:500;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label28{font-size:.857rem;color:#fff;font-weight:500;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label29,.blaze-ui-cap-label.blaze-ui-label30{font-size:.714rem;color:#fff;font-weight:400;line-height:.857rem}.blaze-ui-cap-label.blaze-ui-label31{font-size:.857rem;color:#091e42;font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label32{font-size:1rem;color:#fff;font-weight:500;line-height:1.429rem}.blaze-ui-cap-label.blaze-ui-label33{font-size:1rem;color:#2466eb;font-weight:500;line-height:1.429rem}.blaze-ui-cap-label-div,.blaze-ui-cap-label-span{font-family:"Roboto",sans-serif;margin:0;padding:0}`, ""]);
811
- // Exports
812
- ___CSS_LOADER_EXPORT___.locals = {
813
- "cap-label": `blaze-ui-cap-label`,
814
- "label1": `blaze-ui-label1`,
815
- "label2": `blaze-ui-label2`,
816
- "label3": `blaze-ui-label3`,
817
- "label4": `blaze-ui-label4`,
818
- "label5": `blaze-ui-label5`,
819
- "label6": `blaze-ui-label6`,
820
- "label7": `blaze-ui-label7`,
821
- "label8": `blaze-ui-label8`,
822
- "label9": `blaze-ui-label9`,
823
- "label10": `blaze-ui-label10`,
824
- "label11": `blaze-ui-label11`,
825
- "label12": `blaze-ui-label12`,
826
- "label13": `blaze-ui-label13`,
827
- "label14": `blaze-ui-label14`,
828
- "label15": `blaze-ui-label15`,
829
- "label16": `blaze-ui-label16`,
830
- "label17": `blaze-ui-label17`,
831
- "label18": `blaze-ui-label18`,
832
- "label19": `blaze-ui-label19`,
833
- "label20": `blaze-ui-label20`,
834
- "label21": `blaze-ui-label21`,
835
- "label22": `blaze-ui-label22`,
836
- "label23": `blaze-ui-label23`,
837
- "label24": `blaze-ui-label24`,
838
- "label25": `blaze-ui-label25`,
839
- "label26": `blaze-ui-label26`,
840
- "label27": `blaze-ui-label27`,
841
- "label28": `blaze-ui-label28`,
842
- "label29": `blaze-ui-label29`,
843
- "label30": `blaze-ui-label30`,
844
- "label31": `blaze-ui-label31`,
845
- "label32": `blaze-ui-label32`,
846
- "label33": `blaze-ui-label33`,
847
- "cap-label-div": `blaze-ui-cap-label-div`,
848
- "cap-label-span": `blaze-ui-cap-label-span`
849
- };
850
- module.exports = ___CSS_LOADER_EXPORT___;
851
-
852
-
853
- /***/ }),
854
-
855
- /***/ 5353:
856
- /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
857
-
858
- "use strict";
859
-
860
-
861
- exports.__esModule = true;
862
- exports["default"] = void 0;
863
- var _antdV = __webpack_require__(4273);
864
- var _classnames = _interopRequireDefault(__webpack_require__(6942));
865
- var _react = _interopRequireWildcard(__webpack_require__(9206));
866
- var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
867
- var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
868
- var _CapRow = _interopRequireDefault(__webpack_require__(7375));
869
- var _CapSpin = _interopRequireDefault(__webpack_require__(1549));
870
- var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
871
- var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
872
- var _components = __webpack_require__(455);
873
- var _constants = __webpack_require__(9788);
874
- var _styles = _interopRequireDefault(__webpack_require__(8263));
875
- var _utils = __webpack_require__(8052);
876
- var _jsxRuntime = __webpack_require__(4848);
877
- 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"];
878
- 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); }
879
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
880
- 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); }
881
- 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; }
882
- const CapUnifiedSelect = _ref => {
883
- let {
884
- type = _constants.SELECT_TYPES.SELECT,
885
- options = [],
886
- value,
887
- onChange,
888
- placeholder = _constants.DEFAULTS.PLACEHOLDER,
889
- className = '',
890
- style,
891
- isError = false,
892
- errorMessage,
893
- containerClassName,
894
- popoverClassName,
895
- allowClear = false,
896
- headerLabel,
897
- onUpload,
898
- uploadLabel = _constants.DEFAULTS.UPLOAD_LABEL,
899
- tooltip,
900
- bylineText,
901
- disabled = false,
902
- showUpload = false,
903
- customPopupRender = true,
904
- showSearch = true,
905
- searchBasedOn = 'label',
906
- onSearch,
907
- searchDebounce = _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE,
908
- onConfirm,
909
- clearText = _constants.DEFAULTS.CLEAR_TEXT,
910
- noResultCustomText = _constants.DEFAULTS.NO_RESULT_TEXT,
911
- noResultCustomIcon = _constants.DEFAULTS.NO_RESULT_ICON,
912
- readOnly = false,
913
- staticValue = true,
914
- onFooterDownloadChange,
915
- onPopupScroll,
916
- hasMore = true,
917
- enableVirtualization = false,
918
- virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
919
- resetSearch = true,
920
- resetData,
921
- fetchMissingOptions
922
- } = _ref,
923
- rest = _objectWithoutPropertiesLoose(_ref, _excluded);
924
- const [searchText, setSearchText] = (0, _react.useState)('');
925
- const [tempValue, setTempValue] = (0, _react.useState)(value);
926
- const [dropdownOpen, setDropdownOpen] = (0, _react.useState)(false);
927
- const [isSearching, setIsSearching] = (0, _react.useState)(false);
928
- const [isLoadingOnScroll, setIsLoadingOnScroll] = (0, _react.useState)(false);
929
- const [isResettingData, setIsResettingData] = (0, _react.useState)(false);
930
- const [orderedOptions, setOrderedOptions] = (0, _react.useState)(null);
931
- const searchTimeoutRef = (0, _react.useRef)(null);
932
- const scrollContainerRef = (0, _react.useRef)(null);
933
- const scrollLoadingTimeoutRef = (0, _react.useRef)(null);
934
- const isScrollProcessingRef = (0, _react.useRef)(false);
935
- const scrollThrottleTimeoutRef = (0, _react.useRef)(null);
936
- const optionsRef = (0, _react.useRef)(options);
937
- const selectedItemsCacheRef = (0, _react.useRef)(new Map());
938
- const lastSearchQueryRef = (0, _react.useRef)('');
939
- const searchClearedTimeRef = (0, _react.useRef)(null);
940
- const prevOptionsRef = (0, _react.useRef)(options);
941
- const prevOptionsBeforeResetRef = (0, _react.useRef)(options);
942
- const prevOptionsCountRef = (0, _react.useRef)(options.length);
943
- const prevOptionsRefForScroll = (0, _react.useRef)(options);
944
- const scrollTriggerOptionsCountRef = (0, _react.useRef)(options.length);
945
- const initialSortDoneRef = (0, _react.useRef)(false);
946
- const hasInteractedRef = (0, _react.useRef)(false);
947
- const initialTempValueRef = (0, _react.useRef)(value);
948
- const resetDataCalledRef = (0, _react.useRef)(false);
949
- const resetDataCalledTimeRef = (0, _react.useRef)(null);
950
- const fetchMissingOptionsCalledRef = (0, _react.useRef)(false);
951
- const lastMissingValuesRef = (0, _react.useRef)('');
952
- (0, _react.useEffect)(() => {
953
- if (!fetchMissingOptions) {
954
- return;
955
- }
956
- if (options.length === 0) {
957
- return;
958
- }
959
-
960
- // For API-driven data, don't fetch missing options during active search
961
- // Only fetch when there's no search query or search is cleared
962
- const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
963
- if (hasActiveSearch) {
964
- return;
965
- }
966
- const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
967
- if (selectedValues.length === 0) {
968
- fetchMissingOptionsCalledRef.current = false;
969
- lastMissingValuesRef.current = '';
970
- return;
971
- }
972
- const missingValues = (0, _utils.findMissingValues)(selectedValues, options);
973
- if (missingValues.length === 0) {
974
- fetchMissingOptionsCalledRef.current = false;
975
- lastMissingValuesRef.current = '';
976
- return;
977
- }
978
- const missingValuesKey = [...missingValues].sort().join(',');
979
- if (!fetchMissingOptionsCalledRef.current || lastMissingValuesRef.current !== missingValuesKey) {
980
- fetchMissingOptionsCalledRef.current = true;
981
- lastMissingValuesRef.current = missingValuesKey;
982
- fetchMissingOptions([...missingValues]);
983
- }
984
- }, [value, options, fetchMissingOptions, staticValue]);
985
- (0, _react.useEffect)(() => {
986
- 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;
987
- if (!isEqual) {
988
- setTempValue(value);
989
- setOrderedOptions(null);
990
- }
991
- // eslint-disable-next-line react-hooks/exhaustive-deps
992
- }, [value]);
993
- (0, _react.useEffect)(() => {
994
- const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
995
- const findAndCacheOption = (opts, val) => {
996
- for (const opt of opts) {
997
- if (opt.value === val) {
998
- selectedItemsCacheRef.current.set(val, opt);
999
- return true;
1000
- }
1001
- if (opt.children && opt.children.length > 0) {
1002
- if (findAndCacheOption(opt.children, val)) {
1003
- return true;
1004
- }
1005
- }
1006
- }
1007
- return false;
1008
- };
1009
- currentSelected.forEach(val => {
1010
- if (!selectedItemsCacheRef.current.has(val)) {
1011
- findAndCacheOption(options, val);
1012
- }
1013
- });
1014
- const selectedSet = new Set(currentSelected);
1015
- selectedItemsCacheRef.current.forEach((_, value) => {
1016
- if (!selectedSet.has(value)) {
1017
- selectedItemsCacheRef.current.delete(value);
217
+ });
218
+ const selectedSet = new Set(currentSelected);
219
+ selectedItemsCacheRef.current.forEach((_, value) => {
220
+ if (!selectedSet.has(value)) {
221
+ selectedItemsCacheRef.current.delete(value);
1018
222
  }
1019
223
  });
1020
224
  }, [tempValue, options]);
1021
225
  (0, _react.useEffect)(() => {
1022
226
  if (orderedOptions) {
1023
227
  const currentSelected = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
1024
- const checkValueExists = (opts, val) => {
1025
- for (const opt of opts) {
1026
- if (opt.value === val) return true;
1027
- if (opt.children && opt.children.length > 0) {
1028
- if (checkValueExists(opt.children, val)) return true;
1029
- }
1030
- }
1031
- return false;
1032
- };
1033
- const allSelectedStillExist = currentSelected.every(val => checkValueExists(options, val));
228
+ const allSelectedStillExist = currentSelected.every(val => (0, _utils.findValueInOptions)(options, val));
1034
229
  if (!allSelectedStillExist) {
1035
230
  setOrderedOptions(null);
1036
231
  }
@@ -1196,710 +391,1479 @@ const CapUnifiedSelect = _ref => {
1196
391
  }, _constants.TIMEOUTS.STATIC_SEARCH_DELAY);
1197
392
  }
1198
393
  }, [onSearch, staticValue, debounceTimeout]);
1199
- const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
1200
- const isTree = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
1201
- const mergedOptions = (0, _react.useMemo)(() => {
1202
- return options;
1203
- }, [options]);
1204
394
  const prevOptionsCountBeforeFetchMissingRef = (0, _react.useRef)(options.length);
1205
395
  const prevOptionsBeforeFetchMissingRef = (0, _react.useRef)(options);
1206
396
  (0, _react.useEffect)(() => {
1207
397
  if (!orderedOptions || !onPopupScroll) {
1208
398
  return;
1209
399
  }
1210
- const currentOptions = options;
1211
- const optionsCountIncreased = currentOptions.length > scrollTriggerOptionsCountRef.current;
1212
- if (optionsCountIncreased && scrollTriggerOptionsCountRef.current > 0) {
1213
- const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
1214
- if (selectedValues.length > 0) {
1215
- const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
1216
- setOrderedOptions(reordered);
1217
- scrollTriggerOptionsCountRef.current = currentOptions.length;
1218
- }
400
+ const currentOptions = options;
401
+ const optionsCountIncreased = currentOptions.length > scrollTriggerOptionsCountRef.current;
402
+ if (optionsCountIncreased && scrollTriggerOptionsCountRef.current > 0) {
403
+ const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
404
+ if (selectedValues.length > 0) {
405
+ const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
406
+ setOrderedOptions(reordered);
407
+ scrollTriggerOptionsCountRef.current = currentOptions.length;
408
+ }
409
+ }
410
+ }, [options, orderedOptions, onPopupScroll, tempValue]);
411
+ (0, _react.useEffect)(() => {
412
+ if (!fetchMissingOptions) {
413
+ prevOptionsCountBeforeFetchMissingRef.current = options.length;
414
+ prevOptionsBeforeFetchMissingRef.current = options;
415
+ return;
416
+ }
417
+ const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
418
+ if (hasActiveSearch) {
419
+ return;
420
+ }
421
+ const currentOptions = options;
422
+ const currentSelectedValues = Array.isArray(value) ? value : value ? [value] : [];
423
+ const tempSelectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
424
+ const selectedValues = tempSelectedValues.length > 0 ? tempSelectedValues : currentSelectedValues;
425
+ if (selectedValues.length === 0) {
426
+ prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
427
+ prevOptionsBeforeFetchMissingRef.current = currentOptions;
428
+ return;
429
+ }
430
+ const prevOptions = prevOptionsBeforeFetchMissingRef.current;
431
+ const optionsCountIncreased = currentOptions.length > prevOptionsCountBeforeFetchMissingRef.current;
432
+ const optionsChanged = prevOptions !== currentOptions || optionsCountIncreased;
433
+ const hasNewlyFetchedSelectedItems = (() => {
434
+ if (selectedValues.length === 0 || !optionsChanged) {
435
+ return false;
436
+ }
437
+ const previouslyMissingValues = selectedValues.filter(val => !(0, _utils.findValueInOptions)(prevOptions, val));
438
+ if (previouslyMissingValues.length === 0) {
439
+ return false;
440
+ }
441
+ const nowPresentValues = previouslyMissingValues.filter(val => (0, _utils.findValueInOptions)(currentOptions, val));
442
+ return nowPresentValues.length > 0;
443
+ })();
444
+ if (optionsChanged && hasNewlyFetchedSelectedItems) {
445
+ const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
446
+ setOrderedOptions(reordered);
447
+ }
448
+ prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
449
+ prevOptionsBeforeFetchMissingRef.current = currentOptions;
450
+ }, [options, value, tempValue, fetchMissingOptions, staticValue]);
451
+ (0, _react.useEffect)(() => {
452
+ if (initialSortDoneRef.current || !(options != null && options.length)) {
453
+ return;
454
+ }
455
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
456
+ if (selectedValues.length === 0) {
457
+ initialSortDoneRef.current = true;
458
+ return;
459
+ }
460
+ const hasSelectedInOptions = selectedValues.some(val => (0, _utils.findValueInOptions)(options, val));
461
+ if (hasSelectedInOptions) {
462
+ const reordered = (0, _utils.reorderOptionsBySelection)(options, selectedValues);
463
+ setOrderedOptions(reordered);
464
+ }
465
+ initialSortDoneRef.current = true;
466
+ }, [options, value]);
467
+
468
+ // Data source computation (raw, without React component enhancement)
469
+ const dataSource = (0, _react.useMemo)(() => {
470
+ return (0, _utils.prepareDataSource)(options, orderedOptions, searchText, value, staticValue, selectedItemsCacheRef.current);
471
+ }, [options, orderedOptions, searchText, value, staticValue]);
472
+
473
+ // Filtered tree
474
+ const filteredTree = (0, _react.useMemo)(() => {
475
+ const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
476
+ return (0, _utils.filterTreeData)(dataSource, searchText.trim(), searchBasedOn, selectedValues.length > 0 ? selectedValues : undefined);
477
+ }, [dataSource, searchText, searchBasedOn, tempValue]);
478
+
479
+ // Tree maps and selected count
480
+ const treeMaps = (0, _react.useMemo)(() => (0, _utils.buildTreeMaps)(options), [options]);
481
+ const selectedLeafCount = (0, _react.useMemo)(() => (0, _utils.countSelectedLeaves)(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
482
+ const displayValue = dropdownOpen ? tempValue : value;
483
+ const handleConfirm = (0, _react.useCallback)(() => {
484
+ hasInteractedRef.current = true;
485
+ const optionsToReorder = options;
486
+ if (isMulti && Array.isArray(tempValue) && tempValue.length > 0) {
487
+ const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, tempValue);
488
+ setOrderedOptions(reordered);
489
+ } else if (!isMulti && tempValue && !Array.isArray(tempValue)) {
490
+ const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, [tempValue]);
491
+ setOrderedOptions(reordered);
492
+ } else {
493
+ setOrderedOptions(null);
494
+ }
495
+ onChange == null || onChange(tempValue);
496
+ setDropdownOpen(false);
497
+ setIsSearching(false);
498
+
499
+ // Check if there was an active search before clearing it
500
+ const hadActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
501
+
502
+ // Clear search-related state and timeouts (same as X button behavior)
503
+ if (resetSearch) {
504
+ setSearchText('');
505
+ if (hadActiveSearch) {
506
+ searchClearedTimeRef.current = Date.now();
507
+ } else {
508
+ searchClearedTimeRef.current = null;
509
+ }
510
+ lastSearchQueryRef.current = '';
511
+ }
512
+
513
+ // Clear any pending search timeouts
514
+ if (searchTimeoutRef.current) {
515
+ clearTimeout(searchTimeoutRef.current);
516
+ searchTimeoutRef.current = null;
517
+ }
518
+
519
+ // If there was an active search, trigger onSearch('') to reset data (same as X button)
520
+ // This ensures the parent component resets the options back to initial state
521
+ if (hadActiveSearch && !staticValue && onSearch) {
522
+ onSearch('');
523
+ }
524
+
525
+ // Call resetData if:
526
+ // 1. resetData is provided AND
527
+ // 2. (there was an active search that we're resetting OR options.length > 0)
528
+ // This ensures we reset data back to initial state after a search + confirm
529
+ if (resetData && (hadActiveSearch || options.length > 0)) {
530
+ prevOptionsBeforeResetRef.current = options;
531
+ setIsResettingData(true);
532
+ resetDataCalledRef.current = true;
533
+ resetDataCalledTimeRef.current = Date.now();
534
+ resetData();
535
+ }
536
+ onConfirm == null || onConfirm(tempValue);
537
+ }, [onChange, onConfirm, tempValue, resetSearch, isMulti, options, resetData, staticValue, onSearch]);
538
+ const handleClearAll = (0, _react.useCallback)(() => {
539
+ const cleared = isMulti ? [] : undefined;
540
+ setSearchText('');
541
+ setIsSearching(false);
542
+ lastSearchQueryRef.current = '';
543
+ searchClearedTimeRef.current = null;
544
+ if (searchTimeoutRef.current) {
545
+ clearTimeout(searchTimeoutRef.current);
546
+ searchTimeoutRef.current = null;
547
+ }
548
+ if (scrollLoadingTimeoutRef.current) {
549
+ clearTimeout(scrollLoadingTimeoutRef.current);
550
+ scrollLoadingTimeoutRef.current = null;
551
+ }
552
+ if (scrollThrottleTimeoutRef.current) {
553
+ clearTimeout(scrollThrottleTimeoutRef.current);
554
+ scrollThrottleTimeoutRef.current = null;
555
+ }
556
+ setIsLoadingOnScroll(false);
557
+ isScrollProcessingRef.current = false;
558
+ scrollContainerRef.current = null;
559
+ setOrderedOptions(null);
560
+ initialSortDoneRef.current = false;
561
+ hasInteractedRef.current = false;
562
+ resetDataCalledRef.current = false;
563
+ fetchMissingOptionsCalledRef.current = false;
564
+ lastMissingValuesRef.current = '';
565
+ setTempValue(cleared);
566
+ onChange == null || onChange(cleared);
567
+ setDropdownOpen(false);
568
+ if (resetData && options.length > 0) {
569
+ prevOptionsBeforeResetRef.current = options;
570
+ setIsResettingData(true);
571
+ resetDataCalledRef.current = true;
572
+ resetDataCalledTimeRef.current = Date.now();
573
+ resetData();
574
+ }
575
+ }, [isMulti, onChange, resetData, options]);
576
+ const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
577
+ if (open) {
578
+ initialTempValueRef.current = value;
579
+ hasInteractedRef.current = false;
580
+ resetDataCalledRef.current = false;
581
+ fetchMissingOptionsCalledRef.current = false;
582
+ lastMissingValuesRef.current = '';
583
+ if (searchTimeoutRef.current) {
584
+ clearTimeout(searchTimeoutRef.current);
585
+ searchTimeoutRef.current = null;
586
+ }
587
+ if (scrollLoadingTimeoutRef.current) {
588
+ clearTimeout(scrollLoadingTimeoutRef.current);
589
+ scrollLoadingTimeoutRef.current = null;
590
+ }
591
+ if (scrollThrottleTimeoutRef.current) {
592
+ clearTimeout(scrollThrottleTimeoutRef.current);
593
+ scrollThrottleTimeoutRef.current = null;
594
+ }
595
+ setIsSearching(false);
596
+ searchClearedTimeRef.current = null;
597
+ setIsLoadingOnScroll(false);
598
+ isScrollProcessingRef.current = false;
599
+ if (isResettingData) {
600
+ setIsResettingData(false);
601
+ prevOptionsBeforeResetRef.current = options;
602
+ resetDataCalledTimeRef.current = null;
603
+ }
604
+ } else {
605
+ if (!customPopupRender) {
606
+ onChange == null || onChange(tempValue);
607
+ } else {
608
+ setTempValue(value);
609
+ }
610
+ if (resetSearch) {
611
+ setSearchText('');
612
+ setIsSearching(false);
613
+ lastSearchQueryRef.current = '';
614
+ searchClearedTimeRef.current = null;
615
+ }
616
+ setIsLoadingOnScroll(false);
617
+ isScrollProcessingRef.current = false;
618
+ if (scrollLoadingTimeoutRef.current) {
619
+ clearTimeout(scrollLoadingTimeoutRef.current);
620
+ scrollLoadingTimeoutRef.current = null;
621
+ }
622
+ if (scrollThrottleTimeoutRef.current) {
623
+ clearTimeout(scrollThrottleTimeoutRef.current);
624
+ scrollThrottleTimeoutRef.current = null;
625
+ }
626
+ scrollContainerRef.current = null;
627
+ if (resetData && hasInteractedRef.current && !resetDataCalledRef.current && options.length > 0) {
628
+ prevOptionsBeforeResetRef.current = options;
629
+ setIsResettingData(true);
630
+ resetDataCalledRef.current = true;
631
+ resetDataCalledTimeRef.current = Date.now();
632
+ resetData();
633
+ } else if (!hasInteractedRef.current) {
634
+ if (searchTimeoutRef.current) {
635
+ clearTimeout(searchTimeoutRef.current);
636
+ searchTimeoutRef.current = null;
637
+ }
638
+ setIsSearching(false);
639
+ setIsResettingData(false);
640
+ lastSearchQueryRef.current = '';
641
+ }
642
+ hasInteractedRef.current = false;
643
+ }
644
+ setDropdownOpen(open);
645
+ }, [customPopupRender, value, onChange, tempValue, resetSearch, resetData, options, isResettingData]);
646
+ const handleSearchChange = (0, _react.useCallback)(e => {
647
+ const query = e.target.value;
648
+ setSearchText(query);
649
+ handleSearch(query);
650
+ }, [handleSearch]);
651
+ const handleSearchKeyDown = (0, _react.useCallback)(e => {
652
+ if (e.key === 'Backspace' || e.key === 'Delete') {
653
+ e.stopPropagation();
654
+ }
655
+ if (e.key === 'Escape' && searchText.length > 0) {
656
+ e.stopPropagation();
657
+ }
658
+ }, [searchText]);
659
+ const handleScroll = (0, _react.useCallback)(event => {
660
+ if (!onPopupScroll) return;
661
+ const target = event.target;
662
+ if (!target) return;
663
+ const isNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
664
+ if (!isNearBottom) {
665
+ isScrollProcessingRef.current = false;
666
+ return;
667
+ }
668
+ if (isScrollProcessingRef.current) return;
669
+ if (isLoadingOnScroll) return;
670
+ if (!hasMore) {
671
+ isScrollProcessingRef.current = false;
672
+ return;
673
+ }
674
+ if (scrollThrottleTimeoutRef.current) {
675
+ clearTimeout(scrollThrottleTimeoutRef.current);
676
+ }
677
+ isScrollProcessingRef.current = true;
678
+ scrollThrottleTimeoutRef.current = setTimeout(() => {
679
+ const stillNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
680
+ if (!stillNearBottom || isLoadingOnScroll || !hasMore) {
681
+ isScrollProcessingRef.current = false;
682
+ return;
683
+ }
684
+ const currentOptions = optionsRef.current;
685
+ prevOptionsCountRef.current = currentOptions.length;
686
+ prevOptionsRefForScroll.current = currentOptions;
687
+ scrollTriggerOptionsCountRef.current = currentOptions.length;
688
+ setIsLoadingOnScroll(true);
689
+ if (scrollLoadingTimeoutRef.current) {
690
+ clearTimeout(scrollLoadingTimeoutRef.current);
691
+ scrollLoadingTimeoutRef.current = null;
692
+ }
693
+ hasInteractedRef.current = true;
694
+ onPopupScroll();
695
+ scrollLoadingTimeoutRef.current = setTimeout(() => {
696
+ setIsLoadingOnScroll(prev => {
697
+ if (prev) {
698
+ scrollLoadingTimeoutRef.current = null;
699
+ isScrollProcessingRef.current = false;
700
+ return false;
701
+ }
702
+ return prev;
703
+ });
704
+ }, _constants.TIMEOUTS.SCROLL_LOADING_TIMEOUT);
705
+ }, 150);
706
+ }, [onPopupScroll, isLoadingOnScroll, hasMore]);
707
+ (0, _react.useEffect)(() => {
708
+ if (!onPopupScroll || !dropdownOpen) return;
709
+ const timeoutId = setTimeout(() => {
710
+ const findScrollContainer = () => {
711
+ const dropdowns = document.querySelectorAll('.ant-select-dropdown:not(.ant-select-dropdown-hidden)');
712
+ if (dropdowns.length === 0) return null;
713
+ const dropdown = Array.from(dropdowns).pop();
714
+ if (!dropdown) return null;
715
+ const treeList = dropdown.querySelector('.ant-select-tree-list-holder');
716
+ if (treeList && treeList.scrollHeight > treeList.clientHeight) {
717
+ return treeList;
718
+ }
719
+ const virtualList = dropdown.querySelector('.rc-virtual-list-holder');
720
+ if (virtualList && virtualList.scrollHeight > virtualList.clientHeight) {
721
+ return virtualList;
722
+ }
723
+ if (dropdown.scrollHeight > dropdown.clientHeight) {
724
+ return dropdown;
725
+ }
726
+ return null;
727
+ };
728
+ const scrollContainer = findScrollContainer();
729
+ if (scrollContainer) {
730
+ scrollContainerRef.current = scrollContainer;
731
+ scrollContainer.addEventListener('scroll', handleScroll, {
732
+ passive: true
733
+ });
734
+ }
735
+ }, _constants.TIMEOUTS.SCROLL_CONTAINER_DELAY);
736
+ return () => {
737
+ clearTimeout(timeoutId);
738
+ if (scrollThrottleTimeoutRef.current) {
739
+ clearTimeout(scrollThrottleTimeoutRef.current);
740
+ scrollThrottleTimeoutRef.current = null;
741
+ }
742
+ if (scrollContainerRef.current) {
743
+ scrollContainerRef.current.removeEventListener('scroll', handleScroll);
744
+ scrollContainerRef.current = null;
745
+ }
746
+ isScrollProcessingRef.current = false;
747
+ };
748
+ }, [onPopupScroll, dropdownOpen, handleScroll]);
749
+ const handleSingleSelectChange = (0, _react.useCallback)(newValue => {
750
+ if (disabled) {
751
+ return;
752
+ }
753
+ if (newValue === undefined || newValue === null) {
754
+ if (resetData && options.length > 0) {
755
+ prevOptionsBeforeResetRef.current = options;
756
+ setIsResettingData(true);
757
+ resetDataCalledRef.current = true;
758
+ resetDataCalledTimeRef.current = Date.now();
759
+ resetData();
760
+ }
761
+ }
762
+ onChange == null || onChange(newValue);
763
+ }, [onChange, resetData, options, disabled]);
764
+ const handleMultiSelectChange = (0, _react.useCallback)(newValue => {
765
+ if (disabled) {
766
+ return;
767
+ }
768
+ const initialValue = initialTempValueRef.current;
769
+ 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;
770
+ if (hasChanged) {
771
+ hasInteractedRef.current = true;
772
+ }
773
+ if (newValue === undefined || newValue === null || Array.isArray(newValue) && newValue.length === 0) {
774
+ if (resetData && options.length > 0) {
775
+ prevOptionsBeforeResetRef.current = options;
776
+ setIsResettingData(true);
777
+ resetDataCalledRef.current = true;
778
+ resetDataCalledTimeRef.current = Date.now();
779
+ resetData();
780
+ }
781
+ }
782
+ setTempValue(newValue);
783
+ }, [resetData, options, disabled]);
784
+ return {
785
+ searchText,
786
+ setSearchText,
787
+ tempValue,
788
+ setTempValue,
789
+ dropdownOpen,
790
+ isSearching,
791
+ isLoadingOnScroll,
792
+ isResettingData,
793
+ orderedOptions,
794
+ filteredTree,
795
+ treeMaps,
796
+ selectedLeafCount,
797
+ displayValue,
798
+ handleSearch,
799
+ handleSearchChange,
800
+ handleSearchKeyDown,
801
+ handleConfirm,
802
+ handleClearAll,
803
+ handleDropdownVisibilityChange,
804
+ handleSingleSelectChange,
805
+ handleMultiSelectChange,
806
+ selectedItemsCacheRef
807
+ };
808
+ };
809
+ exports.useCapUnifiedSelect = useCapUnifiedSelect;
810
+
811
+ /***/ }),
812
+
813
+ /***/ 540:
814
+ /***/ ((module) => {
815
+
816
+ "use strict";
817
+
818
+
819
+ /* istanbul ignore next */
820
+ function insertStyleElement(options) {
821
+ var element = document.createElement("style");
822
+ options.setAttributes(element, options.attributes);
823
+ options.insert(element, options.options);
824
+ return element;
825
+ }
826
+ module.exports = insertStyleElement;
827
+
828
+ /***/ }),
829
+
830
+ /***/ 1020:
831
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
832
+
833
+ "use strict";
834
+ /**
835
+ * @license React
836
+ * react-jsx-runtime.production.min.js
837
+ *
838
+ * Copyright (c) Facebook, Inc. and its affiliates.
839
+ *
840
+ * This source code is licensed under the MIT license found in the
841
+ * LICENSE file in the root directory of this source tree.
842
+ */
843
+ var f=__webpack_require__(9206),k=Symbol.for("react.element"),l=Symbol.for("react.fragment"),m=Object.prototype.hasOwnProperty,n=f.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,p={key:!0,ref:!0,__self:!0,__source:!0};
844
+ 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;
845
+
846
+
847
+ /***/ }),
848
+
849
+ /***/ 1549:
850
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
851
+
852
+ "use strict";
853
+
854
+
855
+ exports.__esModule = true;
856
+ exports["default"] = void 0;
857
+ var _CapSpin = _interopRequireDefault(__webpack_require__(7579));
858
+ exports["default"] = _CapSpin.default;
859
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
860
+
861
+ /***/ }),
862
+
863
+ /***/ 1601:
864
+ /***/ ((module) => {
865
+
866
+ "use strict";
867
+
868
+
869
+ module.exports = function (i) {
870
+ return i[1];
871
+ };
872
+
873
+ /***/ }),
874
+
875
+ /***/ 1858:
876
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
877
+
878
+ // Imports
879
+ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
880
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
881
+ var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
882
+ // Module
883
+ ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-row-v2.blaze-ui-with-custom-width{width:auto}.blaze-ui-cap-row-v2.blaze-ui-with-custom-height{height:auto}.blaze-ui-cap-row-v2.blaze-ui-fill-space{flex:1}.blaze-ui-cap-row-v2.blaze-ui-full-width{width:100%}.blaze-ui-cap-row-v2.blaze-ui-full-height{height:100%}.blaze-ui-cap-row-v2.blaze-ui-ant-row-no-wrap{flex-wrap:nowrap}.blaze-ui-cap-row-v2.blaze-ui-with-gap{display:grid;grid-template-columns:repeat(auto-fit, minmax(0, 1fr))}`, ""]);
884
+ // Exports
885
+ ___CSS_LOADER_EXPORT___.locals = {
886
+ "cap-row-v2": `blaze-ui-cap-row-v2`,
887
+ "with-custom-width": `blaze-ui-with-custom-width`,
888
+ "with-custom-height": `blaze-ui-with-custom-height`,
889
+ "fill-space": `blaze-ui-fill-space`,
890
+ "full-width": `blaze-ui-full-width`,
891
+ "full-height": `blaze-ui-full-height`,
892
+ "ant-row-no-wrap": `blaze-ui-ant-row-no-wrap`,
893
+ "with-gap": `blaze-ui-with-gap`
894
+ };
895
+ module.exports = ___CSS_LOADER_EXPORT___;
896
+
897
+
898
+ /***/ }),
899
+
900
+ /***/ 1879:
901
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
902
+
903
+ "use strict";
904
+
905
+
906
+ exports.__esModule = true;
907
+ exports.enhanceOptionsWithComponents = void 0;
908
+ var _react = _interopRequireDefault(__webpack_require__(9206));
909
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
910
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
911
+ var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
912
+ var _constants = __webpack_require__(9788);
913
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
914
+ var _jsxRuntime = __webpack_require__(4848);
915
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
916
+ 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); }
917
+ /**
918
+ * Enhances options with React components for rendering
919
+ * Adds decorated titles with suffixes and tooltips
920
+ */
921
+ const enhanceOptionsWithComponents = (options, type) => {
922
+ if (!(options != null && options.length)) return [];
923
+ const isTree = type === _constants.SELECT_TYPES.TREE_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT;
924
+ const enhanceOptions = opts => opts.map(opt => {
925
+ const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
926
+ className: _styles.default['cap-unified-select-option-with-suffix'],
927
+ justify: "space-between",
928
+ align: "middle",
929
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
930
+ className: _styles.default['cap-unified-select-option-label'],
931
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
932
+ type: "label14",
933
+ children: opt == null ? void 0 : opt.label
934
+ })
935
+ }), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
936
+ className: _styles.default['cap-unified-select-option-end'],
937
+ children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
938
+ className: _styles.default['cap-unified-select-option-suffix'],
939
+ children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
940
+ title: opt == null ? void 0 : opt.optionSuffixInfo
941
+ })]
942
+ }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
943
+ title: opt == null ? void 0 : opt.optionTooltipInfo
944
+ })]
945
+ })]
946
+ });
947
+ return _extends({}, opt, {
948
+ title: decoratedTitle,
949
+ label: opt == null ? void 0 : opt.label,
950
+ children: opt != null && opt.children ? enhanceOptions(opt.children) : []
951
+ });
952
+ });
953
+ if (isTree) {
954
+ return enhanceOptions(options);
955
+ }
956
+ return options.map(opt => _extends({}, opt, {
957
+ title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
958
+ className: _styles.default['cap-unified-select-option-with-suffix'],
959
+ justify: "space-between",
960
+ align: "middle",
961
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
962
+ className: _styles.default['cap-unified-select-option-label'],
963
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
964
+ type: "label14",
965
+ children: opt == null ? void 0 : opt.label
966
+ })
967
+ }), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
968
+ className: _styles.default['cap-unified-select-option-end'],
969
+ children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
970
+ className: _styles.default['cap-unified-select-option-suffix'],
971
+ children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
972
+ title: opt == null ? void 0 : opt.optionSuffixInfo
973
+ })]
974
+ }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
975
+ title: opt == null ? void 0 : opt.optionTooltipInfo
976
+ })]
977
+ })]
978
+ }),
979
+ label: opt == null ? void 0 : opt.label
980
+ }));
981
+ };
982
+ exports.enhanceOptionsWithComponents = enhanceOptionsWithComponents;
983
+
984
+ /***/ }),
985
+
986
+ /***/ 2119:
987
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
988
+
989
+ // Imports
990
+ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
991
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
992
+ var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
993
+ // Module
994
+ ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-tooltip-overlay-v2 .ant-tooltip-inner{background-color:#091e42;color:#fff;padding:.571rem .857rem;font-size:1rem;line-height:1.429rem;border-radius:.286rem;max-width:21.429rem;word-wrap:break-word}.blaze-ui-cap-tooltip-overlay-v2 .ant-tooltip-arrow::before{background-color:#091e42}.blaze-ui-button-disabled-tooltip-wrapper{display:inline-block;cursor:not-allowed}.blaze-ui-button-disabled-tooltip-wrapper .ant-btn[disabled]{pointer-events:none}.blaze-ui-cap-tooltip-wrapper{display:inline-block}`, ""]);
995
+ // Exports
996
+ ___CSS_LOADER_EXPORT___.locals = {
997
+ "cap-tooltip-overlay-v2": `blaze-ui-cap-tooltip-overlay-v2`,
998
+ "button-disabled-tooltip-wrapper": `blaze-ui-button-disabled-tooltip-wrapper`,
999
+ "cap-tooltip-wrapper": `blaze-ui-cap-tooltip-wrapper`
1000
+ };
1001
+ module.exports = ___CSS_LOADER_EXPORT___;
1002
+
1003
+
1004
+ /***/ }),
1005
+
1006
+ /***/ 2608:
1007
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1008
+
1009
+ "use strict";
1010
+
1011
+
1012
+ exports.__esModule = true;
1013
+ exports["default"] = void 0;
1014
+ var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(4299));
1015
+ exports["default"] = _CapTooltipWithInfo.default;
1016
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1017
+
1018
+ /***/ }),
1019
+
1020
+ /***/ 2657:
1021
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1022
+
1023
+ "use strict";
1024
+
1025
+
1026
+ exports.__esModule = true;
1027
+ exports["default"] = void 0;
1028
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1029
+ var _react = _interopRequireDefault(__webpack_require__(9206));
1030
+ var _styles = _interopRequireDefault(__webpack_require__(4939));
1031
+ var _jsxRuntime = __webpack_require__(4848);
1032
+ const _excluded = ["children", "type", "className", "style", "fontWeight", "lineHeight"],
1033
+ _excluded2 = ["children", "type", "className", "style", "fontWeight", "lineHeight"];
1034
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1035
+ 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); }
1036
+ 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; }
1037
+ const CapLabel = _ref => {
1038
+ let {
1039
+ children,
1040
+ type = 'label1',
1041
+ className = '',
1042
+ style = {},
1043
+ fontWeight,
1044
+ lineHeight
1045
+ } = _ref,
1046
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
1047
+ const labelStyle = _extends({}, fontWeight ? {
1048
+ fontWeight
1049
+ } : {}, lineHeight ? {
1050
+ lineHeight
1051
+ } : {}, style);
1052
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", _extends({
1053
+ className: (0, _classnames.default)(_styles.default['cap-label'], _styles.default['cap-label-div'], _styles.default[type], className),
1054
+ style: labelStyle
1055
+ }, rest, {
1056
+ children: children
1057
+ }));
1058
+ };
1059
+
1060
+ // Static method for inline label
1061
+
1062
+ const CapLabelInline = _ref2 => {
1063
+ let {
1064
+ children,
1065
+ type = 'label1',
1066
+ className = '',
1067
+ style = {},
1068
+ fontWeight,
1069
+ lineHeight
1070
+ } = _ref2,
1071
+ rest = _objectWithoutPropertiesLoose(_ref2, _excluded2);
1072
+ const labelStyle = _extends({}, fontWeight ? {
1073
+ fontWeight
1074
+ } : {}, lineHeight ? {
1075
+ lineHeight
1076
+ } : {}, style);
1077
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _extends({
1078
+ className: (0, _classnames.default)(_styles.default['cap-label'], _styles.default['cap-label-span'], _styles.default[type], className),
1079
+ style: labelStyle
1080
+ }, rest, {
1081
+ children: children
1082
+ }));
1083
+ };
1084
+
1085
+ // Extend the component type to include the static property
1086
+
1087
+ const CapLabelWithStatic = CapLabel;
1088
+ CapLabelWithStatic.CapLabelInline = CapLabelInline;
1089
+ var _default = exports["default"] = CapLabelWithStatic;
1090
+
1091
+ /***/ }),
1092
+
1093
+ /***/ 3737:
1094
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1095
+
1096
+ "use strict";
1097
+
1098
+
1099
+ exports.__esModule = true;
1100
+ exports["default"] = void 0;
1101
+ var _CapLabel = _interopRequireDefault(__webpack_require__(2657));
1102
+ exports["default"] = _CapLabel.default;
1103
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1104
+
1105
+ /***/ }),
1106
+
1107
+ /***/ 3837:
1108
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1109
+
1110
+ "use strict";
1111
+
1112
+
1113
+ exports.__esModule = true;
1114
+ exports["default"] = void 0;
1115
+ var _antdV = __webpack_require__(4273);
1116
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1117
+ var _react = _interopRequireDefault(__webpack_require__(9206));
1118
+ var _styles = _interopRequireDefault(__webpack_require__(5765));
1119
+ var _jsxRuntime = __webpack_require__(4848);
1120
+ const _excluded = ["children", "className", "style", "justify", "align", "gutter", "wrap", "width", "height", "margin", "padding", "fullWidth", "fullHeight", "fillSpace", "responsive", "vertical", "noWrap", "gap"];
1121
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1122
+ 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); }
1123
+ 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; }
1124
+ const CapRow = _ref => {
1125
+ let {
1126
+ children,
1127
+ className = '',
1128
+ style = {},
1129
+ justify = 'start',
1130
+ align = 'top',
1131
+ gutter = 0,
1132
+ wrap = true,
1133
+ width,
1134
+ height,
1135
+ margin,
1136
+ padding,
1137
+ fullWidth = false,
1138
+ fullHeight = false,
1139
+ fillSpace = false,
1140
+ responsive = true,
1141
+ vertical: _vertical = false,
1142
+ noWrap = false,
1143
+ gap = null
1144
+ } = _ref,
1145
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
1146
+ // Use either the gap property or gutter for spacing
1147
+ const gutterValue = gap !== null ? null : gutter;
1148
+ const wrapValue = noWrap ? false : wrap;
1149
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Row, _extends({
1150
+ className: (0, _classnames.default)(_styles.default['cap-row-v2'], {
1151
+ [_styles.default['with-custom-width']]: width,
1152
+ [_styles.default['with-custom-height']]: height,
1153
+ [_styles.default['fill-space']]: fillSpace,
1154
+ [_styles.default['full-width']]: fullWidth,
1155
+ [_styles.default['full-height']]: fullHeight,
1156
+ [_styles.default['ant-row-no-wrap']]: noWrap,
1157
+ [_styles.default['with-gap']]: gap !== null
1158
+ }, className),
1159
+ style: _extends({}, gap !== null ? {
1160
+ gap: typeof gap === 'number' ? gap + "px" : Array.isArray(gap) ? gap.map(g => g + "px").join(' ') : gap
1161
+ } : {}, width ? {
1162
+ width: typeof width === 'number' ? width + "px" : width
1163
+ } : {}, height ? {
1164
+ height: typeof height === 'number' ? height + "px" : height
1165
+ } : {}, margin ? {
1166
+ margin: typeof margin === 'number' ? margin + "px" : margin
1167
+ } : {}, padding ? {
1168
+ padding: typeof padding === 'number' ? padding + "px" : padding
1169
+ } : {}, fullWidth ? {
1170
+ width: '100%'
1171
+ } : {}, fullHeight ? {
1172
+ height: '100%'
1173
+ } : {}, !responsive ? {
1174
+ display: 'flex',
1175
+ flexWrap: wrapValue ? 'wrap' : 'nowrap'
1176
+ } : {}, fillSpace ? {
1177
+ flex: 1
1178
+ } : {}, style),
1179
+ justify: justify,
1180
+ align: align,
1181
+ gutter: gutterValue,
1182
+ wrap: wrapValue
1183
+ }, rest, {
1184
+ children: children
1185
+ }));
1186
+ };
1187
+ var _default = exports["default"] = CapRow;
1188
+
1189
+ /***/ }),
1190
+
1191
+ /***/ 3883:
1192
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1193
+
1194
+ // Imports
1195
+ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
1196
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1197
+ var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
1198
+ // Module
1199
+ ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-tooltip-with-info{display:inline-flex;align-items:center;cursor:default}.blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon{color:#b3bac5;margin-left:.286rem;cursor:help}.blaze-ui-cap-tooltip-with-info .blaze-ui-cap-tooltip-with-info-icon:hover{color:#dfe2e7}`, ""]);
1200
+ // Exports
1201
+ ___CSS_LOADER_EXPORT___.locals = {
1202
+ "cap-tooltip-with-info": `blaze-ui-cap-tooltip-with-info`,
1203
+ "cap-tooltip-with-info-icon": `blaze-ui-cap-tooltip-with-info-icon`
1204
+ };
1205
+ module.exports = ___CSS_LOADER_EXPORT___;
1206
+
1207
+
1208
+ /***/ }),
1209
+
1210
+ /***/ 3948:
1211
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1212
+
1213
+ "use strict";
1214
+ __webpack_require__.r(__webpack_exports__);
1215
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1216
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1217
+ /* harmony export */ });
1218
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
1219
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
1220
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
1221
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
1222
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
1223
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
1224
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
1225
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
1226
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
1227
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
1228
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(3883);
1229
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
1230
+ /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
1231
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
1232
+ /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
1233
+
1234
+
1235
+
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+
1242
+
1243
+
1244
+ var options = {};
1245
+
1246
+ ;
1247
+ options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
1248
+ options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
1249
+ options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
1250
+ options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
1251
+
1252
+ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
1253
+
1254
+
1255
+
1256
+
1257
+ /* 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);
1258
+
1259
+
1260
+ /***/ }),
1261
+
1262
+ /***/ 4273:
1263
+ /***/ ((module) => {
1264
+
1265
+ "use strict";
1266
+ module.exports = require("antd-v5");
1267
+
1268
+ /***/ }),
1269
+
1270
+ /***/ 4284:
1271
+ /***/ ((module) => {
1272
+
1273
+ "use strict";
1274
+
1275
+
1276
+ /* istanbul ignore next */
1277
+ var replaceText = function replaceText() {
1278
+ var textStore = [];
1279
+ return function replace(index, replacement) {
1280
+ textStore[index] = replacement;
1281
+ return textStore.filter(Boolean).join("\n");
1282
+ };
1283
+ }();
1284
+
1285
+ /* istanbul ignore next */
1286
+ function apply(styleElement, index, remove, obj) {
1287
+ var css;
1288
+ if (remove) {
1289
+ css = "";
1290
+ } else {
1291
+ css = "";
1292
+ if (obj.supports) {
1293
+ css += "@supports (".concat(obj.supports, ") {");
1294
+ }
1295
+ if (obj.media) {
1296
+ css += "@media ".concat(obj.media, " {");
1219
1297
  }
1220
- }, [options, orderedOptions, onPopupScroll, tempValue]);
1221
- (0, _react.useEffect)(() => {
1222
- if (!fetchMissingOptions) {
1223
- prevOptionsCountBeforeFetchMissingRef.current = options.length;
1224
- prevOptionsBeforeFetchMissingRef.current = options;
1225
- return;
1298
+ var needLayer = typeof obj.layer !== "undefined";
1299
+ if (needLayer) {
1300
+ css += "@layer".concat(obj.layer.length > 0 ? " ".concat(obj.layer) : "", " {");
1226
1301
  }
1227
-
1228
- // For API-driven data, don't reorder options during active search
1229
- // Only reorder when there's no search query or search is cleared
1230
- const hasActiveSearch = !staticValue && lastSearchQueryRef.current.trim().length > 0;
1231
- if (hasActiveSearch) {
1232
- return;
1302
+ css += obj.css;
1303
+ if (needLayer) {
1304
+ css += "}";
1233
1305
  }
1234
- const currentOptions = options;
1235
- const currentSelectedValues = Array.isArray(value) ? value : value ? [value] : [];
1236
- const tempSelectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
1237
- const selectedValues = tempSelectedValues.length > 0 ? tempSelectedValues : currentSelectedValues;
1238
- if (selectedValues.length === 0) {
1239
- prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
1240
- prevOptionsBeforeFetchMissingRef.current = currentOptions;
1241
- return;
1306
+ if (obj.media) {
1307
+ css += "}";
1242
1308
  }
1243
- const prevOptions = prevOptionsBeforeFetchMissingRef.current;
1244
- const optionsCountIncreased = currentOptions.length > prevOptionsCountBeforeFetchMissingRef.current;
1245
- const optionsChanged = prevOptions !== currentOptions || optionsCountIncreased;
1246
- const hasNewlyFetchedSelectedItems = (() => {
1247
- if (selectedValues.length === 0 || !optionsChanged) {
1248
- return false;
1249
- }
1250
- const previouslyMissingValues = selectedValues.filter(val => !(0, _utils.findValueInOptions)(prevOptions, val));
1251
- if (previouslyMissingValues.length === 0) {
1252
- return false;
1253
- }
1254
- const nowPresentValues = previouslyMissingValues.filter(val => (0, _utils.findValueInOptions)(currentOptions, val));
1255
- return nowPresentValues.length > 0;
1256
- })();
1257
- if (optionsChanged && hasNewlyFetchedSelectedItems) {
1258
- const reordered = (0, _utils.reorderOptionsBySelection)(currentOptions, selectedValues);
1259
- setOrderedOptions(reordered);
1309
+ if (obj.supports) {
1310
+ css += "}";
1260
1311
  }
1261
- prevOptionsCountBeforeFetchMissingRef.current = currentOptions.length;
1262
- prevOptionsBeforeFetchMissingRef.current = currentOptions;
1263
- }, [options, value, tempValue, fetchMissingOptions, staticValue]);
1264
- (0, _react.useEffect)(() => {
1265
- if (initialSortDoneRef.current || !(options != null && options.length)) {
1266
- return;
1312
+ }
1313
+
1314
+ // For old IE
1315
+ /* istanbul ignore if */
1316
+ if (styleElement.styleSheet) {
1317
+ styleElement.styleSheet.cssText = replaceText(index, css);
1318
+ } else {
1319
+ var cssNode = document.createTextNode(css);
1320
+ var childNodes = styleElement.childNodes;
1321
+ if (childNodes[index]) {
1322
+ styleElement.removeChild(childNodes[index]);
1267
1323
  }
1268
- const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
1269
- if (selectedValues.length === 0) {
1270
- initialSortDoneRef.current = true;
1271
- return;
1324
+ if (childNodes.length) {
1325
+ styleElement.insertBefore(cssNode, childNodes[index]);
1326
+ } else {
1327
+ styleElement.appendChild(cssNode);
1272
1328
  }
1273
- const checkValueExists = (opts, val) => {
1274
- for (const opt of opts) {
1275
- if (opt.value === val) return true;
1276
- if (opt.children && opt.children.length > 0) {
1277
- if (checkValueExists(opt.children, val)) return true;
1278
- }
1279
- }
1280
- return false;
1281
- };
1282
- const hasSelectedInOptions = selectedValues.some(val => checkValueExists(options, val));
1283
- if (hasSelectedInOptions) {
1284
- const reordered = (0, _utils.reorderOptionsBySelection)(options, selectedValues);
1285
- setOrderedOptions(reordered);
1329
+ }
1330
+ }
1331
+ var singletonData = {
1332
+ singleton: null,
1333
+ singletonCounter: 0
1334
+ };
1335
+
1336
+ /* istanbul ignore next */
1337
+ function domAPI(options) {
1338
+ if (typeof document === "undefined") return {
1339
+ update: function update() {},
1340
+ remove: function remove() {}
1341
+ };
1342
+
1343
+ // eslint-disable-next-line no-undef,no-use-before-define
1344
+ var styleIndex = singletonData.singletonCounter++;
1345
+ var styleElement =
1346
+ // eslint-disable-next-line no-undef,no-use-before-define
1347
+ singletonData.singleton || (
1348
+ // eslint-disable-next-line no-undef,no-use-before-define
1349
+ singletonData.singleton = options.insertStyleElement(options));
1350
+ return {
1351
+ update: function update(obj) {
1352
+ apply(styleElement, styleIndex, false, obj);
1353
+ },
1354
+ remove: function remove(obj) {
1355
+ apply(styleElement, styleIndex, true, obj);
1286
1356
  }
1287
- initialSortDoneRef.current = true;
1288
- }, [options, value]);
1289
- const dataSource = (0, _react.useMemo)(() => {
1290
- const sourceOptions = searchText.trim() ? mergedOptions : orderedOptions || mergedOptions;
1291
- const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
1292
- const hasSearchQuery = searchText.trim().length > 0;
1293
-
1294
- // For API-driven data, don't append virtual options during search
1295
- // Only show search results when searching
1296
- const shouldAppendVirtualOptions = staticValue || !hasSearchQuery;
1297
- const missingSelectedValues = [];
1298
- if (shouldAppendVirtualOptions && selectedValues.length > 0) {
1299
- selectedValues.forEach(val => {
1300
- if (!(0, _utils.findValueInOptions)(sourceOptions, val)) {
1301
- missingSelectedValues.push(val);
1302
- }
1303
- });
1357
+ };
1358
+ }
1359
+ module.exports = domAPI;
1360
+
1361
+ /***/ }),
1362
+
1363
+ /***/ 4299:
1364
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1365
+
1366
+ "use strict";
1367
+
1368
+
1369
+ exports.__esModule = true;
1370
+ exports["default"] = void 0;
1371
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1372
+ var _react = _interopRequireDefault(__webpack_require__(9206));
1373
+ var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
1374
+ var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
1375
+ var _styles = _interopRequireDefault(__webpack_require__(3948));
1376
+ var _jsxRuntime = __webpack_require__(4848);
1377
+ const _excluded = ["title", "iconSize", "iconType", "placement", "trigger", "className", "tooltipProps", "iconProps"];
1378
+ /**
1379
+ * CapTooltipWithInfo - A component that combines an info icon with a tooltip
1380
+ * for displaying additional information on hover or other trigger events.
1381
+ */
1382
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1383
+ 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); }
1384
+ 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; }
1385
+ const CapTooltipWithInfo = _ref => {
1386
+ let {
1387
+ title,
1388
+ iconSize = 's',
1389
+ iconType = 'info-circle',
1390
+ placement = 'top',
1391
+ trigger = 'hover',
1392
+ className = '',
1393
+ tooltipProps = {},
1394
+ iconProps = {}
1395
+ } = _ref,
1396
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
1397
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("span", _extends({
1398
+ className: (0, _classnames.default)(_styles.default['cap-tooltip-with-info'], className)
1399
+ }, rest, {
1400
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltip.default, _extends({
1401
+ title: title,
1402
+ placement: placement,
1403
+ trigger: trigger
1404
+ }, tooltipProps, {
1405
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1406
+ className: _styles.default['cap-tooltip-with-info-icon'],
1407
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, _extends({
1408
+ type: iconType,
1409
+ size: iconSize
1410
+ }, iconProps))
1411
+ })
1412
+ }))
1413
+ }));
1414
+ };
1415
+ var _default = exports["default"] = CapTooltipWithInfo;
1416
+
1417
+ /***/ }),
1418
+
1419
+ /***/ 4627:
1420
+ /***/ ((module) => {
1421
+
1422
+ "use strict";
1423
+ module.exports = require("@ant-design-v5/icons");
1424
+
1425
+ /***/ }),
1426
+
1427
+ /***/ 4848:
1428
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1429
+
1430
+ "use strict";
1431
+
1432
+
1433
+ if (true) {
1434
+ module.exports = __webpack_require__(1020);
1435
+ } else // removed by dead control flow
1436
+ {}
1437
+
1438
+
1439
+ /***/ }),
1440
+
1441
+ /***/ 4939:
1442
+ /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
1443
+
1444
+ "use strict";
1445
+ __webpack_require__.r(__webpack_exports__);
1446
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1447
+ /* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
1448
+ /* harmony export */ });
1449
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5072);
1450
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0__);
1451
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(4284);
1452
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1__);
1453
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(7659);
1454
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2__);
1455
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(5056);
1456
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3__);
1457
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(540);
1458
+ /* harmony import */ var _node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4__);
1459
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(5216);
1460
+ /* harmony import */ var _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__);
1461
+ /* harmony reexport (unknown) */ var __WEBPACK_REEXPORT_OBJECT__ = {};
1462
+ /* harmony reexport (unknown) */ for(const __WEBPACK_IMPORT_KEY__ in _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__) if(__WEBPACK_IMPORT_KEY__ !== "default") __WEBPACK_REEXPORT_OBJECT__[__WEBPACK_IMPORT_KEY__] = () => _node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5__[__WEBPACK_IMPORT_KEY__]
1463
+ /* harmony reexport (unknown) */ __webpack_require__.d(__webpack_exports__, __WEBPACK_REEXPORT_OBJECT__);
1464
+
1465
+
1466
+
1467
+
1468
+
1469
+
1470
+
1471
+
1472
+
1473
+
1474
+
1475
+ var options = {};
1476
+
1477
+ ;
1478
+ options.setAttributes = (_node_modules_style_loader_dist_runtime_setAttributesWithoutAttributes_js__WEBPACK_IMPORTED_MODULE_3___default());
1479
+ options.insert = _node_modules_style_loader_dist_runtime_insertBySelector_js__WEBPACK_IMPORTED_MODULE_2___default().bind(null, "head");
1480
+ options.domAPI = (_node_modules_style_loader_dist_runtime_singletonStyleDomAPI_js__WEBPACK_IMPORTED_MODULE_1___default());
1481
+ options.insertStyleElement = (_node_modules_style_loader_dist_runtime_insertStyleElement_js__WEBPACK_IMPORTED_MODULE_4___default());
1482
+
1483
+ var update = _node_modules_style_loader_dist_runtime_injectStylesIntoStyleTag_js__WEBPACK_IMPORTED_MODULE_0___default()((_node_modules_css_loader_dist_cjs_js_ruleSet_1_rules_1_use_1_node_modules_sass_loader_dist_cjs_js_ruleSet_1_rules_1_use_2_styles_scss__WEBPACK_IMPORTED_MODULE_5___default()), options);
1484
+
1485
+
1486
+
1487
+
1488
+ /* 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);
1489
+
1490
+
1491
+ /***/ }),
1492
+
1493
+ /***/ 5056:
1494
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1495
+
1496
+ "use strict";
1497
+
1498
+
1499
+ /* istanbul ignore next */
1500
+ function setAttributesWithoutAttributes(styleElement) {
1501
+ var nonce = true ? __webpack_require__.nc : 0;
1502
+ if (nonce) {
1503
+ styleElement.setAttribute("nonce", nonce);
1504
+ }
1505
+ }
1506
+ module.exports = setAttributesWithoutAttributes;
1507
+
1508
+ /***/ }),
1509
+
1510
+ /***/ 5072:
1511
+ /***/ ((module) => {
1512
+
1513
+ "use strict";
1514
+
1515
+
1516
+ var stylesInDOM = [];
1517
+ function getIndexByIdentifier(identifier) {
1518
+ var result = -1;
1519
+ for (var i = 0; i < stylesInDOM.length; i++) {
1520
+ if (stylesInDOM[i].identifier === identifier) {
1521
+ result = i;
1522
+ break;
1304
1523
  }
1305
- const virtualOptions = missingSelectedValues.map(val => {
1306
- const cachedOption = selectedItemsCacheRef.current.get(val);
1307
- return _extends({
1308
- value: val,
1309
- label: (cachedOption == null ? void 0 : cachedOption.label) || String(val),
1310
- key: (cachedOption == null ? void 0 : cachedOption.key) || val,
1311
- title: cachedOption == null ? void 0 : cachedOption.title,
1312
- optionSuffix: cachedOption == null ? void 0 : cachedOption.optionSuffix,
1313
- optionSuffixInfo: cachedOption == null ? void 0 : cachedOption.optionSuffixInfo,
1314
- optionTooltipInfo: cachedOption == null ? void 0 : cachedOption.optionTooltipInfo,
1315
- disabled: cachedOption == null ? void 0 : cachedOption.disabled
1316
- }, (cachedOption == null ? void 0 : cachedOption.children) && {
1317
- children: cachedOption.children
1318
- });
1319
- });
1320
- const allOptions = hasSearchQuery ? [...sourceOptions, ...virtualOptions] : [...virtualOptions, ...sourceOptions];
1321
- if (!(allOptions != null && allOptions.length)) return [];
1322
- const enhanceOptions = opts => opts.map(opt => {
1323
- const decoratedTitle = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1324
- className: _styles.default['cap-unified-select-option-with-suffix'],
1325
- justify: "space-between",
1326
- align: "middle",
1327
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1328
- className: _styles.default['cap-unified-select-option-label'],
1329
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1330
- type: "label14",
1331
- children: opt == null ? void 0 : opt.label
1332
- })
1333
- }), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1334
- className: _styles.default['cap-unified-select-option-end'],
1335
- children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
1336
- className: _styles.default['cap-unified-select-option-suffix'],
1337
- children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
1338
- title: opt == null ? void 0 : opt.optionSuffixInfo
1339
- })]
1340
- }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
1341
- title: opt == null ? void 0 : opt.optionTooltipInfo
1342
- })]
1343
- })]
1344
- });
1345
- return _extends({}, opt, {
1346
- title: decoratedTitle,
1347
- label: opt == null ? void 0 : opt.label,
1348
- children: opt != null && opt.children ? enhanceOptions(opt.children) : []
1349
- });
1350
- });
1351
- return isTree ? enhanceOptions(allOptions) : allOptions.map(opt => _extends({}, opt, {
1352
- title: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1353
- className: _styles.default['cap-unified-select-option-with-suffix'],
1354
- justify: "space-between",
1355
- align: "middle",
1356
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1357
- className: _styles.default['cap-unified-select-option-label'],
1358
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1359
- type: "label14",
1360
- children: opt == null ? void 0 : opt.label
1361
- })
1362
- }), ((opt == null ? void 0 : opt.optionSuffix) || (opt == null ? void 0 : opt.optionTooltipInfo)) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1363
- className: _styles.default['cap-unified-select-option-end'],
1364
- children: [(opt == null ? void 0 : opt.optionSuffix) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
1365
- className: _styles.default['cap-unified-select-option-suffix'],
1366
- children: [opt == null ? void 0 : opt.optionSuffix, (opt == null ? void 0 : opt.optionSuffixInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
1367
- title: opt == null ? void 0 : opt.optionSuffixInfo
1368
- })]
1369
- }), (opt == null ? void 0 : opt.optionTooltipInfo) && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
1370
- title: opt == null ? void 0 : opt.optionTooltipInfo
1371
- })]
1372
- })]
1373
- }),
1374
- label: opt == null ? void 0 : opt.label
1375
- }));
1376
- }, [isTree, mergedOptions, orderedOptions, searchText, value, staticValue]);
1377
- const filteredTree = (0, _react.useMemo)(() => {
1378
- const selectedValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
1379
- return (0, _utils.filterTreeData)(dataSource, searchText.trim(), searchBasedOn, selectedValues.length > 0 ? selectedValues : undefined);
1380
- }, [dataSource, searchText, searchBasedOn, tempValue]);
1381
- const treeMaps = (0, _react.useMemo)(() => (0, _utils.buildTreeMaps)(options), [options]);
1382
- const selectedLeafCount = (0, _react.useMemo)(() => (0, _utils.countSelectedLeaves)(treeMaps, Array.isArray(tempValue) ? tempValue : undefined), [treeMaps, tempValue]);
1383
- const displayValue = dropdownOpen ? tempValue : value;
1384
- const suffix = (0, _react.useMemo)(() => {
1385
- const count = Array.isArray(displayValue) ? displayValue == null ? void 0 : displayValue.length : displayValue ? 1 : 0;
1386
- const renderTooltipTitle = values => {
1387
- return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1388
- className: _styles.default['cap-unified-select-more-tooltip-content'],
1389
- children: values.map((val, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1390
- children: val
1391
- }, "cap-unified-select-tooltip-item-" + val + "-" + idx))
1392
- });
1524
+ }
1525
+ return result;
1526
+ }
1527
+ function modulesToDom(list, options) {
1528
+ var idCountMap = {};
1529
+ var identifiers = [];
1530
+ for (var i = 0; i < list.length; i++) {
1531
+ var item = list[i];
1532
+ var id = options.base ? item[0] + options.base : item[0];
1533
+ var count = idCountMap[id] || 0;
1534
+ var identifier = "".concat(id, " ").concat(count);
1535
+ idCountMap[id] = count + 1;
1536
+ var indexByIdentifier = getIndexByIdentifier(identifier);
1537
+ var obj = {
1538
+ css: item[1],
1539
+ media: item[2],
1540
+ sourceMap: item[3],
1541
+ supports: item[4],
1542
+ layer: item[5]
1393
1543
  };
1394
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1395
- children: [isMulti && count > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1396
- className: _styles.default['cap-unified-select-more-text'],
1397
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltip.default, {
1398
- title: renderTooltipTitle(Array.isArray(displayValue) ? displayValue.slice(1) : []),
1399
- placement: "bottom",
1400
- overlayClassName: _styles.default['cap-unified-select-more-tooltip'],
1401
- arrowPointAtCenter: true,
1402
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
1403
- children: ["+", count - 1, " more"]
1404
- })
1405
- })
1406
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1407
- className: _styles.default['cap-unified-select-suffix-icon'],
1408
- type: dropdownOpen ? 'up' : 'down',
1409
- size: "xs"
1410
- })]
1411
- });
1412
- }, [isMulti, displayValue, dropdownOpen]);
1413
- const prefix = (0, _react.useMemo)(() => {
1414
- if (isMulti && Array.isArray(displayValue) && (displayValue == null ? void 0 : displayValue.length) > 0) {
1415
- var _treeMaps$nodeMap;
1416
- const firstLeafValue = displayValue.find(val => {
1417
- var _treeMaps$leafValues;
1418
- return treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.includes(val);
1544
+ if (indexByIdentifier !== -1) {
1545
+ stylesInDOM[indexByIdentifier].references++;
1546
+ stylesInDOM[indexByIdentifier].updater(obj);
1547
+ } else {
1548
+ var updater = addElementStyle(obj, options);
1549
+ options.byIndex = i;
1550
+ stylesInDOM.splice(i, 0, {
1551
+ identifier: identifier,
1552
+ updater: updater,
1553
+ references: 1
1419
1554
  });
1420
- return firstLeafValue ? (treeMaps == null || (_treeMaps$nodeMap = treeMaps.nodeMap) == null || (_treeMaps$nodeMap = _treeMaps$nodeMap[firstLeafValue]) == null ? void 0 : _treeMaps$nodeMap.label) || null : null;
1421
1555
  }
1422
- return null;
1423
- }, [isMulti, displayValue, treeMaps]);
1424
- const handleConfirm = (0, _react.useCallback)(() => {
1425
- hasInteractedRef.current = true;
1426
- const optionsToReorder = mergedOptions;
1427
- if (isMulti && Array.isArray(tempValue) && tempValue.length > 0) {
1428
- const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, tempValue);
1429
- setOrderedOptions(reordered);
1430
- } else if (!isMulti && tempValue && !Array.isArray(tempValue)) {
1431
- // For single select, move selected item to top
1432
- const reordered = (0, _utils.reorderOptionsBySelection)(optionsToReorder, [tempValue]);
1433
- setOrderedOptions(reordered);
1556
+ identifiers.push(identifier);
1557
+ }
1558
+ return identifiers;
1559
+ }
1560
+ function addElementStyle(obj, options) {
1561
+ var api = options.domAPI(options);
1562
+ api.update(obj);
1563
+ var updater = function updater(newObj) {
1564
+ if (newObj) {
1565
+ if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap && newObj.supports === obj.supports && newObj.layer === obj.layer) {
1566
+ return;
1567
+ }
1568
+ api.update(obj = newObj);
1434
1569
  } else {
1435
- // No selection, reset to original order
1436
- setOrderedOptions(null);
1570
+ api.remove();
1437
1571
  }
1438
- onChange == null || onChange(tempValue);
1439
- setDropdownOpen(false);
1440
- setIsSearching(false);
1441
- searchClearedTimeRef.current = null;
1442
- if (resetSearch) {
1443
- setSearchText('');
1444
- lastSearchQueryRef.current = '';
1572
+ };
1573
+ return updater;
1574
+ }
1575
+ module.exports = function (list, options) {
1576
+ options = options || {};
1577
+ list = list || [];
1578
+ var lastIdentifiers = modulesToDom(list, options);
1579
+ return function update(newList) {
1580
+ newList = newList || [];
1581
+ for (var i = 0; i < lastIdentifiers.length; i++) {
1582
+ var identifier = lastIdentifiers[i];
1583
+ var index = getIndexByIdentifier(identifier);
1584
+ stylesInDOM[index].references--;
1445
1585
  }
1446
- if (resetData && mergedOptions.length > 0) {
1447
- prevOptionsBeforeResetRef.current = mergedOptions;
1448
- setIsResettingData(true);
1449
- resetDataCalledRef.current = true;
1450
- resetDataCalledTimeRef.current = Date.now();
1451
- resetData();
1586
+ var newLastIdentifiers = modulesToDom(newList, options);
1587
+ for (var _i = 0; _i < lastIdentifiers.length; _i++) {
1588
+ var _identifier = lastIdentifiers[_i];
1589
+ var _index = getIndexByIdentifier(_identifier);
1590
+ if (stylesInDOM[_index].references === 0) {
1591
+ stylesInDOM[_index].updater();
1592
+ stylesInDOM.splice(_index, 1);
1593
+ }
1452
1594
  }
1453
- onConfirm == null || onConfirm(tempValue);
1454
- }, [onChange, onConfirm, tempValue, resetSearch, isMulti, mergedOptions, resetData]);
1455
- const handleClearAll = (0, _react.useCallback)(() => {
1456
- // Reset all state as if it's a fresh dropdown
1457
- const cleared = isMulti ? [] : undefined;
1595
+ lastIdentifiers = newLastIdentifiers;
1596
+ };
1597
+ };
1458
1598
 
1459
- // Clear search state
1460
- setSearchText('');
1461
- setIsSearching(false);
1462
- lastSearchQueryRef.current = '';
1463
- searchClearedTimeRef.current = null;
1599
+ /***/ }),
1464
1600
 
1465
- // Clear timeouts
1466
- if (searchTimeoutRef.current) {
1467
- clearTimeout(searchTimeoutRef.current);
1468
- searchTimeoutRef.current = null;
1469
- }
1470
- if (scrollLoadingTimeoutRef.current) {
1471
- clearTimeout(scrollLoadingTimeoutRef.current);
1472
- scrollLoadingTimeoutRef.current = null;
1473
- }
1474
- if (scrollThrottleTimeoutRef.current) {
1475
- clearTimeout(scrollThrottleTimeoutRef.current);
1476
- scrollThrottleTimeoutRef.current = null;
1477
- }
1601
+ /***/ 5216:
1602
+ /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
1603
+
1604
+ // Imports
1605
+ var ___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___ = __webpack_require__(1601);
1606
+ var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(6314);
1607
+ var ___CSS_LOADER_EXPORT___ = ___CSS_LOADER_API_IMPORT___(___CSS_LOADER_API_NO_SOURCEMAP_IMPORT___);
1608
+ // Module
1609
+ ___CSS_LOADER_EXPORT___.push([module.id, `.blaze-ui-cap-label{font-family:"Roboto",sans-serif}.blaze-ui-cap-label.blaze-ui-label1{font-size:.857rem;color:#5e6c84;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label2{font-size:.857rem;color:#091e42;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label3{font-size:.857rem;color:#97a0af;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label4{font-size:.857rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label5{font-size:.714rem;color:#091e42;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label6{font-size:.857rem;color:#b3bac5;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label7{font-size:1rem;color:#5e6c84;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label8{font-size:.857rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label9{font-size:.857rem;color:#091e42;font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label10{font-size:.857rem;color:#fff;font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label11{font-size:.714rem;color:#5e6c84;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label12{font-size:.857rem;color:#fff;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label13{font-size:.714rem;color:#97a0af;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label14{font-size:1rem;color:#676e7c;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label15{font-size:1rem;color:#091e42;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label16{font-size:1rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label17{font-size:1.143rem;color:#091e42;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label18{font-size:1rem;color:#5e6c84;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label19{font-size:.857rem;color:rgba(0,0,0,.8705882353);font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label20{font-size:1rem;color:#2466eb;font-weight:500;line-height:normal}.blaze-ui-cap-label.blaze-ui-label21{font-size:.857rem;color:#2466eb;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label22{font-size:1.714rem;color:#5e6c84;font-weight:400;line-height:2rem}.blaze-ui-cap-label.blaze-ui-label23{font-size:1rem;color:#fff;font-weight:400;line-height:normal}.blaze-ui-cap-label.blaze-ui-label24{font-size:1rem;color:#5e6c84;font-weight:400;line-height:1.429rem}.blaze-ui-cap-label.blaze-ui-label25{font-size:1rem;color:#5e6c84;font-weight:500;line-height:1.429rem}.blaze-ui-cap-label.blaze-ui-label26{font-size:.714rem;color:#091e42;font-weight:400;line-height:.857rem}.blaze-ui-cap-label.blaze-ui-label27{font-size:.857rem;color:#2466eb;font-weight:500;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label28{font-size:.857rem;color:#fff;font-weight:500;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label29,.blaze-ui-cap-label.blaze-ui-label30{font-size:.714rem;color:#fff;font-weight:400;line-height:.857rem}.blaze-ui-cap-label.blaze-ui-label31{font-size:.857rem;color:#091e42;font-weight:400;line-height:1.143rem}.blaze-ui-cap-label.blaze-ui-label32{font-size:1rem;color:#fff;font-weight:500;line-height:1.429rem}.blaze-ui-cap-label.blaze-ui-label33{font-size:1rem;color:#2466eb;font-weight:500;line-height:1.429rem}.blaze-ui-cap-label-div,.blaze-ui-cap-label-span{font-family:"Roboto",sans-serif;margin:0;padding:0}`, ""]);
1610
+ // Exports
1611
+ ___CSS_LOADER_EXPORT___.locals = {
1612
+ "cap-label": `blaze-ui-cap-label`,
1613
+ "label1": `blaze-ui-label1`,
1614
+ "label2": `blaze-ui-label2`,
1615
+ "label3": `blaze-ui-label3`,
1616
+ "label4": `blaze-ui-label4`,
1617
+ "label5": `blaze-ui-label5`,
1618
+ "label6": `blaze-ui-label6`,
1619
+ "label7": `blaze-ui-label7`,
1620
+ "label8": `blaze-ui-label8`,
1621
+ "label9": `blaze-ui-label9`,
1622
+ "label10": `blaze-ui-label10`,
1623
+ "label11": `blaze-ui-label11`,
1624
+ "label12": `blaze-ui-label12`,
1625
+ "label13": `blaze-ui-label13`,
1626
+ "label14": `blaze-ui-label14`,
1627
+ "label15": `blaze-ui-label15`,
1628
+ "label16": `blaze-ui-label16`,
1629
+ "label17": `blaze-ui-label17`,
1630
+ "label18": `blaze-ui-label18`,
1631
+ "label19": `blaze-ui-label19`,
1632
+ "label20": `blaze-ui-label20`,
1633
+ "label21": `blaze-ui-label21`,
1634
+ "label22": `blaze-ui-label22`,
1635
+ "label23": `blaze-ui-label23`,
1636
+ "label24": `blaze-ui-label24`,
1637
+ "label25": `blaze-ui-label25`,
1638
+ "label26": `blaze-ui-label26`,
1639
+ "label27": `blaze-ui-label27`,
1640
+ "label28": `blaze-ui-label28`,
1641
+ "label29": `blaze-ui-label29`,
1642
+ "label30": `blaze-ui-label30`,
1643
+ "label31": `blaze-ui-label31`,
1644
+ "label32": `blaze-ui-label32`,
1645
+ "label33": `blaze-ui-label33`,
1646
+ "cap-label-div": `blaze-ui-cap-label-div`,
1647
+ "cap-label-span": `blaze-ui-cap-label-span`
1648
+ };
1649
+ module.exports = ___CSS_LOADER_EXPORT___;
1478
1650
 
1479
- // Reset scroll state
1480
- setIsLoadingOnScroll(false);
1481
- isScrollProcessingRef.current = false;
1482
- scrollContainerRef.current = null;
1483
1651
 
1484
- // Reset ordered options
1485
- setOrderedOptions(null);
1486
- initialSortDoneRef.current = false;
1652
+ /***/ }),
1487
1653
 
1488
- // Reset interaction flags
1489
- hasInteractedRef.current = false;
1490
- resetDataCalledRef.current = false;
1491
- fetchMissingOptionsCalledRef.current = false;
1492
- lastMissingValuesRef.current = '';
1654
+ /***/ 5353:
1655
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
1493
1656
 
1494
- // Reset temp value and call onChange (same as allowClear X button)
1495
- setTempValue(cleared);
1496
- onChange == null || onChange(cleared);
1657
+ "use strict";
1497
1658
 
1498
- // Close dropdown
1499
- setDropdownOpen(false);
1500
1659
 
1501
- // Reset data if needed (same as allowClear X button behavior)
1502
- if (resetData && options.length > 0) {
1503
- prevOptionsBeforeResetRef.current = options;
1504
- setIsResettingData(true);
1505
- resetDataCalledRef.current = true;
1506
- resetDataCalledTimeRef.current = Date.now();
1507
- resetData();
1508
- }
1509
- }, [isMulti, onChange, resetData, options]);
1510
- const handleDropdownVisibilityChange = (0, _react.useCallback)(open => {
1511
- if (readOnly || disabled) {
1512
- return;
1513
- }
1514
- if (open) {
1515
- initialTempValueRef.current = value;
1516
- hasInteractedRef.current = false;
1517
- resetDataCalledRef.current = false;
1518
- fetchMissingOptionsCalledRef.current = false;
1519
- lastMissingValuesRef.current = '';
1520
- if (searchTimeoutRef.current) {
1521
- clearTimeout(searchTimeoutRef.current);
1522
- searchTimeoutRef.current = null;
1523
- }
1524
- if (scrollLoadingTimeoutRef.current) {
1525
- clearTimeout(scrollLoadingTimeoutRef.current);
1526
- scrollLoadingTimeoutRef.current = null;
1527
- }
1528
- if (scrollThrottleTimeoutRef.current) {
1529
- clearTimeout(scrollThrottleTimeoutRef.current);
1530
- scrollThrottleTimeoutRef.current = null;
1531
- }
1532
- setIsSearching(false);
1533
- searchClearedTimeRef.current = null;
1534
- setIsLoadingOnScroll(false);
1535
- isScrollProcessingRef.current = false;
1536
- if (isResettingData) {
1537
- setIsResettingData(false);
1538
- prevOptionsBeforeResetRef.current = options;
1539
- resetDataCalledTimeRef.current = null;
1540
- }
1541
- } else {
1542
- if (!customPopupRender) {
1543
- onChange == null || onChange(tempValue);
1544
- } else {
1545
- setTempValue(value);
1546
- }
1547
- if (resetSearch) {
1548
- setSearchText('');
1549
- setIsSearching(false);
1550
- lastSearchQueryRef.current = '';
1551
- searchClearedTimeRef.current = null;
1552
- }
1553
- setIsLoadingOnScroll(false);
1554
- isScrollProcessingRef.current = false;
1555
- if (scrollLoadingTimeoutRef.current) {
1556
- clearTimeout(scrollLoadingTimeoutRef.current);
1557
- scrollLoadingTimeoutRef.current = null;
1558
- }
1559
- if (scrollThrottleTimeoutRef.current) {
1560
- clearTimeout(scrollThrottleTimeoutRef.current);
1561
- scrollThrottleTimeoutRef.current = null;
1562
- }
1563
- scrollContainerRef.current = null;
1564
- if (resetData && hasInteractedRef.current && !resetDataCalledRef.current && options.length > 0) {
1565
- prevOptionsBeforeResetRef.current = options;
1566
- setIsResettingData(true);
1567
- resetDataCalledRef.current = true;
1568
- resetDataCalledTimeRef.current = Date.now();
1569
- resetData();
1570
- } else if (!hasInteractedRef.current) {
1571
- if (searchTimeoutRef.current) {
1572
- clearTimeout(searchTimeoutRef.current);
1573
- searchTimeoutRef.current = null;
1574
- }
1575
- setIsSearching(false);
1576
- setIsResettingData(false);
1577
- lastSearchQueryRef.current = '';
1578
- }
1579
- hasInteractedRef.current = false;
1580
- }
1581
- setDropdownOpen(open);
1582
- }, [customPopupRender, value, onChange, tempValue, readOnly, disabled, resetSearch, resetData, options, isResettingData]);
1583
- const handleFooterDownload = (0, _react.useCallback)(() => {
1584
- const currentValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
1585
- onFooterDownloadChange == null || onFooterDownloadChange(currentValues);
1586
- }, [tempValue, onFooterDownloadChange]);
1587
- const handleUpload = (0, _react.useCallback)(() => {
1588
- onUpload == null || onUpload();
1589
- setDropdownOpen(false);
1590
- }, [onUpload]);
1591
- const handleSearchChange = (0, _react.useCallback)(e => {
1592
- const query = e.target.value;
1593
- setSearchText(query);
1594
- handleSearch(query);
1595
- }, [handleSearch]);
1596
- const handleSearchKeyDown = (0, _react.useCallback)(e => {
1597
- if (e.key === 'Backspace' || e.key === 'Delete') {
1598
- e.stopPropagation();
1599
- }
1600
- if (e.key === 'Escape' && searchText.length > 0) {
1601
- e.stopPropagation();
1602
- }
1603
- }, [searchText]);
1604
- const handleScroll = (0, _react.useCallback)(event => {
1605
- if (!onPopupScroll) return;
1606
- const target = event.target;
1607
- if (!target) return;
1608
- const isNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
1609
- if (!isNearBottom) {
1610
- isScrollProcessingRef.current = false;
1611
- return;
1612
- }
1613
- if (isScrollProcessingRef.current) return;
1614
- if (isLoadingOnScroll) return;
1615
- if (!hasMore) {
1616
- isScrollProcessingRef.current = false;
1617
- return;
1618
- }
1619
- if (scrollThrottleTimeoutRef.current) {
1620
- clearTimeout(scrollThrottleTimeoutRef.current);
1621
- }
1622
- isScrollProcessingRef.current = true;
1623
- scrollThrottleTimeoutRef.current = setTimeout(() => {
1624
- const stillNearBottom = Math.floor(target.scrollHeight - target.scrollTop) <= target.clientHeight;
1625
- if (!stillNearBottom || isLoadingOnScroll || !hasMore) {
1626
- isScrollProcessingRef.current = false;
1627
- return;
1628
- }
1629
- const currentOptions = optionsRef.current;
1630
- prevOptionsCountRef.current = currentOptions.length;
1631
- prevOptionsRefForScroll.current = currentOptions;
1632
- scrollTriggerOptionsCountRef.current = currentOptions.length;
1633
- setIsLoadingOnScroll(true);
1634
- if (scrollLoadingTimeoutRef.current) {
1635
- clearTimeout(scrollLoadingTimeoutRef.current);
1636
- scrollLoadingTimeoutRef.current = null;
1637
- }
1638
- hasInteractedRef.current = true;
1639
- onPopupScroll();
1640
- scrollLoadingTimeoutRef.current = setTimeout(() => {
1641
- setIsLoadingOnScroll(prev => {
1642
- if (prev) {
1643
- scrollLoadingTimeoutRef.current = null;
1644
- isScrollProcessingRef.current = false;
1645
- return false;
1646
- }
1647
- return prev;
1648
- });
1649
- }, _constants.TIMEOUTS.SCROLL_LOADING_TIMEOUT);
1650
- }, 150);
1651
- }, [onPopupScroll, isLoadingOnScroll, hasMore]);
1652
- (0, _react.useEffect)(() => {
1653
- if (!onPopupScroll || !dropdownOpen) return;
1654
- const timeoutId = setTimeout(() => {
1655
- const findScrollContainer = () => {
1656
- const dropdowns = document.querySelectorAll('.ant-select-dropdown:not(.ant-select-dropdown-hidden)');
1657
- if (dropdowns.length === 0) return null;
1658
- const dropdown = Array.from(dropdowns).pop();
1659
- if (!dropdown) return null;
1660
- const treeList = dropdown.querySelector('.ant-select-tree-list-holder');
1661
- if (treeList && treeList.scrollHeight > treeList.clientHeight) {
1662
- return treeList;
1663
- }
1664
- const virtualList = dropdown.querySelector('.rc-virtual-list-holder');
1665
- if (virtualList && virtualList.scrollHeight > virtualList.clientHeight) {
1666
- return virtualList;
1667
- }
1668
- if (dropdown.scrollHeight > dropdown.clientHeight) {
1669
- return dropdown;
1670
- }
1671
- return null;
1672
- };
1673
- const scrollContainer = findScrollContainer();
1674
- if (scrollContainer) {
1675
- scrollContainerRef.current = scrollContainer;
1676
- scrollContainer.addEventListener('scroll', handleScroll, {
1677
- passive: true
1678
- });
1679
- }
1680
- }, _constants.TIMEOUTS.SCROLL_CONTAINER_DELAY);
1681
- return () => {
1682
- clearTimeout(timeoutId);
1683
- if (scrollThrottleTimeoutRef.current) {
1684
- clearTimeout(scrollThrottleTimeoutRef.current);
1685
- scrollThrottleTimeoutRef.current = null;
1686
- }
1687
- if (scrollContainerRef.current) {
1688
- scrollContainerRef.current.removeEventListener('scroll', handleScroll);
1689
- scrollContainerRef.current = null;
1690
- }
1691
- isScrollProcessingRef.current = false;
1660
+ exports.__esModule = true;
1661
+ exports["default"] = void 0;
1662
+ var _antdV = __webpack_require__(4273);
1663
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
1664
+ var _react = _interopRequireWildcard(__webpack_require__(9206));
1665
+ var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
1666
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
1667
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
1668
+ var _CapTooltip = _interopRequireDefault(__webpack_require__(5636));
1669
+ var _constants = __webpack_require__(9788);
1670
+ var _CustomDropdown = __webpack_require__(8033);
1671
+ var _DropdownHeader = __webpack_require__(9315);
1672
+ var _enhanceOptions = __webpack_require__(1879);
1673
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
1674
+ var _useCapUnifiedSelect = __webpack_require__(480);
1675
+ var _jsxRuntime = __webpack_require__(4848);
1676
+ 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"];
1677
+ 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); }
1678
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
1679
+ 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); }
1680
+ 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; }
1681
+ const CapUnifiedSelect = _ref => {
1682
+ let {
1683
+ type = _constants.SELECT_TYPES.SELECT,
1684
+ options = [],
1685
+ value,
1686
+ onChange,
1687
+ placeholder = _constants.DEFAULTS.PLACEHOLDER,
1688
+ className = '',
1689
+ style,
1690
+ isError = false,
1691
+ errorMessage,
1692
+ containerClassName,
1693
+ popoverClassName,
1694
+ allowClear = false,
1695
+ headerLabel,
1696
+ onUpload,
1697
+ uploadLabel = _constants.DEFAULTS.UPLOAD_LABEL,
1698
+ tooltip,
1699
+ bylineText,
1700
+ disabled = false,
1701
+ showUpload = false,
1702
+ customPopupRender = true,
1703
+ showSearch = true,
1704
+ searchBasedOn = 'label',
1705
+ onSearch,
1706
+ searchDebounce = _constants.TIMEOUTS.DEFAULT_SEARCH_DEBOUNCE,
1707
+ onConfirm,
1708
+ clearText = _constants.DEFAULTS.CLEAR_TEXT,
1709
+ noResultCustomText = _constants.DEFAULTS.NO_RESULT_TEXT,
1710
+ noResultCustomIcon = _constants.DEFAULTS.NO_RESULT_ICON,
1711
+ readOnly = false,
1712
+ staticValue = true,
1713
+ onFooterDownloadChange,
1714
+ onPopupScroll,
1715
+ hasMore = true,
1716
+ enableVirtualization = false,
1717
+ virtualRowHeight = _constants.DEFAULTS.VIRTUAL_ROW_HEIGHT,
1718
+ resetSearch = true,
1719
+ resetData,
1720
+ fetchMissingOptions
1721
+ } = _ref,
1722
+ rest = _objectWithoutPropertiesLoose(_ref, _excluded);
1723
+ const isMulti = (0, _react.useMemo)(() => type === _constants.SELECT_TYPES.MULTI_SELECT || type === _constants.SELECT_TYPES.MULTI_TREE_SELECT, [type]);
1724
+ const {
1725
+ searchText,
1726
+ tempValue,
1727
+ setTempValue,
1728
+ dropdownOpen,
1729
+ isSearching,
1730
+ isLoadingOnScroll,
1731
+ isResettingData,
1732
+ filteredTree: rawFilteredTree,
1733
+ treeMaps,
1734
+ selectedLeafCount,
1735
+ displayValue,
1736
+ handleSearchChange,
1737
+ handleSearchKeyDown,
1738
+ handleConfirm,
1739
+ handleClearAll,
1740
+ handleDropdownVisibilityChange,
1741
+ handleSingleSelectChange,
1742
+ handleMultiSelectChange
1743
+ } = (0, _useCapUnifiedSelect.useCapUnifiedSelect)({
1744
+ type,
1745
+ options,
1746
+ value,
1747
+ onChange,
1748
+ staticValue,
1749
+ onSearch,
1750
+ searchDebounce,
1751
+ searchBasedOn,
1752
+ onConfirm,
1753
+ resetSearch,
1754
+ resetData,
1755
+ fetchMissingOptions,
1756
+ onPopupScroll,
1757
+ hasMore,
1758
+ customPopupRender,
1759
+ isMulti,
1760
+ disabled
1761
+ });
1762
+
1763
+ // Enhance filtered tree with React components
1764
+ const filteredTree = (0, _react.useMemo)(() => {
1765
+ if (!(rawFilteredTree != null && rawFilteredTree.length)) return [];
1766
+ return (0, _enhanceOptions.enhanceOptionsWithComponents)(rawFilteredTree, type);
1767
+ }, [rawFilteredTree, type]);
1768
+
1769
+ // Suffix icon with "more" tooltip
1770
+ const suffix = (0, _react.useMemo)(() => {
1771
+ const count = Array.isArray(displayValue) ? displayValue == null ? void 0 : displayValue.length : displayValue ? 1 : 0;
1772
+ const renderTooltipTitle = values => {
1773
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1774
+ className: _styles.default['cap-unified-select-more-tooltip-content'],
1775
+ children: values.map((val, idx) => /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1776
+ children: val
1777
+ }, "cap-unified-select-tooltip-item-" + val + "-" + idx))
1778
+ });
1692
1779
  };
1693
- }, [onPopupScroll, dropdownOpen, handleScroll]);
1694
- const renderHeader = (0, _react.useMemo)(() => {
1695
- if (!headerLabel && !tooltip) return null;
1696
1780
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
1697
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1698
- className: (0, _classnames.default)(_styles.default['cap-unified-select-header-wrapper'], disabled && _styles.default.disabled, _styles.default['cap-unified-select-header']),
1699
- children: [headerLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1700
- type: "label16",
1701
- className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-label']),
1702
- children: headerLabel
1703
- }), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
1704
- title: tooltip,
1705
- className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-tooltip']),
1706
- iconProps: {
1707
- disabled
1708
- }
1709
- })]
1710
- }), bylineText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1711
- className: _styles.default['cap-unified-select-header-byline-text'],
1712
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1713
- className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-byline-text']),
1714
- children: bylineText
1715
- })
1716
- })]
1717
- });
1718
- }, [headerLabel, tooltip, bylineText, disabled]);
1719
- const renderCustomDropdown = (0, _react.useCallback)(menu => {
1720
- if (!customPopupRender) return menu;
1721
- const currentItems = filteredTree;
1722
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1723
- className: (0, _classnames.default)(popoverClassName, _styles.default[type + "-popup-container"]),
1724
- children: [showSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1725
- className: _styles.default['cap-unified-select-search-container'],
1726
- align: "middle",
1727
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Input, {
1728
- prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1729
- type: "search",
1730
- size: "s",
1731
- className: _styles.default['cap-unified-select-search-icon']
1732
- }),
1733
- placeholder: _constants.DEFAULTS.SEARCH_PLACEHOLDER,
1734
- variant: "borderless",
1735
- value: searchText,
1736
- onChange: handleSearchChange,
1737
- onKeyDown: handleSearchKeyDown,
1738
- allowClear: true,
1739
- disabled: disabled
1740
- })
1741
- }), isMulti && showUpload && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1742
- className: _styles.default['cap-unified-select-upload-container'],
1743
- align: "middle",
1744
- onClick: handleUpload,
1745
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1746
- type: "upload",
1747
- size: "s",
1748
- className: _styles.default['cap-unified-select-upload-icon']
1749
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1750
- type: "label14",
1751
- className: _styles.default['cap-unified-select-upload-label'],
1752
- children: uploadLabel
1753
- })]
1754
- }), isMulti && staticValue && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectAllCheckbox, {
1755
- currentItems: currentItems,
1756
- tempValue: Array.isArray(tempValue) ? tempValue : undefined,
1757
- setTempValue: val => setTempValue(val),
1758
- processTreeData: _utils.buildTreeMaps,
1759
- disabled: disabled
1760
- }), currentItems.length === 0 ? isSearching || isResettingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1761
- className: _styles.default['cap-unified-select-loading-container'],
1762
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1763
- align: "middle",
1764
- justify: "center",
1765
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
1766
- size: "small"
1767
- })
1768
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1769
- align: "middle",
1770
- justify: "center",
1771
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1772
- type: "label14",
1773
- children: "Loading..."
1781
+ children: [isMulti && count > 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
1782
+ className: _styles.default['cap-unified-select-more-text'],
1783
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltip.default, {
1784
+ title: renderTooltipTitle(Array.isArray(displayValue) ? displayValue.slice(1) : []),
1785
+ placement: "bottom",
1786
+ overlayClassName: _styles.default['cap-unified-select-more-tooltip'],
1787
+ arrowPointAtCenter: true,
1788
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("span", {
1789
+ children: ["+", count - 1, " more"]
1774
1790
  })
1775
- })]
1776
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoResult, {
1777
- noResultCustomText: noResultCustomText,
1778
- className: className,
1779
- showUpload: showUpload,
1780
- options: options,
1781
- noResultCustomIcon: noResultCustomIcon
1782
- }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1783
- className: _styles.default['cap-unified-select-menu-wrapper'],
1784
- children: [menu, (isSearching || isResettingData) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1785
- className: _styles.default['cap-unified-select-loading-overlay'],
1786
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1787
- align: "middle",
1788
- justify: "center",
1789
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
1790
- size: "small"
1791
- })
1792
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1793
- align: "middle",
1794
- justify: "center",
1795
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1796
- type: "label14",
1797
- children: "Loading..."
1798
- })
1799
- })]
1800
- }), isLoadingOnScroll && onPopupScroll && hasMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1801
- className: _styles.default['cap-unified-select-loading-overlay'],
1802
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1803
- align: "middle",
1804
- justify: "center",
1805
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
1806
- size: "small"
1807
- })
1808
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1809
- align: "middle",
1810
- justify: "center",
1811
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1812
- type: "label14",
1813
- children: "Loading..."
1814
- })
1815
- })]
1816
- })]
1817
- }), currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
1818
- className: _styles.default['cap-unified-select-confirm-container'],
1819
- children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
1820
- className: _styles.default['cap-unified-select-confirm-button-group'],
1821
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
1822
- type: "primary",
1823
- size: "small",
1824
- className: _styles.default['cap-unified-select-confirm-button'],
1825
- onClick: handleConfirm,
1826
- disabled: disabled || selectedLeafCount === 0,
1827
- children: "Confirm"
1828
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
1829
- type: "text",
1830
- className: _styles.default['cap-unified-select-cancel-button'],
1831
- size: "small",
1832
- onClick: handleClearAll,
1833
- disabled: disabled,
1834
- children: clearText
1835
- }), onFooterDownloadChange && selectedLeafCount > 0 && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1836
- className: _styles.default['cap-unified-select-footer-download-container'],
1837
- align: "middle",
1838
- onClick: handleFooterDownload,
1839
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1840
- type: "download",
1841
- size: "s",
1842
- className: _styles.default['cap-unified-select-footer-download-icon']
1843
- }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
1844
- className: _styles.default['cap-unified-select-footer-download-label'],
1845
- children: [selectedLeafCount, " selected"]
1846
- })]
1847
- })]
1848
- })
1849
- }), (type === _constants.SELECT_TYPES.SELECT || type === _constants.SELECT_TYPES.TREE_SELECT) && allowClear && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
1850
- className: _styles.default['cap-unified-select-tree-clear-container'],
1851
- onClick: handleClearAll,
1852
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
1853
- className: _styles.default['cap-unified-select-tree-clear-label'],
1854
- children: clearText
1855
1791
  })
1792
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
1793
+ className: _styles.default['cap-unified-select-suffix-icon'],
1794
+ type: dropdownOpen ? 'up' : 'down',
1795
+ size: "xs"
1856
1796
  })]
1857
1797
  });
1858
- }, [customPopupRender, filteredTree, searchText, isMulti, showUpload, uploadLabel, handleUpload, noResultCustomText, noResultCustomIcon, options, type, tempValue, handleConfirm, handleClearAll, popoverClassName, className, selectedLeafCount, clearText, allowClear, staticValue, showSearch, onFooterDownloadChange, handleFooterDownload, isSearching, handleSearchChange, handleSearchKeyDown, isLoadingOnScroll, onPopupScroll, hasMore, isResettingData, disabled]);
1798
+ }, [isMulti, displayValue, dropdownOpen]);
1799
+
1800
+ // Prefix for multi-select (first selected item label)
1801
+ const prefix = (0, _react.useMemo)(() => {
1802
+ if (isMulti && Array.isArray(displayValue) && (displayValue == null ? void 0 : displayValue.length) > 0) {
1803
+ var _treeMaps$nodeMap;
1804
+ const firstLeafValue = displayValue.find(val => {
1805
+ var _treeMaps$leafValues;
1806
+ return treeMaps == null || (_treeMaps$leafValues = treeMaps.leafValues) == null ? void 0 : _treeMaps$leafValues.includes(val);
1807
+ });
1808
+ return firstLeafValue ? (treeMaps == null || (_treeMaps$nodeMap = treeMaps.nodeMap) == null || (_treeMaps$nodeMap = _treeMaps$nodeMap[firstLeafValue]) == null ? void 0 : _treeMaps$nodeMap.label) || null : null;
1809
+ }
1810
+ return null;
1811
+ }, [isMulti, displayValue, treeMaps]);
1812
+
1813
+ // Handle upload
1814
+ const handleUpload = () => {
1815
+ onUpload == null || onUpload();
1816
+ handleDropdownVisibilityChange(false);
1817
+ };
1818
+
1819
+ // Render custom dropdown
1820
+ const renderCustomDropdown = menu => {
1821
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomDropdown.CustomDropdown, {
1822
+ menu: menu,
1823
+ customPopupRender: customPopupRender,
1824
+ filteredTree: filteredTree,
1825
+ searchText: searchText,
1826
+ showSearch: showSearch,
1827
+ handleSearchChange: handleSearchChange,
1828
+ handleSearchKeyDown: handleSearchKeyDown,
1829
+ disabled: disabled,
1830
+ isMulti: isMulti,
1831
+ showUpload: showUpload,
1832
+ uploadLabel: uploadLabel,
1833
+ handleUpload: handleUpload,
1834
+ staticValue: staticValue,
1835
+ tempValue: tempValue,
1836
+ setTempValue: setTempValue,
1837
+ isSearching: isSearching,
1838
+ isResettingData: isResettingData,
1839
+ isLoadingOnScroll: isLoadingOnScroll,
1840
+ onPopupScroll: onPopupScroll,
1841
+ hasMore: hasMore,
1842
+ noResultCustomText: noResultCustomText,
1843
+ noResultCustomIcon: noResultCustomIcon,
1844
+ options: options,
1845
+ className: className,
1846
+ type: type,
1847
+ selectedLeafCount: selectedLeafCount,
1848
+ handleConfirm: handleConfirm,
1849
+ handleClearAll: handleClearAll,
1850
+ clearText: clearText,
1851
+ onFooterDownloadChange: onFooterDownloadChange,
1852
+ allowClear: allowClear,
1853
+ popoverClassName: popoverClassName
1854
+ });
1855
+ };
1859
1856
  const combinedClassName = (0, _react.useMemo)(() => (0, _classnames.default)(containerClassName, _styles.default['cap-unified-tree-select'], {
1860
1857
  [_styles.default['cap-unified-tree-select-readonly']]: readOnly
1861
1858
  }, className), [containerClassName, className, readOnly]);
1862
- const handleSingleSelectChange = (0, _react.useCallback)(newValue => {
1863
- if (disabled) {
1864
- return;
1865
- }
1866
- if (newValue !== initialTempValueRef.current) {
1867
- hasInteractedRef.current = true;
1868
- }
1869
- if (newValue === undefined || newValue === null) {
1870
- if (resetData && options.length > 0) {
1871
- prevOptionsBeforeResetRef.current = options;
1872
- setIsResettingData(true);
1873
- resetDataCalledRef.current = true;
1874
- resetDataCalledTimeRef.current = Date.now();
1875
- resetData();
1876
- }
1877
- }
1878
- onChange == null || onChange(newValue);
1879
- }, [onChange, resetData, options, disabled]);
1880
- const handleMultiSelectChange = (0, _react.useCallback)(newValue => {
1881
- if (disabled) {
1882
- return;
1883
- }
1884
- const initialValue = initialTempValueRef.current;
1885
- 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;
1886
- if (hasChanged) {
1887
- hasInteractedRef.current = true;
1888
- }
1889
- if (newValue === undefined || newValue === null || Array.isArray(newValue) && newValue.length === 0) {
1890
- if (resetData && options.length > 0) {
1891
- prevOptionsBeforeResetRef.current = options;
1892
- setIsResettingData(true);
1893
- resetDataCalledRef.current = true;
1894
- resetDataCalledTimeRef.current = Date.now();
1895
- resetData();
1896
- }
1897
- }
1898
- setTempValue(newValue);
1899
- }, [resetData, options, disabled]);
1900
1859
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
1901
1860
  className: className,
1902
- children: [renderHeader, /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.TreeSelect, _extends({
1861
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_DropdownHeader.DropdownHeader, {
1862
+ headerLabel: headerLabel,
1863
+ tooltip: tooltip,
1864
+ bylineText: bylineText,
1865
+ disabled: disabled
1866
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.TreeSelect, _extends({
1903
1867
  treeData: filteredTree,
1904
1868
  value: customPopupRender ? tempValue : value,
1905
1869
  treeNodeLabelProp: "label",
@@ -1927,7 +1891,7 @@ const CapUnifiedSelect = _ref => {
1927
1891
  onOpenChange: handleDropdownVisibilityChange,
1928
1892
  virtual: !enableVirtualization,
1929
1893
  popupMatchSelectWidth: false,
1930
- disabled: disabled,
1894
+ disabled: disabled || readOnly,
1931
1895
  filterTreeNode: false,
1932
1896
  listHeight: _constants.DEFAULTS.LIST_HEIGHT,
1933
1897
  listItemHeight: virtualRowHeight,
@@ -2653,6 +2617,209 @@ module.exports = insertBySelector;
2653
2617
 
2654
2618
  /***/ }),
2655
2619
 
2620
+ /***/ 8033:
2621
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
2622
+
2623
+ "use strict";
2624
+
2625
+
2626
+ exports.__esModule = true;
2627
+ exports.CustomDropdown = void 0;
2628
+ var _antdV = __webpack_require__(4273);
2629
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
2630
+ var _react = _interopRequireDefault(__webpack_require__(9206));
2631
+ var _CapIcon = _interopRequireDefault(__webpack_require__(8244));
2632
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
2633
+ var _CapRow = _interopRequireDefault(__webpack_require__(7375));
2634
+ var _CapSpin = _interopRequireDefault(__webpack_require__(1549));
2635
+ var _components = __webpack_require__(455);
2636
+ var _constants = __webpack_require__(9788);
2637
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
2638
+ var _utils = __webpack_require__(8052);
2639
+ var _jsxRuntime = __webpack_require__(4848);
2640
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
2641
+ const CustomDropdown = _ref => {
2642
+ let {
2643
+ menu,
2644
+ customPopupRender,
2645
+ filteredTree,
2646
+ searchText,
2647
+ showSearch,
2648
+ handleSearchChange,
2649
+ handleSearchKeyDown,
2650
+ disabled,
2651
+ isMulti,
2652
+ showUpload,
2653
+ uploadLabel,
2654
+ handleUpload,
2655
+ staticValue,
2656
+ tempValue,
2657
+ setTempValue,
2658
+ isSearching,
2659
+ isResettingData,
2660
+ isLoadingOnScroll,
2661
+ onPopupScroll,
2662
+ hasMore,
2663
+ noResultCustomText,
2664
+ noResultCustomIcon,
2665
+ options,
2666
+ className,
2667
+ type,
2668
+ selectedLeafCount,
2669
+ handleConfirm,
2670
+ handleClearAll,
2671
+ clearText,
2672
+ onFooterDownloadChange,
2673
+ allowClear,
2674
+ popoverClassName
2675
+ } = _ref;
2676
+ if (!customPopupRender) return menu;
2677
+ const currentItems = filteredTree;
2678
+ const handleFooterDownload = () => {
2679
+ const currentValues = Array.isArray(tempValue) ? tempValue : tempValue ? [tempValue] : [];
2680
+ onFooterDownloadChange == null || onFooterDownloadChange(currentValues);
2681
+ };
2682
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2683
+ className: (0, _classnames.default)(popoverClassName, _styles.default[type + "-popup-container"]),
2684
+ children: [showSearch && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2685
+ className: _styles.default['cap-unified-select-search-container'],
2686
+ align: "middle",
2687
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Input, {
2688
+ prefix: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
2689
+ type: "search",
2690
+ size: "s",
2691
+ className: _styles.default['cap-unified-select-search-icon']
2692
+ }),
2693
+ placeholder: _constants.DEFAULTS.SEARCH_PLACEHOLDER,
2694
+ variant: "borderless",
2695
+ value: searchText,
2696
+ onChange: handleSearchChange,
2697
+ onKeyDown: handleSearchKeyDown,
2698
+ allowClear: true,
2699
+ disabled: disabled
2700
+ })
2701
+ }), isMulti && showUpload && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
2702
+ className: _styles.default['cap-unified-select-upload-container'],
2703
+ align: "middle",
2704
+ onClick: handleUpload,
2705
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
2706
+ type: "upload",
2707
+ size: "s",
2708
+ className: _styles.default['cap-unified-select-upload-icon']
2709
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2710
+ type: "label14",
2711
+ className: _styles.default['cap-unified-select-upload-label'],
2712
+ children: uploadLabel
2713
+ })]
2714
+ }), isMulti && staticValue && currentItems.length > 0 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.SelectAllCheckbox, {
2715
+ currentItems: currentItems,
2716
+ tempValue: Array.isArray(tempValue) ? tempValue : undefined,
2717
+ setTempValue: val => setTempValue(val),
2718
+ processTreeData: _utils.buildTreeMaps,
2719
+ disabled: disabled
2720
+ }), currentItems.length === 0 ? isSearching || isResettingData ? /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2721
+ className: _styles.default['cap-unified-select-loading-container'],
2722
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2723
+ align: "middle",
2724
+ justify: "center",
2725
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
2726
+ size: "small"
2727
+ })
2728
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2729
+ align: "middle",
2730
+ justify: "center",
2731
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2732
+ type: "label14",
2733
+ children: "Loading..."
2734
+ })
2735
+ })]
2736
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.NoResult, {
2737
+ noResultCustomText: noResultCustomText,
2738
+ className: className,
2739
+ showUpload: showUpload,
2740
+ options: options,
2741
+ noResultCustomIcon: noResultCustomIcon
2742
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2743
+ className: _styles.default['cap-unified-select-menu-wrapper'],
2744
+ children: [menu, (isSearching || isResettingData) && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2745
+ className: _styles.default['cap-unified-select-loading-overlay'],
2746
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2747
+ align: "middle",
2748
+ justify: "center",
2749
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
2750
+ size: "small"
2751
+ })
2752
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2753
+ align: "middle",
2754
+ justify: "center",
2755
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2756
+ type: "label14",
2757
+ children: "Loading..."
2758
+ })
2759
+ })]
2760
+ }), isLoadingOnScroll && onPopupScroll && hasMore && /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2761
+ className: _styles.default['cap-unified-select-loading-overlay'],
2762
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2763
+ align: "middle",
2764
+ justify: "center",
2765
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapSpin.default, {
2766
+ size: "small"
2767
+ })
2768
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2769
+ align: "middle",
2770
+ justify: "center",
2771
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2772
+ type: "label14",
2773
+ children: "Loading..."
2774
+ })
2775
+ })]
2776
+ })]
2777
+ }), currentItems.length > 0 && isMulti && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
2778
+ className: _styles.default['cap-unified-select-confirm-container'],
2779
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
2780
+ className: _styles.default['cap-unified-select-confirm-button-group'],
2781
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
2782
+ type: "primary",
2783
+ size: "small",
2784
+ className: _styles.default['cap-unified-select-confirm-button'],
2785
+ onClick: handleConfirm,
2786
+ disabled: disabled || selectedLeafCount === 0,
2787
+ children: "Confirm"
2788
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_antdV.Button, {
2789
+ type: "text",
2790
+ className: _styles.default['cap-unified-select-cancel-button'],
2791
+ size: "small",
2792
+ onClick: handleClearAll,
2793
+ disabled: disabled,
2794
+ children: clearText
2795
+ }), onFooterDownloadChange && selectedLeafCount > 0 && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapRow.default, {
2796
+ className: _styles.default['cap-unified-select-footer-download-container'],
2797
+ align: "middle",
2798
+ onClick: handleFooterDownload,
2799
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_CapIcon.default, {
2800
+ type: "download",
2801
+ size: "s",
2802
+ className: _styles.default['cap-unified-select-footer-download-icon']
2803
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_CapLabel.default, {
2804
+ className: _styles.default['cap-unified-select-footer-download-label'],
2805
+ children: [selectedLeafCount, " selected"]
2806
+ })]
2807
+ })]
2808
+ })
2809
+ }), (type === _constants.SELECT_TYPES.SELECT || type === _constants.SELECT_TYPES.TREE_SELECT) && allowClear && !disabled && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapRow.default, {
2810
+ className: _styles.default['cap-unified-select-tree-clear-container'],
2811
+ onClick: handleClearAll,
2812
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
2813
+ className: _styles.default['cap-unified-select-tree-clear-label'],
2814
+ children: clearText
2815
+ })
2816
+ })]
2817
+ });
2818
+ };
2819
+ exports.CustomDropdown = CustomDropdown;
2820
+
2821
+ /***/ }),
2822
+
2656
2823
  /***/ 8052:
2657
2824
  /***/ ((__unused_webpack_module, exports) => {
2658
2825
 
@@ -2660,7 +2827,7 @@ module.exports = insertBySelector;
2660
2827
 
2661
2828
 
2662
2829
  exports.__esModule = true;
2663
- exports.reorderOptionsBySelection = exports.findValueInOptions = exports.findMissingValues = exports.filterTreeData = exports.countSelectedLeaves = exports.buildTreeMaps = void 0;
2830
+ exports.reorderOptionsBySelection = exports.prepareDataSource = exports.findValueInOptions = exports.findMissingValues = exports.filterTreeData = exports.countSelectedLeaves = exports.buildTreeMaps = void 0;
2664
2831
  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); }
2665
2832
  /**
2666
2833
  * Builds tree maps for efficient tree operations
@@ -2812,24 +2979,9 @@ const reorderOptionsBySelection = (opts, selectedOrder) => {
2812
2979
  return topLevelItem;
2813
2980
  }
2814
2981
 
2815
- // Recursively search in children
2816
- const searchInChildren = items => {
2817
- for (const item of items) {
2818
- if (item.value === targetValue) {
2819
- return true; // Found it
2820
- }
2821
- if (item.children && item.children.length > 0) {
2822
- if (searchInChildren(item.children)) {
2823
- return true;
2824
- }
2825
- }
2826
- }
2827
- return false;
2828
- };
2829
-
2830
2982
  // If found in this top-level item's children, return the top-level item
2831
2983
  if (topLevelItem.children && topLevelItem.children.length > 0) {
2832
- if (searchInChildren(topLevelItem.children)) {
2984
+ if (findValueInOptions(topLevelItem.children, targetValue)) {
2833
2985
  return topLevelItem;
2834
2986
  }
2835
2987
  }
@@ -2876,7 +3028,44 @@ const reorderOptionsBySelection = (opts, selectedOrder) => {
2876
3028
  // Return selected items first (in selection order), then unselected items
2877
3029
  return [...selectedItems, ...unselectedItems];
2878
3030
  };
3031
+
3032
+ /**
3033
+ * Prepares data source with virtual options for selected values not in current options
3034
+ * Returns raw options without React component enhancement
3035
+ */
2879
3036
  exports.reorderOptionsBySelection = reorderOptionsBySelection;
3037
+ const prepareDataSource = (options, orderedOptions, searchText, value, staticValue, selectedItemsCache) => {
3038
+ const sourceOptions = searchText.trim() ? options : orderedOptions || options;
3039
+ const selectedValues = Array.isArray(value) ? value : value ? [value] : [];
3040
+ const hasSearchQuery = searchText.trim().length > 0;
3041
+ const shouldAppendVirtualOptions = staticValue || !hasSearchQuery;
3042
+ const missingSelectedValues = [];
3043
+ if (shouldAppendVirtualOptions && selectedValues.length > 0) {
3044
+ selectedValues.forEach(val => {
3045
+ if (!findValueInOptions(sourceOptions, val)) {
3046
+ missingSelectedValues.push(val);
3047
+ }
3048
+ });
3049
+ }
3050
+ const virtualOptions = missingSelectedValues.map(val => {
3051
+ const cachedOption = selectedItemsCache.get(val);
3052
+ return _extends({
3053
+ value: val,
3054
+ label: (cachedOption == null ? void 0 : cachedOption.label) || String(val),
3055
+ key: (cachedOption == null ? void 0 : cachedOption.key) || val,
3056
+ title: cachedOption == null ? void 0 : cachedOption.title,
3057
+ optionSuffix: cachedOption == null ? void 0 : cachedOption.optionSuffix,
3058
+ optionSuffixInfo: cachedOption == null ? void 0 : cachedOption.optionSuffixInfo,
3059
+ optionTooltipInfo: cachedOption == null ? void 0 : cachedOption.optionTooltipInfo,
3060
+ disabled: cachedOption == null ? void 0 : cachedOption.disabled
3061
+ }, (cachedOption == null ? void 0 : cachedOption.children) && {
3062
+ children: cachedOption.children
3063
+ });
3064
+ });
3065
+ const allOptions = hasSearchQuery ? [...sourceOptions, ...virtualOptions] : [...virtualOptions, ...sourceOptions];
3066
+ return allOptions != null && allOptions.length ? allOptions : [];
3067
+ };
3068
+ exports.prepareDataSource = prepareDataSource;
2880
3069
 
2881
3070
  /***/ }),
2882
3071
 
@@ -2954,6 +3143,56 @@ module.exports = require("react");
2954
3143
 
2955
3144
  /***/ }),
2956
3145
 
3146
+ /***/ 9315:
3147
+ /***/ ((__unused_webpack_module, exports, __webpack_require__) => {
3148
+
3149
+ "use strict";
3150
+
3151
+
3152
+ exports.__esModule = true;
3153
+ exports.DropdownHeader = void 0;
3154
+ var _classnames = _interopRequireDefault(__webpack_require__(6942));
3155
+ var _react = _interopRequireDefault(__webpack_require__(9206));
3156
+ var _CapLabel = _interopRequireDefault(__webpack_require__(3737));
3157
+ var _CapTooltipWithInfo = _interopRequireDefault(__webpack_require__(2608));
3158
+ var _styles = _interopRequireDefault(__webpack_require__(8263));
3159
+ var _jsxRuntime = __webpack_require__(4848);
3160
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
3161
+ const DropdownHeader = _ref => {
3162
+ let {
3163
+ headerLabel,
3164
+ tooltip,
3165
+ bylineText,
3166
+ disabled = false
3167
+ } = _ref;
3168
+ if (!headerLabel && !tooltip) return null;
3169
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
3170
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)("div", {
3171
+ className: (0, _classnames.default)(_styles.default['cap-unified-select-header-wrapper'], disabled && _styles.default.disabled, _styles.default['cap-unified-select-header']),
3172
+ children: [headerLabel && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
3173
+ type: "label16",
3174
+ className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-label']),
3175
+ children: headerLabel
3176
+ }), tooltip && /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapTooltipWithInfo.default, {
3177
+ title: tooltip,
3178
+ className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-tooltip']),
3179
+ iconProps: {
3180
+ disabled
3181
+ }
3182
+ })]
3183
+ }), bylineText && /*#__PURE__*/(0, _jsxRuntime.jsx)("div", {
3184
+ className: _styles.default['cap-unified-select-header-byline-text'],
3185
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CapLabel.default, {
3186
+ className: (0, _classnames.default)(disabled && _styles.default.disabled, _styles.default['cap-unified-select-header-byline-text']),
3187
+ children: bylineText
3188
+ })
3189
+ })]
3190
+ });
3191
+ };
3192
+ exports.DropdownHeader = DropdownHeader;
3193
+
3194
+ /***/ }),
3195
+
2957
3196
  /***/ 9604:
2958
3197
  /***/ ((module, __unused_webpack_exports, __webpack_require__) => {
2959
3198
 
@@ -3020,12 +3259,13 @@ module.exports = ___CSS_LOADER_EXPORT___;
3020
3259
 
3021
3260
  exports.__esModule = true;
3022
3261
  exports.TIMEOUTS = exports.SELECT_TYPES = exports.DEFAULTS = void 0;
3023
- const SELECT_TYPES = exports.SELECT_TYPES = {
3024
- SELECT: 'select',
3025
- MULTI_SELECT: 'multiSelect',
3026
- TREE_SELECT: 'treeSelect',
3027
- MULTI_TREE_SELECT: 'multiTreeSelect'
3028
- };
3262
+ let SELECT_TYPES = exports.SELECT_TYPES = /*#__PURE__*/function (SELECT_TYPES) {
3263
+ SELECT_TYPES["SELECT"] = "select";
3264
+ SELECT_TYPES["MULTI_SELECT"] = "multiSelect";
3265
+ SELECT_TYPES["TREE_SELECT"] = "treeSelect";
3266
+ SELECT_TYPES["MULTI_TREE_SELECT"] = "multiTreeSelect";
3267
+ return SELECT_TYPES;
3268
+ }({});
3029
3269
  const TIMEOUTS = exports.TIMEOUTS = {
3030
3270
  DEFAULT_SEARCH_DEBOUNCE: 300,
3031
3271
  SEARCH_STATE_UPDATE_DELAY: 100,