@wix/patterns 1.81.0 → 1.83.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/BulkActionToolbar/BulkActionToolbar.driver.js +1 -1
- package/dist/cjs/components/BulkActionToolbar/BulkActionToolbar.driver.js.map +1 -1
- package/dist/cjs/components/CardContainer/CardContainer.js +17 -5
- package/dist/cjs/components/CardContainer/CardContainer.js.map +1 -1
- 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/CollectionCard/CollectionCard.js +3 -3
- package/dist/cjs/components/CollectionCard/CollectionCard.js.map +1 -1
- package/dist/cjs/components/CollectionErrorState/CollectionErrorState.js +23 -0
- package/dist/cjs/components/CollectionErrorState/CollectionErrorState.js.map +1 -0
- package/dist/cjs/components/CollectionErrorState/index.js +10 -0
- package/dist/cjs/components/CollectionErrorState/index.js.map +1 -0
- package/dist/cjs/components/CollectionPageHeaderNew/CollectionPageHeader.js.map +1 -1
- package/dist/cjs/components/CollectionPageNew/CollectionPage.uni.driver.js +1 -0
- package/dist/cjs/components/CollectionPageNew/CollectionPage.uni.driver.js.map +1 -1
- package/dist/cjs/components/CollectionTable/CollectionTable.js +13 -12
- 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/CustomFieldsWidget/CustomFieldsWidget.js +26 -15
- package/dist/cjs/components/CustomFieldsWidget/CustomFieldsWidget.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/CollectionDragAndDropState.js +0 -1
- package/dist/cjs/components/DragAndDrop/CollectionDragAndDropState.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/DragAndDrop.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/DragAndDropAnnouncements.js +6 -3
- package/dist/cjs/components/DragAndDrop/DragAndDropAnnouncements.js.map +1 -1
- package/dist/cjs/components/DragAndDrop/DragAndDropState.js +18 -14
- package/dist/cjs/components/DragAndDrop/DragAndDropState.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/ErrorCard/ErrorCard.js +9 -18
- package/dist/cjs/components/ErrorCard/ErrorCard.js.map +1 -1
- package/dist/cjs/components/ErrorCard/ErrorCard.uni.driver.js +1 -1
- package/dist/cjs/components/ErrorCard/ErrorCard.uni.driver.js.map +1 -1
- package/dist/cjs/components/ErrorState/ErrorState.js +3 -3
- package/dist/cjs/components/ErrorState/ErrorState.js.map +1 -1
- package/dist/cjs/components/ErrorState/OfflineErrorState.js +1 -1
- package/dist/cjs/components/ErrorState/OfflineErrorState.js.map +1 -1
- package/dist/cjs/components/ExportButton/ExportButton.js +1 -1
- package/dist/cjs/components/ExportButton/ExportButton.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 +9 -8
- package/dist/cjs/components/Grid/Grid.js.map +1 -1
- package/dist/cjs/components/Grid/GridCardItem.js +1 -1
- package/dist/cjs/components/Grid/GridCardItem.js.map +1 -1
- package/dist/cjs/components/Grid/GridFolders.js +9 -8
- package/dist/cjs/components/Grid/GridFolders.js.map +1 -1
- package/dist/cjs/components/Grid/GridFoldersPlaceholderStates.js +2 -2
- package/dist/cjs/components/Grid/GridFoldersPlaceholderStates.js.map +1 -1
- package/dist/cjs/components/Grid/GridPlaceholderStates.js +3 -2
- package/dist/cjs/components/Grid/GridPlaceholderStates.js.map +1 -1
- package/dist/cjs/components/GridDragAndDropDndKit/DraggableCardOverlay.js +1 -1
- package/dist/cjs/components/GridDragAndDropDndKit/DraggableCardOverlay.js.map +1 -1
- package/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.js +8 -4
- package/dist/cjs/components/GridDragAndDropDndKit/GridSortableContext.js.map +1 -1
- package/dist/cjs/components/GridDragAndDropDndKit/dndTestEventHandlers.js +2 -2
- package/dist/cjs/components/GridDragAndDropDndKit/dndTestEventHandlers.js.map +1 -1
- 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 +8 -4
- package/dist/cjs/components/ListDragAndDrop/ListDragAndDropContext.js.map +1 -1
- package/dist/cjs/components/LoadingRow/LoadingRow.st.css.js +3 -3
- package/dist/cjs/components/LoadingRow/LoadingRow.st.css.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/ExploreAppsState.js +1 -1
- package/dist/cjs/components/MoreActions/ExploreAppsState.js.map +1 -1
- package/dist/cjs/components/MoreActions/MoreActionsBase.js +18 -9
- package/dist/cjs/components/MoreActions/MoreActionsBase.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/NestedTable/NestedTable.js +4 -4
- package/dist/cjs/components/NestedTable/NestedTable.js.map +1 -1
- package/dist/cjs/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.js +2 -2
- package/dist/cjs/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.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 +9 -13
- package/dist/cjs/components/NestedTable/NestedTableWSRTable.js.map +1 -1
- package/dist/cjs/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js +2 -2
- package/dist/cjs/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js.map +1 -1
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js +2 -4
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js.map +1 -1
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js +14 -8
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js.map +1 -1
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.js +2 -2
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.js.map +1 -1
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js +1 -3
- package/dist/cjs/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js.map +1 -1
- package/dist/cjs/components/PageWrapper/PageWrapper.uni.driver.js +1 -0
- package/dist/cjs/components/PageWrapper/PageWrapper.uni.driver.js.map +1 -1
- package/dist/cjs/components/PageWrapper/PageWrapperBase.js +1 -0
- 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/PlaceholderStates/PlaceholderStatesBase.js +3 -3
- package/dist/cjs/components/PlaceholderStates/PlaceholderStatesBase.js.map +1 -1
- package/dist/cjs/components/Router/PatternsReactRouter.js +1 -1
- package/dist/cjs/components/Router/PatternsReactRouter.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/SlidingModal/SlidingModal.st.css.js +2 -2
- package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js.map +1 -1
- package/dist/cjs/components/Table/TableBaseRow.js +2 -2
- package/dist/cjs/components/Table/TableBaseRow.js.map +1 -1
- package/dist/cjs/components/Table/TableVirtualHeader.st.css.js +2 -2
- package/dist/cjs/components/Table/TableVirtualHeader.st.css.js.map +1 -1
- package/dist/cjs/components/Table/useTableBaseRow.js +1 -1
- package/dist/cjs/components/Table/useTableBaseRow.js.map +1 -1
- package/dist/cjs/components/TableDragAndDropContext/TableDragAndDropContext.js +9 -5
- package/dist/cjs/components/TableDragAndDropContext/TableDragAndDropContext.js.map +1 -1
- package/dist/cjs/components/TableFolders/TableFoldersContent.js +11 -10
- package/dist/cjs/components/TableFolders/TableFoldersContent.js.map +1 -1
- package/dist/cjs/components/TableFolders/TableFoldersLayout.js +1 -1
- package/dist/cjs/components/TableFolders/TableFoldersLayout.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/TagsWidget/TagsWidget.js +20 -9
- package/dist/cjs/components/TagsWidget/TagsWidget.js.map +1 -1
- package/dist/cjs/components/TagsWidget/TagsWidgetContent.js +1 -1
- package/dist/cjs/components/TagsWidget/TagsWidgetContent.js.map +1 -1
- package/dist/cjs/components/ToolbarCollection/ToolbarCollection.js +3 -3
- package/dist/cjs/components/ToolbarCollection/ToolbarCollection.js.map +1 -1
- package/dist/cjs/components/ToolbarCollection/useToolbarCollectionSyncProps.js +1 -1
- package/dist/cjs/components/ToolbarCollection/useToolbarCollectionSyncProps.js.map +1 -1
- package/dist/cjs/components/ToolbarCollectionContentAutoSizer/ContainerRectDebug.js +1 -1
- package/dist/cjs/components/ToolbarCollectionContentAutoSizer/ContainerRectDebug.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/components/index.js +0 -12
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/components/unidriver.js +0 -6
- package/dist/cjs/components/unidriver.js.map +1 -1
- package/dist/cjs/exports/form.js +4 -4
- package/dist/cjs/exports/form.js.map +1 -1
- package/dist/cjs/hooks/useCollectionPageChild/useCollectionPageChild.js +1 -1
- package/dist/cjs/hooks/useCollectionPageChild/useCollectionPageChild.js.map +1 -1
- package/dist/cjs/hooks/useEntityPageChild/useEntityPageChild.js +1 -1
- package/dist/cjs/hooks/useEntityPageChild/useEntityPageChild.js.map +1 -1
- package/dist/cjs/hooks/usePickerContent/usePickerContent.spec.js +2 -2
- package/dist/cjs/hooks/usePickerContent/usePickerContent.spec.js.map +1 -1
- package/dist/cjs/hooks/usePickerStandalone/usePickerStandalone.spec.js +4 -4
- package/dist/cjs/hooks/usePickerStandalone/usePickerStandalone.spec.js.map +1 -1
- package/dist/cjs/hooks/useSettingsPageChild/useSettingsPageChild.js +1 -1
- package/dist/cjs/hooks/useSettingsPageChild/useSettingsPageChild.js.map +1 -1
- package/dist/cjs/index.js +4 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/state/CustomColumnsState.js +1 -2
- package/dist/cjs/state/CustomColumnsState.js.map +1 -1
- package/dist/cjs/state/CustomFieldsWidgetState.js +1 -1
- package/dist/cjs/state/CustomFieldsWidgetState.js.map +1 -1
- package/dist/cjs/state/FilterValueTotalState.js +0 -1
- package/dist/cjs/state/FilterValueTotalState.js.map +1 -1
- package/dist/cjs/state/FormPage/useFormPageContent.js +1 -1
- package/dist/cjs/state/FormPage/useFormPageContent.js.map +1 -1
- package/dist/cjs/state/MultiLevelSortingState.js +1 -2
- package/dist/cjs/state/MultiLevelSortingState.js.map +1 -1
- package/dist/cjs/state/NestedTableState/NestedTableLevelDescriptor.js.map +1 -1
- package/dist/cjs/state/ViewsState.js +0 -1
- package/dist/cjs/state/ViewsState.js.map +1 -1
- package/dist/cjs/styles.global.css +1 -1
- package/dist/cjs/test-utils/ExportMocks.js +3 -0
- package/dist/cjs/test-utils/ExportMocks.js.map +1 -1
- package/dist/cjs/test-utils/SettingsModalLayout.js +2 -2
- package/dist/cjs/test-utils/SettingsModalLayout.js.map +1 -1
- package/dist/cjs/test-utils/TagsMocks.js +2 -0
- package/dist/cjs/test-utils/TagsMocks.js.map +1 -1
- package/dist/cjs/testkit/enzyme.js +1 -3
- package/dist/cjs/testkit/enzyme.js.map +1 -1
- package/dist/cjs/testkit/jsdom.js +1 -3
- package/dist/cjs/testkit/jsdom.js.map +1 -1
- package/dist/cjs/testkit/puppeteer.js +1 -3
- package/dist/cjs/testkit/puppeteer.js.map +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/components/CardContainer/CardContainer.js +7 -2
- package/dist/esm/components/CardContainer/CardContainer.js.map +1 -1
- package/dist/esm/components/Collapse/Collapse.st.css.js +2 -2
- package/dist/esm/components/CollectionCard/CollectionCard.js +3 -3
- package/dist/esm/components/CollectionCard/CollectionCard.js.map +1 -1
- package/dist/esm/components/CollectionErrorState/CollectionErrorState.js +6 -0
- package/dist/esm/components/CollectionErrorState/CollectionErrorState.js.map +1 -0
- package/dist/esm/components/CollectionErrorState/index.js +2 -0
- package/dist/esm/components/CollectionErrorState/index.js.map +1 -0
- package/dist/esm/components/CollectionPageHeaderNew/CollectionPageHeader.js.map +1 -1
- package/dist/esm/components/CollectionPageNew/CollectionPage.uni.driver.js +1 -0
- package/dist/esm/components/CollectionPageNew/CollectionPage.uni.driver.js.map +1 -1
- package/dist/esm/components/CollectionTable/CollectionTable.js +3 -3
- 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/SearchOrCustomFilter.st.css.js +2 -2
- package/dist/esm/components/CollectionToolbar/SearchOrCustomFilter.st.css.js.map +1 -1
- package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
- package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js.map +1 -1
- package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
- package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js.map +1 -1
- package/dist/esm/components/CustomFieldsWidget/CustomFieldsWidget.js +6 -2
- package/dist/esm/components/CustomFieldsWidget/CustomFieldsWidget.js.map +1 -1
- package/dist/esm/components/DragAndDrop/CollectionDragAndDropState.js +0 -1
- package/dist/esm/components/DragAndDrop/CollectionDragAndDropState.js.map +1 -1
- package/dist/esm/components/DragAndDrop/DragAndDropAnnouncements.js +4 -3
- package/dist/esm/components/DragAndDrop/DragAndDropAnnouncements.js.map +1 -1
- package/dist/esm/components/DragAndDrop/DragAndDropState.js +16 -12
- package/dist/esm/components/DragAndDrop/DragAndDropState.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/ErrorCard/ErrorCard.js +2 -3
- package/dist/esm/components/ErrorCard/ErrorCard.js.map +1 -1
- package/dist/esm/components/ErrorCard/ErrorCard.uni.driver.js +1 -1
- package/dist/esm/components/ErrorCard/ErrorCard.uni.driver.js.map +1 -1
- package/dist/esm/components/ErrorState/ErrorState.js +3 -3
- package/dist/esm/components/ErrorState/ErrorState.js.map +1 -1
- package/dist/esm/components/Fade/Fade.st.css.js +2 -2
- package/dist/esm/components/Fade/Fade.st.css.js.map +1 -1
- package/dist/esm/components/Grid/Grid.js +3 -3
- package/dist/esm/components/Grid/Grid.js.map +1 -1
- package/dist/esm/components/Grid/GridFolders.js +3 -3
- package/dist/esm/components/Grid/GridFolders.js.map +1 -1
- package/dist/esm/components/Grid/GridFoldersPlaceholderStates.js +2 -2
- package/dist/esm/components/Grid/GridFoldersPlaceholderStates.js.map +1 -1
- package/dist/esm/components/Grid/GridPlaceholderStates.js +2 -2
- package/dist/esm/components/Grid/GridPlaceholderStates.js.map +1 -1
- package/dist/esm/components/GridDragAndDropDndKit/GridSortableContext.js +3 -1
- package/dist/esm/components/GridDragAndDropDndKit/GridSortableContext.js.map +1 -1
- package/dist/esm/components/GridDragAndDropDndKit/dndTestEventHandlers.js +2 -2
- package/dist/esm/components/GridDragAndDropDndKit/dndTestEventHandlers.js.map +1 -1
- 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 +3 -1
- package/dist/esm/components/ListDragAndDrop/ListDragAndDropContext.js.map +1 -1
- package/dist/esm/components/LoadingRow/LoadingRow.st.css.js +3 -3
- package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
- package/dist/esm/components/MaxLines/MaxLines.st.css.js +2 -2
- package/dist/esm/components/MoreActions/ExploreAppsState.js +1 -1
- package/dist/esm/components/MoreActions/ExploreAppsState.js.map +1 -1
- package/dist/esm/components/MoreActions/MoreActionsBase.js +12 -5
- package/dist/esm/components/MoreActions/MoreActionsBase.js.map +1 -1
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
- package/dist/esm/components/NestedTable/NestedTable.js +1 -1
- package/dist/esm/components/NestedTable/NestedTable.js.map +1 -1
- package/dist/esm/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.js +2 -2
- package/dist/esm/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.js.map +1 -1
- package/dist/esm/components/NestedTable/NestedTableRow.st.css.js +2 -2
- package/dist/esm/components/NestedTable/NestedTableRow.st.css.js.map +1 -1
- package/dist/esm/components/NestedTable/NestedTableWSRTable.js +2 -5
- package/dist/esm/components/NestedTable/NestedTableWSRTable.js.map +1 -1
- package/dist/esm/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js +2 -2
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js +1 -2
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDrop.js.map +1 -1
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js +7 -3
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.js.map +1 -1
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.js +2 -2
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js +2 -3
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropState.js.map +1 -1
- package/dist/esm/components/PageWrapper/PageWrapper.uni.driver.js +3 -0
- package/dist/esm/components/PageWrapper/PageWrapper.uni.driver.js.map +1 -1
- package/dist/esm/components/PageWrapper/PageWrapperBase.js +1 -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/PickerContentAdditionalStep.st.css.js +2 -2
- package/dist/esm/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
- package/dist/esm/components/PlaceholderStates/PlaceholderStatesBase.js +3 -3
- package/dist/esm/components/PlaceholderStates/PlaceholderStatesBase.js.map +1 -1
- 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/SlidingModal/SlidingModal.st.css.js +2 -2
- package/dist/esm/components/SlidingModal/SlidingModal.st.css.js.map +1 -1
- package/dist/esm/components/Table/TableVirtualHeader.st.css.js +2 -2
- package/dist/esm/components/Table/TableVirtualHeader.st.css.js.map +1 -1
- package/dist/esm/components/TableDragAndDropContext/TableDragAndDropContext.js +4 -2
- package/dist/esm/components/TableDragAndDropContext/TableDragAndDropContext.js.map +1 -1
- package/dist/esm/components/TableFolders/TableFoldersContent.js +2 -2
- package/dist/esm/components/TableFolders/TableFoldersContent.js.map +1 -1
- package/dist/esm/components/TableFolders/TableFoldersLayout.js +1 -1
- package/dist/esm/components/TableFolders/TableFoldersLayout.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/TagsWidget/TagsWidget.js +6 -2
- package/dist/esm/components/TagsWidget/TagsWidget.js.map +1 -1
- package/dist/esm/components/ToolbarCollection/ToolbarCollection.js.map +1 -1
- package/dist/esm/components/ToolbarCollection/useToolbarCollectionSyncProps.js +1 -1
- 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/common.st.css.js +2 -2
- package/dist/esm/components/index.js +0 -2
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/components/unidriver.js +0 -1
- package/dist/esm/components/unidriver.js.map +1 -1
- package/dist/esm/exports/form.js +1 -1
- package/dist/esm/exports/form.js.map +1 -1
- package/dist/esm/index.js +1 -2
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/state/CustomColumnsState.js +0 -1
- package/dist/esm/state/CustomColumnsState.js.map +1 -1
- package/dist/esm/state/FilterValueTotalState.js +0 -1
- package/dist/esm/state/FilterValueTotalState.js.map +1 -1
- package/dist/esm/state/MultiLevelSortingState.js +0 -1
- package/dist/esm/state/MultiLevelSortingState.js.map +1 -1
- package/dist/esm/state/ViewsState.js +0 -1
- package/dist/esm/state/ViewsState.js.map +1 -1
- package/dist/esm/styles.global.css +1 -1
- package/dist/esm/test-utils/ExportMocks.js +3 -0
- package/dist/esm/test-utils/ExportMocks.js.map +1 -1
- package/dist/esm/test-utils/TagsMocks.js +5 -1
- package/dist/esm/test-utils/TagsMocks.js.map +1 -1
- package/dist/esm/testkit/enzyme.js +0 -2
- package/dist/esm/testkit/enzyme.js.map +1 -1
- package/dist/esm/testkit/jsdom.js +0 -2
- package/dist/esm/testkit/jsdom.js.map +1 -1
- package/dist/esm/testkit/puppeteer.js +0 -2
- package/dist/esm/testkit/puppeteer.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/components/CardContainer/CardContainer.d.ts.map +1 -1
- package/dist/types/components/CollectionCard/CollectionCard.d.ts +2 -2
- package/dist/types/components/CollectionCard/CollectionCard.d.ts.map +1 -1
- package/dist/types/components/CollectionErrorState/CollectionErrorState.d.ts +6 -0
- package/dist/types/components/CollectionErrorState/CollectionErrorState.d.ts.map +1 -0
- package/dist/types/components/CollectionErrorState/index.d.ts +2 -0
- package/dist/types/components/CollectionErrorState/index.d.ts.map +1 -0
- package/dist/types/components/CollectionItemActions/CollectionItemActionsHelper.d.ts +44 -44
- package/dist/types/components/CollectionPageHeaderNew/CollectionPageHeader.d.ts +8 -2
- package/dist/types/components/CollectionPageHeaderNew/CollectionPageHeader.d.ts.map +1 -1
- package/dist/types/components/CollectionPageNew/CollectionPage.uni.driver.d.ts +1 -0
- package/dist/types/components/CollectionPageNew/CollectionPage.uni.driver.d.ts.map +1 -1
- package/dist/types/components/CollectionTable/CollectionTable.d.ts.map +1 -1
- package/dist/types/components/CollectionTable/CollectionTable.uni.driver.d.ts +1 -1
- package/dist/types/components/CollectionToolbar/SearchOrCustomFilter.st.css.d.ts.map +1 -1
- package/dist/types/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.d.ts.map +1 -1
- package/dist/types/components/CollectionViewsDropdown/ViewsDropdown.st.css.d.ts.map +1 -1
- package/dist/types/components/CustomFieldsWidget/CustomFieldsWidget.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/CollectionDragAndDropState.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/DragAndDrop.d.ts +2 -1
- package/dist/types/components/DragAndDrop/DragAndDrop.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/DragAndDropAnnouncements.d.ts.map +1 -1
- package/dist/types/components/DragAndDrop/DragAndDropState.d.ts +2 -8
- package/dist/types/components/DragAndDrop/DragAndDropState.d.ts.map +1 -1
- package/dist/types/components/DragHandle/DragHandle.st.css.d.ts.map +1 -1
- package/dist/types/components/ErrorCard/ErrorCard.d.ts +19 -10
- package/dist/types/components/ErrorCard/ErrorCard.d.ts.map +1 -1
- package/dist/types/components/ErrorState/ErrorState.d.ts +2 -2
- package/dist/types/components/ErrorState/ErrorState.d.ts.map +1 -1
- package/dist/types/components/Fade/Fade.st.css.d.ts.map +1 -1
- package/dist/types/components/Grid/Grid.d.ts.map +1 -1
- package/dist/types/components/Grid/Grid.uni.driver.d.ts +1 -1
- package/dist/types/components/Grid/GridFolders.d.ts.map +1 -1
- package/dist/types/components/Grid/GridFolders.uni.driver.d.ts +3 -3
- package/dist/types/components/Grid/GridFoldersSection.uni.driver.d.ts +1 -1
- package/dist/types/components/Grid/GridPlaceholderStates.d.ts.map +1 -1
- package/dist/types/components/GridDragAndDropDndKit/GridSortableContext.d.ts.map +1 -1
- 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.map +1 -1
- package/dist/types/components/MoreActions/MoreActionsBase.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTable.d.ts +13 -0
- package/dist/types/components/NestedTable/NestedTable.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTable.uni.driver.d.ts +1 -1
- package/dist/types/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTableRow.st.css.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTableWSRTable.d.ts.map +1 -1
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDrop.d.ts +0 -3
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDrop.d.ts.map +1 -1
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropContext.d.ts.map +1 -1
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropState.d.ts +3 -6
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropState.d.ts.map +1 -1
- package/dist/types/components/PageWrapper/PageWrapper.uni.driver.d.ts +1 -0
- package/dist/types/components/PageWrapper/PageWrapper.uni.driver.d.ts.map +1 -1
- package/dist/types/components/PageWrapper/PageWrapperBase.d.ts.map +1 -1
- package/dist/types/components/PlaceholderStates/PlaceholderStatesBase.d.ts +1 -1
- package/dist/types/components/PlaceholderStates/PlaceholderStatesBase.d.ts.map +1 -1
- package/dist/types/components/SlidingModal/SlidingModal.st.css.d.ts.map +1 -1
- package/dist/types/components/SummaryBar/SummaryBar.uni.driver.d.ts +1 -1
- package/dist/types/components/Table/Table.uni.driver.d.ts +1 -1
- package/dist/types/components/Table/TableVirtualHeader.st.css.d.ts.map +1 -1
- package/dist/types/components/TableDragAndDropContext/TableDragAndDropContext.d.ts.map +1 -1
- package/dist/types/components/TableFolders/TableFolders.uni.driver.d.ts +1 -1
- package/dist/types/components/TableFolders/TableFoldersContent.d.ts.map +1 -1
- package/dist/types/components/TableGridSwitch/TableGridSwitch.uni.driver.d.ts +3 -3
- package/dist/types/components/TableGridSwitchFolders/TableGridSwitchFolders.uni.driver.d.ts +5 -5
- package/dist/types/components/TagsWidget/TagsWidget.d.ts.map +1 -1
- package/dist/types/components/ToolbarCollection/ToolbarCollection.d.ts +12 -1
- package/dist/types/components/ToolbarCollection/ToolbarCollection.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/components/unidriver.d.ts +0 -1
- package/dist/types/components/unidriver.d.ts.map +1 -1
- package/dist/types/exports/form.d.ts +1 -1
- package/dist/types/exports/form.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -2
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/state/CustomColumnsState.d.ts.map +1 -1
- package/dist/types/state/FilterValueTotalState.d.ts.map +1 -1
- package/dist/types/state/MultiLevelSortingState.d.ts.map +1 -1
- package/dist/types/state/NestedTableState/NestedTableLevelDescriptor.d.ts +3 -2
- package/dist/types/state/NestedTableState/NestedTableLevelDescriptor.d.ts.map +1 -1
- package/dist/types/state/ViewsState.d.ts.map +1 -1
- package/dist/types/test-utils/ExportMocks.d.ts +5 -1
- package/dist/types/test-utils/ExportMocks.d.ts.map +1 -1
- package/dist/types/test-utils/TagsMocks.d.ts +9 -3
- package/dist/types/test-utils/TagsMocks.d.ts.map +1 -1
- package/dist/types/testkit/enzyme.d.ts +15 -904
- package/dist/types/testkit/enzyme.d.ts.map +1 -1
- package/dist/types/testkit/jsdom.d.ts +16 -904
- package/dist/types/testkit/jsdom.d.ts.map +1 -1
- package/dist/types/testkit/puppeteer.d.ts +16 -908
- package/dist/types/testkit/puppeteer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +5 -5
- package/dist/cjs/components/CollectionList/CollectionList.js +0 -136
- package/dist/cjs/components/CollectionList/CollectionList.js.map +0 -1
- package/dist/cjs/components/CollectionList/CollectionList.uni.driver.js +0 -26
- package/dist/cjs/components/CollectionList/CollectionList.uni.driver.js.map +0 -1
- package/dist/cjs/components/CollectionList/index.js +0 -10
- package/dist/cjs/components/CollectionList/index.js.map +0 -1
- package/dist/cjs/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.js +0 -33
- package/dist/cjs/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.js.map +0 -1
- package/dist/cjs/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.uni.driver.js +0 -15
- package/dist/cjs/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.uni.driver.js.map +0 -1
- package/dist/cjs/components/InfiniteScrollCollectionList/index.js +0 -10
- package/dist/cjs/components/InfiniteScrollCollectionList/index.js.map +0 -1
- package/dist/esm/components/CollectionList/CollectionList.js +0 -41
- package/dist/esm/components/CollectionList/CollectionList.js.map +0 -1
- package/dist/esm/components/CollectionList/CollectionList.uni.driver.js +0 -22
- package/dist/esm/components/CollectionList/CollectionList.uni.driver.js.map +0 -1
- package/dist/esm/components/CollectionList/index.js +0 -2
- package/dist/esm/components/CollectionList/index.js.map +0 -1
- package/dist/esm/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.js +0 -9
- package/dist/esm/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.js.map +0 -1
- package/dist/esm/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.uni.driver.js +0 -11
- package/dist/esm/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.uni.driver.js.map +0 -1
- package/dist/esm/components/InfiniteScrollCollectionList/index.js +0 -2
- package/dist/esm/components/InfiniteScrollCollectionList/index.js.map +0 -1
- package/dist/types/components/CollectionList/CollectionList.d.ts +0 -22
- package/dist/types/components/CollectionList/CollectionList.d.ts.map +0 -1
- package/dist/types/components/CollectionList/CollectionList.uni.driver.d.ts +0 -877
- package/dist/types/components/CollectionList/CollectionList.uni.driver.d.ts.map +0 -1
- package/dist/types/components/CollectionList/index.d.ts +0 -2
- package/dist/types/components/CollectionList/index.d.ts.map +0 -1
- package/dist/types/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.d.ts +0 -7
- package/dist/types/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.d.ts.map +0 -1
- package/dist/types/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.uni.driver.d.ts +0 -891
- package/dist/types/components/InfiniteScrollCollectionList/InfiniteScrollCollectionList.uni.driver.d.ts.map +0 -1
- package/dist/types/components/InfiniteScrollCollectionList/index.d.ts +0 -2
- package/dist/types/components/InfiniteScrollCollectionList/index.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_designSystem","require","_react","_interopRequireWildcard","_assertComponentType","_CollectionToolbars","_checkConflictingToolbarProps","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ToolbarCollection","props","state","filters","title","tabs","views","extraToolbar","selectionToolbar","dragAndDropReorderModeToolbar","sticky","stickyProp","search","children","tableGridSwitchButton","exportButton","primaryActionButton","summaryBar","topNotification","assertComponentType","checkConflictingToolbarProps","scrollableContentRef","scrollablePageRef","usePageScrollContext","setSticky","useState","current","useEffect","createElement","Fragment","CollectionToolbars","query","collection","result","originQuery","titleBar","Box","width","borderTopColor","borderTopWidth","borderTopStyle","boxSizing","__self","__source","fileName","lineNumber","columnNumber","dataHook","direction","minHeight","flex","verticalAlign"],"sources":["../../../../src/components/ToolbarCollection/ToolbarCollection.tsx"],"sourcesContent":["import { Box, CardProps, usePageScrollContext } from '@wix/design-system';\nimport React, {\n CSSProperties,\n ReactElement,\n ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { CollectionToolbarProps, FilterElement, TabsFilterProps } from '../..';\nimport { ComputedQuery, FiltersMap } from '@wix/bex-core';\nimport { ToolbarCollectionState } from '../../state';\nimport {\n assertComponentType,\n CollectionSearchElement,\n CollectionToolbarFiltersElement,\n CollectionViewsDropdownElement,\n CustomColumnsElement,\n PrimaryActionButtonElement,\n ReorderModeToolbarElement,\n TabsFilterElement,\n ToolbarTitleElement,\n TopNotificationElement,\n} from '../assertComponentType';\nimport { CollectionToolbars } from '../CollectionToolbars';\nimport {\n DragAndDropBulkSubmit,\n DragAndDropCancel,\n DragAndDropSubmit,\n} from '../DragAndDrop';\nimport { TableGridSwitchButtonProps } from '../TableGridSwitchButton';\nimport { checkConflictingToolbarProps } from './checkConflictingToolbarProps';\nimport type { AddApplyFiltersButtonType } from '../FiltersPanel/AddApplyFiltersButton';\nimport type { TagsElement } from '../Tags';\nimport type { ExtensionMenuItemsType } from '../ExtensionMenuItems';\nimport { TablePlaceholderStatesProps } from '../TablePlaceholderStates/TablePlaceholderStates';\nimport { DragAndDropCategoriesProps } from '../DragAndDrop/DragAndDropCategoriesProps';\n\nexport interface ToolbarBaseProps<T> {\n /**\n * Displays a title at the left of a toolbar. Accepts a [ToolbarTitle](./?path=/story/features-display-toolbar--toolbartitle) component.\n * @overrideType [ToolbarTitle](./?path=/story/features-display-toolbar--toolbartitle)\n * @external\n */\n title?: ToolbarTitleElement;\n /**\n * Displays a search input on the right side of the table toolbar.<br> <br>\n * Accepts a boolean or a custom React element as a parameter. When passing `false`, no search input is displayed.\n * @default true\n * @external\n */\n search?: boolean | FilterElement | CollectionSearchElement;\n\n /**\n * Indicates whether to show Table Title Bar or not.\n * Note: if you pass `showTitleBar = false` title bar is not removed from the DOM. For better accessibility column titles should be defined as well.\n * @default true\n * @external\n */\n showTitleBar?: boolean;\n /**\n * A [`<ExportButton />`](./?path=/story/features-export--exportto) react element to be added to the toolbar\n */\n exportButton?: ReactElement;\n\n /**\n * Enables tags feature. In this element you can pass the configuration\n * @overrideType [TagsElement](./?path=/story/features-enrich-tags--tags)\n */\n tags?: TagsElement<T>;\n /**\n * A [`<ExportModal />`](./?path=/story/features-export--exportto#CTA_is_out_of_the_table) react element to be rendered in table's context.\n */\n exportModal?: ReactElement;\n}\n\nexport interface ToolbarCollectionBaseProps<T, F extends FiltersMap>\n extends ToolbarBaseProps<T>,\n DragAndDropCategoriesProps<F> {\n children?: ReactNode | ReactNode[];\n\n /**\n * Adds view options to the table headers.\n * Accepts a [Views](./?path=/story/features-display-views--views) component.\n * @overrideType [Views](./?path=/story/features-display-views--views)\n * @external\n */\n views?: CollectionViewsDropdownElement<F>;\n /**\n * Adds filters to the toolbar and/or a sliding panel.\n * Accepts a `ToolbarFilters` component, which must have the `panelTitle` prop defined.\n * @overrideType [ToolbarFilters](./?path=%2Fstory%2Ffeatures-filter-components--toolbarfilters)\n * @external\n */\n filters?: CollectionToolbarFiltersElement;\n /**\n * Displays tabs at the left of a toolbar.\n * Accepts a [TabsFilter](./?path=/story/features-filter-components--tabsfilter) component.\n * @overrideType [TabsFilter](./?path=/story/features-filter-components--tabsfilter)\n * @external\n */\n tabs?: TabsFilterElement<TabsFilterProps<T>>;\n\n selectionToolbar?: ReactElement;\n\n sticky?: boolean;\n /**\n * Minimum height for a card's container when showing:<br>\n * - A loader<br>\n * - Empty state<br>\n * - Error state\n * <br><br>\n * If no unit is specified, `px` is used.\n * @default 300px\n * @external\n */\n minCardHeight?: CSSProperties['minHeight'];\n\n /**\n * A render function to be rendered when there's an error fetching data from the server.<br>\n * The function accepts the following parameters <br>\n * * `err`: The error thrown by the [fetchData](./?path=/story/common-hooks--usecollection) function <br>\n * * `isOnline`: Indicates whether internet connection is available <br>\n * * `retry`: Retry collection fetch on failed response, similar to `collection.retryFetch` <br>\n * Returns [`EmptyState`](https://www.docs.wixdesignsystem.com/?path=/story/components-layout--emptystate) component.\n * @external\n */\n renderError?: TablePlaceholderStatesProps['renderError'];\n\n /**\n * Renders when there are no items to display. Accepts a [`CollectionEmptyState`](./?path=/story/features-display-empty-states--collectionemptystate) component.\n * @external\n * @overrideType [CollectionEmptyState](./?path=/story/features-display-empty-states--collectionemptystate)\n */\n emptyState?: ReactNode;\n\n /**\n * Shown when a search or filter has no results.\n * Accepts a [`CollectionNoResultsState`](./?path=/story/features-display-empty-states--collectionnoresultsstate) component,\n * or a function that accepts the following parameters:\n * - `hasAvailableItems`: Indicates whether other items may be shown using other filter or search parameters.\n * - `query`: An instance of [`ComputedQuery`](./?path=/story/common-models--computedquery) representing the query that resulted in the empty state.\n * The function should return [`CollectionNoResultsState`](./?path=/story/features-display-empty-states--collectionnoresultsstate).\n * @external\n * @overrideType [CollectionNoResultsState](./?path=/story/features-display-empty-states--collectionnoresultsstate)\n */\n noResultsState?:\n | ReactNode\n | ((params: {\n hasAvailableItems: boolean;\n query: ComputedQuery<F>;\n }) => ReactNode);\n\n cardProps?: Partial<CardProps>;\n onSelectedItems?: (allSelected: boolean, items: T[]) => unknown;\n /**\n * Renders a notification below the header. Accepts a [`TableTopNotification`](./?path=/story/features-display-tabletopnotification--tabletopnotification) component.\n * @overrideType [TableTopNotification](./?path=/story/features-display-tabletopnotification--tabletopnotification)\n * @external\n */\n topNotification?:\n | TopNotificationElement\n | ((params: {\n query: ComputedQuery<F>;\n }) => TopNotificationElement | boolean | null | undefined)\n | boolean\n | null\n | undefined;\n\n extraToolbar?: ReactNode;\n\n /**\n * Display a summary bar below the toolbar.\n * Accepts a [`SummaryBar`](./?path=/story/features-display-toolbar--summarybar) component.\n * @overrideType [SummaryBar](./?path=/story/features-display-toolbar--summarybar)\n * @external\n */\n summaryBar?: ReactNode;\n tableGridSwitchButton?: ReactElement<TableGridSwitchButtonProps>;\n\n /**\n * Function that submits a drop event to the server. <br> <br>\n * The parameter is an event object containing the following details: <br>\n * -`from: {item: T; index: number}`: The dragged item. <br>\n * -`after: null | [item: T; iindex: number}`: The previous dropped item. If this is the first item to be dropped, this argument is `null`. <br>\n * -`filters`: Applied [Drag and Drop](./?path=/story/features-sort-drag-and-drop--overview) filters.\n *\n * @returns Promise\n * @external\n */\n dragAndDropSubmit?: DragAndDropSubmit<T, F>;\n\n /**\n * Function that submits an array of drop events to the server. <br> <br>\n * The parameter is an array of event objects containing the following details: <br>\n * -`from: {item: T; index: number}`: The dragged item. <br>\n * -`after: null | [item: T; index: number}`: The previous dropped item. If this is the first item to be dropped, this argument is `null`. <br>\n * -`filters`: Applied [Drag and Drop](./?path=/story/features-sort-drag-and-drop--overview) filters. <br>\n *\n * @returns Promise\n * @external\n */\n dragAndDropBulkSubmit?: DragAndDropBulkSubmit<T, F>;\n\n /**\n * A function that cancels a drop event. <br>\n * Supported arguments: <br>\n * - `from: {item: T; index: number}`: The dragged item.\n * - `after: null | {item: T; index: number}`: The item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`.\n * - `filters`: Currently applied filters. Used in cases where your server holds a unique ordering per filtering. See the `dragAndDropCategories` prop.\n *\n * If the move is cancelled, the function returns a toast config object with a message. Otherwise, the function will return a null value.\n * @external\n */\n dragAndDropCancel?: DragAndDropCancel<T, F>;\n\n /**\n * @deprecated It doesn't need to be passed implicitly anymore.\n */\n extensionMenuItems?: ExtensionMenuItemsType;\n\n /**\n * Drag and drop reorder mode toolbar. This prop accepts a `ReorderModeToolbar` component.<br>\n * The `ReorderModeToolbar` component accepts the following props:<br>\n * + `learnMoreUrl`: [string] A URL in the toolbar.<br>\n * + `reorderModeTitle`: [string] A title in the toolbar.\n * @external\n */\n dragAndDropReorderModeToolbar?: ReorderModeToolbarElement | null;\n\n /**\n * Adds functionality to allow visitors to create choose which columns to display and in what order. Accepts a [CustomColumns](./?path=/story/features-display--customcolumns) component.\n * @overrideType [CustomColumns](./?path=/story/features-display--customcolumns)\n * @external\n */\n customColumns?: CustomColumnsElement | null;\n\n /**\n * Adds functionality to allow visitors to sort multiple columns simultaneously.\n * Accepts a [MultiLevelSorting](./?path=/story/features-sort-sortable-columns-multilevelsorting--multilevelsorting) component.\n * @overrideType [MultiLevelSorting](./?path=/story/features-sort-sortable-columns-multilevelsorting--multilevelsorting)\n * @external\n */\n multiLevelSorting?: CollectionToolbarProps<T, F>['multiLevelSorting'];\n\n /**\n * Adds functionality for a primary action button in the toolbar.\n * Accepts a [PrimaryActionButton](./?path=/story/features-actions-primaryactionbutton--primaryactionbutton) component.\n * @external\n * @overrideType [PrimaryActionButton](./?path=/story/features-actions-primaryactionbutton--primaryactionbutton)\n */\n primaryActionButton?: PrimaryActionButtonElement;\n\n /**\n * Apply filter button implementation: `import { AddApplyFiltersButton } from '@wix/patterns';`\n * <br>\n * Add `Apply` button to the filters panel footer. Panel filters will be applied only after the button is clicked.\n */\n AddApplyFiltersButton?: AddApplyFiltersButtonType;\n\n /**\n * Limits the amount of rows a visitor can select.\n * @external\n */\n maxSelection?: number;\n\n /**\n * Indicates whether the table should have an [internal scroll](./?path=/story/features-display-internal-scroll--internal-scroll) instead of the default page scroll.\n * @external\n */\n internalScroll?: boolean;\n}\n\nexport interface ToolbarCollectionProps<T, F extends FiltersMap>\n extends ToolbarCollectionBaseProps<T, F> {\n state: ToolbarCollectionState<T, F>;\n}\n\nexport function ToolbarCollection<T, F extends FiltersMap>(\n props: ToolbarCollectionProps<T, F>,\n) {\n const {\n state,\n filters,\n title,\n tabs,\n views,\n extraToolbar,\n selectionToolbar,\n dragAndDropReorderModeToolbar,\n sticky: stickyProp,\n search,\n children,\n tableGridSwitchButton,\n exportButton,\n primaryActionButton,\n summaryBar,\n topNotification,\n } = props;\n assertComponentType(views, 'CollectionViewsDropdown', 'views');\n checkConflictingToolbarProps(props);\n\n const { scrollableContentRef: scrollablePageRef } = usePageScrollContext();\n\n const [sticky, setSticky] = useState(\n stickyProp ?? scrollablePageRef?.current != null,\n );\n\n useEffect(() => {\n setSticky(stickyProp ?? scrollablePageRef?.current != null);\n }, [stickyProp]);\n\n return (\n <>\n <CollectionToolbars\n sticky={sticky}\n state={state}\n search={search}\n views={views}\n title={title}\n tabs={tabs}\n filters={filters}\n selectionToolbar={selectionToolbar}\n dragAndDropReorderModeToolbar={dragAndDropReorderModeToolbar}\n extraToolbar={extraToolbar}\n tableGridSwitchButton={tableGridSwitchButton}\n exportButton={exportButton}\n primaryActionButton={primaryActionButton}\n summaryBar={summaryBar}\n topNotification={\n typeof topNotification === 'function'\n ? () =>\n topNotification({ query: state.collection.result.originQuery })\n : topNotification\n }\n titleBar={\n <Box\n width=\"100%\"\n borderTopColor=\"D60\"\n borderTopWidth=\"1px\"\n borderTopStyle=\"solid\"\n boxSizing=\"border-box\"\n />\n }\n />\n <Box\n dataHook=\"toolbar-collection-content\"\n width=\"100%\"\n direction=\"vertical\"\n minHeight={0}\n flex={1}\n verticalAlign=\"middle\"\n >\n {children}\n </Box>\n </>\n );\n}\n"],"mappings":";;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAUA,IAAAG,oBAAA,GAAAH,OAAA;AAYA,IAAAI,mBAAA,GAAAJ,OAAA;AAOA,IAAAK,6BAAA,GAAAL,OAAA;AAA8E,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,SAAAN,wBAAAM,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,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,cAAc,EAAC,KAAK;MACpBC,cAAc,EAAC,OAAO;MACtBC,SAAS,EAAC,YAAY;MAAAC,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAjE,YAAA;QAAAkE,UAAA;QAAAC,YAAA;MAAA;IAAA,CACvB,CACF;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjE,YAAA;MAAAkE,UAAA;MAAAC,YAAA;IAAA;EAAA,CACF,CAAC,eACFxE,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACxD,aAAA,CAAAgE,GAAG;IACFW,QAAQ,EAAC,4BAA4B;IACrCV,KAAK,EAAC,MAAM;IACZW,SAAS,EAAC,UAAU;IACpBC,SAAS,EAAE,CAAE;IACbC,IAAI,EAAE,CAAE;IACRC,aAAa,EAAC,QAAQ;IAAAT,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjE,YAAA;MAAAkE,UAAA;MAAAC,YAAA;IAAA;EAAA,GAErBjC,QACE,CACL,CAAC;AAEP","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_designSystem","require","_react","_interopRequireWildcard","_assertComponentType","_CollectionToolbars","_checkConflictingToolbarProps","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","ToolbarCollection","props","state","filters","title","tabs","views","extraToolbar","selectionToolbar","dragAndDropReorderModeToolbar","sticky","stickyProp","search","children","tableGridSwitchButton","exportButton","primaryActionButton","summaryBar","topNotification","assertComponentType","checkConflictingToolbarProps","scrollableContentRef","scrollablePageRef","usePageScrollContext","setSticky","useState","current","useEffect","createElement","Fragment","CollectionToolbars","query","collection","result","originQuery","titleBar","Box","width","borderTopColor","borderTopWidth","borderTopStyle","boxSizing","__self","__source","fileName","lineNumber","columnNumber","dataHook","direction","minHeight","flex","verticalAlign"],"sources":["../../../../src/components/ToolbarCollection/ToolbarCollection.tsx"],"sourcesContent":["import { Box, CardProps, usePageScrollContext } from '@wix/design-system';\nimport React, {\n CSSProperties,\n ReactElement,\n ReactNode,\n useEffect,\n useState,\n} from 'react';\nimport { CollectionToolbarProps, FilterElement, TabsFilterProps } from '../..';\nimport { ComputedQuery, FiltersMap } from '@wix/bex-core';\nimport { ToolbarCollectionState } from '../../state';\nimport {\n assertComponentType,\n CollectionSearchElement,\n CollectionToolbarFiltersElement,\n CollectionViewsDropdownElement,\n CustomColumnsElement,\n PrimaryActionButtonElement,\n ReorderModeToolbarElement,\n TabsFilterElement,\n ToolbarTitleElement,\n TopNotificationElement,\n} from '../assertComponentType';\nimport { CollectionToolbars } from '../CollectionToolbars';\nimport {\n DragAndDropBulkSubmit,\n DragAndDropCancel,\n DragAndDropSubmit,\n} from '../DragAndDrop';\nimport { TableGridSwitchButtonProps } from '../TableGridSwitchButton';\nimport { checkConflictingToolbarProps } from './checkConflictingToolbarProps';\nimport type { AddApplyFiltersButtonType } from '../FiltersPanel/AddApplyFiltersButton';\nimport type { TagsElement } from '../Tags';\nimport type { ExtensionMenuItemsType } from '../ExtensionMenuItems';\nimport { TablePlaceholderStatesProps } from '../TablePlaceholderStates/TablePlaceholderStates';\nimport { DragAndDropCategoriesProps } from '../DragAndDrop/DragAndDropCategoriesProps';\n\nexport interface ToolbarBaseProps<T> {\n /**\n * Displays a title at the left of a toolbar. Accepts a [ToolbarTitle](./?path=/story/features-display-toolbar--toolbartitle) component.\n * @overrideType [ToolbarTitle](./?path=/story/features-display-toolbar--toolbartitle)\n * @external\n */\n title?: ToolbarTitleElement;\n /**\n * Displays a search input on the right side of the table toolbar.<br> <br>\n * Accepts a boolean or a custom React element as a parameter. When passing `false`, no search input is displayed.\n * @default true\n * @external\n */\n search?: boolean | FilterElement | CollectionSearchElement;\n\n /**\n * Indicates whether to show Table Title Bar or not.\n * Note: if you pass `showTitleBar = false` title bar is not removed from the DOM. For better accessibility column titles should be defined as well.\n * @default true\n * @external\n */\n showTitleBar?: boolean;\n /**\n * A [`<ExportButton />`](./?path=/story/features-export--exportto) react element to be added to the toolbar\n */\n exportButton?: ReactElement;\n\n /**\n * Enables tags feature. In this element you can pass the configuration\n * @overrideType [TagsElement](./?path=/story/features-enrich-tags--tags)\n */\n tags?: TagsElement<T>;\n /**\n * A [`<ExportModal />`](./?path=/story/features-export--exportto#CTA_is_out_of_the_table) react element to be rendered in table's context.\n */\n exportModal?: ReactElement;\n}\n\nexport interface ToolbarCollectionBaseProps<T, F extends FiltersMap>\n extends ToolbarBaseProps<T>,\n DragAndDropCategoriesProps<F> {\n children?: ReactNode | ReactNode[];\n\n /**\n * Adds view options to the table headers.\n * Accepts a [Views](./?path=/story/features-display-views--views) component.\n * @overrideType [Views](./?path=/story/features-display-views--views)\n * @external\n */\n views?: CollectionViewsDropdownElement<F>;\n /**\n * Adds filters to the toolbar and/or a sliding panel.\n * Accepts a `ToolbarFilters` component, which must have the `panelTitle` prop defined.\n * @overrideType [ToolbarFilters](./?path=%2Fstory%2Ffeatures-filter-components--toolbarfilters)\n * @external\n */\n filters?: CollectionToolbarFiltersElement;\n /**\n * Displays tabs at the left of a toolbar.\n * Accepts a [TabsFilter](./?path=/story/features-filter-components--tabsfilter) component.\n * @overrideType [TabsFilter](./?path=/story/features-filter-components--tabsfilter)\n * @external\n */\n tabs?: TabsFilterElement<TabsFilterProps<T>>;\n\n selectionToolbar?: ReactElement;\n\n sticky?: boolean;\n /**\n * Minimum height for a card's container when showing:<br>\n * - A loader<br>\n * - Empty state<br>\n * - Error state\n * <br><br>\n * If no unit is specified, `px` is used.\n * @default 300px\n * @external\n */\n minCardHeight?: CSSProperties['minHeight'];\n\n /**\n * A render function to be rendered when there's an error fetching data from the server.<br>\n * The function accepts the following parameters <br>\n * * `err`: The error thrown by the [fetchData](./?path=/story/common-hooks--usecollection) function <br>\n * * `isOnline`: Indicates whether internet connection is available <br>\n * * `retry`: Retry collection fetch on failed response, similar to `collection.retryFetch` <br>\n * Returns [`EmptyState`](https://www.docs.wixdesignsystem.com/?path=/story/components-layout--emptystate) component.\n * @external\n * @deprecated Use `errorState` instead.\n */\n renderError?: TablePlaceholderStatesProps['errorState'];\n\n /**\n * A render function to be rendered when there's an error fetching data from the server.<br>\n * The function accepts the following parameters <br>\n * * `err`: The error thrown by the [fetchData](./?path=/story/common-hooks--usecollection) function <br>\n * * `isOnline`: Indicates whether internet connection is available <br>\n * * `retry`: Retry collection fetch on failed response, similar to `collection.retryFetch` <br>\n * Returns [`EmptyState`](https://www.docs.wixdesignsystem.com/?path=/story/components-layout--emptystate) component.\n * @external\n */\n errorState?: TablePlaceholderStatesProps['errorState'];\n\n /**\n * Renders when there are no items to display. Accepts a [`CollectionEmptyState`](./?path=/story/features-display-empty-states--collectionemptystate) component.\n * @external\n * @overrideType [CollectionEmptyState](./?path=/story/features-display-empty-states--collectionemptystate)\n */\n emptyState?: ReactNode;\n\n /**\n * Shown when a search or filter has no results.\n * Accepts a [`CollectionNoResultsState`](./?path=/story/features-display-empty-states--collectionnoresultsstate) component,\n * or a function that accepts the following parameters:\n * - `hasAvailableItems`: Indicates whether other items may be shown using other filter or search parameters.\n * - `query`: An instance of [`ComputedQuery`](./?path=/story/common-models--computedquery) representing the query that resulted in the empty state.\n * The function should return [`CollectionNoResultsState`](./?path=/story/features-display-empty-states--collectionnoresultsstate).\n * @external\n * @overrideType [CollectionNoResultsState](./?path=/story/features-display-empty-states--collectionnoresultsstate)\n */\n noResultsState?:\n | ReactNode\n | ((params: {\n hasAvailableItems: boolean;\n query: ComputedQuery<F>;\n }) => ReactNode);\n\n cardProps?: Partial<CardProps>;\n onSelectedItems?: (allSelected: boolean, items: T[]) => unknown;\n /**\n * Renders a notification below the header. Accepts a [`TableTopNotification`](./?path=/story/features-display-tabletopnotification--tabletopnotification) component.\n * @overrideType [TableTopNotification](./?path=/story/features-display-tabletopnotification--tabletopnotification)\n * @external\n */\n topNotification?:\n | TopNotificationElement\n | ((params: {\n query: ComputedQuery<F>;\n }) => TopNotificationElement | boolean | null | undefined)\n | boolean\n | null\n | undefined;\n\n extraToolbar?: ReactNode;\n\n /**\n * Display a summary bar below the toolbar.\n * Accepts a [`SummaryBar`](./?path=/story/features-display-toolbar--summarybar) component.\n * @overrideType [SummaryBar](./?path=/story/features-display-toolbar--summarybar)\n * @external\n */\n summaryBar?: ReactNode;\n tableGridSwitchButton?: ReactElement<TableGridSwitchButtonProps>;\n\n /**\n * Function that submits a drop event to the server. <br> <br>\n * The parameter is an event object containing the following details: <br>\n * -`from: {item: T; index: number}`: The dragged item. <br>\n * -`after: null | [item: T; iindex: number}`: The previous dropped item. If this is the first item to be dropped, this argument is `null`. <br>\n * -`filters`: Applied [Drag and Drop](./?path=/story/features-sort-drag-and-drop--overview) filters.\n *\n * @returns Promise\n * @external\n */\n dragAndDropSubmit?: DragAndDropSubmit<T, F>;\n\n /**\n * Function that submits an array of drop events to the server. <br> <br>\n * The parameter is an array of event objects containing the following details: <br>\n * -`from: {item: T; index: number}`: The dragged item. <br>\n * -`after: null | [item: T; index: number}`: The previous dropped item. If this is the first item to be dropped, this argument is `null`. <br>\n * -`filters`: Applied [Drag and Drop](./?path=/story/features-sort-drag-and-drop--overview) filters. <br>\n *\n * @returns Promise\n * @external\n */\n dragAndDropBulkSubmit?: DragAndDropBulkSubmit<T, F>;\n\n /**\n * A function that cancels a drop event. <br>\n * Supported arguments: <br>\n * - `from: {item: T; index: number}`: The dragged item.\n * - `after: null | {item: T; index: number}`: The item that the dragged item was dropped after. If dropped at the head of the collection, this argument will be `null`.\n * - `filters`: Currently applied filters. Used in cases where your server holds a unique ordering per filtering. See the `dragAndDropCategories` prop.\n *\n * If the move is cancelled, the function returns a toast config object with a message. Otherwise, the function will return a null value.\n * @external\n */\n dragAndDropCancel?: DragAndDropCancel<T, F>;\n\n /**\n * @deprecated It doesn't need to be passed implicitly anymore.\n */\n extensionMenuItems?: ExtensionMenuItemsType;\n\n /**\n * Drag and drop reorder mode toolbar. This prop accepts a `ReorderModeToolbar` component.<br>\n * The `ReorderModeToolbar` component accepts the following props:<br>\n * + `learnMoreUrl`: [string] A URL in the toolbar.<br>\n * + `reorderModeTitle`: [string] A title in the toolbar.\n * @external\n */\n dragAndDropReorderModeToolbar?: ReorderModeToolbarElement | null;\n\n /**\n * Adds functionality to allow visitors to create choose which columns to display and in what order. Accepts a [CustomColumns](./?path=/story/features-display--customcolumns) component.\n * @overrideType [CustomColumns](./?path=/story/features-display--customcolumns)\n * @external\n */\n customColumns?: CustomColumnsElement | null;\n\n /**\n * Adds functionality to allow visitors to sort multiple columns simultaneously.\n * Accepts a [MultiLevelSorting](./?path=/story/features-sort-sortable-columns-multilevelsorting--multilevelsorting) component.\n * @overrideType [MultiLevelSorting](./?path=/story/features-sort-sortable-columns-multilevelsorting--multilevelsorting)\n * @external\n */\n multiLevelSorting?: CollectionToolbarProps<T, F>['multiLevelSorting'];\n\n /**\n * Adds functionality for a primary action button in the toolbar.\n * Accepts a [PrimaryActionButton](./?path=/story/features-actions-primaryactionbutton--primaryactionbutton) component.\n * @external\n * @overrideType [PrimaryActionButton](./?path=/story/features-actions-primaryactionbutton--primaryactionbutton)\n */\n primaryActionButton?: PrimaryActionButtonElement;\n\n /**\n * Apply filter button implementation: `import { AddApplyFiltersButton } from '@wix/patterns';`\n * <br>\n * Add `Apply` button to the filters panel footer. Panel filters will be applied only after the button is clicked.\n */\n AddApplyFiltersButton?: AddApplyFiltersButtonType;\n\n /**\n * Limits the amount of rows a visitor can select.\n * @external\n */\n maxSelection?: number;\n\n /**\n * Indicates whether the table should have an [internal scroll](./?path=/story/features-display-internal-scroll--internal-scroll) instead of the default page scroll.\n * @external\n */\n internalScroll?: boolean;\n}\n\nexport interface ToolbarCollectionProps<T, F extends FiltersMap>\n extends ToolbarCollectionBaseProps<T, F> {\n state: ToolbarCollectionState<T, F>;\n}\n\nexport function ToolbarCollection<T, F extends FiltersMap>(\n props: ToolbarCollectionProps<T, F>,\n) {\n const {\n state,\n filters,\n title,\n tabs,\n views,\n extraToolbar,\n selectionToolbar,\n dragAndDropReorderModeToolbar,\n sticky: stickyProp,\n search,\n children,\n tableGridSwitchButton,\n exportButton,\n primaryActionButton,\n summaryBar,\n topNotification,\n } = props;\n assertComponentType(views, 'CollectionViewsDropdown', 'views');\n checkConflictingToolbarProps(props);\n\n const { scrollableContentRef: scrollablePageRef } = usePageScrollContext();\n\n const [sticky, setSticky] = useState(\n stickyProp ?? scrollablePageRef?.current != null,\n );\n\n useEffect(() => {\n setSticky(stickyProp ?? scrollablePageRef?.current != null);\n }, [stickyProp]);\n\n return (\n <>\n <CollectionToolbars\n sticky={sticky}\n state={state}\n search={search}\n views={views}\n title={title}\n tabs={tabs}\n filters={filters}\n selectionToolbar={selectionToolbar}\n dragAndDropReorderModeToolbar={dragAndDropReorderModeToolbar}\n extraToolbar={extraToolbar}\n tableGridSwitchButton={tableGridSwitchButton}\n exportButton={exportButton}\n primaryActionButton={primaryActionButton}\n summaryBar={summaryBar}\n topNotification={\n typeof topNotification === 'function'\n ? () =>\n topNotification({ query: state.collection.result.originQuery })\n : topNotification\n }\n titleBar={\n <Box\n width=\"100%\"\n borderTopColor=\"D60\"\n borderTopWidth=\"1px\"\n borderTopStyle=\"solid\"\n boxSizing=\"border-box\"\n />\n }\n />\n <Box\n dataHook=\"toolbar-collection-content\"\n width=\"100%\"\n direction=\"vertical\"\n minHeight={0}\n flex={1}\n verticalAlign=\"middle\"\n >\n {children}\n </Box>\n </>\n );\n}\n"],"mappings":";;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AAUA,IAAAG,oBAAA,GAAAH,OAAA;AAYA,IAAAI,mBAAA,GAAAJ,OAAA;AAOA,IAAAK,6BAAA,GAAAL,OAAA;AAA8E,IAAAM,YAAA;AAAA,SAAAC,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAA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QAAQ,eACN7D,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACxD,aAAA,CAAAgE,GAAG;MACFC,KAAK,EAAC,MAAM;MACZC,cAAc,EAAC,KAAK;MACpBC,cAAc,EAAC,KAAK;MACpBC,cAAc,EAAC,OAAO;MACtBC,SAAS,EAAC,YAAY;MAAAC,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAjE,YAAA;QAAAkE,UAAA;QAAAC,YAAA;MAAA;IAAA,CACvB,CACF;IAAAJ,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjE,YAAA;MAAAkE,UAAA;MAAAC,YAAA;IAAA;EAAA,CACF,CAAC,eACFxE,MAAA,CAAAY,OAAA,CAAA0C,aAAA,CAACxD,aAAA,CAAAgE,GAAG;IACFW,QAAQ,EAAC,4BAA4B;IACrCV,KAAK,EAAC,MAAM;IACZW,SAAS,EAAC,UAAU;IACpBC,SAAS,EAAE,CAAE;IACbC,IAAI,EAAE,CAAE;IACRC,aAAa,EAAC,QAAQ;IAAAT,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAAjE,YAAA;MAAAkE,UAAA;MAAAC,YAAA;IAAA;EAAA,GAErBjC,QACE,CACL,CAAC;AAEP","ignoreList":[]}
|
|
@@ -122,7 +122,7 @@ function useToolbarCollectionSyncProps(props) {
|
|
|
122
122
|
isUsingTableSubtitle: !!((_props$title = props.title) != null && _props$title.props.subtitle),
|
|
123
123
|
isUsingCounterInHeader: !!((_props$title2 = props.title) != null && _props$title2.props.showTotal),
|
|
124
124
|
isUsingSelectAllLimitation: !!props.maxSelection,
|
|
125
|
-
isUsingErrorMessage: !!props.renderError,
|
|
125
|
+
isUsingErrorMessage: !!(props.errorState ?? props.renderError),
|
|
126
126
|
isUsingAllItemsView: getIsUsingAllItemsView(),
|
|
127
127
|
isUsingCustomEmptyState: !!props.emptyState,
|
|
128
128
|
isUsingCustomNoResultsState: !!props.noResultsState,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_mobx","_checkConflictingToolbarProps","_providers","_WixPatternsRouterProvider","useToolbarCollectionSyncProps","props","state","views","tabs","exportButton","dragAndDropCategories","maxSelection","search","filters","isUsingDragAndDrop","isUsingBulkActionsToolbar","isUsingHorizontalScroll","isUsingFolders","isUsingTableVirtualization","summaryBar","checkConflictingToolbarProps","internalScroll","pageState","useCollectionPageContext","router","useWixPatternsRouter","useEffect","reaction","scrollTop","scrollTopBeforeUnmount","routerState","currentState","_createdEntity","fireImmediately","_pageState$pageState$","scrollableContentRef","current","undefined","getIsUsingAllItemsView","allItemsViewProps","hidden","featuredComponents","set","tabsFilterProps","useMemo","filter","hasHeader","minimizedHeaderHeight","collection","totalStatus","total","status","runInAction","useState","type","setViewsState","action","viewsProps","_props$AddApplyFilter","_props$title","_props$title2","AddApplyFiltersButton","setStateObject","featuresAvailability","isDisablingSearch","isUsingFilters","isUsingTags","tags","isUsingTabs","isUsingSummaryRow","additionalFeaturesAvailability","isUsingTableSubtitle","title","subtitle","isUsingCounterInHeader","showTotal","isUsingSelectAllLimitation","isUsingErrorMessage","renderError","isUsingAllItemsView","isUsingCustomEmptyState","emptyState","isUsingCustomNoResultsState","noResultsState","isUsingPrimaryActionCta","primaryActionButton","persistent","bulk"],"sources":["../../../../src/components/ToolbarCollection/useToolbarCollectionSyncProps.ts"],"sourcesContent":["import { FiltersMap } from '@wix/bex-core';\nimport { useEffect, useMemo, useState } from 'react';\nimport { action, reaction, runInAction } from 'mobx';\nimport { ToolbarCollectionProps } from './ToolbarCollection';\nimport { checkConflictingToolbarProps } from './checkConflictingToolbarProps';\nimport { useCollectionPageContext } from '../../providers';\nimport { useWixPatternsRouter } from '../../providers/WixPatternsRouterProvider';\n\nexport function useToolbarCollectionSyncProps<T, F extends FiltersMap>(\n props: ToolbarCollectionProps<T, F> & {\n isUsingDragAndDrop: boolean;\n isUsingBulkActionsToolbar: boolean;\n isUsingHorizontalScroll: boolean;\n isUsingFolders: boolean;\n isUsingTableVirtualization: boolean;\n },\n) {\n const {\n state,\n views,\n tabs,\n exportButton,\n dragAndDropCategories,\n maxSelection,\n search,\n filters,\n isUsingDragAndDrop,\n isUsingBulkActionsToolbar,\n isUsingHorizontalScroll,\n isUsingFolders,\n isUsingTableVirtualization,\n summaryBar,\n } = props;\n\n checkConflictingToolbarProps(props);\n\n state.internalScroll = props.internalScroll;\n\n const pageState = useCollectionPageContext();\n const router = useWixPatternsRouter();\n\n useEffect(() => {\n reaction(\n () => ({\n scrollTop: state.scrollTopBeforeUnmount,\n routerState: router?.currentState,\n }),\n ({ scrollTop, routerState }) => {\n pageState.scrollTopBeforeUnmount = routerState?._createdEntity\n ? 0\n : scrollTop;\n },\n { fireImmediately: true },\n );\n\n return () => {\n const scrollTop =\n pageState.pageState.scrollableContentRef.current?.scrollTop;\n if (scrollTop !== undefined) {\n state.scrollTopBeforeUnmount = scrollTop;\n }\n };\n }, []);\n\n const getIsUsingAllItemsView = () =>\n !!(\n // views=undefined, it means thw user didn't pass so allItemsViews=false\n (\n views &&\n // views.props=undefined, it means the user passed views without configuring allItems so allItemsViews=true\n (!views.props ||\n // views.props.allItemsViewProps=undefined, it means the user passed allItemsViewProps\n // without configuring the hidden so allItemsViews=true\n !views.props.allItemsViewProps ||\n // allItemsViews depends on hidden's value\n !views.props.allItemsViewProps.hidden)\n )\n );\n\n useEffect(() => {\n if (exportButton) {\n state.featuredComponents.exportButton.set(exportButton);\n }\n\n return () => {\n state.featuredComponents.exportButton.set(null);\n };\n }, [exportButton]);\n\n const tabsFilterProps = useMemo(() => {\n return tabs?.props\n ? {\n filter: tabs.props.filter,\n }\n : undefined;\n }, [tabs]);\n\n useEffect(\n () =>\n reaction(\n () => pageState.hasHeader,\n (hasHeader) => {\n if (hasHeader) {\n state.minimizedHeaderHeight = 66;\n }\n },\n {\n fireImmediately: true,\n },\n ),\n [],\n );\n\n useEffect(() => {\n if (state.collection.totalStatus === 'success') {\n pageState.total = state.collection.total;\n }\n\n return reaction(\n () => ({\n status: state.collection.totalStatus,\n total: state.collection.total,\n }),\n ({ status, total }) => {\n pageState.total = status === 'success' ? total : false;\n },\n );\n }, []);\n\n useEffect(() => {\n runInAction(() => {\n state.dragAndDropCategories = dragAndDropCategories;\n });\n // We accept this prop once on purpose because it's array it changes on every render. We expose a setter `set dragAndDropCategories` instead.\n }, []);\n\n useState(() => views?.type.setViewsState(state, views?.props));\n\n useEffect(\n action(() => {\n state.viewsProps = views?.props;\n }),\n [views],\n );\n\n useState(() => {\n props.AddApplyFiltersButton?.setStateObject(state);\n\n state.featuresAvailability = {\n isDisablingSearch: search === false,\n isUsingFilters: !!filters,\n isUsingDragAndDrop,\n isUsingBulkActionsToolbar,\n isUsingHorizontalScroll,\n isUsingFolders,\n isUsingTableVirtualization,\n isUsingTags: !!props.tags,\n isUsingTabs: !!tabs,\n isUsingSummaryRow: !!summaryBar,\n };\n\n state.additionalFeaturesAvailability = {\n isUsingTableSubtitle: !!props.title?.props.subtitle,\n isUsingCounterInHeader: !!props.title?.props.showTotal,\n isUsingSelectAllLimitation: !!props.maxSelection,\n isUsingErrorMessage: !!props.renderError,\n isUsingAllItemsView: getIsUsingAllItemsView(),\n isUsingCustomEmptyState: !!props.emptyState,\n isUsingCustomNoResultsState: !!props.noResultsState,\n isUsingPrimaryActionCta: !!props.primaryActionButton,\n };\n });\n\n useEffect(\n action(() => {\n if (tabsFilterProps?.filter) {\n state.tabsFilterProps = tabsFilterProps;\n tabsFilterProps.filter.persistent = true;\n }\n }),\n [tabsFilterProps],\n );\n\n useEffect(() => {\n runInAction(() => {\n state.bulk.maxSelection = maxSelection;\n });\n }, [maxSelection]);\n\n return state;\n}\n"],"mappings":";;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,6BAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AAEO,SAASK,6BAA6BA,CAC3CC,KAMC,EACD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AE,CAAC,GAAAd,aAAA,GAACvD,KAAK,CAACmE,KAAK,aAAXZ,aAAA,CAAavD,KAAK,CAACsE,SAAS;MACtDC,0BAA0B,EAAE,CAAC,CAACvE,KAAK,CAACM,YAAY;MAChDkE,mBAAmB,EAAE,CAAC,CAACxE,KAAK,CAACyE,WAAW;MACxCC,mBAAmB,EAAEzC,sBAAsB,CAAC,CAAC;MAC7C0C,uBAAuB,EAAE,CAAC,CAAC3E,KAAK,CAAC4E,UAAU;MAC3CC,2BAA2B,EAAE,CAAC,CAAC7E,KAAK,CAAC8E,cAAc;MACnDC,uBAAuB,EAAE,CAAC,CAAC/E,KAAK,CAACgF;IACnC,CAAC;EACH,CAAC,CAAC;EAEF,IAAA3D,gBAAS,EACP,IAAA8B,YAAM,EAAC,MAAM;IACX,IAAIb,eAAe,YAAfA,eAAe,CAAEE,MAAM,EAAE;MAC3BvC,KAAK,CAACqC,eAAe,GAAGA,eAAe;MACvCA,eAAe,CAACE,MAAM,CAACyC,UAAU,GAAG,IAAI;IAC1C;EACF,CAAC,CAAC,EACF,CAAC3C,eAAe,CAClB,CAAC;EAED,IAAAjB,gBAAS,EAAC,MAAM;IACd,IAAA0B,iBAAW,EAAC,MAAM;MAChB9C,KAAK,CAACiF,IAAI,CAAC5E,YAAY,GAAGA,YAAY;IACxC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,YAAY,CAAC,CAAC;EAElB,OAAOL,KAAK;AACd","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_react","require","_mobx","_checkConflictingToolbarProps","_providers","_WixPatternsRouterProvider","useToolbarCollectionSyncProps","props","state","views","tabs","exportButton","dragAndDropCategories","maxSelection","search","filters","isUsingDragAndDrop","isUsingBulkActionsToolbar","isUsingHorizontalScroll","isUsingFolders","isUsingTableVirtualization","summaryBar","checkConflictingToolbarProps","internalScroll","pageState","useCollectionPageContext","router","useWixPatternsRouter","useEffect","reaction","scrollTop","scrollTopBeforeUnmount","routerState","currentState","_createdEntity","fireImmediately","_pageState$pageState$","scrollableContentRef","current","undefined","getIsUsingAllItemsView","allItemsViewProps","hidden","featuredComponents","set","tabsFilterProps","useMemo","filter","hasHeader","minimizedHeaderHeight","collection","totalStatus","total","status","runInAction","useState","type","setViewsState","action","viewsProps","_props$AddApplyFilter","_props$title","_props$title2","AddApplyFiltersButton","setStateObject","featuresAvailability","isDisablingSearch","isUsingFilters","isUsingTags","tags","isUsingTabs","isUsingSummaryRow","additionalFeaturesAvailability","isUsingTableSubtitle","title","subtitle","isUsingCounterInHeader","showTotal","isUsingSelectAllLimitation","isUsingErrorMessage","errorState","renderError","isUsingAllItemsView","isUsingCustomEmptyState","emptyState","isUsingCustomNoResultsState","noResultsState","isUsingPrimaryActionCta","primaryActionButton","persistent","bulk"],"sources":["../../../../src/components/ToolbarCollection/useToolbarCollectionSyncProps.ts"],"sourcesContent":["import { FiltersMap } from '@wix/bex-core';\nimport { useEffect, useMemo, useState } from 'react';\nimport { action, reaction, runInAction } from 'mobx';\nimport { ToolbarCollectionProps } from './ToolbarCollection';\nimport { checkConflictingToolbarProps } from './checkConflictingToolbarProps';\nimport { useCollectionPageContext } from '../../providers';\nimport { useWixPatternsRouter } from '../../providers/WixPatternsRouterProvider';\n\nexport function useToolbarCollectionSyncProps<T, F extends FiltersMap>(\n props: ToolbarCollectionProps<T, F> & {\n isUsingDragAndDrop: boolean;\n isUsingBulkActionsToolbar: boolean;\n isUsingHorizontalScroll: boolean;\n isUsingFolders: boolean;\n isUsingTableVirtualization: boolean;\n },\n) {\n const {\n state,\n views,\n tabs,\n exportButton,\n dragAndDropCategories,\n maxSelection,\n search,\n filters,\n isUsingDragAndDrop,\n isUsingBulkActionsToolbar,\n isUsingHorizontalScroll,\n isUsingFolders,\n isUsingTableVirtualization,\n summaryBar,\n } = props;\n\n checkConflictingToolbarProps(props);\n\n state.internalScroll = props.internalScroll;\n\n const pageState = useCollectionPageContext();\n const router = useWixPatternsRouter();\n\n useEffect(() => {\n reaction(\n () => ({\n scrollTop: state.scrollTopBeforeUnmount,\n routerState: router?.currentState,\n }),\n ({ scrollTop, routerState }) => {\n pageState.scrollTopBeforeUnmount = routerState?._createdEntity\n ? 0\n : scrollTop;\n },\n { fireImmediately: true },\n );\n\n return () => {\n const scrollTop =\n pageState.pageState.scrollableContentRef.current?.scrollTop;\n if (scrollTop !== undefined) {\n state.scrollTopBeforeUnmount = scrollTop;\n }\n };\n }, []);\n\n const getIsUsingAllItemsView = () =>\n !!(\n // views=undefined, it means thw user didn't pass so allItemsViews=false\n (\n views &&\n // views.props=undefined, it means the user passed views without configuring allItems so allItemsViews=true\n (!views.props ||\n // views.props.allItemsViewProps=undefined, it means the user passed allItemsViewProps\n // without configuring the hidden so allItemsViews=true\n !views.props.allItemsViewProps ||\n // allItemsViews depends on hidden's value\n !views.props.allItemsViewProps.hidden)\n )\n );\n\n useEffect(() => {\n if (exportButton) {\n state.featuredComponents.exportButton.set(exportButton);\n }\n\n return () => {\n state.featuredComponents.exportButton.set(null);\n };\n }, [exportButton]);\n\n const tabsFilterProps = useMemo(() => {\n return tabs?.props\n ? {\n filter: tabs.props.filter,\n }\n : undefined;\n }, [tabs]);\n\n useEffect(\n () =>\n reaction(\n () => pageState.hasHeader,\n (hasHeader) => {\n if (hasHeader) {\n state.minimizedHeaderHeight = 66;\n }\n },\n {\n fireImmediately: true,\n },\n ),\n [],\n );\n\n useEffect(() => {\n if (state.collection.totalStatus === 'success') {\n pageState.total = state.collection.total;\n }\n\n return reaction(\n () => ({\n status: state.collection.totalStatus,\n total: state.collection.total,\n }),\n ({ status, total }) => {\n pageState.total = status === 'success' ? total : false;\n },\n );\n }, []);\n\n useEffect(() => {\n runInAction(() => {\n state.dragAndDropCategories = dragAndDropCategories;\n });\n // We accept this prop once on purpose because it's array it changes on every render. We expose a setter `set dragAndDropCategories` instead.\n }, []);\n\n useState(() => views?.type.setViewsState(state, views?.props));\n\n useEffect(\n action(() => {\n state.viewsProps = views?.props;\n }),\n [views],\n );\n\n useState(() => {\n props.AddApplyFiltersButton?.setStateObject(state);\n\n state.featuresAvailability = {\n isDisablingSearch: search === false,\n isUsingFilters: !!filters,\n isUsingDragAndDrop,\n isUsingBulkActionsToolbar,\n isUsingHorizontalScroll,\n isUsingFolders,\n isUsingTableVirtualization,\n isUsingTags: !!props.tags,\n isUsingTabs: !!tabs,\n isUsingSummaryRow: !!summaryBar,\n };\n\n state.additionalFeaturesAvailability = {\n isUsingTableSubtitle: !!props.title?.props.subtitle,\n isUsingCounterInHeader: !!props.title?.props.showTotal,\n isUsingSelectAllLimitation: !!props.maxSelection,\n isUsingErrorMessage: !!(props.errorState ?? props.renderError),\n isUsingAllItemsView: getIsUsingAllItemsView(),\n isUsingCustomEmptyState: !!props.emptyState,\n isUsingCustomNoResultsState: !!props.noResultsState,\n isUsingPrimaryActionCta: !!props.primaryActionButton,\n };\n });\n\n useEffect(\n action(() => {\n if (tabsFilterProps?.filter) {\n state.tabsFilterProps = tabsFilterProps;\n tabsFilterProps.filter.persistent = true;\n }\n }),\n [tabsFilterProps],\n );\n\n useEffect(() => {\n runInAction(() => {\n state.bulk.maxSelection = maxSelection;\n });\n }, [maxSelection]);\n\n return state;\n}\n"],"mappings":";;;;AACA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,KAAA,GAAAD,OAAA;AAEA,IAAAE,6BAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AAEO,SAASK,6BAA6BA,CAC3CC,KAMC,EACD;EACA,MAAM;IACJC,KAAK;IACLC,KAAK;IACLC,IAAI;IACJC,YAAY;IACZC,qBAAqB;IACrBC,YAAY;IACZC,MAAM;IACNC,OAAO;IACPC,kBAAkB;IAClBC,yBAAyB;IACzBC,uBAAuB;IACvBC,cAAc;IACdC,0BAA0B;IAC1BC;EACF,CAAC,GAAGd,KAAK;EAET,IAAAe,0DAA4B,EAACf,KAAK,CAAC;EAEnCC,KAAK,CAACe,cAAc,GAAGhB,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AAuB,EAAE,CAAC,CAAC5E,KAAK,CAAC6E,UAAU;MAC3CC,2BAA2B,EAAE,CAAC,CAAC9E,KAAK,CAAC+E,cAAc;MACnDC,uBAAuB,EAAE,CAAC,CAAChF,KAAK,CAACiF;IACnC,CAAC;EACH,CAAC,CAAC;EAEF,IAAA5D,gBAAS,EACP,IAAA8B,YAAM,EAAC,MAAM;IACX,IAAIb,eAAe,YAAfA,eAAe,CAAEE,MAAM,EAAE;MAC3BvC,KAAK,CAACqC,eAAe,GAAGA,eAAe;MACvCA,eAAe,CAACE,MAAM,CAAC0C,UAAU,GAAG,IAAI;IAC1C;EACF,CAAC,CAAC,EACF,CAAC5C,eAAe,CAClB,CAAC;EAED,IAAAjB,gBAAS,EAAC,MAAM;IACd,IAAA0B,iBAAW,EAAC,MAAM;MAChB9C,KAAK,CAACkF,IAAI,CAAC7E,YAAY,GAAGA,YAAY;IACxC,CAAC,CAAC;EACJ,CAAC,EAAE,CAACA,YAAY,CAAC,CAAC;EAElB,OAAOL,KAAK;AACd","ignoreList":[]}
|
|
@@ -31,7 +31,7 @@ function _ContainerRectDebug() {
|
|
|
31
31
|
if ((stackingRootRef == null ? void 0 : stackingRootRef.current) == null) {
|
|
32
32
|
return null;
|
|
33
33
|
}
|
|
34
|
-
return /*#__PURE__*/(0, _reactDom.createPortal)(
|
|
34
|
+
return /*#__PURE__*/(0, _reactDom.createPortal)(/*#__PURE__*/_react.default.createElement("div", {
|
|
35
35
|
style: {
|
|
36
36
|
position: 'fixed',
|
|
37
37
|
zIndex: 50,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_providers","_ToolbarCollectionContext","_reactDom","_mobxReactLite","_RectState","_react2","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_ContainerRectDebug","container","useWixPatternsContainer","stackingRootRef","usePageContext","scrollableContentRef","useScrollableContentContext","toolbar","useToolbarCollectionContext","scrollableContentRect","useState","RectState","useEffect","element","current","init","createPortal","createElement","style","position","zIndex","background","pointerEvents","border","containerRect","top","left","bottom","width","__self","__source","fileName","lineNumber","columnNumber","ContainerRectDebug","exports","observer"],"sources":["../../../../src/components/ToolbarCollectionContentAutoSizer/ContainerRectDebug.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { usePageContext, useScrollableContentContext } from '../../providers';\nimport { useToolbarCollectionContext } from '../ToolbarCollectionContext';\nimport { createPortal } from 'react-dom';\nimport { observer } from 'mobx-react-lite';\nimport { RectState } from '../../state/RectState';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\n\nfunction _ContainerRectDebug() {\n const container = useWixPatternsContainer();\n const { stackingRootRef } = usePageContext();\n const { scrollableContentRef } = useScrollableContentContext();\n const toolbar = useToolbarCollectionContext();\n\n const [scrollableContentRect] = useState(\n () =>\n new RectState({\n container,\n }),\n );\n\n useEffect(() => {\n scrollableContentRect.element = scrollableContentRef?.current;\n return scrollableContentRect.init();\n }, []);\n\n if (stackingRootRef?.current == null) {\n return null;\n }\n\n return createPortal(\n <div\n style={{\n position: 'fixed',\n zIndex: 50,\n background: 'transparent',\n pointerEvents: 'none',\n border: '#15e9e9 1px solid',\n ...(toolbar.containerRect && {\n top: toolbar.containerRect.top,\n left: toolbar.containerRect.left,\n bottom: 0,\n width: toolbar.containerRect.width,\n }),\n }}\n />,\n stackingRootRef.current,\n );\n}\n\nexport const ContainerRectDebug = observer(_ContainerRectDebug);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA8D,IAAAO,YAAA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AC5C,MAAM;IAAEC;EAAqB,CAAC,GAAG,IAAAC,sCAA2B,EAAC,CAAC;EAC9D,MAAMC,OAAO,GAAG,IAAAC,qDAA2B,EAAC,CAAC;EAE7C,MAAM,CAACC,qBAAqB,CAAC,GAAG,IAAAC,eAAQ,EACtC,MACE,IAAIC,oBAAS,CAAC;IACZV;EACF,CAAC,CACL,CAAC;EAED,IAAAW,gBAAS,EAAC,MAAM;IACdH,qBAAqB,CAACI,OAAO,GAAGR,oBAAoB,oBAApBA,oBAAoB,CAAES,OAAO;IAC7D,OAAOL,qBAAqB,CAACM,IAAI,CAAC,CAAC;EACrC,CAAC,EAAE,EAAE,CAAC;EAEN,IAAI,CAAAZ,eAAe,oBAAfA,eAAe,CAAEW,OAAO,KAAI,IAAI,EAAE;IACpC,OAAO,IAAI;EACb;EAEA,oBAAO,IAAAE,sBAAY,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_providers","_ToolbarCollectionContext","_reactDom","_mobxReactLite","_RectState","_react2","_jsxFileName","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","_ContainerRectDebug","container","useWixPatternsContainer","stackingRootRef","usePageContext","scrollableContentRef","useScrollableContentContext","toolbar","useToolbarCollectionContext","scrollableContentRect","useState","RectState","useEffect","element","current","init","createPortal","createElement","style","position","zIndex","background","pointerEvents","border","containerRect","top","left","bottom","width","__self","__source","fileName","lineNumber","columnNumber","ContainerRectDebug","exports","observer"],"sources":["../../../../src/components/ToolbarCollectionContentAutoSizer/ContainerRectDebug.tsx"],"sourcesContent":["import React, { useEffect, useState } from 'react';\nimport { usePageContext, useScrollableContentContext } from '../../providers';\nimport { useToolbarCollectionContext } from '../ToolbarCollectionContext';\nimport { createPortal } from 'react-dom';\nimport { observer } from 'mobx-react-lite';\nimport { RectState } from '../../state/RectState';\nimport { useWixPatternsContainer } from '@wix/bex-core/react';\n\nfunction _ContainerRectDebug() {\n const container = useWixPatternsContainer();\n const { stackingRootRef } = usePageContext();\n const { scrollableContentRef } = useScrollableContentContext();\n const toolbar = useToolbarCollectionContext();\n\n const [scrollableContentRect] = useState(\n () =>\n new RectState({\n container,\n }),\n );\n\n useEffect(() => {\n scrollableContentRect.element = scrollableContentRef?.current;\n return scrollableContentRect.init();\n }, []);\n\n if (stackingRootRef?.current == null) {\n return null;\n }\n\n return createPortal(\n <div\n style={{\n position: 'fixed',\n zIndex: 50,\n background: 'transparent',\n pointerEvents: 'none',\n border: '#15e9e9 1px solid',\n ...(toolbar.containerRect && {\n top: toolbar.containerRect.top,\n left: toolbar.containerRect.left,\n bottom: 0,\n width: toolbar.containerRect.width,\n }),\n }}\n />,\n stackingRootRef.current,\n );\n}\n\nexport const ContainerRectDebug = observer(_ContainerRectDebug);\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,yBAAA,GAAAF,OAAA;AACA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AACA,IAAAM,OAAA,GAAAN,OAAA;AAA8D,IAAAO,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,SAAAV,wBAAAU,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,GAA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AAfA,eAAe,CAAEW,OAAO,KAAI,IAAI,EAAE;IACpC,OAAO,IAAI;EACb;EAEA,oBAAO,IAAAE,sBAAY,eACjB9C,MAAA,CAAAgB,OAAA,CAAA+B,aAAA;IACEC,KAAK,EAAE;MACLC,QAAQ,EAAE,OAAO;MACjBC,MAAM,EAAE,EAAE;MACVC,UAAU,EAAE,aAAa;MACzBC,aAAa,EAAE,MAAM;MACrBC,MAAM,EAAE,mBAAmB;MAC3B,IAAIhB,OAAO,CAACiB,aAAa,IAAI;QAC3BC,GAAG,EAAElB,OAAO,CAACiB,aAAa,CAACC,GAAG;QAC9BC,IAAI,EAAEnB,OAAO,CAACiB,aAAa,CAACE,IAAI;QAChCC,MAAM,EAAE,CAAC;QACTC,KAAK,EAAErB,OAAO,CAACiB,aAAa,CAACI;MAC/B,CAAC;IACH,CAAE;IAAAC,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAApD,YAAA;MAAAqD,UAAA;MAAAC,YAAA;IAAA;EAAA,CACH,CAAC,EACF9B,eAAe,CAACW,OAClB,CAAC;AACH;AAEO,MAAMoB,kBAAkB,GAAAC,OAAA,CAAAD,kBAAA,GAAG,IAAAE,uBAAQ,EAACpC,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -5,14 +5,14 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "ToolbarItemBox2744976596";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
15
|
+
"root": "ToolbarItemBox2744976596__root"
|
|
16
16
|
};
|
|
17
17
|
var keyframes = exports.keyframes = {};
|
|
18
18
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/ToolbarItemBox/ToolbarItemBox.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../../src/components/ToolbarItemBox/ToolbarItemBox.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"ToolbarItemBox2744976596\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"ToolbarItemBox2744976596__root\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,0BAA0B;AAC5C,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC;AAAgC,CAAC;AACvD,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -5,16 +5,16 @@ exports.vars = exports.style = exports.stVars = exports.st = exports.namespace =
|
|
|
5
5
|
var _stylableEsmRuntime = require("../stylable-esm-runtime.js");
|
|
6
6
|
// @ts-nocheck
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "common1765671592";
|
|
9
9
|
var _style_ = _stylableEsmRuntime.classesRuntime.bind(null, _namespace_);
|
|
10
10
|
var cssStates = exports.cssStates = _stylableEsmRuntime.statesRuntime.bind(null, _namespace_);
|
|
11
11
|
var style = exports.style = _style_;
|
|
12
12
|
var st = exports.st = _style_;
|
|
13
13
|
var namespace = exports.namespace = _namespace_;
|
|
14
14
|
var classes = exports.classes = {
|
|
15
|
-
"root": "
|
|
16
|
-
"column": "
|
|
17
|
-
"fullHeight": "
|
|
15
|
+
"root": "common1765671592__root",
|
|
16
|
+
"column": "common1765671592__column",
|
|
17
|
+
"fullHeight": "common1765671592__fullHeight"
|
|
18
18
|
};
|
|
19
19
|
var keyframes = exports.keyframes = {};
|
|
20
20
|
var layers = exports.layers = {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../src/components/common.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"
|
|
1
|
+
{"version":3,"names":["_stylableEsmRuntime","require","_namespace_","_style_","classesRuntime","bind","cssStates","exports","statesRuntime","style","st","namespace","classes","keyframes","layers","containers","stVars","vars"],"sources":["../../../src/components/common.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"common1765671592\";\nvar _style_ = classesRuntime.bind(null, _namespace_);\n\nexport var cssStates = statesRuntime.bind(null, _namespace_);\nexport var style = _style_;\nexport var st: import(\"@stylable/runtime\").STFunction = _style_;\n\nexport var namespace = _namespace_;\nexport var classes = {\"root\":\"common1765671592__root\",\"column\":\"common1765671592__column\",\"fullHeight\":\"common1765671592__fullHeight\"};\nexport var keyframes = {}; \nexport var layers = {};\nexport var containers = {};\nexport var stVars = {}; \nexport var vars = {}; \n\n\n\n\n"],"mappings":";;;;AAGA,IAAAA,mBAAA,GAAAC,OAAA;AAHA;;AAOA,IAAIC,WAAW,GAAG,kBAAkB;AACpC,IAAIC,OAAO,GAAGC,kCAAc,CAACC,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AAE7C,IAAII,SAAS,GAAAC,OAAA,CAAAD,SAAA,GAAGE,iCAAa,CAACH,IAAI,CAAC,IAAI,EAAEH,WAAW,CAAC;AACrD,IAAIO,KAAK,GAAAF,OAAA,CAAAE,KAAA,GAAGN,OAAO;AACnB,IAAIO,EAA0C,GAAAH,OAAA,CAAAG,EAAA,GAAGP,OAAO;AAExD,IAAIQ,SAAS,GAAAJ,OAAA,CAAAI,SAAA,GAAGT,WAAW;AAC3B,IAAIU,OAAO,GAAAL,OAAA,CAAAK,OAAA,GAAG;EAAC,MAAM,EAAC,wBAAwB;EAAC,QAAQ,EAAC,0BAA0B;EAAC,YAAY,EAAC;AAA8B,CAAC;AAC/H,IAAIC,SAAS,GAAAN,OAAA,CAAAM,SAAA,GAAG,CAAC,CAAC;AAClB,IAAIC,MAAM,GAAAP,OAAA,CAAAO,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,UAAU,GAAAR,OAAA,CAAAQ,UAAA,GAAG,CAAC,CAAC;AACnB,IAAIC,MAAM,GAAAT,OAAA,CAAAS,MAAA,GAAG,CAAC,CAAC;AACf,IAAIC,IAAI,GAAAV,OAAA,CAAAU,IAAA,GAAG,CAAC,CAAC","ignoreList":[]}
|
|
@@ -37,12 +37,6 @@ Object.keys(_CollectionContext).forEach(function (key) {
|
|
|
37
37
|
if (key in exports && exports[key] === _CollectionContext[key]) return;
|
|
38
38
|
exports[key] = _CollectionContext[key];
|
|
39
39
|
});
|
|
40
|
-
var _CollectionList = require("./CollectionList");
|
|
41
|
-
Object.keys(_CollectionList).forEach(function (key) {
|
|
42
|
-
if (key === "default" || key === "__esModule") return;
|
|
43
|
-
if (key in exports && exports[key] === _CollectionList[key]) return;
|
|
44
|
-
exports[key] = _CollectionList[key];
|
|
45
|
-
});
|
|
46
40
|
var _CollectionListItem = require("./CollectionListItem");
|
|
47
41
|
Object.keys(_CollectionListItem).forEach(function (key) {
|
|
48
42
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -61,12 +55,6 @@ Object.keys(_CollectionListHeader).forEach(function (key) {
|
|
|
61
55
|
if (key in exports && exports[key] === _CollectionListHeader[key]) return;
|
|
62
56
|
exports[key] = _CollectionListHeader[key];
|
|
63
57
|
});
|
|
64
|
-
var _InfiniteScrollCollectionList = require("./InfiniteScrollCollectionList");
|
|
65
|
-
Object.keys(_InfiniteScrollCollectionList).forEach(function (key) {
|
|
66
|
-
if (key === "default" || key === "__esModule") return;
|
|
67
|
-
if (key in exports && exports[key] === _InfiniteScrollCollectionList[key]) return;
|
|
68
|
-
exports[key] = _InfiniteScrollCollectionList[key];
|
|
69
|
-
});
|
|
70
58
|
var _CollectionToolbar = require("./CollectionToolbar");
|
|
71
59
|
Object.keys(_CollectionToolbar).forEach(function (key) {
|
|
72
60
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_CollectionPage","require","Object","keys","forEach","key","exports","_CollectionTable","_Table","_CollectionPagination","_PaginationTable","_CollectionContext","
|
|
1
|
+
{"version":3,"names":["_CollectionPage","require","Object","keys","forEach","key","exports","_CollectionTable","_Table","_CollectionPagination","_PaginationTable","_CollectionContext","_CollectionListItem","_CollectionListRow","_CollectionListHeader","_CollectionToolbar","_DeleteModal","_WixPatternsTestProvider","_Picker","_PickerContent"],"sources":["../../../src/components/index.ts"],"sourcesContent":["export * from './CollectionPage';\nexport * from './CollectionTable';\nexport * from './Table';\nexport * from './CollectionPagination';\nexport * from './PaginationTable';\nexport * from './CollectionContext';\nexport * from './CollectionListItem';\nexport * from './CollectionListRow';\nexport * from './CollectionListHeader';\nexport * from './CollectionToolbar';\nexport * from './DeleteModal';\nexport * from './WixPatternsTestProvider';\nexport * from './Picker';\nexport * from './PickerContent';\n"],"mappings":";;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,eAAA,CAAAK,GAAA;AAAA;AACA,IAAAE,gBAAA,GAAAN,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAI,gBAAA,EAAAH,OAAA,WAAAC,GAAA;EAAA,IA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-
var _CollectionListUni = require("./CollectionList/CollectionList.uni.driver");
|
|
23
|
-
Object.keys(_CollectionListUni).forEach(function (key) {
|
|
24
|
-
if (key === "default" || key === "__esModule") return;
|
|
25
|
-
if (key in exports && exports[key] === _CollectionListUni[key]) return;
|
|
26
|
-
exports[key] = _CollectionListUni[key];
|
|
27
|
-
});
|
|
28
22
|
var _CollectionListItemUni = require("./CollectionListItem/CollectionListItem.uni.driver");
|
|
29
23
|
Object.keys(_CollectionListItemUni).forEach(function (key) {
|
|
30
24
|
if (key === "default" || key === "__esModule") return;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_CollectionToolbarUni","require","Object","keys","forEach","key","exports","_CollectionTableUni","_TableUni","
|
|
1
|
+
{"version":3,"names":["_CollectionToolbarUni","require","Object","keys","forEach","key","exports","_CollectionTableUni","_TableUni","_CollectionListItemUni","_uniDriverFactory"],"sources":["../../../src/components/unidriver.ts"],"sourcesContent":["export * from './CollectionToolbar/CollectionToolbar.uni.driver';\nexport * from './CollectionTable/CollectionTable.uni.driver';\nexport * from './Table/Table.uni.driver';\nexport * from './CollectionListItem/CollectionListItem.uni.driver';\nexport * from './uniDriverFactory';\n"],"mappings":";;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,qBAAA,CAAAK,GAAA;AAAA;AACA,IAAAE,mBAAA,GAAAN,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAI,mBAAA,EAAAH,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAE,mBAAA,CAAAF,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAE,mBAAA,CAAAF,GAAA;AAAA;AACA,IAAAG,SAAA,GAAAP,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAK,SAAA,EAAAJ,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAG,SAAA,CAAAH,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAG,SAAA,CAAAH,GAAA;AAAA;AACA,IAAAI,sBAAA,GAAAR,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAM,sBAAA,EAAAL,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAI,sBAAA,CAAAJ,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAI,sBAAA,CAAAJ,GAAA;AAAA;AACA,IAAAK,iBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iBAAA,CAAAL,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAK,iBAAA,CAAAL,GAAA;AAAA","ignoreList":[]}
|
package/dist/cjs/exports/form.js
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
|
-
var
|
|
5
|
-
Object.keys(
|
|
4
|
+
var _form = require("@wix/bex-core/form");
|
|
5
|
+
Object.keys(_form).forEach(function (key) {
|
|
6
6
|
if (key === "default" || key === "__esModule") return;
|
|
7
|
-
if (key in exports && exports[key] ===
|
|
8
|
-
exports[key] =
|
|
7
|
+
if (key in exports && exports[key] === _form[key]) return;
|
|
8
|
+
exports[key] = _form[key];
|
|
9
9
|
});
|
|
10
10
|
//# sourceMappingURL=form.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["_form","require","Object","keys","forEach","key","exports"],"sources":["../../../src/exports/form.ts"],"sourcesContent":["/*\n TODO: Eventually we will want to re-expose only specific APIs wrapped with our custom hooks:\n useCairoForm\n useCairoController\n ...\n Note: Naming can drop \"Cairo\" but the hook itself won't be a direct export from react-hook-form\n*/\nexport * from '@wix/bex-core/form';\n"],"mappings":";;;AAOA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAC,OAAA,CAAAD,GAAA,IAAAL,KAAA,CAAAK,GAAA;AAAA","ignoreList":[]}
|
|
@@ -11,7 +11,7 @@ function useCollectionPageChild(children) {
|
|
|
11
11
|
// Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626
|
|
12
12
|
return _react.Children.toArray(children).map((child, index) => {
|
|
13
13
|
let newChild = null;
|
|
14
|
-
if (
|
|
14
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
15
15
|
switch (child.type) {
|
|
16
16
|
case _CollectionPageHeaderNew.CollectionPageHeader:
|
|
17
17
|
const header = child;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_CollectionPageHeaderNew","_CollectionPageContent","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useCollectionPageChild","children","Children","toArray","map","child","index","newChild","isValidElement","type","CollectionPageHeader","header","useCollectionPageHeader","CollectionPageContent","content","useCollectionPageContent","React","cloneElement","key","filter","c"],"sources":["../../../../src/hooks/useCollectionPageChild/useCollectionPageChild.tsx"],"sourcesContent":["import React, { isValidElement, Children, ReactNode } from 'react';\nimport {\n CollectionPageHeader,\n CollectionPageHeaderElement,\n} from '../../components/CollectionPageHeaderNew';\nimport {\n CollectionPageContent,\n CollectionPageContentElement,\n} from '../../components/CollectionPageContent';\n\nexport function useCollectionPageChild(children: ReactNode) {\n // Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626\n return Children.toArray(children)\n .map((child, index) => {\n let newChild = null;\n if (isValidElement(child)) {\n switch (child.type) {\n case CollectionPageHeader:\n const header = child as CollectionPageHeaderElement;\n newChild = header.type.useCollectionPageHeader(header);\n break;\n case CollectionPageContent:\n const content = child as CollectionPageContentElement;\n newChild = content.type.useCollectionPageContent(content);\n break;\n default:\n // WIP: Eventually once we will support all child types this will return null\n newChild = child;\n }\n }\n\n if (newChild === null) {\n return null;\n }\n return React.cloneElement(newChild, { key: index });\n })\n .filter((c) => c);\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAIA,IAAAE,sBAAA,GAAAF,OAAA;AAGgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,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;AAEzC,SAASW,sBAAsBA,CAACC,QAAmB,EAAE;EAC1D;EACA,OAAOC,eAAQ,CAACC,OAAO,CAACF,QAAQ,CAAC,CAC9BG,GAAG,CAAC,CAACC,KAAK,EAAEC,KAAK,KAAK;IACrB,IAAIC,QAAQ,GAAG,IAAI;IACnB,
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_CollectionPageHeaderNew","_CollectionPageContent","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","useCollectionPageChild","children","Children","toArray","map","child","index","newChild","isValidElement","type","CollectionPageHeader","header","useCollectionPageHeader","CollectionPageContent","content","useCollectionPageContent","React","cloneElement","key","filter","c"],"sources":["../../../../src/hooks/useCollectionPageChild/useCollectionPageChild.tsx"],"sourcesContent":["import React, { isValidElement, Children, ReactNode } from 'react';\nimport {\n CollectionPageHeader,\n CollectionPageHeaderElement,\n} from '../../components/CollectionPageHeaderNew';\nimport {\n CollectionPageContent,\n CollectionPageContentElement,\n} from '../../components/CollectionPageContent';\n\nexport function useCollectionPageChild(children: ReactNode) {\n // Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626\n return Children.toArray(children)\n .map((child, index) => {\n let newChild = null;\n if (isValidElement(child)) {\n switch (child.type) {\n case CollectionPageHeader:\n const header = child as CollectionPageHeaderElement;\n newChild = header.type.useCollectionPageHeader(header);\n break;\n case CollectionPageContent:\n const content = child as CollectionPageContentElement;\n newChild = content.type.useCollectionPageContent(content);\n break;\n default:\n // WIP: Eventually once we will support all child types this will return null\n newChild = child;\n }\n }\n\n if (newChild === null) {\n return null;\n }\n return React.cloneElement(newChild, { key: index });\n })\n .filter((c) => c);\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,wBAAA,GAAAD,OAAA;AAIA,IAAAE,sBAAA,GAAAF,OAAA;AAGgD,SAAAG,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAL,wBAAAK,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG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ACrB,OAAO,IAAI;IACb;IACA,oBAAOS,cAAK,CAACC,YAAY,CAACV,QAAQ,EAAE;MAAEW,GAAG,EAAEZ;IAAM,CAAC,CAAC;EACrD,CAAC,CAAC,CACDa,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAC;AACrB","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ var _EntityPageContent = require("../../components/EntityPageContent");
|
|
|
8
8
|
function useEntityPageChild(children, scrollableRef) {
|
|
9
9
|
// Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626
|
|
10
10
|
return _react.Children.toArray(children).map(child => {
|
|
11
|
-
if (
|
|
11
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
12
12
|
switch (child.type) {
|
|
13
13
|
case _EntityPageHeader.EntityPageHeader:
|
|
14
14
|
const header = child;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_EntityPageHeader","_EntityPageContent","useEntityPageChild","children","scrollableRef","Children","toArray","map","child","isValidElement","type","EntityPageHeader","header","useEntityPageHeader","EntityPageContent","content","useEntityPageContent","filter","c"],"sources":["../../../../src/hooks/useEntityPageChild/useEntityPageChild.tsx"],"sourcesContent":["import { isValidElement, Children, ReactNode, ReactElement } from 'react';\nimport { ContentProps, Page, HeaderProps } from '@wix/design-system';\nimport {\n EntityPageHeader,\n EntityPageHeaderElement,\n} from '../../components/EntityPageHeader';\nimport {\n EntityPageContent,\n EntityPageContentElement,\n} from '../../components/EntityPageContent';\n\nexport interface EntityPageChild {\n Header?: ReactElement<HeaderProps, typeof Page.Header>;\n Content?: ReactElement<ContentProps, typeof Page.Content>;\n}\n\nexport function useEntityPageChild(\n children: ReactNode,\n scrollableRef: HTMLElement | null,\n) {\n // Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626\n return Children.toArray(children)\n .map((child) => {\n if (isValidElement(child)) {\n switch (child.type) {\n case EntityPageHeader:\n const header = child as EntityPageHeaderElement;\n return header.type.useEntityPageHeader(header);\n case EntityPageContent:\n const content = child as EntityPageContentElement;\n return content.type.useEntityPageContent(content, scrollableRef);\n default:\n // TODO: Check whenever we should filter out or not other Page components\n return null;\n }\n }\n\n return null;\n })\n .filter((c) => c);\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AAIA,IAAAE,kBAAA,GAAAF,OAAA;AAUO,SAASG,kBAAkBA,CAChCC,QAAmB,EACnBC,aAAiC,EACjC;EACA;EACA,OAAOC,eAAQ,CAACC,OAAO,CAACH,QAAQ,CAAC,CAC9BI,GAAG,CAAEC,KAAK,IAAK;IACd,
|
|
1
|
+
{"version":3,"names":["_react","require","_EntityPageHeader","_EntityPageContent","useEntityPageChild","children","scrollableRef","Children","toArray","map","child","isValidElement","type","EntityPageHeader","header","useEntityPageHeader","EntityPageContent","content","useEntityPageContent","filter","c"],"sources":["../../../../src/hooks/useEntityPageChild/useEntityPageChild.tsx"],"sourcesContent":["import { isValidElement, Children, ReactNode, ReactElement } from 'react';\nimport { ContentProps, Page, HeaderProps } from '@wix/design-system';\nimport {\n EntityPageHeader,\n EntityPageHeaderElement,\n} from '../../components/EntityPageHeader';\nimport {\n EntityPageContent,\n EntityPageContentElement,\n} from '../../components/EntityPageContent';\n\nexport interface EntityPageChild {\n Header?: ReactElement<HeaderProps, typeof Page.Header>;\n Content?: ReactElement<ContentProps, typeof Page.Content>;\n}\n\nexport function useEntityPageChild(\n children: ReactNode,\n scrollableRef: HTMLElement | null,\n) {\n // Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626\n return Children.toArray(children)\n .map((child) => {\n if (isValidElement(child)) {\n switch (child.type) {\n case EntityPageHeader:\n const header = child as EntityPageHeaderElement;\n return header.type.useEntityPageHeader(header);\n case EntityPageContent:\n const content = child as EntityPageContentElement;\n return content.type.useEntityPageContent(content, scrollableRef);\n default:\n // TODO: Check whenever we should filter out or not other Page components\n return null;\n }\n }\n\n return null;\n })\n .filter((c) => c);\n}\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,iBAAA,GAAAD,OAAA;AAIA,IAAAE,kBAAA,GAAAF,OAAA;AAUO,SAASG,kBAAkBA,CAChCC,QAAmB,EACnBC,aAAiC,EACjC;EACA;EACA,OAAOC,eAAQ,CAACC,OAAO,CAACH,QAAQ,CAAC,CAC9BI,GAAG,CAAEC,KAAK,IAAK;IACd,iBAAI,IAAAC,qBAAc,EAACD,KAAK,CAAC,EAAE;MACzB,QAAQA,KAAK,CAACE,IAAI;QAChB,KAAKC,kCAAgB;UACnB,MAAMC,MAAM,GAAGJ,KAAgC;UAC/C,OAAOI,MAAM,CAACF,IAAI,CAACG,mBAAmB,CAACD,MAAM,CAAC;QAChD,KAAKE,oCAAiB;UACpB,MAAMC,OAAO,GAAGP,KAAiC;UACjD,OAAOO,OAAO,CAACL,IAAI,CAACM,oBAAoB,CAACD,OAAO,EAAEX,aAAa,CAAC;QAClE;UACE;UACA,OAAO,IAAI;MACf;IACF;IAEA,OAAO,IAAI;EACb,CAAC,CAAC,CACDa,MAAM,CAAEC,CAAC,IAAKA,CAAC,CAAC;AACrB","ignoreList":[]}
|
|
@@ -43,7 +43,7 @@ describe('usePickerContent', () => {
|
|
|
43
43
|
});
|
|
44
44
|
return null;
|
|
45
45
|
};
|
|
46
|
-
(0, _react.render)(
|
|
46
|
+
(0, _react.render)(/*#__PURE__*/_react2.default.createElement(_testUtils.CairoTestApp, {
|
|
47
47
|
driver: driver,
|
|
48
48
|
__self: void 0,
|
|
49
49
|
__source: {
|
|
@@ -95,7 +95,7 @@ describe('usePickerContent', () => {
|
|
|
95
95
|
});
|
|
96
96
|
return null;
|
|
97
97
|
};
|
|
98
|
-
(0, _react.render)(
|
|
98
|
+
(0, _react.render)(/*#__PURE__*/_react2.default.createElement(_testUtils.CairoTestApp, {
|
|
99
99
|
driver: driver,
|
|
100
100
|
__self: void 0,
|
|
101
101
|
__source: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_react2","_interopRequireDefault","_testUtils","_testkit","_internal","_usePickerContent","_usePickerModal","_jsxFileName","describe","testkit","beforeAndAfter","driver","beforeEach","WixPatternsContainerDriver","it","App","modalState","usePickerModal","queryName","biLoggerFactory","environment","errorMonitor","fetchData","items","pickerContentComponent","default","createElement","__self","__source","fileName","lineNumber","columnNumber","onSelect","jest","fn","usePickerContent","fetchErrorMessage","render","CairoTestApp","filters","level","initialValue"],"sources":["../../../../src/hooks/usePickerContent/usePickerContent.spec.tsx"],"sourcesContent":["import { render } from '@testing-library/react';\nimport React from 'react';\nimport { CairoTestApp } from '../../test-utils';\nimport { testkit } from '@wix/fe-essentials-standalone/testkit';\nimport { WixPatternsContainerDriver } from '@wix/bex-core/testkit/internal';\nimport { usePickerContent } from './usePickerContent';\nimport { usePickerModal } from '../usePickerModal';\n\ninterface TestEntity {\n id: string;\n name: string;\n}\n\ndescribe('usePickerContent', () => {\n testkit.beforeAndAfter();\n\n let driver: WixPatternsContainerDriver;\n\n beforeEach(() => {\n driver = new WixPatternsContainerDriver();\n });\n\n it('allows optional options', () => {\n const App = () => {\n const modalState = usePickerModal({\n queryName: 'usePickerModal-test',\n biLoggerFactory: driver.biLoggerFactory,\n environment: driver.environment,\n errorMonitor: driver.errorMonitor,\n fetchData: async () => ({\n items: [] as TestEntity[],\n }),\n pickerContentComponent: async () => ({ default: () => <div /> }),\n onSelect: jest.fn(),\n });\n\n usePickerContent({\n modalState,\n fetchErrorMessage: () => null,\n });\n\n return null;\n };\n render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n });\n\n it('expects errors when required options are missing', () => {\n const App = () => {\n const modalState = usePickerModal({\n queryName: 'usePickerModal-test',\n biLoggerFactory: driver.biLoggerFactory,\n environment: driver.environment,\n errorMonitor: driver.errorMonitor,\n fetchData: async () => ({\n items: [] as TestEntity[],\n }),\n filters: {\n level: { initialValue: ['Ultimate'] },\n },\n pickerContentComponent: async () => ({ default: () => <div /> }),\n onSelect: jest.fn(),\n });\n\n usePickerContent(\n // @ts-expect-error\n {\n modalState,\n fetchErrorMessage: () => null,\n },\n );\n\n return null;\n };\n render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n });\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AAAmD,IAAAQ,YAAA;AAOnDC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCC,gBAAO,CAACC,cAAc,CAAC,CAAC;EAExB,IAAIC,MAAkC;EAEtCC,UAAU,CAAC,MAAM;IACfD,MAAM,GAAG,IAAIE,oCAA0B,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEFC,EAAE,CAAC,yBAAyB,EAAE,MAAM;IAClC,MAAMC,GAAG,GAAGA,CAAA,KAAM;MAChB,MAAMC,UAAU,GAAG,IAAAC,8BAAc,EAAC;QAChCC,SAAS,EAAE,qBAAqB;QAChCC,eAAe,EAAER,MAAM,CAACQ,eAAe;QACvCC,WAAW,EAAET,MAAM,CAACS,WAAW;QAC/BC,YAAY,EAAEV,MAAM,CAACU,YAAY;QACjCC,SAAS,EAAE,MAAAA,CAAA,MAAa;UACtBC,KAAK,EAAE;QACT,CAAC,CAAC;QACFC,sBAAsB,EAAE,MAAAA,CAAA,MAAa;UAAEC,OAAO,EAAEA,CAAA,kBAAMzB,OAAA,CAAAyB,OAAA,CAAAC,aAAA;YAAAC,MAAA;YAAAC,QAAA;cAAAC,QAAA,EAAAtB,YAAA;cAAAuB,UAAA;cAAAC,YAAA;YAAA;UAAA,CAAM;QAAE,CAAC,CAAC;QAChEC,QAAQ,EAAEC,IAAI,CAACC,EAAE,CAAC;MACpB,CAAC,CAAC;MAEF,IAAAC,kCAAgB,EAAC;QACfnB,UAAU;QACVoB,iBAAiB,EAAEA,CAAA,KAAM;MAC3B,CAAC,CAAC;MAEF,OAAO,IAAI;IACb,CAAC;IACD,IAAAC,aAAM,
|
|
1
|
+
{"version":3,"names":["_react","require","_react2","_interopRequireDefault","_testUtils","_testkit","_internal","_usePickerContent","_usePickerModal","_jsxFileName","describe","testkit","beforeAndAfter","driver","beforeEach","WixPatternsContainerDriver","it","App","modalState","usePickerModal","queryName","biLoggerFactory","environment","errorMonitor","fetchData","items","pickerContentComponent","default","createElement","__self","__source","fileName","lineNumber","columnNumber","onSelect","jest","fn","usePickerContent","fetchErrorMessage","render","CairoTestApp","filters","level","initialValue"],"sources":["../../../../src/hooks/usePickerContent/usePickerContent.spec.tsx"],"sourcesContent":["import { render } from '@testing-library/react';\nimport React from 'react';\nimport { CairoTestApp } from '../../test-utils';\nimport { testkit } from '@wix/fe-essentials-standalone/testkit';\nimport { WixPatternsContainerDriver } from '@wix/bex-core/testkit/internal';\nimport { usePickerContent } from './usePickerContent';\nimport { usePickerModal } from '../usePickerModal';\n\ninterface TestEntity {\n id: string;\n name: string;\n}\n\ndescribe('usePickerContent', () => {\n testkit.beforeAndAfter();\n\n let driver: WixPatternsContainerDriver;\n\n beforeEach(() => {\n driver = new WixPatternsContainerDriver();\n });\n\n it('allows optional options', () => {\n const App = () => {\n const modalState = usePickerModal({\n queryName: 'usePickerModal-test',\n biLoggerFactory: driver.biLoggerFactory,\n environment: driver.environment,\n errorMonitor: driver.errorMonitor,\n fetchData: async () => ({\n items: [] as TestEntity[],\n }),\n pickerContentComponent: async () => ({ default: () => <div /> }),\n onSelect: jest.fn(),\n });\n\n usePickerContent({\n modalState,\n fetchErrorMessage: () => null,\n });\n\n return null;\n };\n render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n });\n\n it('expects errors when required options are missing', () => {\n const App = () => {\n const modalState = usePickerModal({\n queryName: 'usePickerModal-test',\n biLoggerFactory: driver.biLoggerFactory,\n environment: driver.environment,\n errorMonitor: driver.errorMonitor,\n fetchData: async () => ({\n items: [] as TestEntity[],\n }),\n filters: {\n level: { initialValue: ['Ultimate'] },\n },\n pickerContentComponent: async () => ({ default: () => <div /> }),\n onSelect: jest.fn(),\n });\n\n usePickerContent(\n // @ts-expect-error\n {\n modalState,\n fetchErrorMessage: () => null,\n },\n );\n\n return null;\n };\n render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n });\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,iBAAA,GAAAN,OAAA;AACA,IAAAO,eAAA,GAAAP,OAAA;AAAmD,IAAAQ,YAAA;AAOnDC,QAAQ,CAAC,kBAAkB,EAAE,MAAM;EACjCC,gBAAO,CAACC,cAAc,CAAC,CAAC;EAExB,IAAIC,MAAkC;EAEtCC,UAAU,CAAC,MAAM;IACfD,MAAM,GAAG,IAAIE,oCAA0B,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEFC,EAAE,CAAC,yBAAyB,EAAE,MAAM;IAClC,MAAMC,GAAG,GAAGA,CAAA,KAAM;MAChB,MAAMC,UAAU,GAAG,IAAAC,8BAAc,EAAC;QAChCC,SAAS,EAAE,qBAAqB;QAChCC,eAAe,EAAER,MAAM,CAACQ,eAAe;QACvCC,WAAW,EAAET,MAAM,CAACS,WAAW;QAC/BC,YAAY,EAAEV,MAAM,CAACU,YAAY;QACjCC,SAAS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O,EAAE;UACPC,KAAK,EAAE;YAAEC,YAAY,EAAE,CAAC,UAAU;UAAE;QACtC,CAAC;QACDjB,sBAAsB,EAAE,MAAAA,CAAA,MAAa;UAAEC,OAAO,EAAEA,CAAA,kBAAMzB,OAAA,CAAAyB,OAAA,CAAAC,aAAA;YAAAC,MAAA;YAAAC,QAAA;cAAAC,QAAA,EAAAtB,YAAA;cAAAuB,UAAA;cAAAC,YAAA;YAAA;UAAA,CAAM;QAAE,CAAC,CAAC;QAChEC,QAAQ,EAAEC,IAAI,CAACC,EAAE,CAAC;MACpB,CAAC,CAAC;MAEF,IAAAC,kCAAgB;MACd;MACA;QACEnB,UAAU;QACVoB,iBAAiB,EAAEA,CAAA,KAAM;MAC3B,CACF,CAAC;MAED,OAAO,IAAI;IACb,CAAC;IACD,IAAAC,aAAM,eACJrC,OAAA,CAAAyB,OAAA,CAAAC,aAAA,CAACxB,UAAA,CAAAoC,YAAY;MAAC3B,MAAM,EAAEA,MAAO;MAAAgB,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAtB,YAAA;QAAAuB,UAAA;QAAAC,YAAA;MAAA;IAAA,gBAC3B/B,OAAA,CAAAyB,OAAA,CAAAC,aAAA,CAACX,GAAG;MAAAY,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAtB,YAAA;QAAAuB,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CACM,CAChB,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -32,7 +32,7 @@ describe('usePickerStandalone', () => {
|
|
|
32
32
|
searchValue = picker.collection.filters.search.value;
|
|
33
33
|
return null;
|
|
34
34
|
};
|
|
35
|
-
(0, _react.render)(
|
|
35
|
+
(0, _react.render)(/*#__PURE__*/_react2.default.createElement(_testUtils.CairoTestApp, {
|
|
36
36
|
driver: driver,
|
|
37
37
|
__self: void 0,
|
|
38
38
|
__source: {
|
|
@@ -70,7 +70,7 @@ describe('usePickerStandalone', () => {
|
|
|
70
70
|
};
|
|
71
71
|
const {
|
|
72
72
|
container
|
|
73
|
-
} = (0, _react.render)(
|
|
73
|
+
} = (0, _react.render)(/*#__PURE__*/_react2.default.createElement(_testUtils.CairoTestApp, {
|
|
74
74
|
driver: driver,
|
|
75
75
|
__self: void 0,
|
|
76
76
|
__source: {
|
|
@@ -113,7 +113,7 @@ describe('usePickerStandalone', () => {
|
|
|
113
113
|
};
|
|
114
114
|
const {
|
|
115
115
|
container
|
|
116
|
-
} = (0, _react.render)(
|
|
116
|
+
} = (0, _react.render)(/*#__PURE__*/_react2.default.createElement(_testUtils.CairoTestApp, {
|
|
117
117
|
driver: driver,
|
|
118
118
|
__self: void 0,
|
|
119
119
|
__source: {
|
|
@@ -157,7 +157,7 @@ describe('usePickerStandalone', () => {
|
|
|
157
157
|
};
|
|
158
158
|
const {
|
|
159
159
|
container
|
|
160
|
-
} = (0, _react.render)(
|
|
160
|
+
} = (0, _react.render)(/*#__PURE__*/_react2.default.createElement(_testUtils.CairoTestApp, {
|
|
161
161
|
driver: driver,
|
|
162
162
|
__self: void 0,
|
|
163
163
|
__source: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_react2","_interopRequireDefault","_testUtils","_testkit","_internal","_usePickerStandalone","_jsxFileName","describe","testkit","beforeAndAfter","driver","beforeEach","WixPatternsContainerDriver","it","searchValue","App","picker","usePickerStandalone","queryName","fetchData","items","fetchErrorMessage","itemKey","item","id","itemName","name","defaultDestinationUrl","collection","filters","search","value","render","default","createElement","CairoTestApp","__self","__source","fileName","lineNumber","columnNumber","expect","toBe","Fragment","container","textContent","name2","id2","e","message","noItemsAvailableDestinationUrl"],"sources":["../../../../src/hooks/usePickerStandalone/usePickerStandalone.spec.tsx"],"sourcesContent":["import { render } from '@testing-library/react';\nimport React from 'react';\nimport { CairoTestApp } from '../../test-utils';\nimport { testkit } from '@wix/fe-essentials-standalone/testkit';\nimport { WixPatternsContainerDriver } from '@wix/bex-core/testkit/internal';\nimport { usePickerStandalone } from './usePickerStandalone';\n\ninterface TestEntity {\n id: string;\n name: string;\n}\n\ndescribe('usePickerStandalone', () => {\n testkit.beforeAndAfter();\n\n let driver: WixPatternsContainerDriver;\n\n beforeEach(() => {\n driver = new WixPatternsContainerDriver();\n });\n\n it('makes `filters` config option optional when there are no filters', () => {\n let searchValue: string | null = null;\n\n const App = () => {\n const { picker } = usePickerStandalone({\n queryName: 'test1',\n fetchData: async () => ({\n items: [] as TestEntity[],\n }),\n fetchErrorMessage: () => null,\n itemKey: (item) => item.id,\n itemName: (item) => item.name,\n defaultDestinationUrl: `https://manage.wix.com`,\n });\n\n searchValue = picker.collection.filters.search.value;\n\n return null;\n };\n render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(searchValue).toBe('');\n });\n\n it('makes `itemKey` & `itemName` config options optional when an item has an {id: string, name: string}', () => {\n const App = () => {\n const { picker } = usePickerStandalone({\n queryName: 'test2',\n fetchData: async () => ({\n items: [] as { id: string; name: string }[],\n }),\n fetchErrorMessage: () => null,\n defaultDestinationUrl: `https://manage.wix.com`,\n });\n\n const item = { id: 'foo', name: 'bar' };\n\n return (\n <>\n {picker.collection.itemKey(item)}\n {picker.collection.itemName(item)}\n </>\n );\n };\n const { container } = render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(container.textContent).toBe('foobar');\n });\n\n it(\"makes `itemKey` config option required when an item doesn't extend {id: string}\", () => {\n const App = () => {\n // @ts-expect-error - T does not extend { id: string }\n const { picker } = usePickerStandalone({\n queryName: 'test3',\n fetchData: async () => ({\n items: [] as { id2: string; name2: string }[],\n }),\n itemName: (item) => item.name2,\n fetchErrorMessage: () => null,\n defaultDestinationUrl: `https://manage.wix.com`,\n });\n\n try {\n return <>{picker.collection.itemKey({ id2: 'foo', name2: 'bar' })}</>;\n } catch (e) {\n return <>{(e as Error)?.message}</>;\n }\n };\n const { container } = render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(container.textContent).toBe(\n 'Collection config must specify itemKey, or item must have one of properties: id, _id',\n );\n });\n\n it(\"makes `itemName` config option required when an item doesn't extend {id: string}\", () => {\n const App = () => {\n // @ts-expect-error - T does not extend { name: string }\n const { picker } = usePickerStandalone({\n queryName: 'test3',\n fetchData: async () => ({\n items: [] as { id2: string; name2: string }[],\n }),\n itemKey: (item) => item.id2,\n fetchErrorMessage: () => null,\n defaultDestinationUrl: `https://manage.wix.com`,\n noItemsAvailableDestinationUrl: 'https://wix.com',\n });\n\n try {\n return <>{picker.collection.itemName({ id2: 'foo', name2: 'bar' })}</>;\n } catch (e) {\n return <>{(e as Error)?.message}</>;\n }\n };\n const { container } = render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(container.textContent).toBe(\n 'Collection config must specify itemName, or item must have property: name',\n );\n });\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAA4D,IAAAO,YAAA;AAO5DC,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EACpCC,gBAAO,CAACC,cAAc,CAAC,CAAC;EAExB,IAAIC,MAAkC;EAEtCC,UAAU,CAAC,MAAM;IACfD,MAAM,GAAG,IAAIE,oCAA0B,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEFC,EAAE,CAAC,kEAAkE,EAAE,MAAM;IAC3E,IAAIC,WAA0B,GAAG,IAAI;IAErC,MAAMC,GAAG,GAAGA,CAAA,KAAM;MAChB,MAAM;QAAEC;MAAO,CAAC,GAAG,IAAAC,wCAAmB,EAAC;QACrCC,SAAS,EAAE,OAAO;QAClBC,SAAS,EAAE,MAAAA,CAAA,MAAa;UACtBC,KAAK,EAAE;QACT,CAAC,CAAC;QACFC,iBAAiB,EAAEA,CAAA,KAAM,IAAI;QAC7BC,OAAO,EAAGC,IAAI,IAAKA,IAAI,CAACC,EAAE;QAC1BC,QAAQ,EAAGF,IAAI,IAAKA,IAAI,CAACG,IAAI;QAC7BC,qBAAqB,EAAE;MACzB,CAAC,CAAC;MAEFb,WAAW,GAAGE,MAAM,CAACY,UAAU,CAACC,OAAO,CAACC,MAAM,CAACC,KAAK;MAEpD,OAAO,IAAI;IACb,CAAC;IACD,IAAAC,aAAM,
|
|
1
|
+
{"version":3,"names":["_react","require","_react2","_interopRequireDefault","_testUtils","_testkit","_internal","_usePickerStandalone","_jsxFileName","describe","testkit","beforeAndAfter","driver","beforeEach","WixPatternsContainerDriver","it","searchValue","App","picker","usePickerStandalone","queryName","fetchData","items","fetchErrorMessage","itemKey","item","id","itemName","name","defaultDestinationUrl","collection","filters","search","value","render","default","createElement","CairoTestApp","__self","__source","fileName","lineNumber","columnNumber","expect","toBe","Fragment","container","textContent","name2","id2","e","message","noItemsAvailableDestinationUrl"],"sources":["../../../../src/hooks/usePickerStandalone/usePickerStandalone.spec.tsx"],"sourcesContent":["import { render } from '@testing-library/react';\nimport React from 'react';\nimport { CairoTestApp } from '../../test-utils';\nimport { testkit } from '@wix/fe-essentials-standalone/testkit';\nimport { WixPatternsContainerDriver } from '@wix/bex-core/testkit/internal';\nimport { usePickerStandalone } from './usePickerStandalone';\n\ninterface TestEntity {\n id: string;\n name: string;\n}\n\ndescribe('usePickerStandalone', () => {\n testkit.beforeAndAfter();\n\n let driver: WixPatternsContainerDriver;\n\n beforeEach(() => {\n driver = new WixPatternsContainerDriver();\n });\n\n it('makes `filters` config option optional when there are no filters', () => {\n let searchValue: string | null = null;\n\n const App = () => {\n const { picker } = usePickerStandalone({\n queryName: 'test1',\n fetchData: async () => ({\n items: [] as TestEntity[],\n }),\n fetchErrorMessage: () => null,\n itemKey: (item) => item.id,\n itemName: (item) => item.name,\n defaultDestinationUrl: `https://manage.wix.com`,\n });\n\n searchValue = picker.collection.filters.search.value;\n\n return null;\n };\n render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(searchValue).toBe('');\n });\n\n it('makes `itemKey` & `itemName` config options optional when an item has an {id: string, name: string}', () => {\n const App = () => {\n const { picker } = usePickerStandalone({\n queryName: 'test2',\n fetchData: async () => ({\n items: [] as { id: string; name: string }[],\n }),\n fetchErrorMessage: () => null,\n defaultDestinationUrl: `https://manage.wix.com`,\n });\n\n const item = { id: 'foo', name: 'bar' };\n\n return (\n <>\n {picker.collection.itemKey(item)}\n {picker.collection.itemName(item)}\n </>\n );\n };\n const { container } = render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(container.textContent).toBe('foobar');\n });\n\n it(\"makes `itemKey` config option required when an item doesn't extend {id: string}\", () => {\n const App = () => {\n // @ts-expect-error - T does not extend { id: string }\n const { picker } = usePickerStandalone({\n queryName: 'test3',\n fetchData: async () => ({\n items: [] as { id2: string; name2: string }[],\n }),\n itemName: (item) => item.name2,\n fetchErrorMessage: () => null,\n defaultDestinationUrl: `https://manage.wix.com`,\n });\n\n try {\n return <>{picker.collection.itemKey({ id2: 'foo', name2: 'bar' })}</>;\n } catch (e) {\n return <>{(e as Error)?.message}</>;\n }\n };\n const { container } = render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(container.textContent).toBe(\n 'Collection config must specify itemKey, or item must have one of properties: id, _id',\n );\n });\n\n it(\"makes `itemName` config option required when an item doesn't extend {id: string}\", () => {\n const App = () => {\n // @ts-expect-error - T does not extend { name: string }\n const { picker } = usePickerStandalone({\n queryName: 'test3',\n fetchData: async () => ({\n items: [] as { id2: string; name2: string }[],\n }),\n itemKey: (item) => item.id2,\n fetchErrorMessage: () => null,\n defaultDestinationUrl: `https://manage.wix.com`,\n noItemsAvailableDestinationUrl: 'https://wix.com',\n });\n\n try {\n return <>{picker.collection.itemName({ id2: 'foo', name2: 'bar' })}</>;\n } catch (e) {\n return <>{(e as Error)?.message}</>;\n }\n };\n const { container } = render(\n <CairoTestApp driver={driver}>\n <App />\n </CairoTestApp>,\n );\n\n expect(container.textContent).toBe(\n 'Collection config must specify itemName, or item must have property: name',\n );\n });\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,oBAAA,GAAAN,OAAA;AAA4D,IAAAO,YAAA;AAO5DC,QAAQ,CAAC,qBAAqB,EAAE,MAAM;EACpCC,gBAAO,CAACC,cAAc,CAAC,CAAC;EAExB,IAAIC,MAAkC;EAEtCC,UAAU,CAAC,MAAM;IACfD,MAAM,GAAG,IAAIE,oCAA0B,CAAC,CAAC;EAC3C,CAAC,CAAC;EAEFC,EAAE,CAAC,kEAAkE,EAAE,MAAM;IAC3E,IAAIC,WAA0B,GAAG,IAAI;IAErC,MAAMC,GAAG,GAAGA,CAAA,KAAM;MAChB,MAAM;QAAEC;MAAO,CAAC,GAAG,IAAAC,wCAAmB,EAAC;QACrCC,SAAS,EAAE,OAAO;QAClBC,SAAS,EAAE,MAAAA,CAAA,MAAa;UACtBC,KAAK,EAAE;QACT,CAAC,CAAC;QACFC,iBAAiB,EAAEA,CAAA,KAAM,IAAI;QAC7BC,OAAO,EAAGC,IAAI,IAAKA,IAAI,CAACC,EAAE;QAC1BC,QAAQ,EAAGF,IAAI,IAAKA,IAAI,CAACG,IAAI;QAC7BC,qBAAqB,EAAE;MACzB,CAAC,CAAC;MAEFb,WAAW,GAAGE,MAAM,CAACY,UAAU,CAACC,OAAO,CAACC,MAAM,CAACC,KAAK;MAEpD,OAAO,IAAI;IACb,CAAC;IACD,IAAAC,aAAM,eACJhC,OAAA,CAAAiC,OAAA,CAAAC,aAAA,CAACh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AZ,aAAM,eAC1BhC,OAAA,CAAAiC,OAAA,CAAAC,aAAA,CAAChC,UAAA,CAAAiC,YAAY;MAACzB,MAAM,EAAEA,MAAO;MAAA0B,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAhC,YAAA;QAAAiC,UAAA;QAAAC,YAAA;MAAA;IAAA,gBAC3BxC,OAAA,CAAAiC,OAAA,CAAAC,aAAA,CAACnB,GAAG;MAAAqB,MAAA;MAAAC,QAAA;QAAAC,QAAA,EAAAhC,YAAA;QAAAiC,UAAA;QAAAC,YAAA;MAAA;IAAA,CAAE,CACM,CAChB,CAAC;IAEDC,MAAM,CAACG,SAAS,CAACC,WAAW,CAAC,CAACH,IAAI,CAChC,2EACF,CAAC;EACH,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -8,7 +8,7 @@ var _SettingsPageContent = require("../../components/SettingsPageContent");
|
|
|
8
8
|
function useSettingsPageChild(children, scrollableRef) {
|
|
9
9
|
// Mapping to raw WDS components since original Page filtering none expected components: https://github.com/wix-private/wix-design-systems/blob/master/packages/wix-style-react/src/Page/Page.js#L626
|
|
10
10
|
return _react.Children.toArray(children).map(child => {
|
|
11
|
-
if (
|
|
11
|
+
if (/*#__PURE__*/(0, _react.isValidElement)(child)) {
|
|
12
12
|
switch (child.type) {
|
|
13
13
|
case _SettingsPageHeader.SettingsPageHeader:
|
|
14
14
|
const header = child;
|