@sps-woodland/core 8.56.2 → 8.56.4

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 (262) hide show
  1. package/lib/action-bar/action-bar/ActionBar.js +44 -59
  2. package/lib/action-bar/action-bar/ActionBar.ve.js +4 -11
  3. package/lib/action-bar/action-bar-additional-content/ActionBarAdditionalContent.js +14 -22
  4. package/lib/action-bar/index.js +54 -74
  5. package/lib/action-bar/index.umd.cjs +1 -1
  6. package/lib/action-bar/style.css +2 -1
  7. package/lib/add-to-list/add-to-list/AddToList.js +220 -302
  8. package/lib/add-to-list/add-to-list/AddToList.ve.js +79 -24
  9. package/lib/add-to-list/add-to-list/ItemsList.js +42 -67
  10. package/lib/add-to-list/add-to-list/ListItem.js +24 -50
  11. package/lib/add-to-list/index.js +393 -453
  12. package/lib/add-to-list/index.umd.cjs +1 -1
  13. package/lib/add-to-list/style.css +2 -1
  14. package/lib/buttons/button/Button.js +95 -121
  15. package/lib/buttons/button/Button.ve.js +150 -9
  16. package/lib/buttons/index.js +281 -171
  17. package/lib/buttons/index.umd.cjs +1 -1
  18. package/lib/buttons/style.css +2 -1
  19. package/lib/cards/card/Card.js +19 -27
  20. package/lib/cards/card/Card.ve.js +4 -4
  21. package/lib/cards/card-footer/CardFooter.js +12 -13
  22. package/lib/cards/card-footer/CardFooter.ve.js +4 -4
  23. package/lib/cards/card-header/CardHeader.js +12 -13
  24. package/lib/cards/card-header/CardHeader.ve.js +4 -4
  25. package/lib/cards/card-title/CardTitle.js +11 -12
  26. package/lib/cards/card-title/CardTitle.ve.js +4 -4
  27. package/lib/cards/index.js +52 -52
  28. package/lib/cards/index.umd.cjs +1 -1
  29. package/lib/cards/style.css +2 -1
  30. package/lib/column-manager/column-manager/ColumnManager.js +95 -112
  31. package/lib/column-manager/column-manager/useColumnManager.js +59 -48
  32. package/lib/column-manager/index.js +2 -5
  33. package/lib/components/icon/Icon.ve.js +15 -5
  34. package/lib/components/icon/icons/sprite.svg.js +4 -4
  35. package/lib/content-row/content-row/ContentRow.js +146 -173
  36. package/lib/content-row/content-row/ContentRow.ve.js +105 -18
  37. package/lib/content-row/content-row-col/ContentRowCol.js +37 -48
  38. package/lib/content-row/content-row-col/ContentRowCol.ve.js +49 -6
  39. package/lib/content-row/content-row-expansion/ContentRowExpansion.js +16 -24
  40. package/lib/content-row/index.js +407 -318
  41. package/lib/content-row/index.umd.cjs +1 -1
  42. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.js +24 -39
  43. package/lib/content-row/row-list-auto-layout/RowListAutoLayout.ve.js +13 -5
  44. package/lib/content-row/style.css +2 -1
  45. package/lib/content-tiles/content-tile/ContentTile.js +71 -60
  46. package/lib/content-tiles/content-tile/ContentTile.ve.js +36 -14
  47. package/lib/content-tiles/content-tile-list/ContentTileList.js +12 -13
  48. package/lib/content-tiles/content-tile-list/ContentTileList.ve.js +4 -5
  49. package/lib/content-tiles/index.js +156 -118
  50. package/lib/content-tiles/index.umd.cjs +1 -1
  51. package/lib/content-tiles/style.css +2 -1
  52. package/lib/core.css +2 -1
  53. package/lib/dropdowns/dropdown/Dropdown.js +56 -68
  54. package/lib/dropdowns/dropdown/Dropdown.ve.js +37 -8
  55. package/lib/dropdowns/index.js +171 -171
  56. package/lib/dropdowns/index.umd.cjs +1 -1
  57. package/lib/dropdowns/option-list/Option.js +14 -18
  58. package/lib/dropdowns/option-list/Option.ve.js +4 -5
  59. package/lib/dropdowns/option-list/OptionList.js +28 -44
  60. package/lib/dropdowns/option-list/OptionList.ve.js +4 -5
  61. package/lib/dropdowns/style.css +2 -1
  62. package/lib/editable-table/EditableTable.js +68 -85
  63. package/lib/editable-table/index.js +1 -4
  64. package/lib/feedback-block/FeedbackBlock.js +40 -35
  65. package/lib/feedback-block/FeedbackBlock.ve.js +56 -7
  66. package/lib/feedback-block/index.js +132 -85
  67. package/lib/feedback-block/index.umd.cjs +1 -1
  68. package/lib/feedback-block/style.css +2 -1
  69. package/lib/file-upload/file-upload/FileUpload.js +164 -202
  70. package/lib/file-upload/file-upload/FileUpload.ve.js +84 -18
  71. package/lib/file-upload/file-upload/mime-type.enum.js +106 -106
  72. package/lib/file-upload/index.js +390 -353
  73. package/lib/file-upload/index.umd.cjs +1 -1
  74. package/lib/file-upload/style.css +2 -1
  75. package/lib/filter-tiles/filter-tile/FilterTile.js +41 -46
  76. package/lib/filter-tiles/filter-tile/FilterTile.ve.js +51 -9
  77. package/lib/filter-tiles/filter-tile-set/FilterTileSet.js +12 -15
  78. package/lib/filter-tiles/filter-tile-set/FilterTileSet.ve.js +4 -4
  79. package/lib/filter-tiles/index.js +142 -107
  80. package/lib/filter-tiles/index.umd.cjs +1 -1
  81. package/lib/filter-tiles/style.css +2 -1
  82. package/lib/focused-task/focused-task/FocusedTask.js +52 -74
  83. package/lib/focused-task/focused-task/FocusedTask.ve.js +13 -12
  84. package/lib/focused-task/focused-task/useFocusedTask.js +20 -18
  85. package/lib/focused-task/focused-task-actions/FocusedTaskActions.js +12 -13
  86. package/lib/focused-task/index.js +127 -144
  87. package/lib/focused-task/index.umd.cjs +1 -1
  88. package/lib/focused-task/style.css +2 -1
  89. package/lib/growler/Growler.js +78 -90
  90. package/lib/growler/Growler.ve.js +23 -12
  91. package/lib/growler/GrowlerListProvider.js +38 -39
  92. package/lib/growler/Sonner.ve.js +17 -12
  93. package/lib/growler/index.js +249 -274
  94. package/lib/growler/index.umd.cjs +1 -1
  95. package/lib/growler/sonner.js +73 -102
  96. package/lib/growler/style.css +2 -1
  97. package/lib/index.js +520 -501
  98. package/lib/index.umd.cjs +4 -4
  99. package/lib/insight-card/InsightCard.js +90 -84
  100. package/lib/insight-card/InsightCard.ve.js +148 -15
  101. package/lib/insight-card/InsightCardSet.js +12 -12
  102. package/lib/insight-card/index.js +269 -141
  103. package/lib/insight-card/index.umd.cjs +1 -1
  104. package/lib/insight-card/style.css +2 -1
  105. package/lib/key-value-set/index.js +97 -87
  106. package/lib/key-value-set/index.umd.cjs +1 -1
  107. package/lib/key-value-set/key-value-set/KeyValueSet.js +17 -21
  108. package/lib/key-value-set/key-value-set/KeyValueSet.ve.js +10 -5
  109. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.js +25 -21
  110. package/lib/key-value-set/key-value-set-item/KeyValueSetItem.ve.js +13 -6
  111. package/lib/key-value-set/style.css +2 -1
  112. package/lib/list-bar/advanced-search/AdvancedSearch.js +51 -54
  113. package/lib/list-bar/advanced-search/AdvancedSearch.ve.js +30 -8
  114. package/lib/list-bar/index.js +305 -301
  115. package/lib/list-bar/index.umd.cjs +1 -1
  116. package/lib/list-bar/list-bar/InputGroupWrapper.js +10 -19
  117. package/lib/list-bar/list-bar/ListBar.js +105 -121
  118. package/lib/list-bar/list-bar/ListBar.ve.js +13 -17
  119. package/lib/list-bar/list-bar/ListBarSearch.js +20 -21
  120. package/lib/list-bar/list-bar/ListBarSearchInfo.js +8 -12
  121. package/lib/list-bar/list-bar/ListBarSortBy.js +28 -38
  122. package/lib/list-bar/search-results-bar/SearchResultsBar.js +38 -28
  123. package/lib/list-bar/search-results-bar/SearchResultsBar.ve.js +4 -11
  124. package/lib/list-bar/style.css +2 -1
  125. package/lib/matrix/index.js +79 -87
  126. package/lib/matrix/index.umd.cjs +1 -1
  127. package/lib/matrix/matrix/Matrix.js +18 -26
  128. package/lib/matrix/matrix/Matrix.ve.js +4 -7
  129. package/lib/matrix/matrix-body/MatrixBody.js +10 -13
  130. package/lib/matrix/matrix-cell/MatrixCell.js +23 -18
  131. package/lib/matrix/matrix-head/MatrixHead.js +10 -13
  132. package/lib/matrix/matrix-header/MatrixHeader.js +20 -23
  133. package/lib/matrix/matrix-row/MatrixRow.js +10 -13
  134. package/lib/matrix/style.css +2 -1
  135. package/lib/modal/index.js +197 -187
  136. package/lib/modal/index.umd.cjs +1 -1
  137. package/lib/modal/modal/Modal.js +90 -108
  138. package/lib/modal/modal/Modal.ve.js +43 -13
  139. package/lib/modal/modal/useModal.js +19 -24
  140. package/lib/modal/modal-footer/ModalFooter.js +11 -12
  141. package/lib/modal/style.css +2 -1
  142. package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.21.3/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +49 -0
  143. package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/index.browser.js +8 -10
  144. package/lib/node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js +4 -4
  145. package/lib/page-title/heading-level/HeadingLevel.js +8 -12
  146. package/lib/page-title/index.js +33 -40
  147. package/lib/page-title/index.umd.cjs +1 -1
  148. package/lib/page-title/page-subtitle/PageSubtitle.js +13 -18
  149. package/lib/page-title/page-subtitle/PageSubtitle.ve.js +4 -5
  150. package/lib/page-title/page-title/PageTitle.js +15 -19
  151. package/lib/page-title/page-title/PageTitle.ve.js +4 -7
  152. package/lib/page-title/style.css +2 -1
  153. package/lib/photo/index.js +174 -177
  154. package/lib/photo/index.umd.cjs +1 -1
  155. package/lib/photo/photo/Photo.js +72 -81
  156. package/lib/photo/photo/Photo.ve.js +21 -7
  157. package/lib/photo/photo-carousel/PhotoCarousel.js +36 -51
  158. package/lib/photo/photo-carousel/PhotoCarousel.ve.js +13 -9
  159. package/lib/photo/style.css +2 -1
  160. package/lib/product-bar/hooks/usePriorityPlus.js +88 -104
  161. package/lib/product-bar/index.js +372 -395
  162. package/lib/product-bar/index.umd.cjs +1 -1
  163. package/lib/product-bar/product-bar/ProductBar.js +77 -103
  164. package/lib/product-bar/product-bar/ProductBar.ve.js +46 -15
  165. package/lib/product-bar/product-bar-name/ProductBarName.js +37 -40
  166. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.js +48 -70
  167. package/lib/product-bar/product-bar-overflow-menu/ProductBarOverflowMenu.ve.js +4 -8
  168. package/lib/product-bar/product-bar-tab/ProductBarTab.js +28 -26
  169. package/lib/product-bar/slack-link/SlackLink.js +26 -30
  170. package/lib/product-bar/slack-link/SlackLink.ve.js +4 -5
  171. package/lib/product-bar/style.css +2 -1
  172. package/lib/product-bar-vertical/index.js +240 -251
  173. package/lib/product-bar-vertical/index.umd.cjs +1 -1
  174. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.js +42 -61
  175. package/lib/product-bar-vertical/product-bar-vertical/ProductBarVertical.ve.js +53 -23
  176. package/lib/product-bar-vertical/product-bar-vertical-header/ProductBarVerticalHeader.js +30 -42
  177. package/lib/product-bar-vertical/product-bar-vertical-item/ProductBarVerticalItem.js +71 -89
  178. package/lib/product-bar-vertical/product-bar-vertical-section/ProductBarVerticalSection.js +22 -29
  179. package/lib/product-bar-vertical/style.css +2 -1
  180. package/lib/progress-indicators/index.js +372 -255
  181. package/lib/progress-indicators/index.umd.cjs +1 -1
  182. package/lib/progress-indicators/progress-bar/ProgressBar.js +66 -110
  183. package/lib/progress-indicators/progress-bar/ProgressBar.ve.js +66 -13
  184. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.js +34 -54
  185. package/lib/progress-indicators/progress-bar/progress-bar-step/ProgressBarStep.ve.js +136 -8
  186. package/lib/progress-indicators/progress-ring/ProgressRing.js +45 -52
  187. package/lib/progress-indicators/style.css +2 -1
  188. package/lib/rich-text-editor/index.js +556 -582
  189. package/lib/rich-text-editor/index.umd.cjs +11 -11
  190. package/lib/rich-text-editor/rich-text-editor/RTELinkModal.js +29 -33
  191. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.js +23 -37
  192. package/lib/rich-text-editor/rich-text-editor/RTEToolbarButton.ve.js +13 -6
  193. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.js +68 -77
  194. package/lib/rich-text-editor/rich-text-editor/RichTextEditor.ve.js +21 -8
  195. package/lib/rich-text-editor/rich-text-editor/hooks/useHtmlToMd.js +14 -20
  196. package/lib/rich-text-editor/rich-text-editor/hooks/useMdToHtml.js +14 -20
  197. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEContent.js +33 -27
  198. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEObserver.js +79 -88
  199. package/lib/rich-text-editor/rich-text-editor/hooks/useRTESelectionListener.js +28 -36
  200. package/lib/rich-text-editor/rich-text-editor/hooks/useRTEToolbarButtons.js +195 -211
  201. package/lib/rich-text-editor/rich-text-editor/icons/BOLD.svg.js +4 -4
  202. package/lib/rich-text-editor/rich-text-editor/icons/INDENT.svg.js +4 -4
  203. package/lib/rich-text-editor/rich-text-editor/icons/ITALICS.svg.js +4 -4
  204. package/lib/rich-text-editor/rich-text-editor/icons/LINK.svg.js +4 -4
  205. package/lib/rich-text-editor/rich-text-editor/icons/ORDERED_LIST.svg.js +4 -4
  206. package/lib/rich-text-editor/rich-text-editor/icons/OUTDENT.svg.js +4 -4
  207. package/lib/rich-text-editor/rich-text-editor/icons/REDO.svg.js +4 -4
  208. package/lib/rich-text-editor/rich-text-editor/icons/UNDO.svg.js +4 -4
  209. package/lib/rich-text-editor/rich-text-editor/icons/UNLINK.svg.js +4 -4
  210. package/lib/rich-text-editor/rich-text-editor/icons/UNORDERED_LIST.svg.js +4 -4
  211. package/lib/rich-text-editor/rich-text-editor/utils/flattenListItemParagraphs.js +12 -12
  212. package/lib/rich-text-editor/rich-text-editor/utils/removeUnrepresentableBreaks.js +20 -19
  213. package/lib/rich-text-editor/rich-text-editor/utils/utils.js +11 -15
  214. package/lib/rich-text-editor/style.css +2 -1
  215. package/lib/scrollable-container/ScrollableContainer.js +18 -27
  216. package/lib/scrollable-container/ScrollableContainer.ve.js +4 -4
  217. package/lib/scrollable-container/index.js +20 -27
  218. package/lib/scrollable-container/index.umd.cjs +1 -1
  219. package/lib/scrollable-container/style.css +2 -1
  220. package/lib/side-nav/index.js +190 -228
  221. package/lib/side-nav/index.umd.cjs +1 -1
  222. package/lib/side-nav/side-nav/SideNav.js +43 -60
  223. package/lib/side-nav/side-nav/SideNav.ve.js +22 -16
  224. package/lib/side-nav/side-nav/navContext.js +7 -7
  225. package/lib/side-nav/side-nav-header/SideNavHeader.js +14 -15
  226. package/lib/side-nav/side-nav-item/SideNavItem.js +68 -94
  227. package/lib/side-nav/side-nav-section/SideNavSection.js +16 -26
  228. package/lib/side-nav/style.css +2 -1
  229. package/lib/sorting-header/caret/caret.ve.js +13 -5
  230. package/lib/sorting-header/index.js +269 -251
  231. package/lib/sorting-header/index.umd.cjs +1 -1
  232. package/lib/sorting-header/sorting-header/SortingHeader.js +110 -124
  233. package/lib/sorting-header/sorting-header/SortingHeader.ve.js +30 -6
  234. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.js +69 -83
  235. package/lib/sorting-header/sorting-header-cell/SortingHeaderCell.ve.js +21 -7
  236. package/lib/sorting-header/style.css +2 -1
  237. package/lib/style.css +2 -1
  238. package/lib/tabs/index.js +255 -201
  239. package/lib/tabs/index.umd.cjs +1 -1
  240. package/lib/tabs/style.css +2 -1
  241. package/lib/tabs/tab/Tab.js +24 -27
  242. package/lib/tabs/tab/Tab.ve.js +76 -6
  243. package/lib/tabs/tab-panel/TabPanel.js +16 -25
  244. package/lib/tabs/tabs/Tabs.js +101 -112
  245. package/lib/tabs/tabs/Tabs.ve.js +13 -11
  246. package/lib/tags/clickable-tag/ClickableTag.js +86 -90
  247. package/lib/tags/clickable-tag/ClickableTag.ve.js +66 -9
  248. package/lib/tags/index.js +342 -199
  249. package/lib/tags/index.umd.cjs +1 -1
  250. package/lib/tags/split-tag/SplitTag.js +49 -30
  251. package/lib/tags/split-tag/SplitTag.ve.js +35 -9
  252. package/lib/tags/style.css +2 -1
  253. package/lib/tags/tag/Tag.js +42 -38
  254. package/lib/tags/tag/Tag.ve.js +41 -6
  255. package/lib/utils/cl.js +5 -5
  256. package/lib/zero-state/ZeroState.js +36 -29
  257. package/lib/zero-state/ZeroState.ve.js +29 -11
  258. package/lib/zero-state/index.js +103 -78
  259. package/lib/zero-state/index.umd.cjs +1 -1
  260. package/lib/zero-state/style.css +2 -1
  261. package/package.json +12 -12
  262. package/lib/node_modules/.pnpm/@vanilla-extract_recipes@0.2.5_@vanilla-extract_css@1.17.4/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js +0 -57
