@wix/patterns 1.13.0 → 1.14.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 (346) hide show
  1. package/dist/cjs/components/Collapse/Collapse.st.css.js +3 -3
  2. package/dist/cjs/components/Collapse/Collapse.st.css.js.map +1 -1
  3. package/dist/cjs/components/CollectionTable/CollectionTable.js +2 -2
  4. package/dist/cjs/components/CollectionTable/CollectionTable.js.map +1 -1
  5. package/dist/cjs/components/CollectionToolbar/CollectionToolbar.st.css.js +5 -5
  6. package/dist/cjs/components/CollectionToolbar/CollectionToolbar.st.css.js.map +1 -1
  7. package/dist/cjs/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +3 -3
  8. package/dist/cjs/components/CollectionToolbar/SearchOrCustomFilter.st.css.js.map +1 -1
  9. package/dist/cjs/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
  10. package/dist/cjs/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js.map +1 -1
  11. package/dist/cjs/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
  12. package/dist/cjs/components/CollectionViewsDropdown/ViewsDropdown.st.css.js.map +1 -1
  13. package/dist/cjs/components/CustomColumnsPanel/CustomColumnsPanelEntry.js +7 -2
  14. package/dist/cjs/components/CustomColumnsPanel/CustomColumnsPanelEntry.js.map +1 -1
  15. package/dist/cjs/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js +3 -3
  16. package/dist/cjs/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js.map +1 -1
  17. package/dist/cjs/components/DragAndDrop/CollectionDragAndDropState.js +3 -3
  18. package/dist/cjs/components/DragAndDrop/CollectionDragAndDropState.js.map +1 -1
  19. package/dist/cjs/components/DragAndDrop/DragAndDropAnnouncements.js +5 -5
  20. package/dist/cjs/components/DragAndDrop/DragAndDropAnnouncements.js.map +1 -1
  21. package/dist/cjs/components/DragAndDrop/DragAndDropState.js +3 -10
  22. package/dist/cjs/components/DragAndDrop/DragAndDropState.js.map +1 -1
  23. package/dist/cjs/components/DragAndDrop/TableDragAndDropState.js +7 -11
  24. package/dist/cjs/components/DragAndDrop/TableDragAndDropState.js.map +1 -1
  25. package/dist/cjs/components/DragHandle/DragHandle.st.css.js +2 -2
  26. package/dist/cjs/components/DragHandle/DragHandle.st.css.js.map +1 -1
  27. package/dist/cjs/components/Fade/Fade.st.css.js +2 -2
  28. package/dist/cjs/components/Fade/Fade.st.css.js.map +1 -1
  29. package/dist/cjs/components/Grid/Grid.js.map +1 -1
  30. package/dist/cjs/components/Grid/GridContent.js +7 -7
  31. package/dist/cjs/components/Grid/GridContent.js.map +1 -1
  32. package/dist/cjs/components/Grid/GridFoldersSectionsGroup.js.map +1 -1
  33. package/dist/cjs/components/Grid/GridItem.js.map +1 -1
  34. package/dist/cjs/components/Grid/GridSingleGridContent.js +5 -3
  35. package/dist/cjs/components/Grid/GridSingleGridContent.js.map +1 -1
  36. package/dist/cjs/components/Grid/renderFolderItem.js.map +1 -1
  37. package/dist/cjs/components/Grid/useGridBaseSyncProps.js +11 -0
  38. package/dist/cjs/components/Grid/useGridBaseSyncProps.js.map +1 -1
  39. package/dist/cjs/components/Grid/useRenderItem.js.map +1 -1
  40. package/dist/cjs/components/GridDragAndDropDndKit/GridDragAndDrop.js +14 -1
  41. package/dist/cjs/components/GridDragAndDropDndKit/GridDragAndDrop.js.map +1 -1
  42. package/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.js +6 -18
  43. package/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.js.map +1 -1
  44. package/dist/cjs/components/GridSections/GridSectionAndRepeater.js +7 -5
  45. package/dist/cjs/components/GridSections/GridSectionAndRepeater.js.map +1 -1
  46. package/dist/cjs/components/GridSections/GridSectionsSectionState.js +5 -2
  47. package/dist/cjs/components/GridSections/GridSectionsSectionState.js.map +1 -1
  48. package/dist/cjs/components/Heading/Heading.st.css.js +2 -2
  49. package/dist/cjs/components/Heading/Heading.st.css.js.map +1 -1
  50. package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js +2 -2
  51. package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
  52. package/dist/cjs/components/ListDragAndDrop/ListDragAndDropContext.js +6 -19
  53. package/dist/cjs/components/ListDragAndDrop/ListDragAndDropContext.js.map +1 -1
  54. package/dist/cjs/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
  55. package/dist/cjs/components/MaxHeightText/MaxHeightText.st.css.js.map +1 -1
  56. package/dist/cjs/components/MaxLines/MaxLines.st.css.js +2 -2
  57. package/dist/cjs/components/MaxLines/MaxLines.st.css.js.map +1 -1
  58. package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
  59. package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js.map +1 -1
  60. package/dist/cjs/components/MultiLevelSorting/MultiLevelSortingCTAButton.js +10 -5
  61. package/dist/cjs/components/MultiLevelSorting/MultiLevelSortingCTAButton.js.map +1 -1
  62. package/dist/cjs/components/NestedTable/NestedTable.js.map +1 -1
  63. package/dist/cjs/components/NestedTable/NestedTableRow.st.css.js +5 -5
  64. package/dist/cjs/components/NestedTable/NestedTableRow.st.css.js.map +1 -1
  65. package/dist/cjs/components/NestedTable/NestedTableWSRTable.js +16 -6
  66. package/dist/cjs/components/NestedTable/NestedTableWSRTable.js.map +1 -1
  67. package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js +33 -0
  68. package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js.map +1 -0
  69. package/dist/cjs/components/{CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js → NestedTableDragAndDrop/NestedTableDragAndDropContext.js} +14 -31
  70. package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js.map +1 -0
  71. package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js +85 -0
  72. package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js.map +1 -0
  73. package/dist/cjs/components/PageWrapper/PageWrapperBase.js +8 -5
  74. package/dist/cjs/components/PageWrapper/PageWrapperBase.js.map +1 -1
  75. package/dist/cjs/components/PickerContent/PickerContent.st.css.js +2 -2
  76. package/dist/cjs/components/PickerContent/PickerContent.st.css.js.map +1 -1
  77. package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js +4 -4
  78. package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js.map +1 -1
  79. package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
  80. package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js.map +1 -1
  81. package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
  82. package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js.map +1 -1
  83. package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js +3 -3
  84. package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js.map +1 -1
  85. package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js +2 -2
  86. package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js.map +1 -1
  87. package/dist/cjs/components/Table/TableVirtual.st.css.js +3 -3
  88. package/dist/cjs/components/Table/TableVirtual.st.css.js.map +1 -1
  89. package/dist/cjs/components/Table/useTableSyncProps.js +11 -0
  90. package/dist/cjs/components/Table/useTableSyncProps.js.map +1 -1
  91. package/dist/cjs/components/TableDragAndDrop.js +15 -2
  92. package/dist/cjs/components/TableDragAndDrop.js.map +1 -1
  93. package/dist/cjs/components/{CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js → TableDragAndDropContext/TableDragAndDropContext.js} +13 -23
  94. package/dist/cjs/components/TableDragAndDropContext/TableDragAndDropContext.js.map +1 -0
  95. package/dist/cjs/components/TableDragAndDropContext/index.js +8 -0
  96. package/dist/cjs/components/TableDragAndDropContext/index.js.map +1 -0
  97. package/dist/cjs/components/TabsFilter/TabsFilter.st.css.js +3 -3
  98. package/dist/cjs/components/TabsFilter/TabsFilter.st.css.js.map +1 -1
  99. package/dist/cjs/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js +2 -2
  100. package/dist/cjs/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js.map +1 -1
  101. package/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.st.css.js +2 -2
  102. package/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.st.css.js.map +1 -1
  103. package/dist/cjs/components/common.st.css.js +4 -4
  104. package/dist/cjs/components/common.st.css.js.map +1 -1
  105. package/dist/cjs/hooks/useColumnsSyncProps.js +10 -2
  106. package/dist/cjs/hooks/useColumnsSyncProps.js.map +1 -1
  107. package/dist/cjs/index.js +1 -1
  108. package/dist/cjs/index.js.map +1 -1
  109. package/dist/cjs/state/CustomColumnsDragAndDropState.js +16 -6
  110. package/dist/cjs/state/CustomColumnsDragAndDropState.js.map +1 -1
  111. package/dist/cjs/state/CustomColumnsState.js +2 -1
  112. package/dist/cjs/state/CustomColumnsState.js.map +1 -1
  113. package/dist/cjs/state/GridBaseState.js +6 -2
  114. package/dist/cjs/state/GridBaseState.js.map +1 -1
  115. package/dist/cjs/state/MultiLevelSortingDragAndDrop.js +15 -3
  116. package/dist/cjs/state/MultiLevelSortingDragAndDrop.js.map +1 -1
  117. package/dist/cjs/state/MultiLevelSortingState.js +2 -1
  118. package/dist/cjs/state/MultiLevelSortingState.js.map +1 -1
  119. package/dist/cjs/state/NestedTableState/NestedTableNestedModeState.js +1 -0
  120. package/dist/cjs/state/NestedTableState/NestedTableNestedModeState.js.map +1 -1
  121. package/dist/cjs/state/TableState.js +2 -9
  122. package/dist/cjs/state/TableState.js.map +1 -1
  123. package/dist/cjs/state/ToolbarCollectionState.js +0 -1
  124. package/dist/cjs/state/ToolbarCollectionState.js.map +1 -1
  125. package/dist/cjs/state/initCustomColumns.js +8 -2
  126. package/dist/cjs/state/initCustomColumns.js.map +1 -1
  127. package/dist/cjs/styles.global.css +1 -1
  128. package/dist/cjs/version.js +1 -1
  129. package/dist/cjs/version.js.map +1 -1
  130. package/dist/esm/components/Collapse/Collapse.st.css.js +2 -2
  131. package/dist/esm/components/Collapse/Collapse.st.css.js.map +1 -1
  132. package/dist/esm/components/CollectionTable/CollectionTable.js +2 -2
  133. package/dist/esm/components/CollectionTable/CollectionTable.js.map +1 -1
  134. package/dist/esm/components/CollectionToolbar/CollectionToolbar.st.css.js +2 -2
  135. package/dist/esm/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +2 -2
  136. package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
  137. package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js.map +1 -1
  138. package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
  139. package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js.map +1 -1
  140. package/dist/esm/components/CustomColumnsPanel/CustomColumnsPanelEntry.js +3 -0
  141. package/dist/esm/components/CustomColumnsPanel/CustomColumnsPanelEntry.js.map +1 -1
  142. package/dist/esm/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js +2 -2
  143. package/dist/esm/components/DragAndDrop/CollectionDragAndDropState.js +3 -3
  144. package/dist/esm/components/DragAndDrop/CollectionDragAndDropState.js.map +1 -1
  145. package/dist/esm/components/DragAndDrop/DragAndDropAnnouncements.js +4 -4
  146. package/dist/esm/components/DragAndDrop/DragAndDropAnnouncements.js.map +1 -1
  147. package/dist/esm/components/DragAndDrop/DragAndDropState.js +2 -7
  148. package/dist/esm/components/DragAndDrop/DragAndDropState.js.map +1 -1
  149. package/dist/esm/components/DragAndDrop/TableDragAndDropState.js +7 -8
  150. package/dist/esm/components/DragAndDrop/TableDragAndDropState.js.map +1 -1
  151. package/dist/esm/components/DragHandle/DragHandle.st.css.js +2 -2
  152. package/dist/esm/components/DragHandle/DragHandle.st.css.js.map +1 -1
  153. package/dist/esm/components/Fade/Fade.st.css.js +2 -2
  154. package/dist/esm/components/Grid/Grid.js.map +1 -1
  155. package/dist/esm/components/Grid/GridContent.js.map +1 -1
  156. package/dist/esm/components/Grid/GridFoldersSectionsGroup.js.map +1 -1
  157. package/dist/esm/components/Grid/GridSingleGridContent.js +2 -1
  158. package/dist/esm/components/Grid/GridSingleGridContent.js.map +1 -1
  159. package/dist/esm/components/Grid/renderFolderItem.js.map +1 -1
  160. package/dist/esm/components/Grid/useGridBaseSyncProps.js +10 -1
  161. package/dist/esm/components/Grid/useGridBaseSyncProps.js.map +1 -1
  162. package/dist/esm/components/Grid/useRenderItem.js.map +1 -1
  163. package/dist/esm/components/GridDragAndDropDndKit/GridDragAndDrop.js +11 -0
  164. package/dist/esm/components/GridDragAndDropDndKit/GridDragAndDrop.js.map +1 -1
  165. package/dist/esm/components/GridDragAndDropDndKit/GridSortableContext.js +3 -13
  166. package/dist/esm/components/GridDragAndDropDndKit/GridSortableContext.js.map +1 -1
  167. package/dist/esm/components/GridSections/GridSectionAndRepeater.js +2 -1
  168. package/dist/esm/components/GridSections/GridSectionAndRepeater.js.map +1 -1
  169. package/dist/esm/components/GridSections/GridSectionsSectionState.js +3 -2
  170. package/dist/esm/components/GridSections/GridSectionsSectionState.js.map +1 -1
  171. package/dist/esm/components/Heading/Heading.st.css.js +2 -2
  172. package/dist/esm/components/InputOverflow/InputOverflow.st.css.js +2 -2
  173. package/dist/esm/components/ListDragAndDrop/ListDragAndDropContext.js +4 -15
  174. package/dist/esm/components/ListDragAndDrop/ListDragAndDropContext.js.map +1 -1
  175. package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
  176. package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js.map +1 -1
  177. package/dist/esm/components/MaxLines/MaxLines.st.css.js +2 -2
  178. package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
  179. package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js.map +1 -1
  180. package/dist/esm/components/MultiLevelSorting/MultiLevelSortingCTAButton.js +4 -1
  181. package/dist/esm/components/MultiLevelSorting/MultiLevelSortingCTAButton.js.map +1 -1
  182. package/dist/esm/components/NestedTable/NestedTableRow.st.css.js +2 -2
  183. package/dist/esm/components/NestedTable/NestedTableWSRTable.js +9 -1
  184. package/dist/esm/components/NestedTable/NestedTableWSRTable.js.map +1 -1
  185. package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js +23 -0
  186. package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js.map +1 -0
  187. package/dist/esm/components/{CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js → NestedTableDragAndDrop/NestedTableDragAndDropContext.js} +8 -21
  188. package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js.map +1 -0
  189. package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js +61 -0
  190. package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js.map +1 -0
  191. package/dist/esm/components/PageWrapper/PageWrapperBase.js +4 -1
  192. package/dist/esm/components/PageWrapper/PageWrapperBase.js.map +1 -1
  193. package/dist/esm/components/PickerContent/PickerContent.st.css.js +2 -2
  194. package/dist/esm/components/PickerContent/PickerContentAdditionalStep.st.css.js +2 -2
  195. package/dist/esm/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
  196. package/dist/esm/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
  197. package/dist/esm/components/SkeletonCard/SkeletonCard.st.css.js +2 -2
  198. package/dist/esm/components/SlidingModal/SlidingModal.st.css.js +2 -2
  199. package/dist/esm/components/Table/TableVirtual.st.css.js +2 -2
  200. package/dist/esm/components/Table/useTableSyncProps.js +9 -0
  201. package/dist/esm/components/Table/useTableSyncProps.js.map +1 -1
  202. package/dist/esm/components/TableDragAndDrop.js +12 -2
  203. package/dist/esm/components/TableDragAndDrop.js.map +1 -1
  204. package/dist/esm/components/{CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js → TableDragAndDropContext/TableDragAndDropContext.js} +7 -18
  205. package/dist/esm/components/TableDragAndDropContext/TableDragAndDropContext.js.map +1 -0
  206. package/dist/esm/components/TableDragAndDropContext/index.js +2 -0
  207. package/dist/esm/components/TableDragAndDropContext/index.js.map +1 -0
  208. package/dist/esm/components/TabsFilter/TabsFilter.st.css.js +2 -2
  209. package/dist/esm/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js +2 -2
  210. package/dist/esm/components/ToolbarItemBox/ToolbarItemBox.st.css.js +2 -2
  211. package/dist/esm/components/common.st.css.js +2 -2
  212. package/dist/esm/components/common.st.css.js.map +1 -1
  213. package/dist/esm/hooks/useColumnsSyncProps.js +8 -2
  214. package/dist/esm/hooks/useColumnsSyncProps.js.map +1 -1
  215. package/dist/esm/index.js +1 -1
  216. package/dist/esm/index.js.map +1 -1
  217. package/dist/esm/state/CustomColumnsDragAndDropState.js +14 -4
  218. package/dist/esm/state/CustomColumnsDragAndDropState.js.map +1 -1
  219. package/dist/esm/state/CustomColumnsState.js +1 -0
  220. package/dist/esm/state/CustomColumnsState.js.map +1 -1
  221. package/dist/esm/state/GridBaseState.js +9 -5
  222. package/dist/esm/state/GridBaseState.js.map +1 -1
  223. package/dist/esm/state/MultiLevelSortingDragAndDrop.js +13 -1
  224. package/dist/esm/state/MultiLevelSortingDragAndDrop.js.map +1 -1
  225. package/dist/esm/state/MultiLevelSortingState.js +1 -0
  226. package/dist/esm/state/MultiLevelSortingState.js.map +1 -1
  227. package/dist/esm/state/NestedTableState/NestedTableNestedModeState.js +1 -0
  228. package/dist/esm/state/NestedTableState/NestedTableNestedModeState.js.map +1 -1
  229. package/dist/esm/state/TableState.js +3 -9
  230. package/dist/esm/state/TableState.js.map +1 -1
  231. package/dist/esm/state/ToolbarCollectionState.js +0 -1
  232. package/dist/esm/state/ToolbarCollectionState.js.map +1 -1
  233. package/dist/esm/state/initCustomColumns.js +3 -1
  234. package/dist/esm/state/initCustomColumns.js.map +1 -1
  235. package/dist/esm/styles.global.css +1 -1
  236. package/dist/esm/version.js +1 -1
  237. package/dist/types/components/Collapse/Collapse.st.css.d.ts.map +1 -1
  238. package/dist/types/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.d.ts.map +1 -1
  239. package/dist/types/components/CollectionViewsDropdown/ViewsDropdown.st.css.d.ts.map +1 -1
  240. package/dist/types/components/CustomColumnsPanel/CustomColumnsPanelEntry.d.ts.map +1 -1
  241. package/dist/types/components/DragAndDrop/CollectionDragAndDropState.d.ts +4 -4
  242. package/dist/types/components/DragAndDrop/CollectionDragAndDropState.d.ts.map +1 -1
  243. package/dist/types/components/DragAndDrop/DragAndDropState.d.ts +8 -6
  244. package/dist/types/components/DragAndDrop/DragAndDropState.d.ts.map +1 -1
  245. package/dist/types/components/DragAndDrop/TableDragAndDropState.d.ts +2 -3
  246. package/dist/types/components/DragAndDrop/TableDragAndDropState.d.ts.map +1 -1
  247. package/dist/types/components/DragHandle/DragHandle.st.css.d.ts.map +1 -1
  248. package/dist/types/components/Grid/Grid.d.ts +2 -2
  249. package/dist/types/components/Grid/Grid.d.ts.map +1 -1
  250. package/dist/types/components/Grid/GridContent.d.ts +3 -2
  251. package/dist/types/components/Grid/GridContent.d.ts.map +1 -1
  252. package/dist/types/components/Grid/GridFoldersSectionsGroup.d.ts +2 -2
  253. package/dist/types/components/Grid/GridFoldersSectionsGroup.d.ts.map +1 -1
  254. package/dist/types/components/Grid/GridItem.d.ts +2 -2
  255. package/dist/types/components/Grid/GridItem.d.ts.map +1 -1
  256. package/dist/types/components/Grid/GridSingleGridContent.d.ts.map +1 -1
  257. package/dist/types/components/Grid/renderFolderItem.d.ts +2 -2
  258. package/dist/types/components/Grid/renderFolderItem.d.ts.map +1 -1
  259. package/dist/types/components/Grid/useGridBaseSyncProps.d.ts +2 -2
  260. package/dist/types/components/Grid/useGridBaseSyncProps.d.ts.map +1 -1
  261. package/dist/types/components/Grid/useRenderItem.d.ts +2 -2
  262. package/dist/types/components/Grid/useRenderItem.d.ts.map +1 -1
  263. package/dist/types/components/GridDragAndDropDndKit/GridDragAndDrop.d.ts +22 -2
  264. package/dist/types/components/GridDragAndDropDndKit/GridDragAndDrop.d.ts.map +1 -1
  265. package/dist/types/components/GridDragAndDropDndKit/GridSortableContext.d.ts +10 -3
  266. package/dist/types/components/GridDragAndDropDndKit/GridSortableContext.d.ts.map +1 -1
  267. package/dist/types/components/GridSections/GridSectionAndRepeater.d.ts.map +1 -1
  268. package/dist/types/components/GridSections/GridSectionsSectionState.d.ts +1 -0
  269. package/dist/types/components/GridSections/GridSectionsSectionState.d.ts.map +1 -1
  270. package/dist/types/components/ListDragAndDrop/ListDragAndDropContext.d.ts +4 -2
  271. package/dist/types/components/ListDragAndDrop/ListDragAndDropContext.d.ts.map +1 -1
  272. package/dist/types/components/MaxHeightText/MaxHeightText.st.css.d.ts.map +1 -1
  273. package/dist/types/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.d.ts.map +1 -1
  274. package/dist/types/components/MultiLevelSorting/MultiLevelSortingCTAButton.d.ts.map +1 -1
  275. package/dist/types/components/NestedTable/NestedTable.d.ts +1 -1
  276. package/dist/types/components/NestedTable/NestedTable.d.ts.map +1 -1
  277. package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts +1 -1
  278. package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts.map +1 -1
  279. package/dist/types/components/{NestedTableDragAndDrop.d.ts → NestedTableDragAndDrop/NestedTableDragAndDrop.d.ts} +10 -1
  280. package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDrop.d.ts.map +1 -0
  281. package/dist/types/components/{CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.d.ts → NestedTableDragAndDrop/NestedTableDragAndDropContext.d.ts} +4 -4
  282. package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.d.ts.map +1 -0
  283. package/dist/types/components/{DragAndDrop → NestedTableDragAndDrop}/NestedTableDragAndDropState.d.ts +7 -5
  284. package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropState.d.ts.map +1 -0
  285. package/dist/types/components/PageWrapper/PageWrapperBase.d.ts.map +1 -1
  286. package/dist/types/components/Table/useTableSyncProps.d.ts.map +1 -1
  287. package/dist/types/components/TableDragAndDrop.d.ts +11 -2
  288. package/dist/types/components/TableDragAndDrop.d.ts.map +1 -1
  289. package/dist/types/components/{CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.d.ts → TableDragAndDropContext/TableDragAndDropContext.d.ts} +4 -4
  290. package/dist/types/components/TableDragAndDropContext/TableDragAndDropContext.d.ts.map +1 -0
  291. package/dist/types/components/TableDragAndDropContext/index.d.ts +2 -0
  292. package/dist/types/components/TableDragAndDropContext/index.d.ts.map +1 -0
  293. package/dist/types/components/TableGridSwitch/TableGridSwitchDragAndDrop.d.ts +18 -1
  294. package/dist/types/components/TableGridSwitch/TableGridSwitchDragAndDrop.d.ts.map +1 -1
  295. package/dist/types/components/common.st.css.d.ts.map +1 -1
  296. package/dist/types/hooks/useColumnsSyncProps.d.ts.map +1 -1
  297. package/dist/types/index.d.ts +1 -1
  298. package/dist/types/index.d.ts.map +1 -1
  299. package/dist/types/state/CustomColumnsDragAndDropState.d.ts +7 -3
  300. package/dist/types/state/CustomColumnsDragAndDropState.d.ts.map +1 -1
  301. package/dist/types/state/CustomColumnsState.d.ts +4 -1
  302. package/dist/types/state/CustomColumnsState.d.ts.map +1 -1
  303. package/dist/types/state/GridBaseState.d.ts +4 -2
  304. package/dist/types/state/GridBaseState.d.ts.map +1 -1
  305. package/dist/types/state/MultiLevelSortingDragAndDrop.d.ts +7 -1
  306. package/dist/types/state/MultiLevelSortingDragAndDrop.d.ts.map +1 -1
  307. package/dist/types/state/MultiLevelSortingState.d.ts +4 -1
  308. package/dist/types/state/MultiLevelSortingState.d.ts.map +1 -1
  309. package/dist/types/state/NestedTableState/NestedTableNestedModeState.d.ts +2 -0
  310. package/dist/types/state/NestedTableState/NestedTableNestedModeState.d.ts.map +1 -1
  311. package/dist/types/state/TableState.d.ts +3 -8
  312. package/dist/types/state/TableState.d.ts.map +1 -1
  313. package/dist/types/state/ToolbarCollectionState.d.ts +1 -1
  314. package/dist/types/state/ToolbarCollectionState.d.ts.map +1 -1
  315. package/dist/types/state/initCustomColumns.d.ts +8 -2
  316. package/dist/types/state/initCustomColumns.d.ts.map +1 -1
  317. package/dist/types/version.d.ts +1 -1
  318. package/package.json +3 -3
  319. package/dist/cjs/components/CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js.map +0 -1
  320. package/dist/cjs/components/CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js.map +0 -1
  321. package/dist/cjs/components/CollectionTableDragAndDropContext/index.js +0 -11
  322. package/dist/cjs/components/CollectionTableDragAndDropContext/index.js.map +0 -1
  323. package/dist/cjs/components/DragAndDrop/NestedDragAndDropState.js +0 -83
  324. package/dist/cjs/components/DragAndDrop/NestedDragAndDropState.js.map +0 -1
  325. package/dist/cjs/components/DragAndDrop/NestedTableDragAndDropState.js +0 -51
  326. package/dist/cjs/components/DragAndDrop/NestedTableDragAndDropState.js.map +0 -1
  327. package/dist/cjs/components/NestedTableDragAndDrop.js +0 -18
  328. package/dist/cjs/components/NestedTableDragAndDrop.js.map +0 -1
  329. package/dist/esm/components/CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js.map +0 -1
  330. package/dist/esm/components/CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js.map +0 -1
  331. package/dist/esm/components/CollectionTableDragAndDropContext/index.js +0 -3
  332. package/dist/esm/components/CollectionTableDragAndDropContext/index.js.map +0 -1
  333. package/dist/esm/components/DragAndDrop/NestedDragAndDropState.js +0 -60
  334. package/dist/esm/components/DragAndDrop/NestedDragAndDropState.js.map +0 -1
  335. package/dist/esm/components/DragAndDrop/NestedTableDragAndDropState.js +0 -31
  336. package/dist/esm/components/DragAndDrop/NestedTableDragAndDropState.js.map +0 -1
  337. package/dist/esm/components/NestedTableDragAndDrop.js +0 -11
  338. package/dist/esm/components/NestedTableDragAndDrop.js.map +0 -1
  339. package/dist/types/components/CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.d.ts.map +0 -1
  340. package/dist/types/components/CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.d.ts.map +0 -1
  341. package/dist/types/components/CollectionTableDragAndDropContext/index.d.ts +0 -3
  342. package/dist/types/components/CollectionTableDragAndDropContext/index.d.ts.map +0 -1
  343. package/dist/types/components/DragAndDrop/NestedDragAndDropState.d.ts +0 -17
  344. package/dist/types/components/DragAndDrop/NestedDragAndDropState.d.ts.map +0 -1
  345. package/dist/types/components/DragAndDrop/NestedTableDragAndDropState.d.ts.map +0 -1
  346. package/dist/types/components/NestedTableDragAndDrop.d.ts.map +0 -1
