@wix/patterns 1.18.0 → 1.20.0

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 (206) hide show
  1. package/dist/cjs/components/AutoCompleteFilter/AutoCompleteFilter.js.map +1 -1
  2. package/dist/cjs/components/BulkAction/BulkActionModalRenderProp.js.map +1 -1
  3. package/dist/cjs/components/Collapse/Collapse.st.css.js +3 -3
  4. package/dist/cjs/components/Collapse/Collapse.st.css.js.map +1 -1
  5. package/dist/cjs/components/CollectionItemActions/CollectionItemActions.js +13 -4
  6. package/dist/cjs/components/CollectionItemActions/CollectionItemActions.js.map +1 -1
  7. package/dist/cjs/components/CollectionPageNew/CollectionPage.js.map +1 -1
  8. package/dist/cjs/components/CollectionTable/CollectionTable.js.map +1 -1
  9. package/dist/cjs/components/CollectionTable/CollectionTableBaseCommonProps.js.map +1 -1
  10. package/dist/cjs/components/CollectionTable/CollectionTableWSRTable.js.map +1 -1
  11. package/dist/cjs/components/CollectionToolbar/CollectionToolbar.st.css.js +5 -5
  12. package/dist/cjs/components/CollectionToolbar/CollectionToolbar.st.css.js.map +1 -1
  13. package/dist/cjs/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +3 -3
  14. package/dist/cjs/components/CollectionToolbar/SearchOrCustomFilter.st.css.js.map +1 -1
  15. package/dist/cjs/components/CollectionToolbarFilters/CollectionToolbarFilters.js.map +1 -1
  16. package/dist/cjs/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
  17. package/dist/cjs/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js.map +1 -1
  18. package/dist/cjs/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
  19. package/dist/cjs/components/CollectionViewsDropdown/ViewsDropdown.st.css.js.map +1 -1
  20. package/dist/cjs/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js +3 -3
  21. package/dist/cjs/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js.map +1 -1
  22. package/dist/cjs/components/DragHandle/DragHandle.st.css.js +2 -2
  23. package/dist/cjs/components/DragHandle/DragHandle.st.css.js.map +1 -1
  24. package/dist/cjs/components/Fade/Fade.st.css.js +2 -2
  25. package/dist/cjs/components/Fade/Fade.st.css.js.map +1 -1
  26. package/dist/cjs/components/Grid/Grid.js.map +1 -1
  27. package/dist/cjs/components/Grid/GridFolders.js +5 -5
  28. package/dist/cjs/components/Grid/GridFolders.js.map +1 -1
  29. package/dist/cjs/components/Grid/GridFolders.uni.driver.js +2 -2
  30. package/dist/cjs/components/Grid/GridFolders.uni.driver.js.map +1 -1
  31. package/dist/cjs/components/Heading/Heading.st.css.js +2 -2
  32. package/dist/cjs/components/Heading/Heading.st.css.js.map +1 -1
  33. package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js +2 -2
  34. package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
  35. package/dist/cjs/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
  36. package/dist/cjs/components/MaxHeightText/MaxHeightText.st.css.js.map +1 -1
  37. package/dist/cjs/components/MaxLines/MaxLines.st.css.js +2 -2
  38. package/dist/cjs/components/MaxLines/MaxLines.st.css.js.map +1 -1
  39. package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
  40. package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js.map +1 -1
  41. package/dist/cjs/components/MultiSelectCheckboxFilter/MultiSelectCheckboxFilter.js.map +1 -1
  42. package/dist/cjs/components/MultiSelectCollectionFilter/MultiSelectCollectionFilter.js.map +1 -1
  43. package/dist/cjs/components/NestedTable/NestedTable.js.map +1 -1
  44. package/dist/cjs/components/NestedTable/NestedTableRow.st.css.js +5 -5
  45. package/dist/cjs/components/NestedTable/NestedTableRow.st.css.js.map +1 -1
  46. package/dist/cjs/components/NestedTable/NestedTableWSRTable.js +6 -6
  47. package/dist/cjs/components/NestedTable/NestedTableWSRTable.js.map +1 -1
  48. package/dist/cjs/components/PickerContent/PickerContent.js.map +1 -1
  49. package/dist/cjs/components/PickerContent/PickerContent.st.css.js +2 -2
  50. package/dist/cjs/components/PickerContent/PickerContent.st.css.js.map +1 -1
  51. package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js +4 -4
  52. package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js.map +1 -1
  53. package/dist/cjs/components/PickerContent/PickerContentItemsSelection.js.map +1 -1
  54. package/dist/cjs/components/PickerModal/PickerModal.js.map +1 -1
  55. package/dist/cjs/components/PickerStandalone/PickerStandalone.js.map +1 -1
  56. package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
  57. package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js.map +1 -1
  58. package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
  59. package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js.map +1 -1
  60. package/dist/cjs/components/SingleSelectFilter/SingleSelectFilter.js.map +1 -1
  61. package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js +3 -3
  62. package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js.map +1 -1
  63. package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js +2 -2
  64. package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js.map +1 -1
  65. package/dist/cjs/components/TabTotal/useFilterValueTotalState.js.map +1 -1
  66. package/dist/cjs/components/Table/Table.js +2 -2
  67. package/dist/cjs/components/Table/Table.js.map +1 -1
  68. package/dist/cjs/components/Table/TableVirtual.js +1 -0
  69. package/dist/cjs/components/Table/TableVirtual.js.map +1 -1
  70. package/dist/cjs/components/Table/TableVirtual.st.css.js +3 -3
  71. package/dist/cjs/components/Table/TableVirtual.st.css.js.map +1 -1
  72. package/dist/cjs/components/TableFolders/TableFoldersContent.js +9 -9
  73. package/dist/cjs/components/TableFolders/TableFoldersContent.js.map +1 -1
  74. package/dist/cjs/components/TableGridSwitch/TableGridSwitch.js.map +1 -1
  75. package/dist/cjs/components/TableGridSwitchFolders/TableGridSwitchFolders.js.map +1 -1
  76. package/dist/cjs/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.js +2 -2
  77. package/dist/cjs/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.js.map +1 -1
  78. package/dist/cjs/components/TabsFilter/TabsFilter.js.map +1 -1
  79. package/dist/cjs/components/TabsFilter/TabsFilter.st.css.js +3 -3
  80. package/dist/cjs/components/TabsFilter/TabsFilter.st.css.js.map +1 -1
  81. package/dist/cjs/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js +2 -2
  82. package/dist/cjs/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js.map +1 -1
  83. package/dist/cjs/components/ToolbarCollection/ToolbarCollection.js.map +1 -1
  84. package/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.st.css.js +2 -2
  85. package/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.st.css.js.map +1 -1
  86. package/dist/cjs/components/common.st.css.js +4 -4
  87. package/dist/cjs/components/common.st.css.js.map +1 -1
  88. package/dist/cjs/components/deleteSecondaryAction/deleteSecondaryAction.js +1 -1
  89. package/dist/cjs/components/deleteSecondaryAction/deleteSecondaryAction.js.map +1 -1
  90. package/dist/cjs/hooks/useExtensionMenuItems.js +12 -3
  91. package/dist/cjs/hooks/useExtensionMenuItems.js.map +1 -1
  92. package/dist/cjs/hooks/usePickerModal/UsePickerModalParamsBase.js.map +1 -1
  93. package/dist/cjs/model/filterProps.js.map +1 -1
  94. package/dist/cjs/state/NestedTableState/NestedTableState.js.map +1 -1
  95. package/dist/cjs/state/ToolbarCollectionState.js +1 -0
  96. package/dist/cjs/state/ToolbarCollectionState.js.map +1 -1
  97. package/dist/cjs/styles.global.css +1 -1
  98. package/dist/cjs/version.js +1 -1
  99. package/dist/cjs/version.js.map +1 -1
  100. package/dist/esm/components/Collapse/Collapse.st.css.js +2 -2
  101. package/dist/esm/components/Collapse/Collapse.st.css.js.map +1 -1
  102. package/dist/esm/components/CollectionItemActions/CollectionItemActions.js +10 -1
  103. package/dist/esm/components/CollectionItemActions/CollectionItemActions.js.map +1 -1
  104. package/dist/esm/components/CollectionToolbar/CollectionToolbar.st.css.js +2 -2
  105. package/dist/esm/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +2 -2
  106. package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
  107. package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js.map +1 -1
  108. package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
  109. package/dist/esm/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js +2 -2
  110. package/dist/esm/components/DragHandle/DragHandle.st.css.js +2 -2
  111. package/dist/esm/components/Fade/Fade.st.css.js +2 -2
  112. package/dist/esm/components/Grid/GridFolders.js.map +1 -1
  113. package/dist/esm/components/Grid/GridFolders.uni.driver.js +2 -2
  114. package/dist/esm/components/Grid/GridFolders.uni.driver.js.map +1 -1
  115. package/dist/esm/components/Heading/Heading.st.css.js +2 -2
  116. package/dist/esm/components/InputOverflow/InputOverflow.st.css.js +2 -2
  117. package/dist/esm/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
  118. package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
  119. package/dist/esm/components/MaxLines/MaxLines.st.css.js +2 -2
  120. package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
  121. package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js.map +1 -1
  122. package/dist/esm/components/NestedTable/NestedTableRow.st.css.js +2 -2
  123. package/dist/esm/components/NestedTable/NestedTableRow.st.css.js.map +1 -1
  124. package/dist/esm/components/NestedTable/NestedTableWSRTable.js.map +1 -1
  125. package/dist/esm/components/PickerContent/PickerContent.st.css.js +2 -2
  126. package/dist/esm/components/PickerContent/PickerContentAdditionalStep.st.css.js +2 -2
  127. package/dist/esm/components/PickerContent/PickerContentAdditionalStep.st.css.js.map +1 -1
  128. package/dist/esm/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
  129. package/dist/esm/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
  130. package/dist/esm/components/SkeletonCard/SkeletonCard.st.css.js +2 -2
  131. package/dist/esm/components/SlidingModal/SlidingModal.st.css.js +2 -2
  132. package/dist/esm/components/Table/Table.js.map +1 -1
  133. package/dist/esm/components/Table/TableVirtual.js +1 -1
  134. package/dist/esm/components/Table/TableVirtual.js.map +1 -1
  135. package/dist/esm/components/Table/TableVirtual.st.css.js +2 -2
  136. package/dist/esm/components/TableFolders/TableFoldersContent.js.map +1 -1
  137. package/dist/esm/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.js +2 -2
  138. package/dist/esm/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.js.map +1 -1
  139. package/dist/esm/components/TabsFilter/TabsFilter.st.css.js +2 -2
  140. package/dist/esm/components/TabsFilter/TabsFilter.st.css.js.map +1 -1
  141. package/dist/esm/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js +2 -2
  142. package/dist/esm/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js.map +1 -1
  143. package/dist/esm/components/ToolbarItemBox/ToolbarItemBox.st.css.js +2 -2
  144. package/dist/esm/components/common.st.css.js +2 -2
  145. package/dist/esm/components/deleteSecondaryAction/deleteSecondaryAction.js.map +1 -1
  146. package/dist/esm/hooks/useExtensionMenuItems.js +9 -2
  147. package/dist/esm/hooks/useExtensionMenuItems.js.map +1 -1
  148. package/dist/esm/state/ToolbarCollectionState.js +1 -0
  149. package/dist/esm/state/ToolbarCollectionState.js.map +1 -1
  150. package/dist/esm/styles.global.css +1 -1
  151. package/dist/esm/version.js +1 -1
  152. package/dist/types/components/AutoCompleteFilter/AutoCompleteFilter.d.ts +2 -2
  153. package/dist/types/components/BulkAction/BulkActionModalRenderProp.d.ts +1 -1
  154. package/dist/types/components/Collapse/Collapse.st.css.d.ts.map +1 -1
  155. package/dist/types/components/CollectionItemActions/CollectionItemActions.d.ts.map +1 -1
  156. package/dist/types/components/CollectionPageNew/CollectionPage.d.ts +1 -1
  157. package/dist/types/components/CollectionTable/CollectionTable.d.ts +7 -7
  158. package/dist/types/components/CollectionTable/CollectionTableBaseCommonProps.d.ts +2 -2
  159. package/dist/types/components/CollectionTable/CollectionTableWSRTable.d.ts +1 -1
  160. package/dist/types/components/CollectionToolbarFilters/CollectionToolbarFilters.d.ts +3 -3
  161. package/dist/types/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.d.ts.map +1 -1
  162. package/dist/types/components/Grid/Grid.d.ts +1 -1
  163. package/dist/types/components/Grid/GridFolders.d.ts +3 -14
  164. package/dist/types/components/Grid/GridFolders.d.ts.map +1 -1
  165. package/dist/types/components/Grid/GridFolders.uni.driver.d.ts +20 -23
  166. package/dist/types/components/Grid/GridFolders.uni.driver.d.ts.map +1 -1
  167. package/dist/types/components/InputOverflow/InputOverflow.st.css.d.ts.map +1 -1
  168. package/dist/types/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.d.ts.map +1 -1
  169. package/dist/types/components/MultiSelectCheckboxFilter/MultiSelectCheckboxFilter.d.ts +1 -1
  170. package/dist/types/components/MultiSelectCollectionFilter/MultiSelectCollectionFilter.d.ts +1 -1
  171. package/dist/types/components/NestedTable/NestedTable.d.ts +5 -5
  172. package/dist/types/components/NestedTable/NestedTableRow.st.css.d.ts.map +1 -1
  173. package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts +3 -5
  174. package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts.map +1 -1
  175. package/dist/types/components/PickerContent/PickerContent.d.ts +1 -1
  176. package/dist/types/components/PickerContent/PickerContentAdditionalStep.st.css.d.ts.map +1 -1
  177. package/dist/types/components/PickerContent/PickerContentItemsSelection.d.ts +1 -1
  178. package/dist/types/components/PickerModal/PickerModal.d.ts +1 -1
  179. package/dist/types/components/PickerModal/PickerModal.d.ts.map +1 -1
  180. package/dist/types/components/PickerStandalone/PickerStandalone.d.ts +2 -2
  181. package/dist/types/components/SingleSelectFilter/SingleSelectFilter.d.ts +1 -1
  182. package/dist/types/components/TabTotal/useFilterValueTotalState.d.ts +1 -1
  183. package/dist/types/components/Table/Table.d.ts.map +1 -1
  184. package/dist/types/components/Table/TableVirtual.d.ts.map +1 -1
  185. package/dist/types/components/TableFolders/TableFoldersContent.d.ts +6 -17
  186. package/dist/types/components/TableFolders/TableFoldersContent.d.ts.map +1 -1
  187. package/dist/types/components/TableGridSwitch/TableGridSwitch.d.ts +2 -2
  188. package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.d.ts +1 -1
  189. package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.d.ts.map +1 -1
  190. package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.d.ts +47 -55
  191. package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.d.ts.map +1 -1
  192. package/dist/types/components/TabsFilter/TabsFilter.d.ts +1 -1
  193. package/dist/types/components/TabsFilter/TabsFilter.st.css.d.ts.map +1 -1
  194. package/dist/types/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.d.ts.map +1 -1
  195. package/dist/types/components/ToolbarCollection/ToolbarCollection.d.ts +17 -17
  196. package/dist/types/components/deleteSecondaryAction/deleteSecondaryAction.d.ts +11 -0
  197. package/dist/types/components/deleteSecondaryAction/deleteSecondaryAction.d.ts.map +1 -1
  198. package/dist/types/hooks/useExtensionMenuItems.d.ts +3 -1
  199. package/dist/types/hooks/useExtensionMenuItems.d.ts.map +1 -1
  200. package/dist/types/hooks/usePickerModal/UsePickerModalParamsBase.d.ts +1 -1
  201. package/dist/types/model/filterProps.d.ts +1 -1
  202. package/dist/types/state/NestedTableState/NestedTableState.d.ts +1 -1
  203. package/dist/types/state/ToolbarCollectionState.d.ts +2 -0
  204. package/dist/types/state/ToolbarCollectionState.d.ts.map +1 -1
  205. package/dist/types/version.d.ts +1 -1
  206. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"MultiBulkActionToolbar2948040443\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"MultiBulkActionToolbar2948040443__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,kCAAkC;AACpD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAAwC,CAAC;AAC/D,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"MultiBulkActionToolbar759279083\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"MultiBulkActionToolbar759279083__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,iCAAiC;AACnD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAAuC,CAAC;AAC9D,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_designSystem","require","_react","_interopRequireWildcard","_state","_bexCore","_react2","_mobxReactLite","_MultiSelectCheckboxFilterBase","_hooks","_InputOverflow","_providers","_usePlaceholderStateOptions","_useCollectionFilterInitialFetchTiming","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_MultiSelectCheckboxFilter","props","filter","collection","renderItem","onSelect","onClose","onDeselect","placeholder","placeholderProp","rest","container","useWixPatternsContainer","toolbar","useFilterToolbarState","buildOption","useBuildOption","checkbox","collectionFilter","useState","CollectionFilterState","dropdownCollectionFilterState","DropdownCollectionFilterState","resetOnClose","dropdownSelect","init","inputState","shouldShowPlaceholder","disableEditing","select","selectedKeys","selectedValues","finalFilterKeyedItems","finalFilterKeyedItemsMap","translate","textOverflowState","TextOverflowState","observable","isOverflow","result","keyedItems","fetchedLastPage","query","search","isEmpty","isEmptySearch","promotedOptions","length","map","listItemSectionBuilder","id","type","otherOptions","key","options","fixedFooter","showInitialLoader","usePlaceholderStateOptions","selectedValuesText","useMemo","item","itemName","join","skipInitialFetch","onFocus","useCollectionFilterInitialFetchTiming","useEffect","process","env","NODE_ENV","total","createElement","MultiSelectCheckboxFilterBase","_extends2","infiniteScroll","selectedOptions","hasMore","loadMore","fetchNextPageIfNeeded","hasPendingFilter","closeAndChangeSelectedItems","onBlur","option","keyedItem","refreshIfChanged","actionType","clickedValueKey","delete","value","onChange","target","clearResult","onOptionsShow","onKeyDown","nativeEvent","code","onTabKeyDown","onClickOutside","onClear","clearSearch","clearButton","clearButtonTooltipContent","focusOnClearClick","inputElement","InputOverflow","selected","focused","isFocused","text","state","__self","__source","fileName","lineNumber","columnNumber","MultiSelectCheckboxFilter","exports","observer"],"sources":["../../../../src/components/MultiSelectCheckboxFilter/MultiSelectCheckboxFilter.tsx"],"sourcesContent":["import { listItemSectionBuilder } from '@wix/design-system';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport {\n CollectionFilterState,\n DropdownCollectionFilterState,\n} from '../../state';\nimport { CollectionState, FiltersMap, TextOverflowState } from '@wix/bex-core';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport { observer } from 'mobx-react-lite';\nimport {\n KeyedItemOption,\n MultiSelectCheckboxFilterBase,\n MultiSelectCheckboxFilterBaseOption,\n MultiSelectCheckboxFilterBaseProps,\n} from '../MultiSelectCheckboxFilterBase';\nimport { ListItem, useBuildOption } from '../../hooks';\nimport { InputOverflow } from '../InputOverflow';\nimport { useFilterToolbarState } from '../../providers';\nimport { usePlaceholderStateOptions } from '../../hooks/usePlaceholderStateOptions';\nimport {\n useCollectionFilterInitialFetchTiming,\n CollectionFilterInitialFetchTimingProps,\n} from '../../hooks/useCollectionFilterInitialFetchTiming';\n\nexport interface MultiSelectCheckboxFilterProps<\n V,\n F extends FiltersMap = FiltersMap,\n> extends Omit<\n MultiSelectCheckboxFilterBaseProps<V>,\n 'options' | 'dropdownSelect'\n >,\n CollectionFilterInitialFetchTimingProps {\n /**\n * A collection state object to fetch the dropdown items.<br>\n * A collection created using [useFilterCollection](./?path=/story/common-hooks--usefiltercollection) or [useStaticListFilterCollection](./?path=/story/common-hooks--usestaticlistfiltercollection)\n * @external\n */\n collection: CollectionState<V, F>;\n /**\n * A function that returns a [ListItemSelectProps](https://www.docs.wixdesignsystem.com/?path=/story/components-form-dropdownlistitems--listitemselect) (Optional)\n */\n renderItem?: (item: V, index: number) => ListItem;\n}\n\nfunction _MultiSelectCheckboxFilter<V, F extends FiltersMap = FiltersMap>(\n props: MultiSelectCheckboxFilterProps<V, F>,\n) {\n const {\n filter,\n collection,\n renderItem,\n onSelect,\n onClose,\n onDeselect,\n placeholder: placeholderProp,\n ...rest\n } = props;\n\n const container = useWixPatternsContainer();\n const toolbar = useFilterToolbarState();\n\n const buildOption = useBuildOption<V>({\n filter,\n renderItem,\n checkbox: true,\n });\n\n const [collectionFilter] = useState(\n () =>\n new CollectionFilterState({\n collection,\n filter,\n }),\n );\n\n const [dropdownCollectionFilterState] = useState(\n () =>\n new DropdownCollectionFilterState<V, F>({\n resetOnClose: false,\n collectionFilter,\n container,\n toolbar,\n }),\n );\n\n const { dropdownSelect, init, inputState, shouldShowPlaceholder } =\n dropdownCollectionFilterState;\n const { disableEditing } = inputState;\n\n const {\n select: { selectedKeys, selectedValues },\n finalFilterKeyedItems,\n finalFilterKeyedItemsMap,\n container: { translate: t },\n } = dropdownSelect;\n\n const [textOverflowState] = useState(\n () =>\n new TextOverflowState({\n observable: () => dropdownSelect.select.selectedValues,\n }),\n );\n const { isOverflow } = textOverflowState;\n\n const {\n result: { keyedItems },\n fetchedLastPage,\n query: {\n search: { isEmpty: isEmptySearch },\n },\n } = collection;\n\n const promotedOptions: MultiSelectCheckboxFilterBaseOption<V>[] =\n finalFilterKeyedItems.length\n ? [\n ...finalFilterKeyedItems.map(buildOption),\n listItemSectionBuilder({\n id: 'promoted-section-divider',\n type: 'divider',\n }),\n ]\n : [];\n\n const otherOptions: KeyedItemOption<V>[] = (\n isEmptySearch\n ? keyedItems.filter(\n ({ key }) => !finalFilterKeyedItemsMap.has(key) ?? true,\n )\n : keyedItems\n ).map(buildOption);\n\n const { options, fixedFooter, showInitialLoader } =\n usePlaceholderStateOptions(\n [...(isEmptySearch ? promotedOptions : []), ...otherOptions],\n {\n collection,\n },\n );\n\n const selectedValuesText = useMemo(() => {\n return selectedValues.map(({ item }) => filter.itemName(item)).join(', ');\n }, [selectedValues]);\n\n const { skipInitialFetch, onFocus } =\n useCollectionFilterInitialFetchTiming(props);\n\n useEffect(() => init({ skipInitialFetch }), []);\n\n const placeholder = useMemo(() => {\n if (!shouldShowPlaceholder) {\n return '';\n }\n\n if (selectedValues.length !== 0) {\n if (\n (process.env.NODE_ENV === 'test' && selectedValuesText.length > 40) ||\n isOverflow\n ) {\n return t('cairo.dropdownSearch.filters.selected', {\n total: selectedValues.length,\n });\n }\n\n return selectedValuesText;\n }\n\n return (\n placeholderProp ?? t('cairo.dropdownSearch.select.filers.placeholder')\n );\n }, [\n selectedValues,\n selectedValuesText,\n shouldShowPlaceholder,\n isOverflow,\n placeholderProp,\n ]);\n\n return (\n <MultiSelectCheckboxFilterBase\n {...rest}\n fixedFooter={fixedFooter}\n infiniteScroll\n filter={filter}\n dropdownSelect={dropdownSelect}\n options={options}\n selectedOptions={selectedKeys}\n hasMore={!showInitialLoader && !fetchedLastPage}\n loadMore={collection.fetchNextPageIfNeeded}\n onClose={() => {\n if (!dropdownSelect.hasPendingFilter) {\n dropdownSelect.closeAndChangeSelectedItems();\n }\n inputState.onBlur();\n onClose?.();\n }}\n onSelect={(id, option) => {\n const { keyedItem } = option as KeyedItemOption<V>;\n dropdownSelect.select.set(keyedItem);\n if (dropdownSelect.hasPendingFilter) {\n dropdownSelect.refreshIfChanged({\n actionType: 'add',\n clickedValueKey: keyedItem.key,\n });\n }\n onSelect?.(id, option);\n }}\n onDeselect={(id, option) => {\n const { keyedItem } = option as KeyedItemOption<V>;\n dropdownSelect.select.delete(keyedItem);\n if (dropdownSelect.hasPendingFilter) {\n dropdownSelect.refreshIfChanged({\n actionType: 'remove',\n clickedValueKey: keyedItem.key,\n });\n }\n onDeselect?.(id, option);\n }}\n value={collection.query.search.value}\n onFocus={() => {\n inputState.onFocus();\n onFocus();\n }}\n onBlur={() => {\n inputState.onBlur();\n }}\n onChange={(e) => {\n collection.search(e.target.value, { clearResult: true });\n }}\n onOptionsShow={inputState.onOptionsShow}\n onKeyDown={(e) => {\n if (e.nativeEvent.code === 'Tab') {\n inputState.onTabKeyDown();\n }\n }}\n onClickOutside={(e) => {\n props.onClickOutside?.(e);\n inputState.onClickOutside();\n }}\n onClear={() => {\n inputState.onBlur();\n collection.clearSearch();\n }}\n disableEditing={disableEditing}\n placeholder={placeholder}\n clearButton={!disableEditing}\n clearButtonTooltipContent={t('cairo.dropdownSearch.select.filers.clear')}\n focusOnClearClick\n inputElement={\n <InputOverflow\n selected={selectedValues.length > 0}\n focused={inputState.isFocused}\n text={selectedValuesText}\n state={textOverflowState}\n />\n }\n />\n );\n}\n\nexport const MultiSelectCheckboxFilter = observer(_MultiSelectCheckboxFilter);\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,8BAAA,GAAAP,OAAA;AAMA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,2BAAA,GAAAX,OAAA;AACA,IAAAY,sCAAA,GAAAZ,OAAA;AAG2D,IAAAa,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA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W,CAAC,CAAC;IAC1B,CAAE;IACFvE,cAAc,EAAEA,cAAe;IAC/BpB,WAAW,EAAEA,WAAY;IACzB4F,WAAW,EAAE,CAACxE,cAAe;IAC7ByE,yBAAyB,EAAErH,CAAC,CAAC,0CAA0C,CAAE;IACzEsH,iBAAiB;IACjBC,YAAY,eACVxI,MAAA,CAAAmB,OAAA,CAAAqF,aAAA,CAAChG,cAAA,CAAAiI,aAAa;MACZC,QAAQ,EAAE1E,cAAc,CAACgB,MAAM,GAAG,CAAE;MACpC2D,OAAO,EAAEhF,UAAU,CAACiF,SAAU;MAC9BC,IAAI,EAAElD,kBAAmB;MACzBmD,KAAK,EAAE1E,iBAAkB;MAAA2E,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAArI,YAAA;QAAAsI,UAAA;QAAAC,YAAA;MAAA;IAAA,CAC1B,CACF;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAArI,YAAA;MAAAsI,UAAA;MAAAC,YAAA;IAAA;EAAA,EACF,CAAC;AAEN;AAEO,MAAMC,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,IAAAE,uBAAQ,EAACrH,0BAA0B,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_designSystem","require","_react","_interopRequireWildcard","_state","_bexCore","_react2","_mobxReactLite","_MultiSelectCheckboxFilterBase","_hooks","_InputOverflow","_providers","_usePlaceholderStateOptions","_useCollectionFilterInitialFetchTiming","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_MultiSelectCheckboxFilter","props","filter","collection","renderItem","onSelect","onClose","onDeselect","placeholder","placeholderProp","rest","container","useWixPatternsContainer","toolbar","useFilterToolbarState","buildOption","useBuildOption","checkbox","collectionFilter","useState","CollectionFilterState","dropdownCollectionFilterState","DropdownCollectionFilterState","resetOnClose","dropdownSelect","init","inputState","shouldShowPlaceholder","disableEditing","select","selectedKeys","selectedValues","finalFilterKeyedItems","finalFilterKeyedItemsMap","translate","textOverflowState","TextOverflowState","observable","isOverflow","result","keyedItems","fetchedLastPage","query","search","isEmpty","isEmptySearch","promotedOptions","length","map","listItemSectionBuilder","id","type","otherOptions","key","options","fixedFooter","showInitialLoader","usePlaceholderStateOptions","selectedValuesText","useMemo","item","itemName","join","skipInitialFetch","onFocus","useCollectionFilterInitialFetchTiming","useEffect","process","env","NODE_ENV","total","createElement","MultiSelectCheckboxFilterBase","_extends2","infiniteScroll","selectedOptions","hasMore","loadMore","fetchNextPageIfNeeded","hasPendingFilter","closeAndChangeSelectedItems","onBlur","option","keyedItem","refreshIfChanged","actionType","clickedValueKey","delete","value","onChange","target","clearResult","onOptionsShow","onKeyDown","nativeEvent","code","onTabKeyDown","onClickOutside","onClear","clearSearch","clearButton","clearButtonTooltipContent","focusOnClearClick","inputElement","InputOverflow","selected","focused","isFocused","text","state","__self","__source","fileName","lineNumber","columnNumber","MultiSelectCheckboxFilter","exports","observer"],"sources":["../../../../src/components/MultiSelectCheckboxFilter/MultiSelectCheckboxFilter.tsx"],"sourcesContent":["import { listItemSectionBuilder } from '@wix/design-system';\nimport React, { useEffect, useMemo, useState } from 'react';\nimport {\n CollectionFilterState,\n DropdownCollectionFilterState,\n} from '../../state';\nimport { CollectionState, FiltersMap, TextOverflowState } from '@wix/bex-core';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport { observer } from 'mobx-react-lite';\nimport {\n KeyedItemOption,\n MultiSelectCheckboxFilterBase,\n MultiSelectCheckboxFilterBaseOption,\n MultiSelectCheckboxFilterBaseProps,\n} from '../MultiSelectCheckboxFilterBase';\nimport { ListItem, useBuildOption } from '../../hooks';\nimport { InputOverflow } from '../InputOverflow';\nimport { useFilterToolbarState } from '../../providers';\nimport { usePlaceholderStateOptions } from '../../hooks/usePlaceholderStateOptions';\nimport {\n useCollectionFilterInitialFetchTiming,\n CollectionFilterInitialFetchTimingProps,\n} from '../../hooks/useCollectionFilterInitialFetchTiming';\n\nexport interface MultiSelectCheckboxFilterProps<\n V,\n F extends FiltersMap = FiltersMap,\n> extends Omit<\n MultiSelectCheckboxFilterBaseProps<V>,\n 'options' | 'dropdownSelect'\n >,\n CollectionFilterInitialFetchTimingProps {\n /**\n * A collection state object to fetch the dropdown items.<br>\n * A collection created using [useFilterCollection](./?path=/story/features-filter-hooks--usefiltercollection) or [useStaticListFilterCollection](./?path=/story/features-filter-hooks--usestaticlistfiltercollection)\n * @external\n */\n collection: CollectionState<V, F>;\n /**\n * A function that returns a [ListItemSelectProps](https://www.docs.wixdesignsystem.com/?path=/story/components-form-dropdownlistitems--listitemselect) (Optional)\n */\n renderItem?: (item: V, index: number) => ListItem;\n}\n\nfunction _MultiSelectCheckboxFilter<V, F extends FiltersMap = FiltersMap>(\n props: MultiSelectCheckboxFilterProps<V, F>,\n) {\n const {\n filter,\n collection,\n renderItem,\n onSelect,\n onClose,\n onDeselect,\n placeholder: placeholderProp,\n ...rest\n } = props;\n\n const container = useWixPatternsContainer();\n const toolbar = useFilterToolbarState();\n\n const buildOption = useBuildOption<V>({\n filter,\n renderItem,\n checkbox: true,\n });\n\n const [collectionFilter] = useState(\n () =>\n new CollectionFilterState({\n collection,\n filter,\n }),\n );\n\n const [dropdownCollectionFilterState] = useState(\n () =>\n new DropdownCollectionFilterState<V, F>({\n resetOnClose: false,\n collectionFilter,\n container,\n toolbar,\n }),\n );\n\n const { dropdownSelect, init, inputState, shouldShowPlaceholder } =\n dropdownCollectionFilterState;\n const { disableEditing } = inputState;\n\n const {\n select: { selectedKeys, selectedValues },\n finalFilterKeyedItems,\n finalFilterKeyedItemsMap,\n container: { translate: t },\n } = dropdownSelect;\n\n const [textOverflowState] = useState(\n () =>\n new TextOverflowState({\n observable: () => dropdownSelect.select.selectedValues,\n }),\n );\n const { isOverflow } = textOverflowState;\n\n const {\n result: { keyedItems },\n fetchedLastPage,\n query: {\n search: { isEmpty: isEmptySearch },\n },\n } = collection;\n\n const promotedOptions: MultiSelectCheckboxFilterBaseOption<V>[] =\n finalFilterKeyedItems.length\n ? [\n ...finalFilterKeyedItems.map(buildOption),\n listItemSectionBuilder({\n id: 'promoted-section-divider',\n type: 'divider',\n }),\n ]\n : [];\n\n const otherOptions: KeyedItemOption<V>[] = (\n isEmptySearch\n ? keyedItems.filter(\n ({ key }) => !finalFilterKeyedItemsMap.has(key) ?? true,\n )\n : keyedItems\n ).map(buildOption);\n\n const { options, fixedFooter, showInitialLoader } =\n usePlaceholderStateOptions(\n [...(isEmptySearch ? promotedOptions : []), ...otherOptions],\n {\n collection,\n },\n );\n\n const selectedValuesText = useMemo(() => {\n return selectedValues.map(({ item }) => filter.itemName(item)).join(', ');\n }, [selectedValues]);\n\n const { skipInitialFetch, onFocus } =\n useCollectionFilterInitialFetchTiming(props);\n\n useEffect(() => init({ skipInitialFetch }), []);\n\n const placeholder = useMemo(() => {\n if (!shouldShowPlaceholder) {\n return '';\n }\n\n if (selectedValues.length !== 0) {\n if (\n (process.env.NODE_ENV === 'test' && selectedValuesText.length > 40) ||\n isOverflow\n ) {\n return t('cairo.dropdownSearch.filters.selected', {\n total: selectedValues.length,\n });\n }\n\n return selectedValuesText;\n }\n\n return (\n placeholderProp ?? t('cairo.dropdownSearch.select.filers.placeholder')\n );\n }, [\n selectedValues,\n selectedValuesText,\n shouldShowPlaceholder,\n isOverflow,\n placeholderProp,\n ]);\n\n return (\n <MultiSelectCheckboxFilterBase\n {...rest}\n fixedFooter={fixedFooter}\n infiniteScroll\n filter={filter}\n dropdownSelect={dropdownSelect}\n options={options}\n selectedOptions={selectedKeys}\n hasMore={!showInitialLoader && !fetchedLastPage}\n loadMore={collection.fetchNextPageIfNeeded}\n onClose={() => {\n if (!dropdownSelect.hasPendingFilter) {\n dropdownSelect.closeAndChangeSelectedItems();\n }\n inputState.onBlur();\n onClose?.();\n }}\n onSelect={(id, option) => {\n const { keyedItem } = option as KeyedItemOption<V>;\n dropdownSelect.select.set(keyedItem);\n if (dropdownSelect.hasPendingFilter) {\n dropdownSelect.refreshIfChanged({\n actionType: 'add',\n clickedValueKey: keyedItem.key,\n });\n }\n onSelect?.(id, option);\n }}\n onDeselect={(id, option) => {\n const { keyedItem } = option as KeyedItemOption<V>;\n dropdownSelect.select.delete(keyedItem);\n if (dropdownSelect.hasPendingFilter) {\n dropdownSelect.refreshIfChanged({\n actionType: 'remove',\n clickedValueKey: keyedItem.key,\n });\n }\n onDeselect?.(id, option);\n }}\n value={collection.query.search.value}\n onFocus={() => {\n inputState.onFocus();\n onFocus();\n }}\n onBlur={() => {\n inputState.onBlur();\n }}\n onChange={(e) => {\n collection.search(e.target.value, { clearResult: true });\n }}\n onOptionsShow={inputState.onOptionsShow}\n onKeyDown={(e) => {\n if (e.nativeEvent.code === 'Tab') {\n inputState.onTabKeyDown();\n }\n }}\n onClickOutside={(e) => {\n props.onClickOutside?.(e);\n inputState.onClickOutside();\n }}\n onClear={() => {\n inputState.onBlur();\n collection.clearSearch();\n }}\n disableEditing={disableEditing}\n placeholder={placeholder}\n clearButton={!disableEditing}\n clearButtonTooltipContent={t('cairo.dropdownSearch.select.filers.clear')}\n focusOnClearClick\n inputElement={\n <InputOverflow\n selected={selectedValues.length > 0}\n focused={inputState.isFocused}\n text={selectedValuesText}\n state={textOverflowState}\n />\n }\n />\n );\n}\n\nexport const MultiSelectCheckboxFilter = observer(_MultiSelectCheckboxFilter);\n"],"mappings":";;;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAIA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,8BAAA,GAAAP,OAAA;AAMA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AACA,IAAAU,UAAA,GAAAV,OAAA;AACA,IAAAW,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,CAAE;IACFC,cAAc,EAAGpH,CAAC,IAAK;MACrBoB,KAAK,CAACgG,cAAc,YAApBhG,KAAK,CAACgG,cAAc,CAAGpH,CAAC,CAAC;MACzB6C,UAAU,CAACuE,cAAc,CAAC,CAAC;IAC7B,CAAE;IACFC,OAAO,EAAEA,CAAA,KAAM;MACbxE,UAAU,CAACuD,MAAM,CAAC,CAAC;MACnB9E,UAAU,CAACgG,WAAW,CAAC,CAAC;IAC1B,CAAE;IACFvE,cAAc,EAAEA,cAAe;IAC/BpB,WAAW,EAAEA,WAAY;IACzB4F,WAAW,EAAE,CAACxE,cAAe;IAC7ByE,yBAAyB,EAAErH,CAAC,CAAC,0CAA0C,CAAE;IACzEsH,iBAAiB;IACjBC,YAAY,eACVxI,MAAA,CAAAmB,OAAA,CAAAqF,aAAA,CAAChG,cAAA,CAAAiI,aAAa;MACZC,QAAQ,EAAE1E,cAAc,CAACgB,MAAM,GAAG,CAAE;MACpC2D,OAAO,EAAEhF,UAAU,CAACiF,SAAU;MAC9BC,IAAI,EAAElD,kBAAmB;MACzBmD,KAAK,EAAE1E,iBAAkB;MAAA2E,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAArI,YAAA;QAAAsI,UAAA;QAAAC,YAAA;MAAA;IAAA,CAC1B,CACF;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAArI,YAAA;MAAAsI,UAAA;MAAAC,YAAA;IAAA;EAAA,EACF,CAAC;AAEN;AAEO,MAAMC,yBAAyB,GAAAC,OAAA,CAAAD,yBAAA,GAAG,IAAAE,uBAAQ,EAACrH,0BAA0B,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_state","_mobxReactLite","_MultiSelectFilterBase","_hooks","_react2","_providers","_usePlaceholderStateOptions","_useCollectionFilterInitialFetchTiming","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_MultiSelectCollectionFilter","props","filter","collection","renderItem","initialFetchTiming","rest","container","useWixPatternsContainer","toolbar","useFilterToolbarState","buildOption","useBuildOption","collectionFilter","useState","CollectionFilterState","dropdownSelect","init","DropdownCollectionFilterState","resetOnClose","query","search","skipInitialFetch","onFocus","useCollectionFilterInitialFetchTiming","useEffect","result","keyedItems","fetchedLastPage","options","fixedFooter","showInitialLoader","usePlaceholderStateOptions","map","createElement","MultiSelectFilterBase","_extends2","infiniteScroll","value","onChange","target","hasMore","loadMore","fetchNextPageIfNeeded","__self","__source","fileName","lineNumber","columnNumber","MultiSelectCollectionFilter","exports","observer","displayName"],"sources":["../../../../src/components/MultiSelectCollectionFilter/MultiSelectCollectionFilter.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n CollectionFilterState,\n DropdownCollectionFilterState,\n} from '../../state';\nimport { observer } from 'mobx-react-lite';\nimport { CollectionState, FiltersMap } from '@wix/bex-core';\nimport {\n MultiSelectFilterBase,\n MultiSelectFilterBaseProps,\n} from '../MultiSelectFilterBase';\nimport { ListItem, useBuildOption } from '../../hooks';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport { useFilterToolbarState } from '../../providers';\nimport { usePlaceholderStateOptions } from '../../hooks/usePlaceholderStateOptions';\nimport {\n CollectionFilterInitialFetchTimingProps,\n useCollectionFilterInitialFetchTiming,\n} from '../../hooks/useCollectionFilterInitialFetchTiming';\n\nexport interface MultiSelectCollectionFilterProps<V, F extends FiltersMap>\n extends Omit<MultiSelectFilterBaseProps<V>, 'options' | 'dropdownSelect'>,\n CollectionFilterInitialFetchTimingProps {\n /**\n * A collection state object to fetch the dropdown items.<br>\n * A collection created using [useFilterCollection](./?path=/story/common-hooks--usefiltercollection) or [useStaticListFilterCollection](./?path=/story/common-hooks--usestaticlistfiltercollection)\n * @external\n */\n collection: CollectionState<V, F>;\n /**\n * A function that returns a [ListItemSelectProps](https://www.docs.wixdesignsystem.com/?path=/story/components-form-dropdownlistitems--listitemselect) (Optional)\n * @external\n */\n renderItem?: (item: V, index: number) => ListItem;\n}\n\nfunction _MultiSelectCollectionFilter<V, F extends FiltersMap>(\n props: MultiSelectCollectionFilterProps<V, F>,\n) {\n const { filter, collection, renderItem, initialFetchTiming, ...rest } = props;\n\n const container = useWixPatternsContainer();\n const toolbar = useFilterToolbarState();\n\n const buildOption = useBuildOption<V>({\n filter,\n renderItem,\n });\n\n const [collectionFilter] = useState(\n () =>\n new CollectionFilterState({\n collection,\n filter,\n }),\n );\n\n const [{ dropdownSelect, init }] = useState(\n () =>\n new DropdownCollectionFilterState({\n collectionFilter,\n resetOnClose: true,\n container,\n toolbar,\n }),\n );\n\n const {\n query: { search },\n } = collection;\n\n const { skipInitialFetch, onFocus } =\n useCollectionFilterInitialFetchTiming(props);\n\n useEffect(() => init({ skipInitialFetch }), []);\n\n const {\n result: { keyedItems },\n fetchedLastPage,\n } = collection;\n\n const { options, fixedFooter, showInitialLoader } =\n usePlaceholderStateOptions(keyedItems.map(buildOption), {\n collection,\n fixedFooter: rest.fixedFooter,\n });\n\n return (\n <MultiSelectFilterBase\n {...rest}\n fixedFooter={fixedFooter}\n infiniteScroll\n value={search.value}\n onChange={(e) => {\n collection.search(e.target.value);\n }}\n onFocus={onFocus}\n filter={filter}\n dropdownSelect={dropdownSelect}\n options={options}\n hasMore={!showInitialLoader && !fetchedLastPage}\n loadMore={collection.fetchNextPageIfNeeded}\n />\n );\n}\n\nexport const MultiSelectCollectionFilter = observer(\n _MultiSelectCollectionFilter,\n);\n\nMultiSelectCollectionFilter.displayName = 'MultiSelectCollectionFilter';\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAIA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,sBAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OA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BAAqB,MAAAC,SAAA,CAAAlD,OAAA,MAChBoB,IAAI;IACRwB,WAAW,EAAEA,WAAY;IACzBO,cAAc;IACdC,KAAK,EAAEjB,MAAM,CAACiB,KAAM;IACpBC,QAAQ,EAAG1D,CAAC,IAAK;MACfsB,UAAU,CAACkB,MAAM,CAACxC,CAAC,CAAC2D,MAAM,CAACF,KAAK,CAAC;IACnC,CAAE;IACFf,OAAO,EAAEA,OAAQ;IACjBrB,MAAM,EAAEA,MAAO;IACfc,cAAc,EAAEA,cAAe;IAC/Ba,OAAO,EAAEA,OAAQ;IACjBY,OAAO,EAAE,CAACV,iBAAiB,IAAI,CAACH,eAAgB;IAChDc,QAAQ,EAAEvC,UAAU,CAACwC,qBAAsB;IAAAC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAnE,YAAA;MAAAoE,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC5C,CAAC;AAEN;AAEO,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,IAAAE,uBAAQ,EACjDnD,4BACF,CAAC;AAEDiD,2BAA2B,CAACG,WAAW,GAAG,6BAA6B","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_state","_mobxReactLite","_MultiSelectFilterBase","_hooks","_react2","_providers","_usePlaceholderStateOptions","_useCollectionFilterInitialFetchTiming","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_MultiSelectCollectionFilter","props","filter","collection","renderItem","initialFetchTiming","rest","container","useWixPatternsContainer","toolbar","useFilterToolbarState","buildOption","useBuildOption","collectionFilter","useState","CollectionFilterState","dropdownSelect","init","DropdownCollectionFilterState","resetOnClose","query","search","skipInitialFetch","onFocus","useCollectionFilterInitialFetchTiming","useEffect","result","keyedItems","fetchedLastPage","options","fixedFooter","showInitialLoader","usePlaceholderStateOptions","map","createElement","MultiSelectFilterBase","_extends2","infiniteScroll","value","onChange","target","hasMore","loadMore","fetchNextPageIfNeeded","__self","__source","fileName","lineNumber","columnNumber","MultiSelectCollectionFilter","exports","observer","displayName"],"sources":["../../../../src/components/MultiSelectCollectionFilter/MultiSelectCollectionFilter.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n CollectionFilterState,\n DropdownCollectionFilterState,\n} from '../../state';\nimport { observer } from 'mobx-react-lite';\nimport { CollectionState, FiltersMap } from '@wix/bex-core';\nimport {\n MultiSelectFilterBase,\n MultiSelectFilterBaseProps,\n} from '../MultiSelectFilterBase';\nimport { ListItem, useBuildOption } from '../../hooks';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport { useFilterToolbarState } from '../../providers';\nimport { usePlaceholderStateOptions } from '../../hooks/usePlaceholderStateOptions';\nimport {\n CollectionFilterInitialFetchTimingProps,\n useCollectionFilterInitialFetchTiming,\n} from '../../hooks/useCollectionFilterInitialFetchTiming';\n\nexport interface MultiSelectCollectionFilterProps<V, F extends FiltersMap>\n extends Omit<MultiSelectFilterBaseProps<V>, 'options' | 'dropdownSelect'>,\n CollectionFilterInitialFetchTimingProps {\n /**\n * A collection state object to fetch the dropdown items.<br>\n * A collection created using [useFilterCollection](./?path=/story/features-filter-hooks--usefiltercollection) or [useStaticListFilterCollection](./?path=/story/features-filter-hooks--usestaticlistfiltercollection)\n * @external\n */\n collection: CollectionState<V, F>;\n /**\n * A function that returns a [ListItemSelectProps](https://www.docs.wixdesignsystem.com/?path=/story/components-form-dropdownlistitems--listitemselect) (Optional)\n * @external\n */\n renderItem?: (item: V, index: number) => ListItem;\n}\n\nfunction _MultiSelectCollectionFilter<V, F extends FiltersMap>(\n props: MultiSelectCollectionFilterProps<V, F>,\n) {\n const { filter, collection, renderItem, initialFetchTiming, ...rest } = props;\n\n const container = useWixPatternsContainer();\n const toolbar = useFilterToolbarState();\n\n const buildOption = useBuildOption<V>({\n filter,\n renderItem,\n });\n\n const [collectionFilter] = useState(\n () =>\n new CollectionFilterState({\n collection,\n filter,\n }),\n );\n\n const [{ dropdownSelect, init }] = useState(\n () =>\n new DropdownCollectionFilterState({\n collectionFilter,\n resetOnClose: true,\n container,\n toolbar,\n }),\n );\n\n const {\n query: { search },\n } = collection;\n\n const { skipInitialFetch, onFocus } =\n useCollectionFilterInitialFetchTiming(props);\n\n useEffect(() => init({ skipInitialFetch }), []);\n\n const {\n result: { keyedItems },\n fetchedLastPage,\n } = collection;\n\n const { options, fixedFooter, showInitialLoader } =\n usePlaceholderStateOptions(keyedItems.map(buildOption), {\n collection,\n fixedFooter: rest.fixedFooter,\n });\n\n return (\n <MultiSelectFilterBase\n {...rest}\n fixedFooter={fixedFooter}\n infiniteScroll\n value={search.value}\n onChange={(e) => {\n collection.search(e.target.value);\n }}\n onFocus={onFocus}\n filter={filter}\n dropdownSelect={dropdownSelect}\n options={options}\n hasMore={!showInitialLoader && !fetchedLastPage}\n loadMore={collection.fetchNextPageIfNeeded}\n />\n );\n}\n\nexport const MultiSelectCollectionFilter = observer(\n _MultiSelectCollectionFilter,\n);\n\nMultiSelectCollectionFilter.displayName = 'MultiSelectCollectionFilter';\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AAIA,IAAAE,cAAA,GAAAF,OAAA;AAEA,IAAAG,sBAAA,GAAAH,OAAA;AAIA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AACA,IAAAQ,sCAAA,GAAAR,OAAA;AAG2D,IAAAS,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,C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;IACfc,cAAc,EAAEA,cAAe;IAC/Ba,OAAO,EAAEA,OAAQ;IACjBY,OAAO,EAAE,CAACV,iBAAiB,IAAI,CAACH,eAAgB;IAChDc,QAAQ,EAAEvC,UAAU,CAACwC,qBAAsB;IAAAC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAnE,YAAA;MAAAoE,UAAA;MAAAC,YAAA;IAAA;EAAA,EAC5C,CAAC;AAEN;AAEO,MAAMC,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,IAAAE,uBAAQ,EACjDnD,4BACF,CAAC;AAEDiD,2BAA2B,CAACG,WAAW,GAAG,6BAA6B","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_providers","_CollectionCard","_NestedTableWSRTable","_mobxReactLite","_minimalRequiredWdsRuntimeCheck","_jsxFileName","_NestedTable","props","state","dataHook","toolbar","process","env","NODE_ENV","minimalRequiredWdsRuntimeCheck","required","requiredBy","default","createElement","CollectionCard","renderError","__self","__source","fileName","lineNumber","columnNumber","TableProvider","value","tableState","NestedTableWSRTable","_extends2","NestedTable","exports","observer"],"sources":["../../../../src/components/NestedTable/NestedTable.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react';\nimport { TableProvider } from '../../providers';\nimport { CollectionCard } from '../CollectionCard';\nimport { NestedTableState } from '../../state';\nimport { ToolbarBaseProps } from '../ToolbarCollection';\nimport { NestedTableWSRTable } from './NestedTableWSRTable';\nimport { observer } from 'mobx-react-lite';\nimport { minimalRequiredWdsRuntimeCheck } from '../../minimalRequiredWdsRuntimeCheck';\nimport {\n DragAndDropBulkSubmit,\n DragAndDropCancel,\n DragAndDropSubmit,\n} from '../DragAndDrop';\nimport { NestedTableDragAndDrop } from '../NestedTableDragAndDrop/NestedTableDragAndDrop';\n\nexport interface NestedTableProps<C extends string>\n extends ToolbarBaseProps<C> {\n /**\n * A state object created with [`useNestedTable`](./?path=/story/common-hooks--usenestedtable)\n */\n state: NestedTableState<C>;\n /**\n * A function that renders when there's an error fetching data from the server.<br> <br>\n * Supported parameters: <br>\n * - `err`: [object] The error thrown by the [`fetchData()`](./?path=/story/common-hooks--usecollection) function. <br>\n * - `isOnline`: [bool] Whether internet connection is available. <br>\n * - `retry`: [func] Retry collection fetch on failed response. Similar to `collection.retryFetch`.\n */\n renderError?: (params: {\n err: unknown;\n isOnline: boolean;\n retry: () => void;\n }) => ReactElement;\n /**\n * Shown when the collection is empty.\n * Pass either a [`<CollectionEmptyState />`](./?path=/story/components-collection-features--empty-state)\n * or [`<CollectionPremiuimEmptyState />`](./?path=/story/components-collection-features--premium-empty-state) component.\n */\n emptyState?: ReactNode;\n\n /**\n * Shown when a search or filter has no results.\n * Pass a [`<CollectionNoResultsState />`](./?path=/story/components-collection-features--no-results-state) component.\n */\n noResultsState?: ReactNode;\n horizontalScroll?: boolean;\n dataHook?: string;\n rowHeight?: number;\n estimatedRowHeight?: number;\n /**\n * Width of the column containing the `actionCell` component.\n */\n actionCellWidth?: string | number;\n\n /**\n * Adds functionality to allow visitors to reorder items manually.\n * This prop accepts a [Drag and Drop](./?path=%2Fstory%2Fcomponents-collection-features--drag-and-drop) component.\n */\n dragAndDrop?: typeof NestedTableDragAndDrop;\n\n /**\n * A function that submits a drop event to the server. The function accepts the following arguments: <br>\n * - `from: {item: T; index: number}` - Item that was dragged\n * - `after: null | {item: T; index: number}` - Item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`\n * - `filters` - Currently applied filters, for cases your server holds a unique ordering per filtering (see `dragAndDropCategories` prop)\n *\n * @returns Promise\n */\n dragAndDropSubmit?: DragAndDropSubmit<any, any>;\n\n /**\n * A function that submits a drop event to the server. The function accepts the array of following objects: <br>\n * - `from: {item: T; index: number}` - Item that was dragged\n * - `after: null | {item: T; index: number}` - Item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`\n * - `filters` - Currently applied filters, for cases your server holds a unique ordering per filtering (see `dragAndDropCategories` prop)\n *\n * @returns Promise\n */\n dragAndDropBulkSubmit?: DragAndDropBulkSubmit<any, any>;\n\n /**\n * A function that cancels a drop event. The function accepts the following arguments: <br>\n * - `from: {item: T; index: number}` - Item that was dragged\n * - `after: null | {item: T; index: number}` - Item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`\n * - `filters` - Currently applied filters, for cases your server holds a unique ordering per filtering (see `dragAndDropCategories` prop)\n *\n * If the move should be cancelled, the function should return a toast config object with a message explaining why the move was cancelled. Otherwise, the function should return nullish value.\n */\n dragAndDropCancel?: DragAndDropCancel<any, any>;\n\n /**\n * List of filters on which to enable drag and drop functionality. For example, you can enable the drag and drop functionality on the 'Age' filter, but not on the 'Phone Number' filter.\n * If no props are passed, the drag and drop feature is disabled, and unavailable for the table. To enable the drag and drop feature without the use of filters, pass an empty array. For example, `dragAndDropCategories={ [ [], ['status'] ] }`.\n */\n dragAndDropCategories?: (keyof any)[][] | null;\n\n /**\n * Indicates whether the table should have an internal scroll (instead of the default page scroll)\n */\n internalScroll?: boolean;\n}\n\nfunction _NestedTable<C extends string>(props: NestedTableProps<C>) {\n const { state, dataHook } = props;\n\n const { toolbar } = state;\n\n if (process.env.NODE_ENV !== 'production') {\n minimalRequiredWdsRuntimeCheck({\n required: '^1.64.1',\n requiredBy: 'Cairo/NestedTable',\n });\n }\n\n return (\n <CollectionCard renderError={false} state={toolbar} dataHook={dataHook}>\n <TableProvider value={state.tableState}>\n <NestedTableWSRTable {...props} />\n </TableProvider>\n </CollectionCard>\n );\n}\n\nexport const NestedTable = observer(_NestedTable);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,+BAAA,GAAAL,OAAA;AAAsF,IAAAM,YAAA;AA+FtF,SAASC,YAAYA,CAAmBC,KAA0B,EAAE;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEjC,MAAM;IAAEG;EAAQ,CAAC,GAAGF,KAAK;EAEzB,IAAIG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAAC,8DAA8B,EAAC;MAC7BC,QAAQ,EAAE,SAAS;MACnBC,UAAU,EAAE;IACd,CAAC,CAAC;EACJ;EAEA,oBACEnB,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAACjB,eAAA,CAAAkB,cAAc;IAACC,WAAW,EAAE,KAAM;IAACZ,KAAK,EAAEE,OAAQ;IAACD,QAAQ,EAAEA,QAAS;IAAAY,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlB,YAAA;MAAAmB,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACrE5B,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAAClB,UAAA,CAAA0B,aAAa;IAACC,KAAK,EAAEnB,KAAK,CAACoB,UAAW;IAAAP,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlB,YAAA;MAAAmB,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACrC5B,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAAChB,oBAAA,CAAA2B,mBAAmB,MAAAC,SAAA,CAAAb,OAAA,MAAKV,KAAK;IAAAc,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlB,YAAA;MAAAmB,UAAA;MAAAC,YAAA;IAAA;EAAA,EAAG,CACpB,CACD,CAAC;AAErB;AAEO,MAAMM,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,uBAAQ,EAAC3B,YAAY,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_providers","_CollectionCard","_NestedTableWSRTable","_mobxReactLite","_minimalRequiredWdsRuntimeCheck","_jsxFileName","_NestedTable","props","state","dataHook","toolbar","process","env","NODE_ENV","minimalRequiredWdsRuntimeCheck","required","requiredBy","default","createElement","CollectionCard","renderError","__self","__source","fileName","lineNumber","columnNumber","TableProvider","value","tableState","NestedTableWSRTable","_extends2","NestedTable","exports","observer"],"sources":["../../../../src/components/NestedTable/NestedTable.tsx"],"sourcesContent":["import React, { ReactElement, ReactNode } from 'react';\nimport { TableProvider } from '../../providers';\nimport { CollectionCard } from '../CollectionCard';\nimport { NestedTableState } from '../../state';\nimport { ToolbarBaseProps } from '../ToolbarCollection';\nimport { NestedTableWSRTable } from './NestedTableWSRTable';\nimport { observer } from 'mobx-react-lite';\nimport { minimalRequiredWdsRuntimeCheck } from '../../minimalRequiredWdsRuntimeCheck';\nimport {\n DragAndDropBulkSubmit,\n DragAndDropCancel,\n DragAndDropSubmit,\n} from '../DragAndDrop';\nimport { NestedTableDragAndDrop } from '../NestedTableDragAndDrop/NestedTableDragAndDrop';\n\nexport interface NestedTableProps<C extends string>\n extends ToolbarBaseProps<C> {\n /**\n * A state object created with [`useNestedTable`](./?path=/story/base-components-collections-nestedtable--usenestedtable)\n */\n state: NestedTableState<C>;\n /**\n * A function that renders when there's an error fetching data from the server.<br> <br>\n * Supported parameters: <br>\n * - `err`: [object] The error thrown by the [`fetchData()`](./?path=/story/common-hooks--usecollection) function. <br>\n * - `isOnline`: [bool] Whether internet connection is available. <br>\n * - `retry`: [func] Retry collection fetch on failed response. Similar to `collection.retryFetch`.\n */\n renderError?: (params: {\n err: unknown;\n isOnline: boolean;\n retry: () => void;\n }) => ReactElement;\n /**\n * Shown when the collection is empty.\n * Pass either a [`<CollectionEmptyState />`](./?path=/story/features-display-empty-states--collectionemptystate)\n * or [`<CollectionPremiuimEmptyState />`](./?path=/story/features-display-empty-states--collectionpremiumemptystate) component.\n */\n emptyState?: ReactNode;\n\n /**\n * Shown when a search or filter has no results.\n * Pass a [`<CollectionNoResultsState />`](./?path=/story/features-display-empty-states--collectionnoresultsstate) component.\n */\n noResultsState?: ReactNode;\n horizontalScroll?: boolean;\n dataHook?: string;\n rowHeight?: number;\n estimatedRowHeight?: number;\n /**\n * Width of the column containing the `actionCell` component.\n */\n actionCellWidth?: string | number;\n\n /**\n * Adds functionality to allow visitors to reorder items manually.\n * This prop accepts a [Drag and Drop](./?path=/story/features-sort-drag-and-drop--draganddrop) component.\n */\n dragAndDrop?: typeof NestedTableDragAndDrop;\n\n /**\n * A function that submits a drop event to the server. The function accepts the following arguments: <br>\n * - `from: {item: T; index: number}` - Item that was dragged\n * - `after: null | {item: T; index: number}` - Item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`\n * - `filters` - Currently applied filters, for cases your server holds a unique ordering per filtering (see `dragAndDropCategories` prop)\n *\n * @returns Promise\n */\n dragAndDropSubmit?: DragAndDropSubmit<any, any>;\n\n /**\n * A function that submits a drop event to the server. The function accepts the array of following objects: <br>\n * - `from: {item: T; index: number}` - Item that was dragged\n * - `after: null | {item: T; index: number}` - Item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`\n * - `filters` - Currently applied filters, for cases your server holds a unique ordering per filtering (see `dragAndDropCategories` prop)\n *\n * @returns Promise\n */\n dragAndDropBulkSubmit?: DragAndDropBulkSubmit<any, any>;\n\n /**\n * A function that cancels a drop event. The function accepts the following arguments: <br>\n * - `from: {item: T; index: number}` - Item that was dragged\n * - `after: null | {item: T; index: number}` - Item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`\n * - `filters` - Currently applied filters, for cases your server holds a unique ordering per filtering (see `dragAndDropCategories` prop)\n *\n * If the move should be cancelled, the function should return a toast config object with a message explaining why the move was cancelled. Otherwise, the function should return nullish value.\n */\n dragAndDropCancel?: DragAndDropCancel<any, any>;\n\n /**\n * List of filters on which to enable drag and drop functionality. For example, you can enable the drag and drop functionality on the 'Age' filter, but not on the 'Phone Number' filter.\n * If no props are passed, the drag and drop feature is disabled, and unavailable for the table. To enable the drag and drop feature without the use of filters, pass an empty array. For example, `dragAndDropCategories={ [ [], ['status'] ] }`.\n */\n dragAndDropCategories?: (keyof any)[][] | null;\n\n /**\n * Indicates whether the table should have an internal scroll (instead of the default page scroll)\n */\n internalScroll?: boolean;\n}\n\nfunction _NestedTable<C extends string>(props: NestedTableProps<C>) {\n const { state, dataHook } = props;\n\n const { toolbar } = state;\n\n if (process.env.NODE_ENV !== 'production') {\n minimalRequiredWdsRuntimeCheck({\n required: '^1.64.1',\n requiredBy: 'Cairo/NestedTable',\n });\n }\n\n return (\n <CollectionCard renderError={false} state={toolbar} dataHook={dataHook}>\n <TableProvider value={state.tableState}>\n <NestedTableWSRTable {...props} />\n </TableProvider>\n </CollectionCard>\n );\n}\n\nexport const NestedTable = observer(_NestedTable);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,eAAA,GAAAF,OAAA;AAGA,IAAAG,oBAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,+BAAA,GAAAL,OAAA;AAAsF,IAAAM,YAAA;AA+FtF,SAASC,YAAYA,CAAmBC,KAA0B,EAAE;EAClE,MAAM;IAAEC,KAAK;IAAEC;EAAS,CAAC,GAAGF,KAAK;EAEjC,MAAM;IAAEG;EAAQ,CAAC,GAAGF,KAAK;EAEzB,IAAIG,OAAO,CAACC,GAAG,CAACC,QAAQ,KAAK,YAAY,EAAE;IACzC,IAAAC,8DAA8B,EAAC;MAC7BC,QAAQ,EAAE,SAAS;MACnBC,UAAU,EAAE;IACd,CAAC,CAAC;EACJ;EAEA,oBACEnB,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAACjB,eAAA,CAAAkB,cAAc;IAACC,WAAW,EAAE,KAAM;IAACZ,KAAK,EAAEE,OAAQ;IAACD,QAAQ,EAAEA,QAAS;IAAAY,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlB,YAAA;MAAAmB,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACrE5B,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAAClB,UAAA,CAAA0B,aAAa;IAACC,KAAK,EAAEnB,KAAK,CAACoB,UAAW;IAAAP,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlB,YAAA;MAAAmB,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACrC5B,MAAA,CAAAoB,OAAA,CAAAC,aAAA,CAAChB,oBAAA,CAAA2B,mBAAmB,MAAAC,SAAA,CAAAb,OAAA,MAAKV,KAAK;IAAAc,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlB,YAAA;MAAAmB,UAAA;MAAAC,YAAA;IAAA;EAAA,EAAG,CACpB,CACD,CAAC;AAErB;AAEO,MAAMM,WAAW,GAAAC,OAAA,CAAAD,WAAA,GAAG,IAAAE,uBAAQ,EAAC3B,YAAY,CAAC","ignoreList":[]}
