@bikdotai/bik-component-library 0.0.868-beta.1 → 0.0.868-beta.11

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 (162) hide show
  1. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +1 -1
  2. package/dist/cjs/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  3. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +23 -10
  4. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
  5. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js +1 -1
  6. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
  7. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +1 -1
  8. package/dist/cjs/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
  9. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +1 -1
  10. package/dist/cjs/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js.map +1 -1
  11. package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +1 -1
  12. package/dist/cjs/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js.map +1 -1
  13. package/dist/cjs/components/dropdown/hooks/useDropdown.js +1 -1
  14. package/dist/cjs/components/dropdown/hooks/useDropdown.js.map +1 -1
  15. package/dist/esm/components/ProgressChecklist/ProgressChecklist.style.d.ts +24 -59
  16. package/dist/esm/components/QueryBuilder/components/Connectors/Connector.styled.d.ts +1 -4
  17. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNode.styled.d.ts +1 -4
  18. package/dist/esm/components/QueryBuilder/components/QueryBuilderNode/Property/PropertyNodeUIWrapper.styled.d.ts +3 -10
  19. package/dist/esm/components/QueryBuilder/components/QueryBuilderNodes.styled.d.ts +2 -7
  20. package/dist/esm/components/TablePagination/TablePagination.styled.d.ts +3 -8
  21. package/dist/esm/components/TablePagination/TablePaginationCard.d.ts +2 -4
  22. package/dist/esm/components/TypographyStyle.d.ts +62 -141
  23. package/dist/esm/components/WhatsAppTextEditor/AIRephrase.styled.d.ts +2 -5
  24. package/dist/esm/components/WhatsAppTextEditor/CustomEditor.styled.d.ts +7 -20
  25. package/dist/esm/components/WhatsAppTextEditor/WhatsAppTextEditorHeader.d.ts +1 -3
  26. package/dist/esm/components/access-token-troubleshoot-dialog/AccessTokenTroubleshootDialog.styles.d.ts +9 -26
  27. package/dist/esm/components/accordion/Accordion.style.d.ts +4 -10
  28. package/dist/esm/components/action-button/ActionButton.styled.d.ts +2 -5
  29. package/dist/esm/components/adbanner/Banner.styled.d.ts +20 -88
  30. package/dist/esm/components/add-variableV2/AddVariableBox.styled.d.ts +1 -4
  31. package/dist/esm/components/add-variableV2/AddVariableV2.styled.d.ts +4 -9
  32. package/dist/esm/components/agent-builder/AgentBuilder.styled.d.ts +186 -328
  33. package/dist/esm/components/agent-listing/AgentListing.styled.d.ts +49 -88
  34. package/dist/esm/components/alerts/Alert.styled.d.ts +5 -11
  35. package/dist/esm/components/analytics-card/AnalyticsCard.styled.d.ts +4 -8
  36. package/dist/esm/components/analytics-chips-and-dropdowns/CommonStyles.d.ts +18 -27
  37. package/dist/esm/components/analytics-chips-and-dropdowns/chart/ComparisonBarChart/ComparisonBarChart.styled.d.ts +11 -26
  38. package/dist/esm/components/analytics-chips-and-dropdowns/chart/FunnelChart/FunnelChart.styled.d.ts +11 -26
  39. package/dist/esm/components/analytics-chips-and-dropdowns/chart/HorizontalBarGraph/HorizontalGraph.styles.d.ts +2 -5
  40. package/dist/esm/components/analytics-chips-and-dropdowns/chart/LineChart/LineChart.styled.d.ts +5 -12
  41. package/dist/esm/components/analytics-chips-and-dropdowns/chart/StackedBarChart/StackedBarChart.styles.d.ts +3 -8
  42. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarAndLinearGraph/VerticalBarAndLinearGraph.styles.d.ts +6 -17
  43. package/dist/esm/components/analytics-chips-and-dropdowns/chart/VerticalBarGraph/VerticalGraph.styles.d.ts +2 -5
  44. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapStyled.d.ts +11 -28
  45. package/dist/esm/components/analytics-chips-and-dropdowns/chart/heatmap/HeatMapVertical.d.ts +1 -3
  46. package/dist/esm/components/analytics-chips-and-dropdowns/chart/linearChipGroupedChart/LinearChipGroupedChart.styled.d.ts +7 -18
  47. package/dist/esm/components/analytics-chips-and-dropdowns/chart/scoreBlock/ScoreBlock.styled.d.ts +7 -18
  48. package/dist/esm/components/avatar/Avatar.styled.d.ts +2 -4
  49. package/dist/esm/components/bik-chatbot/components/ChatWindow.d.ts +2 -4
  50. package/dist/esm/components/bik-layout/BikSidebarV2/SidebarV2Styles.d.ts +18 -49
  51. package/dist/esm/components/bik-layout/CommonStyles.d.ts +28 -88
  52. package/dist/esm/components/bik-layout/SidebarStyles.d.ts +7 -17
  53. package/dist/esm/components/button/Button.styled.d.ts +2 -4
  54. package/dist/esm/components/button/themes.d.ts +2 -16
  55. package/dist/esm/components/buttonGroup/ButtonGroupStyle.d.ts +4 -9
  56. package/dist/esm/components/card-selection-modal/CardSelectionModal.styled.d.ts +2 -7
  57. package/dist/esm/components/card-selector/CardSelector.styled.d.ts +3 -8
  58. package/dist/esm/components/carousel-preview/CarouselPreview.style.d.ts +4 -9
  59. package/dist/esm/components/carousel-secondary/CarouselSecondary.style.d.ts +11 -23
  60. package/dist/esm/components/channel-playground/shell/TestingPlayground.style.d.ts +18 -74
  61. package/dist/esm/components/checkBox/CheckBox.styled.d.ts +4 -9
  62. package/dist/esm/components/checkList/CheckList.styled.d.ts +1 -4
  63. package/dist/esm/components/code-block/CodeBlock.styled.d.ts +20 -43
  64. package/dist/esm/components/colourInput/ColourInput.styled.d.ts +2 -7
  65. package/dist/esm/components/connected-app-dialog/ConnectedAppDialog.styled.d.ts +16 -49
  66. package/dist/esm/components/country-code-picker/CountryCodePicker.styled.d.ts +3 -8
  67. package/dist/esm/components/country-code-picker/CountryPicker.styled.d.ts +3 -8
  68. package/dist/esm/components/curtain/Curtain.styled.d.ts +5 -11
  69. package/dist/esm/components/custom-date-time/CustomDateTime.styled.d.ts +1 -4
  70. package/dist/esm/components/dashboard-review-popup/DashboardReviewPopUp.styled.d.ts +2 -7
  71. package/dist/esm/components/dashboard-review-popup/components/FiveStar.styled.d.ts +2 -7
  72. package/dist/esm/components/dashboard-review-popup/components/Form.styled.d.ts +7 -20
  73. package/dist/esm/components/data-source-panel/DataSourcePanel.style.d.ts +4 -13
  74. package/dist/esm/components/datePicker/DatePicker.styled.d.ts +15 -22
  75. package/dist/esm/components/datePicker/DatePickerWrapper.styled.d.ts +4 -8
  76. package/dist/esm/components/discount-modal/DiscountModal.styled.d.ts +6 -17
  77. package/dist/esm/components/discount-modal/DynamicCoupon/DynamicCoupon.styled.d.ts +8 -23
  78. package/dist/esm/components/dropdown/ChipDropdown.d.ts +2 -4
  79. package/dist/esm/components/dropdown/Common.styled.d.ts +6 -15
  80. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js +74 -68
  81. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.js.map +1 -1
  82. package/dist/esm/components/dropdown/OpenedDropdown/components/OpennedDropdown.styled.d.ts +5 -12
  83. package/dist/esm/components/dropdown/OpenedDropdown/components/description/Description.styled.d.ts +2 -5
  84. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/FreeFormMenu.styled.d.ts +1 -4
  85. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.d.ts +9 -0
  86. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js +157 -123
  87. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuItem.js.map +1 -1
  88. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.d.ts +2 -0
  89. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js +145 -104
  90. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.js.map +1 -1
  91. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/MenuList.styled.d.ts +4 -18
  92. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js +36 -29
  93. package/dist/esm/components/dropdown/OpenedDropdown/components/menu/SelectAllMenu.js.map +1 -1
  94. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.d.ts +1 -0
  95. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js +39 -30
  96. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.js.map +1 -1
  97. package/dist/esm/components/dropdown/OpenedDropdown/components/multiSelect/MultiSelectDropdownBottomBar.styled.d.ts +1 -4
  98. package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.d.ts +3 -16
  99. package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js +41 -24
  100. package/dist/esm/components/dropdown/OpenedDropdown/utils/iterationOnOptions.js.map +1 -1
  101. package/dist/esm/components/dropdown/hooks/useDropdown.d.ts +3 -16
  102. package/dist/esm/components/dropdown/hooks/useDropdown.js +159 -149
  103. package/dist/esm/components/dropdown/hooks/useDropdown.js.map +1 -1
  104. package/dist/esm/components/dropdown/type.d.ts +17 -0
  105. package/dist/esm/components/dropdown-button/DropdownButton.style.d.ts +5 -9
  106. package/dist/esm/components/dual-icon-button/DualIconButton.styled.d.ts +5 -12
  107. package/dist/esm/components/file-uploader/FileUploaderStyle.d.ts +4 -9
  108. package/dist/esm/components/floating-action-button/FloatingActionButton.styles.d.ts +13 -24
  109. package/dist/esm/components/half-doughnut-chart/HalfDoughnutChart.styled.d.ts +10 -29
  110. package/dist/esm/components/icon-button/IconButton.styled.d.ts +2 -4
  111. package/dist/esm/components/input/Input.styled.d.ts +29 -114
  112. package/dist/esm/components/keywords-input/KeywordsInput.styled.d.ts +1 -4
  113. package/dist/esm/components/list-item/ListItem.styled.d.ts +2 -4
  114. package/dist/esm/components/list-item/themes.d.ts +1 -1
  115. package/dist/esm/components/modals/modal.styled.d.ts +7 -16
  116. package/dist/esm/components/multi-level-dropdown/MultiLevelDropdown.styled.d.ts +22 -60
  117. package/dist/esm/components/navigation-hyperlink/NavigationHyperlink.d.ts +1 -3
  118. package/dist/esm/components/pagination/Pagination.styled.d.ts +1 -4
  119. package/dist/esm/components/plans/DurationSelectorStyles.d.ts +1 -4
  120. package/dist/esm/components/plans/SubscriptionPlanSelector.d.ts +2 -6
  121. package/dist/esm/components/plans/SubscriptionPlanStyled.d.ts +4 -9
  122. package/dist/esm/components/postPicker/PostPicker.styled.d.ts +13 -43
  123. package/dist/esm/components/product-picker/ProductPicker.styled.d.ts +2 -7
  124. package/dist/esm/components/product-picker-v2/style.d.ts +25 -82
  125. package/dist/esm/components/progress-bar/ProgressBarComponent.d.ts +2 -5
  126. package/dist/esm/components/radioButton/RadioButton.styled.d.ts +3 -8
  127. package/dist/esm/components/radioList/RadioList.styled.d.ts +1 -4
  128. package/dist/esm/components/shimmer/ShimmerComponent/ShimmerStyled.d.ts +4 -9
  129. package/dist/esm/components/side-modal/SideModal.style.d.ts +12 -25
  130. package/dist/esm/components/spinner/Spinner.d.ts +2 -4
  131. package/dist/esm/components/states/StateComponent.styled.d.ts +9 -20
  132. package/dist/esm/components/stepper/Stepper.styled.d.ts +4 -10
  133. package/dist/esm/components/switch/Switch.d.ts +6 -12
  134. package/dist/esm/components/tabs/Tabs.styles.d.ts +9 -30
  135. package/dist/esm/components/tag/Tag.styled.d.ts +2 -4
  136. package/dist/esm/components/template-context-mapper/Badge/index.d.ts +2 -5
  137. package/dist/esm/components/template-context-mapper/modalElements/EditMediaV2.style.d.ts +5 -14
  138. package/dist/esm/components/template-context-mapper/modalElements/VariableConnector.d.ts +2 -4
  139. package/dist/esm/components/template-context-mapper/modalElements/VariableConnectorsPanel.d.ts +2 -7
  140. package/dist/esm/components/template-context-mapper/styles/TemplateAnalyticsStyles.d.ts +6 -24
  141. package/dist/esm/components/template-context-mapper/utils/TemplateConstants.d.ts +8 -16
  142. package/dist/esm/components/template-preview/EmailTemplatePreview.styled.d.ts +10 -23
  143. package/dist/esm/components/template-preview/RCS/RCSPreview.styled.d.ts +20 -70
  144. package/dist/esm/components/template-preview/SMS/SMSBubble.d.ts +2 -7
  145. package/dist/esm/components/template-preview/SmsTemplatePreview.styled.d.ts +10 -27
  146. package/dist/esm/components/template-preview/TemplatePreview.styled.d.ts +1 -4
  147. package/dist/esm/components/template-preview/WhatsApp/ChatHeader.style.d.ts +5 -16
  148. package/dist/esm/components/template-preview/WhatsApp/ChatUI.style.d.ts +11 -53
  149. package/dist/esm/components/template-preview/WhatsApp/ChatUiV2.d.ts +1 -3
  150. package/dist/esm/components/template-preview/WhatsApp/LimitedTimeOffer/LimitedTimeOffer.index.d.ts +3 -9
  151. package/dist/esm/components/template-preview/webpush/WebpushPreview.styled.d.ts +1 -4
  152. package/dist/esm/components/testimonial-card/TestimonialCard.style.d.ts +11 -30
  153. package/dist/esm/components/thumbnail/Thumbnail.styled.d.ts +2 -4
  154. package/dist/esm/components/toaster/Toaster.styled.d.ts +2 -4
  155. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryCountIntentWiseModal.style.d.ts +1 -4
  156. package/dist/esm/components/unsatisfactory-response-list/UnsatisfactoryResponseList.style.d.ts +1 -4
  157. package/dist/esm/components/variable-picker-v3/styles.d.ts +6 -15
  158. package/dist/esm/components/vertical-full-screen-modal/styles.d.ts +6 -15
  159. package/dist/esm/components/whats-new/WhatsNew.styles.d.ts +7 -18
  160. package/dist/esm/editor/BikEditor.styles.d.ts +7 -18
  161. package/dist/esm/editor/extensions/editorDropdown.styles.d.ts +12 -47
  162. package/package.json +4 -3