@@ -6,6 +6,7 @@ var _react = require("react");
6
6
  var _mobx = require("mobx");
7
7
  var _state = require("../../state");
8
8
  var _providers = require("../../providers");
9
+ var _react2 = require("@wix/bex-core/react");
9
10
  function useGridBaseSyncProps(props) {
10
11
  const {
11
12
  state,
@@ -18,6 +19,16 @@ function useGridBaseSyncProps(props) {
18
19
  const {
19
20
  scrollableContentRef
20
21
  } = (0, _providers.useScrollableContentContext)();
22
+ const {
23
+ modalsContainerRef
24
+ } = (0, _react2.usePageContext)();
25
+ (0, _react.useState)(() => {
26
+ var _props$dragAndDrop;
27
+ (_props$dragAndDrop = props.dragAndDrop) == null || _props$dragAndDrop.setStateObject({
28
+ state,
29
+ modalsContainerRef
30
+ });
31
+ });
21
32
  (0, _react.useEffect)(() => {
22
33
  const {
23
34
  collection
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_mobx","_state","_providers","useGridBaseSyncProps","props","state","renderAddItem","preset","dragAndDrop","range","layoutType","scrollableContentRef","useScrollableContentContext","useEffect","collection","scrollableContent","current","runInAction","trailingItemsCount","filter","Boolean","length","_localLimit","_localStart","start","_draggable","imagePlacement","gridSizePresets","sizePreset"],"sources":["../../../../src/components/Grid/useGridBaseSyncProps.ts"],"sourcesContent":["import { ReactElement, useEffect } from 'react';\nimport { FiltersMap } from '@wix/bex-core';\nimport { runInAction } from 'mobx';\nimport { GridBaseState, gridSizePresets, LayoutType } from '../../state';\nimport { AddItemProps } from '@wix/design-system';\nimport { DragAndDrop } from '../DragAndDrop';\nimport { useScrollableContentContext } from '../../providers';\n\nexport interface UseGridBaseSyncPropsParams<T, F extends FiltersMap> {\n state: GridBaseState<T, F>;\n preset?: 'full' | 'title' | 'empty';\n range?: { start: number; length: number };\n renderAddItem?: () => ReactElement<AddItemProps>;\n dragAndDrop?: DragAndDrop;\n imagePlacement?: 'side' | 'top';\n layoutType?: LayoutType;\n}\n\nexport function useGridBaseSyncProps<T, F extends FiltersMap>(\n props: UseGridBaseSyncPropsParams<T, F>,\n) {\n const { state, renderAddItem, preset, dragAndDrop, range, layoutType } =\n props;\n const { scrollableContentRef } = useScrollableContentContext();\n\n useEffect(() => {\n const { collection } = state;\n\n const scrollableContent = scrollableContentRef?.current;\n\n if (scrollableContent) {\n collection.scrollableContent = scrollableContent;\n }\n\n return () => {\n collection.scrollableContent = null;\n };\n }, []);\n\n useEffect(() => {\n runInAction(() => {\n state.trailingItemsCount = [renderAddItem].filter(Boolean).length;\n });\n }, [renderAddItem]);\n\n useEffect(() => {\n runInAction(() => {\n state._localLimit = range?.length;\n state._localStart = range?.start ?? 0;\n });\n }, [range]);\n\n useEffect(() => {\n runInAction(() => {\n state.preset = preset ?? 'title';\n });\n }, [preset]);\n\n useEffect(() => {\n runInAction(() => {\n state._draggable = dragAndDrop ? 'draggable' : 'none';\n });\n }, [dragAndDrop]);\n\n useEffect(() => {\n runInAction(() => {\n state.layoutType = layoutType ?? 'grid';\n });\n }, [layoutType]);\n\n useEffect(() => {\n runInAction(() => {\n if (!props.imagePlacement || !gridSizePresets[props.imagePlacement]) {\n return;\n }\n state.sizePreset = gridSizePresets[props.imagePlacement];\n });\n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iBAAW,EAAC,MAAM;MAChBZ,KAAK,CAACE,MAAM,GAAGA,MAAM,IAAI,OAAO;IAClC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,IAAAM,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChBZ,KAAK,CAACoB,UAAU,GAAGjB,WAAW,GAAG,WAAW,GAAG,MAAM;IACvD,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAEjB,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChBZ,KAAK,CAACK,UAAU,GAAGA,UAAU,IAAI,MAAM;IACzC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;EAEhB,IAAAG,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChB,IAAI,CAACb,KAAK,CAACsB,cAAc,IAAI,CAACC,sBAAe,CAACvB,KAAK,CAACsB,cAAc,CAAC,EAAE;QACnE;MACF;MACArB,KAAK,CAACuB,UAAU,GAAGD,sBAAe,CAACvB,KAAK,CAACsB,cAAc,CAAC;IAC1D,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;AACR","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","_mobx","_state","_providers","_react2","useGridBaseSyncProps","props","state","renderAddItem","preset","dragAndDrop","range","layoutType","scrollableContentRef","useScrollableContentContext","modalsContainerRef","usePageContext","useState","_props$dragAndDrop","setStateObject","useEffect","collection","scrollableContent","current","runInAction","trailingItemsCount","filter","Boolean","length","_localLimit","_localStart","start","_draggable","imagePlacement","gridSizePresets","sizePreset"],"sources":["../../../../src/components/Grid/useGridBaseSyncProps.ts"],"sourcesContent":["import { ReactElement, useEffect, useState } from 'react';\nimport { FiltersMap } from '@wix/bex-core';\nimport { runInAction } from 'mobx';\nimport { GridBaseState, gridSizePresets, LayoutType } from '../../state';\nimport { AddItemProps } from '@wix/design-system';\nimport { useScrollableContentContext } from '../../providers';\nimport { GridDragAndDrop } from '../GridDragAndDropDndKit/GridDragAndDrop';\nimport { usePageContext } from '@wix/bex-core/react';\n\nexport interface UseGridBaseSyncPropsParams<T, F extends FiltersMap> {\n state: GridBaseState<T, F>;\n preset?: 'full' | 'title' | 'empty';\n range?: { start: number; length: number };\n renderAddItem?: () => ReactElement<AddItemProps>;\n dragAndDrop?: typeof GridDragAndDrop;\n imagePlacement?: 'side' | 'top';\n layoutType?: LayoutType;\n}\n\nexport function useGridBaseSyncProps<T, F extends FiltersMap>(\n props: UseGridBaseSyncPropsParams<T, F>,\n) {\n const { state, renderAddItem, preset, dragAndDrop, range, layoutType } =\n props;\n const { scrollableContentRef } = useScrollableContentContext();\n const { modalsContainerRef } = usePageContext();\n\n useState(() => {\n props.dragAndDrop?.setStateObject({\n state,\n modalsContainerRef,\n });\n });\n\n useEffect(() => {\n const { collection } = state;\n\n const scrollableContent = scrollableContentRef?.current;\n\n if (scrollableContent) {\n collection.scrollableContent = scrollableContent;\n }\n\n return () => {\n collection.scrollableContent = null;\n };\n }, []);\n\n useEffect(() => {\n runInAction(() => {\n state.trailingItemsCount = [renderAddItem].filter(Boolean).length;\n });\n }, [renderAddItem]);\n\n useEffect(() => {\n runInAction(() => {\n state._localLimit = range?.length;\n state._localStart = range?.start ?? 0;\n });\n }, [range]);\n\n useEffect(() => {\n runInAction(() => {\n state.preset = preset ?? 'title';\n });\n }, [preset]);\n\n useEffect(() => {\n runInAction(() => {\n state._draggable = dragAndDrop ? 'draggable' : 'none';\n });\n }, [dragAndDrop]);\n\n useEffect(() => {\n runInAction(() => {\n state.layoutType = layoutType ?? 'grid';\n });\n }, [layoutType]);\n\n useEffect(() => {\n runInAction(() => {\n if (!props.imagePlacement || !gridSizePresets[props.imagePlacement]) {\n return;\n }\n state.sizePreset = gridSizePresets[props.imagePlacement];\n });\n }, []);\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAA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AAK,CAACsB,WAAW,GAAGlB,KAAK,oBAALA,KAAK,CAAEiB,MAAM;MACjCrB,KAAK,CAACuB,WAAW,GAAG,CAAAnB,KAAK,oBAALA,KAAK,CAAEoB,KAAK,KAAI,CAAC;IACvC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACpB,KAAK,CAAC,CAAC;EAEX,IAAAS,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChBjB,KAAK,CAACE,MAAM,GAAGA,MAAM,IAAI,OAAO;IAClC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,IAAAW,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChBjB,KAAK,CAACyB,UAAU,GAAGtB,WAAW,GAAG,WAAW,GAAG,MAAM;IACvD,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAEjB,IAAAU,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChBjB,KAAK,CAACK,UAAU,GAAGA,UAAU,IAAI,MAAM;IACzC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,UAAU,CAAC,CAAC;EAEhB,IAAAQ,gBAAS,EAAC,MAAM;IACd,IAAAI,iBAAW,EAAC,MAAM;MAChB,IAAI,CAAClB,KAAK,CAAC2B,cAAc,IAAI,CAACC,sBAAe,CAAC5B,KAAK,CAAC2B,cAAc,CAAC,EAAE;QACnE;MACF;MACA1B,KAAK,CAAC4B,UAAU,GAAGD,sBAAe,CAAC5B,KAAK,CAAC2B,cAAc,CAAC;IAC1D,CAAC,CAAC;EACJ,CAAC,EAAE,EAAE,CAAC;AACR","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_GridItem","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useRenderItem","params","renderItem","state","renderAddItem","dragAndDrop","actionCell","preset","useCallback","index","itemKey","_itemKey","index2d","createElement","GridItem","rowIndex","columnIndex","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/Grid/useRenderItem.tsx"],"sourcesContent":["import React, { ReactElement, useCallback } from 'react';\nimport { RenderItem } from './RenderItem';\nimport { SupportedCardGalleryItemProps } from './SupportedCardGalleryItemProps';\nimport { GridBaseState } from '../../state';\nimport { FiltersMap } from '@wix/bex-core';\nimport { AddItemProps } from '@wix/design-system';\nimport { DragAndDrop } from '../DragAndDrop';\nimport { ActionCell } from '../ActionCell';\nimport { GridItem } from './GridItem';\n\nexport interface UseRenderItemParams<T, F extends FiltersMap> {\n preset?: 'full' | 'title' | 'empty';\n\n renderItem?: (\n item: T,\n index: number,\n ) => Partial<SupportedCardGalleryItemProps>;\n\n state: GridBaseState<T, F>;\n\n renderAddItem?: () => ReactElement<AddItemProps>;\n\n actionCell?: ActionCell<T, F>;\n\n dragAndDrop?: DragAndDrop;\n}\n\nexport function useRenderItem<T, F extends FiltersMap>(\n params: UseRenderItemParams<T, F>,\n) {\n const {\n renderItem,\n state,\n renderAddItem,\n dragAndDrop,\n actionCell,\n preset = 'title',\n } = params;\n\n return useCallback<RenderItem>(\n (index, { itemKey: _itemKey, index2d } = {}) => (\n <GridItem\n state={state}\n index={index}\n rowIndex={index2d?.rowIndex}\n columnIndex={index2d?.columnIndex}\n renderItem={renderItem}\n actionCell={actionCell}\n renderAddItem={renderAddItem}\n dragAndDrop={dragAndDrop}\n preset={preset}\n />\n ),\n [renderItem, actionCell, renderAddItem, dragAndDrop, preset],\n );\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAQA,IAAAC,SAAA,GAAAD,OAAA;AAAsC,IAAAE,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,O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EAAQ,CAAC,GAAG,CAAC,CAAC,kBACzCrC,MAAA,CAAAW,OAAA,CAAA2B,aAAA,CAACnC,SAAA,CAAAoC,QAAQ;IACPX,KAAK,EAAEA,KAAM;IACbM,KAAK,EAAEA,KAAM;IACbM,QAAQ,EAAEH,OAAO,oBAAPA,OAAO,CAAEG,QAAS;IAC5BC,WAAW,EAAEJ,OAAO,oBAAPA,OAAO,CAAEI,WAAY;IAClCd,UAAU,EAAEA,UAAW;IACvBI,UAAU,EAAEA,UAAW;IACvBF,aAAa,EAAEA,aAAc;IAC7BC,WAAW,EAAEA,WAAY;IACzBE,MAAM,EAAEA,MAAO;IAAAU,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAxC,YAAA;MAAAyC,UAAA;MAAAC,YAAA;IAAA;EAAA,CAChB,CACF,EACD,CAACnB,UAAU,EAAEI,UAAU,EAAEF,aAAa,EAAEC,WAAW,EAAEE,MAAM,CAC7D,CAAC;AACH","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_GridItem","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useRenderItem","params","renderItem","state","renderAddItem","dragAndDrop","actionCell","preset","useCallback","index","itemKey","_itemKey","index2d","createElement","GridItem","rowIndex","columnIndex","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/Grid/useRenderItem.tsx"],"sourcesContent":["import React, { ReactElement, useCallback } from 'react';\nimport { RenderItem } from './RenderItem';\nimport { SupportedCardGalleryItemProps } from './SupportedCardGalleryItemProps';\nimport { GridBaseState } from '../../state';\nimport { FiltersMap } from '@wix/bex-core';\nimport { AddItemProps } from '@wix/design-system';\nimport { ActionCell } from '../ActionCell';\nimport { GridItem } from './GridItem';\nimport { GridDragAndDrop } from '../GridDragAndDropDndKit/GridDragAndDrop';\n\nexport interface UseRenderItemParams<T, F extends FiltersMap> {\n preset?: 'full' | 'title' | 'empty';\n\n renderItem?: (\n item: T,\n index: number,\n ) => Partial<SupportedCardGalleryItemProps>;\n\n state: GridBaseState<T, F>;\n\n renderAddItem?: () => ReactElement<AddItemProps>;\n\n actionCell?: ActionCell<T, F>;\n\n dragAndDrop?: typeof GridDragAndDrop;\n}\n\nexport function useRenderItem<T, F extends FiltersMap>(\n params: UseRenderItemParams<T, F>,\n) {\n const {\n renderItem,\n state,\n renderAddItem,\n dragAndDrop,\n actionCell,\n preset = 'title',\n } = params;\n\n return useCallback<RenderItem>(\n (index, { itemKey: _itemKey, index2d } = {}) => (\n <GridItem\n state={state}\n index={index}\n rowIndex={index2d?.rowIndex}\n columnIndex={index2d?.columnIndex}\n renderItem={renderItem}\n actionCell={actionCell}\n renderAddItem={renderAddItem}\n dragAndDrop={dragAndDrop}\n preset={preset}\n />\n ),\n [renderItem, actionCell, renderAddItem, dragAndDrop, preset],\n );\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAOA,IAAAC,SAAA,GAAAD,OAAA;AAAsC,IAAAE,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,SAAAL,wBAAAK,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,GAA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AyC,UAAA;MAAAC,YAAA;IAAA;EAAA,CAChB,CACF,EACD,CAACnB,UAAU,EAAEI,UAAU,EAAEF,aAAa,EAAEC,WAAW,EAAEE,MAAM,CAC7D,CAAC;AACH","ignoreList":[]}
@@ -5,9 +5,22 @@ exports.GridDragAndDrop = void 0;
5
5
  var _GridSortableContext = require("./GridSortableContext");
6
6
  var _GridDraggableCardItem = require("./GridDraggableCardItem");
7
7
  var _DraggableCardOverlay = require("./DraggableCardOverlay");
8
+ var _DragAndDrop = require("../DragAndDrop");
9
+ function setStateObject({
10
+ state,
11
+ modalsContainerRef
12
+ }) {
13
+ state.collectionDragAndDropState ?? (state.collectionDragAndDropState = new _DragAndDrop.CollectionDragAndDropState({
14
+ state,
15
+ a11yContainer: modalsContainerRef,
16
+ container: state.container
17
+ }));
18
+ state.toolbar._dnd = state.collectionDragAndDropState.dnd;
19
+ }
8
20
  const GridDragAndDrop = exports.GridDragAndDrop = {
9
21
  SortableContext: _GridSortableContext.GridSortableContext,
10
22
  DraggableCard: _GridDraggableCardItem.GridDraggableCardItem,
11
- DraggableCardOverlay: _DraggableCardOverlay.DraggableCardOverlay
23
+ DraggableCardOverlay: _DraggableCardOverlay.DraggableCardOverlay,
24
+ setStateObject
12
25
  };
13
26
  //# sourceMappingURL=GridDragAndDrop.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_GridSortableContext","require","_GridDraggableCardItem","_DraggableCardOverlay","GridDragAndDrop","exports","SortableContext","GridSortableContext","DraggableCard","GridDraggableCardItem","DraggableCardOverlay"],"sources":["../../../../src/components/GridDragAndDropDndKit/GridDragAndDrop.ts"],"sourcesContent":["import { GridSortableContext } from './GridSortableContext';\nimport { GridDraggableCardItem } from './GridDraggableCardItem';\nimport { DraggableCardOverlay } from './DraggableCardOverlay';\n\nimport { DragAndDrop } from '../DragAndDrop';\n\nexport const GridDragAndDrop: DragAndDrop = {\n SortableContext: GridSortableContext,\n DraggableCard: GridDraggableCardItem,\n DraggableCardOverlay,\n};\n"],"mappings":";;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAIO,MAAMG,eAA4B,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC1CE,eAAe,EAAEC,wCAAmB;EACpCC,aAAa,EAAEC,4CAAqB;EACpCC,oBAAoB,EAApBA;AACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_GridSortableContext","require","_GridDraggableCardItem","_DraggableCardOverlay","_DragAndDrop","setStateObject","state","modalsContainerRef","collectionDragAndDropState","CollectionDragAndDropState","a11yContainer","container","toolbar","_dnd","dnd","GridDragAndDrop","exports","SortableContext","GridSortableContext","DraggableCard","GridDraggableCardItem","DraggableCardOverlay"],"sources":["../../../../src/components/GridDragAndDropDndKit/GridDragAndDrop.ts"],"sourcesContent":["import { GridSortableContext } from './GridSortableContext';\nimport { GridDraggableCardItem } from './GridDraggableCardItem';\nimport { DraggableCardOverlay } from './DraggableCardOverlay';\n\nimport { CollectionDragAndDropState, DragAndDropState } from '../DragAndDrop';\nimport { FiltersMap } from '@wix/bex-core';\nimport { GridBaseState } from '../../state';\n\nfunction setStateObject<T, F extends FiltersMap>({\n state,\n modalsContainerRef,\n}: {\n state: GridBaseState<T, F>;\n modalsContainerRef: {\n current: HTMLElement | null | undefined;\n };\n}) {\n state.collectionDragAndDropState ??= new CollectionDragAndDropState({\n state,\n a11yContainer: modalsContainerRef,\n container: state.container,\n });\n state.toolbar._dnd = state.collectionDragAndDropState.dnd as DragAndDropState<\n unknown,\n any\n >;\n}\n\nexport const GridDragAndDrop = {\n SortableContext: GridSortableContext,\n DraggableCard: GridDraggableCardItem,\n DraggableCardOverlay,\n setStateObject,\n};\n"],"mappings":";;;;AAAA,IAAAA,oBAAA,GAAAC,OAAA;AACA,IAAAC,sBAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAF,OAAA;AAEA,IAAAG,YAAA,GAAAH,OAAA;AAIA,SAASI,cAAcA,CAA0B;EAC/CC,KAAK;EACLC;AAMF,CAAC,EAAE;EACDD,KAAK,CAACE,0BAA0B,KAAhCF,KAAK,CAACE,0BAA0B,GAAK,IAAIC,uCAA0B,CAAC;IAClEH,KAAK;IACLI,aAAa,EAAEH,kBAAkB;IACjCI,SAAS,EAAEL,KAAK,CAACK;EACnB,CAAC,CAAC;EACFL,KAAK,CAACM,OAAO,CAACC,IAAI,GAAGP,KAAK,CAACE,0BAA0B,CAACM,GAGrD;AACH;AAEO,MAAMC,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG;EAC7BE,eAAe,EAAEC,wCAAmB;EACpCC,aAAa,EAAEC,4CAAqB;EACpCC,oBAAoB,EAApBA,0CAAoB;EACpBhB;AACF,CAAC","ignoreList":[]}
@@ -8,8 +8,6 @@ var _sortable = require("@wix/wix-style-react-incubator/dnd-kit/sortable");
8
8
  var _modifiers = require("@wix/wix-style-react-incubator/dnd-kit/modifiers");
9
9
  var _CollectionContext = require("../CollectionContext");
10
10
  var _mobxReactLite = require("mobx-react-lite");
11
- var _react2 = require("@wix/bex-core/react");
12
- var _DragAndDrop = require("../DragAndDrop");
13
11
  var _sortableGridKeyboardCoordinates = require("./sortableGridKeyboardCoordinates");
14
12
  var _DragAndDropAnnouncements = require("../DragAndDrop/DragAndDropAnnouncements");
15
13
  var _jsxFileName = "/home/builduser/work/db7ea24852bc3350/packages/cairo/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.tsx";
@@ -22,21 +20,13 @@ function _GridSortableContext(props) {
22
20
  onSubmit,
23
21
  onCancel
24
22
  } = props;
25
- const container = (0, _react2.useWixPatternsContainer)();
26
- const {
27
- modalsContainerRef
28
- } = (0, _react2.usePageContext)();
29
23
  const collection = (0, _CollectionContext.useCollectionContext)();
30
24
  const {
31
25
  result: {
32
26
  keyedItems
33
27
  }
34
28
  } = collection;
35
- const [state] = (0, _react.useState)(() => new _DragAndDrop.CollectionDragAndDropState({
36
- state: grid,
37
- container,
38
- a11yContainer: modalsContainerRef == null ? void 0 : modalsContainerRef.current
39
- }));
29
+ const state = grid.collectionDragAndDropState;
40
30
  const pointerSensor = (0, _core.useSensor)(_core.PointerSensor, {
41
31
  activationConstraint: state.dnd.activationConstraint
42
32
  });
@@ -50,9 +40,7 @@ function _GridSortableContext(props) {
50
40
 
51
41
  // in jsdom we mock drag-and-drop by setting a custom events to draggable elements
52
42
  const sensors = (0, _core.useSensors)(...(process.env.NODE_ENV === 'test' ? [] : [pointerSensor, keyboardSensor]));
53
- (0, _react.useEffect)(() => state.init({
54
- a11yContainer: modalsContainerRef == null ? void 0 : modalsContainerRef.current
55
- }), []);
43
+ (0, _react.useEffect)(() => state.init(), []);
56
44
  state.dnd.onSubmit = onSubmit;
57
45
  state.dnd.onCancel = onCancel;
58
46
  return /*#__PURE__*/_react.default.createElement(_core.DndContext, {
@@ -67,7 +55,7 @@ function _GridSortableContext(props) {
67
55
  }
68
56
  },
69
57
  accessibility: {
70
- container: state.dnd.a11yContainer,
58
+ container: state.dnd.a11yContainerRef.current,
71
59
  announcements: state.dnd.nullAnnouncements,
72
60
  screenReaderInstructions: {
73
61
  draggable: ''
@@ -95,7 +83,7 @@ function _GridSortableContext(props) {
95
83
  __self: this,
96
84
  __source: {
97
85
  fileName: _jsxFileName,
98
- lineNumber: 79,
86
+ lineNumber: 74,
99
87
  columnNumber: 5
100
88
  }
101
89
  }, /*#__PURE__*/_react.default.createElement(_sortable.SortableContext, {
@@ -104,7 +92,7 @@ function _GridSortableContext(props) {
104
92
  __self: this,
105
93
  __source: {
106
94
  fileName: _jsxFileName,
107
- lineNumber: 117,
95
+ lineNumber: 114,
108
96
  columnNumber: 7
109
97
  }
110
98
  }, children, /*#__PURE__*/_react.default.createElement(_DragAndDropAnnouncements.DragAndDropAnnouncements, {
@@ -113,7 +101,7 @@ function _GridSortableContext(props) {
113
101
  __self: this,
114
102
  __source: {
115
103
  fileName: _jsxFileName,
116
- lineNumber: 119,
104
+ lineNumber: 116,
117
105
  columnNumber: 9
118
106
  }
119
107
  })));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_core","_sortable","_modifiers","_CollectionContext","_mobxReactLite","_react2","_DragAndDrop","_sortableGridKeyboardCoordinates","_DragAndDropAnnouncements","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_GridSortableContext","props","state","grid","children","onSubmit","onCancel","container","useWixPatternsContainer","modalsContainerRef","usePageContext","collection","useCollectionContext","result","keyedItems","useState","CollectionDragAndDropState","a11yContainer","current","pointerSensor","useSensor","PointerSensor","activationConstraint","dnd","coordinateGetter","sortableGridKeyboardCoordinates","containerDistanceThreshold","keyboardSensor","KeyboardSensor","keyboardCodes","sensors","useSensors","process","env","NODE_ENV","useEffect","init","createElement","DndContext","autoScroll","activator","AutoScrollActivator","DraggableRect","freeze","acceleration","threshold","y","x","accessibility","announcements","nullAnnouncements","screenReaderInstructions","draggable","restoreFocus","collisionDetection","closestCenter","modifiers","restrictToWindowEdges","cancelDrop","ev","beforeDrop","onDragStart","onDragMove","onDragEnd","onDragCancel","onDragOver","__self","__source","fileName","lineNumber","columnNumber","SortableContext","items","strategy","rectSortingStrategy","DragAndDropAnnouncements","dataHook","GridSortableContext","exports","observer"],"sources":["../../../../src/components/GridDragAndDropDndKit/GridSortableContext.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport {\n AutoScrollActivator,\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@wix/wix-style-react-incubator/dnd-kit/core';\nimport {\n rectSortingStrategy,\n SortableContext,\n} from '@wix/wix-style-react-incubator/dnd-kit/sortable';\nimport { restrictToWindowEdges } from '@wix/wix-style-react-incubator/dnd-kit/modifiers';\nimport { useCollectionContext } from '../CollectionContext';\nimport { observer } from 'mobx-react-lite';\nimport { FiltersMap } from '@wix/bex-core';\nimport { useWixPatternsContainer, usePageContext } from '@wix/bex-core/react';\nimport {\n CollectionDragAndDropState,\n SortableContextProps,\n} from '../DragAndDrop';\nimport { sortableGridKeyboardCoordinates } from './sortableGridKeyboardCoordinates';\nimport { DragAndDropAnnouncements } from '../DragAndDrop/DragAndDropAnnouncements';\n\nfunction _GridSortableContext<T, F extends FiltersMap>(\n props: SortableContextProps<T, F>,\n) {\n const { state: grid, children, onSubmit, onCancel } = props;\n\n const container = useWixPatternsContainer();\n const { modalsContainerRef } = usePageContext();\n\n const collection = useCollectionContext();\n const {\n result: { keyedItems },\n } = collection;\n\n const [state] = useState(\n () =>\n new CollectionDragAndDropState({\n state: grid,\n container,\n a11yContainer: modalsContainerRef?.current,\n }),\n );\n\n const pointerSensor = useSensor(PointerSensor, {\n activationConstraint: state.dnd.activationConstraint,\n });\n\n const [coordinateGetter] = useState(() =>\n sortableGridKeyboardCoordinates({ containerDistanceThreshold: 0.1 }),\n );\n\n const keyboardSensor = useSensor(KeyboardSensor, {\n keyboardCodes: state.dnd.keyboardCodes,\n coordinateGetter,\n });\n\n // in jsdom we mock drag-and-drop by setting a custom events to draggable elements\n const sensors = useSensors(\n ...(process.env.NODE_ENV === 'test' ? [] : [pointerSensor, keyboardSensor]),\n );\n\n useEffect(\n () =>\n state.init({\n a11yContainer: modalsContainerRef?.current,\n }),\n [],\n );\n\n state.dnd.onSubmit = onSubmit;\n state.dnd.onCancel = onCancel;\n\n return (\n <DndContext\n sensors={sensors}\n autoScroll={{\n activator: AutoScrollActivator.DraggableRect,\n freeze: true,\n acceleration: 4,\n threshold: {\n y: 0.01,\n x: 0.2,\n },\n }}\n accessibility={{\n container: state.dnd.a11yContainer as HTMLElement | undefined,\n announcements: state.dnd.nullAnnouncements,\n screenReaderInstructions: {\n draggable: '',\n },\n restoreFocus: false,\n }}\n collisionDetection={closestCenter}\n modifiers={[restrictToWindowEdges]}\n cancelDrop={(ev) => state.dnd.beforeDrop(ev)}\n onDragStart={(ev) => {\n state.dnd.onDragStart(ev);\n }}\n onDragMove={(ev) => {\n state.dnd.onDragMove(ev);\n }}\n onDragEnd={(ev) => {\n state.dnd.onDragEnd(ev);\n }}\n onDragCancel={() => {\n state.dnd.onDragCancel();\n }}\n onDragOver={(ev) => {\n state.dnd.onDragOver(ev);\n }}\n >\n <SortableContext items={keyedItems} strategy={rectSortingStrategy}>\n {children}\n <DragAndDropAnnouncements\n state={state.dnd}\n dataHook=\"grid-dnd-live-region\"\n />\n </SortableContext>\n </DndContext>\n );\n}\n\nexport const GridSortableContext = observer(_GridSortableContext);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AAIA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAEA,IAAAM,OAAA,GAAAN,OAAA;AACA,IAAAO,YAAA,GAAAP,OAAA;AAIA,IAAAQ,gCAAA,GAAAR,OAAA;AACA,IAAAS,yBAAA,GAAAT,OAAA;AAAmF,IAAAU,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,SAAAb,wBAAAa,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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,UAAA;MAAAC,YAAA;IAAA;EAAA,CAChC,CACc,CACP,CAAC;AAEjB;AAEO,MAAMO,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,uBAAQ,EAAC/E,oBAAoB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_core","_sortable","_modifiers","_CollectionContext","_mobxReactLite","_sortableGridKeyboardCoordinates","_DragAndDropAnnouncements","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_GridSortableContext","props","state","grid","children","onSubmit","onCancel","collection","useCollectionContext","result","keyedItems","collectionDragAndDropState","pointerSensor","useSensor","PointerSensor","activationConstraint","dnd","coordinateGetter","useState","sortableGridKeyboardCoordinates","containerDistanceThreshold","keyboardSensor","KeyboardSensor","keyboardCodes","sensors","useSensors","process","env","NODE_ENV","useEffect","init","createElement","DndContext","autoScroll","activator","AutoScrollActivator","DraggableRect","freeze","acceleration","threshold","y","x","accessibility","container","a11yContainerRef","current","announcements","nullAnnouncements","screenReaderInstructions","draggable","restoreFocus","collisionDetection","closestCenter","modifiers","restrictToWindowEdges","cancelDrop","ev","beforeDrop","onDragStart","onDragMove","onDragEnd","onDragCancel","onDragOver","__self","__source","fileName","lineNumber","columnNumber","SortableContext","items","strategy","rectSortingStrategy","DragAndDropAnnouncements","dataHook","GridSortableContext","exports","observer"],"sources":["../../../../src/components/GridDragAndDropDndKit/GridSortableContext.tsx"],"sourcesContent":["import React, { ReactNode, useEffect, useState } from 'react';\nimport {\n AutoScrollActivator,\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@wix/wix-style-react-incubator/dnd-kit/core';\nimport {\n rectSortingStrategy,\n SortableContext,\n} from '@wix/wix-style-react-incubator/dnd-kit/sortable';\nimport { restrictToWindowEdges } from '@wix/wix-style-react-incubator/dnd-kit/modifiers';\nimport { useCollectionContext } from '../CollectionContext';\nimport { observer } from 'mobx-react-lite';\nimport { FiltersMap } from '@wix/bex-core';\nimport {\n CollectionDragAndDropState,\n DragAndDropCancel,\n DragAndDropSubmit,\n} from '../DragAndDrop';\nimport { sortableGridKeyboardCoordinates } from './sortableGridKeyboardCoordinates';\nimport { DragAndDropAnnouncements } from '../DragAndDrop/DragAndDropAnnouncements';\nimport { GridBaseState } from '../../state';\n\nexport interface GridSortableContextProps<T, F extends FiltersMap> {\n state: GridBaseState<T, F>;\n children?: ReactNode;\n onSubmit?: DragAndDropSubmit<T, F>;\n onCancel?: DragAndDropCancel<T, F>;\n}\n\nfunction _GridSortableContext<T, F extends FiltersMap>(\n props: GridSortableContextProps<T, F>,\n) {\n const { state: grid, children, onSubmit, onCancel } = props;\n\n const collection = useCollectionContext();\n const {\n result: { keyedItems },\n } = collection;\n\n const state = grid.collectionDragAndDropState as CollectionDragAndDropState<\n T,\n F\n >;\n\n const pointerSensor = useSensor(PointerSensor, {\n activationConstraint: state.dnd.activationConstraint,\n });\n\n const [coordinateGetter] = useState(() =>\n sortableGridKeyboardCoordinates({ containerDistanceThreshold: 0.1 }),\n );\n\n const keyboardSensor = useSensor(KeyboardSensor, {\n keyboardCodes: state.dnd.keyboardCodes,\n coordinateGetter,\n });\n\n // in jsdom we mock drag-and-drop by setting a custom events to draggable elements\n const sensors = useSensors(\n ...(process.env.NODE_ENV === 'test' ? [] : [pointerSensor, keyboardSensor]),\n );\n\n useEffect(() => state.init(), []);\n\n state.dnd.onSubmit = onSubmit;\n state.dnd.onCancel = onCancel;\n\n return (\n <DndContext\n sensors={sensors}\n autoScroll={{\n activator: AutoScrollActivator.DraggableRect,\n freeze: true,\n acceleration: 4,\n threshold: {\n y: 0.01,\n x: 0.2,\n },\n }}\n accessibility={{\n container: state.dnd.a11yContainerRef.current as\n | HTMLElement\n | undefined,\n announcements: state.dnd.nullAnnouncements,\n screenReaderInstructions: {\n draggable: '',\n },\n restoreFocus: false,\n }}\n collisionDetection={closestCenter}\n modifiers={[restrictToWindowEdges]}\n cancelDrop={(ev) => state.dnd.beforeDrop(ev)}\n onDragStart={(ev) => {\n state.dnd.onDragStart(ev);\n }}\n onDragMove={(ev) => {\n state.dnd.onDragMove(ev);\n }}\n onDragEnd={(ev) => {\n state.dnd.onDragEnd(ev);\n }}\n onDragCancel={() => {\n state.dnd.onDragCancel();\n }}\n onDragOver={(ev) => {\n state.dnd.onDragOver(ev);\n }}\n >\n <SortableContext items={keyedItems} strategy={rectSortingStrategy}>\n {children}\n <DragAndDropAnnouncements\n state={state.dnd}\n dataHook=\"grid-dnd-live-region\"\n />\n </SortableContext>\n </DndContext>\n );\n}\n\nexport const GridSortableContext = observer(_GridSortableContext);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AAIA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,cAAA,GAAAL,OAAA;AAOA,IAAAM,gCAAA,GAAAN,OAAA;AACA,IAAAO,yBAAA,GAAAP,OAAA;AAAmF,IAAAQ,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,SAAAX,wBAAAW,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,UAAA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H,EAAE,IAAK;MAClBtD,KAAK,CAACc,GAAG,CAAC2C,UAAU,CAACH,EAAE,CAAC;IAC1B,CAAE;IACFI,SAAS,EAAGJ,EAAE,IAAK;MACjBtD,KAAK,CAACc,GAAG,CAAC4C,SAAS,CAACJ,EAAE,CAAC;IACzB,CAAE;IACFK,YAAY,EAAEA,CAAA,KAAM;MAClB3D,KAAK,CAACc,GAAG,CAAC6C,YAAY,CAAC,CAAC;IAC1B,CAAE;IACFC,UAAU,EAAGN,EAAE,IAAK;MAClBtD,KAAK,CAACc,GAAG,CAAC8C,UAAU,CAACN,EAAE,CAAC;IAC1B,CAAE;IAAAO,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAtF,YAAA;MAAAuF,UAAA;MAAAC,YAAA;IAAA;EAAA,gBAEFlG,MAAA,CAAAiB,OAAA,CAAA6C,aAAA,CAAC1D,SAAA,CAAA+F,eAAe;IAACC,KAAK,EAAE3D,UAAW;IAAC4D,QAAQ,EAAEC,6BAAoB;IAAAR,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAtF,YAAA;MAAAuF,UAAA;MAAAC,YAAA;IAAA;EAAA,GAC/D/D,QAAQ,eACTnC,MAAA,CAAAiB,OAAA,CAAA6C,aAAA,CAACrD,yBAAA,CAAA8F,wBAAwB;IACvBtE,KAAK,EAAEA,KAAK,CAACc,GAAI;IACjByD,QAAQ,EAAC,sBAAsB;IAAAV,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAtF,YAAA;MAAAuF,UAAA;MAAAC,YAAA;IAAA;EAAA,CAChC,CACc,CACP,CAAC;AAEjB;AAEO,MAAMO,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,uBAAQ,EAAC5E,oBAAoB,CAAC","ignoreList":[]}
@@ -17,7 +17,8 @@ function _GridSectionAndRepeater(props) {
17
17
  const {
18
18
  sectionDescriptor,
19
19
  imagePlacement,
20
- layoutType
20
+ layoutType,
21
+ dragAndDrop
21
22
  } = props;
22
23
  const {
23
24
  range
@@ -26,7 +27,8 @@ function _GridSectionAndRepeater(props) {
26
27
  gridSections: props.state,
27
28
  sectionDescriptor,
28
29
  imagePlacement,
29
- layoutType
30
+ layoutType,
31
+ draggable: dragAndDrop ? 'draggable' : 'none'
30
32
  }));
31
33
  return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
32
34
  direction: "vertical",
@@ -35,7 +37,7 @@ function _GridSectionAndRepeater(props) {
35
37
  __self: this,
36
38
  __source: {
37
39
  fileName: _jsxFileName,
38
- lineNumber: 34,
40
+ lineNumber: 35,
39
41
  columnNumber: 5
40
42
  }
41
43
  }, /*#__PURE__*/_react.default.createElement(_GridSectionHeader.GridSectionHeader, {
@@ -44,7 +46,7 @@ function _GridSectionAndRepeater(props) {
44
46
  __self: this,
45
47
  __source: {
46
48
  fileName: _jsxFileName,
47
- lineNumber: 35,
49
+ lineNumber: 36,
48
50
  columnNumber: 7
49
51
  }
50
52
  }), /*#__PURE__*/_react.default.createElement(_GridContent.GridContent, (0, _extends2.default)({}, props, {
@@ -55,7 +57,7 @@ function _GridSectionAndRepeater(props) {
55
57
  __self: this,
56
58
  __source: {
57
59
  fileName: _jsxFileName,
58
- lineNumber: 37,
60
+ lineNumber: 38,
59
61
  columnNumber: 7
60
62
  }
61
63
  })));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_mobxReactLite","_GridContent","_GridSectionHeader","_GridSectionsSectionState","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_GridSectionAndRepeater","props","sectionDescriptor","imagePlacement","layoutType","range","state","useState","GridSectionsSectionState","gridSections","createElement","Box","direction","width","dataHook","__self","__source","fileName","lineNumber","columnNumber","GridSectionHeader","GridContent","_extends2","paddingTop","undefined","gridBase","withInfiniteScrollLoader","isLast","GridSectionAndRepeater","exports","observer"],"sources":["../../../../src/components/GridSections/GridSectionAndRepeater.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { GridSectionsState, SectionRange } from './GridSectionsState';\nimport { FiltersMap } from '@wix/bex-core';\nimport { Box } from '@wix/design-system';\nimport { observer } from 'mobx-react-lite';\nimport { GridContent, GridContentBaseProps } from '../Grid/GridContent';\nimport { GridSectionHeader } from './GridSectionHeader';\nimport { GridSectionsSectionState } from './GridSectionsSectionState';\n\nexport interface GridSectionAndRepeaterProps<T, F extends FiltersMap>\n extends GridContentBaseProps<T, F> {\n sectionDescriptor: SectionRange;\n state: GridSectionsState<T, F>;\n}\n\nfunction _GridSectionAndRepeater<T, F extends FiltersMap>(\n props: GridSectionAndRepeaterProps<T, F>,\n) {\n const { sectionDescriptor, imagePlacement, layoutType } = props;\n\n const { range } = sectionDescriptor;\n\n const [state] = useState(\n () =>\n new GridSectionsSectionState({\n gridSections: props.state,\n sectionDescriptor,\n imagePlacement,\n layoutType,\n }),\n );\n\n return (\n <Box direction=\"vertical\" width=\"100%\" dataHook=\"grid-section-and-repeater\">\n <GridSectionHeader sectionDescriptor={sectionDescriptor} state={state} />\n\n <GridContent\n {...props}\n paddingTop={layoutType === 'list' ? undefined : 'SP4'}\n range={range}\n state={state.gridBase}\n withInfiniteScrollLoader={state.isLast}\n />\n </Box>\n );\n}\n\nexport const GridSectionAndRepeater = observer(_GridSectionAndRepeater);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AACA,IAAAK,yBAAA,GAAAL,OAAA;AAAsE,IAAAM,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,W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zBJ,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,CACL,CAAC;EAED,oBACEjC,MAAA,CAAAe,OAAA,CAAAwB,aAAA,CAACpC,aAAA,CAAAqC,GAAG;IAACC,SAAS,EAAC,UAAU;IAACC,KAAK,EAAC,MAAM;IAACC,QAAQ,EAAC,2BAA2B;IAAAC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAtC,YAAA;MAAAuC,UAAA;MAAAC,YAAA;IAAA;EAAA,gBACzEhD,MAAA,CAAAe,OAAA,CAAAwB,aAAA,CAACjC,kBAAA,CAAA2C,iBAAiB;IAAClB,iBAAiB,EAAEA,iBAAkB;IAACI,KAAK,EAAEA,KAAM;IAAAS,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAtC,YAAA;MAAAuC,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CAAC,eAEzEhD,MAAA,CAAAe,OAAA,CAAAwB,aAAA,CAAClC,YAAA,CAAA6C,WAAW,MAAAC,SAAA,CAAApC,OAAA,MACNe,KAAK;IACTsB,UAAU,EAAEnB,UAAU,KAAK,MAAM,GAAGoB,SAAS,GAAG,KAAM;IACtDnB,KAAK,EAAEA,KAAM;IACbC,KAAK,EAAEA,KAAK,CAACmB,QAAS;IACtBC,wBAAwB,EAAEpB,KAAK,CAACqB,MAAO;IAAAZ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAtC,YAAA;MAAAuC,UAAA;MAAAC,YAAA;IAAA;EAAA,EACxC,CACE,CAAC;AAEV;AAEO,MAAMS,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,IAAAE,uBAAQ,EAAC9B,uBAAuB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_designSystem","_mobxReactLite","_GridContent","_GridSectionHeader","_GridSectionsSectionState","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_GridSectionAndRepeater","props","sectionDescriptor","imagePlacement","layoutType","dragAndDrop","range","state","useState","GridSectionsSectionState","gridSections","draggable","createElement","Box","direction","width","dataHook","__self","__source","fileName","lineNumber","columnNumber","GridSectionHeader","GridContent","_extends2","paddingTop","undefined","gridBase","withInfiniteScrollLoader","isLast","GridSectionAndRepeater","exports","observer"],"sources":["../../../../src/components/GridSections/GridSectionAndRepeater.tsx"],"sourcesContent":["import React, { useState } from 'react';\nimport { GridSectionsState, SectionRange } from './GridSectionsState';\nimport { FiltersMap } from '@wix/bex-core';\nimport { Box } from '@wix/design-system';\nimport { observer } from 'mobx-react-lite';\nimport { GridContent, GridContentBaseProps } from '../Grid/GridContent';\nimport { GridSectionHeader } from './GridSectionHeader';\nimport { GridSectionsSectionState } from './GridSectionsSectionState';\n\nexport interface GridSectionAndRepeaterProps<T, F extends FiltersMap>\n extends GridContentBaseProps<T, F> {\n sectionDescriptor: SectionRange;\n state: GridSectionsState<T, F>;\n}\n\nfunction _GridSectionAndRepeater<T, F extends FiltersMap>(\n props: GridSectionAndRepeaterProps<T, F>,\n) {\n const { sectionDescriptor, imagePlacement, layoutType, dragAndDrop } = props;\n\n const { range } = sectionDescriptor;\n\n const [state] = useState(\n () =>\n new GridSectionsSectionState({\n gridSections: props.state,\n sectionDescriptor,\n imagePlacement,\n layoutType,\n draggable: dragAndDrop ? 'draggable' : 'none',\n }),\n );\n\n return (\n <Box direction=\"vertical\" width=\"100%\" dataHook=\"grid-section-and-repeater\">\n <GridSectionHeader sectionDescriptor={sectionDescriptor} state={state} />\n\n <GridContent\n {...props}\n paddingTop={layoutType === 'list' ? undefined : 'SP4'}\n range={range}\n state={state.gridBase}\n withInfiniteScrollLoader={state.isLast}\n />\n </Box>\n );\n}\n\nexport const GridSectionAndRepeater = observer(_GridSectionAndRepeater);\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAGA,IAAAC,aAAA,GAAAD,OAA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AA;MAAAC,YAAA;IAAA;EAAA,EACxC,CACE,CAAC;AAEV;AAEO,MAAMS,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,IAAAE,uBAAQ,EAAChC,uBAAuB,CAAC","ignoreList":[]}
@@ -14,7 +14,9 @@ class GridSectionsSectionState {
14
14
  this.gridSections = params.gridSections;
15
15
  this.sectionDescriptor = params.sectionDescriptor;
16
16
  const {
17
- imagePlacement
17
+ imagePlacement,
18
+ draggable,
19
+ layoutType
18
20
  } = params;
19
21
  const {
20
22
  toolbar
@@ -26,7 +28,8 @@ class GridSectionsSectionState {
26
28
  sizePreset: imagePlacement ? _state.gridSizePresets[imagePlacement] : _state.topGridSizePreset,
27
29
  range: params.sectionDescriptor.range,
28
30
  parentState: this.gridSections,
29
- layoutType: params.layoutType
31
+ layoutType,
32
+ draggable
30
33
  });
31
34
  (0, _mobx.makeObservable)(this, {
32
35
  isLast: _mobx.computed
@@ -1 +1 @@
1
- {"version":3,"names":["_state","require","_mobx","GridSectionsSectionState","constructor","params","_defineProperty2","default","gridSections","sectionDescriptor","imagePlacement","toolbar","gridBase","GridBaseState","container","collection","sizePreset","gridSizePresets","topGridSizePreset","range","parentState","layoutType","makeObservable","isLast","computed","_sections","section","sections","length","id","exports"],"sources":["../../../../src/components/GridSections/GridSectionsSectionState.ts"],"sourcesContent":["import {\n GridBaseState,\n gridSizePresets,\n LayoutType,\n ToolbarCollectionState,\n topGridSizePreset,\n} from '../../state';\nimport { GridSectionsState, SectionRange } from './GridSectionsState';\nimport { FiltersMap } from '@wix/bex-core';\nimport { computed, makeObservable } from 'mobx';\n\nexport interface GridSectionsSectionStateParams<T, F extends FiltersMap> {\n readonly imagePlacement?: 'side' | 'top';\n readonly gridSections: GridSectionsState<T, F>;\n readonly sectionDescriptor: SectionRange;\n readonly layoutType: LayoutType | undefined;\n}\n\nexport class GridSectionsSectionState<T, F extends FiltersMap> {\n gridBase;\n gridSections;\n sectionDescriptor;\n\n constructor(params: GridSectionsSectionStateParams<T, F>) {\n this.gridSections = params.gridSections;\n this.sectionDescriptor = params.sectionDescriptor;\n const { imagePlacement } = params;\n const { toolbar } = this.gridSections;\n this.gridBase = new GridBaseState({\n container: toolbar.container,\n toolbar: toolbar as ToolbarCollectionState<unknown, Partial<F>>,\n collection: toolbar.collection,\n sizePreset: imagePlacement\n ? gridSizePresets[imagePlacement]\n : topGridSizePreset,\n range: params.sectionDescriptor.range,\n parentState: this.gridSections,\n layoutType: params.layoutType,\n });\n\n makeObservable(this, {\n isLast: computed,\n });\n }\n\n get isLast() {\n const {\n sectionDescriptor: { section },\n gridSections: { sections },\n } = this;\n return sections[sections.length - 1]?.section.id === section.id;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,KAAA,GAAAD,OAAA;AASO,MAAME,wBAAwB,CAA0B;EAK7DC,WAAWA,CAACC,MAA4C,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACxD,IAAI,CAACC,YAAY,GAAGH,MAAM,CAACG,YAAY;IACvC,IAAI,CAACC,iBAAiB,GAAGJ,MAAM,CAACI,iBAAiB;IACjD,MAAM;MAAEC;IAAe,CAAC,GAAGL,MAAM;IACjC,MAAM;MAAEM;IAAQ,CAAC,GAAG,IAAI,CAACH,YAAY;IACrC,IAAI,CAACI,QAAQ,GAAG,IAAIC,oBAAa,CAAC;MAChCC,SAAS,EAAEH,OAAO,CAACG,SAAS;MAC5BH,OAAO,EAAEA,OAAsD;MAC/DI,UAAU,EAAEJ,OAAO,CAACI,UAAU;MAC9BC,UAAU,EAAEN,cAAc,GACtBO,sBAAe,CAACP,cAAc,CAAC,GAC/BQ,wBAAiB;MACrBC,KAAK,EAAEd,MAAM,CAACI,iBAAiB,CAACU,KAAK;MACrCC,WAAW,EAAE,IAAI,CAACZ,YAAY;MAC9Ba,UAAU,EAAEhB,MAAM,CAACgB;IACrB,CAAC,CAAC;IAEF,IAAAC,oBAAc,EAAC,IAAI,EAAE;MACnBC,MAAM,EAAEC;IACV,CAAC,CAAC;EACJ;EAEA,IAAID,MAAMA,CAAA,EAAG;IAAA,IAAAE,SAAA;IACX,MAAM;MACJhB,iBAAiB,EAAE;QAAEiB;MAAQ,CAAC;MAC9BlB,YAAY,EAAE;QAAEmB;MAAS;IAC3B,CAAC,GAAG,IAAI;IACR,OAAO,EAAAF,SAAA,GAAAE,QAAQ,CAACA,QAAQ,CAACC,MAAM,GAAG,CAAC,CAAC,qBAA7BH,SAAA,CAA+BC,OAAO,CAACG,EAAE,MAAKH,OAAO,CAACG,EAAE;EACjE;AACF;AAACC,OAAA,CAAA3B,wBAAA,GAAAA,wBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_state","require","_mobx","GridSectionsSectionState","constructor","params","_defineProperty2","default","gridSections","sectionDescriptor","imagePlacement","draggable","layoutType","toolbar","gridBase","GridBaseState","container","collection","sizePreset","gridSizePresets","topGridSizePreset","range","parentState","makeObservable","isLast","computed","_sections","section","sections","length","id","exports"],"sources":["../../../../src/components/GridSections/GridSectionsSectionState.ts"],"sourcesContent":["import {\n GridBaseState,\n gridSizePresets,\n LayoutType,\n ToolbarCollectionState,\n topGridSizePreset,\n} from '../../state';\nimport { GridSectionsState, SectionRange } from './GridSectionsState';\nimport { FiltersMap } from '@wix/bex-core';\nimport { computed, makeObservable } from 'mobx';\n\nexport interface GridSectionsSectionStateParams<T, F extends FiltersMap> {\n readonly imagePlacement?: 'side' | 'top';\n readonly gridSections: GridSectionsState<T, F>;\n readonly sectionDescriptor: SectionRange;\n readonly layoutType: LayoutType | undefined;\n readonly draggable?: 'none' | 'draggable';\n}\n\nexport class GridSectionsSectionState<T, F extends FiltersMap> {\n gridBase;\n gridSections;\n sectionDescriptor;\n\n constructor(params: GridSectionsSectionStateParams<T, F>) {\n this.gridSections = params.gridSections;\n this.sectionDescriptor = params.sectionDescriptor;\n const { imagePlacement, draggable, layoutType } = params;\n const { toolbar } = this.gridSections;\n this.gridBase = new GridBaseState({\n container: toolbar.container,\n toolbar: toolbar as ToolbarCollectionState<unknown, Partial<F>>,\n collection: toolbar.collection,\n sizePreset: imagePlacement\n ? gridSizePresets[imagePlacement]\n : topGridSizePreset,\n range: params.sectionDescriptor.range,\n parentState: this.gridSections,\n layoutType,\n draggable,\n });\n\n makeObservable(this, {\n isLast: computed,\n });\n }\n\n get isLast() {\n const {\n sectionDescriptor: { section },\n gridSections: { sections },\n } = this;\n return sections[sections.length - 1]?.section.id === section.id;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AASA,IAAAC,KAAA,GAAAD,OAAA;AAUO,MAAME,wBAAwB,CAA0B;EAK7DC,WAAWA,CAACC,MAA4C,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IACxD,IAAI,CAACC,YAAY,GAAGH,MAAM,CAACG,YAAY;IACvC,IAAI,CAACC,iBAAiB,GAAGJ,MAAM,CAACI,iBAAiB;IACjD,MAAM;MAAEC,cAAc;MAAEC,SAAS;MAAEC;IAAW,CAAC,GAAGP,MAAM;IACxD,MAAM;MAAEQ;IAAQ,CAAC,GAAG,IAAI,CAACL,YAAY;IACrC,IAAI,CAACM,QAAQ,GAAG,IAAIC,oBAAa,CAAC;MAChCC,SAAS,EAAEH,OAAO,CAACG,SAAS;MAC5BH,OAAO,EAAEA,OAAsD;MAC/DI,UAAU,EAAEJ,OAAO,CAACI,UAAU;MAC9BC,UAAU,EAAER,cAAc,GACtBS,sBAAe,CAACT,cAAc,CAAC,GAC/BU,wBAAiB;MACrBC,KAAK,EAAEhB,MAAM,CAACI,iBAAiB,CAACY,KAAK;MACrCC,WAAW,EAAE,IAAI,CAACd,YAAY;MAC9BI,UAAU;MACVD;IACF,CAAC,CAAC;IAEF,IAAAY,oBAAc,EAAC,IAAI,EAAE;MACnBC,MAAM,EAAEC;IACV,CAAC,CAAC;EACJ;EAEA,IAAID,MAAMA,CAAA,EAAG;IAAA,IAAAE,SAAA;IACX,MAAM;MACJjB,iBAAiB,EAAE;QAAEkB;MAAQ,CAAC;MAC9BnB,YAAY,EAAE;QAAEoB;MAAS;IAC3B,CAAC,GAAG,IAAI;IACR,OAAO,EAAAF,SAAA,GAAAE,QAAQ,CAACA,QAAQ,CAACC,MAAM,GAAG,CAAC,CAAC,qBAA7BH,SAAA,CAA+BC,OAAO,CAACG,EAAE,MAAKH,OAAO,CAACG,EAAE;EACjE;AACF;AAACC,OAAA,CAAA5B,wBAAA,GAAAA,wBAAA","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_ = "Heading692330748";
8
+ var _namespace_ = "Heading850269557";
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": "Heading692330748__root"
15
+ "root": "Heading850269557__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/Heading/Heading.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"Heading692330748\";\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\":\"Heading692330748__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,kBAAkB;AACpC,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;AAAwB,CAAC;AAC/C,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/Heading/Heading.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"Heading850269557\";\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\":\"Heading850269557__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,kBAAkB;AACpC,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;AAAwB,CAAC;AAC/C,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,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_ = "InputOverflow4165352051";
8
+ var _namespace_ = "InputOverflow1104960645";
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": "InputOverflow4165352051__root"
15
+ "root": "InputOverflow1104960645__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/InputOverflow/InputOverflow.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"InputOverflow4165352051\";\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\":\"InputOverflow4165352051__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/InputOverflow/InputOverflow.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"InputOverflow1104960645\";\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\":\"InputOverflow1104960645__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":[]}
@@ -7,10 +7,7 @@ var _core = require("@wix/wix-style-react-incubator/dnd-kit/core");
7
7
  var _sortable = require("@wix/wix-style-react-incubator/dnd-kit/sortable");
8
8
  var _modifiers = require("@wix/wix-style-react-incubator/dnd-kit/modifiers");
9
9
  var _mobxReactLite = require("mobx-react-lite");
10
- var _react2 = require("@wix/bex-core/react");
11
- var _DragAndDrop = require("../DragAndDrop");
12
10
  var _DragAndDropAnnouncements = require("../DragAndDrop/DragAndDropAnnouncements");
13
- var _providers = require("../../providers");
14
11
  var _jsxFileName = "/home/builduser/work/db7ea24852bc3350/packages/cairo/dist/cjs/components/ListDragAndDrop/ListDragAndDropContext.tsx";
15
12
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
@@ -21,18 +18,10 @@ function _ListDragAndDropContext(props) {
21
18
  onSubmit,
22
19
  onCancel
23
20
  } = props;
24
- const container = (0, _react2.useWixPatternsContainer)();
25
- const {
26
- modalsContainerRef
27
- } = (0, _providers.usePageContext)();
28
21
  const {
29
22
  keyedItems
30
23
  } = parentState.collection;
31
- const [state] = (0, _react.useState)(() => new _DragAndDrop.CollectionDragAndDropState({
32
- state: parentState,
33
- container,
34
- a11yContainer: modalsContainerRef == null ? void 0 : modalsContainerRef.current
35
- }));
24
+ const state = parentState.collectionDragAndDropState;
36
25
  const {
37
26
  dnd
38
27
  } = state;
@@ -46,9 +35,7 @@ function _ListDragAndDropContext(props) {
46
35
 
47
36
  // in jsdom we mock drag-and-drop by setting a custom events to draggable elements
48
37
  const sensors = (0, _core.useSensors)(...(process.env.NODE_ENV === 'test' ? [] : [pointerSensor, keyboardSensor]));
49
- (0, _react.useEffect)(() => state.init({
50
- a11yContainer: modalsContainerRef == null ? void 0 : modalsContainerRef.current
51
- }), []);
38
+ (0, _react.useEffect)(() => state.init(), []);
52
39
  dnd.onSubmit = onSubmit;
53
40
  dnd.onCancel = onCancel;
54
41
  return /*#__PURE__*/_react.default.createElement(_core.DndContext, {
@@ -58,7 +45,7 @@ function _ListDragAndDropContext(props) {
58
45
  acceleration: 4
59
46
  },
60
47
  accessibility: {
61
- container: dnd.a11yContainer,
48
+ container: dnd.a11yContainerRef.current,
62
49
  announcements: dnd.nullAnnouncements,
63
50
  screenReaderInstructions: {
64
51
  draggable: ''
@@ -86,7 +73,7 @@ function _ListDragAndDropContext(props) {
86
73
  __self: this,
87
74
  __source: {
88
75
  fileName: _jsxFileName,
89
- lineNumber: 83,
76
+ lineNumber: 68,
90
77
  columnNumber: 5
91
78
  }
92
79
  }, /*#__PURE__*/_react.default.createElement(_sortable.SortableContext, {
@@ -95,7 +82,7 @@ function _ListDragAndDropContext(props) {
95
82
  __self: this,
96
83
  __source: {
97
84
  fileName: _jsxFileName,
98
- lineNumber: 116,
85
+ lineNumber: 101,
99
86
  columnNumber: 7
100
87
  }
101
88
  }, children, /*#__PURE__*/_react.default.createElement(_DragAndDropAnnouncements.DragAndDropAnnouncements, {
@@ -104,7 +91,7 @@ function _ListDragAndDropContext(props) {
104
91
  __self: this,
105
92
  __source: {
106
93
  fileName: _jsxFileName,
107
- lineNumber: 121,
94
+ lineNumber: 106,
108
95
  columnNumber: 9
109
96
  }
110
97
  })));
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_core","_sortable","_modifiers","_mobxReactLite","_react2","_DragAndDrop","_DragAndDropAnnouncements","_providers","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_ListDragAndDropContext","props","state","parentState","children","onSubmit","onCancel","container","useWixPatternsContainer","modalsContainerRef","usePageContext","keyedItems","collection","useState","CollectionDragAndDropState","a11yContainer","current","dnd","pointerSensor","useSensor","PointerSensor","activationConstraint","keyboardSensor","KeyboardSensor","keyboardCodes","coordinateGetter","sortableKeyboardCoordinates","sensors","useSensors","process","env","NODE_ENV","useEffect","init","createElement","DndContext","autoScroll","activator","AutoScrollActivator","DraggableRect","acceleration","accessibility","announcements","nullAnnouncements","screenReaderInstructions","draggable","restoreFocus","collisionDetection","closestCenter","modifiers","restrictToWindowEdges","cancelDrop","ev","beforeDrop","onDragMove","onDragStart","onDragEnd","onDragCancel","onDragOver","__self","__source","fileName","lineNumber","columnNumber","SortableContext","items","strategy","verticalListSortingStrategy","DragAndDropAnnouncements","dataHook","ListDragAndDropContext","exports","observer"],"sources":["../../../../src/components/ListDragAndDrop/ListDragAndDropContext.tsx"],"sourcesContent":["import React, { ReactNode, useEffect, useState } from 'react';\nimport {\n AutoScrollActivator,\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@wix/wix-style-react-incubator/dnd-kit/core';\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n verticalListSortingStrategy,\n} from '@wix/wix-style-react-incubator/dnd-kit/sortable';\nimport { restrictToWindowEdges } from '@wix/wix-style-react-incubator/dnd-kit/modifiers';\nimport { observer } from 'mobx-react-lite';\nimport { FiltersMap } from '@wix/bex-core';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\nimport {\n DragAndDropCancel,\n DragAndDropSubmit,\n CollectionDragAndDropState,\n CollectionDragAndDropParentState,\n} from '../DragAndDrop';\nimport { DragAndDropAnnouncements } from '../DragAndDrop/DragAndDropAnnouncements';\nimport { usePageContext } from '../../providers';\n\nexport interface ListDragAndDropContextProps<T, F extends FiltersMap> {\n state: CollectionDragAndDropParentState<T, F>;\n children?: ReactNode;\n onSubmit?: DragAndDropSubmit<T, F>;\n onCancel?: DragAndDropCancel<T, F>;\n}\n\nfunction _ListDragAndDropContext<T, F extends FiltersMap>(\n props: ListDragAndDropContextProps<T, F>,\n) {\n const { state: parentState, children, onSubmit, onCancel } = props;\n\n const container = useWixPatternsContainer();\n const { modalsContainerRef } = usePageContext();\n\n const { keyedItems } = parentState.collection;\n\n const [state] = useState(\n () =>\n new CollectionDragAndDropState({\n state: parentState,\n container,\n a11yContainer: modalsContainerRef?.current,\n }),\n );\n\n const { dnd } = state;\n\n const pointerSensor = useSensor(PointerSensor, {\n activationConstraint: dnd.activationConstraint,\n });\n\n const keyboardSensor = useSensor(KeyboardSensor, {\n keyboardCodes: dnd.keyboardCodes,\n coordinateGetter: sortableKeyboardCoordinates,\n });\n\n // in jsdom we mock drag-and-drop by setting a custom events to draggable elements\n const sensors = useSensors(\n ...(process.env.NODE_ENV === 'test' ? [] : [pointerSensor, keyboardSensor]),\n );\n\n useEffect(\n () =>\n state.init({\n a11yContainer: modalsContainerRef?.current,\n }),\n [],\n );\n\n dnd.onSubmit = onSubmit;\n dnd.onCancel = onCancel;\n\n return (\n <DndContext\n sensors={sensors}\n autoScroll={{\n activator: AutoScrollActivator.DraggableRect,\n acceleration: 4,\n }}\n accessibility={{\n container: dnd.a11yContainer as HTMLElement | undefined,\n announcements: dnd.nullAnnouncements,\n screenReaderInstructions: {\n draggable: '',\n },\n restoreFocus: false,\n }}\n collisionDetection={closestCenter}\n modifiers={[restrictToWindowEdges]}\n cancelDrop={(ev) => dnd.beforeDrop(ev)}\n onDragMove={(ev) => {\n dnd.onDragMove(ev);\n }}\n onDragStart={(ev) => {\n dnd.onDragStart(ev);\n }}\n onDragEnd={(ev) => {\n dnd.onDragEnd(ev);\n }}\n onDragCancel={() => {\n dnd.onDragCancel();\n }}\n onDragOver={(ev) => {\n dnd.onDragOver(ev);\n }}\n >\n <SortableContext\n items={keyedItems}\n strategy={verticalListSortingStrategy}\n >\n {children}\n <DragAndDropAnnouncements state={dnd} dataHook=\"list-dnd-live-region\" />\n </SortableContext>\n </DndContext>\n );\n}\n\nexport const ListDragAndDropContext = observer(_ListDragAndDropContext);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAEA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,YAAA,GAAAN,OAAA;AAMA,IAAAO,yBAAA,GA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AACzD,yBAAA,CAAA2F,wBAAwB;IAAClE,KAAK,EAAEe,GAAI;IAACoD,QAAQ,EAAC,sBAAsB;IAAAV,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAlF,YAAA;MAAAmF,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CACxD,CACP,CAAC;AAEjB;AAEO,MAAMO,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,IAAAE,uBAAQ,EAACxE,uBAAuB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_core","_sortable","_modifiers","_mobxReactLite","_DragAndDropAnnouncements","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_ListDragAndDropContext","props","state","parentState","children","onSubmit","onCancel","keyedItems","collection","collectionDragAndDropState","dnd","pointerSensor","useSensor","PointerSensor","activationConstraint","keyboardSensor","KeyboardSensor","keyboardCodes","coordinateGetter","sortableKeyboardCoordinates","sensors","useSensors","process","env","NODE_ENV","useEffect","init","createElement","DndContext","autoScroll","activator","AutoScrollActivator","DraggableRect","acceleration","accessibility","container","a11yContainerRef","current","announcements","nullAnnouncements","screenReaderInstructions","draggable","restoreFocus","collisionDetection","closestCenter","modifiers","restrictToWindowEdges","cancelDrop","ev","beforeDrop","onDragMove","onDragStart","onDragEnd","onDragCancel","onDragOver","__self","__source","fileName","lineNumber","columnNumber","SortableContext","items","strategy","verticalListSortingStrategy","DragAndDropAnnouncements","dataHook","ListDragAndDropContext","exports","observer"],"sources":["../../../../src/components/ListDragAndDrop/ListDragAndDropContext.tsx"],"sourcesContent":["import React, { ReactNode, useEffect } from 'react';\nimport {\n AutoScrollActivator,\n closestCenter,\n DndContext,\n KeyboardSensor,\n PointerSensor,\n useSensor,\n useSensors,\n} from '@wix/wix-style-react-incubator/dnd-kit/core';\nimport {\n SortableContext,\n sortableKeyboardCoordinates,\n verticalListSortingStrategy,\n} from '@wix/wix-style-react-incubator/dnd-kit/sortable';\nimport { restrictToWindowEdges } from '@wix/wix-style-react-incubator/dnd-kit/modifiers';\nimport { observer } from 'mobx-react-lite';\nimport { FiltersMap } from '@wix/bex-core';\nimport {\n CollectionDragAndDropParentState,\n CollectionDragAndDropState,\n DragAndDropCancel,\n DragAndDropSubmit,\n} from '../DragAndDrop';\nimport { DragAndDropAnnouncements } from '../DragAndDrop/DragAndDropAnnouncements';\n\nexport interface ListDragAndDropContextProps<T, F extends FiltersMap> {\n state: CollectionDragAndDropParentState<T, F> & {\n collectionDragAndDropState: CollectionDragAndDropState<T, F> | null;\n };\n children?: ReactNode;\n onSubmit?: DragAndDropSubmit<T, F>;\n onCancel?: DragAndDropCancel<T, F>;\n}\n\nfunction _ListDragAndDropContext<T, F extends FiltersMap>(\n props: ListDragAndDropContextProps<T, F>,\n) {\n const { state: parentState, children, onSubmit, onCancel } = props;\n\n const { keyedItems } = parentState.collection;\n\n const state =\n parentState.collectionDragAndDropState as CollectionDragAndDropState<T, F>;\n\n const { dnd } = state;\n\n const pointerSensor = useSensor(PointerSensor, {\n activationConstraint: dnd.activationConstraint,\n });\n\n const keyboardSensor = useSensor(KeyboardSensor, {\n keyboardCodes: dnd.keyboardCodes,\n coordinateGetter: sortableKeyboardCoordinates,\n });\n\n // in jsdom we mock drag-and-drop by setting a custom events to draggable elements\n const sensors = useSensors(\n ...(process.env.NODE_ENV === 'test' ? [] : [pointerSensor, keyboardSensor]),\n );\n\n useEffect(() => state.init(), []);\n\n dnd.onSubmit = onSubmit;\n dnd.onCancel = onCancel;\n\n return (\n <DndContext\n sensors={sensors}\n autoScroll={{\n activator: AutoScrollActivator.DraggableRect,\n acceleration: 4,\n }}\n accessibility={{\n container: dnd.a11yContainerRef.current as HTMLElement | undefined,\n announcements: dnd.nullAnnouncements,\n screenReaderInstructions: {\n draggable: '',\n },\n restoreFocus: false,\n }}\n collisionDetection={closestCenter}\n modifiers={[restrictToWindowEdges]}\n cancelDrop={(ev) => dnd.beforeDrop(ev)}\n onDragMove={(ev) => {\n dnd.onDragMove(ev);\n }}\n onDragStart={(ev) => {\n dnd.onDragStart(ev);\n }}\n onDragEnd={(ev) => {\n dnd.onDragEnd(ev);\n }}\n onDragCancel={() => {\n dnd.onDragCancel();\n }}\n onDragOver={(ev) => {\n dnd.onDragOver(ev);\n }}\n >\n <SortableContext\n items={keyedItems}\n strategy={verticalListSortingStrategy}\n >\n {children}\n <DragAndDropAnnouncements state={dnd} dataHook=\"list-dnd-live-region\" />\n </SortableContext>\n </DndContext>\n );\n}\n\nexport const ListDragAndDropContext = observer(_ListDragAndDropContext);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AASA,IAAAE,SAAA,GAAAF,OAAA;AAKA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AAQA,IAAAK,yBAAA,GAAAL,OAAA;AAAmF,IAAAM,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,SAAAT,wBAAAS,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,CA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A,CAAAe,OAAA,CAAAyC,aAAA,CAACpD,SAAA,CAAAqF,eAAe;IACdC,KAAK,EAAEtD,UAAW;IAClBuD,QAAQ,EAAEC,qCAA4B;IAAAR,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAA9E,YAAA;MAAA+E,UAAA;MAAAC,YAAA;IAAA;EAAA,GAErCvD,QAAQ,eACTjC,MAAA,CAAAe,OAAA,CAAAyC,aAAA,CAACjD,yBAAA,CAAAsF,wBAAwB;IAAC9D,KAAK,EAAEQ,GAAI;IAACuD,QAAQ,EAAC,sBAAsB;IAAAV,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAA9E,YAAA;MAAA+E,UAAA;MAAAC,YAAA;IAAA;EAAA,CAAE,CACxD,CACP,CAAC;AAEjB;AAEO,MAAMO,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,IAAAE,uBAAQ,EAACpE,uBAAuB,CAAC","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_ = "MaxHeightText1009967858";
8
+ var _namespace_ = "MaxHeightText244022405";
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": "MaxHeightText1009967858__root"
15
+ "root": "MaxHeightText244022405__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/MaxHeightText/MaxHeightText.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"MaxHeightText1009967858\";\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\":\"MaxHeightText1009967858__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/MaxHeightText/MaxHeightText.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"MaxHeightText244022405\";\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\":\"MaxHeightText244022405__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,wBAAwB;AAC1C,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;AAA8B,CAAC;AACrD,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,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_ = "MaxLines2925917782";
8
+ var _namespace_ = "MaxLines1427098083";
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": "MaxLines2925917782__root"
15
+ "root": "MaxLines1427098083__root"
16
16
  };
17
17
  var keyframes = exports.keyframes = {};
18
18
  var layers = exports.layers = {};