@@ -5,17 +5,17 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "NestedTableRow964041911";
8
+ var _namespace_ = "NestedTableRow3193695257";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "NestedTableRow964041911__root",
16
- "firstLevel": "NestedTableRow964041911__firstLevel",
17
- "placeholder": "NestedTableRow964041911__placeholder",
18
- "parentHovered": "NestedTableRow964041911__parentHovered"
15
+ "root": "NestedTableRow3193695257__root",
16
+ "firstLevel": "NestedTableRow3193695257__firstLevel",
17
+ "placeholder": "NestedTableRow3193695257__placeholder",
18
+ "parentHovered": "NestedTableRow3193695257__parentHovered"
19
19
  };
20
20
  var keyframes = exports.keyframes = {};
21
21
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/NestedTable/NestedTableRow.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"NestedTableRow964041911\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"NestedTableRow964041911__root\",\"firstLevel\":\"NestedTableRow964041911__firstLevel\",\"placeholder\":\"NestedTableRow964041911__placeholder\",\"parentHovered\":\"NestedTableRow964041911__parentHovered\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,yBAAyB;AAC3C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,+BAA+B;EAAC,YAAY,EAAC,qCAAqC;EAAC,aAAa,EAAC,sCAAsC;EAAC,eAAe,EAAC;AAAwC,CAAC;AACvN,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/NestedTable/NestedTableRow.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"NestedTableRow3193695257\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"NestedTableRow3193695257__root\",\"firstLevel\":\"NestedTableRow3193695257__firstLevel\",\"placeholder\":\"NestedTableRow3193695257__placeholder\",\"parentHovered\":\"NestedTableRow3193695257__parentHovered\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,0BAA0B;AAC5C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,gCAAgC;EAAC,YAAY,EAAC,sCAAsC;EAAC,aAAa,EAAC,uCAAuC;EAAC,eAAe,EAAC;AAAyC,CAAC;AAC3N,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -105,7 +105,7 @@ function _NestedTableWSRTable(props) {
105
105
  __self: this,