@@ -1,462 +1,402 @@
1
1
  import * as e from "react";
2
- import { useDrop as we, useDrag as xe, useButton as ke, DragPreview as Le } from "react-aria";
3
- import { SpsTooltip as Ce, useSpsForm as Ee, SpsTextInput as Ne } from "@spscommerce/ds-react";
4
- import { TooltipShowTrigger as Te, Position as De, SpsIcon as Oe } from "@spscommerce/ds-shared";
5
- import { DOCUMENT_SEARCH_NO_RESULTS_LARGE as Ve, DOCUMENT_SEARCH_NO_RESULTS_SMALL as Se } from "@sps-woodland/illustrations";
6
- import { useChildTestIdAttrBuilder as me, cl as T, Icon as Pe, Metadata as pe } from "@sps-woodland/core";
7
- import { ZeroState as se } from "@sps-woodland/core/zero-state";
8
- import { Card as oe } from "@sps-woodland/core/card";
9
- import { grid as le } from "@sps-woodland/tokens";
10
- import { Tag as Me } from "@sps-woodland/core/tag";
11
- import { ScrollableContainer as Ae } from "@sps-woodland/core/scrollable-container";
12
- import { FeedbackBlock as Re } from "@sps-woodland/core/feedback-block";
13
- import { useWoodlandLanguage as X } from "@spscommerce/i18n";
14
- import { Button as H } from "@sps-woodland/core/buttons";
15
- let Fe = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", Ie = (a = 21) => {
16
- let l = "", s = crypto.getRandomValues(new Uint8Array(a |= 0));
17
- for (; a--; )
18
- l += Fe[s[a] & 63];
19
- return l;
2
+ import { DragPreview as t, useButton as n, useDrag as r, useDrop as i } from "react-aria";
3
+ import { SpsTextInput as a, SpsTooltip as o, useSpsForm as s } from "@spscommerce/ds-react";
4
+ import { Position as c, SpsIcon as l, TooltipShowTrigger as u } from "@spscommerce/ds-shared";
5
+ import { DOCUMENT_SEARCH_NO_RESULTS_LARGE as d, DOCUMENT_SEARCH_NO_RESULTS_SMALL as f } from "@sps-woodland/illustrations";
6
+ import { Icon as p, Metadata as m, cl as h, useChildTestIdAttrBuilder as g } from "@sps-woodland/core";
7
+ import { ZeroState as _ } from "@sps-woodland/core/zero-state";
8
+ import { Card as v } from "@sps-woodland/core/card";
9
+ import { grid as y } from "@sps-woodland/tokens";
10
+ import { Tag as b } from "@sps-woodland/core/tag";
11
+ import { ScrollableContainer as x } from "@sps-woodland/core/scrollable-container";
12
+ import { FeedbackBlock as S } from "@sps-woodland/core/feedback-block";
13
+ import { useWoodlandLanguage as C } from "@spscommerce/i18n";
14
+ import { Button as w } from "@sps-woodland/core/buttons";
15
+ //#region ../../../node_modules/.pnpm/nanoid@5.1.16/node_modules/nanoid/url-alphabet/index.js
16
+ var T = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict", E = (e = 21) => {
17
+ let t = "", n = crypto.getRandomValues(new Uint8Array(e |= 0));
18
+ for (; e--;) t += T[n[e] & 63];
19
+ return t;
20
20
  };