@@ -1 +1 @@
1
- {"version":3,"file":"useDropdown.js","sources":["../../../../../src/components/dropdown/hooks/useDropdown.tsx"],"sourcesContent":["import debounce from 'lodash/debounce';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { SelectAllCheckboxState } from '../OpenedDropdown/components/menu/SelectAllMenu';\nimport {\n\titerateOnOptions,\n\titerateOnOptionsRaw,\n} from '../OpenedDropdown/utils/iterationOnOptions';\nimport { DropdownOption, GroupedOption, SingleOption } from '../type';\n\nexport const useDropdown = (\n\tversion = '1.0',\n\toptions: DropdownOption[],\n\tonSelect: ((option: DropdownOption | DropdownOption[]) => void) | undefined,\n\tskipSorting?: boolean,\n\tisMultiSelect?: boolean,\n\tonSearch?: (searchKey: string) => Promise<DropdownOption[]>,\n\tdisableOtherSearchedOption?: boolean,\n\tdisableSearchedOptionExcept: string[] = [],\n\tmaxSelections?: number,\n) => {\n\tconst [dropdownOptions, setDropdownOptions] = useState(options ?? []);\n\tconst [searchedOptions, setSearchedOptions] = useState<DropdownOption[]>([]);\n\tconst [searchedString, setSearchedString] = useState('');\n\tconst [searchError, setSearchError] = useState<string | undefined>(undefined);\n\tconst latestDropdownOptionsRef = useRef(dropdownOptions);\n\t/** Store latest onSearch so performSearch/debouncedSearch stay stable when parent re-renders with new callback reference. */\n\tconst onSearchRef = useRef(onSearch);\n\n\tuseEffect(() => {\n\t\tonSearchRef.current = onSearch;\n\t}, [onSearch]);\n\n\tuseEffect(() => {\n\t\tlatestDropdownOptionsRef.current = dropdownOptions;\n\n\t\tif (searchedOptions.length && searchedString && onSearch) {\n\t\t\tlet searchedOptionsClone = [...searchedOptions] as SingleOption[];\n\t\t\tconst dropdownOptionFlat = dropdownOptions\n\t\t\t\t.map((option) => {\n\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\treturn (option as GroupedOption).options.map((op) => ({\n\t\t\t\t\t\t\tvalue: op.value,\n\t\t\t\t\t\t\tselected: op.selected,\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t\tconst op = option as SingleOption;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: op.value,\n\t\t\t\t\t\tselected: op.selected,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.flat();\n\n\t\t\tsearchedOptionsClone = searchedOptionsClone.map((option) => {\n\t\t\t\tconst selectedDropdownOption = dropdownOptionFlat.find(\n\t\t\t\t\t(dropdownOption) => {\n\t\t\t\t\t\tif (option.value === dropdownOption.value) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tif (selectedDropdownOption) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tselected: selectedDropdownOption.selected,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\t// disable other options except selected in searched options\n\t\t\tif (disableOtherSearchedOption) {\n\t\t\t\tsearchedOptionsClone = searchedOptionsClone.map((option) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tdisabled: !disableSearchedOptionExcept.includes(option.value),\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (isMultiSelect && !skipSorting) {\n\t\t\t\tsetSearchedOptions([\n\t\t\t\t\t...searchedOptionsClone.sort((option) =>\n\t\t\t\t\t\t(option as SingleOption).selected ? -1 : 1,\n\t\t\t\t\t),\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\tsetSearchedOptions([...searchedOptionsClone]);\n\t\t\t}\n\t\t}\n\t}, [dropdownOptions]);\n\n\tuseEffect(() => {\n\t\tif (options) {\n\t\t\tconst writeOptions = [...options];\n\t\t\tif (isMultiSelect && !skipSorting) {\n\t\t\t\tsetDropdownOptions([\n\t\t\t\t\t...writeOptions.sort((option) =>\n\t\t\t\t\t\t(option as SingleOption).selected ? -1 : 1,\n\t\t\t\t\t),\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\tsetDropdownOptions([...writeOptions]);\n\t\t\t}\n\t\t}\n\t}, [options]);\n\n\tconst getSelectedOptions = (data: DropdownOption[]) => {\n\t\tconst selectedOptions: DropdownOption[] = [];\n\t\tdata.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\tconst groupedOptions = (option as GroupedOption).options.filter(\n\t\t\t\t\t(op) => op.selected === true,\n\t\t\t\t);\n\t\t\t\tselectedOptions.push({\n\t\t\t\t\t...option,\n\t\t\t\t\toptions: [...groupedOptions],\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tif ((option as SingleOption).selected) {\n\t\t\t\t\tselectedOptions.push({ ...option });\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn selectedOptions;\n\t};\n\n\t// Count current selections for max selection limit\n\tconst getCurrentSelectionCount = (data: DropdownOption[]) => {\n\t\tlet count = 0;\n\t\tdata.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\tcount += (option as GroupedOption).options.filter(\n\t\t\t\t\t(op) => op.selected === true,\n\t\t\t\t).length;\n\t\t\t} else {\n\t\t\t\tif ((option as SingleOption).selected) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn count;\n\t};\n\n\t// Check if max selections limit is reached\n\tconst isMaxSelectionsReached = (data: DropdownOption[]) => {\n\t\tif (!isMultiSelect || (!maxSelections && maxSelections !== 0)) return false;\n\t\treturn getCurrentSelectionCount(data) >= maxSelections;\n\t};\n\n\t/** Reads onSearch from ref so it stays stable ([] deps). No-ops when onSearchRef.current is undefined. */\n\tconst performSearch = useCallback(async (searchKey: string) => {\n\t\tconst onSearchFn = onSearchRef.current;\n\t\tif (!searchKey || !onSearchFn) return;\n\n\t\tconst selectedIds: (string | number)[] = [];\n\t\titerateOnOptionsRaw(latestDropdownOptionsRef.current, (option) => {\n\t\t\tif (option.selected && !selectedIds.includes(option.value)) {\n\t\t\t\tselectedIds.push(option.value);\n\t\t\t}\n\t\t});\n\n\t\ttry {\n\t\t\tconst response = await onSearchFn(searchKey);\n\t\t\tsetSearchError(undefined);\n\t\t\tif (response) {\n\t\t\t\tconst updatedResponseData = response.map((option) => {\n\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\tconst groupedOption = option as GroupedOption;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...groupedOption,\n\t\t\t\t\t\t\toptions: groupedOption.options.map((op) => ({\n\t\t\t\t\t\t\t\t...op,\n\t\t\t\t\t\t\t\tselected: selectedIds.includes(op.value),\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tselected: selectedIds.includes((option as SingleOption).value),\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tsetSearchedOptions([...updatedResponseData]);\n\t\t\t} else {\n\t\t\t\tsetSearchedOptions([]);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetSearchedOptions([]);\n\t\t\tsetSearchError(\n\t\t\t\terror instanceof Error\n\t\t\t\t\t? error.message\n\t\t\t\t\t: 'Something went wrong while fetching the list. Please try again',\n\t\t\t);\n\t\t}\n\t}, []);\n\n\t/** Independent of onSearch so debounce is stable when callers pass inline functions. Pending searches are preserved across parent re-renders. performSearch no-ops when onSearchRef.current is undefined. */\n\tconst debouncedSearch = useMemo(\n\t\t() => debounce(performSearch, 300),\n\t\t[performSearch],\n\t);\n\n\tuseEffect(() => () => debouncedSearch?.cancel(), [debouncedSearch]);\n\n\tfunction search(searchKey: string) {\n\t\tsetSearchedString(searchKey);\n\t\tsetSearchedOptions([]);\n\t\tsetSearchError(undefined);\n\n\t\tif (!searchKey) {\n\t\t\tdebouncedSearch?.cancel();\n\t\t\treturn;\n\t\t}\n\n\t\tdebouncedSearch(searchKey);\n\t}\n\n\tfunction retrySearch() {\n\t\tif (searchedString) {\n\t\t\tsetSearchError(undefined);\n\t\t\tperformSearch(searchedString);\n\t\t}\n\t}\n\n\t/**\n\t * wrapper to prepare option for onSelect\n\t * for single select, this will call the onClose handler ,\n\t * for multiselect, it will do state update for options list\n\t * \t\tto make any option select,\n\t * \t\t\t\tonApplyHandler({ label, value: selected: true })\n\t * to deselect any option\n\t * \t\t\t\tonApplyHandler({ label, value: selected: false })\n\t * @param optionSelect\n\t */\n\tfunction onApplyHandler(optionSelect: SingleOption, returnOnly?: boolean) {\n\t\tif (!isMultiSelect) {\n\t\t\tonSelect?.(optionSelect);\n\t\t} else {\n\t\t\t// Check if trying to select and max selections is reached\n\t\t\tif (\n\t\t\t\toptionSelect.selected &&\n\t\t\t\tmaxSelections &&\n\t\t\t\tisMaxSelectionsReached(dropdownOptions)\n\t\t\t) {\n\t\t\t\t// Max selections reached, don't allow new selections\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (searchedOptions.length && searchedString && onSearch) {\n\t\t\t\t/** Search mode */\n\t\t\t\t/**\n\t\t\t\t * on selected, push it to dropdown options,\n\t\t\t\t * on un-select, remove from dropdown option\n\t\t\t\t */\n\n\t\t\t\tif (optionSelect.selected) {\n\t\t\t\t\t// Check max selections for search mode too\n\t\t\t\t\tif (maxSelections && isMaxSelectionsReached(dropdownOptions)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t/** check if already there or not,\n\t\t\t\t\t * if yes, just update\n\t\t\t\t\t * else ,\n\t\t\t\t\t * \tappend\n\t\t\t\t\t */\n\n\t\t\t\t\tlet alreadyPresentInInitialOptions = false;\n\t\t\t\t\tconst currList = iterateOnOptions(\n\t\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t\t{ selected: optionSelect.selected } as Partial<SingleOption>,\n\t\t\t\t\t\t(optionForValidation: SingleOption) => {\n\t\t\t\t\t\t\tif (optionForValidation.value === optionSelect.value) {\n\t\t\t\t\t\t\t\talreadyPresentInInitialOptions = true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tif (!alreadyPresentInInitialOptions) {\n\t\t\t\t\t\tcurrList.push(optionSelect);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (returnOnly) {\n\t\t\t\t\t\treturn [...currList];\n\t\t\t\t\t}\n\t\t\t\t\tsetDropdownOptions([...currList]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(currList);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/** un-select,\n\t\t\t\t\t * if already present in initial data,\n\t\t\t\t\t * yes, just update\n\t\t\t\t\t * else,\n\t\t\t\t\t * \tremove\n\t\t\t\t\t */\n\n\t\t\t\t\tlet alreadyPresentInInitialOptions = false;\n\t\t\t\t\tlet currList = iterateOnOptions(\n\t\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t\t{ selected: optionSelect.selected } as Partial<SingleOption>,\n\t\t\t\t\t\t(optionForValidation: SingleOption) => {\n\t\t\t\t\t\t\tif (optionForValidation.value === optionSelect.value) {\n\t\t\t\t\t\t\t\talreadyPresentInInitialOptions = true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tif (alreadyPresentInInitialOptions) {\n\t\t\t\t\t\tcurrList = currList.filter((option) => {\n\t\t\t\t\t\t\tif (option.value === optionSelect.value) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (returnOnly) {\n\t\t\t\t\t\treturn [...currList];\n\t\t\t\t\t}\n\t\t\t\t\tsetDropdownOptions([...currList]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(currList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst currList = iterateOnOptions(\n\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t{ selected: optionSelect.selected } as Partial<SingleOption>,\n\t\t\t\t\t(optionForValidation: SingleOption) =>\n\t\t\t\t\t\toptionForValidation.value === optionSelect.value,\n\t\t\t\t);\n\n\t\t\t\tif (returnOnly) {\n\t\t\t\t\treturn [...currList];\n\t\t\t\t}\n\t\t\t\tsetDropdownOptions([...currList]);\n\t\t\t\tif (version === '2.0') {\n\t\t\t\t\tonMultiSelectApply(currList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction selectAllForSearch(select: boolean) {\n\t\t// const allSearchedValues = searchedOptions.map(option => option.value);\n\t\tlet clonedDropdownOptions = [...dropdownOptions];\n\n\t\tif (select) {\n\t\t\tsearchedOptions.forEach((option) => {\n\t\t\t\tlet found = false;\n\t\t\t\tclonedDropdownOptions = clonedDropdownOptions.map((dOption) => {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof singleOption.value !== 'undefined' &&\n\t\t\t\t\t\tsingleOption.value === (dOption as SingleOption).value\n\t\t\t\t\t) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...dOption,\n\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn dOption;\n\t\t\t\t});\n\n\t\t\t\tif (!found) {\n\t\t\t\t\tclonedDropdownOptions.push({ ...option, selected: true });\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsearchedOptions.forEach((option) => {\n\t\t\t\tclonedDropdownOptions = clonedDropdownOptions.map((dOption) => {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof singleOption.value !== 'undefined' &&\n\t\t\t\t\t\tsingleOption.value === (dOption as SingleOption).value\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...dOption,\n\t\t\t\t\t\t\tselected: false,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn dOption;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tsetDropdownOptions([...clonedDropdownOptions]);\n\t\tif (version === '2.0') {\n\t\t\tonMultiSelectApply(clonedDropdownOptions);\n\t\t}\n\t}\n\n\tfunction selectAllForSearchWithLimit(select: boolean) {\n\t\tlet clonedDropdownOptions = [...dropdownOptions];\n\n\t\tif (select && maxSelections && maxSelections > 0) {\n\t\t\tconst currentCount = getCurrentSelectionCount(clonedDropdownOptions);\n\t\t\tconst remainingSlots = maxSelections - currentCount;\n\n\t\t\tif (remainingSlots <= 0) {\n\t\t\t\t// Already at max, don't select any more\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet selectedCount = 0;\n\t\t\tsearchedOptions.forEach((option) => {\n\t\t\t\tif (selectedCount >= remainingSlots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet found = false;\n\t\t\t\tclonedDropdownOptions = clonedDropdownOptions.map((dOption) => {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\t// Skip if already selected\n\t\t\t\t\tif ((dOption as SingleOption).selected) {\n\t\t\t\t\t\treturn dOption;\n\t\t\t\t\t}\n\t\t\t\t\t// Skip if disabled\n\t\t\t\t\tif ((dOption as SingleOption).disabled) {\n\t\t\t\t\t\treturn dOption;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof singleOption.value !== 'undefined' &&\n\t\t\t\t\t\tsingleOption.value === (dOption as SingleOption).value\n\t\t\t\t\t) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...dOption,\n\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn dOption;\n\t\t\t\t});\n\n\t\t\t\tif (!found && selectedCount < remainingSlots) {\n\t\t\t\t\tconst newOption = option as SingleOption;\n\t\t\t\t\tif (!newOption.disabled) {\n\t\t\t\t\t\tclonedDropdownOptions.push({ ...option, selected: true });\n\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetDropdownOptions([...clonedDropdownOptions]);\n\t\t\tif (version === '2.0') {\n\t\t\t\tonMultiSelectApply(clonedDropdownOptions);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction selectAllHandler(newState: SelectAllCheckboxState) {\n\t\tif (searchedOptions.length && searchedString && onSearch) {\n\t\t\tif (newState === 'selectAll') {\n\t\t\t\tselectAllForSearchWithLimit(true);\n\t\t\t} else {\n\t\t\t\tselectAllForSearch(false);\n\t\t\t}\n\t\t} else {\n\t\t\tif (newState === 'selectAll') {\n\t\t\t\tif (maxSelections && maxSelections > 0) {\n\t\t\t\t\t// Only select up to maxSelections limit\n\t\t\t\t\tconst currentCount = getCurrentSelectionCount(dropdownOptions);\n\t\t\t\t\tconst remainingSlots = maxSelections - currentCount;\n\n\t\t\t\t\tif (remainingSlots <= 0) {\n\t\t\t\t\t\t// Already at max, don't select any more\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet selectedCount = 0;\n\t\t\t\t\tconst newOptions = dropdownOptions.map((option) => {\n\t\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\t\t// Handle grouped options\n\t\t\t\t\t\t\tconst groupedOption = option as GroupedOption;\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...groupedOption,\n\t\t\t\t\t\t\t\toptions: groupedOption.options.map((op) => {\n\t\t\t\t\t\t\t\t\t// Skip disabled options\n\t\t\t\t\t\t\t\t\tif (op.disabled) {\n\t\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Check if already selected\n\t\t\t\t\t\t\t\t\tif (op.selected) {\n\t\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Check search filter\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tsearchedString &&\n\t\t\t\t\t\t\t\t\t\t!op.label\n\t\t\t\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase())\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Select if we have remaining slots\n\t\t\t\t\t\t\t\t\tif (selectedCount < remainingSlots) {\n\t\t\t\t\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t\t\t\t\t\treturn { ...op, selected: true };\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\t\t\t// Skip disabled options\n\t\t\t\t\t\t\tif (singleOption.disabled) {\n\t\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Check if already selected\n\t\t\t\t\t\t\tif (singleOption.selected) {\n\t\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Check search filter\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tsearchedString &&\n\t\t\t\t\t\t\t\t!singleOption.label\n\t\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase())\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Select if we have remaining slots\n\t\t\t\t\t\t\tif (selectedCount < remainingSlots) {\n\t\t\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t\t\t\treturn { ...option, selected: true };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tsetDropdownOptions([...newOptions]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(newOptions);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No max selection limit, select all\n\t\t\t\t\tconst newOptions = iterateOnOptions(\n\t\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t\t{ selected: true },\n\t\t\t\t\t\t(option) =>\n\t\t\t\t\t\t\tsearchedString\n\t\t\t\t\t\t\t\t? option.label\n\t\t\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase()) && !option.disabled\n\t\t\t\t\t\t\t\t: !option.disabled,\n\t\t\t\t\t);\n\t\t\t\t\tsetDropdownOptions([...newOptions]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(newOptions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (newState === 'notSelected') {\n\t\t\t\tconst newOptions = iterateOnOptions(\n\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t{ selected: false },\n\t\t\t\t\t(option) => !option.disabled,\n\t\t\t\t);\n\t\t\t\tsetDropdownOptions([...newOptions]);\n\t\t\t\tif (version === '2.0') {\n\t\t\t\t\tonMultiSelectApply(newOptions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction onMultiSelectClear() {\n\t\tconst newOptions = iterateOnOptions(dropdownOptions, { selected: false });\n\t\tsetDropdownOptions([...newOptions]);\n\t\tif (version === '2.0') {\n\t\t\tonMultiSelectApply(newOptions);\n\t\t}\n\t}\n\n\tfunction onFreeFormSelect(selected: boolean) {\n\t\tif (!isMultiSelect) {\n\t\t\tonApplyHandler({\n\t\t\t\tlabel: searchedString,\n\t\t\t\tvalue: searchedString,\n\t\t\t\tisFreeForm: true,\n\t\t\t\tselected: true,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst updatedList = dropdownOptions.map((option) =>\n\t\t\t(option as GroupedOption).options\n\t\t\t\t? option\n\t\t\t\t: {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tselected:\n\t\t\t\t\t\t\t/** free form check */\n\t\t\t\t\t\t\toption.label === searchedString &&\n\t\t\t\t\t\t\t(option as SingleOption).value === searchedString\n\t\t\t\t\t\t\t\t? /** to mark as selected or not */\n\t\t\t\t\t\t\t\t selected\n\t\t\t\t\t\t\t\t: (option as SingleOption).selected,\n\t\t\t\t },\n\t\t);\n\n\t\tif (selected) {\n\t\t\tif (\n\t\t\t\t!updatedList.some(\n\t\t\t\t\t(option) =>\n\t\t\t\t\t\toption.label === searchedString &&\n\t\t\t\t\t\t(option as SingleOption).value === searchedString,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tupdatedList.unshift({\n\t\t\t\t\tlabel: searchedString,\n\t\t\t\t\tvalue: searchedString,\n\t\t\t\t\tisFreeForm: true,\n\t\t\t\t\tselected: true,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tsetDropdownOptions([...updatedList]);\n\t\tif (version === '2.0') {\n\t\t\tonMultiSelectApply(updatedList);\n\t\t}\n\t}\n\n\t/**\n\t * This is called when appy button is called,\n\t * here iterate and pick all options where selected if true.\n\t */\n\tfunction onMultiSelectApply(options?: DropdownOption[]) {\n\t\tconst optionsToSend: DropdownOption[] = getSelectedOptions(\n\t\t\toptions ?? latestDropdownOptionsRef.current,\n\t\t);\n\n\t\tonSelect?.([...optionsToSend]);\n\t}\n\n\treturn {\n\t\tlatestDropdownOptionsRef,\n\t\tdropdownOptions,\n\t\tsearch,\n\t\tsearchedString,\n\t\tsearchedOptions,\n\t\tsearchError,\n\t\tretrySearch,\n\t\tonApplyHandler,\n\t\tselectAllHandler,\n\t\tonMultiSelectClear,\n\t\tonFreeFormSelect,\n\t\tonMultiSelectApply,\n\t\tgetSelectedOptions,\n\t\tgetCurrentSelectionCount,\n\t\tisMaxSelectionsReached,\n\t\tmaxSelections,\n\t};\n};\n"],"names":["useDropdown","version","options","onSelect","skipSorting","isMultiSelect","onSearch","disableOtherSearchedOption","disableSearchedOptionExcept","maxSelections","dropdownOptions","setDropdownOptions","useState","searchedOptions","setSearchedOptions","searchedString","setSearchedString","searchError","setSearchError","latestDropdownOptionsRef","useRef","onSearchRef","useEffect","searchedOptionsClone","dropdownOptionFlat","option","op","selectedDropdownOption","dropdownOption","writeOptions","getSelectedOptions","data","selectedOptions","groupedOptions","getCurrentSelectionCount","count","isMaxSelectionsReached","performSearch","useCallback","searchKey","onSearchFn","selectedIds","iterateOnOptionsRaw","response","updatedResponseData","groupedOption","error","debouncedSearch","useMemo","debounce","search","retrySearch","onApplyHandler","optionSelect","returnOnly","alreadyPresentInInitialOptions","currList","iterateOnOptions","optionForValidation","onMultiSelectApply","selectAllForSearch","select","clonedDropdownOptions","dOption","singleOption","selectAllForSearchWithLimit","currentCount","remainingSlots","selectedCount","found","selectAllHandler","newState","newOptions","onMultiSelectClear","onFreeFormSelect","selected","updatedList","optionsToSend"],"mappings":";;;AASO,MAAMA,IAAc,CAC1BC,IAAU,OACVC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,IAAwC,CAAA,GACxCC,MACI;AACJ,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAASV,KAAW,CAAA,CAAE,GAC9D,CAACW,GAAiBC,CAAkB,IAAIF,EAA2B,CAAA,CAAE,GACrE,CAACG,GAAgBC,CAAiB,IAAIJ,EAAS,EAAE,GACjD,CAACK,GAAaC,CAAc,IAAIN,EAA6B,MAAS,GACtEO,IAA2BC,EAAOV,CAAe,GAEjDW,IAAcD,EAAOd,CAAQ;AAEnC,EAAAgB,EAAU,MAAM;AACf,IAAAD,EAAY,UAA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M2E,IAAkC/C;AAAA,MACvC5B,KAAWiB,EAAyB;AAAA,IAAA;AAGrC,IAAAhB,IAAW,CAAC,GAAG0E,CAAa,CAAC;AAAA,EAC9B;AAEA,SAAO;AAAA,IACN,0BAAA1D;AAAA,IACA,iBAAAT;AAAA,IACA,QAAAwC;AAAA,IACA,gBAAAnC;AAAA,IACA,iBAAAF;AAAA,IACA,aAAAI;AAAA,IACA,aAAAkC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAkB;AAAA,IACA,oBAAAG;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAf;AAAA,IACA,oBAAA7B;AAAA,IACA,0BAAAI;AAAA,IACA,wBAAAE;AAAA,IACA,eAAA3B;AAAA,EAAA;AAEF;"}
1
+ {"version":3,"file":"useDropdown.js","sources":["../../../../../src/components/dropdown/hooks/useDropdown.tsx"],"sourcesContent":["import debounce from 'lodash/debounce';\nimport { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { SelectAllCheckboxState } from '../OpenedDropdown/components/menu/SelectAllMenu';\nimport {\n\titerateOnOptions,\n\titerateOnOptionsRaw,\n} from '../OpenedDropdown/utils/iterationOnOptions';\nimport { DropdownOption, GroupedOption, SingleOption } from '../type';\n\nexport const useDropdown = (\n\tversion = '1.0',\n\toptions: DropdownOption[],\n\tonSelect: ((option: DropdownOption | DropdownOption[]) => void) | undefined,\n\tskipSorting?: boolean,\n\tisMultiSelect?: boolean,\n\tonSearch?: (searchKey: string) => Promise<DropdownOption[]>,\n\tdisableOtherSearchedOption?: boolean,\n\tdisableSearchedOptionExcept: string[] = [],\n\tmaxSelections?: number,\n) => {\n\tconst [dropdownOptions, setDropdownOptions] = useState(options ?? []);\n\tconst [searchedOptions, setSearchedOptions] = useState<DropdownOption[]>([]);\n\tconst [searchedString, setSearchedString] = useState('');\n\tconst [searchError, setSearchError] = useState<string | undefined>(undefined);\n\tconst latestDropdownOptionsRef = useRef(dropdownOptions);\n\t/** Store latest onSearch so performSearch/debouncedSearch stay stable when parent re-renders with new callback reference. */\n\tconst onSearchRef = useRef(onSearch);\n\n\tuseEffect(() => {\n\t\tonSearchRef.current = onSearch;\n\t}, [onSearch]);\n\n\tuseEffect(() => {\n\t\tlatestDropdownOptionsRef.current = dropdownOptions;\n\n\t\tif (searchedOptions.length && searchedString && onSearch) {\n\t\t\tlet searchedOptionsClone = [...searchedOptions] as SingleOption[];\n\t\t\tconst dropdownOptionFlat = dropdownOptions\n\t\t\t\t.map((option) => {\n\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\treturn (option as GroupedOption).options.map((op) => ({\n\t\t\t\t\t\t\tvalue: op.value,\n\t\t\t\t\t\t\tselected: op.selected,\n\t\t\t\t\t\t}));\n\t\t\t\t\t}\n\t\t\t\t\tconst op = option as SingleOption;\n\t\t\t\t\treturn {\n\t\t\t\t\t\tvalue: op.value,\n\t\t\t\t\t\tselected: op.selected,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.flat();\n\n\t\t\tsearchedOptionsClone = searchedOptionsClone.map((option) => {\n\t\t\t\tconst selectedDropdownOption = dropdownOptionFlat.find(\n\t\t\t\t\t(dropdownOption) => {\n\t\t\t\t\t\tif (option.value === dropdownOption.value) {\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t},\n\t\t\t\t);\n\n\t\t\t\tif (selectedDropdownOption) {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tselected: selectedDropdownOption.selected,\n\t\t\t\t\t};\n\t\t\t\t}\n\n\t\t\t\treturn option;\n\t\t\t});\n\n\t\t\t// disable other options except selected in searched options\n\t\t\tif (disableOtherSearchedOption) {\n\t\t\t\tsearchedOptionsClone = searchedOptionsClone.map((option) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tdisabled: !disableSearchedOptionExcept.includes(option.value),\n\t\t\t\t\t};\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (isMultiSelect && !skipSorting) {\n\t\t\t\tsetSearchedOptions([\n\t\t\t\t\t...searchedOptionsClone.sort((option) =>\n\t\t\t\t\t\t(option as SingleOption).selected ? -1 : 1,\n\t\t\t\t\t),\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\tsetSearchedOptions([...searchedOptionsClone]);\n\t\t\t}\n\t\t}\n\t}, [dropdownOptions]);\n\n\tuseEffect(() => {\n\t\tif (options) {\n\t\t\tconst writeOptions = [...options];\n\t\t\tif (isMultiSelect && !skipSorting) {\n\t\t\t\tsetDropdownOptions([\n\t\t\t\t\t...writeOptions.sort((option) =>\n\t\t\t\t\t\t(option as SingleOption).selected ? -1 : 1,\n\t\t\t\t\t),\n\t\t\t\t]);\n\t\t\t} else {\n\t\t\t\tsetDropdownOptions([...writeOptions]);\n\t\t\t}\n\t\t}\n\t}, [options]);\n\n\tconst getSelectedOptions = (data: DropdownOption[]) => {\n\t\tconst selectedOptions: DropdownOption[] = [];\n\t\tdata.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\tconst groupedOptions = (option as GroupedOption).options.filter(\n\t\t\t\t\t(op) => op.selected === true,\n\t\t\t\t);\n\t\t\t\tselectedOptions.push({\n\t\t\t\t\t...option,\n\t\t\t\t\toptions: [...groupedOptions],\n\t\t\t\t});\n\t\t\t} else {\n\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\tif (singleOption.children?.length) {\n\t\t\t\t\t// Report the parent whenever any child is selected, carrying only\n\t\t\t\t\t// the selected children — a partly-selected parent is itself\n\t\t\t\t\t// unselected, so testing it alone would drop the whole group.\n\t\t\t\t\tconst selectedChildren = singleOption.children.filter(\n\t\t\t\t\t\t(child) => child.selected,\n\t\t\t\t\t);\n\t\t\t\t\tif (selectedChildren.length) {\n\t\t\t\t\t\tselectedOptions.push({\n\t\t\t\t\t\t\t...singleOption,\n\t\t\t\t\t\t\tchildren: selectedChildren,\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t} else if (singleOption.selected) {\n\t\t\t\t\tselectedOptions.push({ ...option });\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn selectedOptions;\n\t};\n\n\t// Count current selections for max selection limit\n\tconst getCurrentSelectionCount = (data: DropdownOption[]) => {\n\t\tlet count = 0;\n\t\tdata.forEach((option) => {\n\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\tcount += (option as GroupedOption).options.filter(\n\t\t\t\t\t(op) => op.selected === true,\n\t\t\t\t).length;\n\t\t\t} else {\n\t\t\t\tif ((option as SingleOption).selected) {\n\t\t\t\t\tcount++;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\treturn count;\n\t};\n\n\t// Check if max selections limit is reached\n\tconst isMaxSelectionsReached = (data: DropdownOption[]) => {\n\t\tif (!isMultiSelect || (!maxSelections && maxSelections !== 0)) return false;\n\t\treturn getCurrentSelectionCount(data) >= maxSelections;\n\t};\n\n\t/** Reads onSearch from ref so it stays stable ([] deps). No-ops when onSearchRef.current is undefined. */\n\tconst performSearch = useCallback(async (searchKey: string) => {\n\t\tconst onSearchFn = onSearchRef.current;\n\t\tif (!searchKey || !onSearchFn) return;\n\n\t\tconst selectedIds: (string | number)[] = [];\n\t\titerateOnOptionsRaw(latestDropdownOptionsRef.current, (option) => {\n\t\t\tif (option.selected && !selectedIds.includes(option.value)) {\n\t\t\t\tselectedIds.push(option.value);\n\t\t\t}\n\t\t});\n\n\t\ttry {\n\t\t\tconst response = await onSearchFn(searchKey);\n\t\t\tsetSearchError(undefined);\n\t\t\tif (response) {\n\t\t\t\tconst updatedResponseData = response.map((option) => {\n\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\tconst groupedOption = option as GroupedOption;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...groupedOption,\n\t\t\t\t\t\t\toptions: groupedOption.options.map((op) => ({\n\t\t\t\t\t\t\t\t...op,\n\t\t\t\t\t\t\t\tselected: selectedIds.includes(op.value),\n\t\t\t\t\t\t\t})),\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tselected: selectedIds.includes((option as SingleOption).value),\n\t\t\t\t\t};\n\t\t\t\t});\n\n\t\t\t\tsetSearchedOptions([...updatedResponseData]);\n\t\t\t} else {\n\t\t\t\tsetSearchedOptions([]);\n\t\t\t}\n\t\t} catch (error) {\n\t\t\tsetSearchedOptions([]);\n\t\t\tsetSearchError(\n\t\t\t\terror instanceof Error\n\t\t\t\t\t? error.message\n\t\t\t\t\t: 'Something went wrong while fetching the list. Please try again',\n\t\t\t);\n\t\t}\n\t}, []);\n\n\t/** Independent of onSearch so debounce is stable when callers pass inline functions. Pending searches are preserved across parent re-renders. performSearch no-ops when onSearchRef.current is undefined. */\n\tconst debouncedSearch = useMemo(\n\t\t() => debounce(performSearch, 300),\n\t\t[performSearch],\n\t);\n\n\tuseEffect(() => () => debouncedSearch?.cancel(), [debouncedSearch]);\n\n\tfunction search(searchKey: string) {\n\t\tsetSearchedString(searchKey);\n\t\tsetSearchedOptions([]);\n\t\tsetSearchError(undefined);\n\n\t\tif (!searchKey) {\n\t\t\tdebouncedSearch?.cancel();\n\t\t\treturn;\n\t\t}\n\n\t\tdebouncedSearch(searchKey);\n\t}\n\n\tfunction retrySearch() {\n\t\tif (searchedString) {\n\t\t\tsetSearchError(undefined);\n\t\t\tperformSearch(searchedString);\n\t\t}\n\t}\n\n\t/**\n\t * wrapper to prepare option for onSelect\n\t * for single select, this will call the onClose handler ,\n\t * for multiselect, it will do state update for options list\n\t * \t\tto make any option select,\n\t * \t\t\t\tonApplyHandler({ label, value: selected: true })\n\t * to deselect any option\n\t * \t\t\t\tonApplyHandler({ label, value: selected: false })\n\t * @param optionSelect\n\t */\n\tfunction onApplyHandler(optionSelect: SingleOption, returnOnly?: boolean) {\n\t\tif (!isMultiSelect) {\n\t\t\tonSelect?.(optionSelect);\n\t\t} else {\n\t\t\t// Check if trying to select and max selections is reached\n\t\t\tif (\n\t\t\t\toptionSelect.selected &&\n\t\t\t\tmaxSelections &&\n\t\t\t\tisMaxSelectionsReached(dropdownOptions)\n\t\t\t) {\n\t\t\t\t// Max selections reached, don't allow new selections\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif (searchedOptions.length && searchedString && onSearch) {\n\t\t\t\t/** Search mode */\n\t\t\t\t/**\n\t\t\t\t * on selected, push it to dropdown options,\n\t\t\t\t * on un-select, remove from dropdown option\n\t\t\t\t */\n\n\t\t\t\tif (optionSelect.selected) {\n\t\t\t\t\t// Check max selections for search mode too\n\t\t\t\t\tif (maxSelections && isMaxSelectionsReached(dropdownOptions)) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\t/** check if already there or not,\n\t\t\t\t\t * if yes, just update\n\t\t\t\t\t * else ,\n\t\t\t\t\t * \tappend\n\t\t\t\t\t */\n\n\t\t\t\t\tlet alreadyPresentInInitialOptions = false;\n\t\t\t\t\tconst currList = iterateOnOptions(\n\t\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t\t{ selected: optionSelect.selected } as Partial<SingleOption>,\n\t\t\t\t\t\t(optionForValidation: SingleOption) => {\n\t\t\t\t\t\t\tif (optionForValidation.value === optionSelect.value) {\n\t\t\t\t\t\t\t\talreadyPresentInInitialOptions = true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tif (!alreadyPresentInInitialOptions) {\n\t\t\t\t\t\tcurrList.push(optionSelect);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (returnOnly) {\n\t\t\t\t\t\treturn [...currList];\n\t\t\t\t\t}\n\t\t\t\t\tsetDropdownOptions([...currList]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(currList);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t/** un-select,\n\t\t\t\t\t * if already present in initial data,\n\t\t\t\t\t * yes, just update\n\t\t\t\t\t * else,\n\t\t\t\t\t * \tremove\n\t\t\t\t\t */\n\n\t\t\t\t\tlet alreadyPresentInInitialOptions = false;\n\t\t\t\t\tlet currList = iterateOnOptions(\n\t\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t\t{ selected: optionSelect.selected } as Partial<SingleOption>,\n\t\t\t\t\t\t(optionForValidation: SingleOption) => {\n\t\t\t\t\t\t\tif (optionForValidation.value === optionSelect.value) {\n\t\t\t\t\t\t\t\talreadyPresentInInitialOptions = true;\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t},\n\t\t\t\t\t);\n\n\t\t\t\t\tif (alreadyPresentInInitialOptions) {\n\t\t\t\t\t\tcurrList = currList.filter((option) => {\n\t\t\t\t\t\t\tif ((option as SingleOption).value === optionSelect.value) {\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\n\t\t\t\t\tif (returnOnly) {\n\t\t\t\t\t\treturn [...currList];\n\t\t\t\t\t}\n\t\t\t\t\tsetDropdownOptions([...currList]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(currList);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tconst currList = iterateOnOptions(\n\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t{ selected: optionSelect.selected } as Partial<SingleOption>,\n\t\t\t\t\t(optionForValidation: SingleOption) =>\n\t\t\t\t\t\toptionForValidation.value === optionSelect.value,\n\t\t\t\t);\n\n\t\t\t\tif (returnOnly) {\n\t\t\t\t\treturn [...currList];\n\t\t\t\t}\n\t\t\t\tsetDropdownOptions([...currList]);\n\t\t\t\tif (version === '2.0') {\n\t\t\t\t\tonMultiSelectApply(currList);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction selectAllForSearch(select: boolean) {\n\t\t// const allSearchedValues = searchedOptions.map(option => option.value);\n\t\tlet clonedDropdownOptions = [...dropdownOptions];\n\n\t\tif (select) {\n\t\t\tsearchedOptions.forEach((option) => {\n\t\t\t\tlet found = false;\n\t\t\t\tclonedDropdownOptions = clonedDropdownOptions.map((dOption) => {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof singleOption.value !== 'undefined' &&\n\t\t\t\t\t\tsingleOption.value === (dOption as SingleOption).value\n\t\t\t\t\t) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...dOption,\n\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn dOption;\n\t\t\t\t});\n\n\t\t\t\tif (!found) {\n\t\t\t\t\tclonedDropdownOptions.push({ ...option, selected: true });\n\t\t\t\t}\n\t\t\t});\n\t\t} else {\n\t\t\tsearchedOptions.forEach((option) => {\n\t\t\t\tclonedDropdownOptions = clonedDropdownOptions.map((dOption) => {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof singleOption.value !== 'undefined' &&\n\t\t\t\t\t\tsingleOption.value === (dOption as SingleOption).value\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...dOption,\n\t\t\t\t\t\t\tselected: false,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn dOption;\n\t\t\t\t});\n\t\t\t});\n\t\t}\n\n\t\tsetDropdownOptions([...clonedDropdownOptions]);\n\t\tif (version === '2.0') {\n\t\t\tonMultiSelectApply(clonedDropdownOptions);\n\t\t}\n\t}\n\n\tfunction selectAllForSearchWithLimit(select: boolean) {\n\t\tlet clonedDropdownOptions = [...dropdownOptions];\n\n\t\tif (select && maxSelections && maxSelections > 0) {\n\t\t\tconst currentCount = getCurrentSelectionCount(clonedDropdownOptions);\n\t\t\tconst remainingSlots = maxSelections - currentCount;\n\n\t\t\tif (remainingSlots <= 0) {\n\t\t\t\t// Already at max, don't select any more\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tlet selectedCount = 0;\n\t\t\tsearchedOptions.forEach((option) => {\n\t\t\t\tif (selectedCount >= remainingSlots) {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tlet found = false;\n\t\t\t\tclonedDropdownOptions = clonedDropdownOptions.map((dOption) => {\n\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\t// Skip if already selected\n\t\t\t\t\tif ((dOption as SingleOption).selected) {\n\t\t\t\t\t\treturn dOption;\n\t\t\t\t\t}\n\t\t\t\t\t// Skip if disabled\n\t\t\t\t\tif ((dOption as SingleOption).disabled) {\n\t\t\t\t\t\treturn dOption;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (\n\t\t\t\t\t\ttypeof singleOption.value !== 'undefined' &&\n\t\t\t\t\t\tsingleOption.value === (dOption as SingleOption).value\n\t\t\t\t\t) {\n\t\t\t\t\t\tfound = true;\n\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t...dOption,\n\t\t\t\t\t\t\tselected: true,\n\t\t\t\t\t\t};\n\t\t\t\t\t}\n\t\t\t\t\treturn dOption;\n\t\t\t\t});\n\n\t\t\t\tif (!found && selectedCount < remainingSlots) {\n\t\t\t\t\tconst newOption = option as SingleOption;\n\t\t\t\t\tif (!newOption.disabled) {\n\t\t\t\t\t\tclonedDropdownOptions.push({ ...option, selected: true });\n\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tsetDropdownOptions([...clonedDropdownOptions]);\n\t\t\tif (version === '2.0') {\n\t\t\t\tonMultiSelectApply(clonedDropdownOptions);\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction selectAllHandler(newState: SelectAllCheckboxState) {\n\t\tif (searchedOptions.length && searchedString && onSearch) {\n\t\t\tif (newState === 'selectAll') {\n\t\t\t\tselectAllForSearchWithLimit(true);\n\t\t\t} else {\n\t\t\t\tselectAllForSearch(false);\n\t\t\t}\n\t\t} else {\n\t\t\tif (newState === 'selectAll') {\n\t\t\t\tif (maxSelections && maxSelections > 0) {\n\t\t\t\t\t// Only select up to maxSelections limit\n\t\t\t\t\tconst currentCount = getCurrentSelectionCount(dropdownOptions);\n\t\t\t\t\tconst remainingSlots = maxSelections - currentCount;\n\n\t\t\t\t\tif (remainingSlots <= 0) {\n\t\t\t\t\t\t// Already at max, don't select any more\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tlet selectedCount = 0;\n\t\t\t\t\tconst newOptions = dropdownOptions.map((option) => {\n\t\t\t\t\t\tif ((option as GroupedOption).options) {\n\t\t\t\t\t\t\t// Handle grouped options\n\t\t\t\t\t\t\tconst groupedOption = option as GroupedOption;\n\t\t\t\t\t\t\treturn {\n\t\t\t\t\t\t\t\t...groupedOption,\n\t\t\t\t\t\t\t\toptions: groupedOption.options.map((op) => {\n\t\t\t\t\t\t\t\t\t// Skip disabled options\n\t\t\t\t\t\t\t\t\tif (op.disabled) {\n\t\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Check if already selected\n\t\t\t\t\t\t\t\t\tif (op.selected) {\n\t\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Check search filter\n\t\t\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\t\t\tsearchedString &&\n\t\t\t\t\t\t\t\t\t\t!op.label\n\t\t\t\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase())\n\t\t\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// Select if we have remaining slots\n\t\t\t\t\t\t\t\t\tif (selectedCount < remainingSlots) {\n\t\t\t\t\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t\t\t\t\t\treturn { ...op, selected: true };\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\treturn op;\n\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t};\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tconst singleOption = option as SingleOption;\n\t\t\t\t\t\t\t// Skip disabled options\n\t\t\t\t\t\t\tif (singleOption.disabled) {\n\t\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Check if already selected\n\t\t\t\t\t\t\tif (singleOption.selected) {\n\t\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Check search filter\n\t\t\t\t\t\t\tif (\n\t\t\t\t\t\t\t\tsearchedString &&\n\t\t\t\t\t\t\t\t!singleOption.label\n\t\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase())\n\t\t\t\t\t\t\t) {\n\t\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Select if we have remaining slots\n\t\t\t\t\t\t\tif (selectedCount < remainingSlots) {\n\t\t\t\t\t\t\t\tselectedCount++;\n\t\t\t\t\t\t\t\treturn { ...option, selected: true };\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn option;\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\tsetDropdownOptions([...newOptions]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(newOptions);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// No max selection limit, select all\n\t\t\t\t\tconst newOptions = iterateOnOptions(\n\t\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t\t{ selected: true },\n\t\t\t\t\t\t(option) =>\n\t\t\t\t\t\t\tsearchedString\n\t\t\t\t\t\t\t\t? option.label\n\t\t\t\t\t\t\t\t\t\t?.toLowerCase()\n\t\t\t\t\t\t\t\t\t\t.includes(searchedString.toLowerCase()) && !option.disabled\n\t\t\t\t\t\t\t\t: !option.disabled,\n\t\t\t\t\t);\n\t\t\t\t\tsetDropdownOptions([...newOptions]);\n\t\t\t\t\tif (version === '2.0') {\n\t\t\t\t\t\tonMultiSelectApply(newOptions);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (newState === 'notSelected') {\n\t\t\t\tconst newOptions = iterateOnOptions(\n\t\t\t\t\tdropdownOptions,\n\t\t\t\t\t{ selected: false },\n\t\t\t\t\t(option) => !option.disabled,\n\t\t\t\t);\n\t\t\t\tsetDropdownOptions([...newOptions]);\n\t\t\t\tif (version === '2.0') {\n\t\t\t\t\tonMultiSelectApply(newOptions);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tfunction onMultiSelectClear() {\n\t\tconst newOptions = iterateOnOptions(dropdownOptions, { selected: false });\n\t\tsetDropdownOptions([...newOptions]);\n\t\tif (version === '2.0') {\n\t\t\tonMultiSelectApply(newOptions);\n\t\t}\n\t}\n\n\tfunction onFreeFormSelect(selected: boolean) {\n\t\tif (!isMultiSelect) {\n\t\t\tonApplyHandler({\n\t\t\t\tlabel: searchedString,\n\t\t\t\tvalue: searchedString,\n\t\t\t\tisFreeForm: true,\n\t\t\t\tselected: true,\n\t\t\t});\n\t\t\treturn;\n\t\t}\n\n\t\tconst updatedList = dropdownOptions.map((option) =>\n\t\t\t(option as GroupedOption).options\n\t\t\t\t? option\n\t\t\t\t: {\n\t\t\t\t\t\t...option,\n\t\t\t\t\t\tselected:\n\t\t\t\t\t\t\t/** free form check */\n\t\t\t\t\t\t\toption.label === searchedString &&\n\t\t\t\t\t\t\t(option as SingleOption).value === searchedString\n\t\t\t\t\t\t\t\t? /** to mark as selected or not */\n\t\t\t\t\t\t\t\t selected\n\t\t\t\t\t\t\t\t: (option as SingleOption).selected,\n\t\t\t\t },\n\t\t);\n\n\t\tif (selected) {\n\t\t\tif (\n\t\t\t\t!updatedList.some(\n\t\t\t\t\t(option) =>\n\t\t\t\t\t\toption.label === searchedString &&\n\t\t\t\t\t\t(option as SingleOption).value === searchedString,\n\t\t\t\t)\n\t\t\t) {\n\t\t\t\tupdatedList.unshift({\n\t\t\t\t\tlabel: searchedString,\n\t\t\t\t\tvalue: searchedString,\n\t\t\t\t\tisFreeForm: true,\n\t\t\t\t\tselected: true,\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\n\t\tsetDropdownOptions([...updatedList]);\n\t\tif (version === '2.0') {\n\t\t\tonMultiSelectApply(updatedList);\n\t\t}\n\t}\n\n\t/**\n\t * This is called when appy button is called,\n\t * here iterate and pick all options where selected if true.\n\t */\n\tfunction onMultiSelectApply(options?: DropdownOption[]) {\n\t\tconst optionsToSend: DropdownOption[] = getSelectedOptions(\n\t\t\toptions ?? latestDropdownOptionsRef.current,\n\t\t);\n\n\t\tonSelect?.([...optionsToSend]);\n\t}\n\n\treturn {\n\t\tlatestDropdownOptionsRef,\n\t\tdropdownOptions,\n\t\tsearch,\n\t\tsearchedString,\n\t\tsearchedOptions,\n\t\tsearchError,\n\t\tretrySearch,\n\t\tonApplyHandler,\n\t\tselectAllHandler,\n\t\tonMultiSelectClear,\n\t\tonFreeFormSelect,\n\t\tonMultiSelectApply,\n\t\tgetSelectedOptions,\n\t\tgetCurrentSelectionCount,\n\t\tisMaxSelectionsReached,\n\t\tmaxSelections,\n\t};\n};\n"],"names":["useDropdown","version","options","onSelect","skipSorting","isMultiSelect","onSearch","disableOtherSearchedOption","disableSearchedOptionExcept","maxSelections","dropdownOptions","setDropdownOptions","useState","searchedOptions","setSearchedOptions","searchedString","setSearchedString","searchError","setSearchError","latestDropdownOptionsRef","useRef","onSearchRef","useEffect","searchedOptionsClone","dropdownOptionFlat","option","op","selectedDropdownOption","dropdownOption","writeOptions","getSelectedOptions","data","selectedOptions","groupedOptions","singleOption","selectedChildren","child","getCurrentSelectionCount","count","isMaxSelectionsReached","performSearch","useCallback","searchKey","onSearchFn","selectedIds","iterateOnOptionsRaw","response","updatedResponseData","groupedOption","error","debouncedSearch","useMemo","debounce","search","retrySearch","onApplyHandler","optionSelect","returnOnly","alreadyPresentInInitialOptions","currList","iterateOnOptions","optionForValidation","onMultiSelectApply","selectAllForSearch","select","clonedDropdownOptions","dOption","selectAllForSearchWithLimit","currentCount","remainingSlots","selectedCount","found","selectAllHandler","newState","newOptions","onMultiSelectClear","onFreeFormSelect","selected","updatedList","optionsToSend"],"mappings":";;;AASO,MAAMA,IAAc,CAC1BC,IAAU,OACVC,GACAC,GACAC,GACAC,GACAC,GACAC,GACAC,IAAwC,CAAA,GACxCC,MACI;AACJ,QAAM,CAACC,GAAiBC,CAAkB,IAAIC,EAASV,KAAW,CAAA,CAAE,GAC9D,CAACW,GAAiBC,CAAkB,IAAIF,EAA2B,CAAA,CAAE,GACrE,CAACG,GAAgBC,CAAiB,IAAIJ,EAAS,EAAE,GACjD,CAACK,GAAaC,CAAc,IAAIN,EAA6B,MAAS,GACtEO,IAA2BC,EAAOV,CAAe,GAEjDW,IAAcD,EAAOd,CAAQ;AAEnC,EAAAgB,EAAU,MAAM;AACf,IAAAD,EAAY,UAAUf;AAAA,EACvB,GAAG,CAACA,CAAQ,CAAC,GAEbgB,EAAU,MAAM;AAGf,QAFAH,EAAyB,UAAUT,GAE/BG,EAAgB,UAAUE,KAAkBT,GAAU;AACzD,UAAIiB,IAAuB,CAAC,GAAGV,CAAe;AAC9C,YAAMW,IAAqBd,EACzB,IAAI,CAACe,MAAW;AAChB,YAAKA,EAAyB;AAC7B,iBAAQA,EAAyB,QAAQ,IAAI,CAACC,OAAQ;AAAA,YACrD,OAAOA,EAAG;AAAA,YACV,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A;AAGrC,IAAAhB,IAAW,CAAC,GAAG4E,CAAa,CAAC;AAAA,EAC9B;AAEA,SAAO;AAAA,IACN,0BAAA5D;AAAA,IACA,iBAAAT;AAAA,IACA,QAAA2C;AAAA,IACA,gBAAAtC;AAAA,IACA,iBAAAF;AAAA,IACA,aAAAI;AAAA,IACA,aAAAqC;AAAA,IACA,gBAAAC;AAAA,IACA,kBAAAiB;AAAA,IACA,oBAAAG;AAAA,IACA,kBAAAC;AAAA,IACA,oBAAAd;AAAA,IACA,oBAAAhC;AAAA,IACA,0BAAAO;AAAA,IACA,wBAAAE;AAAA,IACA,eAAA9B;AAAA,EAAA;AAEF;"}
@@ -65,6 +65,23 @@ export interface OpenDropdownProps {
65
65
  checkboxActiveColor?: string;
66
66
  /** Renders rows with the brand selected theme (brandLight bg + primary text), square corners and flush spacing */
67
67
  brandSelectedRow?: boolean;
68
+ /**
69
+ * How options that declare `children` are laid out.
70
+ *
71
+ * - `'flyout'` (default) — the parent row shows a chevron and its children
72
+ * open in a submenu to the right on hover. The parent is not selectable.
73
+ * - `'nested'` — children render inline, indented under the parent and joined
74
+ * by an elbow connector. With `isMultiSelect` the parent carries a
75
+ * tri-state checkbox that selects or clears all of its children.
76
+ */
77
+ childrenLayout?: 'flyout' | 'nested';
78
+ /**
79
+ * With `childrenLayout='nested'`, gives every parent row a chevron that
80
+ * collapses and expands its children. Groups start expanded.
81
+ */
82
+ collapsibleChildren?: boolean;
83
+ /** Hides the "N selected" text in the multiselect bottom bar. */
84
+ hideSelectedCount?: boolean;
68
85
  }