106
106
  __source: {
107
107
  fileName: _jsxFileName,
108
- lineNumber: 141,
108
+ lineNumber: 134,
109
109
  columnNumber: 15
110
110
  }
111
111
  })
@@ -137,7 +137,7 @@ function _NestedTableWSRTable(props) {
137
137
  __self: this,
138
138
  __source: {
139
139
  fileName: _jsxFileName,
140
- lineNumber: 139,
140
+ lineNumber: 132,
141
141
  columnNumber: 5
142
142
  }
143
143
  }), /*#__PURE__*/_react.default.createElement(_MultiCollectionSupportProvider.MultiCollectionSupportProvider, {
@@ -146,7 +146,7 @@ function _NestedTableWSRTable(props) {
146
146
  __self: this,
147
147
  __source: {
148
148
  fileName: _jsxFileName,
149
- lineNumber: 168,
149
+ lineNumber: 161,
150
150
  columnNumber: 7
151
151
  }
152
152
  }, /*#__PURE__*/_react.default.createElement(_TablePlaceholderStates.TablePlaceholderStates, {
@@ -160,7 +160,7 @@ function _NestedTableWSRTable(props) {
160
160
  __self: this,
161
161
  __source: {
162
162
  fileName: _jsxFileName,
163
- lineNumber: 172,
163
+ lineNumber: 165,
164
164
  columnNumber: 9
165
165
  }
166
166
  }), /*#__PURE__*/_react.default.createElement(_NestedTableContent.NestedTableContent, {
@@ -169,7 +169,7 @@ function _NestedTableWSRTable(props) {
169
169
  __self: this,
170
170
  __source: {
171
171
  fileName: _jsxFileName,
172
- lineNumber: 181,
172
+ lineNumber: 174,
173
173
  columnNumber: 9
174
174
  }
175
175
  })));
@@ -185,7 +185,7 @@ function _NestedTableWSRTable(props) {
185
185
  __self: this,
186
186
  __source: {
187
187
  fileName: _jsxFileName,
188
- lineNumber: 189,
188
+ lineNumber: 182,
189
189
  columnNumber: 7
190
190
  }
191
191
  }, table);
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_mobxReactLite","_CollectionTableWSRTable","_NestedTableContent","_useToolbarCollectionSyncProps","_useModeTableProps","_mobx","_QuerySearch","_MultiCollectionSupportProvider","_designSystem","_TablePlaceholderStates","_react2","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_NestedTableWSRTable","props","state","wrapperState","renderError","multiLevelSorting","actionCell","actionCellWidth","actionCellProps","filters","customColumns","views","emptyState","noResultsState","topNotification","showTitleBar","horizontalScroll","rowHeight","estimatedRowHeight","rowVerticalPadding","dragAndDrop","dragAndDropBulkSubmit","dragAndDropSubmit","dragAndDropCancel","dragAndDropReorderModeToolbar","dragAndDropCategories","rest","modalsContainerRef","usePageContext","toolbar","query","useState","setStateObject","useToolbarCollectionSyncProps","isUsingDragAndDrop","isUsingBulkActionsToolbar","isUsingHorizontalScroll","isUsingFolders","isUsingTableVirtualization","Table","CollectionTableWSRTable","key","BodyElementType","TrElementType","columns","useModeTableProps","useEffect","runInAction","virtual","st","classes","WSRTable","dataTableRowVirtualStyle","table","createElement","_extends2","search","QuerySearch","__self","__source","fileName","lineNumber","columnNumber","showHeaderWhenEmpty","sticky","isApplyColumnWidthStyle","useNewInfiniteScrollLoader","rowClass","root","headerClass","thead","headerRowClass","MultiCollectionSupportProvider","value","multi","TablePlaceholderStates","NestedTableContent","CollectionNestedTableDragAndDropContext","nested","onSubmit","onCancel","onBulkSubmit","NestedTableWSRTable","exports","observer"],"sources":["../../../../src/components/NestedTable/NestedTableWSRTable.tsx"],"sourcesContent":["import React, { ComponentType, ReactNode, useEffect, useState } from 'react';\nimport { FiltersMap } from '@wix/bex-core';\nimport { observer } from 'mobx-react-lite';\nimport {\n CollectionTableWSRTable,\n CollectionTableWSRTableBaseProps,\n CollectionTableWSRTableProps,\n} from '../CollectionTable/CollectionTableWSRTable';\nimport { CollectionTableBaseCommonProps } from '../CollectionTable/CollectionTableBaseCommonProps';\nimport { NestedTableItem, NestedTableState } from '../../state';\nimport { NestedTableFlatDataItem } from '../../state/NestedTableState/NestedTableFlatModeSectionState';\nimport { NestedTableContent } from './NestedTableContent';\nimport { TopNotificationBasicRenderProp } from '../TableTopNotification';\nimport { useToolbarCollectionSyncProps } from '../ToolbarCollection/useToolbarCollectionSyncProps';\nimport { useModeTableProps } from './useModeTableProps';\nimport { runInAction } from 'mobx';\nimport { QuerySearch } from '../QuerySearch';\nimport { MultiCollectionSupportProvider } from '../MultiCollectionSupportProvider';\nimport { Table as WSRTable } from '@wix/design-system';\nimport { TablePlaceholderStates } from '../TablePlaceholderStates/TablePlaceholderStates';\nimport { NestedTableDragAndDrop } from '../NestedTableDragAndDrop/NestedTableDragAndDrop';\nimport { usePageContext } from '@wix/bex-core/react';\n\nexport interface NestedTableWSRTableBaseProps<\n C extends string,\n T,\n F extends FiltersMap,\n> extends Omit<\n CollectionTableWSRTableBaseProps<\n NestedTableItem<C, any, any> | NestedTableFlatDataItem<C, any, any>,\n T,\n F\n >,\n | 'actionCell'\n | 'sticky'\n | 'selectionDisabled'\n | 'emptyState'\n | 'noResultsState'\n | 'topNotification'\n >,\n CollectionTableBaseCommonProps<T, F> {}\n\nexport interface NestedTableWSRTableProps<\n C extends string,\n T,\n F extends FiltersMap,\n> extends NestedTableWSRTableBaseProps<C, T, F> {\n dataHook?: string;\n emptyState?: ReactNode;\n noResultsState?: ReactNode;\n state: NestedTableState<C>;\n topNotification?: TopNotificationBasicRenderProp;\n rowHeight?: number;\n estimatedRowHeight?: number;\n dragAndDrop?: typeof NestedTableDragAndDrop;\n}\n\nfunction _NestedTableWSRTable<C extends string, T, F extends FiltersMap>(\n props: NestedTableWSRTableProps<C, T, F>,\n) {\n const {\n state: wrapperState,\n renderError,\n multiLevelSorting,\n actionCell,\n actionCellWidth,\n actionCellProps,\n filters,\n customColumns,\n views,\n emptyState,\n noResultsState,\n topNotification,\n showTitleBar = true,\n horizontalScroll = true,\n rowHeight,\n estimatedRowHeight,\n rowVerticalPadding = 'tiny',\n dragAndDrop,\n dragAndDropBulkSubmit,\n dragAndDropSubmit,\n dragAndDropCancel,\n dragAndDropReorderModeToolbar,\n dragAndDropCategories,\n ...rest\n } = props;\n const { modalsContainerRef } = usePageContext();\n\n const { toolbar, query } = wrapperState;\n\n useState(() => {\n dragAndDrop?.setStateObject({\n state: wrapperState,\n modalsContainerRef,\n });\n });\n\n useToolbarCollectionSyncProps({\n ...props,\n state: toolbar,\n isUsingDragAndDrop: false,\n isUsingBulkActionsToolbar: false,\n isUsingHorizontalScroll: true,\n isUsingFolders: false,\n isUsingTableVirtualization: true,\n });\n\n const Table = CollectionTableWSRTable as ComponentType<\n CollectionTableWSRTableProps<any, T, F>\n >;\n\n const { state, key, BodyElementType, TrElementType, columns } =\n useModeTableProps({\n state: wrapperState,\n horizontalScroll,\n actionCellWidth,\n actionCellProps,\n });\n\n useEffect(() => {\n runInAction(() => {\n state.virtual.rowHeight = rowHeight;\n });\n }, [rowHeight, state]);\n\n useEffect(() => {\n if (estimatedRowHeight == null) {\n return;\n }\n runInAction(() => {\n state.virtual.estimatedRowHeight = estimatedRowHeight;\n });\n }, [estimatedRowHeight, state]);\n\n const { st, classes } =\n WSRTable.dataTableRowVirtualStyle as import('@stylable/runtime').RuntimeStylesheet;\n\n let table = (\n <Table\n rowVerticalPadding={rowVerticalPadding}\n search={<QuerySearch state={query.search} />}\n {...rest}\n showHeaderWhenEmpty\n sticky\n filters={filters}\n customColumns={customColumns}\n views={views}\n horizontalScroll={horizontalScroll}\n emptyState={emptyState}\n noResultsState={noResultsState}\n isApplyColumnWidthStyle\n useNewInfiniteScrollLoader\n showTitleBar={showTitleBar}\n rowClass={st(classes.root)}\n headerClass={st(classes.thead)}\n headerRowClass={st(classes.root)}\n TrElementType={TrElementType}\n state={state}\n BodyElementType={BodyElementType}\n columns={columns}\n dragAndDropReorderModeToolbar={dragAndDropReorderModeToolbar}\n dragAndDrop={dragAndDrop}\n dragAndDropCancel={dragAndDropCancel}\n dragAndDropSubmit={dragAndDropSubmit}\n dragAndDropBulkSubmit={dragAndDropBulkSubmit}\n dragAndDropCategories={dragAndDropCategories}\n >\n <MultiCollectionSupportProvider\n key={`MultiCollectionSupportProvider_${key}`}\n value={state.multi}\n >\n <TablePlaceholderStates\n key={`PlaceholderStates_${key}`}\n state={state}\n emptyState={emptyState}\n noResultsState={noResultsState}\n renderError={renderError}\n topNotification={topNotification}\n rowVerticalPadding={rowVerticalPadding}\n />\n <NestedTableContent key={`NestedTableContent_${key}`} state={state} />\n </MultiCollectionSupportProvider>\n </Table>\n );\n\n if (dragAndDrop) {\n const { CollectionNestedTableDragAndDropContext } = dragAndDrop;\n table = (\n <CollectionNestedTableDragAndDropContext\n state={wrapperState.nested}\n onSubmit={dragAndDropSubmit}\n onCancel={dragAndDropCancel}\n onBulkSubmit={dragAndDropBulkSubmit}\n >\n {table}\n </CollectionNestedTableDragAndDropContext>\n );\n }\n\n return table;\n}\n\nexport const NestedTableWSRTable = observer(_NestedTableWSRTable);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA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AgB;IACjCK,kBAAkB,EAAEA,kBAAmB;IAAAuC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjF,YAAA;MAAAkF,UAAA;MAAAC,YAAA;IAAA;EAAA,CACxC,CAAC,eACFjG,MAAA,CAAAqB,OAAA,CAAAoE,aAAA,CAACpF,mBAAA,CAAA0G,kBAAkB;IAACnC,GAAG,EAAG,sBAAqBA,GAAI,EAAE;IAACvC,KAAK,EAAEA,KAAM;IAAAwD,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjF,YAAA;MAAAkF,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CACvC,CAC3B,CACR;EAED,IAAI1C,WAAW,EAAE;IACf,MAAM;MAAEyD;IAAwC,CAAC,GAAGzD,WAAW;IAC/DiC,KAAK,gBACHxF,MAAA,CAAAqB,OAAA,CAAAoE,aAAA,CAACuB,uCAAuC;MACtC3E,KAAK,EAAEC,YAAY,CAAC2E,MAAO;MAC3BC,QAAQ,EAAEzD,iBAAkB;MAC5B0D,QAAQ,EAAEzD,iBAAkB;MAC5B0D,YAAY,EAAE5D,qBAAsB;MAAAqC,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAjF,YAAA;QAAAkF,UAAA;QAAAC,YAAA;MAAA;IAAA,GAEnCT,KACsC,CAC1C;EACH;EAEA,OAAOA,KAAK;AACd;AAEO,MAAM6B,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,uBAAQ,EAACpF,oBAAoB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_mobxReactLite","_CollectionTableWSRTable","_NestedTableContent","_useToolbarCollectionSyncProps","_useModeTableProps","_mobx","_QuerySearch","_MultiCollectionSupportProvider","_designSystem","_TablePlaceholderStates","_react2","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_NestedTableWSRTable","props","state","wrapperState","renderError","multiLevelSorting","actionCell","actionCellWidth","actionCellProps","filters","customColumns","views","emptyState","noResultsState","topNotification","showTitleBar","horizontalScroll","rowHeight","estimatedRowHeight","rowVerticalPadding","dragAndDrop","dragAndDropBulkSubmit","dragAndDropSubmit","dragAndDropCancel","dragAndDropReorderModeToolbar","dragAndDropCategories","rest","modalsContainerRef","usePageContext","toolbar","query","useState","setStateObject","useToolbarCollectionSyncProps","isUsingDragAndDrop","isUsingBulkActionsToolbar","isUsingHorizontalScroll","isUsingFolders","isUsingTableVirtualization","Table","CollectionTableWSRTable","key","BodyElementType","TrElementType","columns","useModeTableProps","useEffect","runInAction","virtual","st","classes","WSRTable","dataTableRowVirtualStyle","table","createElement","_extends2","search","QuerySearch","__self","__source","fileName","lineNumber","columnNumber","showHeaderWhenEmpty","sticky","isApplyColumnWidthStyle","useNewInfiniteScrollLoader","rowClass","root","headerClass","thead","headerRowClass","MultiCollectionSupportProvider","value","multi","TablePlaceholderStates","NestedTableContent","CollectionNestedTableDragAndDropContext","nested","onSubmit","onCancel","onBulkSubmit","NestedTableWSRTable","exports","observer"],"sources":["../../../../src/components/NestedTable/NestedTableWSRTable.tsx"],"sourcesContent":["import React, { ComponentType, useEffect, useState } from 'react';\nimport { FiltersMap } from '@wix/bex-core';\nimport { observer } from 'mobx-react-lite';\nimport {\n CollectionTableWSRTable,\n CollectionTableWSRTableBaseProps,\n CollectionTableWSRTableProps,\n} from '../CollectionTable/CollectionTableWSRTable';\nimport { CollectionTableActionCellProps } from '../CollectionTable/CollectionTableBaseCommonProps';\nimport { NestedTableItem, NestedTableState } from '../../state';\nimport { NestedTableFlatDataItem } from '../../state/NestedTableState/NestedTableFlatModeSectionState';\nimport { NestedTableContent } from './NestedTableContent';\nimport { TopNotificationBasicRenderProp } from '../TableTopNotification';\nimport { useToolbarCollectionSyncProps } from '../ToolbarCollection/useToolbarCollectionSyncProps';\nimport { useModeTableProps } from './useModeTableProps';\nimport { runInAction } from 'mobx';\nimport { QuerySearch } from '../QuerySearch';\nimport { MultiCollectionSupportProvider } from '../MultiCollectionSupportProvider';\nimport { Table as WSRTable } from '@wix/design-system';\nimport { TablePlaceholderStates } from '../TablePlaceholderStates/TablePlaceholderStates';\nimport { NestedTableDragAndDrop } from '../NestedTableDragAndDrop/NestedTableDragAndDrop';\nimport { usePageContext } from '@wix/bex-core/react';\n\nexport interface NestedTableWSRTableBaseProps<\n C extends string,\n T,\n F extends FiltersMap,\n> extends Omit<\n CollectionTableWSRTableBaseProps<\n NestedTableItem<C, any, any> | NestedTableFlatDataItem<C, any, any>,\n T,\n F\n >,\n 'actionCell' | 'sticky' | 'selectionDisabled' | 'topNotification'\n >,\n CollectionTableActionCellProps<T, F> {}\n\nexport interface NestedTableWSRTableProps<\n C extends string,\n T,\n F extends FiltersMap,\n> extends NestedTableWSRTableBaseProps<C, T, F> {\n dataHook?: string;\n state: NestedTableState<C>;\n topNotification?: TopNotificationBasicRenderProp;\n rowHeight?: number;\n estimatedRowHeight?: number;\n dragAndDrop?: typeof NestedTableDragAndDrop;\n}\n\nfunction _NestedTableWSRTable<C extends string, T, F extends FiltersMap>(\n props: NestedTableWSRTableProps<C, T, F>,\n) {\n const {\n state: wrapperState,\n renderError,\n multiLevelSorting,\n actionCell,\n actionCellWidth,\n actionCellProps,\n filters,\n customColumns,\n views,\n emptyState,\n noResultsState,\n topNotification,\n showTitleBar = true,\n horizontalScroll = true,\n rowHeight,\n estimatedRowHeight,\n rowVerticalPadding = 'tiny',\n dragAndDrop,\n dragAndDropBulkSubmit,\n dragAndDropSubmit,\n dragAndDropCancel,\n dragAndDropReorderModeToolbar,\n dragAndDropCategories,\n ...rest\n } = props;\n const { modalsContainerRef } = usePageContext();\n\n const { toolbar, query } = wrapperState;\n\n useState(() => {\n dragAndDrop?.setStateObject({\n state: wrapperState,\n modalsContainerRef,\n });\n });\n\n useToolbarCollectionSyncProps({\n ...props,\n state: toolbar,\n isUsingDragAndDrop: false,\n isUsingBulkActionsToolbar: false,\n isUsingHorizontalScroll: true,\n isUsingFolders: false,\n isUsingTableVirtualization: true,\n });\n\n const Table = CollectionTableWSRTable as ComponentType<\n CollectionTableWSRTableProps<any, T, F>\n >;\n\n const { state, key, BodyElementType, TrElementType, columns } =\n useModeTableProps({\n state: wrapperState,\n horizontalScroll,\n actionCellWidth,\n actionCellProps,\n });\n\n useEffect(() => {\n runInAction(() => {\n state.virtual.rowHeight = rowHeight;\n });\n }, [rowHeight, state]);\n\n useEffect(() => {\n if (estimatedRowHeight == null) {\n return;\n }\n runInAction(() => {\n state.virtual.estimatedRowHeight = estimatedRowHeight;\n });\n }, [estimatedRowHeight, state]);\n\n const { st, classes } =\n WSRTable.dataTableRowVirtualStyle as import('@stylable/runtime').RuntimeStylesheet;\n\n let table = (\n <Table\n rowVerticalPadding={rowVerticalPadding}\n search={<QuerySearch state={query.search} />}\n {...rest}\n showHeaderWhenEmpty\n sticky\n filters={filters}\n customColumns={customColumns}\n views={views}\n horizontalScroll={horizontalScroll}\n emptyState={emptyState}\n noResultsState={noResultsState}\n isApplyColumnWidthStyle\n useNewInfiniteScrollLoader\n showTitleBar={showTitleBar}\n rowClass={st(classes.root)}\n headerClass={st(classes.thead)}\n headerRowClass={st(classes.root)}\n TrElementType={TrElementType}\n state={state}\n BodyElementType={BodyElementType}\n columns={columns}\n dragAndDropReorderModeToolbar={dragAndDropReorderModeToolbar}\n dragAndDrop={dragAndDrop}\n dragAndDropCancel={dragAndDropCancel}\n dragAndDropSubmit={dragAndDropSubmit}\n dragAndDropBulkSubmit={dragAndDropBulkSubmit}\n dragAndDropCategories={dragAndDropCategories}\n >\n <MultiCollectionSupportProvider\n key={`MultiCollectionSupportProvider_${key}`}\n value={state.multi}\n >\n <TablePlaceholderStates\n key={`PlaceholderStates_${key}`}\n state={state}\n emptyState={emptyState}\n noResultsState={noResultsState}\n renderError={renderError}\n topNotification={topNotification}\n rowVerticalPadding={rowVerticalPadding}\n />\n <NestedTableContent key={`NestedTableContent_${key}`} state={state} />\n </MultiCollectionSupportProvider>\n </Table>\n );\n\n if (dragAndDrop) {\n const { CollectionNestedTableDragAndDropContext } = dragAndDrop;\n table = (\n <CollectionNestedTableDragAndDropContext\n state={wrapperState.nested}\n onSubmit={dragAndDropSubmit}\n onCancel={dragAndDropCancel}\n onBulkSubmit={dragAndDropBulkSubmit}\n >\n {table}\n </CollectionNestedTableDragAndDropContext>\n );\n }\n\n return table;\n}\n\nexport const NestedTableWSRTable = observer(_NestedTableWSRTable);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AAQA,IAAAG,mBAAA,GAAAH,OAAA;AAEA,IAAAI,8BAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AACA,IAAAQ,+BAAA,GAAAR,OAAA;AACA,IAAAS,aAAA,GAAAT,OAAA;AACA,IAAAU,uBAAA,GAAAV,OAAA;AAEA,IAAAW,OAAA,GAAAX,OAAA;AAAqD,IAAAY,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAA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AAE,uBAAQ,EAACpF,oBAAoB,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_PickerContentProvider","_PickerSelectorListContent","_MaxSelection","_PickerContentWrapped","_jsxFileName","PickerContent","props","modalState","default","createElement","PickerContentProvider","__self","__source","fileName","lineNumber","columnNumber","PickerContentWrapped","_extends2","renderPickerContent","state","renderItem","PickerSelectorListContent","selectorListProps","multiple","fromMultipleSelectionToBoolean","hasAdditionalStep","hiddenItemsWarningText"],"sources":["../../../../src/components/PickerContent/PickerContent.tsx"],"sourcesContent":["import React, { ComponentType, ReactNode } from 'react';\nimport { FiltersMap, OptionalFiltersMap } from '@wix/bex-core';\nimport { UsePickerContentParams } from '../../hooks/usePickerContent';\nimport { PickerContentState } from '../../state';\nimport { PickerContentProvider } from './PickerContentProvider';\nimport { PickerSelectorListContent } from '../PickerSelectorListContent';\nimport { fromMultipleSelectionToBoolean } from '../MaxSelection';\nimport { PickerContentWrapped } from './PickerContentWrapped';\nimport { PickerContentItemsSelectionProps } from './PickerContentItemsSelection';\nimport { SelectorListContentProps } from '@wix/design-system';\nimport { PickerContentAdditionalStepProps } from './PickerContentAdditionalStep';\n\nexport interface PickerContentComponentBaseProps<T, F extends FiltersMap>\n extends PickerContentItemsSelectionProps<T, F>,\n PickerContentAdditionalStepProps<T> {\n /**\n * Additional props to pass to [SelectorList](https://www.docs.wixdesignsystem.com/?path=/story/components-lists--selectorlist), i.e `imageSize`, `imageShape` etc.\n */\n selectorListProps?: Partial<SelectorListContentProps>;\n\n /** Show a warning at the top of the list when not all available items are currently showed */\n hiddenItemsWarningText?: ReactNode;\n}\n\nexport interface PickerContentProps<T, F extends FiltersMap>\n extends PickerContentComponentBaseProps<T, F> {\n /**\n * A state object created with [`usePickerContent`](./?path=/story/components-pickermodal-hooks--usepickercontent)\n */\n state: UsePickerContentParams<T, F> | PickerContentState<T, F>;\n}\n\nexport type PickerContentComponentProps<\n T,\n F extends FiltersMap = OptionalFiltersMap,\n> = Omit<\n PickerContentComponentBaseProps<T, F>,\n | 'renderItem'\n | 'pickerContentState'\n | 'renderEmptyState'\n | 'hiddenItemsWarningText'\n | 'renderPickerContent'\n>;\n\nexport type PickerContentComponent<\n T,\n F extends FiltersMap = OptionalFiltersMap,\n> = ComponentType<PickerContentComponentProps<T, F>>;\n\nexport function PickerContent<T, F extends FiltersMap>(\n props: PickerContentProps<T, F>,\n) {\n const { modalState } = props;\n\n // wrap with a new WixPatternsContainer that can get initialProps\n return (\n <PickerContentProvider modalState={modalState}>\n <PickerContentWrapped\n {...props}\n renderPickerContent={({ state, renderItem }) => (\n <PickerSelectorListContent\n {...props.selectorListProps}\n state={state}\n multiple={fromMultipleSelectionToBoolean(props.multiple)}\n hasAdditionalStep={props.hasAdditionalStep}\n hiddenItemsWarningText={props.hiddenItemsWarningText}\n renderItem={renderItem}\n />\n )}\n />\n </PickerContentProvider>\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAJ,OAAA;AAA8D,IAAAK,YAAA;AA0CvD,SAASC,aAAaA,CAC3BC,KAA+B,EAC/B;EACA,MAAM;IAAEC;EAAW,CAAC,GAAGD,KAAK;;EAE5B;EACA,oBACET,MAAA,CAAAW,OAAA,CAAAC,aAAA,CAACT,sBAAA,CAAAU,qBAAqB;IAACH,UAAU,EAAEA,UAAW;IAAAI,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAT,YAAA;MAAAU,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAC5ClB,MAAA,CAAAW,OAAA,CAAAC,aAAA,CAACN,qBAAA,CAAAa,oBAAoB,MAAAC,SAAA,CAAAT,OAAA,MACfF,KAAK;IACTY,mBAAmB,EAAEA,CAAC;MAAEC,KAAK;MAAEC;IAAW,CAAC,kBACzCvB,MAAA,CAAAW,OAAA,CAAAC,aAAA,CAACR,0BAAA,CAAAoB,yBAAyB,MAAAJ,SAAA,CAAAT,OAAA,MACpBF,KAAK,CAACgB,iBAAiB;MAC3BH,KAAK,EAAEA,KAAM;MACbI,QAAQ,EAAE,IAAAC,4CAA8B,EAAClB,KAAK,CAACiB,QAAQ,CAAE;MACzDE,iBAAiB,EAAEnB,KAAK,CAACmB,iBAAkB;MAC3CC,sBAAsB,EAAEpB,KAAK,CAACoB,sBAAuB;MACrDN,UAAU,EAAEA,UAAW;MAAAT,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAT,YAAA;QAAAU,UAAA;QAAAC,YAAA;MAAA;IAAA,EACxB,CACD;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAT,YAAA;MAAAU,UAAA;MAAAC,YAAA;IAAA;EAAA,EACH,CACoB,CAAC;AAE5B","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_PickerContentProvider","_PickerSelectorListContent","_MaxSelection","_PickerContentWrapped","_jsxFileName","PickerContent","props","modalState","default","createElement","PickerContentProvider","__self","__source","fileName","lineNumber","columnNumber","PickerContentWrapped","_extends2","renderPickerContent","state","renderItem","PickerSelectorListContent","selectorListProps","multiple","fromMultipleSelectionToBoolean","hasAdditionalStep","hiddenItemsWarningText"],"sources":["../../../../src/components/PickerContent/PickerContent.tsx"],"sourcesContent":["import React, { ComponentType, ReactNode } from 'react';\nimport { FiltersMap, OptionalFiltersMap } from '@wix/bex-core';\nimport { UsePickerContentParams } from '../../hooks/usePickerContent';\nimport { PickerContentState } from '../../state';\nimport { PickerContentProvider } from './PickerContentProvider';\nimport { PickerSelectorListContent } from '../PickerSelectorListContent';\nimport { fromMultipleSelectionToBoolean } from '../MaxSelection';\nimport { PickerContentWrapped } from './PickerContentWrapped';\nimport { PickerContentItemsSelectionProps } from './PickerContentItemsSelection';\nimport { SelectorListContentProps } from '@wix/design-system';\nimport { PickerContentAdditionalStepProps } from './PickerContentAdditionalStep';\n\nexport interface PickerContentComponentBaseProps<T, F extends FiltersMap>\n extends PickerContentItemsSelectionProps<T, F>,\n PickerContentAdditionalStepProps<T> {\n /**\n * Additional props to pass to [SelectorList](https://www.docs.wixdesignsystem.com/?path=/story/components-lists--selectorlist), i.e `imageSize`, `imageShape` etc.\n */\n selectorListProps?: Partial<SelectorListContentProps>;\n\n /** Show a warning at the top of the list when not all available items are currently showed */\n hiddenItemsWarningText?: ReactNode;\n}\n\nexport interface PickerContentProps<T, F extends FiltersMap>\n extends PickerContentComponentBaseProps<T, F> {\n /**\n * A state object created with [`usePickerContent`](./?path=/story/base-components-collections-picker-hooks--usepickercontent)\n */\n state: UsePickerContentParams<T, F> | PickerContentState<T, F>;\n}\n\nexport type PickerContentComponentProps<\n T,\n F extends FiltersMap = OptionalFiltersMap,\n> = Omit<\n PickerContentComponentBaseProps<T, F>,\n | 'renderItem'\n | 'pickerContentState'\n | 'renderEmptyState'\n | 'hiddenItemsWarningText'\n | 'renderPickerContent'\n>;\n\nexport type PickerContentComponent<\n T,\n F extends FiltersMap = OptionalFiltersMap,\n> = ComponentType<PickerContentComponentProps<T, F>>;\n\nexport function PickerContent<T, F extends FiltersMap>(\n props: PickerContentProps<T, F>,\n) {\n const { modalState } = props;\n\n // wrap with a new WixPatternsContainer that can get initialProps\n return (\n <PickerContentProvider modalState={modalState}>\n <PickerContentWrapped\n {...props}\n renderPickerContent={({ state, renderItem }) => (\n <PickerSelectorListContent\n {...props.selectorListProps}\n state={state}\n multiple={fromMultipleSelectionToBoolean(props.multiple)}\n hasAdditionalStep={props.hasAdditionalStep}\n hiddenItemsWarningText={props.hiddenItemsWarningText}\n renderItem={renderItem}\n />\n )}\n />\n </PickerContentProvider>\n );\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAIA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,0BAAA,GAAAF,OAAA;AACA,IAAAG,aAAA,GAAAH,OAAA;AACA,IAAAI,qBAAA,GAAAJ,OAAA;AAA8D,IAAAK,YAAA;AA0CvD,SAASC,aAAaA,CAC3BC,KAA+B,EAC/B;EACA,MAAM;IAAEC;EAAW,CAAC,GAAGD,KAAK;;EAE5B;EACA,oBACET,MAAA,CAAAW,OAAA,CAAAC,aAAA,CAACT,sBAAA,CAAAU,qBAAqB;IAACH,UAAU,EAAEA,UAAW;IAAAI,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAT,YAAA;MAAAU,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAC5ClB,MAAA,CAAAW,OAAA,CAAAC,aAAA,CAACN,qBAAA,CAAAa,oBAAoB,MAAAC,SAAA,CAAAT,OAAA,MACfF,KAAK;IACTY,mBAAmB,EAAEA,CAAC;MAAEC,KAAK;MAAEC;IAAW,CAAC,kBACzCvB,MAAA,CAAAW,OAAA,CAAAC,aAAA,CAACR,0BAAA,CAAAoB,yBAAyB,MAAAJ,SAAA,CAAAT,OAAA,MACpBF,KAAK,CAACgB,iBAAiB;MAC3BH,KAAK,EAAEA,KAAM;MACbI,QAAQ,EAAE,IAAAC,4CAA8B,EAAClB,KAAK,CAACiB,QAAQ,CAAE;MACzDE,iBAAiB,EAAEnB,KAAK,CAACmB,iBAAkB;MAC3CC,sBAAsB,EAAEpB,KAAK,CAACoB,sBAAuB;MACrDN,UAAU,EAAEA,UAAW;MAAAT,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAT,YAAA;QAAAU,UAAA;QAAAC,YAAA;MAAA;IAAA,EACxB,CACD;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAT,YAAA;MAAAU,UAAA;MAAAC,YAAA;IAAA;EAAA,EACH,CACoB,CAAC;AAE5B","ignoreList":[]}
@@ -5,14 +5,14 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "PickerContent2155746736";
8
+ var _namespace_ = "PickerContent3964490514";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "PickerContent2155746736__root"
15
+ "root": "PickerContent3964490514__root"
16
16
  };
17
17
  var keyframes = exports.keyframes = {};
18
18
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/PickerContent/PickerContent.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"PickerContent2155746736\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"PickerContent2155746736__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,yBAAyB;AAC3C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAA+B,CAAC;AACtD,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/PickerContent/PickerContent.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"PickerContent3964490514\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"PickerContent3964490514__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,yBAAyB;AAC3C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAA+B,CAAC;AACtD,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -5,16 +5,16 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
5
5
  var _stylableEsmRuntime = require("../../stylable-esm-runtime.js");
6
6
  // @ts-nocheck
7
7
 
8
- var _namespace_ = "PickerContentAdditionalStep576281095";
8
+ var _namespace_ = "PickerContentAdditionalStep4288245646";
9
9
  var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
10
10
  var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
11
11
  var style = exports.style = _style_;
12
12
  var st = exports.st = _style_;
13
13
  var namespace = exports.namespace = _namespace_;
14
14
  var classes = exports.classes = {
15
- "root": "PickerContentAdditionalStep576281095__root",
16
- "titles": "PickerContentAdditionalStep576281095__titles",
17
- "suffix": "PickerContentAdditionalStep576281095__suffix"
15
+ "root": "PickerContentAdditionalStep4288245646__root",
16
+ "titles": "PickerContentAdditionalStep4288245646__titles",
17
+ "suffix": "PickerContentAdditionalStep4288245646__suffix"
18
18
  };
19
19
  var keyframes = exports.keyframes = {};
20
20
  var layers = exports.layers = {};
@@ -1 +1 @@
1
- {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/PickerContent/PickerContentAdditionalStep.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"PickerContentAdditionalStep576281095\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"PickerContentAdditionalStep576281095__root\",\"titles\":\"PickerContentAdditionalStep576281095__titles\",\"suffix\":\"PickerContentAdditionalStep576281095__suffix\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,sCAAsC;AACxD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,4CAA4C;EAAC,QAAQ,EAAC,8CAA8C;EAAC,QAAQ,EAAC;AAA8C,CAAC;AACnL,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/PickerContent/PickerContentAdditionalStep.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"PickerContentAdditionalStep4288245646\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"PickerContentAdditionalStep4288245646__root\",\"titles\":\"PickerContentAdditionalStep4288245646__titles\",\"suffix\":\"PickerContentAdditionalStep4288245646__suffix\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,uCAAuC;AACzD,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,6CAA6C;EAAC,QAAQ,EAAC,+CAA+C;EAAC,QAAQ,EAAC;AAA+C,CAAC;AACtL,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_mobxReactLite","_designSystem","_CollectionSearch","_Picker","_CollectionContext","_MaxSelection","_MaybeTooltip","_SelectAllCheckbox","_MultiCollectionSupportProvider","_PickerContentBaseWrapped","_FilterRenderingContext","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_PickerContentItemsSelection","props","modalState","primaryButtonProps","renderEmptyState","renderError","state","multiple","customContentButtonText","customContentButtonPrefixIcon","customContentButtonOnClick","customContent","showSelectAllCheckbox","enablePrimaryButton","hideSearch","renderPickerContent","customMaxSelectionLabel","renderCustomNotification","filterComponent","showSelectedCount","rest","_customContent","picker","strictFiltersOnly","collection","result","isEmptyAndNotFetching","isEmptyAfterStrictFilters","bulkSelect","translate","showInitialLoader","isEmpty","isSelectEmpty","useEffect","value","init","reachedMax","reachedMaxSelection","filterRenderingContextValue","useState","location","onCustomContentButtonClick","useCallback","onCreateNewButtonClick","renderItem","item","index","renderedItem","key","itemKey","disabled","selectedIds","includes","search","createElement","CollectionSearch","minWidthPixels","__self","__source","fileName","lineNumber","columnNumber","renderSideActions","Infinity","SelectAllCheckbox","shouldShowCustomContentButton","Box","MaybeTooltip","dataHook","content","TextButton","prefixIcon","onClick","Text","total","selectedCount","renderFiltersComponent","gap","width","FilterRenderingContextProvider","Fragment","PickerContentBaseWrapped","_extends2","secondaryButtonText","style","sideActions","CollectionProvider","display","paddingLeft","paddingRight","paddingBottom","paddingTop","showHeaderDivider","selected","BulkSelectionMaxSelectionLabel","customLabel","MultiCollectionSupportProvider","multi","Picker","hasFilterDropdown","PickerContentItemsSelection","exports","observer"],"sources":["../../../../src/components/PickerContent/PickerContentItemsSelection.tsx"],"sourcesContent":["import React, { ReactElement, useCallback, useEffect, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { CustomModalContent, PickerModalState } from '../../hooks';\nimport { ComputedQuery, FiltersMap } from '@wix/bex-core';\nimport {\n Box,\n FloatingNotification,\n FloatingNotificationProps,\n IconElement,\n Text,\n TextButton,\n} from '@wix/design-system';\nimport { CollectionSearch } from '../CollectionSearch';\nimport { Picker, PickerProps } from '../Picker';\nimport { CollectionProvider } from '../CollectionContext';\nimport {\n BulkSelectionMaxSelectionLabel,\n MaxSelectionLabelProps,\n MultipleSelection,\n reachedMaxSelection,\n} from '../MaxSelection';\nimport { PickerContentState } from '../../state';\nimport { MaybeTooltip } from '../MaybeTooltip';\nimport { PickerListItemProps } from '../PickerListItemProps';\nimport { SelectAllCheckbox } from './SelectAllCheckbox';\nimport { MultiCollectionSupportProvider } from '../MultiCollectionSupportProvider';\nimport {\n PickerContentBaseWrapped,\n PickerContentBaseWrappedProps,\n} from './PickerContentBaseWrapped';\nimport { FilterRenderingContextProvider } from '../FilterRenderingContext';\n\nexport interface PickerContentItemsSelectionProps<T, F extends FiltersMap>\n extends Partial<PickerContentBaseWrappedProps> {\n modalState: PickerModalState<T, F>;\n customContentButtonText?: string;\n customContentButtonPrefixIcon?: IconElement;\n\n /**\n * A callback to be called when the custom content button is clicked\n */\n customContentButtonOnClick?: (param: {\n onClose: (newItems?: T[]) => void;\n }) => void;\n\n customContent?: CustomModalContent<T>;\n /**\n * Shows \"Select All\" checkbox as a side action (overrides \"customContent\" prop).\n * If `multiple={number}` or `multiple={false}` are used, this prop does nothing.\n */\n showSelectAllCheckbox?: boolean;\n\n multiple?: MultipleSelection;\n\n /**\n * Shows a SingleSelectFilter component in a picker modal to filter items;\n */\n filterComponent?: ReactElement;\n /**\n * A function that render a item row in the selector list\n */\n renderItem: (item: T, index: number) => Partial<PickerListItemProps>;\n /**\n * A render function to be rendered when there're no items to show in the table.<br>\n * You can use the built in [`<CollectionEmptyState />`](./?path=/story/components-collection-features--empty-state).<br>\n * The function accepts the following parameters\n * * `hasAvailableItems`: Indicates whether other items might have been shown using other filtering / search\n * * `query`: An instance of [ComputedQuery](./?path=/story/common-models--computedquery) that represents the query that resulted with an empty state\n */\n renderEmptyState?: (params: {\n hasAvailableItems: boolean;\n query: ComputedQuery<F>;\n }) => ReactElement<any, any>;\n renderError: PickerProps<T, F>['renderError'];\n /**\n * When set to `true`, the modal primary button will be always enabled.\n */\n enablePrimaryButton?: boolean;\n /** Hides the search input of the picker */\n hideSearch?: boolean;\n /**\n * Function that returns label for multi selection like:\n * '2 items selected (24 max)`\n * This function accepts argument {num: number, max: number}\n */\n customMaxSelectionLabel?: MaxSelectionLabelProps['customLabel'];\n /**\n * Function that returns custom notification that will be displayed in the picker modal.\n * Useful to describe additional information about the selection (for instance how to increase limit of selected items).\n * @param data.selected - number of selected items\n * @param data.total - total number of items\n */\n renderCustomNotification?: (data: {\n selected?: number;\n total?: number;\n }) => ReactElement<FloatingNotificationProps, typeof FloatingNotification>;\n /** Displays count of selected items in <CustomModalLayout /> `sideActions` */\n showSelectedCount?: boolean;\n}\n\ninterface PickerContentItemsSelectionStateProps<T, F extends FiltersMap> {\n state: PickerContentState<T, F>;\n renderPickerContent: (params: {\n state: PickerContentState<T, F>;\n renderItem: PickerContentItemsSelectionProps<T, F>['renderItem'];\n }) => ReactElement;\n}\n\nexport type PickerContentItemsSelectionFullProps<\n T,\n F extends FiltersMap = FiltersMap,\n> = PickerContentItemsSelectionProps<T, F> &\n PickerContentItemsSelectionStateProps<T, F>;\n\nfunction _PickerContentItemsSelection<T, F extends FiltersMap = FiltersMap>(\n props: PickerContentItemsSelectionFullProps<T, F>,\n) {\n const {\n modalState,\n primaryButtonProps,\n renderEmptyState,\n renderError,\n state,\n multiple,\n customContentButtonText,\n customContentButtonPrefixIcon,\n customContentButtonOnClick,\n customContent,\n showSelectAllCheckbox,\n enablePrimaryButton,\n hideSearch,\n renderPickerContent,\n customMaxSelectionLabel,\n renderCustomNotification,\n filterComponent,\n showSelectedCount,\n ...rest\n } = props;\n const { _customContent } = modalState;\n\n const { picker } = state;\n\n const { strictFiltersOnly, collection } = picker;\n\n const {\n result: { isEmptyAndNotFetching: isEmptyAfterStrictFilters },\n } = strictFiltersOnly;\n\n const { bulkSelect, translate: t, showInitialLoader } = collection;\n\n const { isEmpty: isSelectEmpty } = bulkSelect;\n\n useEffect(() => {\n _customContent.value = () => customContent;\n return state.init();\n }, []);\n\n const reachedMax = reachedMaxSelection({\n collection,\n multiple,\n });\n\n const [filterRenderingContextValue] = useState(() => ({\n location: 'modal' as const,\n }));\n const onCustomContentButtonClick = useCallback(() => {\n state.onCreateNewButtonClick(customContentButtonOnClick);\n }, [customContentButtonOnClick]);\n\n const renderItem: typeof props['renderItem'] = (item, index) => {\n const renderedItem = props.renderItem(item, index);\n const key = collection.itemKey(item);\n return {\n ...renderedItem,\n disabled:\n (reachedMax && !collection.bulkSelect.selectedIds.includes(key)) ||\n renderedItem.disabled,\n };\n };\n\n const search = <CollectionSearch minWidthPixels=\"100%\" />;\n\n const renderSideActions = () => {\n if (\n showSelectAllCheckbox &&\n !showInitialLoader &&\n (multiple === true || multiple === Infinity)\n ) {\n return <SelectAllCheckbox state={state} />;\n }\n\n const shouldShowCustomContentButton =\n customContent || customContentButtonOnClick;\n\n if (shouldShowCustomContentButton) {\n return (\n <Box>\n <MaybeTooltip\n dataHook=\"custom-content-button-tooltip\"\n content={reachedMax && t('cairo.picker.createNew.button.tooltip')}\n >\n <div>\n <TextButton\n dataHook=\"custom-content-button\"\n prefixIcon={customContentButtonPrefixIcon}\n disabled={reachedMax}\n onClick={onCustomContentButtonClick}\n >\n {customContentButtonText ?? t('cairo.picker.createNew.button')}\n </TextButton>\n </div>\n </MaybeTooltip>\n </Box>\n );\n }\n if (showSelectedCount) {\n return (\n <Text dataHook=\"cairo-selected-items-count\">\n {t('cairo.selector.modal.items.selected', {\n total: collection.bulkSelect.selectedCount,\n })}\n </Text>\n );\n }\n return null;\n };\n\n const renderFiltersComponent = () => {\n return (\n <Box gap=\"12px\">\n <Box width=\"200px\">\n <FilterRenderingContextProvider value={filterRenderingContextValue}>\n {filterComponent}\n </FilterRenderingContextProvider>\n </Box>\n {!hideSearch && <>{search}</>}\n </Box>\n );\n };\n\n return (\n <PickerContentBaseWrapped\n secondaryButtonText={t('cairo.cancel.button')}\n primaryButtonProps={{\n disabled: isSelectEmpty && !enablePrimaryButton,\n ...primaryButtonProps,\n style: {\n ...primaryButtonProps?.style,\n },\n }}\n sideActions={renderSideActions()}\n {...rest}\n >\n <CollectionProvider value={picker.collection}>\n {(filterComponent || !isEmptyAfterStrictFilters) && (\n <Box\n display=\"grid\"\n paddingLeft=\"SP5\"\n paddingRight=\"SP5\"\n paddingBottom=\"SP3\"\n paddingTop={rest.showHeaderDivider ? 'SP3' : '3px'}\n gap=\"SP3\"\n >\n {filterComponent ? renderFiltersComponent() : !hideSearch && search}\n {renderCustomNotification ? (\n <span data-hook=\"custom-notification\">\n {renderCustomNotification({\n selected: collection.bulkSelect.selectedCount,\n total: collection.result.total,\n })}\n </span>\n ) : null}\n <BulkSelectionMaxSelectionLabel\n dataHook=\"selection-max-label\"\n multiple={multiple}\n customLabel={customMaxSelectionLabel}\n t={t}\n selectedCount={collection.bulkSelect.selectedCount}\n />\n </Box>\n )}\n\n <MultiCollectionSupportProvider value={picker.multi}>\n <Picker\n dataHook=\"picker\"\n state={picker}\n renderEmptyState={renderEmptyState}\n renderError={renderError}\n hasFilterDropdown={!!filterComponent}\n >\n {renderPickerContent?.({ state, renderItem })}\n </Picker>\n </MultiCollectionSupportProvider>\n </CollectionProvider>\n </PickerContentBaseWrapped>\n );\n}\nexport const PickerContentItemsSelection = observer(\n _PickerContentItemsSelection,\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AAQA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAOA,IAAAO,aAAA,GAAAP,OAAA;AAEA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,+BAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AAIA,IAAAW,uBAAA,GAAAX,OAAA;AAA2E,IAAAY,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA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lB,gBAAgB,EAAEA,gBAAiB;IACnCC,WAAW,EAAEA,WAAY;IACzB8F,iBAAiB,EAAE,CAAC,CAACjF,eAAgB;IAAAuC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAhF,YAAA;MAAAiF,UAAA;MAAAC,YAAA;IAAA;EAAA,GAEpC9C,mBAAmB,oBAAnBA,mBAAmB,CAAG;IAAET,KAAK;IAAEsC;EAAW,CAAC,CACtC,CACsB,CACd,CACI,CAAC;AAE/B;AACO,MAAMwD,2BAA2B,GAAAC,OAAA,CAAAD,2BAAA,GAAG,IAAAE,uBAAQ,EACjDtG,4BACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_mobxReactLite","_designSystem","_CollectionSearch","_Picker","_CollectionContext","_MaxSelection","_MaybeTooltip","_SelectAllCheckbox","_MultiCollectionSupportProvider","_PickerContentBaseWrapped","_FilterRenderingContext","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_PickerContentItemsSelection","props","modalState","primaryButtonProps","renderEmptyState","renderError","state","multiple","customContentButtonText","customContentButtonPrefixIcon","customContentButtonOnClick","customContent","showSelectAllCheckbox","enablePrimaryButton","hideSearch","renderPickerContent","customMaxSelectionLabel","renderCustomNotification","filterComponent","showSelectedCount","rest","_customContent","picker","strictFiltersOnly","collection","result","isEmptyAndNotFetching","isEmptyAfterStrictFilters","bulkSelect","translate","showInitialLoader","isEmpty","isSelectEmpty","useEffect","value","init","reachedMax","reachedMaxSelection","filterRenderingContextValue","useState","location","onCustomContentButtonClick","useCallback","onCreateNewButtonClick","renderItem","item","index","renderedItem","key","itemKey","disabled","selectedIds","includes","search","createElement","CollectionSearch","minWidthPixels","__self","__source","fileName","lineNumber","columnNumber","renderSideActions","Infinity","SelectAllCheckbox","shouldShowCustomContentButton","Box","MaybeTooltip","dataHook","content","TextButton","prefixIcon","onClick","Text","total","selectedCount","renderFiltersComponent","gap","width","FilterRenderingContextProvider","Fragment","PickerContentBaseWrapped","_extends2","secondaryButtonText","style","sideActions","CollectionProvider","display","paddingLeft","paddingRight","paddingBottom","paddingTop","showHeaderDivider","selected","BulkSelectionMaxSelectionLabel","customLabel","MultiCollectionSupportProvider","multi","Picker","hasFilterDropdown","PickerContentItemsSelection","exports","observer"],"sources":["../../../../src/components/PickerContent/PickerContentItemsSelection.tsx"],"sourcesContent":["import React, { ReactElement, useCallback, useEffect, useState } from 'react';\nimport { observer } from 'mobx-react-lite';\nimport { CustomModalContent, PickerModalState } from '../../hooks';\nimport { ComputedQuery, FiltersMap } from '@wix/bex-core';\nimport {\n Box,\n FloatingNotification,\n FloatingNotificationProps,\n IconElement,\n Text,\n TextButton,\n} from '@wix/design-system';\nimport { CollectionSearch } from '../CollectionSearch';\nimport { Picker, PickerProps } from '../Picker';\nimport { CollectionProvider } from '../CollectionContext';\nimport {\n BulkSelectionMaxSelectionLabel,\n MaxSelectionLabelProps,\n MultipleSelection,\n reachedMaxSelection,\n} from '../MaxSelection';\nimport { PickerContentState } from '../../state';\nimport { MaybeTooltip } from '../MaybeTooltip';\nimport { PickerListItemProps } from '../PickerListItemProps';\nimport { SelectAllCheckbox } from './SelectAllCheckbox';\nimport { MultiCollectionSupportProvider } from '../MultiCollectionSupportProvider';\nimport {\n PickerContentBaseWrapped,\n PickerContentBaseWrappedProps,\n} from './PickerContentBaseWrapped';\nimport { FilterRenderingContextProvider } from '../FilterRenderingContext';\n\nexport interface PickerContentItemsSelectionProps<T, F extends FiltersMap>\n extends Partial<PickerContentBaseWrappedProps> {\n modalState: PickerModalState<T, F>;\n customContentButtonText?: string;\n customContentButtonPrefixIcon?: IconElement;\n\n /**\n * A callback to be called when the custom content button is clicked\n */\n customContentButtonOnClick?: (param: {\n onClose: (newItems?: T[]) => void;\n }) => void;\n\n customContent?: CustomModalContent<T>;\n /**\n * Shows \"Select All\" checkbox as a side action (overrides \"customContent\" prop).\n * If `multiple={number}` or `multiple={false}` are used, this prop does nothing.\n */\n showSelectAllCheckbox?: boolean;\n\n multiple?: MultipleSelection;\n\n /**\n * Shows a SingleSelectFilter component in a picker modal to filter items;\n */\n filterComponent?: ReactElement;\n /**\n * A function that render a item row in the selector list\n */\n renderItem: (item: T, index: number) => Partial<PickerListItemProps>;\n /**\n * A render function to be rendered when there're no items to show in the table.<br>\n * You can use the built in [`<CollectionEmptyState />`](./?path=/story/features-display-empty-states--collectionemptystate).<br>\n * The function accepts the following parameters\n * * `hasAvailableItems`: Indicates whether other items might have been shown using other filtering / search\n * * `query`: An instance of [ComputedQuery](./?path=/story/common-models--computedquery) that represents the query that resulted with an empty state\n */\n renderEmptyState?: (params: {\n hasAvailableItems: boolean;\n query: ComputedQuery<F>;\n }) => ReactElement<any, any>;\n renderError: PickerProps<T, F>['renderError'];\n /**\n * When set to `true`, the modal primary button will be always enabled.\n */\n enablePrimaryButton?: boolean;\n /** Hides the search input of the picker */\n hideSearch?: boolean;\n /**\n * Function that returns label for multi selection like:\n * '2 items selected (24 max)`\n * This function accepts argument {num: number, max: number}\n */\n customMaxSelectionLabel?: MaxSelectionLabelProps['customLabel'];\n /**\n * Function that returns custom notification that will be displayed in the picker modal.\n * Useful to describe additional information about the selection (for instance how to increase limit of selected items).\n * @param data.selected - number of selected items\n * @param data.total - total number of items\n */\n renderCustomNotification?: (data: {\n selected?: number;\n total?: number;\n }) => ReactElement<FloatingNotificationProps, typeof FloatingNotification>;\n /** Displays count of selected items in <CustomModalLayout /> `sideActions` */\n showSelectedCount?: boolean;\n}\n\ninterface PickerContentItemsSelectionStateProps<T, F extends FiltersMap> {\n state: PickerContentState<T, F>;\n renderPickerContent: (params: {\n state: PickerContentState<T, F>;\n renderItem: PickerContentItemsSelectionProps<T, F>['renderItem'];\n }) => ReactElement;\n}\n\nexport type PickerContentItemsSelectionFullProps<\n T,\n F extends FiltersMap = FiltersMap,\n> = PickerContentItemsSelectionProps<T, F> &\n PickerContentItemsSelectionStateProps<T, F>;\n\nfunction _PickerContentItemsSelection<T, F extends FiltersMap = FiltersMap>(\n props: PickerContentItemsSelectionFullProps<T, F>,\n) {\n const {\n modalState,\n primaryButtonProps,\n renderEmptyState,\n renderError,\n state,\n multiple,\n customContentButtonText,\n customContentButtonPrefixIcon,\n customContentButtonOnClick,\n customContent,\n showSelectAllCheckbox,\n enablePrimaryButton,\n hideSearch,\n renderPickerContent,\n customMaxSelectionLabel,\n renderCustomNotification,\n filterComponent,\n showSelectedCount,\n ...rest\n } = props;\n const { _customContent } = modalState;\n\n const { picker } = state;\n\n const { strictFiltersOnly, collection } = picker;\n\n const {\n result: { isEmptyAndNotFetching: isEmptyAfterStrictFilters },\n } = strictFiltersOnly;\n\n const { bulkSelect, translate: t, showInitialLoader } = collection;\n\n const { isEmpty: isSelectEmpty } = bulkSelect;\n\n useEffect(() => {\n _customContent.value = () => customContent;\n return state.init();\n }, []);\n\n const reachedMax = reachedMaxSelection({\n collection,\n multiple,\n });\n\n const [filterRenderingContextValue] = useState(() => ({\n location: 'modal' as const,\n }));\n const onCustomContentButtonClick = useCallback(() => {\n state.onCreateNewButtonClick(customContentButtonOnClick);\n }, [customContentButtonOnClick]);\n\n const renderItem: typeof props['renderItem'] = (item, index) => {\n const renderedItem = props.renderItem(item, index);\n const key = collection.itemKey(item);\n return {\n ...renderedItem,\n disabled:\n (reachedMax && !collection.bulkSelect.selectedIds.includes(key)) ||\n renderedItem.disabled,\n };\n };\n\n const search = <CollectionSearch minWidthPixels=\"100%\" />;\n\n const renderSideActions = () => {\n if (\n showSelectAllCheckbox &&\n !showInitialLoader &&\n (multiple === true || multiple === Infinity)\n ) {\n return <SelectAllCheckbox state={state} />;\n }\n\n const shouldShowCustomContentButton =\n customContent || customContentButtonOnClick;\n\n if (shouldShowCustomContentButton) {\n return (\n <Box>\n <MaybeTooltip\n dataHook=\"custom-content-button-tooltip\"\n content={reachedMax && t('cairo.picker.createNew.button.tooltip')}\n >\n <div>\n <TextButton\n dataHook=\"custom-content-button\"\n prefixIcon={customContentButtonPrefixIcon}\n disabled={reachedMax}\n onClick={onCustomContentButtonClick}\n >\n {customContentButtonText ?? t('cairo.picker.createNew.button')}\n </TextButton>\n </div>\n </MaybeTooltip>\n </Box>\n );\n }\n if (showSelectedCount) {\n return (\n <Text dataHook=\"cairo-selected-items-count\">\n {t('cairo.selector.modal.items.selected', {\n total: collection.bulkSelect.selectedCount,\n })}\n </Text>\n );\n }\n return null;\n };\n\n const renderFiltersComponent = () => {\n return (\n <Box gap=\"12px\">\n <Box width=\"200px\">\n <FilterRenderingContextProvider value={filterRenderingContextValue}>\n {filterComponent}\n </FilterRenderingContextProvider>\n </Box>\n {!hideSearch && <>{search}</>}\n </Box>\n );\n };\n\n return (\n <PickerContentBaseWrapped\n secondaryButtonText={t('cairo.cancel.button')}\n primaryButtonProps={{\n disabled: isSelectEmpty && !enablePrimaryButton,\n ...primaryButtonProps,\n style: {\n ...primaryButtonProps?.style,\n },\n }}\n sideActions={renderSideActions()}\n {...rest}\n >\n <CollectionProvider value={picker.collection}>\n {(filterComponent || !isEmptyAfterStrictFilters) && (\n <Box\n display=\"grid\"\n paddingLeft=\"SP5\"\n paddingRight=\"SP5\"\n paddingBottom=\"SP3\"\n paddingTop={rest.showHeaderDivider ? 'SP3' : '3px'}\n gap=\"SP3\"\n >\n {filterComponent ? renderFiltersComponent() : !hideSearch && search}\n {renderCustomNotification ? (\n <span data-hook=\"custom-notification\">\n {renderCustomNotification({\n selected: collection.bulkSelect.selectedCount,\n total: collection.result.total,\n })}\n </span>\n ) : null}\n <BulkSelectionMaxSelectionLabel\n dataHook=\"selection-max-label\"\n multiple={multiple}\n customLabel={customMaxSelectionLabel}\n t={t}\n selectedCount={collection.bulkSelect.selectedCount}\n />\n </Box>\n )}\n\n <MultiCollectionSupportProvider value={picker.multi}>\n <Picker\n dataHook=\"picker\"\n state={picker}\n renderEmptyState={renderEmptyState}\n renderError={renderError}\n hasFilterDropdown={!!filterComponent}\n >\n {renderPickerContent?.({ state, renderItem })}\n </Picker>\n </MultiCollectionSupportProvider>\n </CollectionProvider>\n </PickerContentBaseWrapped>\n );\n}\nexport const PickerContentItemsSelection = observer(\n _PickerContentItemsSelection,\n);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAGA,IAAAE,aAAA,GAAAF,OAAA;AAQA,IAAAG,iBAAA,GAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,kBAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AAOA,IAAAO,aAAA,GAAAP,OAAA;AAEA,IAAAQ,kBAAA,GAAAR,OAAA;AACA,IAAAS,+BAAA,GAAAT,OAAA;AACA,IAAAU,yBAAA,GAAAV,OAAA;AAIA,IAAAW,uBAAA,GAAAX,OAAA;AAA2E,IAAAY,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAf,wBAAAe,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,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