21
- function He(a, l, s) {
22
- return l in a ? Object.defineProperty(a, l, {
23
- value: s,
24
- enumerable: !0,
25
- configurable: !0,
26
- writable: !0
27
- }) : a[l] = s, a;
21
+ //#endregion
22
+ //#region ../../../node_modules/.pnpm/@vanilla-extract+recipes@0.2.5_@vanilla-extract+css@1.21.3/node_modules/@vanilla-extract/recipes/createRuntimeFn/dist/vanilla-extract-recipes-createRuntimeFn.esm.js
23
+ function D(e, t, n) {
24
+ return t in e ? Object.defineProperty(e, t, {
25
+ value: n,
26
+ enumerable: !0,
27
+ configurable: !0,
28
+ writable: !0
29
+ }) : e[t] = n, e;
28
30
  }
29
- function _e(a, l) {
30
- var s = Object.keys(a);
31
- if (Object.getOwnPropertySymbols) {
32
- var o = Object.getOwnPropertySymbols(a);
33
- l && (o = o.filter(function(n) {
34
- return Object.getOwnPropertyDescriptor(a, n).enumerable;
35
- })), s.push.apply(s, o);
36
- }
37
- return s;
31
+ function O(e, t) {
32
+ var n = Object.keys(e);
33
+ if (Object.getOwnPropertySymbols) {
34
+ var r = Object.getOwnPropertySymbols(e);
35
+ t && (r = r.filter(function(t) {
36
+ return Object.getOwnPropertyDescriptor(e, t).enumerable;
37
+ })), n.push.apply(n, r);
38
+ }
39
+ return n;
38
40
  }
39
- function re(a) {
40
- for (var l = 1; l < arguments.length; l++) {
41
- var s = arguments[l] != null ? arguments[l] : {};
42
- l % 2 ? _e(Object(s), !0).forEach(function(o) {
43
- He(a, o, s[o]);
44
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(a, Object.getOwnPropertyDescriptors(s)) : _e(Object(s)).forEach(function(o) {
45
- Object.defineProperty(a, o, Object.getOwnPropertyDescriptor(s, o));
46
- });
47
- }
48
- return a;
41
+ function k(e) {
42
+ for (var t = 1; t < arguments.length; t++) {
43
+ var n = arguments[t] == null ? {} : arguments[t];
44
+ t % 2 ? O(Object(n), !0).forEach(function(t) {
45
+ D(e, t, n[t]);
46
+ }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(n)) : O(Object(n)).forEach(function(t) {
47
+ Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(n, t));
48
+ });
49
+ }
50
+ return e;
49
51
  }
50
- var je = (a, l, s) => {
51
- for (var o of Object.keys(a)) {
52
- var n;
53
- if (a[o] !== ((n = l[o]) !== null && n !== void 0 ? n : s[o]))
54
- return !1;
55
- }
56
- return !0;
57
- }, k = (a) => (l) => {
58
- var s = a.defaultClassName, o = re(re({}, a.defaultVariants), l);
59
- for (var n in o) {
60
- var f, h = (f = o[n]) !== null && f !== void 0 ? f : a.defaultVariants[n];
61
- if (h != null) {
62
- var g = h;
63
- typeof g == "boolean" && (g = g === !0 ? "true" : "false");
64
- var _ = (
65
- // @ts-expect-error
66
- a.variantClassNames[n][g]
67
- );
68
- _ && (s += " " + _);
69
- }
70
- }
71
- for (var [L, C] of a.compoundVariants)
72
- je(L, o, a.defaultVariants) && (s += " " + C);
73
- return s;
74
- }, Be = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx90", variantClassNames: { vertical: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx91", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx92" } }, defaultVariants: {}, compoundVariants: [] }), qe = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx93", variantClassNames: { vertical: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx94", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx95" } }, defaultVariants: {}, compoundVariants: [] }), ie = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx96", Ze = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx97", variantClassNames: { isLeftSide: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx98", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx99" }, isRightSide: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9a", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9b" }, adjustForPhantomDroppableContainer: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9c", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9d" } }, defaultVariants: {}, compoundVariants: [] }), $e = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9e", variantClassNames: { vertical: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9f", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9g" } }, defaultVariants: {}, compoundVariants: [] }), Ue = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9h", variantClassNames: { vertical: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9i", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9j" } }, defaultVariants: {}, compoundVariants: [] }), ne = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9k", We = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9l", Je = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9m", Ke = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9n", variantClassNames: { isDragging: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9o", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9p" } }, defaultVariants: {}, compoundVariants: [] }), ze = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9q", ce = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9r", variantClassNames: { isDropTarget: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9s", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9t" } }, defaultVariants: {}, compoundVariants: [] }), Ge = k({ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9u", variantClassNames: { isDropTarget: { true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9v", false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9w" } }, defaultVariants: {}, compoundVariants: [] }), G = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9x", Qe = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9y", Xe = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx9z", Ye = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx910", et = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx911", tt = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx912", at = "pkg_sps-woodland_core__family_add-to-list__version_8_56_2__hash_13b8tx913";
75
- function de({
76
- headerText: a,
77
- showCount: l,
78
- showIcons: s,
79
- showMoveAllLinks: o,
80
- showMoreOptionsText: n,
81
- disableMoveAllLinks: f,
82
- maxHeight: h,
83
- children: g,
84
- side: _,
85
- itemCount: L,
86
- otherHeader: C,
87
- className: j,
88
- vertical: w,
89
- moveAll: E,
90
- adjustForPhantomDroppableContainer: D,
91
- "data-testid": x
92
- }) {
93
- const O = me({ "data-testid": x }), { t: v } = X(), c = v(_ === "left" ? "addToList.onColumnHeader" : "addToList.offColumnHeader"), b = _ === "left" ? "eye" : "eye-slash", B = v(_ === "left" ? "addToList.offColumnHeader" : "addToList.onColumnHeader"), q = v("addToList.moveAllItemsToCol", {
94
- columnName: C || B
95
- }), d = w ? /* @__PURE__ */ e.createElement(e.Fragment, null) : /* @__PURE__ */ e.createElement(
96
- "div",
97
- {
98
- className: Ze({
99
- isLeftSide: _ === "left",
100
- isRightSide: _ === "right",
101
- adjustForPhantomDroppableContainer: !!D && _ === "left"
102
- })
103
- }
104
- );
105
- function Z() {
106
- E && typeof E == "function" && E(_);
107
- }
108
- return /* @__PURE__ */ e.createElement(
109
- "div",
110
- {
111
- className: T(Ue({ vertical: w }), j),
112
- "data-testid": x
113
- },
114
- /* @__PURE__ */ e.createElement("div", { className: Qe, ...O("column-header") }, s && /* @__PURE__ */ e.createElement(Pe, { icon: b, className: Xe }), a || c, l && /* @__PURE__ */ e.createElement(Me, { kind: "key", className: Ye }, L)),
115
- h ? /* @__PURE__ */ e.createElement("div", { className: ie }, d, /* @__PURE__ */ e.createElement(Ae, { maxHeight: h }, g)) : /* @__PURE__ */ e.createElement("div", { className: ie }, d, g),
116
- o && L > 0 && /* @__PURE__ */ e.createElement(
117
- H,
118
- {
119
- className: D && _ === "right" ? at : void 0,
120
- kind: "link",
121
- onClick: Z,
122
- disabled: f,
123
- ...O("move-all-button")
124
- },
125
- q
126
- ),
127
- n && L > 0 && /* @__PURE__ */ e.createElement(Re, { kind: "info", micro: !0 }, v("addToList.moreOptionsAvailable", {
128
- defaultValue: "More options available. Use the search field to filter results."
129
- }))
130
- );
52
+ var A = (e, t, n) => {
53
+ for (var r of Object.keys(e)) if (e[r] !== (t[r] ?? n[r])) return !1;
54
+ return !0;
55
+ }, j = (e) => (t) => {
56
+ var n = e.defaultClassName, r = k(k({}, e.defaultVariants), t);
57
+ for (var i in r) {
58
+ var a = r[i] ?? e.defaultVariants[i];
59
+ if (a != null) {
60
+ var o = a;
61
+ typeof o == "boolean" && (o = o === !0 ? "true" : "false");
62
+ var s = e.variantClassNames[i][o];
63
+ s && (n += " " + s);
64
+ }
65
+ }
66
+ for (var [c, l] of e.compoundVariants) A(c, r, e.defaultVariants) && (n += " " + l);
67
+ return n;
68
+ }, M = j({
69
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx90",
70
+ variantClassNames: { vertical: {
71
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx91",
72
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx92"
73
+ } },
74
+ defaultVariants: {},
75
+ compoundVariants: []
76
+ }), ee = j({
77
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx93",
78
+ variantClassNames: { vertical: {
79
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx94",
80
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx95"
81
+ } },
82
+ defaultVariants: {},
83
+ compoundVariants: []
84
+ }), N = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx96", P = j({
85
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx97",
86
+ variantClassNames: {
87
+ isLeftSide: {
88
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx98",
89
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx99"
90
+ },
91
+ isRightSide: {
92
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9a",
93
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9b"
94
+ },
95
+ adjustForPhantomDroppableContainer: {
96
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9c",
97
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9d"
98
+ }
99
+ },
100
+ defaultVariants: {},
101
+ compoundVariants: []
102
+ }), te = j({
103
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9e",
104
+ variantClassNames: { vertical: {
105
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9f",
106
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9g"
107
+ } },
108
+ defaultVariants: {},
109
+ compoundVariants: []
110
+ }), F = j({
111
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9h",
112
+ variantClassNames: { vertical: {
113
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9i",
114
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9j"
115
+ } },
116
+ defaultVariants: {},
117
+ compoundVariants: []
118
+ }), ne = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9k", I = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9m", re = j({
119
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9n",
120
+ variantClassNames: { isDragging: {
121
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9o",
122
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9p"
123
+ } },
124
+ defaultVariants: {},
125
+ compoundVariants: []
126
+ }), ie = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9q", L = j({
127
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9r",
128
+ variantClassNames: { isDropTarget: {
129
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9s",
130
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9t"
131
+ } },
132
+ defaultVariants: {},
133
+ compoundVariants: []
134
+ }), ae = j({
135
+ defaultClassName: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9u",
136
+ variantClassNames: { isDropTarget: {
137
+ true: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9v",
138
+ false: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9w"
139
+ } },
140
+ defaultVariants: {},
141
+ compoundVariants: []
142
+ }), oe = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9x", R = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9y", se = "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx911";
143
+ //#endregion
144
+ //#region src/add-to-list/add-to-list/ItemsList.tsx
145
+ function z({ headerText: t, showCount: n, showIcons: r, showMoveAllLinks: i, showMoreOptionsText: a, disableMoveAllLinks: o, maxHeight: s, children: c, side: l, itemCount: u, otherHeader: d, className: f, vertical: m, moveAll: _, adjustForPhantomDroppableContainer: v, "data-testid": y }) {
146
+ let T = g({ "data-testid": y }), { t: E } = C(), D = E(l === "left" ? "addToList.onColumnHeader" : "addToList.offColumnHeader"), O = l === "left" ? "eye" : "eye-slash", k = E(l === "left" ? "addToList.offColumnHeader" : "addToList.onColumnHeader"), A = E("addToList.moveAllItemsToCol", { columnName: d || k }), j = m ? /* @__PURE__ */ e.createElement(e.Fragment, null) : /* @__PURE__ */ e.createElement("div", { className: P({
147
+ isLeftSide: l === "left",
148
+ isRightSide: l === "right",
149
+ adjustForPhantomDroppableContainer: !!v && l === "left"
150
+ }) });
151
+ function M() {
152
+ _ && typeof _ == "function" && _(l);
153
+ }
154
+ return /* @__PURE__ */ e.createElement("div", {
155
+ className: h(F({ vertical: m }), f),
156
+ "data-testid": y
157
+ }, /* @__PURE__ */ e.createElement("div", {
158
+ className: R,
159
+ ...T("column-header")
160
+ }, r && /* @__PURE__ */ e.createElement(p, {
161
+ icon: O,
162
+ className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9z"
163
+ }), t || D, n && /* @__PURE__ */ e.createElement(b, {
164
+ kind: "key",
165
+ className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx910"
166
+ }, u)), s ? /* @__PURE__ */ e.createElement("div", { className: N }, j, /* @__PURE__ */ e.createElement(x, { maxHeight: s }, c)) : /* @__PURE__ */ e.createElement("div", { className: N }, j, c), i && u > 0 && /* @__PURE__ */ e.createElement(w, {
167
+ className: v && l === "right" ? "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx913" : void 0,
168
+ kind: "link",
169
+ onClick: M,
170
+ disabled: o,
171
+ ...T("move-all-button")
172
+ }, A), a && u > 0 && /* @__PURE__ */ e.createElement(S, {
173
+ kind: "info",
174
+ micro: !0
175
+ }, E("addToList.moreOptionsAvailable", { defaultValue: "More options available. Use the search field to filter results." })));
131
176
  }