69
86
  export type GroupedOption = {
70
87
  label?: string;
@@ -1,17 +1,13 @@
1
1
  import { Size, Type } from '../button/model';
2
2
  import { IconButtonType } from '../icon-button/model';
3
- export declare const DropdownButtonStyle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
4
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
5
- }, {
3
+ export declare const DropdownButtonStyle: import('styled-components').StyledComponent<"div", any, {
6
4
  type: Type | undefined;
7
5
  disabled: boolean | undefined;
8
6
  isIconButton?: boolean | undefined;
9
7
  iconButtonType?: IconButtonType | undefined;
10
- iconButtonSize?: "xs" | "default" | undefined;
8
+ iconButtonSize?: "default" | "xs" | undefined;
11
9
  size?: Size | undefined;
12
- }>> & string;
13
- export declare const LoaderContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
14
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
15
- }, {
10
+ }, never>;
11
+ export declare const LoaderContainer: import('styled-components').StyledComponent<"div", any, {
16
12
  type: Type | undefined;
17
- }>> & string;
13
+ }, never>;
@@ -1,14 +1,7 @@
1
- /// <reference types="react" />
2
- export declare const Container: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }, {
1
+ export declare const Container: import('styled-components').StyledComponent<"div", any, {
5
2
  disabled?: boolean | undefined;
6
- }>> & string;
7
- export declare const IconHalf: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
8
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
9
- }, {
3
+ }, never>;
4
+ export declare const IconHalf: import('styled-components').StyledComponent<"button", any, {
10
5
  disabled?: boolean | undefined;
11
- }>> & string;
12
- export declare const Divider: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
13
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
14
- }> & string;
6
+ }, never>;
7
+ export declare const Divider: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,12 +1,7 @@
1
- /// <reference types="react" />
2
- export declare const FileUploaderStyle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }, {
1
+ export declare const FileUploaderStyle: import('styled-components').StyledComponent<"div", any, {
5
2
  showProgressBar: boolean;
6
3
  width?: string | undefined;
7
- }>> & string;
8
- export declare const FileUploadedStyle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
9
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
10
- }, {
4
+ }, never>;
5
+ export declare const FileUploadedStyle: import('styled-components').StyledComponent<"div", any, {
11
6
  width?: string | undefined;
12
- }>> & string;
7
+ }, never>;
@@ -1,4 +1,3 @@
1
- /// <reference types="react" />
2
1
  export declare enum FAB_POSITION {
3
2
  TOP_LEFT = "top left",
4
3
  TOP_RIGHT = "top right",
@@ -17,17 +16,13 @@ export declare enum MENU_ALIGNMENT {
17
16
  START = "start",
18
17
  END = "end"
19
18
  }
20
- export declare const FloatingActionButtonContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
21
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
22
- }, {
19
+ export declare const FloatingActionButtonContainer: import('styled-components').StyledComponent<"div", any, {
23
20
  width: number;
24
21
  height: number;
25
22
  color: string;
26
23
  isRound?: boolean | undefined;
27
- }>> & string;
28
- export declare const FloatingActionButtonOuterContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
29
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
30
- }, {
24
+ }, never>;
25
+ export declare const FloatingActionButtonOuterContainer: import('styled-components').StyledComponent<"div", any, {
31
26
  width: number;
32
27
  height: number;
33
28
  color: string;
@@ -35,26 +30,20 @@ export declare const FloatingActionButtonOuterContainer: import('styled-componen
35
30
  buttonPaddingHorizontal: number;
36
31
  buttonPaddingVertical: number;
37
32
  zIndex: number;
38
- }>> & string;
39
- export declare const StyledDropdown: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<import('react-bootstrap/esm/helpers').Omit<any, import('react-bootstrap/esm/helpers').BsPrefixProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>> & import('react-bootstrap').DropdownProps> & import('react-bootstrap/esm/helpers').BsPrefixProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>> & import('react-bootstrap').DropdownProps & {
40
- children?: import('react').ReactNode;
41
- }, {
42
- active?: string | undefined;
43
- width?: string | undefined;
44
- height?: string | undefined;
45
- }>> & string & Omit<import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"div", import('react-bootstrap').DropdownProps> & {
33
+ }, never>;
34
+ export declare const StyledDropdown: import('styled-components').StyledComponent<import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"div", import('react-bootstrap').DropdownProps> & {
46
35
  Toggle: import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"button", import('react-bootstrap/esm/DropdownToggle').DropdownToggleProps>;
47
36
  Menu: import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"div", import('react-bootstrap/esm/DropdownMenu').DropdownMenuProps>;
48
37
  Item: import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<import('@restart/ui/esm/types').DynamicRefForwardingComponent<import('react').ForwardRefExoticComponent<import('@restart/ui/esm/Button').ButtonProps & import('react').RefAttributes<HTMLElement>>, import('@restart/ui/esm/DropdownItem').DropdownItemProps>, import('react-bootstrap/esm/DropdownItem').DropdownItemProps>;
49
38
  ItemText: import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"span", unknown>;
50
39
  Divider: import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"hr", unknown>;
51
40
  Header: import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"div", unknown>;
52
- }, keyof import('react').Component<any, {}, any>>;
53
- export declare const DropdownToggleContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('react-bootstrap/esm/helpers').Omit<any, import('react-bootstrap/esm/helpers').BsPrefixProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>> & import('react-bootstrap/esm/DropdownToggle').DropdownToggleProps> & import('react-bootstrap/esm/helpers').BsPrefixProps<import('react').ElementType<any, keyof import("react").JSX.IntrinsicElements>> & import('react-bootstrap/esm/DropdownToggle').DropdownToggleProps & {
54
- children?: import('react').ReactNode;
55
- }> & string & Omit<import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"button", import('react-bootstrap/esm/DropdownToggle').DropdownToggleProps>, keyof import('react').Component<any, {}, any>>;
56
- export declare const TooltipStyled: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
57
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
58
- }, {
41
+ }, any, {
42
+ active?: string | undefined;
43
+ width?: string | undefined;
44
+ height?: string | undefined;
45
+ }, never>;
46
+ export declare const DropdownToggleContainer: import('styled-components').StyledComponent<import('react-bootstrap/esm/helpers').BsPrefixRefForwardingComponent<"button", import('react-bootstrap/esm/DropdownToggle').DropdownToggleProps>, any, {}, never>;
47
+ export declare const TooltipStyled: import('styled-components').StyledComponent<"div", any, {
59
48
  tooltipWidth?: number | undefined;
60
- }>> & string;
49
+ }, never>;
@@ -1,35 +1,16 @@
1
- /// <reference types="react" />
2
- export declare const Wrapper: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }> & string;
5
- export declare const Legend: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
6
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
7
- }> & string;
8
- export declare const LegendItem: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
9
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
10
- }> & string;
11
- export declare const LegendDot: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
12
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
13
- }, {
1
+ export declare const Wrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
2
+ export declare const Legend: import('styled-components').StyledComponent<"div", any, {}, never>;
3
+ export declare const LegendItem: import('styled-components').StyledComponent<"div", any, {}, never>;
4
+ export declare const LegendDot: import('styled-components').StyledComponent<"div", any, {
14
5
  color: string;
15
- }>> & string;
6
+ }, never>;
16
7
  /**
17
8
  * Contains the Doughnut canvas. Width is fluid; height is set inline to
18
9
  * canvasSize/2 so only the top semicircle of the square canvas is visible.
19
10
  * overflow:hidden clips the bottom half away.
20
11
  */
