@wix/patterns 1.12.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.
- package/dist/cjs/components/Collapse/Collapse.st.css.js +3 -3
- package/dist/cjs/components/Collapse/Collapse.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionItemActions/CollectionItemActions.js +2 -2
- package/dist/cjs/components/CollectionItemActions/CollectionItemActions.js.map +1 -1
- package/dist/cjs/components/CollectionItemActions/CollectionItemActionsHelper.js +2 -2
- package/dist/cjs/components/CollectionItemActions/CollectionItemActionsHelper.js.map +1 -1
- package/dist/cjs/components/CollectionTable/CollectionTable.js +2 -2
- package/dist/cjs/components/CollectionTable/CollectionTable.js.map +1 -1
- package/dist/cjs/components/CollectionToolbar/CollectionToolbar.st.css.js +5 -5
- package/dist/cjs/components/CollectionToolbar/CollectionToolbar.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +3 -3
- package/dist/cjs/components/CollectionToolbar/SearchOrCustomFilter.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
- package/dist/cjs/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
- package/dist/cjs/components/CollectionViewsDropdown/ViewsDropdown.st.css.js.map +1 -1
- package/dist/cjs/components/CustomColumnsPanel/CustomColumnsPanelEntry.js +7 -2
- package/dist/cjs/components/CustomColumnsPanel/CustomColumnsPanelEntry.js.map +1 -1
- package/dist/cjs/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js +3 -3
- package/dist/cjs/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/CollectionDragAndDropState.js +3 -3
- package/dist/cjs/components/DragAndDrop/CollectionDragAndDropState.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/DragAndDropAnnouncements.js +5 -5
- package/dist/cjs/components/DragAndDrop/DragAndDropAnnouncements.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/DragAndDropState.js +3 -10
- package/dist/cjs/components/DragAndDrop/DragAndDropState.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/TableDragAndDropState.js +7 -11
- package/dist/cjs/components/DragAndDrop/TableDragAndDropState.js.map +1 -1
- package/dist/cjs/components/DragHandle/DragHandle.st.css.js +2 -2
- package/dist/cjs/components/DragHandle/DragHandle.st.css.js.map +1 -1
- package/dist/cjs/components/ExtensionMenuItems/ExtensionMenuItems.js +2 -2
- package/dist/cjs/components/ExtensionMenuItems/ExtensionMenuItems.js.map +1 -1
- package/dist/cjs/components/Fade/Fade.st.css.js +2 -2
- package/dist/cjs/components/Fade/Fade.st.css.js.map +1 -1
- package/dist/cjs/components/Grid/Grid.js +6 -6
- package/dist/cjs/components/Grid/Grid.js.map +1 -1
- package/dist/cjs/components/Grid/Grid.uni.driver.js +6 -1
- package/dist/cjs/components/Grid/Grid.uni.driver.js.map +1 -1
- package/dist/cjs/components/Grid/GridCardItem.js +2 -2
- package/dist/cjs/components/Grid/GridCardItem.js.map +1 -1
- package/dist/cjs/components/Grid/GridContent.js +12 -9
- package/dist/cjs/components/Grid/GridContent.js.map +1 -1
- package/dist/cjs/components/Grid/GridFoldersSectionsGroup.js.map +1 -1
- package/dist/cjs/components/Grid/GridItem.js.map +1 -1
- package/dist/cjs/components/Grid/GridSingleGridContent.js +10 -4
- package/dist/cjs/components/Grid/GridSingleGridContent.js.map +1 -1
- package/dist/cjs/components/Grid/renderFolderItem.js.map +1 -1
- package/dist/cjs/components/Grid/useGridBaseSyncProps.js +18 -1
- package/dist/cjs/components/Grid/useGridBaseSyncProps.js.map +1 -1
- package/dist/cjs/components/Grid/{toGridItemActions.js → useGridItemActions.js} +6 -6
- package/dist/cjs/components/Grid/useGridItemActions.js.map +1 -0
- package/dist/cjs/components/Grid/useRenderItem.js.map +1 -1
- package/dist/cjs/components/GridDragAndDropDndKit/GridDragAndDrop.js +14 -1
- package/dist/cjs/components/GridDragAndDropDndKit/GridDragAndDrop.js.map +1 -1
- package/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.js +6 -18
- package/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.js.map +1 -1
- package/dist/cjs/components/GridSections/GridSectionAndRepeater.js +10 -5
- package/dist/cjs/components/GridSections/GridSectionAndRepeater.js.map +1 -1
- package/dist/cjs/components/GridSections/GridSectionHeader.js +9 -3
- package/dist/cjs/components/GridSections/GridSectionHeader.js.map +1 -1
- package/dist/cjs/components/GridSections/GridSectionsContent.js +28 -12
- package/dist/cjs/components/GridSections/GridSectionsContent.js.map +1 -1
- package/dist/cjs/components/GridSections/GridSectionsSectionState.js +6 -2
- package/dist/cjs/components/GridSections/GridSectionsSectionState.js.map +1 -1
- package/dist/cjs/components/GridSections/GridSectionsSingleSkeletonGrid.js +45 -0
- package/dist/cjs/components/GridSections/GridSectionsSingleSkeletonGrid.js.map +1 -0
- package/dist/cjs/components/Heading/Heading.st.css.js +2 -2
- package/dist/cjs/components/Heading/Heading.st.css.js.map +1 -1
- package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js +2 -2
- package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
- package/dist/cjs/components/ListDragAndDrop/ListDragAndDropContext.js +6 -19
- package/dist/cjs/components/ListDragAndDrop/ListDragAndDropContext.js.map +1 -1
- package/dist/cjs/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
- package/dist/cjs/components/MaxHeightText/MaxHeightText.st.css.js.map +1 -1
- package/dist/cjs/components/MaxLines/MaxLines.st.css.js +2 -2
- package/dist/cjs/components/MaxLines/MaxLines.st.css.js.map +1 -1
- package/dist/cjs/components/MoreActions/MoreActions.js +2 -2
- package/dist/cjs/components/MoreActions/MoreActions.js.map +1 -1
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.js +4 -3
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.js.map +1 -1
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js.map +1 -1
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbarState.js +2 -3
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbarState.js.map +1 -1
- package/dist/cjs/components/MultiLevelSorting/MultiLevelSortingCTAButton.js +10 -5
- package/dist/cjs/components/MultiLevelSorting/MultiLevelSortingCTAButton.js.map +1 -1
- package/dist/cjs/components/NestedTable/NestedTable.js.map +1 -1
- package/dist/cjs/components/NestedTable/NestedTableRow.st.css.js +5 -5
- package/dist/cjs/components/NestedTable/NestedTableRow.st.css.js.map +1 -1
- package/dist/cjs/components/NestedTable/NestedTableWSRTable.js +16 -6
- package/dist/cjs/components/NestedTable/NestedTableWSRTable.js.map +1 -1
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js +33 -0
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js.map +1 -0
- package/dist/cjs/components/{CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js → NestedTableDragAndDrop/NestedTableDragAndDropContext.js} +14 -31
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js.map +1 -0
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js +85 -0
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js.map +1 -0
- package/dist/cjs/components/PageWrapper/PageWrapperBase.js +8 -5
- package/dist/cjs/components/PageWrapper/PageWrapperBase.js.map +1 -1
- package/dist/cjs/components/PickerContent/PickerContent.st.css.js +2 -2
- package/dist/cjs/components/PickerContent/PickerContent.st.css.js.map +1 -1
- package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js +4 -4
- package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js.map +1 -1
- package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
- package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js.map +1 -1
- package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
- package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js.map +1 -1
- package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js +3 -3
- package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js.map +1 -1
- package/dist/cjs/components/SkeletonGrid/SkeletonGrid.js +5 -4
- package/dist/cjs/components/SkeletonGrid/SkeletonGrid.js.map +1 -1
- package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js +2 -2
- package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js.map +1 -1
- package/dist/cjs/components/Table/TableVirtual.st.css.js +3 -3
- package/dist/cjs/components/Table/TableVirtual.st.css.js.map +1 -1
- package/dist/cjs/components/Table/useTableSyncProps.js +11 -0
- package/dist/cjs/components/Table/useTableSyncProps.js.map +1 -1
- package/dist/cjs/components/TableDragAndDrop.js +15 -2
- package/dist/cjs/components/TableDragAndDrop.js.map +1 -1
- package/dist/cjs/components/{CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js → TableDragAndDropContext/TableDragAndDropContext.js} +13 -23
- package/dist/cjs/components/TableDragAndDropContext/TableDragAndDropContext.js.map +1 -0
- package/dist/cjs/components/TableDragAndDropContext/index.js +8 -0
- package/dist/cjs/components/TableDragAndDropContext/index.js.map +1 -0
- package/dist/cjs/components/TableSkeleton/TableSkeleton.js +11 -9
- package/dist/cjs/components/TableSkeleton/TableSkeleton.js.map +1 -1
- package/dist/cjs/components/TabsFilter/TabsFilter.st.css.js +3 -3
- package/dist/cjs/components/TabsFilter/TabsFilter.st.css.js.map +1 -1
- package/dist/cjs/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js +2 -2
- package/dist/cjs/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js.map +1 -1
- package/dist/cjs/components/ToolbarCollection/ToolbarCollection.js.map +1 -1
- package/dist/cjs/components/ToolbarCollection/useToolbarCollectionSyncProps.js +0 -2
- package/dist/cjs/components/ToolbarCollection/useToolbarCollectionSyncProps.js.map +1 -1
- package/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.st.css.js +2 -2
- package/dist/cjs/components/ToolbarItemBox/ToolbarItemBox.st.css.js.map +1 -1
- package/dist/cjs/components/common.st.css.js +4 -4
- package/dist/cjs/components/common.st.css.js.map +1 -1
- package/dist/cjs/hooks/index.js +0 -6
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useColumnsSyncProps.js +10 -2
- package/dist/cjs/hooks/useColumnsSyncProps.js.map +1 -1
- package/dist/cjs/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/state/CustomColumnsDragAndDropState.js +16 -6
- package/dist/cjs/state/CustomColumnsDragAndDropState.js.map +1 -1
- package/dist/cjs/state/CustomColumnsState.js +2 -1
- package/dist/cjs/state/CustomColumnsState.js.map +1 -1
- package/dist/cjs/state/GridBaseState.js +35 -7
- package/dist/cjs/state/GridBaseState.js.map +1 -1
- package/dist/cjs/state/GridFoldersState.js +4 -2
- package/dist/cjs/state/GridFoldersState.js.map +1 -1
- package/dist/cjs/state/MultiLevelSortingDragAndDrop.js +15 -3
- package/dist/cjs/state/MultiLevelSortingDragAndDrop.js.map +1 -1
- package/dist/cjs/state/MultiLevelSortingState.js +2 -1
- package/dist/cjs/state/MultiLevelSortingState.js.map +1 -1
- package/dist/cjs/state/NestedTableState/NestedTableNestedModeState.js +1 -0
- package/dist/cjs/state/NestedTableState/NestedTableNestedModeState.js.map +1 -1
- package/dist/cjs/state/ResponsiveColumnsState.js +7 -7
- package/dist/cjs/state/ResponsiveColumnsState.js.map +1 -1
- package/dist/cjs/state/TableState.js +2 -9
- package/dist/cjs/state/TableState.js.map +1 -1
- package/dist/cjs/state/ToolbarCollectionState.js +0 -2
- package/dist/cjs/state/ToolbarCollectionState.js.map +1 -1
- package/dist/cjs/state/initCustomColumns.js +8 -2
- package/dist/cjs/state/initCustomColumns.js.map +1 -1
- package/dist/cjs/styles.global.css +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/components/Collapse/Collapse.st.css.js +2 -2
- package/dist/esm/components/Collapse/Collapse.st.css.js.map +1 -1
- package/dist/esm/components/CollectionItemActions/CollectionItemActions.js +3 -2
- package/dist/esm/components/CollectionItemActions/CollectionItemActions.js.map +1 -1
- package/dist/esm/components/CollectionItemActions/CollectionItemActionsHelper.js +2 -2
- package/dist/esm/components/CollectionItemActions/CollectionItemActionsHelper.js.map +1 -1
- package/dist/esm/components/CollectionTable/CollectionTable.js +2 -2
- package/dist/esm/components/CollectionTable/CollectionTable.js.map +1 -1
- package/dist/esm/components/CollectionToolbar/CollectionToolbar.st.css.js +2 -2
- package/dist/esm/components/CollectionToolbar/CollectionToolbar.st.css.js.map +1 -1
- package/dist/esm/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +2 -2
- package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
- package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
- package/dist/esm/components/CustomColumnsPanel/CustomColumnsPanelEntry.js +3 -0
- package/dist/esm/components/CustomColumnsPanel/CustomColumnsPanelEntry.js.map +1 -1
- package/dist/esm/components/CustomFieldsWidget/CustomFieldsViewWidgetSection.st.css.js +2 -2
- package/dist/esm/components/DragAndDrop/CollectionDragAndDropState.js +3 -3
- package/dist/esm/components/DragAndDrop/CollectionDragAndDropState.js.map +1 -1
- package/dist/esm/components/DragAndDrop/DragAndDropAnnouncements.js +4 -4
- package/dist/esm/components/DragAndDrop/DragAndDropAnnouncements.js.map +1 -1
- package/dist/esm/components/DragAndDrop/DragAndDropState.js +2 -7
- package/dist/esm/components/DragAndDrop/DragAndDropState.js.map +1 -1
- package/dist/esm/components/DragAndDrop/TableDragAndDropState.js +7 -8
- package/dist/esm/components/DragAndDrop/TableDragAndDropState.js.map +1 -1
- package/dist/esm/components/DragHandle/DragHandle.st.css.js +2 -2
- package/dist/esm/components/DragHandle/DragHandle.st.css.js.map +1 -1
- package/dist/esm/components/ExtensionMenuItems/ExtensionMenuItems.js +1 -1
- package/dist/esm/components/ExtensionMenuItems/ExtensionMenuItems.js.map +1 -1
- package/dist/esm/components/Fade/Fade.st.css.js +2 -2
- package/dist/esm/components/Grid/Grid.js.map +1 -1
- package/dist/esm/components/Grid/Grid.uni.driver.js +5 -1
- package/dist/esm/components/Grid/Grid.uni.driver.js.map +1 -1
- package/dist/esm/components/Grid/GridCardItem.js +2 -2
- package/dist/esm/components/Grid/GridCardItem.js.map +1 -1
- package/dist/esm/components/Grid/GridContent.js +2 -2
- package/dist/esm/components/Grid/GridContent.js.map +1 -1
- package/dist/esm/components/Grid/GridFoldersSectionsGroup.js.map +1 -1
- package/dist/esm/components/Grid/GridSingleGridContent.js +4 -2
- package/dist/esm/components/Grid/GridSingleGridContent.js.map +1 -1
- package/dist/esm/components/Grid/renderFolderItem.js.map +1 -1
- package/dist/esm/components/Grid/useGridBaseSyncProps.js +16 -2
- package/dist/esm/components/Grid/useGridBaseSyncProps.js.map +1 -1
- package/dist/esm/components/Grid/{toGridItemActions.js → useGridItemActions.js} +4 -4
- package/dist/esm/components/Grid/useGridItemActions.js.map +1 -0
- package/dist/esm/components/Grid/useRenderItem.js.map +1 -1
- package/dist/esm/components/GridDragAndDropDndKit/GridDragAndDrop.js +11 -0
- package/dist/esm/components/GridDragAndDropDndKit/GridDragAndDrop.js.map +1 -1
- package/dist/esm/components/GridDragAndDropDndKit/GridSortableContext.js +3 -13
- package/dist/esm/components/GridDragAndDropDndKit/GridSortableContext.js.map +1 -1
- package/dist/esm/components/GridSections/GridSectionAndRepeater.js +4 -2
- package/dist/esm/components/GridSections/GridSectionAndRepeater.js.map +1 -1
- package/dist/esm/components/GridSections/GridSectionHeader.js +2 -1
- package/dist/esm/components/GridSections/GridSectionHeader.js.map +1 -1
- package/dist/esm/components/GridSections/GridSectionsContent.js +9 -4
- package/dist/esm/components/GridSections/GridSectionsContent.js.map +1 -1
- package/dist/esm/components/GridSections/GridSectionsSectionState.js +3 -1
- package/dist/esm/components/GridSections/GridSectionsSectionState.js.map +1 -1
- package/dist/esm/components/GridSections/GridSectionsSingleSkeletonGrid.js +20 -0
- package/dist/esm/components/GridSections/GridSectionsSingleSkeletonGrid.js.map +1 -0
- package/dist/esm/components/Heading/Heading.st.css.js +2 -2
- package/dist/esm/components/Heading/Heading.st.css.js.map +1 -1
- package/dist/esm/components/InputOverflow/InputOverflow.st.css.js +2 -2
- package/dist/esm/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
- package/dist/esm/components/ListDragAndDrop/ListDragAndDropContext.js +4 -15
- package/dist/esm/components/ListDragAndDrop/ListDragAndDropContext.js.map +1 -1
- package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
- package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js.map +1 -1
- package/dist/esm/components/MaxLines/MaxLines.st.css.js +2 -2
- package/dist/esm/components/MaxLines/MaxLines.st.css.js.map +1 -1
- package/dist/esm/components/MoreActions/MoreActions.js +1 -1
- package/dist/esm/components/MoreActions/MoreActions.js.map +1 -1
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.js +4 -3
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.js.map +1 -1
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbarState.js +1 -2
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbarState.js.map +1 -1
- package/dist/esm/components/MultiLevelSorting/MultiLevelSortingCTAButton.js +4 -1
- package/dist/esm/components/MultiLevelSorting/MultiLevelSortingCTAButton.js.map +1 -1
- package/dist/esm/components/NestedTable/NestedTableRow.st.css.js +2 -2
- package/dist/esm/components/NestedTable/NestedTableWSRTable.js +9 -1
- package/dist/esm/components/NestedTable/NestedTableWSRTable.js.map +1 -1
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js +23 -0
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js.map +1 -0
- package/dist/esm/components/{CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js → NestedTableDragAndDrop/NestedTableDragAndDropContext.js} +8 -21
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js.map +1 -0
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js +61 -0
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js.map +1 -0
- package/dist/esm/components/PageWrapper/PageWrapperBase.js +4 -1
- package/dist/esm/components/PageWrapper/PageWrapperBase.js.map +1 -1
- package/dist/esm/components/PickerContent/PickerContent.st.css.js +2 -2
- package/dist/esm/components/PickerContent/PickerContent.st.css.js.map +1 -1
- package/dist/esm/components/PickerContent/PickerContentAdditionalStep.st.css.js +2 -2
- package/dist/esm/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
- package/dist/esm/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
- package/dist/esm/components/SkeletonCard/SkeletonCard.st.css.js +2 -2
- package/dist/esm/components/SkeletonGrid/SkeletonGrid.js +2 -2
- package/dist/esm/components/SkeletonGrid/SkeletonGrid.js.map +1 -1
- package/dist/esm/components/SlidingModal/SlidingModal.st.css.js +2 -2
- package/dist/esm/components/Table/TableVirtual.st.css.js +2 -2
- package/dist/esm/components/Table/useTableSyncProps.js +9 -0
- package/dist/esm/components/Table/useTableSyncProps.js.map +1 -1
- package/dist/esm/components/TableDragAndDrop.js +12 -2
- package/dist/esm/components/TableDragAndDrop.js.map +1 -1
- package/dist/esm/components/{CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js → TableDragAndDropContext/TableDragAndDropContext.js} +7 -18
- package/dist/esm/components/TableDragAndDropContext/TableDragAndDropContext.js.map +1 -0
- package/dist/esm/components/TableDragAndDropContext/index.js +2 -0
- package/dist/esm/components/TableDragAndDropContext/index.js.map +1 -0
- package/dist/esm/components/TableSkeleton/TableSkeleton.js +3 -1
- package/dist/esm/components/TableSkeleton/TableSkeleton.js.map +1 -1
- package/dist/esm/components/TabsFilter/TabsFilter.st.css.js +2 -2
- package/dist/esm/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.js +2 -2
- package/dist/esm/components/ToolbarCollection/useToolbarCollectionSyncProps.js +1 -2
- package/dist/esm/components/ToolbarCollection/useToolbarCollectionSyncProps.js.map +1 -1
- package/dist/esm/components/ToolbarItemBox/ToolbarItemBox.st.css.js +2 -2
- package/dist/esm/components/ToolbarItemBox/ToolbarItemBox.st.css.js.map +1 -1
- package/dist/esm/components/common.st.css.js +2 -2
- package/dist/esm/components/common.st.css.js.map +1 -1
- package/dist/esm/hooks/index.js +0 -1
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useColumnsSyncProps.js +8 -2
- package/dist/esm/hooks/useColumnsSyncProps.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/state/CustomColumnsDragAndDropState.js +14 -4
- package/dist/esm/state/CustomColumnsDragAndDropState.js.map +1 -1
- package/dist/esm/state/CustomColumnsState.js +1 -0
- package/dist/esm/state/CustomColumnsState.js.map +1 -1
- package/dist/esm/state/GridBaseState.js +30 -8
- package/dist/esm/state/GridBaseState.js.map +1 -1
- package/dist/esm/state/GridFoldersState.js +2 -0
- package/dist/esm/state/GridFoldersState.js.map +1 -1
- package/dist/esm/state/MultiLevelSortingDragAndDrop.js +13 -1
- package/dist/esm/state/MultiLevelSortingDragAndDrop.js.map +1 -1
- package/dist/esm/state/MultiLevelSortingState.js +1 -0
- package/dist/esm/state/MultiLevelSortingState.js.map +1 -1
- package/dist/esm/state/NestedTableState/NestedTableNestedModeState.js +1 -0
- package/dist/esm/state/NestedTableState/NestedTableNestedModeState.js.map +1 -1
- package/dist/esm/state/ResponsiveColumnsState.js +6 -6
- package/dist/esm/state/ResponsiveColumnsState.js.map +1 -1
- package/dist/esm/state/TableState.js +3 -9
- package/dist/esm/state/TableState.js.map +1 -1
- package/dist/esm/state/ToolbarCollectionState.js +0 -2
- package/dist/esm/state/ToolbarCollectionState.js.map +1 -1
- package/dist/esm/state/initCustomColumns.js +3 -1
- package/dist/esm/state/initCustomColumns.js.map +1 -1
- package/dist/esm/styles.global.css +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/components/Collapse/Collapse.st.css.d.ts.map +1 -1
- package/dist/types/components/CollectionItemActions/CollectionItemActions.d.ts.map +1 -1
- package/dist/types/components/CollectionItemActions/CollectionItemActionsHelper.d.ts +1 -1
- package/dist/types/components/CollectionItemActions/CollectionItemActionsHelper.d.ts.map +1 -1
- package/dist/types/components/CollectionToolbar/CollectionToolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/CustomColumnsPanel/CustomColumnsPanelEntry.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/CollectionDragAndDropState.d.ts +4 -4
- package/dist/types/components/DragAndDrop/CollectionDragAndDropState.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/DragAndDropState.d.ts +8 -6
- package/dist/types/components/DragAndDrop/DragAndDropState.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/TableDragAndDropState.d.ts +2 -3
- package/dist/types/components/DragAndDrop/TableDragAndDropState.d.ts.map +1 -1
- package/dist/types/components/DragHandle/DragHandle.st.css.d.ts.map +1 -1
- package/dist/types/components/ExtensionMenuItems/ExtensionMenuItems.d.ts +1 -1
- package/dist/types/components/ExtensionMenuItems/ExtensionMenuItems.d.ts.map +1 -1
- package/dist/types/components/Grid/Grid.d.ts +4 -3
- package/dist/types/components/Grid/Grid.d.ts.map +1 -1
- package/dist/types/components/Grid/Grid.uni.driver.d.ts +7 -4
- package/dist/types/components/Grid/Grid.uni.driver.d.ts.map +1 -1
- package/dist/types/components/Grid/GridContent.d.ts +7 -3
- package/dist/types/components/Grid/GridContent.d.ts.map +1 -1
- package/dist/types/components/Grid/GridFolders.uni.driver.d.ts +4 -2
- package/dist/types/components/Grid/GridFolders.uni.driver.d.ts.map +1 -1
- package/dist/types/components/Grid/GridFoldersSection.uni.driver.d.ts +2 -1
- package/dist/types/components/Grid/GridFoldersSection.uni.driver.d.ts.map +1 -1
- package/dist/types/components/Grid/GridFoldersSectionsGroup.d.ts +2 -2
- package/dist/types/components/Grid/GridFoldersSectionsGroup.d.ts.map +1 -1
- package/dist/types/components/Grid/GridItem.d.ts +2 -2
- package/dist/types/components/Grid/GridItem.d.ts.map +1 -1
- package/dist/types/components/Grid/GridSingleGridContent.d.ts.map +1 -1
- package/dist/types/components/Grid/renderFolderItem.d.ts +2 -2
- package/dist/types/components/Grid/renderFolderItem.d.ts.map +1 -1
- package/dist/types/components/Grid/useGridBaseSyncProps.d.ts +4 -3
- package/dist/types/components/Grid/useGridBaseSyncProps.d.ts.map +1 -1
- package/dist/types/components/Grid/{toGridItemActions.d.ts → useGridItemActions.d.ts} +2 -2
- package/dist/types/components/Grid/useGridItemActions.d.ts.map +1 -0
- package/dist/types/components/Grid/useRenderItem.d.ts +2 -2
- package/dist/types/components/Grid/useRenderItem.d.ts.map +1 -1
- package/dist/types/components/GridDragAndDropDndKit/GridDragAndDrop.d.ts +22 -2
- package/dist/types/components/GridDragAndDropDndKit/GridDragAndDrop.d.ts.map +1 -1
- package/dist/types/components/GridDragAndDropDndKit/GridSortableContext.d.ts +10 -3
- package/dist/types/components/GridDragAndDropDndKit/GridSortableContext.d.ts.map +1 -1
- package/dist/types/components/GridSections/GridSectionAndRepeater.d.ts.map +1 -1
- package/dist/types/components/GridSections/GridSectionHeader.d.ts.map +1 -1
- package/dist/types/components/GridSections/GridSectionsContent.d.ts.map +1 -1
- package/dist/types/components/GridSections/GridSectionsSectionState.d.ts +3 -1
- package/dist/types/components/GridSections/GridSectionsSectionState.d.ts.map +1 -1
- package/dist/types/components/GridSections/GridSectionsSingleSkeletonGrid.d.ts +17 -0
- package/dist/types/components/GridSections/GridSectionsSingleSkeletonGrid.d.ts.map +1 -0
- package/dist/types/components/Heading/Heading.st.css.d.ts.map +1 -1
- package/dist/types/components/InputOverflow/InputOverflow.st.css.d.ts.map +1 -1
- package/dist/types/components/ListDragAndDrop/ListDragAndDropContext.d.ts +4 -2
- package/dist/types/components/ListDragAndDrop/ListDragAndDropContext.d.ts.map +1 -1
- package/dist/types/components/MaxHeightText/MaxHeightText.st.css.d.ts.map +1 -1
- package/dist/types/components/MaxLines/MaxLines.st.css.d.ts.map +1 -1
- package/dist/types/components/MultiBulkActionToolbar/MultiBulkActionToolbar.d.ts.map +1 -1
- package/dist/types/components/MultiBulkActionToolbar/MultiBulkActionToolbarState.d.ts +2 -2
- package/dist/types/components/MultiBulkActionToolbar/MultiBulkActionToolbarState.d.ts.map +1 -1
- package/dist/types/components/MultiLevelSorting/MultiLevelSortingCTAButton.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTable.d.ts +1 -1
- package/dist/types/components/NestedTable/NestedTable.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts +1 -1
- package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts.map +1 -1
- package/dist/types/components/{NestedTableDragAndDrop.d.ts → NestedTableDragAndDrop/NestedTableDragAndDrop.d.ts} +10 -1
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDrop.d.ts.map +1 -0
- package/dist/types/components/{CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.d.ts → NestedTableDragAndDrop/NestedTableDragAndDropContext.d.ts} +4 -4
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.d.ts.map +1 -0
- package/dist/types/components/{DragAndDrop → NestedTableDragAndDrop}/NestedTableDragAndDropState.d.ts +7 -5
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropState.d.ts.map +1 -0
- package/dist/types/components/PageWrapper/PageWrapperBase.d.ts.map +1 -1
- package/dist/types/components/PickerContent/PickerContent.st.css.d.ts.map +1 -1
- package/dist/types/components/SkeletonGrid/SkeletonGrid.d.ts.map +1 -1
- package/dist/types/components/Table/useTableSyncProps.d.ts.map +1 -1
- package/dist/types/components/TableDragAndDrop.d.ts +11 -2
- package/dist/types/components/TableDragAndDrop.d.ts.map +1 -1
- package/dist/types/components/{CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.d.ts → TableDragAndDropContext/TableDragAndDropContext.d.ts} +4 -4
- package/dist/types/components/TableDragAndDropContext/TableDragAndDropContext.d.ts.map +1 -0
- package/dist/types/components/TableDragAndDropContext/index.d.ts +2 -0
- package/dist/types/components/TableDragAndDropContext/index.d.ts.map +1 -0
- package/dist/types/components/TableGridSwitch/TableGridSwitch.uni.driver.d.ts +2 -1
- package/dist/types/components/TableGridSwitch/TableGridSwitch.uni.driver.d.ts.map +1 -1
- package/dist/types/components/TableGridSwitch/TableGridSwitchDragAndDrop.d.ts +18 -1
- package/dist/types/components/TableGridSwitch/TableGridSwitchDragAndDrop.d.ts.map +1 -1
- package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.d.ts +4 -2
- package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.d.ts.map +1 -1
- package/dist/types/components/TableSkeleton/TableSkeleton.d.ts.map +1 -1
- package/dist/types/components/ToolbarCollection/ToolbarCollection.d.ts +1 -1
- package/dist/types/components/ToolbarCollection/useToolbarCollectionSyncProps.d.ts.map +1 -1
- package/dist/types/components/ToolbarItemBox/ToolbarItemBox.st.css.d.ts.map +1 -1
- package/dist/types/components/common.st.css.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useColumnsSyncProps.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/state/CustomColumnsDragAndDropState.d.ts +7 -3
- package/dist/types/state/CustomColumnsDragAndDropState.d.ts.map +1 -1
- package/dist/types/state/CustomColumnsState.d.ts +4 -1
- package/dist/types/state/CustomColumnsState.d.ts.map +1 -1
- package/dist/types/state/GridBaseState.d.ts +9 -3
- package/dist/types/state/GridBaseState.d.ts.map +1 -1
- package/dist/types/state/GridFoldersState.d.ts.map +1 -1
- package/dist/types/state/MultiLevelSortingDragAndDrop.d.ts +7 -1
- package/dist/types/state/MultiLevelSortingDragAndDrop.d.ts.map +1 -1
- package/dist/types/state/MultiLevelSortingState.d.ts +4 -1
- package/dist/types/state/MultiLevelSortingState.d.ts.map +1 -1
- package/dist/types/state/NestedTableState/NestedTableNestedModeState.d.ts +2 -0
- package/dist/types/state/NestedTableState/NestedTableNestedModeState.d.ts.map +1 -1
- package/dist/types/state/ResponsiveColumnsState.d.ts +7 -3
- package/dist/types/state/ResponsiveColumnsState.d.ts.map +1 -1
- package/dist/types/state/TableState.d.ts +3 -8
- package/dist/types/state/TableState.d.ts.map +1 -1
- package/dist/types/state/ToolbarCollectionState.d.ts +1 -3
- package/dist/types/state/ToolbarCollectionState.d.ts.map +1 -1
- package/dist/types/state/initCustomColumns.d.ts +8 -2
- package/dist/types/state/initCustomColumns.d.ts.map +1 -1
- package/dist/types/testkit/enzyme.d.ts +12 -6
- package/dist/types/testkit/enzyme.d.ts.map +1 -1
- package/dist/types/testkit/jsdom.d.ts +12 -6
- package/dist/types/testkit/jsdom.d.ts.map +1 -1
- package/dist/types/testkit/puppeteer.d.ts +12 -6
- package/dist/types/testkit/puppeteer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/dist/cjs/components/CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js.map +0 -1
- package/dist/cjs/components/CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js.map +0 -1
- package/dist/cjs/components/CollectionTableDragAndDropContext/index.js +0 -11
- package/dist/cjs/components/CollectionTableDragAndDropContext/index.js.map +0 -1
- package/dist/cjs/components/DragAndDrop/NestedDragAndDropState.js +0 -83
- package/dist/cjs/components/DragAndDrop/NestedDragAndDropState.js.map +0 -1
- package/dist/cjs/components/DragAndDrop/NestedTableDragAndDropState.js +0 -51
- package/dist/cjs/components/DragAndDrop/NestedTableDragAndDropState.js.map +0 -1
- package/dist/cjs/components/Grid/toGridItemActions.js.map +0 -1
- package/dist/cjs/components/NestedTableDragAndDrop.js +0 -18
- package/dist/cjs/components/NestedTableDragAndDrop.js.map +0 -1
- package/dist/esm/components/CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.js.map +0 -1
- package/dist/esm/components/CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.js.map +0 -1
- package/dist/esm/components/CollectionTableDragAndDropContext/index.js +0 -3
- package/dist/esm/components/CollectionTableDragAndDropContext/index.js.map +0 -1
- package/dist/esm/components/DragAndDrop/NestedDragAndDropState.js +0 -60
- package/dist/esm/components/DragAndDrop/NestedDragAndDropState.js.map +0 -1
- package/dist/esm/components/DragAndDrop/NestedTableDragAndDropState.js +0 -31
- package/dist/esm/components/DragAndDrop/NestedTableDragAndDropState.js.map +0 -1
- package/dist/esm/components/Grid/toGridItemActions.js.map +0 -1
- package/dist/esm/components/NestedTableDragAndDrop.js +0 -11
- package/dist/esm/components/NestedTableDragAndDrop.js.map +0 -1
- package/dist/types/components/CollectionTableDragAndDropContext/CollectionNestedTableDragAndDropContext.d.ts.map +0 -1
- package/dist/types/components/CollectionTableDragAndDropContext/CollectionTableDragAndDropContext.d.ts.map +0 -1
- package/dist/types/components/CollectionTableDragAndDropContext/index.d.ts +0 -3
- package/dist/types/components/CollectionTableDragAndDropContext/index.d.ts.map +0 -1
- package/dist/types/components/DragAndDrop/NestedDragAndDropState.d.ts +0 -17
- package/dist/types/components/DragAndDrop/NestedDragAndDropState.d.ts.map +0 -1
- package/dist/types/components/DragAndDrop/NestedTableDragAndDropState.d.ts.map +0 -1
- package/dist/types/components/Grid/toGridItemActions.d.ts.map +0 -1
- package/dist/types/components/NestedTableDragAndDrop.d.ts.map +0 -1
|
@@ -3,14 +3,15 @@
|
|
|
3
3
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
4
|
exports.__esModule = true;
|
|
5
5
|
exports.evaluateActionCell = evaluateActionCell;
|
|
6
|
-
exports.
|
|
6
|
+
exports.useGridItemActions = useGridItemActions;
|
|
7
7
|
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
9
|
var _designSystem = require("@wix/design-system");
|
|
10
10
|
var _wixUiIconsCommon = require("@wix/wix-ui-icons-common");
|
|
11
11
|
var _CollectionItemActionsHelper = require("../CollectionItemActions/CollectionItemActionsHelper");
|
|
12
12
|
var _getDefaultActionCellProps = require("../CollectionItemActions/getDefaultActionCellProps");
|
|
13
|
-
var
|
|
13
|
+
var _useExtensionMenuItems = require("../../hooks/useExtensionMenuItems");
|
|
14
|
+
var _jsxFileName = "/home/builduser/work/db7ea24852bc3350/packages/cairo/dist/cjs/components/Grid/useGridItemActions.tsx";
|
|
14
15
|
function evaluateActionCell({
|
|
15
16
|
actionCell,
|
|
16
17
|
item,
|
|
@@ -32,12 +33,11 @@ function evaluateActionCell({
|
|
|
32
33
|
}
|
|
33
34
|
return actionCell;
|
|
34
35
|
}
|
|
35
|
-
function
|
|
36
|
-
var _actionCell$gridState;
|
|
36
|
+
function useGridItemActions(actionCell) {
|
|
37
37
|
const actions = evaluateActionCell(actionCell);
|
|
38
38
|
let settingsMenu = null;
|
|
39
39
|
let primaryAction = null;
|
|
40
|
-
const extensionMenuItems = (
|
|
40
|
+
const extensionMenuItems = (0, _useExtensionMenuItems.useExtensionMenuItems)({
|
|
41
41
|
containerId: actions.containerId
|
|
42
42
|
});
|
|
43
43
|
const secondaryActionCellPropsWithBI = (0, _CollectionItemActionsHelper.createSecondaryActionCellPropWithBi)({
|
|
@@ -128,4 +128,4 @@ function toGridItemActions(actionCell) {
|
|
|
128
128
|
settingsMenu
|
|
129
129
|
};
|
|
130
130
|
}
|
|
131
|
-
//# sourceMappingURL=
|
|
131
|
+
//# sourceMappingURL=useGridItemActions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_designSystem","_wixUiIconsCommon","_CollectionItemActionsHelper","_getDefaultActionCellProps","_useExtensionMenuItems","_jsxFileName","evaluateActionCell","actionCell","item","index","gridState","keyedItem","itemActionsState","openConfirmDeleteModal","openConfirmModal","collection","useGridItemActions","actions","settingsMenu","primaryAction","extensionMenuItems","useExtensionMenuItems","containerId","secondaryActionCellPropsWithBI","createSecondaryActionCellPropWithBi","toolbarBIReporter","toolbar","actionCellProps","primaryActionCellPropsWithBI","createPrimaryActionCellPropsWithBI","label","text","onClick","disabled","disabledMessage","length","default","createElement","PopoverMenu","_extends2","popoverMenuProps","getDefaultActionCellProps","dataHook","triggerElement","toggle","close","IconButton","e","stopPropagation","reportOnPopoverMenuShow","onPointerDown","_dnd","undefined","onMouseLeave","skin","imagePlacement","size","priority","__self","__source","fileName","lineNumber","columnNumber","More","children","map","action","divider","Divider","key","icon","prefixIcon","rest","MenuItem"],"sources":["../../../../src/components/Grid/useGridItemActions.tsx"],"sourcesContent":["import React from 'react';\nimport { FiltersMap, KeyedItem } from '@wix/bex-core';\nimport { GridCardItemProps } from './GridCardItem';\nimport { GridBaseState, ItemActionsState } from '../../state';\nimport { ActionCellProps } from '../ActionCell';\nimport {\n CardGalleryItemProps,\n IconButton,\n PopoverMenu,\n} from '@wix/design-system';\nimport { More } from '@wix/wix-ui-icons-common';\nimport {\n createPrimaryActionCellPropsWithBI,\n createSecondaryActionCellPropWithBi,\n reportOnPopoverMenuShow,\n} from '../CollectionItemActions/CollectionItemActionsHelper';\nimport { getDefaultActionCellProps } from '../CollectionItemActions/getDefaultActionCellProps';\nimport { useExtensionMenuItems } from '../../hooks/useExtensionMenuItems';\n\ninterface ActionCell<T, F extends FiltersMap> {\n actionCell: GridCardItemProps<T, F>['actionCell'];\n item: T;\n index: number;\n gridState: GridBaseState<T, F>;\n keyedItem: KeyedItem<T>;\n itemActionsState: ItemActionsState<T, F>;\n}\n\nexport function evaluateActionCell<T, F extends FiltersMap>({\n actionCell,\n item,\n index,\n gridState,\n keyedItem,\n itemActionsState,\n}: ActionCell<T, F>): ActionCellProps {\n if (!actionCell) {\n return {};\n }\n\n if (typeof actionCell === 'function') {\n return actionCell(item, index, {\n openConfirmDeleteModal: itemActionsState.openConfirmDeleteModal,\n openConfirmModal: itemActionsState.openConfirmModal,\n collection: gridState.collection,\n keyedItem,\n });\n }\n\n return actionCell;\n}\n\nexport function useGridItemActions<T, F extends FiltersMap>(\n actionCell: ActionCell<T, F> & {\n itemActionsState: ItemActionsState<T, F>;\n imagePlacement: string;\n },\n) {\n const actions = evaluateActionCell(actionCell);\n\n let settingsMenu: CardGalleryItemProps['settingsMenu'] = null;\n let primaryAction: CardGalleryItemProps['primaryActionProps'] | null = null;\n\n const extensionMenuItems = useExtensionMenuItems({\n containerId: actions.containerId,\n });\n\n const secondaryActionCellPropsWithBI = createSecondaryActionCellPropWithBi({\n toolbarBIReporter: actionCell.gridState.toolbar.toolbarBIReporter,\n actionCellProps: actions,\n keyedItem: actionCell.keyedItem,\n extensionMenuItems,\n });\n\n const primaryActionCellPropsWithBI = createPrimaryActionCellPropsWithBI(\n actionCell.gridState.toolbar.toolbarBIReporter,\n actions,\n actionCell.keyedItem,\n );\n\n if (primaryActionCellPropsWithBI) {\n primaryAction = {\n label: primaryActionCellPropsWithBI.text,\n onClick: primaryActionCellPropsWithBI.onClick,\n disabled: primaryActionCellPropsWithBI.disabled,\n disabledMessage: primaryActionCellPropsWithBI.disabledMessage,\n };\n }\n\n if (\n secondaryActionCellPropsWithBI &&\n secondaryActionCellPropsWithBI.length > 0\n ) {\n settingsMenu = (\n <PopoverMenu\n {...actions.popoverMenuProps}\n {...getDefaultActionCellProps()}\n dataHook=\"popover\"\n triggerElement={({ toggle, close }) => (\n <IconButton\n dataHook=\"popover-trigger\"\n onClick={(e) => {\n e.stopPropagation();\n toggle();\n reportOnPopoverMenuShow(\n actionCell.gridState.toolbar.toolbarBIReporter,\n actions,\n actionCell.keyedItem,\n );\n }}\n onPointerDown={\n actionCell.gridState._dnd ? (e) => e.stopPropagation() : undefined\n }\n onMouseLeave={close}\n skin={actionCell.imagePlacement === 'top' ? 'light' : 'standard'}\n size=\"small\"\n priority=\"secondary\"\n >\n <More />\n </IconButton>\n )}\n children={secondaryActionCellPropsWithBI.map((action, index) => {\n if (action.divider) {\n return <PopoverMenu.Divider key={index} />;\n }\n\n const { icon: prefixIcon, ...rest } = action;\n\n return (\n <PopoverMenu.MenuItem\n key={index}\n prefixIcon={prefixIcon}\n {...rest}\n />\n );\n })}\n />\n );\n }\n\n return {\n primaryAction,\n settingsMenu,\n };\n}\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAKA,IAAAC,aAAA,GAAAD,OAAA;AAKA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,4BAAA,GAAAH,OAAA;AAKA,IAAAI,0BAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAL,OAAA;AAA0E,IAAAM,YAAA;AAWnE,SAASC,kBAAkBA,CAA0B;EAC1DC,UAAU;EACVC,IAAI;EACJC,KAAK;EACLC,SAAS;EACTC,SAAS;EACTC;AACgB,CAAC,EAAmB;EACpC,IAAI,CAACL,UAAU,EAAE;IACf,OAAO,CAAC,CAAC;EACX;EAEA,IAAI,OAAOA,UAAU,KAAK,UAAU,EAAE;IACpC,OAAOA,UAAU,CAACC,IAAI,EAAEC,KAAK,EAAE;MAC7BI,sBAAsB,EAAED,gBAAgB,CAACC,sBAAsB;MAC/DC,gBAAgB,E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,UAAA;cAAAC,YAAA;YAAA;UAAA,CAAE,CAAC;QAC5C;QAEA,MAAM;UAAEQ,IAAI,EAAEC,UAAU;UAAE,GAAGC;QAAK,CAAC,GAAGN,MAAM;QAE5C,oBACErE,MAAA,CAAAuC,OAAA,CAAAC,aAAA,CAACrC,aAAA,CAAAsC,WAAW,CAACmC,QAAQ,MAAAlC,SAAA,CAAAH,OAAA;UACnBiC,GAAG,EAAE5D,KAAM;UACX8D,UAAU,EAAEA;QAAW,GACnBC,IAAI;UAAAd,MAAA;UAAAC,QAAA;YAAAC,QAAA,EAAAvD,YAAA;YAAAwD,UAAA;YAAAC,YAAA;UAAA;QAAA,EACT,CAAC;MAEN,CAAC,CAAE;MAAAJ,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAvD,YAAA;QAAAwD,UAAA;QAAAC,YAAA;MAAA;IAAA,EACJ,CACF;EACH;EAEA,OAAO;IACL3C,aAAa;IACbD;EACF,CAAC;AACH","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 {
|
|
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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EAEV,OAAO,IAAAO,kBAAW,EAChB,CAACC,KAAK,EAAE;IAAEC,OAAO,EAAEC,QAAQ;IAAEC;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":[]}
|
|
@@ -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 {
|
|
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
|
|
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.
|
|
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:
|
|
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:
|
|
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:
|
|
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","
|
|
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 G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F,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":[]}
|
|
@@ -16,7 +16,9 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
|
|
|
16
16
|
function _GridSectionAndRepeater(props) {
|
|
17
17
|
const {
|
|
18
18
|
sectionDescriptor,
|
|
19
|
-
imagePlacement
|
|
19
|
+
imagePlacement,
|
|
20
|
+
layoutType,
|
|
21
|
+
dragAndDrop
|
|
20
22
|
} = props;
|
|
21
23
|
const {
|
|
22
24
|
range
|
|
@@ -24,7 +26,9 @@ function _GridSectionAndRepeater(props) {
|
|
|
24
26
|
const [state] = (0, _react.useState)(() => new _GridSectionsSectionState.GridSectionsSectionState({
|
|
25
27
|
gridSections: props.state,
|
|
26
28
|
sectionDescriptor,
|
|
27
|
-
imagePlacement
|
|
29
|
+
imagePlacement,
|
|
30
|
+
layoutType,
|
|
31
|
+
draggable: dragAndDrop ? 'draggable' : 'none'
|
|
28
32
|
}));
|
|
29
33
|
return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
|
|
30
34
|
direction: "vertical",
|
|
@@ -33,7 +37,7 @@ function _GridSectionAndRepeater(props) {
|
|
|
33
37
|
__self: this,
|
|
34
38
|
__source: {
|
|
35
39
|
fileName: _jsxFileName,
|
|
36
|
-
lineNumber:
|
|
40
|
+
lineNumber: 35,
|
|
37
41
|
columnNumber: 5
|
|
38
42
|
}
|
|
39
43
|
}, /*#__PURE__*/_react.default.createElement(_GridSectionHeader.GridSectionHeader, {
|
|
@@ -42,17 +46,18 @@ function _GridSectionAndRepeater(props) {
|
|
|
42
46
|
__self: this,
|
|
43
47
|
__source: {
|
|
44
48
|
fileName: _jsxFileName,
|
|
45
|
-
lineNumber:
|
|
49
|
+
lineNumber: 36,
|
|
46
50
|
columnNumber: 7
|
|
47
51
|
}
|
|
48
52
|
}), /*#__PURE__*/_react.default.createElement(_GridContent.GridContent, (0, _extends2.default)({}, props, {
|
|
53
|
+
paddingTop: layoutType === 'list' ? undefined : 'SP4',
|
|
49
54
|
range: range,
|
|
50
55
|
state: state.gridBase,
|
|
51
56
|
withInfiniteScrollLoader: state.isLast,
|
|
52
57
|
__self: this,
|
|
53
58
|
__source: {
|
|
54
59
|
fileName: _jsxFileName,
|
|
55
|
-
lineNumber:
|
|
60
|
+
lineNumber: 38,
|
|
56
61
|
columnNumber: 7
|
|
57
62
|
}
|
|
58
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","range","state","useState","GridSectionsSectionState","gridSections","createElement","Box","direction","width","dataHook","__self","__source","fileName","lineNumber","columnNumber","GridSectionHeader","GridContent","_extends2","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 } = props;\n\n const { range } = sectionDescriptor;\n\n const [state] = useState(\n () =>\n new GridSectionsSectionState({\n gridSections: props.state,\n sectionDescriptor,\n imagePlacement,\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 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,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,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CAAA,SAAAG,CAAA,GAAAP,CAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAb,CAAA,EAAAc,CAAA,UAAAG,CAAA,KAAAA,CAAA,CAAAV,GAAA,IAAAU,CAAA,CAAAC,GAAA,IAAAP,MAAA,CAAAC,cAAA,CAAAJ,CAAA,EAAAM,CAAA,EAAAG,CAAA,IAAAT,CAAA,CAAAM,CAAA,IAAAd,CAAA,CAAAc,CAAA,YAAAN,CAAA,CAAAH,OAAA,GAAAL,CAAA,EAAAG,CAAA,IAAAA,CAAA,CAAAe,GAAA,CAAAlB,CAAA,EAAAQ,CAAA,GAAAA,CAAA;AAQtE,SAASW,uBAAuBA,CAC9BC,KAAwC,EACxC;EACA,MAAM;IAAEC,iBAAiB;IAAEC;
|
|
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,OAAA;AACA,IAAA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AAA;IAAA;EAAA,EACxC,CACE,CAAC;AAEV;AAEO,MAAMS,sBAAsB,GAAAC,OAAA,CAAAD,sBAAA,GAAG,IAAAE,uBAAQ,EAAChC,uBAAuB,CAAC","ignoreList":[]}
|
|
@@ -13,28 +13,34 @@ function _GridSectionHeader(props) {
|
|
|
13
13
|
sectionDescriptor,
|
|
14
14
|
state
|
|
15
15
|
} = props;
|
|
16
|
+
const {
|
|
17
|
+
gridBase: {
|
|
18
|
+
layoutType
|
|
19
|
+
}
|
|
20
|
+
} = state;
|
|
16
21
|
const {
|
|
17
22
|
section
|
|
18
23
|
} = sectionDescriptor;
|
|
19
24
|
return /*#__PURE__*/_react.default.createElement(_designSystem.SectionHeader, {
|
|
20
25
|
dataHook: "grid-section-header",
|
|
21
26
|
title: section.title,
|
|
22
|
-
skin:
|
|
27
|
+
skin: layoutType === 'list' ? 'light' : 'neutral',
|
|
23
28
|
divider: "none",
|
|
29
|
+
size: "small",
|
|
24
30
|
suffix: /*#__PURE__*/_react.default.createElement(_GridSectionHeaderActionBar.GridSectionHeaderActionBar, {
|
|
25
31
|
section: section,
|
|
26
32
|
state: state,
|
|
27
33
|
__self: this,
|
|
28
34
|
__source: {
|
|
29
35
|
fileName: _jsxFileName,
|
|
30
|
-
lineNumber:
|
|
36
|
+
lineNumber: 32,
|
|
31
37
|
columnNumber: 15
|
|
32
38
|
}
|
|
33
39
|
}),
|
|
34
40
|
__self: this,
|
|
35
41
|
__source: {
|
|
36
42
|
fileName: _jsxFileName,
|
|
37
|
-
lineNumber:
|
|
43
|
+
lineNumber: 26,
|
|
38
44
|
columnNumber: 5
|
|
39
45
|
}
|
|
40
46
|
});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_designSystem","require","_react","_interopRequireDefault","_mobxReactLite","_GridSectionHeaderActionBar","_jsxFileName","_GridSectionHeader","props","sectionDescriptor","state","section","default","createElement","SectionHeader","dataHook","title","skin","divider","suffix","GridSectionHeaderActionBar","__self","__source","fileName","lineNumber","columnNumber","GridSectionHeader","exports","observer"],"sources":["../../../../src/components/GridSections/GridSectionHeader.tsx"],"sourcesContent":["import { SectionHeader } from '@wix/design-system';\nimport React from 'react';\nimport { FiltersMap } from '@wix/bex-core';\nimport { SectionRange } from './GridSectionsState';\nimport { observer } from 'mobx-react-lite';\nimport { GridSectionHeaderActionBar } from './GridSectionHeaderActionBar';\nimport { GridSectionsSectionState } from './GridSectionsSectionState';\n\nexport interface GridSectionHeaderProps<T, F extends FiltersMap> {\n sectionDescriptor: SectionRange;\n state: GridSectionsSectionState<T, F>;\n}\n\nfunction _GridSectionHeader<T, F extends FiltersMap>(\n props: GridSectionHeaderProps<T, F>,\n) {\n const { sectionDescriptor, state } = props;\n\n const { section } = sectionDescriptor;\n\n return (\n <SectionHeader\n dataHook=\"grid-section-header\"\n title={section.title}\n skin=\"
|
|
1
|
+
{"version":3,"names":["_designSystem","require","_react","_interopRequireDefault","_mobxReactLite","_GridSectionHeaderActionBar","_jsxFileName","_GridSectionHeader","props","sectionDescriptor","state","gridBase","layoutType","section","default","createElement","SectionHeader","dataHook","title","skin","divider","size","suffix","GridSectionHeaderActionBar","__self","__source","fileName","lineNumber","columnNumber","GridSectionHeader","exports","observer"],"sources":["../../../../src/components/GridSections/GridSectionHeader.tsx"],"sourcesContent":["import { SectionHeader } from '@wix/design-system';\nimport React from 'react';\nimport { FiltersMap } from '@wix/bex-core';\nimport { SectionRange } from './GridSectionsState';\nimport { observer } from 'mobx-react-lite';\nimport { GridSectionHeaderActionBar } from './GridSectionHeaderActionBar';\nimport { GridSectionsSectionState } from './GridSectionsSectionState';\n\nexport interface GridSectionHeaderProps<T, F extends FiltersMap> {\n sectionDescriptor: SectionRange;\n state: GridSectionsSectionState<T, F>;\n}\n\nfunction _GridSectionHeader<T, F extends FiltersMap>(\n props: GridSectionHeaderProps<T, F>,\n) {\n const { sectionDescriptor, state } = props;\n\n const {\n gridBase: { layoutType },\n } = state;\n\n const { section } = sectionDescriptor;\n\n return (\n <SectionHeader\n dataHook=\"grid-section-header\"\n title={section.title}\n skin={layoutType === 'list' ? 'light' : 'neutral'}\n divider=\"none\"\n size=\"small\"\n suffix={<GridSectionHeaderActionBar section={section} state={state} />}\n />\n );\n}\n\nexport const GridSectionHeader = observer(_GridSectionHeader);\n"],"mappings":";;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,2BAAA,GAAAJ,OAAA;AAA0E,IAAAK,YAAA;AAQ1E,SAASC,kBAAkBA,CACzBC,KAAmC,EACnC;EACA,MAAM;IAAEC,iBAAiB;IAAEC;EAAM,CAAC,GAAGF,KAAK;EAE1C,MAAM;IACJG,QAAQ,EAAE;MAAEC;IAAW;EACzB,CAAC,GAAGF,KAAK;EAET,MAAM;IAAEG;EAAQ,CAAC,GAAGJ,iBAAiB;EAErC,oBACEP,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACf,aAAA,CAAAgB,aAAa;IACZC,QAAQ,EAAC,qBAAqB;IAC9BC,KAAK,EAAEL,OAAO,CAACK,KAAM;IACrBC,IAAI,EAAEP,UAAU,KAAK,MAAM,GAAG,OAAO,GAAG,SAAU;IAClDQ,OAAO,EAAC,MAAM;IACdC,IAAI,EAAC,OAAO;IACZC,MAAM,eAAEpB,MAAA,CAAAY,OAAA,CAAAC,aAAA,CAACV,2BAAA,CAAAkB,0BAA0B;MAACV,OAAO,EAAEA,OAAQ;MAACH,KAAK,EAAEA,KAAM;MAAAc,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAApB,YAAA;QAAAqB,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CAAE;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAApB,YAAA;MAAAqB,UAAA;MAAAC,YAAA;IAAA;EAAA,CACxE,CAAC;AAEN;AAEO,MAAMC,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,GAAG,IAAAE,uBAAQ,EAACxB,kBAAkB,CAAC","ignoreList":[]}
|
|
@@ -9,14 +9,16 @@ var _mobxReactLite = require("mobx-react-lite");
|
|
|
9
9
|
var _GridSectionAndRepeater = require("./GridSectionAndRepeater");
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
var _mobx = require("mobx");
|
|
12
|
-
var
|
|
12
|
+
var _designSystem = require("@wix/design-system");
|
|
13
|
+
var _GridSectionsSingleSkeletonGrid = require("./GridSectionsSingleSkeletonGrid");
|
|
13
14
|
var _jsxFileName = "/home/builduser/work/db7ea24852bc3350/packages/cairo/dist/cjs/components/GridSections/GridSectionsContent.tsx";
|
|
14
15
|
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); }
|
|
15
16
|
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; }
|
|
16
17
|
function _GridSectionsContent(props) {
|
|
17
18
|
const {
|
|
18
19
|
state: grid,
|
|
19
|
-
renderSection
|
|
20
|
+
renderSection,
|
|
21
|
+
layoutType
|
|
20
22
|
} = props;
|
|
21
23
|
const {
|
|
22
24
|
toolbar
|
|
@@ -42,28 +44,42 @@ function _GridSectionsContent(props) {
|
|
|
42
44
|
}
|
|
43
45
|
});
|
|
44
46
|
}, [renderSection]);
|
|
47
|
+
let child;
|
|
45
48
|
if (!sections.length || showInitialLoader || showRefreshLoader) {
|
|
46
|
-
|
|
49
|
+
child = /*#__PURE__*/_react.default.createElement(_GridSectionsSingleSkeletonGrid.GridSectionsSingleSkeletonGrid, (0, _extends2.default)({}, props, {
|
|
47
50
|
state: state,
|
|
48
51
|
__self: this,
|
|
49
52
|
__source: {
|
|
50
53
|
fileName: _jsxFileName,
|
|
51
|
-
lineNumber:
|
|
52
|
-
columnNumber:
|
|
54
|
+
lineNumber: 57,
|
|
55
|
+
columnNumber: 13
|
|
53
56
|
}
|
|
54
57
|
}));
|
|
58
|
+
} else {
|
|
59
|
+
child = /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, sections.map(sectionDescriptor => /*#__PURE__*/_react.default.createElement(_GridSectionAndRepeater.GridSectionAndRepeater, (0, _extends2.default)({}, props, {
|
|
60
|
+
key: sectionDescriptor.section.id,
|
|
61
|
+
sectionDescriptor: sectionDescriptor,
|
|
62
|
+
state: state,
|
|
63
|
+
__self: this,
|
|
64
|
+
__source: {
|
|
65
|
+
fileName: _jsxFileName,
|
|
66
|
+
lineNumber: 62,
|
|
67
|
+
columnNumber: 11
|
|
68
|
+
}
|
|
69
|
+
}))));
|
|
55
70
|
}
|
|
56
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
71
|
+
return /*#__PURE__*/_react.default.createElement(_designSystem.Box, {
|
|
72
|
+
direction: "vertical",
|
|
73
|
+
width: "100%",
|
|
74
|
+
paddingTop: layoutType === 'list' ? 'SP2' : undefined,
|
|
75
|
+
paddingBottom: layoutType === 'list' ? 'SP2' : undefined,
|
|
60
76
|
__self: this,
|
|
61
77
|
__source: {
|
|
62
78
|
fileName: _jsxFileName,
|
|
63
|
-
lineNumber:
|
|
64
|
-
columnNumber:
|
|
79
|
+
lineNumber: 74,
|
|
80
|
+
columnNumber: 5
|
|
65
81
|
}
|
|
66
|
-
})
|
|
82
|
+
}, child);
|
|
67
83
|
}
|
|
68
84
|
const GridSectionsContent = exports.GridSectionsContent = (0, _mobxReactLite.observer)(_GridSectionsContent);
|
|
69
85
|
//# sourceMappingURL=GridSectionsContent.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_GridSectionsState","require","_mobxReactLite","_GridSectionAndRepeater","_react","_interopRequireWildcard","_mobx","
|
|
1
|
+
{"version":3,"names":["_GridSectionsState","require","_mobxReactLite","_GridSectionAndRepeater","_react","_interopRequireWildcard","_mobx","_designSystem","_GridSectionsSingleSkeletonGrid","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_GridSectionsContent","props","state","grid","renderSection","layoutType","toolbar","showInitialLoader","multi","showRefreshLoader","useState","_sections","GridSectionsState","collection","sections","useEffect","runInAction","child","length","createElement","GridSectionsSingleSkeletonGrid","_extends2","__self","__source","fileName","lineNumber","columnNumber","Fragment","map","sectionDescriptor","GridSectionAndRepeater","key","section","id","Box","direction","width","paddingTop","undefined","paddingBottom","GridSectionsContent","exports","observer"],"sources":["../../../../src/components/GridSections/GridSectionsContent.tsx"],"sourcesContent":["import { GridSectionsState, Section } from './GridSectionsState';\nimport { CollectionState, FiltersMap } from '@wix/bex-core';\nimport { observer } from 'mobx-react-lite';\nimport { GridSectionAndRepeater } from './GridSectionAndRepeater';\nimport React, { useEffect, useState } from 'react';\nimport { GridContentBaseProps } from '../Grid/GridContent';\nimport { GridBaseState, ToolbarCollectionState } from '../../state';\nimport { runInAction } from 'mobx';\nimport { Box } from '@wix/design-system';\nimport { GridSectionsSingleSkeletonGrid } from './GridSectionsSingleSkeletonGrid';\n\nexport interface GridSectionsContentProps<T, F extends FiltersMap>\n extends GridContentBaseProps<T, F> {\n state: {\n toolbar: ToolbarCollectionState<T, F>;\n collection: CollectionState<T, F>;\n _grid?: GridBaseState<T, F>;\n _sections?: GridSectionsState<T, F>;\n };\n renderSection?: (item: T) => Section;\n}\n\nfunction _GridSectionsContent<T, F extends FiltersMap>(\n props: GridSectionsContentProps<T, F>,\n) {\n const { state: grid, renderSection, layoutType } = props;\n\n const { toolbar } = grid;\n\n const {\n showInitialLoader,\n multi: { showRefreshLoader },\n } = toolbar;\n\n const [state] = useState(\n () =>\n (grid._sections ??= new GridSectionsState({\n toolbar: grid.toolbar,\n collection: grid.collection,\n renderSection,\n })),\n );\n\n const { sections } = state;\n\n useEffect(() => {\n runInAction(() => {\n if (renderSection) {\n state.renderSection = renderSection;\n }\n });\n }, [renderSection]);\n\n let child;\n\n if (!sections.length || showInitialLoader || showRefreshLoader) {\n child = <GridSectionsSingleSkeletonGrid {...props} state={state} />;\n } else {\n child = (\n <>\n {sections.map((sectionDescriptor) => (\n <GridSectionAndRepeater\n {...props}\n key={sectionDescriptor.section.id}\n sectionDescriptor={sectionDescriptor}\n state={state}\n />\n ))}\n </>\n );\n }\n\n return (\n <Box\n direction=\"vertical\"\n width=\"100%\"\n paddingTop={layoutType === 'list' ? 'SP2' : undefined}\n paddingBottom={layoutType === 'list' ? 'SP2' : undefined}\n >\n {child}\n </Box>\n );\n}\n\nexport const GridSectionsContent = observer(_GridSectionsContent);\n"],"mappings":";;;;;;AAAA,IAAAA,kBAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,uBAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAGA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,aAAA,GAAAN,OAAA;AACA,IAAAO,+BAAA,GAAAP,OAAA;AAAkF,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,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,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C,aAAA,CAAC1C,aAAA,CAAAyD,GAAG;IACFC,SAAS,EAAC,UAAU;IACpBC,KAAK,EAAC,MAAM;IACZC,UAAU,EAAEhC,UAAU,KAAK,MAAM,GAAG,KAAK,GAAGiC,SAAU;IACtDC,aAAa,EAAElC,UAAU,KAAK,MAAM,GAAG,KAAK,GAAGiC,SAAU;IAAAhB,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAA7C,YAAA;MAAA8C,UAAA;MAAAC,YAAA;IAAA;EAAA,GAExDT,KACE,CAAC;AAEV;AAEO,MAAMuB,mBAAmB,GAAAC,OAAA,CAAAD,mBAAA,GAAG,IAAAE,uBAAQ,EAAC1C,oBAAoB,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
|
|
@@ -25,7 +27,9 @@ class GridSectionsSectionState {
|
|
|
25
27
|
collection: toolbar.collection,
|
|
26
28
|
sizePreset: imagePlacement ? _state.gridSizePresets[imagePlacement] : _state.topGridSizePreset,
|
|
27
29
|
range: params.sectionDescriptor.range,
|
|
28
|
-
parentState: this.gridSections
|
|
30
|
+
parentState: this.gridSections,
|
|
31
|
+
layoutType,
|
|
32
|
+
draggable
|
|
29
33
|
});
|
|
30
34
|
(0, _mobx.makeObservable)(this, {
|
|
31
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","makeObservable","isLast","computed","_sections","section","sections","length","id","exports"],"sources":["../../../../src/components/GridSections/GridSectionsSectionState.ts"],"sourcesContent":["import {\n GridBaseState,\n gridSizePresets,\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}\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 });\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;
|
|
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":[]}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
exports.__esModule = true;
|
|
5
|
+
exports.GridSectionsSingleSkeletonGrid = GridSectionsSingleSkeletonGrid;
|
|
6
|
+
var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
|
|
7
|
+
var _state = require("../../state");
|
|
8
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
|
+
var _GridContent = require("../Grid/GridContent");
|
|
10
|
+
var _jsxFileName = "/home/builduser/work/db7ea24852bc3350/packages/cairo/dist/cjs/components/GridSections/GridSectionsSingleSkeletonGrid.tsx";
|
|
11
|
+
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); }
|
|
12
|
+
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; }
|
|
13
|
+
function GridSectionsSingleSkeletonGrid(props) {
|
|
14
|
+
const {
|
|
15
|
+
range,
|
|
16
|
+
imagePlacement,
|
|
17
|
+
state: parentState,
|
|
18
|
+
layoutType
|
|
19
|
+
} = props;
|
|
20
|
+
const {
|
|
21
|
+
toolbar,
|
|
22
|
+
collection
|
|
23
|
+
} = parentState;
|
|
24
|
+
const [state] = (0, _react.useState)(() => new _state.GridBaseState({
|
|
25
|
+
container: toolbar.container,
|
|
26
|
+
toolbar: toolbar,
|
|
27
|
+
collection,
|
|
28
|
+
sizePreset: imagePlacement ? _state.gridSizePresets[imagePlacement] : _state.topGridSizePreset,
|
|
29
|
+
range,
|
|
30
|
+
parentState,
|
|
31
|
+
layoutType
|
|
32
|
+
}));
|
|
33
|
+
return /*#__PURE__*/_react.default.createElement(_GridContent.GridContent, (0, _extends2.default)({}, props, {
|
|
34
|
+
paddingTop: layoutType === 'list' ? 'SP2' : 'SP4',
|
|
35
|
+
state: state,
|
|
36
|
+
withInfiniteScrollLoader: true,
|
|
37
|
+
__self: this,
|
|
38
|
+
__source: {
|
|
39
|
+
fileName: _jsxFileName,
|
|
40
|
+
lineNumber: 45,
|
|
41
|
+
columnNumber: 5
|
|
42
|
+
}
|
|
43
|
+
}));
|
|
44
|
+
}
|
|
45
|
+
//# sourceMappingURL=GridSectionsSingleSkeletonGrid.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_state","require","_react","_interopRequireWildcard","_GridContent","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","GridSectionsSingleSkeletonGrid","props","range","imagePlacement","state","parentState","layoutType","toolbar","collection","useState","GridBaseState","container","sizePreset","gridSizePresets","topGridSizePreset","createElement","GridContent","_extends2","paddingTop","withInfiniteScrollLoader","__self","__source","fileName","lineNumber","columnNumber"],"sources":["../../../../src/components/GridSections/GridSectionsSingleSkeletonGrid.tsx"],"sourcesContent":["import { CollectionState, FiltersMap } from '@wix/bex-core';\nimport {\n GridBaseState,\n gridSizePresets,\n ToolbarCollectionState,\n topGridSizePreset,\n} from '../../state';\nimport React, { useState } from 'react';\nimport { GridContent, GridContentBaseProps } from '../Grid/GridContent';\n\nexport interface GridSectionsSingleSkeletonGridProps<T, F extends FiltersMap>\n extends GridContentBaseProps<T, F> {\n state: {\n toolbar: ToolbarCollectionState<T, F>;\n collection: CollectionState<T, F>;\n _subGrids?: GridBaseState<T, F>[];\n };\n range?: { start: number; length: number };\n}\n\nexport function GridSectionsSingleSkeletonGrid<\n T,\n F extends FiltersMap = FiltersMap,\n>(props: GridSectionsSingleSkeletonGridProps<T, F>) {\n const { range, imagePlacement, state: parentState, layoutType } = props;\n\n const { toolbar, collection } = parentState;\n\n const [state] = useState(\n () =>\n new GridBaseState({\n container: toolbar.container,\n toolbar: toolbar as ToolbarCollectionState<unknown, Partial<F>>,\n collection,\n sizePreset: imagePlacement\n ? gridSizePresets[imagePlacement]\n : topGridSizePreset,\n range,\n parentState,\n layoutType,\n }),\n );\n\n return (\n <GridContent\n {...props}\n paddingTop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