132
- function Q({
133
- className: a,
134
- children: l,
135
- filtering: s,
136
- manualSorting: o,
137
- id: n,
138
- "data-testid": f
139
- }) {
140
- const { t: h } = X();
141
- return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
142
- "div",
143
- {
144
- role: "listitem",
145
- className: T(
146
- a,
147
- ce({ isDropTarget: !1 }),
148
- Je,
149
- "listitem-component"
150
- ),
151
- "data-testid": f
152
- },
153
- o && s && /* @__PURE__ */ e.createElement(
154
- "i",
155
- {
156
- className: We,
157
- id: `list-item-${n}-drag-handle`
158
- }
159
- ),
160
- l
161
- ), o && s && /* @__PURE__ */ e.createElement(
162
- Ce,
163
- {
164
- for: `list-item-${n}-drag-handle`,
165
- position: De.TOP_LEFT,
166
- showOn: Te.CLICK
167
- },
168
- h("addToList.disabledDragTooltip", {
169
- defaultValue: "Drag and drop are disabled when filters are engaged"
170
- })
171
- ));
177
+ //#endregion
178
+ //#region src/add-to-list/add-to-list/ListItem.tsx
179
+ function B({ className: t, children: n, filtering: r, manualSorting: i, id: a, "data-testid": s }) {
180
+ let { t: l } = C();
181
+ return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("div", {
182
+ role: "listitem",
183
+ className: h(t, L({ isDropTarget: !1 }), I, "listitem-component"),
184
+ "data-testid": s
185
+ }, i && r && /* @__PURE__ */ e.createElement("i", {
186
+ className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9l",
187
+ id: `list-item-${a}-drag-handle`
188
+ }), n), i && r && /* @__PURE__ */ e.createElement(o, {
189
+ for: `list-item-${a}-drag-handle`,
190
+ position: c.TOP_LEFT,
191
+ showOn: u.CLICK
192
+ }, l("addToList.disabledDragTooltip", { defaultValue: "Drag and drop are disabled when filters are engaged" })));
172
193
  }