21
- export declare const ChartWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
22
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
23
- }> & string;
24
- export declare const CanvasClip: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
25
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
26
- }> & string;
27
- export declare const ElementWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
28
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
29
- }> & string;
30
- export declare const PercentageLabel: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
31
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
32
- }> & string;
33
- export declare const DescriptionText: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
34
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
35
- }> & string;
12
+ export declare const ChartWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
13
+ export declare const CanvasClip: import('styled-components').StyledComponent<"div", any, {}, never>;
14
+ export declare const ElementWrapper: import('styled-components').StyledComponent<"div", any, {}, never>;
15
+ export declare const PercentageLabel: import('styled-components').StyledComponent<"div", any, {}, never>;
16
+ export declare const DescriptionText: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,10 +1,8 @@
1
1
  import { IconButtonSize, IconButtonType } from './model';
2
- export declare const IconButton: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }, {
2
+ export declare const IconButton: import('styled-components').StyledComponent<"button", any, {
5
3
  bordered?: boolean | undefined;
6
4
  iconButtonType: IconButtonType;
7
5
  isSelected?: boolean | undefined;
8
6
  iconPadding?: number | undefined;
9
7
  size?: IconButtonSize | undefined;
10
- }>> & string;
8
+ }, never>;
@@ -1,7 +1,5 @@
1
1
  import { InputStateI, InputTypeI, InputVariant } from './Input.model';
2
- export declare const InputWrapper: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }, {
2
+ export declare const InputWrapper: import('styled-components').StyledComponent<"div", any, {
5
3
  width?: string | undefined;
6
4
  height?: string | undefined;
7
5
  isActive?: boolean | undefined;
@@ -12,153 +10,70 @@ export declare const InputWrapper: import('styled-components/dist/types').IStyle
12
10
  hightlightInputColor?: string | undefined;
13
11
  hideBorder?: boolean | undefined;
14
12
  solidDisabled?: boolean | undefined;
15
- }>> & string;
16
- export declare const IconHolder: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
17
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
18
- }, {
13
+ }, never>;
14
+ export declare const IconHolder: import('styled-components').StyledComponent<"div", any, {
19
15
  isLeft?: boolean | undefined;
20
16
  iconSize?: string | undefined;
21
17
  variant?: InputVariant | undefined;
22
- }>> & string;
23
- export declare const InputContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
24
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
25
- }, {
18
+ }, never>;
19
+ export declare const InputContainer: import('styled-components').StyledComponent<"div", any, {
26
20
  numberOfLines?: number | undefined;
27
21
  color?: string | undefined;
28
- }>, "as" | "forwardedAs"> & {
29
- as?: import('styled-components').WebTarget | undefined;
30
- forwardedAs?: import('styled-components').WebTarget | undefined;
31
- }, "ref"> & {
32
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
33
- }, "style"> & {
34
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
35
- [key: `--${string}`]: string | number | undefined;
36
- }) | undefined;
37
- }, {
22
+ } & {
38
23
  height?: string | undefined;
39
24
  type?: InputTypeI | undefined;
40
25
  autoGrow?: boolean | undefined;
41
26
  minHeight?: string | undefined;
42
27
  maxHeight?: string | undefined;
43
- }>> & string;
44
- export declare const InputContainerSmall: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
45
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
46
- }, {
28
+ }, never>;
29
+ export declare const InputContainerSmall: import('styled-components').StyledComponent<"div", any, {
47
30
  numberOfLines?: number | undefined;
48
31
  color?: string | undefined;
49
32
  customStyles?: import('../TypographyStyle').customStyles | undefined;
50
- }>, "as" | "forwardedAs"> & {
51
- as?: import('styled-components').WebTarget | undefined;
52
- forwardedAs?: import('styled-components').WebTarget | undefined;
53
- }, "ref"> & {
54
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
55
- }, "style"> & {
56
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
57
- [key: `--${string}`]: string | number | undefined;
58
- }) | undefined;
59
- }, {
33
+ } & {
60
34
  height?: string | undefined;
61
35
  type?: InputTypeI | undefined;
62
- }>> & string;
63
- export declare const InputContainerXSmall: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
64
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
65
- }, {
36
+ }, never>;
37
+ export declare const InputContainerXSmall: import('styled-components').StyledComponent<"div", any, {
66
38
  numberOfLines?: number | undefined;
67
39
  color?: string | undefined;
68
- }>, "as" | "forwardedAs"> & {
69
- as?: import('styled-components').WebTarget | undefined;
70
- forwardedAs?: import('styled-components').WebTarget | undefined;
71
- }, "ref"> & {
72
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
73
- }, "style"> & {
74
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
75
- [key: `--${string}`]: string | number | undefined;
76
- }) | undefined;
77
- }, {
40
+ } & {
78
41
  height?: string | undefined;
79
42
  type?: InputTypeI | undefined;
80
- }>> & string;
81
- export declare const InputHeader: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
82
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
83
- }, {
43
+ }, never>;
44
+ export declare const InputHeader: import('styled-components').StyledComponent<"div", any, {
84
45
  invalid?: boolean | undefined;
85
46
  maxCharAlignment?: boolean | undefined;
86
- }>> & string;
87
- export declare const MaxCharStyle: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
88
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
89
- }, {
47
+ }, never>;
48
+ export declare const MaxCharStyle: import('styled-components').StyledComponent<"div", any, {
90
49
  numberOfLines?: number | undefined;
91
50
  color?: string | undefined;
92
51
  customStyles?: import('../TypographyStyle').customStyles | undefined;
93
- }>, "as" | "forwardedAs"> & {
94
- as?: import('styled-components').WebTarget | undefined;
95
- forwardedAs?: import('styled-components').WebTarget | undefined;
96
- }, "ref"> & {
97
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
98
- }, "style"> & {
99
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
100
- [key: `--${string}`]: string | number | undefined;
101
- }) | undefined;
102
- }, {
52
+ } & {
103
53
  position?: string | undefined;
104
- }>> & string;
105
- export declare const InputFooter: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
106
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
107
- }, {
54
+ }, never>;
55
+ export declare const InputFooter: import('styled-components').StyledComponent<"div", any, {
108
56
  numberOfLines?: number | undefined;
109
57
  color?: string | undefined;
110
- }>, "as" | "forwardedAs"> & {
111
- as?: import('styled-components').WebTarget | undefined;
112
- forwardedAs?: import('styled-components').WebTarget | undefined;
113
- }, "ref"> & {
114
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
115
- }, "style"> & {
116
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
117
- [key: `--${string}`]: string | number | undefined;
118
- }) | undefined;
119
- }, {
58
+ } & {
120
59
  invalid?: boolean | undefined;
121
- }>> & string;
122
- export declare const RootContainer: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
123
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
124
- }, {
60
+ }, never>;
61
+ export declare const RootContainer: import('styled-components').StyledComponent<"div", any, {
125
62
  width?: string | undefined;
126
63
  height?: string | undefined;
127
64
  state?: InputStateI | undefined;
128
65
  type: InputTypeI;
129
66
  solidDisabled?: boolean | undefined;
130
- }>> & string;
131
- export declare const PrefixHolder: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
132
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
133
- }, {
67
+ }, never>;
68
+ export declare const PrefixHolder: import('styled-components').StyledComponent<"div", any, {
134
69
  numberOfLines?: number | undefined;
135
70
  color?: string | undefined;
136
- }>, "as" | "forwardedAs"> & {
137
- as?: import('styled-components').WebTarget | undefined;
138
- forwardedAs?: import('styled-components').WebTarget | undefined;
139
- }, "ref"> & {
140
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
141
- }, "style"> & {
142
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
143
- [key: `--${string}`]: string | number | undefined;
144
- }) | undefined;
145
- }, {
71
+ } & {
146
72
  variant?: InputVariant | undefined;
147
- }>> & string;
148
- export declare const SuffixHolder: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<Omit<import('styled-components').FastOmit<import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
149
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
150
- }, {
73
+ }, never>;
74
+ export declare const SuffixHolder: import('styled-components').StyledComponent<"div", any, {
151
75
  numberOfLines?: number | undefined;
152
76
  color?: string | undefined;
153
- }>, "as" | "forwardedAs"> & {
154
- as?: import('styled-components').WebTarget | undefined;
155
- forwardedAs?: import('styled-components').WebTarget | undefined;
156
- }, "ref"> & {
157
- ref?: ((instance: HTMLDivElement | null) => void) | import('react').RefObject<HTMLDivElement> | null | undefined;
158
- }, "style"> & {
159
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | (import('react').CSSProperties & {
160
- [key: `--${string}`]: string | number | undefined;
161
- }) | undefined;
162
- }, {
77
+ } & {
163
78
  variant?: InputVariant | undefined;
164
- }>> & string;
79
+ }, never>;
@@ -1,4 +1 @@
1
- /// <reference types="react" />
2
- export declare const ChipStyle: import('styled-components/dist/types').IStyledComponentBase<"web", Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }> & string;
1
+ export declare const ChipStyle: import('styled-components').StyledComponent<"div", any, {}, never>;
@@ -1,9 +1,7 @@
1
1
  import { Variant } from './List.model';