173
- pe.set(Q, { name: "ListItem" });
174
- function st({
175
- onList: a,
176
- offList: l,
177
- onHeader: s,
178
- offHeader: o,
179
- showFilter: n,
180
- showCount: f,
181
- showIcons: h,
182
- showMoveAllLinks: g,
183
- manualSort: _,
184
- maxDisplayedItems: L,
185
- maxHeightPx: C,
186
- maxHeightRem: j,
187
- onChange: w,
188
- onListZeroState: E,
189
- offListZeroState: D,
190
- vertical: x = !1,
191
- onListAlphaSort: O = !0,
192
- "data-testid": v
193
- }) {
194
- const c = me({ "data-testid": v }), { t: b } = X(), { formValue: B, formMeta: q } = Ee({
195
- filterString: ""
196
- }), [d, Z] = e.useState(""), $ = C ? C / 16 : j, Y = $ ? `${$}rem` : "", S = e.useCallback(
197
- (t, r) => (!_ && O || r === "right" ? [...t].sort((m, p) => m.label.localeCompare(p.label)) : t).map((m) => {
198
- const p = { ...m };
199
- return p.id || (p.id = Ie()), p;
200
- }),
201
- [_, O]
202
- ), i = e.useMemo(() => S(a, "left"), [a, S]), u = e.useMemo(() => S(l, "right"), [l, S]), P = e.useCallback(
203
- (t) => d ? t.label.toLowerCase().includes(d.toLowerCase()) : !0,
204
- [d]
205
- ), U = (t, r, y) => {
206
- const m = y.find((p) => p.label === t);
207
- m ? r === i ? w({
208
- onList: [...i, m],
209
- offList: u.filter((p) => p.label !== m.label)
210
- }) : y === i && w({
211
- onList: i.filter((p) => p.label !== m.label),
212
- offList: [...u, m]
213
- }) : console.error("could not remove item");
214
- };
215
- function ue(t) {
216
- Z(t.target.value);
217
- }
218
- function ee(t) {
219
- w(t === "left" ? {
220
- onList: i.filter((r) => r.required),
221
- offList: [...u, ...i.filter((r) => !r.required)]
222
- } : {
223
- onList: [...i, ...u],
224
- offList: []
225
- });
226
- }
227
- const te = e.useCallback(
228
- (t) => {
229
- const { className: r, index: y, isPhantomDroppableContainer: m, children: p, ...A } = t, V = e.useRef(null), { dropProps: W, isDropTarget: R } = we({
230
- ref: V,
231
- async onDrop(J) {
232
- let K = await Promise.all(
233
- J.items.filter((I) => I.kind === "text" && I.types.has("text/plain")).map((I) => I.getText("text/plain"))
234
- );
235
- const { index: F } = JSON.parse(K[0]), z = [...i], [be] = z.splice(F, 1), ye = y > F ? y - 1 : y;
236
- z.splice(ye, 0, be), w({
237
- onList: z,
238
- offList: u
239
- });
240
- }
241
- });
242
- return /* @__PURE__ */ e.createElement(
243
- "div",
244
- {
245
- ref: V,
246
- ..._ ? W : [],
247
- className: T(
248
- r,
249
- m ? Ge({ isDropTarget: R }) : ce({ isDropTarget: R })
250
- ),
251
- ...c("droppable-container"),
252
- ...A
253
- },
254
- p
255
- );
256
- },
257
- [i, _]
258
- ), fe = e.useCallback(
259
- (t) => {
260
- const { label: r, data: y, listIndex: m, required: p } = t, A = e.useRef(null), V = e.useRef(null), W = { ...y, index: m }, { dragProps: R, dragButtonProps: J, isDragging: K } = xe({
261
- preview: A,
262
- hasDragButton: !0,
263
- getItems() {
264
- return [
265
- {
266
- "text/plain": JSON.stringify(W)
267
- }
268
- ];
269
- }
270
- }), { buttonProps: F } = ke(J, V);
271
- return /* @__PURE__ */ e.createElement(
272
- "div",
273
- {
274
- ..._ ? R : {},
275
- role: _ ? "button" : "listitem",
276
- tabIndex: 0,
277
- id: `${r}${m}-drag`,
278
- className: T(Ke({ isDragging: K })),
279
- ...c("draggable-item")
280
- },
281
- /* @__PURE__ */ e.createElement(te, { index: m }, _ && /* @__PURE__ */ e.createElement(
282
- "i",
283
- {
284
- ...F,
285
- ref: V,
286
- className: ne
287
- }
288
- ), r, !p && /* @__PURE__ */ e.createElement(
289
- H,
290
- {
291
- kind: "icon",
292
- icon: "x",
293
- "aria-label": b("addToList.remove", {
294
- elementName: r,
295
- defaultValue: `Remove ${r}`
296
- }),
297
- onClick: () => {
298
- U(r, u, i);
299
- },
300
- className: G,
301
- ...c("move-item-button")
302
- }
303
- )),
304
- /* @__PURE__ */ e.createElement(Le, { ref: A }, () => /* @__PURE__ */ e.createElement("div", { className: ze }, /* @__PURE__ */ e.createElement("i", { className: ne }), r))
305
- );
306
- },
307
- [i, _]
308
- ), N = e.useMemo(() => i.filter(P), [i, P]), M = e.useMemo(
309
- () => u.filter(P).slice(0, L),
310
- [u, P]
311
- ), he = !d && !!g && N.length > 0, ge = !d && !!g && M.length > 0, ve = !d && u.length > M.length, ae = !!_ && !d && N.length > 0 && !$;
312
- return /* @__PURE__ */ e.createElement("div", { "data-testid": v }, n && /* @__PURE__ */ e.createElement("div", { className: le.root }, /* @__PURE__ */ e.createElement("div", { className: T(le[12], tt) }, /* @__PURE__ */ e.createElement(
313
- Ne,
314
- {
315
- value: B.filterString,
316
- formMeta: q.fields.filterString,
317
- icon: Oe.FILTER,
318
- onChange: ue,
319
- ...c("filter-input")
320
- }
321
- ))), /* @__PURE__ */ e.createElement("div", { className: T(Be({ vertical: x })) }, /* @__PURE__ */ e.createElement(
322
- de,
323
- {
324
- headerText: s,
325
- showCount: !d && f,
326
- showIcons: h,
327
- showMoveAllLinks: he,
328
- disableMoveAllLinks: i.every((t) => t.required),
329
- maxHeight: Y,
330
- vertical: x,
331
- side: "left",
332
- className: qe({
333
- vertical: x
334
- }),
335
- otherHeader: o,
336
- itemCount: i.length,
337
- moveAll: ee,
338
- adjustForPhantomDroppableContainer: ae,
339
- ...c("on-items-list")
340
- },
341
- N.length > 0 ? /* @__PURE__ */ e.createElement(e.Fragment, null, _ && !d && N.map((t, r) => /* @__PURE__ */ e.createElement(e.Fragment, { key: t.id }, /* @__PURE__ */ e.createElement(
342
- fe,
343
- {
344
- data: t,
345
- label: t.label,
346
- required: t.required,
347
- listIndex: r
348
- }
349
- ), r === N.length - 1 && /* @__PURE__ */ e.createElement(te, { isPhantomDroppableContainer: !0, index: r + 1 }))), (!_ || d) && N.map((t) => /* @__PURE__ */ e.createElement(
350
- Q,
351
- {
352
- key: t.id,
353
- filtering: !!d,
354
- manualSorting: _,
355
- id: t.id,
356
- ...c("item")
357
- },
358
- t.label,
359
- !t.required && /* @__PURE__ */ e.createElement(
360
- H,
361
- {
362
- kind: "icon",
363
- icon: "x",
364
- "aria-label": b("addToList.remove", {
365
- elementName: t.label,
366
- defaultValue: `Remove ${t.label}`
367
- }),
368
- onClick: () => {
369
- U(t.label, u, i);
370
- },
371
- className: G,
372
- ...c("move-item-button")
373
- }
374
- )
375
- ))) : /* @__PURE__ */ e.createElement(oe, null, E ? /* @__PURE__ */ e.createElement(e.Fragment, null, E) : /* @__PURE__ */ e.createElement(
376
- se,
377
- {
378
- heading: b("addToList.noDataZeroStateColumnTitle", {
379
- defaultValue: "This Column is Empty"
380
- }),
381
- subHeading: b("addToList.noDataZeroStateOnColumnSubheading", {
382
- columnName: o,
383
- defaultValue: `Move options from the ${o}`
384
- }),
385
- artwork: Ve,
386
- micro: !0,
387
- ...c("on-list-zero-state")
388
- }
389
- ))
390
- ), /* @__PURE__ */ e.createElement(
391
- de,
392
- {
393
- headerText: o,
394
- showCount: !d && f,
395
- showIcons: h,
396
- showMoveAllLinks: ge,
397
- showMoreOptionsText: ve,
398
- maxHeight: Y,
399
- vertical: x,
400
- side: "right",
401
- className: $e({ vertical: x }),
402
- otherHeader: s,
403
- itemCount: u.length,
404
- moveAll: ee,
405
- adjustForPhantomDroppableContainer: ae,
406
- ...c("off-items-list")
407
- },
408
- M.length > 0 ? M.map((t) => /* @__PURE__ */ e.createElement(Q, { key: t.id, className: et, ...c("item") }, t.label, /* @__PURE__ */ e.createElement(
409
- H,
410
- {
411
- kind: "icon",
412
- icon: "plus-sign",
413
- "aria-label": b("addToList.add", {
414
- elementName: t.label,
415
- defaultValue: `Add ${t.label}`
416
- }),
417
- onClick: () => {
418
- U(t.label, i, u);
419
- },
420
- className: G,
421
- ...c("move-item-button")
422
- }
423
- ))) : /* @__PURE__ */ e.createElement(oe, null, D ? /* @__PURE__ */ e.createElement(e.Fragment, null, D) : /* @__PURE__ */ e.createElement(
424
- se,
425
- {
426
- heading: b("addToList.noDataZeroStateColumnTitle", {
427
- defaultValue: "This Column is Empty"
428
- }),
429
- subHeading: b("addToList.noDataZeroStateOffColumnSubheading", {
430
- columnName: s,
431
- defaultValue: `Remove options from the ${s}`
432
- }),
433
- artwork: Se,
434
- micro: !0,
435
- ...c("off-list-zero-state")
436
- }
437
- ))
438
- )));
194
+ m.set(B, { name: "ListItem" });
195
+ //#endregion
196
+ //#region src/add-to-list/add-to-list/AddToList.tsx
197
+ function V({ onList: o, offList: c, onHeader: u, offHeader: p, showFilter: m, showCount: b, showIcons: x, showMoveAllLinks: S, manualSort: T, maxDisplayedItems: D, maxHeightPx: O, maxHeightRem: k, onChange: A, onListZeroState: j, offListZeroState: N, vertical: P = !1, onListAlphaSort: F = !0, "data-testid": I }) {
198
+ let R = g({ "data-testid": I }), { t: V } = C(), { formValue: ce, formMeta: le } = s({ filterString: "" }), [H, ue] = e.useState(""), U = O ? O / 16 : k, W = U ? `${U}rem` : "", G = e.useCallback((e, t) => (!T && F || t === "right" ? [...e].sort((e, t) => e.label.localeCompare(t.label)) : e).map((e) => {
199
+ let t = { ...e };
200
+ return t.id ||= E(), t;
201
+ }), [T, F]), K = e.useMemo(() => G(o, "left"), [o, G]), q = e.useMemo(() => G(c, "right"), [c, G]), J = e.useCallback((e) => !H || e.label.toLowerCase().includes(H.toLowerCase()), [H]), Y = (e, t, n) => {
202
+ let r = n.find((t) => t.label === e);
203
+ r ? t === K ? A({
204
+ onList: [...K, r],
205
+ offList: q.filter((e) => e.label !== r.label)
206
+ }) : n === K && A({
207
+ onList: K.filter((e) => e.label !== r.label),
208
+ offList: [...q, r]
209
+ }) : console.error("could not remove item");
210
+ };
211
+ function de(e) {
212
+ ue(e.target.value);
213
+ }
214
+ function X(e) {
215
+ A(e === "left" ? {
216
+ onList: K.filter((e) => e.required),
217
+ offList: [...q, ...K.filter((e) => !e.required)]
218
+ } : {
219
+ onList: [...K, ...q],
220
+ offList: []
221
+ });
222
+ }
223
+ let Z = e.useCallback((t) => {
224
+ let { className: n, index: r, isPhantomDroppableContainer: a, children: o, ...s } = t, c = e.useRef(null), { dropProps: l, isDropTarget: u } = i({
225
+ ref: c,
226
+ async onDrop(e) {
227
+ let t = await Promise.all(e.items.filter((e) => e.kind === "text" && e.types.has("text/plain")).map((e) => e.getText("text/plain"))), { index: n } = JSON.parse(t[0]), i = [...K], [a] = i.splice(n, 1), o = r > n ? r - 1 : r;
228
+ i.splice(o, 0, a), A({
229
+ onList: i,
230
+ offList: q
231
+ });
232
+ }
233
+ });
234
+ return /* @__PURE__ */ e.createElement("div", {
235
+ ref: c,
236
+ ...T ? l : [],
237
+ className: h(n, a ? ae({ isDropTarget: u }) : L({ isDropTarget: u })),
238
+ ...R("droppable-container"),
239
+ ...s
240
+ }, o);
241
+ }, [K, T]), fe = e.useCallback((i) => {
242
+ let { label: a, data: o, listIndex: s, required: c } = i, l = e.useRef(null), u = e.useRef(null), d = {
243
+ ...o,
244
+ index: s
245
+ }, { dragProps: f, dragButtonProps: p, isDragging: m } = r({
246
+ preview: l,
247
+ hasDragButton: !0,
248
+ getItems() {
249
+ return [{ "text/plain": JSON.stringify(d) }];
250
+ }
251
+ }), { buttonProps: g } = n(p, u);
252
+ return /* @__PURE__ */ e.createElement("div", {
253
+ ...T ? f : {},
254
+ role: T ? "button" : "listitem",
255
+ tabIndex: 0,
256
+ id: `${a}${s}-drag`,
257
+ className: h(re({ isDragging: m })),
258
+ ...R("draggable-item")
259
+ }, /* @__PURE__ */ e.createElement(Z, { index: s }, T && /* @__PURE__ */ e.createElement("i", {
260
+ ...g,
261
+ ref: u,
262
+ className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9k"
263
+ }), a, !c && /* @__PURE__ */ e.createElement(w, {
264
+ kind: "icon",
265
+ icon: "x",
266
+ "aria-label": V("addToList.remove", {
267
+ elementName: a,
268
+ defaultValue: `Remove ${a}`
269
+ }),
270
+ onClick: () => {
271
+ Y(a, q, K);
272
+ },
273
+ className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9x",
274
+ ...R("move-item-button")
275
+ })), /* @__PURE__ */ e.createElement(t, { ref: l }, () => /* @__PURE__ */ e.createElement("div", { className: ie }, /* @__PURE__ */ e.createElement("i", { className: ne }), a)));
276
+ }, [K, T]), Q = e.useMemo(() => K.filter(J), [K, J]), $ = e.useMemo(() => q.filter(J).slice(0, D), [q, J]), pe = !H && !!S && Q.length > 0, me = !H && !!S && $.length > 0, he = !H && q.length > $.length, ge = !!T && !H && Q.length > 0 && !U;
277
+ return /* @__PURE__ */ e.createElement("div", { "data-testid": I }, m && /* @__PURE__ */ e.createElement("div", { className: y.root }, /* @__PURE__ */ e.createElement("div", { className: h(y[12], "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx912") }, /* @__PURE__ */ e.createElement(a, {
278
+ value: ce.filterString,
279
+ formMeta: le.fields.filterString,
280
+ icon: l.FILTER,
281
+ onChange: de,
282
+ ...R("filter-input")
283
+ }))), /* @__PURE__ */ e.createElement("div", { className: h(M({ vertical: P })) }, /* @__PURE__ */ e.createElement(z, {
284
+ headerText: u,
285
+ showCount: !H && b,
286
+ showIcons: x,
287
+ showMoveAllLinks: pe,
288
+ disableMoveAllLinks: K.every((e) => e.required),
289
+ maxHeight: W,
290
+ vertical: P,
291
+ side: "left",
292
+ className: ee({ vertical: P }),
293
+ otherHeader: p,
294
+ itemCount: K.length,
295
+ moveAll: X,
296
+ adjustForPhantomDroppableContainer: ge,
297
+ ...R("on-items-list")
298
+ }, Q.length > 0 ? /* @__PURE__ */ e.createElement(e.Fragment, null, T && !H && Q.map((t, n) => /* @__PURE__ */ e.createElement(e.Fragment, { key: t.id }, /* @__PURE__ */ e.createElement(fe, {
299
+ data: t,
300
+ label: t.label,
301
+ required: t.required,
302
+ listIndex: n
303
+ }), n === Q.length - 1 && /* @__PURE__ */ e.createElement(Z, {
304
+ isPhantomDroppableContainer: !0,
305
+ index: n + 1
306
+ }))), (!T || H) && Q.map((t) => /* @__PURE__ */ e.createElement(B, {
307
+ key: t.id,
308
+ filtering: !!H,
309
+ manualSorting: T,
310
+ id: t.id,
311
+ ...R("item")
312
+ }, t.label, !t.required && /* @__PURE__ */ e.createElement(w, {
313
+ kind: "icon",
314
+ icon: "x",
315
+ "aria-label": V("addToList.remove", {
316
+ elementName: t.label,
317
+ defaultValue: `Remove ${t.label}`
318
+ }),
319
+ onClick: () => {
320
+ Y(t.label, q, K);
321
+ },
322
+ className: "pkg_sps-woodland_core__family_add-to-list__version_8_56_4__hash_13b8tx9x",
323
+ ...R("move-item-button")
324
+ })))) : /* @__PURE__ */ e.createElement(v, null, j ? /* @__PURE__ */ e.createElement(e.Fragment, null, j) : /* @__PURE__ */ e.createElement(_, {
325
+ heading: V("addToList.noDataZeroStateColumnTitle", { defaultValue: "This Column is Empty" }),
326
+ subHeading: V("addToList.noDataZeroStateOnColumnSubheading", {
327
+ columnName: p,
328
+ defaultValue: `Move options from the ${p}`
329
+ }),
330
+ artwork: d,
331
+ micro: !0,
332
+ ...R("on-list-zero-state")
333
+ }))), /* @__PURE__ */ e.createElement(z, {
334
+ headerText: p,
335
+ showCount: !H && b,
336
+ showIcons: x,
337
+ showMoveAllLinks: me,
338
+ showMoreOptionsText: he,
339
+ maxHeight: W,
340
+ vertical: P,
341
+ side: "right",
342
+ className: te({ vertical: P }),
343
+ otherHeader: u,
344
+ itemCount: q.length,
345
+ moveAll: X,
346
+ adjustForPhantomDroppableContainer: ge,
347
+ ...R("off-items-list")
348
+ }, $.length > 0 ? $.map((t) => /* @__PURE__ */ e.createElement(B, {
349
+ key: t.id,
350
+ className: se,
351
+ ...R("item")
352
+ }, t.label, /* @__PURE__ */ e.createElement(w, {
353
+ kind: "icon",
354
+ icon: "plus-sign",
355
+ "aria-label": V("addToList.add", {
356
+ elementName: t.label,
357
+ defaultValue: `Add ${t.label}`
358
+ }),
359
+ onClick: () => {
360
+ Y(t.label, K, q);
361
+ },
362
+ className: oe,
363
+ ...R("move-item-button")
364
+ }))) : /* @__PURE__ */ e.createElement(v, null, N ? /* @__PURE__ */ e.createElement(e.Fragment, null, N) : /* @__PURE__ */ e.createElement(_, {
365
+ heading: V("addToList.noDataZeroStateColumnTitle", { defaultValue: "This Column is Empty" }),
366
+ subHeading: V("addToList.noDataZeroStateOffColumnSubheading", {
367
+ columnName: u,
368
+ defaultValue: `Remove options from the ${u}`
369
+ }),
370
+ artwork: f,
371
+ micro: !0,
372
+ ...R("off-list-zero-state")
373
+ })))));
439
374
  }
440
- pe.set(st, {
441
- name: "Add To List",
442
- props: {
443
- onList: { type: "ItemProps[]", required: !0 },
444
- offList: { type: "ItemProps[]", required: !0 },
445
- onHeader: { type: "string" },
446
- offHeader: { type: "string" },
447
- showFilter: { type: "boolean" },
448
- showCount: { type: "boolean" },
449
- showIcons: { type: "boolean" },
450
- showMoveAllLinks: { type: "boolean" },
451
- manualSort: { type: "boolean" },
452
- maxDisplayedItems: { type: "number" },
453
- maxHeight: { type: "string" },
454
- onChange: { type: "(newValue: AddToListAggregateValue) => void" },
455
- autoSort: { type: "boolean" },
456
- onListZeroState: { type: "ZeroState" },
457
- offListZeroState: { type: "ZeroState" }
458
- }
375
+ m.set(V, {
376
+ name: "Add To List",
377
+ props: {
378
+ onList: {
379
+ type: "ItemProps[]",
380
+ required: !0
381
+ },
382
+ offList: {
383
+ type: "ItemProps[]",
384
+ required: !0
385
+ },
386
+ onHeader: { type: "string" },
387
+ offHeader: { type: "string" },
388
+ showFilter: { type: "boolean" },
389
+ showCount: { type: "boolean" },
390
+ showIcons: { type: "boolean" },
391
+ showMoveAllLinks: { type: "boolean" },
392
+ manualSort: { type: "boolean" },
393
+ maxDisplayedItems: { type: "number" },
394
+ maxHeight: { type: "string" },
395
+ onChange: { type: "(newValue: AddToListAggregateValue) => void" },
396
+ autoSort: { type: "boolean" },
397
+ onListZeroState: { type: "ZeroState" },
398
+ offListZeroState: { type: "ZeroState" }
399
+ }
459
400
  });
460
- export {
461
- st as AddToList
462
- };
401
+ //#endregion
402
+ export { V as AddToList };