2
- export declare const ListItem: import('styled-components/dist/types').IStyledComponentBase<"web", import('styled-components/dist/types').Merged<Omit<import('react').DetailedHTMLProps<import('react').HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "style"> & {
3
- style?: import('react').CSSProperties | import('styled-components/dist/types').CSSPropertiesWithVars | undefined;
4
- }, {
2
+ export declare const ListItem: import('styled-components').StyledComponent<"div", any, {
5
3
  variant: Variant;
6
4
  borderBottom?: string | undefined;
7
5
  version?: "1.0" | "2.0" | "3.0" | undefined;
8
6
  brandSelectedRow?: boolean | undefined;
9
- }>> & string;
7
+ }, never>;
@@ -1,3 +1,3 @@
1
1
  import { Variant } from './List.model';
2
2
  export declare function getColor(variant: Variant, version?: '1.0' | '2.0' | '3.0', brandSelectedRow?: boolean): string;
3
- export declare function getTheme(variant: Variant, version?: '1.0' | '2.0' | '3.0', brandSelectedRow?: boolean): import('styled-components').RuleSet<object>;
3
+ export declare function getTheme(variant: Variant, version?: '1.0' | '2.0' | '3.0', brandSelectedRow?: boolean): import('styled-components').FlattenSimpleInterpolation;