@wix/patterns 1.460.0 → 1.461.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/CardContainer/CardContainer.st.css.js +2 -2
- package/dist/cjs/components/CardContainer/CardContainer.st.css.js.map +1 -1
- package/dist/cjs/components/CmsFieldManagement/CmsFieldForm.st.css.js +3 -3
- package/dist/cjs/components/CmsFieldManagement/CmsFieldForm.st.css.js.map +1 -1
- package/dist/cjs/components/CmsFieldManagement/CmsFieldModal.st.css.js +3 -3
- package/dist/cjs/components/CmsFieldManagement/CmsFieldModal.st.css.js.map +1 -1
- package/dist/cjs/components/CmsFieldManagement/Sections/ValidationAndDefaultsSection.st.css.js +3 -3
- package/dist/cjs/components/CmsFieldManagement/Sections/ValidationAndDefaultsSection.st.css.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/CollectionPageNew/CollectionPage.st.css.js +2 -2
- package/dist/cjs/components/CollectionPageNew/CollectionPage.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionSectionHeader/CollectionSectionHeader.st.css.js +3 -3
- package/dist/cjs/components/CollectionSectionHeader/CollectionSectionHeader.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionTable/CollectionTable.st.css.js +2 -2
- package/dist/cjs/components/CollectionTable/CollectionTable.st.css.js.map +1 -1
- package/dist/cjs/components/CollectionTable/CollectionTableWSRTable.st.css.js +2 -2
- package/dist/cjs/components/CollectionTable/CollectionTableWSRTable.st.css.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 +4 -4
- 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/CustomFieldModal/CustomFieldForm.js +1 -0
- package/dist/cjs/components/CustomFieldModal/CustomFieldForm.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/EditableTable/EditableCell.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/EditableCell.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/EditableTable.uni.driver.js +17 -0
- package/dist/cjs/components/EditableTable/EditableTable.uni.driver.js.map +1 -1
- package/dist/cjs/components/EditableTable/EditableTableContextMenu.js +7 -11
- package/dist/cjs/components/EditableTable/EditableTableContextMenu.js.map +1 -1
- package/dist/cjs/components/EditableTable/HeaderActionsPopover.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/HeaderActionsPopover.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/CellViewLayout.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/cellTypes/CellViewLayout.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/address/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/address/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/array/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/array/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/boolean/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/boolean/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/boolean/View.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/boolean/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/color/Edit.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/cellTypes/color/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/date/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/date/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/date/View.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/cellTypes/date/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/datetime/Edit.st.css.js +8 -8
- package/dist/cjs/components/EditableTable/cellTypes/datetime/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/datetime/View.st.css.js +7 -7
- package/dist/cjs/components/EditableTable/cellTypes/datetime/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/email/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/email/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/email/View.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/cellTypes/email/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/mediaGallery/index.js +4 -4
- package/dist/cjs/components/EditableTable/cellTypes/mediaGallery/index.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/number/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/number/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/number/View.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/number/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/object/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/object/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/object/View.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/cellTypes/object/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/richContent/index.js +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/richContent/index.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/richText/index.js +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/richText/index.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/select/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/select/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/text/Edit.st.css.js +4 -4
- package/dist/cjs/components/EditableTable/cellTypes/text/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/text/View.st.css.js +2 -2
- package/dist/cjs/components/EditableTable/cellTypes/text/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/time/Edit.st.css.js +4 -4
- package/dist/cjs/components/EditableTable/cellTypes/time/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/url/Edit.st.css.js +3 -3
- package/dist/cjs/components/EditableTable/cellTypes/url/Edit.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/cellTypes/url/View.st.css.js +5 -5
- package/dist/cjs/components/EditableTable/cellTypes/url/View.st.css.js.map +1 -1
- package/dist/cjs/components/EditableTable/useClipboardHandler.js +0 -3
- package/dist/cjs/components/EditableTable/useClipboardHandler.js.map +1 -1
- package/dist/cjs/components/EmptyState/EmptyStateBase.st.css.js +2 -2
- package/dist/cjs/components/EmptyState/EmptyStateBase.st.css.js.map +1 -1
- package/dist/cjs/components/EntityPage/EntityPagePlain.st.css.js +2 -2
- package/dist/cjs/components/EntityPage/EntityPagePlain.st.css.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/Heading/Heading.st.css.js +2 -2
- package/dist/cjs/components/Heading/Heading.st.css.js.map +1 -1
- package/dist/cjs/components/ImportButton/ImportStepUpload.st.css.js +3 -3
- package/dist/cjs/components/ImportButton/ImportStepUpload.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/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/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +5 -5
- package/dist/cjs/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.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/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js +2 -2
- package/dist/cjs/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.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/PickerContent/PickerContent.st.css.js +2 -2
- package/dist/cjs/components/PickerContent/PickerContent.st.css.js.map +1 -1
- package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js +4 -4
- package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js.map +1 -1
- package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
- package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js.map +1 -1
- package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
- package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js.map +1 -1
- package/dist/cjs/components/SetupWidget/SetupWidget.st.css.js +10 -10
- package/dist/cjs/components/SetupWidget/SetupWidget.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/AddFieldColumnHeader.st.css.js +4 -4
- package/dist/cjs/components/Table/AddFieldColumnHeader.st.css.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/ToolbarItem/ToolbarItem.st.css.js +2 -2
- package/dist/cjs/components/ToolbarItem/ToolbarItem.st.css.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/state/CollectionPage/CollectionPageHeader.st.css.js +2 -2
- package/dist/cjs/state/CollectionPage/CollectionPageHeader.st.css.js.map +1 -1
- package/dist/cjs/state/EditableTable/CellValueState.js +1 -2
- package/dist/cjs/state/EditableTable/CellValueState.js.map +1 -1
- package/dist/cjs/state/EditableTable/ClipboardState.js +10 -14
- package/dist/cjs/state/EditableTable/ClipboardState.js.map +1 -1
- package/dist/cjs/state/EditableTable/utils.js +3 -0
- package/dist/cjs/state/EditableTable/utils.js.map +1 -1
- package/dist/cjs/state/FormPage/FormPageHeader.st.css.js +2 -2
- package/dist/cjs/state/FormPage/FormPageHeader.st.css.js.map +1 -1
- package/dist/cjs/styles.global.css +2 -2
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/docs/ToolbarCollectionState.md +1 -1
- package/dist/docs/index.json +32 -32
- package/dist/dts-bundle/index.json +1 -1
- package/dist/dts-bundle/types/EntityPageStateParams.d.ts +13 -0
- package/dist/esm/components/CardContainer/CardContainer.st.css.js +2 -2
- package/dist/esm/components/CmsFieldManagement/CmsFieldForm.st.css.js +2 -2
- package/dist/esm/components/CmsFieldManagement/CmsFieldModal.st.css.js +2 -2
- package/dist/esm/components/CmsFieldManagement/Sections/ValidationAndDefaultsSection.st.css.js +2 -2
- package/dist/esm/components/CmsFieldManagement/Sections/ValidationAndDefaultsSection.st.css.js.map +1 -1
- package/dist/esm/components/Collapse/Collapse.st.css.js +2 -2
- package/dist/esm/components/CollectionPageNew/CollectionPage.st.css.js +2 -2
- package/dist/esm/components/CollectionSectionHeader/CollectionSectionHeader.st.css.js +2 -2
- package/dist/esm/components/CollectionTable/CollectionTable.st.css.js +2 -2
- package/dist/esm/components/CollectionTable/CollectionTableWSRTable.st.css.js +2 -2
- 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/ViewsDropdown.st.css.js +2 -2
- package/dist/esm/components/CustomFieldModal/CustomFieldForm.js +1 -1
- package/dist/esm/components/CustomFieldModal/CustomFieldForm.js.map +1 -1
- package/dist/esm/components/DragHandle/DragHandle.st.css.js +2 -2
- package/dist/esm/components/EditableTable/EditableCell.st.css.js +2 -2
- package/dist/esm/components/EditableTable/EditableCell.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/EditableTable.uni.driver.js +14 -0
- package/dist/esm/components/EditableTable/EditableTable.uni.driver.js.map +1 -1
- package/dist/esm/components/EditableTable/EditableTableContextMenu.js +0 -4
- package/dist/esm/components/EditableTable/EditableTableContextMenu.js.map +1 -1
- package/dist/esm/components/EditableTable/HeaderActionsPopover.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/CellViewLayout.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/address/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/address/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/array/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/array/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/boolean/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/boolean/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/boolean/View.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/color/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/color/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/date/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/date/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/date/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/datetime/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/datetime/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/email/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/email/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/email/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/email/View.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/mediaGallery/index.js +3 -2
- package/dist/esm/components/EditableTable/cellTypes/mediaGallery/index.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/number/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/number/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/number/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/object/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/object/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/object/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/richContent/index.js +1 -1
- package/dist/esm/components/EditableTable/cellTypes/richContent/index.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/richText/index.js +1 -1
- package/dist/esm/components/EditableTable/cellTypes/richText/index.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/select/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/text/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/text/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/time/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/url/Edit.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/url/Edit.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/cellTypes/url/View.st.css.js +2 -2
- package/dist/esm/components/EditableTable/cellTypes/url/View.st.css.js.map +1 -1
- package/dist/esm/components/EditableTable/useClipboardHandler.js +0 -3
- package/dist/esm/components/EditableTable/useClipboardHandler.js.map +1 -1
- package/dist/esm/components/EmptyState/EmptyStateBase.st.css.js +2 -2
- package/dist/esm/components/EntityPage/EntityPagePlain.st.css.js +2 -2
- 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/Heading/Heading.st.css.js +2 -2
- package/dist/esm/components/ImportButton/ImportStepUpload.st.css.js +2 -2
- package/dist/esm/components/InputOverflow/InputOverflow.st.css.js +2 -2
- package/dist/esm/components/LoadingRow/LoadingRow.st.css.js +3 -3
- package/dist/esm/components/LoadingRow/LoadingRow.st.css.js.map +1 -1
- package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js +2 -2
- package/dist/esm/components/MaxHeightText/MaxHeightText.st.css.js.map +1 -1
- package/dist/esm/components/MaxLines/MaxLines.st.css.js +2 -2
- package/dist/esm/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.js +2 -2
- package/dist/esm/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.js +2 -2
- 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/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js +2 -2
- package/dist/esm/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js.map +1 -1
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.js +2 -2
- 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/ScrollableContent/ScrollableContent.st.css.js +2 -2
- package/dist/esm/components/ScrollableContent/ScrollableContent.st.css.js.map +1 -1
- package/dist/esm/components/SetupWidget/SetupWidget.st.css.js +2 -2
- package/dist/esm/components/SetupWidget/SetupWidget.st.css.js.map +1 -1
- package/dist/esm/components/SkeletonCard/SkeletonCard.st.css.js +2 -2
- package/dist/esm/components/SkeletonCard/SkeletonCard.st.css.js.map +1 -1
- 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/AddFieldColumnHeader.st.css.js +2 -2
- 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/ToolbarItem/ToolbarItem.st.css.js +2 -2
- 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/common.st.css.js.map +1 -1
- package/dist/esm/state/CollectionPage/CollectionPageHeader.st.css.js +2 -2
- package/dist/esm/state/CollectionPage/CollectionPageHeader.st.css.js.map +1 -1
- package/dist/esm/state/EditableTable/CellValueState.js +5 -2
- package/dist/esm/state/EditableTable/CellValueState.js.map +1 -1
- package/dist/esm/state/EditableTable/ClipboardState.js +12 -16
- package/dist/esm/state/EditableTable/ClipboardState.js.map +1 -1
- package/dist/esm/state/EditableTable/utils.js +3 -0
- package/dist/esm/state/EditableTable/utils.js.map +1 -1
- package/dist/esm/state/FormPage/FormPageHeader.st.css.js +2 -2
- package/dist/esm/styles.global.css +2 -2
- package/dist/esm/version.js +1 -1
- package/dist/types/components/CmsFieldManagement/Sections/ValidationAndDefaultsSection.st.css.d.ts.map +1 -1
- package/dist/types/components/CollectionToolbar/SearchOrCustomFilter.st.css.d.ts.map +1 -1
- package/dist/types/components/CustomFieldModal/CustomFieldForm.d.ts.map +1 -1
- package/dist/types/components/EditableTable/EditableCell.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/EditableTable.uni.driver.d.ts +2 -0
- package/dist/types/components/EditableTable/EditableTable.uni.driver.d.ts.map +1 -1
- package/dist/types/components/EditableTable/EditableTableContextMenu.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/address/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/array/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/boolean/View.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/color/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/date/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/email/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/email/View.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/mediaGallery/index.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/number/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/object/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/url/Edit.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/cellTypes/url/View.st.css.d.ts.map +1 -1
- package/dist/types/components/EditableTable/useClipboardHandler.d.ts.map +1 -1
- package/dist/types/components/Fade/Fade.st.css.d.ts.map +1 -1
- package/dist/types/components/LoadingRow/LoadingRow.st.css.d.ts.map +1 -1
- package/dist/types/components/MaxHeightText/MaxHeightText.st.css.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTableRow.st.css.d.ts.map +1 -1
- package/dist/types/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.d.ts.map +1 -1
- package/dist/types/components/ScrollableContent/ScrollableContent.st.css.d.ts.map +1 -1
- package/dist/types/components/SetupWidget/SetupWidget.st.css.d.ts.map +1 -1
- package/dist/types/components/SkeletonCard/SkeletonCard.st.css.d.ts.map +1 -1
- package/dist/types/components/SlidingModal/SlidingModal.st.css.d.ts.map +1 -1
- package/dist/types/components/common.st.css.d.ts.map +1 -1
- package/dist/types/state/CollectionPage/CollectionPageHeader.st.css.d.ts.map +1 -1
- package/dist/types/state/EditableTable/CellValueState.d.ts.map +1 -1
- package/dist/types/state/EditableTable/ClipboardState.d.ts +1 -1
- package/dist/types/state/EditableTable/ClipboardState.d.ts.map +1 -1
- package/dist/types/state/EditableTable/utils.d.ts.map +1 -1
- package/dist/types/testkit/jsdom.d.ts +1 -0
- package/dist/types/testkit/jsdom.d.ts.map +1 -1
- package/dist/types/testkit/playwright.d.ts +1 -0
- package/dist/types/testkit/playwright.d.ts.map +1 -1
- package/dist/types/testkit/puppeteer.d.ts +1 -0
- package/dist/types/testkit/puppeteer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +7 -7
- package/src/components/CardContainer/CardContainer.st.css.ts +2 -2
- package/src/components/CmsFieldManagement/CmsFieldForm.st.css.ts +2 -2
- package/src/components/CmsFieldManagement/CmsFieldModal.st.css.ts +2 -2
- package/src/components/CmsFieldManagement/Sections/ValidationAndDefaultsSection.st.css.ts +2 -2
- package/src/components/Collapse/Collapse.st.css.ts +2 -2
- package/src/components/CollectionPageNew/CollectionPage.st.css.ts +2 -2
- package/src/components/CollectionSectionHeader/CollectionSectionHeader.st.css.ts +2 -2
- package/src/components/CollectionTable/CollectionTable.st.css.ts +2 -2
- package/src/components/CollectionTable/CollectionTableWSRTable.st.css.ts +2 -2
- package/src/components/CollectionToolbar/CollectionToolbar.st.css.ts +2 -2
- package/src/components/CollectionToolbar/SearchOrCustomFilter.st.css.ts +2 -2
- package/src/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.ts +2 -2
- package/src/components/CollectionViewsDropdown/ViewsDropdown.st.css.ts +2 -2
- package/src/components/CustomFieldModal/CustomFieldForm.tsx +4 -1
- package/src/components/DragHandle/DragHandle.st.css.ts +2 -2
- package/src/components/EditableTable/EditableCell.st.css.ts +2 -2
- package/src/components/EditableTable/EditableTable.uni.driver.ts +18 -0
- package/src/components/EditableTable/EditableTableContextMenu.tsx +0 -4
- package/src/components/EditableTable/HeaderActionsPopover.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/CellViewLayout.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/address/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/array/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/boolean/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/boolean/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/color/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/date/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/date/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/datetime/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/datetime/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/email/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/email/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/mediaGallery/index.tsx +6 -2
- package/src/components/EditableTable/cellTypes/number/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/number/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/object/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/object/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/richContent/index.tsx +1 -1
- package/src/components/EditableTable/cellTypes/richText/index.tsx +1 -1
- package/src/components/EditableTable/cellTypes/select/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/text/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/text/View.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/time/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/url/Edit.st.css.ts +2 -2
- package/src/components/EditableTable/cellTypes/url/View.st.css.ts +2 -2
- package/src/components/EditableTable/useClipboardHandler.ts +0 -4
- package/src/components/EmptyState/EmptyStateBase.st.css.ts +2 -2
- package/src/components/EntityPage/EntityPagePlain.st.css.ts +2 -2
- package/src/components/Fade/Fade.st.css.ts +2 -2
- package/src/components/Heading/Heading.st.css.ts +2 -2
- package/src/components/ImportButton/ImportStepUpload.st.css.ts +2 -2
- package/src/components/InputOverflow/InputOverflow.st.css.ts +2 -2
- package/src/components/LoadingRow/LoadingRow.st.css.ts +3 -3
- package/src/components/MaxHeightText/MaxHeightText.st.css.ts +2 -2
- package/src/components/MaxLines/MaxLines.st.css.ts +2 -2
- package/src/components/MultiBulkActionToolbar/MultiBulkActionToolbar.st.css.ts +2 -2
- package/src/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.ts +2 -2
- package/src/components/NestedTable/NestedTableRow.st.css.ts +2 -2
- package/src/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.ts +2 -2
- package/src/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.ts +2 -2
- package/src/components/PickerContent/PickerContent.st.css.ts +2 -2
- package/src/components/PickerContent/PickerContentAdditionalStep.st.css.ts +2 -2
- package/src/components/PickerTableListItem/PickerTableListItem.st.css.ts +2 -2
- package/src/components/ScrollableContent/ScrollableContent.st.css.ts +2 -2
- package/src/components/SetupWidget/SetupWidget.st.css.ts +2 -2
- package/src/components/SkeletonCard/SkeletonCard.st.css.ts +2 -2
- package/src/components/SlidingModal/SlidingModal.st.css.ts +2 -2
- package/src/components/Table/AddFieldColumnHeader.st.css.ts +2 -2
- package/src/components/TabsFilter/TabsFilter.st.css.ts +2 -2
- package/src/components/Tags/ManageTags/ManageTagsModal/ManageTagsModal.st.css.ts +2 -2
- package/src/components/ToolbarItem/ToolbarItem.st.css.ts +2 -2
- package/src/components/ToolbarItemBox/ToolbarItemBox.st.css.ts +2 -2
- package/src/components/common.st.css.ts +2 -2
- package/src/state/CollectionPage/CollectionPageHeader.st.css.ts +2 -2
- package/src/state/EditableTable/CellValueState.ts +5 -2
- package/src/state/EditableTable/ClipboardState.ts +14 -21
- package/src/state/EditableTable/utils.ts +4 -0
- package/src/state/FormPage/FormPageHeader.st.css.ts +2 -2
- package/src/styles.global.css +2 -2
- package/src/version.ts +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mobx","require","_cellTypes","_utils","builtInCellTypeMap","Map","builtInCellTypes","map","ct","type","CellValueState","constructor","parent","extraCellTypes","_defineProperty2","default","_parent","_extraCellTypes","makeObservable","_pendingCells","observable","_draftCells","_cellTypeMap","computed","clearCells","action","toggleCell","commitHandler","applyBulkRawValues","applyBulkValues","flushDrafts","dropRowCellState","col","allColumns","cellType","typeConfig","set","id","get","textCellType","resolveCellTypeByColumnId","columnId","getCellDisplayValue","rowKey","pending","_getPendingCell","value","draft","_getDraftCell","column","_columnMap","keyedItem","_getKeyedItem","getValue","item","undefined","getCellValidation","valid","errors","validResult","validateEditingValue","_this$_parent$collect","resolved","normalized","normalizeOnCommit","runCellValidation","validation","validate","collection","translate","isCellEditable","editable","EditComponent","isColumnEditable","setValue","serializeCellValue","serialize","String","cells","changes","cell","clearable","pendingKey","_pendingCellKey","delete","deserialize","push","length","toggleValue","newValue","_applyValue","editingValue","key","tryDeserialize","rawValue","_this$_parent$collect2","error","rawChanges","rowUpdates","_this$_parent$collect3","result","mutation","isLocalNewRow","rowUpdate","consumed","_consumeRowDrafts","changedFieldIds","Set","add","updates","Array","from","values","updateItems","_this$_parent$collect4","exceptRowKey","invalidNewRows","_drafts","keys","_validateNewRow","rowKeys","entry","has","commitNewRow","prefix","startsWith","exports"],"sources":["../../../../src/state/EditableTable/CellValueState.ts"],"sourcesContent":["import { action, computed, makeObservable, observable } from 'mobx';\nimport type { CellType, Cell, ValidationResult } from './types';\nimport type { FiltersMap } from '@wix/bex-core';\nimport type { EditableTableState } from './EditableTableState';\nimport {\n builtInCellTypes,\n textCellType,\n} from '../../components/EditableTable/cellTypes';\nimport { runCellValidation, validResult } from './utils';\n\nconst builtInCellTypeMap = new Map<string, CellType>(\n builtInCellTypes.map((ct) => [ct.type, ct]),\n);\n\nexport class CellValueState<T, F extends FiltersMap> {\n /** Pending invalid cell values, keyed by `${itemId}:${colId}`. */\n readonly _pendingCells = new Map<string, { value: any; errors: string[] }>();\n\n /** Valid committed values not yet saved, keyed by `${itemId}:${colId}`.\n * Each row's drafts are flushed as one update when focus leaves the row. */\n readonly _draftCells = new Map<\n string,\n { rowKey: string; columnId: string; value: any }\n >();\n\n private readonly _parent: EditableTableState<T, F>;\n private readonly _extraCellTypes: Map<string, CellType>;\n\n constructor(\n parent: EditableTableState<T, F>,\n extraCellTypes: Map<string, CellType> = new Map(),\n ) {\n this._parent = parent;\n this._extraCellTypes = extraCellTypes;\n\n makeObservable(this, {\n _pendingCells: observable,\n _draftCells: observable,\n _cellTypeMap: computed,\n clearCells: action,\n toggleCell: action,\n commitHandler: action,\n applyBulkRawValues: action,\n applyBulkValues: action,\n flushDrafts: action,\n dropRowCellState: action,\n });\n }\n\n // Cell-type config per column id, from the merged columns (consumer columns\n // plus the columns the wired source adds). A computed so source columns that\n // load after init still get their cell types registered, without a rebuild.\n get _cellTypeMap(): Map<string, CellType> {\n const map = new Map<string, CellType>();\n for (const col of this._parent.allColumns) {\n if (col.cellType === 'custom' && col.typeConfig) {\n map.set(col.id, { type: 'custom', ...col.typeConfig });\n } else {\n map.set(\n col.id,\n builtInCellTypeMap.get(col.cellType) ??\n this._extraCellTypes.get(col.cellType) ??\n textCellType,\n );\n }\n }\n return map;\n }\n\n resolveCellTypeByColumnId(columnId: string): CellType {\n return this._cellTypeMap.get(columnId) ?? textCellType;\n }\n\n getCellDisplayValue(rowKey: string, columnId: string): any {\n const pending = this._getPendingCell(rowKey, columnId);\n if (pending) {\n return pending.value;\n }\n const draft = this._getDraftCell(rowKey, columnId);\n if (draft) {\n return draft.value;\n }\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n return column && keyedItem ? column.getValue(keyedItem.item) : undefined;\n }\n\n getCellValidation(rowKey: string, columnId: string): ValidationResult {\n const pending = this._getPendingCell(rowKey, columnId);\n if (pending) {\n return { valid: false, errors: pending.errors };\n }\n return validResult;\n }\n\n /** Normalize like commitHandler does, then validate, so a value commit\n * would accept (`www.wix.com`) is never reported invalid before it has\n * been committed. */\n validateEditingValue(columnId: string, value: any): ValidationResult {\n const column = this._parent._columnMap.get(columnId);\n if (!column) {\n return validResult;\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const normalized = resolved.normalizeOnCommit\n ? resolved.normalizeOnCommit(value)\n : value;\n return runCellValidation(\n normalized,\n column.validation,\n resolved.validate,\n this._parent.collection?.translate,\n );\n }\n\n isCellEditable(rowKey: string, columnId: string): boolean {\n const column = this._parent._columnMap.get(columnId);\n if (!column) {\n return false;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (resolved.editable === false || !resolved.EditComponent) {\n return false;\n }\n return this.isColumnEditable(rowKey, columnId);\n }\n\n /**\n * Whether `column.editable` permits writing this cell for this row,\n * independent of whether the cell type has an inline EditComponent. Gates\n * bulk/programmatic writes (clear, cut, paste) — narrower than\n * isCellEditable, which also requires an edit UI to exist.\n */\n isColumnEditable(rowKey: string, columnId: string): boolean {\n const column = this._parent._columnMap.get(columnId);\n if (!column?.setValue) {\n return false;\n }\n\n if (typeof column.editable === 'function') {\n const keyedItem = this._parent._getKeyedItem(rowKey);\n return keyedItem ? column.editable(keyedItem.item) : false;\n }\n return column.editable !== false;\n }\n\n /** Serialize a cell value to a string (for clipboard copy/cut). */\n serializeCellValue(rowKey: string, columnId: string): string {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!column || !keyedItem) {\n return '';\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const value = this.getCellDisplayValue(rowKey, columnId);\n return resolved.serialize ? resolved.serialize(value) : String(value ?? '');\n }\n\n /** Clear selected cells (Delete/Backspace). Respects cellType.clearable and column.editable. */\n clearCells(cells: Cell[]) {\n const changes: { rowKey: string; columnId: string; value: any }[] = [];\n\n for (const cell of cells) {\n const column = this._parent._columnMap.get(cell.columnId);\n if (!column?.setValue) {\n continue;\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (resolved.clearable === false) {\n continue;\n }\n if (!this.isColumnEditable(cell.rowKey, cell.columnId)) {\n continue;\n }\n\n const pendingKey = this._pendingCellKey(cell.rowKey, cell.columnId);\n if (pendingKey) {\n this._pendingCells.delete(pendingKey);\n }\n const value = resolved.deserialize ? resolved.deserialize('') : '';\n changes.push({ rowKey: cell.rowKey, columnId: cell.columnId, value });\n }\n\n if (changes.length > 0) {\n this.applyBulkValues(changes);\n }\n }\n\n toggleCell(rowKey: string, columnId: string) {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!column?.setValue || !keyedItem) {\n return;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (!resolved.toggleValue) {\n return;\n }\n\n const value = this.getCellDisplayValue(rowKey, columnId);\n const newValue = resolved.toggleValue(value);\n this._applyValue(rowKey, columnId, newValue);\n }\n\n /** Commit handler — used as callback for CellInteractionState. */\n commitHandler(editingValue: any, cell: Cell) {\n if (editingValue !== undefined) {\n const resolved = this.resolveCellTypeByColumnId(cell.columnId);\n const normalized = resolved.normalizeOnCommit\n ? resolved.normalizeOnCommit(editingValue)\n : editingValue;\n this._applyValue(cell.rowKey, cell.columnId, normalized);\n }\n }\n\n private _getPendingCell(\n rowKey: string,\n columnId: string,\n ): { value: any; errors: string[] } | undefined {\n const key = this._pendingCellKey(rowKey, columnId);\n return key ? this._pendingCells.get(key) : undefined;\n }\n\n private _getDraftCell(\n rowKey: string,\n columnId: string,\n ): { value: any } | undefined {\n const key = this._pendingCellKey(rowKey, columnId);\n return key ? this._draftCells.get(key) : undefined;\n }\n\n private _pendingCellKey(\n rowKey: string,\n columnId: string,\n ): string | undefined {\n const keyedItem = this._parent._getKeyedItem(rowKey);\n const column = this._parent._columnMap.get(columnId);\n if (!keyedItem || !column) {\n return undefined;\n }\n return `${keyedItem.key}:${column.id}`;\n }\n\n /**\n * Deserialize a raw string to a typed value. Returns an error message\n * if the conversion fails\n */\n tryDeserialize(\n columnId: string,\n rawValue: string,\n ): { value: any; error?: string } {\n const column = this._parent._columnMap.get(columnId);\n if (!column) {\n return { value: rawValue };\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (!resolved.deserialize) {\n return { value: rawValue };\n }\n try {\n return { value: resolved.deserialize(rawValue) };\n } catch {\n return {\n value: rawValue,\n error: this._parent.collection?.translate(\n 'cairo.editableTable.cell.validation.notCompatible',\n ),\n };\n }\n }\n\n /**\n * Deserialize and apply multiple raw string values in bulk.\n * Handles conversion failures by storing them as pending cells.\n */\n applyBulkRawValues(\n rawChanges: { rowKey: string; columnId: string; rawValue: string }[],\n ) {\n const changes: { rowKey: string; columnId: string; value: any }[] = [];\n for (const { rowKey, columnId, rawValue } of rawChanges) {\n const { value, error } = this.tryDeserialize(columnId, rawValue);\n if (error) {\n const pendingKey = this._pendingCellKey(rowKey, columnId);\n if (pendingKey) {\n this._pendingCells.set(pendingKey, { value, errors: [error] });\n }\n } else {\n changes.push({ rowKey, columnId, value });\n }\n }\n this.applyBulkValues(changes);\n }\n\n /**\n * Apply multiple cell values in bulk. Validates per cell, accumulates\n * changes per row, and submits all modified items in a single update.\n * Every mutation path (clear, paste, cut) funnels through here, so\n * checking isColumnEditable here — not just at the call sites — keeps\n * read-only cells protected regardless of entry point.\n */\n applyBulkValues(changes: { rowKey: string; columnId: string; value: any }[]) {\n const rowUpdates = new Map<\n string,\n { item: T; changedFieldIds: Set<string> }\n >();\n\n for (const { rowKey, columnId, value } of changes) {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (\n !column?.setValue ||\n !keyedItem ||\n !this.isColumnEditable(rowKey, columnId)\n ) {\n continue;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const result = runCellValidation(\n value,\n column.validation,\n resolved.validate,\n this._parent.collection?.translate,\n );\n const pendingKey = this._pendingCellKey(rowKey, columnId);\n\n if (result.valid) {\n if (pendingKey) {\n this._pendingCells.delete(pendingKey);\n }\n if (this._parent.mutation.isLocalNewRow(rowKey)) {\n // A row not created on the server yet can't take an update —\n // buffer the value as a draft; it goes out with the row's\n // create when focus leaves the row.\n if (pendingKey) {\n this._draftCells.set(pendingKey, {\n rowKey: keyedItem.key,\n columnId: column.id,\n value,\n });\n }\n continue;\n }\n let rowUpdate = rowUpdates.get(rowKey);\n if (!rowUpdate) {\n const consumed = this._consumeRowDrafts(rowKey, keyedItem.item);\n rowUpdate = {\n item: consumed.item,\n changedFieldIds: new Set(consumed.changedFieldIds),\n };\n rowUpdates.set(rowKey, rowUpdate);\n }\n rowUpdate.item = column.setValue(rowUpdate.item, value);\n rowUpdate.changedFieldIds.add(column.id);\n } else if (pendingKey) {\n this._pendingCells.set(pendingKey, {\n value,\n errors: result.errors ?? [],\n });\n }\n }\n\n const updates = Array.from(rowUpdates.values());\n this._parent.mutation.updateItems(\n updates.map(({ item }) => item),\n updates.map(({ changedFieldIds }) => Array.from(changedFieldIds)),\n );\n }\n\n private _applyValue(rowKey: string, columnId: string, value: any) {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!column?.setValue || !keyedItem) {\n return;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const result = runCellValidation(\n value,\n column.validation,\n resolved.validate,\n this._parent.collection?.translate,\n );\n const pendingKey = this._pendingCellKey(rowKey, columnId);\n\n if (result.valid && pendingKey) {\n this._pendingCells.delete(pendingKey);\n this._draftCells.set(pendingKey, {\n rowKey: keyedItem.key,\n columnId: column.id,\n value,\n });\n } else if (pendingKey) {\n this._pendingCells.set(pendingKey, {\n value,\n errors: result.errors ?? [],\n });\n }\n }\n\n flushDrafts(exceptRowKey?: string) {\n const invalidNewRows = new Set<string>();\n for (const rowKey of this._parent.mutation._drafts.keys()) {\n if (rowKey !== exceptRowKey && !this._validateNewRow(rowKey)) {\n invalidNewRows.add(rowKey);\n }\n }\n\n const rowKeys = new Set<string>();\n for (const entry of this._draftCells.values()) {\n if (entry.rowKey !== exceptRowKey) {\n rowKeys.add(entry.rowKey);\n }\n }\n\n const updates: { item: T; changedFieldIds: string[] }[] = [];\n for (const rowKey of rowKeys) {\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!keyedItem) {\n this.dropRowCellState(rowKey);\n } else if (this._parent.mutation.isLocalNewRow(rowKey)) {\n if (!invalidNewRows.has(rowKey)) {\n const consumed = this._consumeRowDrafts(rowKey, keyedItem.item);\n this._parent.mutation.commitNewRow(rowKey, consumed.item);\n }\n } else {\n const consumed = this._consumeRowDrafts(rowKey, keyedItem.item);\n updates.push(consumed);\n }\n }\n if (updates.length > 0) {\n this._parent.mutation.updateItems(\n updates.map(({ item }) => item),\n updates.map(({ changedFieldIds }) => changedFieldIds),\n );\n }\n }\n\n /** Validate all editable cells of a local new row, storing failures as\n * pending cells. Untouched cells validate their current display value. */\n private _validateNewRow(rowKey: string): boolean {\n let valid = true;\n for (const column of this._parent.allColumns) {\n if (!this.isColumnEditable(rowKey, column.id)) {\n continue;\n }\n // A cell already showing an error blocks the row even if re-validating\n // its value would pass. A failed paste keeps the raw string here, and a\n // cell type that only rejects on deserialize has no `validate` to fail.\n if (this._getPendingCell(rowKey, column.id)) {\n valid = false;\n continue;\n }\n const value = this.getCellDisplayValue(rowKey, column.id);\n const result = this.validateEditingValue(column.id, value);\n if (!result.valid) {\n valid = false;\n const pendingKey = this._pendingCellKey(rowKey, column.id);\n if (pendingKey) {\n this._pendingCells.set(pendingKey, {\n value,\n errors: result.errors ?? [],\n });\n }\n }\n }\n return valid;\n }\n\n private _consumeRowDrafts(\n rowKey: string,\n item: T,\n ): { item: T; changedFieldIds: string[] } {\n const changedFieldIds = new Set<string>();\n for (const [key, entry] of this._draftCells) {\n if (entry.rowKey !== rowKey) {\n continue;\n }\n const column = this._parent._columnMap.get(entry.columnId);\n if (column?.setValue) {\n item = column.setValue(item, entry.value);\n changedFieldIds.add(column.id);\n }\n this._draftCells.delete(key);\n }\n return { item, changedFieldIds: Array.from(changedFieldIds) };\n }\n\n /** Drop a row's buffered cell state without saving it (the row is gone).\n * Pending cells are keyed by row key, not tracked per entry, so they are\n * swept by prefix. */\n dropRowCellState(rowKey: string) {\n for (const [key, entry] of this._draftCells) {\n if (entry.rowKey === rowKey) {\n this._draftCells.delete(key);\n }\n }\n const prefix = `${rowKey}:`;\n for (const key of this._pendingCells.keys()) {\n if (key.startsWith(prefix)) {\n this._pendingCells.delete(key);\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,UAAA,GAAAD,OAAA;AAIA,IAAAE,MAAA,GAAAF,OAAA;AAEA,MAAMG,kBAAkB,GAAG,IAAIC,GAAG,CAChCC,2BAAgB,CAACC,GAAG,CAAEC,EAAE,IAAK,CAACA,EAAE,CAACC,IAAI,EAAED,EAAE,CAAC,CAC5C,CAAC;AAEM,MAAME,cAAc,CAA0B;EAcnDC,WAAWA,CACTC,MAAgC,EAChCC,cAAqC,GAAG,IAAIR,GAAG,CAAC,CAAC,EACjD;IAhBF;IAAA,IAAAS,gBAAA,CAAAC,OAAA,yBACyB,IAAIV,GAAG,CAA2C,CAAC;IAE5E;AACF;IADE,IAAAS,gBAAA,CAAAC,OAAA,uBAEuB,IAAIV,GAAG,CAG5B,CAAC;IAAA,IAAAS,gBAAA,CAAAC,OAAA;IAAA,IAAAD,gBAAA,CAAAC,OAAA;IASD,IAAI,CAACC,OAAO,GAAGJ,MAAM;IACrB,IAAI,CAACK,eAAe,GAAGJ,cAAc;IAErC,IAAAK,oBAAc,EAAC,IAAI,EAAE;MACnBC,aAAa,EAAEC,gBAAU;MACzBC,WAAW,EAAED,gBAAU;MACvBE,YAAY,EAAEC,cAAQ;MACtBC,UAAU,EAAEC,YAAM;MAClBC,UAAU,EAAED,YAAM;MAClBE,aAAa,EAAEF,YAAM;MACrBG,kBAAkB,EAAEH,YAAM;MAC1BI,eAAe,EAAEJ,YAAM;MACvBK,WAAW,EAAEL,YAAM;MACnBM,gBAAgB,EAAEN;IACpB,CAAC,CAAC;EACJ;;EAEA;EACA;EACA;EACA,IAAIH,YAAYA,CAAA,EAA0B;IACxC,MAAMf,GAAG,GAAG,IAAIF,GAAG,CAAmB,CAA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IQ,MAAM,YAANA,MAAM,CAAEyB,QAAQ,EAAE;QACpBpB,IAAI,GAAGL,MAAM,CAACyB,QAAQ,CAACpB,IAAI,EAAEmE,KAAK,CAAC3E,KAAK,CAAC;QACzC4D,eAAe,CAACE,GAAG,CAAC3D,MAAM,CAACZ,EAAE,CAAC;MAChC;MACA,IAAI,CAAChB,WAAW,CAAC+D,MAAM,CAACQ,GAAG,CAAC;IAC9B;IACA,OAAO;MAAEtC,IAAI;MAAEoD,eAAe,EAAEI,KAAK,CAACC,IAAI,CAACL,eAAe;IAAE,CAAC;EAC/D;;EAEA;AACF;AACA;EACE3E,gBAAgBA,CAACY,MAAc,EAAE;IAC/B,KAAK,MAAM,CAACiD,GAAG,EAAE6B,KAAK,CAAC,IAAI,IAAI,CAACpG,WAAW,EAAE;MAC3C,IAAIoG,KAAK,CAAC9E,MAAM,KAAKA,MAAM,EAAE;QAC3B,IAAI,CAACtB,WAAW,CAAC+D,MAAM,CAACQ,GAAG,CAAC;MAC9B;IACF;IACA,MAAMgC,MAAM,GAAG,GAAGjF,MAAM,GAAG;IAC3B,KAAK,MAAMiD,GAAG,IAAI,IAAI,CAACzE,aAAa,CAACmG,IAAI,CAAC,CAAC,EAAE;MAC3C,IAAI1B,GAAG,CAACiC,UAAU,CAACD,MAAM,CAAC,EAAE;QAC1B,IAAI,CAACzG,aAAa,CAACiE,MAAM,CAACQ,GAAG,CAAC;MAChC;IACF;EACF;AACF;AAACkC,OAAA,CAAApH,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_mobx","require","_cellTypes","_utils","builtInCellTypeMap","Map","builtInCellTypes","map","ct","type","CellValueState","constructor","parent","extraCellTypes","_defineProperty2","default","_parent","_extraCellTypes","makeObservable","_pendingCells","observable","_draftCells","_cellTypeMap","computed","clearCells","action","toggleCell","commitHandler","applyBulkRawValues","applyBulkValues","flushDrafts","dropRowCellState","col","allColumns","cellType","typeConfig","set","id","get","textCellType","resolveCellTypeByColumnId","columnId","getCellDisplayValue","rowKey","pending","_getPendingCell","value","draft","_getDraftCell","column","_columnMap","keyedItem","_getKeyedItem","getValue","item","undefined","getCellValidation","valid","errors","validResult","validateEditingValue","_this$_parent$collect","resolved","normalized","normalizeOnCommit","runCellValidation","validation","validate","collection","translate","isCellEditable","editable","EditComponent","isColumnEditable","setValue","serializeCellValue","serialize","String","cells","changes","cell","clearable","pendingKey","_pendingCellKey","delete","push","length","toggleValue","newValue","_applyValue","editingValue","key","tryDeserialize","rawValue","deserialize","_this$_parent$collect2","error","rawChanges","rowUpdates","_this$_parent$collect3","result","mutation","isLocalNewRow","rowUpdate","consumed","_consumeRowDrafts","changedFieldIds","Set","add","updates","Array","from","values","updateItems","_this$_parent$collect4","exceptRowKey","invalidNewRows","_drafts","keys","_validateNewRow","rowKeys","entry","has","commitNewRow","prefix","startsWith","exports"],"sources":["../../../../src/state/EditableTable/CellValueState.ts"],"sourcesContent":["import { action, computed, makeObservable, observable } from 'mobx';\nimport type { CellType, Cell, ValidationResult } from './types';\nimport type { FiltersMap } from '@wix/bex-core';\nimport type { EditableTableState } from './EditableTableState';\nimport {\n builtInCellTypes,\n textCellType,\n} from '../../components/EditableTable/cellTypes';\nimport { runCellValidation, validResult } from './utils';\n\nconst builtInCellTypeMap = new Map<string, CellType>(\n builtInCellTypes.map((ct) => [ct.type, ct]),\n);\n\nexport class CellValueState<T, F extends FiltersMap> {\n /** Pending invalid cell values, keyed by `${itemId}:${colId}`. */\n readonly _pendingCells = new Map<string, { value: any; errors: string[] }>();\n\n /** Valid committed values not yet saved, keyed by `${itemId}:${colId}`.\n * Each row's drafts are flushed as one update when focus leaves the row. */\n readonly _draftCells = new Map<\n string,\n { rowKey: string; columnId: string; value: any }\n >();\n\n private readonly _parent: EditableTableState<T, F>;\n private readonly _extraCellTypes: Map<string, CellType>;\n\n constructor(\n parent: EditableTableState<T, F>,\n extraCellTypes: Map<string, CellType> = new Map(),\n ) {\n this._parent = parent;\n this._extraCellTypes = extraCellTypes;\n\n makeObservable(this, {\n _pendingCells: observable,\n _draftCells: observable,\n _cellTypeMap: computed,\n clearCells: action,\n toggleCell: action,\n commitHandler: action,\n applyBulkRawValues: action,\n applyBulkValues: action,\n flushDrafts: action,\n dropRowCellState: action,\n });\n }\n\n // Cell-type config per column id, from the merged columns (consumer columns\n // plus the columns the wired source adds). A computed so source columns that\n // load after init still get their cell types registered, without a rebuild.\n get _cellTypeMap(): Map<string, CellType> {\n const map = new Map<string, CellType>();\n for (const col of this._parent.allColumns) {\n if (col.cellType === 'custom' && col.typeConfig) {\n map.set(col.id, { type: 'custom', ...col.typeConfig });\n } else {\n map.set(\n col.id,\n builtInCellTypeMap.get(col.cellType) ??\n this._extraCellTypes.get(col.cellType) ??\n textCellType,\n );\n }\n }\n return map;\n }\n\n resolveCellTypeByColumnId(columnId: string): CellType {\n return this._cellTypeMap.get(columnId) ?? textCellType;\n }\n\n getCellDisplayValue(rowKey: string, columnId: string): any {\n const pending = this._getPendingCell(rowKey, columnId);\n if (pending) {\n return pending.value;\n }\n const draft = this._getDraftCell(rowKey, columnId);\n if (draft) {\n return draft.value;\n }\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n return column && keyedItem ? column.getValue(keyedItem.item) : undefined;\n }\n\n getCellValidation(rowKey: string, columnId: string): ValidationResult {\n const pending = this._getPendingCell(rowKey, columnId);\n if (pending) {\n return { valid: false, errors: pending.errors };\n }\n return validResult;\n }\n\n /** Normalize like commitHandler does, then validate, so a value commit\n * would accept (`www.wix.com`) is never reported invalid before it has\n * been committed. */\n validateEditingValue(columnId: string, value: any): ValidationResult {\n const column = this._parent._columnMap.get(columnId);\n if (!column) {\n return validResult;\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const normalized = resolved.normalizeOnCommit\n ? resolved.normalizeOnCommit(value)\n : value;\n return runCellValidation(\n normalized,\n column.validation,\n resolved.validate,\n this._parent.collection?.translate,\n );\n }\n\n isCellEditable(rowKey: string, columnId: string): boolean {\n const column = this._parent._columnMap.get(columnId);\n if (!column) {\n return false;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (resolved.editable === false || !resolved.EditComponent) {\n return false;\n }\n return this.isColumnEditable(rowKey, columnId);\n }\n\n /**\n * Whether `column.editable` permits writing this cell for this row,\n * independent of whether the cell type has an inline EditComponent. Gates\n * bulk/programmatic writes (clear, cut, paste) — narrower than\n * isCellEditable, which also requires an edit UI to exist.\n */\n isColumnEditable(rowKey: string, columnId: string): boolean {\n const column = this._parent._columnMap.get(columnId);\n if (!column?.setValue) {\n return false;\n }\n\n if (typeof column.editable === 'function') {\n const keyedItem = this._parent._getKeyedItem(rowKey);\n return keyedItem ? column.editable(keyedItem.item) : false;\n }\n return column.editable !== false;\n }\n\n /** Serialize a cell value to a string (for clipboard copy/cut). */\n serializeCellValue(rowKey: string, columnId: string): string {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!column || !keyedItem) {\n return '';\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const value = this.getCellDisplayValue(rowKey, columnId);\n return resolved.serialize ? resolved.serialize(value) : String(value ?? '');\n }\n\n /** Clear selected cells (Delete/Backspace). Respects cellType.clearable and column.editable. */\n clearCells(cells: Cell[]) {\n const changes: { rowKey: string; columnId: string; value: any }[] = [];\n\n for (const cell of cells) {\n const column = this._parent._columnMap.get(cell.columnId);\n if (!column?.setValue) {\n continue;\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (resolved.clearable === false) {\n continue;\n }\n if (!this.isColumnEditable(cell.rowKey, cell.columnId)) {\n continue;\n }\n\n const pendingKey = this._pendingCellKey(cell.rowKey, cell.columnId);\n if (pendingKey) {\n this._pendingCells.delete(pendingKey);\n }\n changes.push({\n rowKey: cell.rowKey,\n columnId: cell.columnId,\n value: undefined,\n });\n }\n\n if (changes.length > 0) {\n this.applyBulkValues(changes);\n }\n }\n\n toggleCell(rowKey: string, columnId: string) {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!column?.setValue || !keyedItem) {\n return;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (!resolved.toggleValue) {\n return;\n }\n\n const value = this.getCellDisplayValue(rowKey, columnId);\n const newValue = resolved.toggleValue(value);\n this._applyValue(rowKey, columnId, newValue);\n }\n\n /** Commit handler — used as callback for CellInteractionState. */\n commitHandler(editingValue: any, cell: Cell) {\n if (editingValue !== undefined) {\n const resolved = this.resolveCellTypeByColumnId(cell.columnId);\n const normalized = resolved.normalizeOnCommit\n ? resolved.normalizeOnCommit(editingValue)\n : editingValue;\n this._applyValue(cell.rowKey, cell.columnId, normalized);\n }\n }\n\n private _getPendingCell(\n rowKey: string,\n columnId: string,\n ): { value: any; errors: string[] } | undefined {\n const key = this._pendingCellKey(rowKey, columnId);\n return key ? this._pendingCells.get(key) : undefined;\n }\n\n private _getDraftCell(\n rowKey: string,\n columnId: string,\n ): { value: any } | undefined {\n const key = this._pendingCellKey(rowKey, columnId);\n return key ? this._draftCells.get(key) : undefined;\n }\n\n private _pendingCellKey(\n rowKey: string,\n columnId: string,\n ): string | undefined {\n const keyedItem = this._parent._getKeyedItem(rowKey);\n const column = this._parent._columnMap.get(columnId);\n if (!keyedItem || !column) {\n return undefined;\n }\n return `${keyedItem.key}:${column.id}`;\n }\n\n /**\n * Deserialize a raw string to a typed value. Returns an error message\n * if the conversion fails\n */\n tryDeserialize(\n columnId: string,\n rawValue: string,\n ): { value: any; error?: string } {\n const column = this._parent._columnMap.get(columnId);\n if (!column) {\n return { value: rawValue };\n }\n const resolved = this.resolveCellTypeByColumnId(column.id);\n if (!resolved.deserialize) {\n return { value: rawValue };\n }\n try {\n return { value: resolved.deserialize(rawValue) };\n } catch {\n return {\n value: rawValue,\n error: this._parent.collection?.translate(\n 'cairo.editableTable.cell.validation.notCompatible',\n ),\n };\n }\n }\n\n /**\n * Deserialize and apply multiple raw string values in bulk.\n * Handles conversion failures by storing them as pending cells.\n */\n applyBulkRawValues(\n rawChanges: { rowKey: string; columnId: string; rawValue: string }[],\n ) {\n const changes: { rowKey: string; columnId: string; value: any }[] = [];\n for (const { rowKey, columnId, rawValue } of rawChanges) {\n const { value, error } = this.tryDeserialize(columnId, rawValue);\n if (error) {\n const pendingKey = this._pendingCellKey(rowKey, columnId);\n if (pendingKey) {\n this._pendingCells.set(pendingKey, { value, errors: [error] });\n }\n } else {\n changes.push({ rowKey, columnId, value });\n }\n }\n this.applyBulkValues(changes);\n }\n\n /**\n * Apply multiple cell values in bulk. Validates per cell, accumulates\n * changes per row, and submits all modified items in a single update.\n * Every mutation path (clear, paste, cut) funnels through here, so\n * checking isColumnEditable here — not just at the call sites — keeps\n * read-only cells protected regardless of entry point.\n */\n applyBulkValues(changes: { rowKey: string; columnId: string; value: any }[]) {\n const rowUpdates = new Map<\n string,\n { item: T; changedFieldIds: Set<string> }\n >();\n\n for (const { rowKey, columnId, value } of changes) {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (\n !column?.setValue ||\n !keyedItem ||\n !this.isColumnEditable(rowKey, columnId)\n ) {\n continue;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const result = runCellValidation(\n value,\n column.validation,\n resolved.validate,\n this._parent.collection?.translate,\n );\n const pendingKey = this._pendingCellKey(rowKey, columnId);\n\n if (result.valid) {\n if (pendingKey) {\n this._pendingCells.delete(pendingKey);\n }\n if (this._parent.mutation.isLocalNewRow(rowKey)) {\n // A row not created on the server yet can't take an update —\n // buffer the value as a draft; it goes out with the row's\n // create when focus leaves the row.\n if (pendingKey) {\n this._draftCells.set(pendingKey, {\n rowKey: keyedItem.key,\n columnId: column.id,\n value,\n });\n }\n continue;\n }\n let rowUpdate = rowUpdates.get(rowKey);\n if (!rowUpdate) {\n const consumed = this._consumeRowDrafts(rowKey, keyedItem.item);\n rowUpdate = {\n item: consumed.item,\n changedFieldIds: new Set(consumed.changedFieldIds),\n };\n rowUpdates.set(rowKey, rowUpdate);\n }\n rowUpdate.item = column.setValue(rowUpdate.item, value);\n rowUpdate.changedFieldIds.add(column.id);\n } else if (pendingKey) {\n this._pendingCells.set(pendingKey, {\n value,\n errors: result.errors ?? [],\n });\n }\n }\n\n const updates = Array.from(rowUpdates.values());\n this._parent.mutation.updateItems(\n updates.map(({ item }) => item),\n updates.map(({ changedFieldIds }) => Array.from(changedFieldIds)),\n );\n }\n\n private _applyValue(rowKey: string, columnId: string, value: any) {\n const column = this._parent._columnMap.get(columnId);\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!column?.setValue || !keyedItem) {\n return;\n }\n\n const resolved = this.resolveCellTypeByColumnId(column.id);\n const result = runCellValidation(\n value,\n column.validation,\n resolved.validate,\n this._parent.collection?.translate,\n );\n const pendingKey = this._pendingCellKey(rowKey, columnId);\n\n if (result.valid && pendingKey) {\n this._pendingCells.delete(pendingKey);\n this._draftCells.set(pendingKey, {\n rowKey: keyedItem.key,\n columnId: column.id,\n value,\n });\n } else if (pendingKey) {\n this._pendingCells.set(pendingKey, {\n value,\n errors: result.errors ?? [],\n });\n }\n }\n\n flushDrafts(exceptRowKey?: string) {\n const invalidNewRows = new Set<string>();\n for (const rowKey of this._parent.mutation._drafts.keys()) {\n if (rowKey !== exceptRowKey && !this._validateNewRow(rowKey)) {\n invalidNewRows.add(rowKey);\n }\n }\n\n const rowKeys = new Set<string>();\n for (const entry of this._draftCells.values()) {\n if (entry.rowKey !== exceptRowKey) {\n rowKeys.add(entry.rowKey);\n }\n }\n\n const updates: { item: T; changedFieldIds: string[] }[] = [];\n for (const rowKey of rowKeys) {\n const keyedItem = this._parent._getKeyedItem(rowKey);\n if (!keyedItem) {\n this.dropRowCellState(rowKey);\n } else if (this._parent.mutation.isLocalNewRow(rowKey)) {\n if (!invalidNewRows.has(rowKey)) {\n const consumed = this._consumeRowDrafts(rowKey, keyedItem.item);\n this._parent.mutation.commitNewRow(rowKey, consumed.item);\n }\n } else {\n const consumed = this._consumeRowDrafts(rowKey, keyedItem.item);\n updates.push(consumed);\n }\n }\n if (updates.length > 0) {\n this._parent.mutation.updateItems(\n updates.map(({ item }) => item),\n updates.map(({ changedFieldIds }) => changedFieldIds),\n );\n }\n }\n\n /** Validate all editable cells of a local new row, storing failures as\n * pending cells. Untouched cells validate their current display value. */\n private _validateNewRow(rowKey: string): boolean {\n let valid = true;\n for (const column of this._parent.allColumns) {\n if (!this.isColumnEditable(rowKey, column.id)) {\n continue;\n }\n // A cell already showing an error blocks the row even if re-validating\n // its value would pass. A failed paste keeps the raw string here, and a\n // cell type that only rejects on deserialize has no `validate` to fail.\n if (this._getPendingCell(rowKey, column.id)) {\n valid = false;\n continue;\n }\n const value = this.getCellDisplayValue(rowKey, column.id);\n const result = this.validateEditingValue(column.id, value);\n if (!result.valid) {\n valid = false;\n const pendingKey = this._pendingCellKey(rowKey, column.id);\n if (pendingKey) {\n this._pendingCells.set(pendingKey, {\n value,\n errors: result.errors ?? [],\n });\n }\n }\n }\n return valid;\n }\n\n private _consumeRowDrafts(\n rowKey: string,\n item: T,\n ): { item: T; changedFieldIds: string[] } {\n const changedFieldIds = new Set<string>();\n for (const [key, entry] of this._draftCells) {\n if (entry.rowKey !== rowKey) {\n continue;\n }\n const column = this._parent._columnMap.get(entry.columnId);\n if (column?.setValue) {\n item = column.setValue(item, entry.value);\n changedFieldIds.add(column.id);\n }\n this._draftCells.delete(key);\n }\n return { item, changedFieldIds: Array.from(changedFieldIds) };\n }\n\n /** Drop a row's buffered cell state without saving it (the row is gone).\n * Pending cells are keyed by row key, not tracked per entry, so they are\n * swept by prefix. */\n dropRowCellState(rowKey: string) {\n for (const [key, entry] of this._draftCells) {\n if (entry.rowKey === rowKey) {\n this._draftCells.delete(key);\n }\n }\n const prefix = `${rowKey}:`;\n for (const key of this._pendingCells.keys()) {\n if (key.startsWith(prefix)) {\n this._pendingCells.delete(key);\n }\n }\n }\n}\n"],"mappings":";;;;;;AAAA,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,OAAO;MAAErC,IAAI;MAAEoD,eAAe,EAAEI,KAAK,CAACC,IAAI,CAACL,eAAe;IAAE,CAAC;EAC/D;;EAEA;AACF;AACA;EACE3E,gBAAgBA,CAACY,MAAc,EAAE;IAC/B,KAAK,MAAM,CAACgD,GAAG,EAAE8B,KAAK,CAAC,IAAI,IAAI,CAACpG,WAAW,EAAE;MAC3C,IAAIoG,KAAK,CAAC9E,MAAM,KAAKA,MAAM,EAAE;QAC3B,IAAI,CAACtB,WAAW,CAAC+D,MAAM,CAACO,GAAG,CAAC;MAC9B;IACF;IACA,MAAMiC,MAAM,GAAG,GAAGjF,MAAM,GAAG;IAC3B,KAAK,MAAMgD,GAAG,IAAI,IAAI,CAACxE,aAAa,CAACmG,IAAI,CAAC,CAAC,EAAE;MAC3C,IAAI3B,GAAG,CAACkC,UAAU,CAACD,MAAM,CAAC,EAAE;QAC1B,IAAI,CAACzG,aAAa,CAACiE,MAAM,CAACO,GAAG,CAAC;MAChC;IACF;EACF;AACF;AAACmC,OAAA,CAAApH,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -10,7 +10,7 @@ class ClipboardState {
|
|
|
10
10
|
constructor(parent) {
|
|
11
11
|
(0, _defineProperty2.default)(this, "copiedCells", new Set());
|
|
12
12
|
(0, _defineProperty2.default)(this, "isCut", false);
|
|
13
|
-
(0, _defineProperty2.default)(this, "_copiedDataString",
|
|
13
|
+
(0, _defineProperty2.default)(this, "_copiedDataString", void 0);
|
|
14
14
|
(0, _defineProperty2.default)(this, "_copiedValues", new Map());
|
|
15
15
|
(0, _defineProperty2.default)(this, "_parent", void 0);
|
|
16
16
|
this._parent = parent;
|
|
@@ -60,7 +60,7 @@ class ClipboardState {
|
|
|
60
60
|
if (!targetPos) {
|
|
61
61
|
return;
|
|
62
62
|
}
|
|
63
|
-
const isInternal = this._copiedDataString !==
|
|
63
|
+
const isInternal = this._copiedDataString !== undefined && this._copiedDataString === rawData;
|
|
64
64
|
const pastedKeys = this._pasteGrid(rawData, targetPos, isInternal, cellValue);
|
|
65
65
|
if (this.isCut && isInternal) {
|
|
66
66
|
this._clearCutSources(pastedKeys, cellValue);
|
|
@@ -71,7 +71,7 @@ class ClipboardState {
|
|
|
71
71
|
const pastedKeys = new Set();
|
|
72
72
|
const richChanges = [];
|
|
73
73
|
const rawChanges = [];
|
|
74
|
-
const rows = rawData.split(/\r?\n/).filter(
|
|
74
|
+
const rows = rawData.split(/\r?\n/).filter(row => useRichValues || row.length > 0);
|
|
75
75
|
for (let r = 0; r < rows.length; r++) {
|
|
76
76
|
const cols = rows[r].split('\t');
|
|
77
77
|
for (let c = 0; c < cols.length; c++) {
|
|
@@ -79,12 +79,12 @@ class ClipboardState {
|
|
|
79
79
|
if (!dest) {
|
|
80
80
|
continue;
|
|
81
81
|
}
|
|
82
|
-
const
|
|
83
|
-
if (
|
|
82
|
+
const copiedValueKey = `${r}:${c}`;
|
|
83
|
+
if (useRichValues && this._copiedValues.has(copiedValueKey)) {
|
|
84
84
|
richChanges.push({
|
|
85
85
|
rowKey: dest.rowKey,
|
|
86
86
|
columnId: dest.columnId,
|
|
87
|
-
value:
|
|
87
|
+
value: this._copiedValues.get(copiedValueKey)
|
|
88
88
|
});
|
|
89
89
|
} else {
|
|
90
90
|
rawChanges.push({
|
|
@@ -105,26 +105,22 @@ class ClipboardState {
|
|
|
105
105
|
return pastedKeys;
|
|
106
106
|
}
|
|
107
107
|
_clearCutSources(pastedKeys, cellValue) {
|
|
108
|
-
const
|
|
108
|
+
const cells = [];
|
|
109
109
|
for (const key of this.copiedCells) {
|
|
110
110
|
if (pastedKeys.has(key)) {
|
|
111
111
|
continue;
|
|
112
112
|
}
|
|
113
113
|
const pos = (0, _utils.parseCellKey)(key);
|
|
114
114
|
if (pos) {
|
|
115
|
-
|
|
116
|
-
rowKey: pos.rowKey,
|
|
117
|
-
columnId: pos.columnId,
|
|
118
|
-
rawValue: ''
|
|
119
|
-
});
|
|
115
|
+
cells.push(pos);
|
|
120
116
|
}
|
|
121
117
|
}
|
|
122
|
-
cellValue.
|
|
118
|
+
cellValue.clearCells(cells);
|
|
123
119
|
}
|
|
124
120
|
clear() {
|
|
125
121
|
this.copiedCells.clear();
|
|
126
122
|
this.isCut = false;
|
|
127
|
-
this._copiedDataString =
|
|
123
|
+
this._copiedDataString = undefined;
|
|
128
124
|
this._copiedValues.clear();
|
|
129
125
|
}
|
|
130
126
|
isCellCopied(rowKey, columnId) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_mobx","require","_utils","ClipboardState","constructor","parent","_defineProperty2","default","Set","Map","_parent","makeObservable","copiedCells","observable","isCut","hasCopiedCells","computed","copy","action","cut","paste","clear","_storeCells","rawData","cellValue","cellInteraction","target","focusedCell","targetPos","_toIndices","isInternal","_copiedDataString","pastedKeys","_pasteGrid","_clearCutSources","useRichValues","richChanges","rawChanges","rows","split","filter","r","length","cols","c","dest","_toPosition","row","col","richValue","_copiedValues","get","undefined","push","rowKey","columnId","value","rawValue","add","cellKey","applyBulkValues","applyBulkRawValues","key","has","pos","parseCellKey","isCellCopied","getCopiedBorder","noBorder","isNeighborCopied","neighbor","top","bottom","left","right","size","cells","selectedCellsList","cell","indices","map","idx","minRow","Math","min","i","maxRow","max","minCol","maxCol","data","serialized","serializeCellValue","set","getCellDisplayValue","tsv","join","exports"],"sources":["../../../../src/state/EditableTable/ClipboardState.ts"],"sourcesContent":["import { action, computed, makeObservable, observable } from 'mobx';\nimport type { CellBorder } from './types';\nimport type { FiltersMap } from '@wix/bex-core';\nimport type { EditableTableState } from './EditableTableState';\nimport { cellKey, parseCellKey, noBorder } from './utils';\n\nexport class ClipboardState<T, F extends FiltersMap> {\n copiedCells = new Set<string>();\n isCut = false;\n private _copiedDataString = '';\n private _copiedValues = new Map<string, any>();\n private readonly _parent: EditableTableState<T, F>;\n\n constructor(parent: EditableTableState<T, F>) {\n this._parent = parent;\n makeObservable(this, {\n copiedCells: observable,\n isCut: observable,\n hasCopiedCells: computed,\n copy: action,\n cut: action,\n paste: action,\n clear: action,\n });\n }\n\n /**\n * Copy selected cells. Returns serialized TSV string for clipboard.\n */\n copy(): string {\n this.clear();\n return this._storeCells();\n }\n\n /**\n * Cut selected cells. Returns serialized TSV string for clipboard.\n */\n cut(): string {\n this.clear();\n this.isCut = true;\n return this._storeCells();\n }\n\n /**\n * Paste data starting at target position.\n * If the clipboard text matches what we stored at copy time, uses the rich\n * typed values instead of deserializing from TSV (avoids lossy round-trip).\n */\n paste(rawData: string) {\n const { cellValue, cellInteraction } = this._parent;\n const target = cellInteraction.focusedCell;\n if (!target) {\n return;\n }\n const targetPos = this._parent._toIndices(target);\n if (!targetPos) {\n return;\n }\n\n const isInternal =\n this._copiedDataString !== '' && this._copiedDataString === rawData;\n\n const pastedKeys = this._pasteGrid(\n rawData,\n targetPos,\n isInternal,\n cellValue,\n );\n\n if (this.isCut && isInternal) {\n this._clearCutSources(pastedKeys, cellValue);\n }\n\n this.clear();\n }\n\n private _pasteGrid(\n rawData: string,\n targetPos: { row: number; col: number },\n useRichValues: boolean,\n cellValue: EditableTableState<T, F>['cellValue'],\n ): Set<string> {\n const pastedKeys = new Set<string>();\n const richChanges: { rowKey: string; columnId: string; value: any }[] = [];\n const rawChanges: { rowKey: string; columnId: string; rawValue: string }[] =\n [];\n const rows = rawData.split(/\\r?\\n/).filter((r) => r.length > 0);\n\n for (let r = 0; r < rows.length; r++) {\n const cols = rows[r].split('\\t');\n for (let c = 0; c < cols.length; c++) {\n const dest = this._parent._toPosition(\n targetPos.row + r,\n targetPos.col + c,\n );\n if (!dest) {\n continue;\n }\n\n const richValue = useRichValues\n ? this._copiedValues.get(`${r}:${c}`)\n : undefined;\n\n if (richValue !== undefined) {\n richChanges.push({\n rowKey: dest.rowKey,\n columnId: dest.columnId,\n value: richValue,\n });\n } else {\n rawChanges.push({\n rowKey: dest.rowKey,\n columnId: dest.columnId,\n rawValue: cols[c],\n });\n }\n\n pastedKeys.add(cellKey(dest.rowKey, dest.columnId));\n }\n }\n\n if (richChanges.length > 0) {\n cellValue.applyBulkValues(richChanges);\n }\n if (rawChanges.length > 0) {\n cellValue.applyBulkRawValues(rawChanges);\n }\n\n return pastedKeys;\n }\n\n private _clearCutSources(\n pastedKeys: Set<string>,\n cellValue: EditableTableState<T, F>['cellValue'],\n ) {\n const rawChanges: {\n rowKey: string;\n columnId: string;\n rawValue: string;\n }[] = [];\n for (const key of this.copiedCells) {\n if (pastedKeys.has(key)) {\n continue;\n }\n const pos = parseCellKey(key);\n if (pos) {\n rawChanges.push({\n rowKey: pos.rowKey,\n columnId: pos.columnId,\n rawValue: '',\n });\n }\n }\n\n cellValue.applyBulkRawValues(rawChanges);\n }\n\n clear() {\n this.copiedCells.clear();\n this.isCut = false;\n this._copiedDataString = '';\n this._copiedValues.clear();\n }\n\n isCellCopied(rowKey: string, columnId: string): boolean {\n return this.copiedCells.has(cellKey(rowKey, columnId));\n }\n\n getCopiedBorder(rowKey: string, columnId: string): CellBorder {\n if (!this.isCellCopied(rowKey, columnId)) {\n return noBorder;\n }\n\n const pos = this._parent._toIndices({ rowKey, columnId });\n if (!pos) {\n return noBorder;\n }\n\n const isNeighborCopied = (row: number, col: number) => {\n const neighbor = this._parent._toPosition(row, col);\n return (\n neighbor !== null &&\n this.copiedCells.has(cellKey(neighbor.rowKey, neighbor.columnId))\n );\n };\n\n return {\n top: !isNeighborCopied(pos.row - 1, pos.col),\n bottom: !isNeighborCopied(pos.row + 1, pos.col),\n left: !isNeighborCopied(pos.row, pos.col - 1),\n right: !isNeighborCopied(pos.row, pos.col + 1),\n };\n }\n\n get hasCopiedCells(): boolean {\n return this.copiedCells.size > 0;\n }\n\n private _storeCells(): string {\n const cells = this._parent.cellInteraction.selectedCellsList;\n if (cells.length === 0) {\n return '';\n }\n\n const { cellValue } = this._parent;\n\n for (const cell of cells) {\n this.copiedCells.add(cellKey(cell.rowKey, cell.columnId));\n }\n\n const indices = cells\n .map((c) => this._parent._toIndices(c))\n .filter((idx): idx is { row: number; col: number } => idx !== null);\n\n if (indices.length === 0) {\n return '';\n }\n\n const minRow = Math.min(...indices.map((i) => i.row));\n const maxRow = Math.max(...indices.map((i) => i.row));\n const minCol = Math.min(...indices.map((i) => i.col));\n const maxCol = Math.max(...indices.map((i) => i.col));\n\n const data: string[][] = [];\n for (let r = minRow; r <= maxRow; r++) {\n const row: string[] = [];\n for (let c = minCol; c <= maxCol; c++) {\n const pos = this._parent._toPosition(r, c);\n if (pos && this.copiedCells.has(cellKey(pos.rowKey, pos.columnId))) {\n const serialized = cellValue.serializeCellValue(\n pos.rowKey,\n pos.columnId,\n );\n row.push(serialized);\n this._copiedValues.set(\n `${r - minRow}:${c - minCol}`,\n cellValue.getCellDisplayValue(pos.rowKey, pos.columnId),\n );\n } else {\n row.push('');\n }\n }\n data.push(row);\n }\n\n const tsv = data.map((row) => row.join('\\t')).join('\\n');\n this._copiedDataString = tsv;\n return tsv;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA,IAAAC,MAAA,GAAAD,OAAA;AAEO,MAAME,cAAc,CAA0B;EAOnDC,WAAWA,CAACC,MAAgC,EAAE;IAAA,IAAAC,gBAAA,CAAAC,OAAA,uBANhC,IAAIC,GAAG,CAAS,CAAC;IAAA,IAAAF,gBAAA,CAAAC,OAAA,iBACvB,KAAK;IAAA,IAAAD,gBAAA,CAAAC,OAAA,6BACe,EAAE;IAAA,IAAAD,gBAAA,CAAAC,OAAA,yBACN,IAAIE,GAAG,CAAc,CAAC;IAAA,IAAAH,gBAAA,CAAAC,OAAA;IAI5C,IAAI,CAACG,OAAO,GAAGL,MAAM;IACrB,IAAAM,oBAAc,EAAC,IAAI,EAAE;MACnBC,WAAW,EAAEC,gBAAU;MACvBC,KAAK,EAAED,gBAAU;MACjBE,cAAc,EAAEC,cAAQ;MACxBC,IAAI,EAAEC,YAAM;MACZC,GAAG,EAAED,YAAM;MACXE,KAAK,EAAEF,YAAM;MACbG,KAAK,EAAEH;IACT,CAAC,C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,CAACtD,OAAO,CAACoC,WAAW,CAACL,CAAC,EAAEG,CAAC,CAAC;QAC1C,IAAIoB,GAAG,IAAI,IAAI,CAACpD,WAAW,CAACmD,GAAG,CAAC,IAAAJ,cAAO,EAACK,GAAG,CAACV,MAAM,EAAEU,GAAG,CAACT,QAAQ,CAAC,CAAC,EAAE;UAClE,MAAMoC,UAAU,GAAGnE,SAAS,CAACoE,kBAAkB,CAC7C5B,GAAG,CAACV,MAAM,EACVU,GAAG,CAACT,QACN,CAAC;UACDR,GAAG,CAACM,IAAI,CAACsC,UAAU,CAAC;UACpB,IAAI,CAACzC,aAAa,CAAC2C,GAAG,CACpB,GAAGpD,CAAC,GAAGyC,MAAM,IAAItC,CAAC,GAAG4C,MAAM,EAAE,EAC7BhE,SAAS,CAACsE,mBAAmB,CAAC9B,GAAG,CAACV,MAAM,EAAEU,GAAG,CAACT,QAAQ,CACxD,CAAC;QACH,CAAC,MAAM;UACLR,GAAG,CAACM,IAAI,CAAC,EAAE,CAAC;QACd;MACF;MACAqC,IAAI,CAACrC,IAAI,CAACN,GAAG,CAAC;IAChB;IAEA,MAAMgD,GAAG,GAAGL,IAAI,CAACV,GAAG,CAAEjC,GAAG,IAAKA,GAAG,CAACiD,IAAI,CAAC,IAAI,CAAC,CAAC,CAACA,IAAI,CAAC,IAAI,CAAC;IACxD,IAAI,CAACjE,iBAAiB,GAAGgE,GAAG;IAC5B,OAAOA,GAAG;EACZ;AACF;AAACE,OAAA,CAAA9F,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["_mobx","require","_utils","ClipboardState","constructor","parent","_defineProperty2","default","Set","Map","_parent","makeObservable","copiedCells","observable","isCut","hasCopiedCells","computed","copy","action","cut","paste","clear","_storeCells","rawData","cellValue","cellInteraction","target","focusedCell","targetPos","_toIndices","isInternal","_copiedDataString","undefined","pastedKeys","_pasteGrid","_clearCutSources","useRichValues","richChanges","rawChanges","rows","split","filter","row","length","r","cols","c","dest","_toPosition","col","copiedValueKey","_copiedValues","has","push","rowKey","columnId","value","get","rawValue","add","cellKey","applyBulkValues","applyBulkRawValues","cells","key","pos","parseCellKey","clearCells","isCellCopied","getCopiedBorder","noBorder","isNeighborCopied","neighbor","top","bottom","left","right","size","selectedCellsList","cell","indices","map","idx","minRow","Math","min","i","maxRow","max","minCol","maxCol","data","serialized","serializeCellValue","set","getCellDisplayValue","tsv","join","exports"],"sources":["../../../../src/state/EditableTable/ClipboardState.ts"],"sourcesContent":["import { action, computed, makeObservable, observable } from 'mobx';\nimport type { Cell, CellBorder } from './types';\nimport type { FiltersMap } from '@wix/bex-core';\nimport type { EditableTableState } from './EditableTableState';\nimport { cellKey, parseCellKey, noBorder } from './utils';\n\nexport class ClipboardState<T, F extends FiltersMap> {\n copiedCells = new Set<string>();\n isCut = false;\n private _copiedDataString?: string;\n private _copiedValues = new Map<string, any>();\n private readonly _parent: EditableTableState<T, F>;\n\n constructor(parent: EditableTableState<T, F>) {\n this._parent = parent;\n makeObservable(this, {\n copiedCells: observable,\n isCut: observable,\n hasCopiedCells: computed,\n copy: action,\n cut: action,\n paste: action,\n clear: action,\n });\n }\n\n /**\n * Copy selected cells. Returns serialized TSV string for clipboard.\n */\n copy(): string {\n this.clear();\n return this._storeCells();\n }\n\n /**\n * Cut selected cells. Returns serialized TSV string for clipboard.\n */\n cut(): string {\n this.clear();\n this.isCut = true;\n return this._storeCells();\n }\n\n /**\n * Paste data starting at target position.\n * If the clipboard text matches what we stored at copy time, uses the rich\n * typed values instead of deserializing from TSV (avoids lossy round-trip).\n */\n paste(rawData: string) {\n const { cellValue, cellInteraction } = this._parent;\n const target = cellInteraction.focusedCell;\n if (!target) {\n return;\n }\n const targetPos = this._parent._toIndices(target);\n if (!targetPos) {\n return;\n }\n\n const isInternal =\n this._copiedDataString !== undefined &&\n this._copiedDataString === rawData;\n\n const pastedKeys = this._pasteGrid(\n rawData,\n targetPos,\n isInternal,\n cellValue,\n );\n\n if (this.isCut && isInternal) {\n this._clearCutSources(pastedKeys, cellValue);\n }\n\n this.clear();\n }\n\n private _pasteGrid(\n rawData: string,\n targetPos: { row: number; col: number },\n useRichValues: boolean,\n cellValue: EditableTableState<T, F>['cellValue'],\n ): Set<string> {\n const pastedKeys = new Set<string>();\n const richChanges: { rowKey: string; columnId: string; value: any }[] = [];\n const rawChanges: { rowKey: string; columnId: string; rawValue: string }[] =\n [];\n const rows = rawData\n .split(/\\r?\\n/)\n .filter((row) => useRichValues || row.length > 0);\n\n for (let r = 0; r < rows.length; r++) {\n const cols = rows[r].split('\\t');\n for (let c = 0; c < cols.length; c++) {\n const dest = this._parent._toPosition(\n targetPos.row + r,\n targetPos.col + c,\n );\n if (!dest) {\n continue;\n }\n\n const copiedValueKey = `${r}:${c}`;\n\n if (useRichValues && this._copiedValues.has(copiedValueKey)) {\n richChanges.push({\n rowKey: dest.rowKey,\n columnId: dest.columnId,\n value: this._copiedValues.get(copiedValueKey),\n });\n } else {\n rawChanges.push({\n rowKey: dest.rowKey,\n columnId: dest.columnId,\n rawValue: cols[c],\n });\n }\n\n pastedKeys.add(cellKey(dest.rowKey, dest.columnId));\n }\n }\n\n if (richChanges.length > 0) {\n cellValue.applyBulkValues(richChanges);\n }\n if (rawChanges.length > 0) {\n cellValue.applyBulkRawValues(rawChanges);\n }\n\n return pastedKeys;\n }\n\n private _clearCutSources(\n pastedKeys: Set<string>,\n cellValue: EditableTableState<T, F>['cellValue'],\n ) {\n const cells: Cell[] = [];\n for (const key of this.copiedCells) {\n if (pastedKeys.has(key)) {\n continue;\n }\n const pos = parseCellKey(key);\n if (pos) {\n cells.push(pos);\n }\n }\n\n cellValue.clearCells(cells);\n }\n\n clear() {\n this.copiedCells.clear();\n this.isCut = false;\n this._copiedDataString = undefined;\n this._copiedValues.clear();\n }\n\n isCellCopied(rowKey: string, columnId: string): boolean {\n return this.copiedCells.has(cellKey(rowKey, columnId));\n }\n\n getCopiedBorder(rowKey: string, columnId: string): CellBorder {\n if (!this.isCellCopied(rowKey, columnId)) {\n return noBorder;\n }\n\n const pos = this._parent._toIndices({ rowKey, columnId });\n if (!pos) {\n return noBorder;\n }\n\n const isNeighborCopied = (row: number, col: number) => {\n const neighbor = this._parent._toPosition(row, col);\n return (\n neighbor !== null &&\n this.copiedCells.has(cellKey(neighbor.rowKey, neighbor.columnId))\n );\n };\n\n return {\n top: !isNeighborCopied(pos.row - 1, pos.col),\n bottom: !isNeighborCopied(pos.row + 1, pos.col),\n left: !isNeighborCopied(pos.row, pos.col - 1),\n right: !isNeighborCopied(pos.row, pos.col + 1),\n };\n }\n\n get hasCopiedCells(): boolean {\n return this.copiedCells.size > 0;\n }\n\n private _storeCells(): string {\n const cells = this._parent.cellInteraction.selectedCellsList;\n if (cells.length === 0) {\n return '';\n }\n\n const { cellValue } = this._parent;\n\n for (const cell of cells) {\n this.copiedCells.add(cellKey(cell.rowKey, cell.columnId));\n }\n\n const indices = cells\n .map((c) => this._parent._toIndices(c))\n .filter((idx): idx is { row: number; col: number } => idx !== null);\n\n if (indices.length === 0) {\n return '';\n }\n\n const minRow = Math.min(...indices.map((i) => i.row));\n const maxRow = Math.max(...indices.map((i) => i.row));\n const minCol = Math.min(...indices.map((i) => i.col));\n const maxCol = Math.max(...indices.map((i) => i.col));\n\n const data: string[][] = [];\n for (let r = minRow; r <= maxRow; r++) {\n const row: string[] = [];\n for (let c = minCol; c <= maxCol; c++) {\n const pos = this._parent._toPosition(r, c);\n if (pos && this.copiedCells.has(cellKey(pos.rowKey, pos.columnId))) {\n const serialized = cellValue.serializeCellValue(\n pos.rowKey,\n pos.columnId,\n );\n row.push(serialized);\n this._copiedValues.set(\n `${r - minRow}:${c - minCol}`,\n cellValue.getCellDisplayValue(pos.rowKey, pos.columnId),\n );\n } else {\n row.push('');\n }\n }\n data.push(row);\n }\n\n const tsv = data.map((row) => row.join('\\t')).join('\\n');\n this._copiedDataString = tsv;\n return tsv;\n }\n}\n"],"mappings":";;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAIA,I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,GAAG,GAAGL,IAAI,CAACV,GAAG,CAAEvC,GAAG,IAAKA,GAAG,CAACuD,IAAI,CAAC,IAAI,CAAC,CAAC,CAACA,IAAI,CAAC,IAAI,CAAC;IACxD,IAAI,CAAClE,iBAAiB,GAAGiE,GAAG;IAC5B,OAAOA,GAAG;EACZ;AACF;AAACE,OAAA,CAAA/F,cAAA,GAAAA,cAAA","ignoreList":[]}
|
|
@@ -29,6 +29,9 @@ const validResult = exports.validResult = {
|
|
|
29
29
|
valid: true
|
|
30
30
|
};
|
|
31
31
|
function checkValidationRule(rule, value) {
|
|
32
|
+
if (value == null && rule.type !== 'required' && rule.type !== 'custom') {
|
|
33
|
+
return true;
|
|
34
|
+
}
|
|
32
35
|
switch (rule.type) {
|
|
33
36
|
case 'required':
|
|
34
37
|
return value != null && value !== '';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["cellKey","rowKey","columnId","parseCellKey","key","idx","indexOf","slice","noBorder","exports","top","bottom","left","right","validResult","valid","checkValidationRule","rule","value","type","length","test","validate","values","some","option","id","runCellValidation","rules","typeValidate","translate","errors","push","message","typeError"],"sources":["../../../../src/state/EditableTable/utils.ts"],"sourcesContent":["import type { Translate } from '@wix/bex-core';\nimport type {\n Cell,\n CellBorder,\n ValidationResult,\n ValidationRule,\n} from './types';\n\nexport function cellKey(rowKey: string, columnId: string): string {\n return `${rowKey}:${columnId}`;\n}\n\nexport function parseCellKey(key: string): Cell | null {\n const idx = key.indexOf(':');\n if (idx === -1) {\n return null;\n }\n return { rowKey: key.slice(0, idx), columnId: key.slice(idx + 1) };\n}\n\nexport const noBorder: CellBorder = {\n top: false,\n bottom: false,\n left: false,\n right: false,\n};\n\nexport const validResult: ValidationResult = { valid: true };\n\nfunction checkValidationRule(rule: ValidationRule, value: any): boolean {\n switch (rule.type) {\n case 'required':\n return value != null && value !== '';\n case 'min':\n return typeof value === 'number' && value >= rule.value;\n case 'max':\n return typeof value === 'number' && value <= rule.value;\n case 'minLength':\n return typeof value === 'string' && value.length >= rule.value;\n case 'maxLength':\n return typeof value === 'string' && value.length <= rule.value;\n case 'pattern':\n return typeof value === 'string' && rule.value.test(value);\n case 'custom':\n return rule.validate(value);\n case 'specificValues':\n return (\n value == null ||\n value === '' ||\n (typeof value === 'string' &&\n rule.values.some((option) => option.id === value))\n );\n default:\n return true;\n }\n}\n\nexport function runCellValidation(\n value: any,\n rules?: ValidationRule[],\n typeValidate?: (\n value: any,\n rules?: ValidationRule[],\n translate?: Translate,\n ) => string | null,\n translate?: Translate,\n): ValidationResult {\n const errors: string[] = [];\n\n if (rules) {\n for (const rule of rules) {\n if (!checkValidationRule(rule, value)) {\n errors.push(rule.message);\n }\n }\n }\n\n if (typeValidate) {\n const typeError = typeValidate(value, rules, translate);\n if (typeError) {\n errors.push(typeError);\n }\n }\n\n return errors.length === 0 ? validResult : { valid: false, errors };\n}\n"],"mappings":";;;;;;;;AAQO,SAASA,OAAOA,CAACC,MAAc,EAAEC,QAAgB,EAAU;EAChE,OAAO,GAAGD,MAAM,IAAIC,QAAQ,EAAE;AAChC;AAEO,SAASC,YAAYA,CAACC,GAAW,EAAe;EACrD,MAAMC,GAAG,GAAGD,GAAG,CAACE,OAAO,CAAC,GAAG,CAAC;EAC5B,IAAID,GAAG,KAAK,CAAC,CAAC,EAAE;IACd,OAAO,IAAI;EACb;EACA,OAAO;IAAEJ,MAAM,EAAEG,GAAG,CAACG,KAAK,CAAC,CAAC,EAAEF,GAAG,CAAC;IAAEH,QAAQ,EAAEE,GAAG,CAACG,KAAK,CAACF,GAAG,GAAG,CAAC;EAAE,CAAC;AACpE;AAEO,MAAMG,QAAoB,GAAAC,OAAA,CAAAD,QAAA,GAAG;EAClCE,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACT,CAAC;AAEM,MAAMC,WAA6B,GAAAL,OAAA,CAAAK,WAAA,GAAG;EAAEC,KAAK,EAAE;AAAK,CAAC;AAE5D,SAASC,mBAAmBA,CAACC,IAAoB,EAAEC,KAAU,EAAW;EACtE,
|
|
1
|
+
{"version":3,"names":["cellKey","rowKey","columnId","parseCellKey","key","idx","indexOf","slice","noBorder","exports","top","bottom","left","right","validResult","valid","checkValidationRule","rule","value","type","length","test","validate","values","some","option","id","runCellValidation","rules","typeValidate","translate","errors","push","message","typeError"],"sources":["../../../../src/state/EditableTable/utils.ts"],"sourcesContent":["import type { Translate } from '@wix/bex-core';\nimport type {\n Cell,\n CellBorder,\n ValidationResult,\n ValidationRule,\n} from './types';\n\nexport function cellKey(rowKey: string, columnId: string): string {\n return `${rowKey}:${columnId}`;\n}\n\nexport function parseCellKey(key: string): Cell | null {\n const idx = key.indexOf(':');\n if (idx === -1) {\n return null;\n }\n return { rowKey: key.slice(0, idx), columnId: key.slice(idx + 1) };\n}\n\nexport const noBorder: CellBorder = {\n top: false,\n bottom: false,\n left: false,\n right: false,\n};\n\nexport const validResult: ValidationResult = { valid: true };\n\nfunction checkValidationRule(rule: ValidationRule, value: any): boolean {\n if (value == null && rule.type !== 'required' && rule.type !== 'custom') {\n return true;\n }\n\n switch (rule.type) {\n case 'required':\n return value != null && value !== '';\n case 'min':\n return typeof value === 'number' && value >= rule.value;\n case 'max':\n return typeof value === 'number' && value <= rule.value;\n case 'minLength':\n return typeof value === 'string' && value.length >= rule.value;\n case 'maxLength':\n return typeof value === 'string' && value.length <= rule.value;\n case 'pattern':\n return typeof value === 'string' && rule.value.test(value);\n case 'custom':\n return rule.validate(value);\n case 'specificValues':\n return (\n value == null ||\n value === '' ||\n (typeof value === 'string' &&\n rule.values.some((option) => option.id === value))\n );\n default:\n return true;\n }\n}\n\nexport function runCellValidation(\n value: any,\n rules?: ValidationRule[],\n typeValidate?: (\n value: any,\n rules?: ValidationRule[],\n translate?: Translate,\n ) => string | null,\n translate?: Translate,\n): ValidationResult {\n const errors: string[] = [];\n\n if (rules) {\n for (const rule of rules) {\n if (!checkValidationRule(rule, value)) {\n errors.push(rule.message);\n }\n }\n }\n\n if (typeValidate) {\n const typeError = typeValidate(value, rules, translate);\n if (typeError) {\n errors.push(typeError);\n }\n }\n\n return errors.length === 0 ? validResult : { valid: false, errors };\n}\n"],"mappings":";;;;;;;;AAQO,SAASA,OAAOA,CAACC,MAAc,EAAEC,QAAgB,EAAU;EAChE,OAAO,GAAGD,MAAM,IAAIC,QAAQ,EAAE;AAChC;AAEO,SAASC,YAAYA,CAACC,GAAW,EAAe;EACrD,MAAMC,GAAG,GAAGD,GAAG,CAACE,OAAO,CAAC,GAAG,CAAC;EAC5B,IAAID,GAAG,KAAK,CAAC,CAAC,EAAE;IACd,OAAO,IAAI;EACb;EACA,OAAO;IAAEJ,MAAM,EAAEG,GAAG,CAACG,KAAK,CAAC,CAAC,EAAEF,GAAG,CAAC;IAAEH,QAAQ,EAAEE,GAAG,CAACG,KAAK,CAACF,GAAG,GAAG,CAAC;EAAE,CAAC;AACpE;AAEO,MAAMG,QAAoB,GAAAC,OAAA,CAAAD,QAAA,GAAG;EAClCE,GAAG,EAAE,KAAK;EACVC,MAAM,EAAE,KAAK;EACbC,IAAI,EAAE,KAAK;EACXC,KAAK,EAAE;AACT,CAAC;AAEM,MAAMC,WAA6B,GAAAL,OAAA,CAAAK,WAAA,GAAG;EAAEC,KAAK,EAAE;AAAK,CAAC;AAE5D,SAASC,mBAAmBA,CAACC,IAAoB,EAAEC,KAAU,EAAW;EACtE,IAAIA,KAAK,IAAI,IAAI,IAAID,IAAI,CAACE,IAAI,KAAK,UAAU,IAAIF,IAAI,CAACE,IAAI,KAAK,QAAQ,EAAE;IACvE,OAAO,IAAI;EACb;EAEA,QAAQF,IAAI,CAACE,IAAI;IACf,KAAK,UAAU;MACb,OAAOD,KAAK,IAAI,IAAI,IAAIA,KAAK,KAAK,EAAE;IACtC,KAAK,KAAK;MACR,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,IAAID,IAAI,CAACC,KAAK;IACzD,KAAK,KAAK;MACR,O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KAAK,CAAC,GAAGN,WAAW,GAAG;IAAEC,KAAK,EAAE,KAAK;IAAEgB;EAAO,CAAC;AACrE","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_ = "FormPageHeader3777948636";
|
|
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": "FormPageHeader3777948636__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/state/FormPage/FormPageHeader.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/state/FormPage/FormPageHeader.st.css.ts"],"sourcesContent":["// @ts-nocheck\n\n\nimport { classesRuntime, statesRuntime } from \"../../stylable-esm-runtime.js\";\n\n\n\nvar _namespace_ = \"FormPageHeader3777948636\";\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\":\"FormPageHeader3777948636__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":[]}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
.CardContainer3046349765__root.CardContainer3046349765--mobile{border-radius:0}.CmsFieldForm3421283849__fullBleedDivider{margin-top:var(--wds-space-300, 18px);margin-inline:calc(-1*var(--wds-custom-modal-content-padding-horizontal, 24px))}.CmsFieldModal2414173530__modal{--wds-custom-modal-content-padding-vertical:0}.ValidationAndDefaultsSection1354747095__accordionWrapper{margin-inline:calc(-1*var(--wds-custom-modal-content-padding-horizontal, 24px))}.Collapse2746528810__root{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1)}.Collapse2746528810__exit{height:0}.CollectionPage2348823844__root [data-hook=page-header-wrapper]{--wds-space-300:18px}.CollectionPage2348823844__root.CollectionPage2348823844--mobile{--wds-page-header-padding-horizontal:0;--wds-page-header-padding-horizontal-small:0;--wds-color-fill-surface-sunken:#ffffff}.CollectionPage2348823844__root.CollectionPage2348823844--panel{overflow:hidden;position:relative}.CollectionSectionHeader1382747161__summaryIcon{display:flex;color:var(--wds-color-text-standard-secondary)}.CollectionTable886770172__root td{vertical-align:middle}.CollectionTable886770172__root.CollectionTable886770172--mobile td:first-child{padding-left:18px}.CollectionTable886770172__root.CollectionTable886770172--mobile td:last-child{padding-right:18px}.CollectionTableWSRTable4278368432__root.CollectionTableWSRTable4278368432--resizable table{min-width:100%}.CollectionTableWSRTable4278368432__root.CollectionTableWSRTable4278368432--resizable [data-hook=table-resize-handle]{right:-4px!important;z-index:1}.CollectionToolbar1404698966__root.CollectionToolbar1404698966--harmony .CollectionToolbar1404698966__right [data-hook=horizontal-overflow-box]>*{margin-inline-start:0}.CollectionToolbar1404698966__left{min-width:0}.CollectionToolbar1404698966__left.CollectionToolbar1404698966--expandable{flex:auto}.CollectionToolbar1404698966__left.CollectionToolbar1404698966--title>*{width:100%}.CollectionToolbar1404698966__root.CollectionToolbar1404698966---responsiveMode-5-title .CollectionToolbar1404698966__left{flex:1 100;min-width:50px}.CollectionToolbar1404698966__root.CollectionToolbar1404698966---responsiveMode-4-tabs .CollectionToolbar1404698966__left,.CollectionToolbar1404698966__root.CollectionToolbar1404698966---responsiveMode-4-tabs .CollectionToolbar1404698966__left.CollectionToolbar1404698966--expandable{flex:1 100 auto;min-width:140px}.CollectionToolbar1404698966__root.CollectionToolbar1404698966---responsiveMode-4-tabs .CollectionToolbar1404698966__left>*{flex-shrink:1;min-width:0}.CollectionToolbar1404698966__root .CollectionToolbar1404698966__right{justify-content:flex-end!important;flex-grow:1;flex-shrink:1;flex-basis:auto}.CollectionToolbar1404698966__root.CollectionToolbar1404698966--views .CollectionToolbar1404698966__right{min-width:0;flex-grow:1;flex-shrink:0;flex-basis:0}.CollectionToolbar1404698966__root.CollectionToolbar1404698966---responsiveMode-4-tabs .CollectionToolbar1404698966__right,.CollectionToolbar1404698966__root.CollectionToolbar1404698966---responsiveMode-5-title .CollectionToolbar1404698966__right{flex:0 1 auto;min-width:0}.CollectionToolbar1404698966__root .CollectionToolbar1404698966__right.CollectionToolbar1404698966__fullWidth{margin-inline-start:0!important}.CollectionToolbar1404698966__root.CollectionToolbar1404698966--mobile:not(.CollectionToolbar1404698966--harmony){padding-right:18px;padding-left:18px}.SearchOrCustomFilter673030868__search{min-width:140px;max-width:240px;flex:1 0}.SearchOrCustomFilter673030868__searchMobile{justify-content:flex-end;position:absolute;right:18px}.SearchOrCustomFilter673030868__searchMobile:not(.SearchOrCustomFilter673030868--expandable){left:18px}.SearchOrCustomFilter673030868__searchMobile.SearchOrCustomFilter673030868--expandable.SearchOrCustomFilter673030868--expanded{left:18px}.AutoCompleteReadonly3301679173__root.AutoCompleteReadonly3301679173--disableEditing{cursor:pointer}.AutoCompleteReadonly3301679173__root.AutoCompleteReadonly3301679173--disableEditing input{cursor:pointer}.ViewsDropdown1992487734__root{width:200px}.DragHandle3337898535__root{display:flex;align-items:center}.DragHandle3337898535__root:not(.DragHandle3337898535--disabled){cursor:grab;color:#a8caff}.DragHandle3337898535__root.DragHandle3337898535--disabled{color:#acafc4}.DragHandle3337898535__root:focus-visible:not(.DragHandle3337898535--disabled){outline:0;box-shadow:0 0 0 3px #a6d0ff}.DragHandle3337898535__root.DragHandle3337898535--disabled{pointer-events:none}.DragHandle3337898535__root.DragHandle3337898535--dragging:not(.DragHandle3337898535--disabled){cursor:grabbing}td:has(>.EditableCell1363090160__root){position:relative;overflow:visible}tr:has(.EditableCell1363090160__root)>td{padding-top:0!important;padding-bottom:0!important;height:36px}.EditableCell1363090160__root{display:flex;align-items:center;padding:0;position:absolute;top:-1px;left:-1px;right:0;bottom:0;overflow:hidden;box-sizing:border-box;outline:0;cursor:default;user-select:none;background:var(--wds-color-fill-surface-raised, var(--wsr-color-D80, #ffffff));border:var(--wds-border-width-default, 1px) solid var(--wds-color-border-dark-secondary, var(--wsr-color-D60, #dfe5eb))}tr:first-child>td>.EditableCell1363090160__root{top:0}.EditableCell1363090160__root:hover:not(.EditableCell1363090160--rowActive):not(.EditableCell1363090160--rangeSelected){background:var(--wds-color-black-750, #f6f7f9)}.EditableCell1363090160__root.EditableCell1363090160--rowActive:not(.EditableCell1363090160--rangeSelected){background:var(--wds-color-black-750, #f6f7f9);box-shadow:inset 0 22px 18px -18px rgba(0,6,36,.1)}.EditableCell1363090160__root.EditableCell1363090160--rowActive:hover:not(.EditableCell1363090160--focused):not(.EditableCell1363090160--rangeSelected){border-color:var(--wds-input-border-color-hover, var(--wsr-color-B40, #d6e6fe));box-shadow:inset 0 8px 6px -6px rgba(0,6,36,.05)}.EditableCell1363090160__root.EditableCell1363090160--focused:not(.EditableCell1363090160--rangeSelected){border-color:var(--wds-input-border-color-focus, var(--wsr-color-B10, #116dff));box-shadow:inset 0 8px 6px -6px rgba(0,6,36,.05);z-index:2}.EditableCell1363090160__root.EditableCell1363090160--editing{z-index:3;user-select:auto;overflow:visible;background:var(--wds-color-fill-surface-raised, var(--wsr-color-D80, #ffffff))}.EditableCell1363090160__root.EditableCell1363090160--editing:not(.EditableCell1363090160--showEditWhenFocused){bottom:auto;min-height:calc(100% + 1px)}.EditableCell1363090160__root.EditableCell1363090160--focused.EditableCell1363090160--growable{bottom:auto;min-height:calc(100% + 1px);z-index:3}.EditableCell1363090160__root:has([data-inner-focused]){overflow:visible;z-index:3;border-color:var(--wds-input-border-color-focus, var(--wsr-color-B10, #116dff));box-shadow:inset 0 8px 6px -6px rgba(0,6,36,.05)}.EditableCell1363090160__root.EditableCell1363090160--rangeSelected{background:rgba(56,153,236,.08)}.EditableCell1363090160__root.EditableCell1363090160--selectionTop:not(.EditableCell1363090160--editing){border-top:2px solid var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--selectionBottom:not(.EditableCell1363090160--editing){border-bottom:2px solid var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--selectionLeft:not(.EditableCell1363090160--editing){border-left:2px solid var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--selectionRight:not(.EditableCell1363090160--editing){border-right:2px solid var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--invalid,.EditableCell1363090160__root.EditableCell1363090160--invalid.EditableCell1363090160--rowActive:hover:not(.EditableCell1363090160--focused):not(.EditableCell1363090160--rangeSelected),.EditableCell1363090160__root.EditableCell1363090160--invalid.EditableCell1363090160--focused:not(.EditableCell1363090160--rangeSelected),.EditableCell1363090160__root.EditableCell1363090160--invalid:has([data-inner-focused]){border-color:var(--wds-color-red-100, var(--wsr-color-R10, #e62214))}.EditableCell1363090160__root.EditableCell1363090160--copiedTop:not(.EditableCell1363090160--selectionTop){border-top:2px dashed var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--copiedBottom:not(.EditableCell1363090160--selectionBottom){border-bottom:2px dashed var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--copiedLeft:not(.EditableCell1363090160--selectionLeft){border-left:2px dashed var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--copiedRight:not(.EditableCell1363090160--selectionRight){border-right:2px dashed var(--wsr-color-B10)}.EditableCell1363090160__root.EditableCell1363090160--invalid:not(.EditableCell1363090160--focused):not(.EditableCell1363090160--editing){z-index:1}.EditableCell1363090160__errorMessage{position:absolute;top:calc(100% + 4px);left:-1px;z-index:4;box-sizing:border-box;width:max-content;max-width:240px;padding:6px 8px;pointer-events:none;border-radius:var(--wds-popover-border-radius, var(--wds-border-radius-400, 8px));background:var(--wds-popover-fill, var(--wds-color-fill-surface-overlay, var(--wsr-color-D80, #ffffff)));box-shadow:var(--wds-shadow-surface-overlay, 0 0 18px rgba(0, 6, 36, 0.1), 0 6px 6px rgba(0, 6, 36, 0.05))}tr:last-child .EditableCell1363090160__errorMessage{top:auto;bottom:calc(100% + 4px)}.HeaderActionsPopover2463284946__root{opacity:0;transition:opacity .15s}th:hover .HeaderActionsPopover2463284946__root,.HeaderActionsPopover2463284946__root[data-menu-open=true],.HeaderActionsPopover2463284946__root:focus-within{opacity:1}.CellViewLayout3429307342__root{width:100%;height:100%;padding:6px 8px;box-sizing:border-box;display:flex;align-items:center;overflow:clip}.CellViewLayout3429307342__root>*{flex:1;min-width:0}.Edit3214654020__addressInput{width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box;padding-left:8px;padding-right:8px;min-width:0;overflow:hidden}.Edit3214654020__addressInput>div,.Edit3214654020__addressInput>div>div,.Edit3214654020__addressInput>div>div>div{width:100%;min-width:0}.Edit3823584133__jsonInput{width:100%;margin-left:-1px}.Edit2611920993__booleanEdit{display:flex;align-items:center;margin-left:8px}.View304233643__booleanView{display:flex;align-items:center;margin-left:8px;pointer-events:none}.Edit1733728091__root{width:100%;height:100%;display:flex;align-items:center}.Edit891995079__dateInput{width:100%;margin-left:-1px}.Edit2361053890__half{min-width:0;position:relative;display:flex;align-items:center;box-sizing:border-box}.Edit2361053890__dateHalf{flex:60 1 0}.Edit2361053890__timeHalf{flex:40 1 0}.Edit2361053890__divider{width:1px;height:16px;background:var(--wds-color-border-standard, #dfe5eb);flex-shrink:0}.Edit2361053890__passiveText{padding:6px 8px;font-size:14px;line-height:18px;font-family:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;width:100%}.Edit2361053890__placeholderText{color:var(--wds-color-text-placeholder, #868aa5)}.View3496488334__leaf{min-width:0;padding:6px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:18px;font-family:inherit;box-sizing:border-box}.View3496488334__datePart{flex:60 1 0}.View3496488334__timePart{flex:40 1 0}.View3496488334__placeholder{color:var(--wds-color-text-placeholder, #868aa5)}.View3496488334__divider{width:1px;height:16px;background:var(--wds-color-border-standard, #dfe5eb);flex-shrink:0}.Edit4180564029__emailInput{width:100%;margin-left:-1px}.Edit420742396__numberInput{width:100%;margin-right:2px}.Edit420742396__numberInput input{text-align:right;direction:ltr}.View1354555102__textView{width:100%;text-align:right}.Edit1339096967__jsonInput{width:100%;margin-left:-1px}.Edit3206971985__selectInput{width:100%}.Edit1236013885__editWrapper{width:100%}.Edit1236013885__inputArea{background-color:transparent;width:100%}.Edit1236013885__inputArea input,.Edit1236013885__inputArea textarea{font-size:var(--wds-font-size-body-small, var(--wsr-text-font-size-small, 14px))!important;line-height:var(--wds-font-line-height-body-small, var(--wsr-text-line-height-small, 18px))!important}.Edit1236013885__inputArea input{padding:6px 8px!important;outline:0!important;border:0!important;box-sizing:border-box!important}.Edit1236013885__inputArea>div{border:0!important;border-radius:0!important;box-shadow:none!important;background-color:transparent!important;outline:0!important}.Edit1236013885__inputArea>div::after{box-shadow:none!important}.Edit1236013885__inputArea textarea{padding:6px 8px!important;outline:0!important;border:0!important;box-sizing:border-box!important}.Edit1236013885__inputArea:not(.Edit1236013885--isFocused) textarea{resize:none;overflow:hidden}.Edit1236013885__inputArea:not(.Edit1236013885--isFocused) textarea::-webkit-scrollbar{display:none}.Edit3312516677__wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;--wds-input-value-font-size-small:var(--wds-font-size-body-small);--wds-input-value-font-line-height-small:var(
|
|
1
|
+
.CardContainer3835918071__root.CardContainer3835918071--mobile{border-radius:0}.CmsFieldForm2783539848__fullBleedDivider{margin-top:var(--wds-space-300, 18px);margin-inline:calc(-1*var(--wds-custom-modal-content-padding-horizontal, 24px))}.CmsFieldModal3339688929__modal{--wds-custom-modal-content-padding-vertical:0}.ValidationAndDefaultsSection273088678__accordionWrapper{margin-inline:calc(-1*var(--wds-custom-modal-content-padding-horizontal, 24px))}.Collapse2666109171__root{transition-property:height;transition-timing-function:cubic-bezier(.4,0,.2,1)}.Collapse2666109171__exit{height:0}.CollectionPage3980667022__root [data-hook=page-header-wrapper]{--wds-space-300:18px}.CollectionPage3980667022__root.CollectionPage3980667022--mobile{--wds-page-header-padding-horizontal:0;--wds-page-header-padding-horizontal-small:0;--wds-color-fill-surface-sunken:#ffffff}.CollectionPage3980667022__root.CollectionPage3980667022--panel{overflow:hidden;position:relative}.CollectionSectionHeader3075660753__summaryIcon{display:flex;color:var(--wds-color-text-standard-secondary)}.CollectionTable842236443__root td{vertical-align:middle}.CollectionTable842236443__root.CollectionTable842236443--mobile td:first-child{padding-left:18px}.CollectionTable842236443__root.CollectionTable842236443--mobile td:last-child{padding-right:18px}.CollectionTableWSRTable2546952532__root.CollectionTableWSRTable2546952532--resizable table{min-width:100%}.CollectionTableWSRTable2546952532__root.CollectionTableWSRTable2546952532--resizable [data-hook=table-resize-handle]{right:-4px!important;z-index:1}.CollectionToolbar4143698975__root.CollectionToolbar4143698975--harmony .CollectionToolbar4143698975__right [data-hook=horizontal-overflow-box]>*{margin-inline-start:0}.CollectionToolbar4143698975__left{min-width:0}.CollectionToolbar4143698975__left.CollectionToolbar4143698975--expandable{flex:auto}.CollectionToolbar4143698975__left.CollectionToolbar4143698975--title>*{width:100%}.CollectionToolbar4143698975__root.CollectionToolbar4143698975---responsiveMode-5-title .CollectionToolbar4143698975__left{flex:1 100;min-width:50px}.CollectionToolbar4143698975__root.CollectionToolbar4143698975---responsiveMode-4-tabs .CollectionToolbar4143698975__left,.CollectionToolbar4143698975__root.CollectionToolbar4143698975---responsiveMode-4-tabs .CollectionToolbar4143698975__left.CollectionToolbar4143698975--expandable{flex:1 100 auto;min-width:140px}.CollectionToolbar4143698975__root.CollectionToolbar4143698975---responsiveMode-4-tabs .CollectionToolbar4143698975__left>*{flex-shrink:1;min-width:0}.CollectionToolbar4143698975__root .CollectionToolbar4143698975__right{justify-content:flex-end!important;flex-grow:1;flex-shrink:1;flex-basis:auto}.CollectionToolbar4143698975__root.CollectionToolbar4143698975--views .CollectionToolbar4143698975__right{min-width:0;flex-grow:1;flex-shrink:0;flex-basis:0}.CollectionToolbar4143698975__root.CollectionToolbar4143698975---responsiveMode-4-tabs .CollectionToolbar4143698975__right,.CollectionToolbar4143698975__root.CollectionToolbar4143698975---responsiveMode-5-title .CollectionToolbar4143698975__right{flex:0 1 auto;min-width:0}.CollectionToolbar4143698975__root .CollectionToolbar4143698975__right.CollectionToolbar4143698975__fullWidth{margin-inline-start:0!important}.CollectionToolbar4143698975__root.CollectionToolbar4143698975--mobile:not(.CollectionToolbar4143698975--harmony){padding-right:18px;padding-left:18px}.SearchOrCustomFilter4233897407__search{min-width:140px;max-width:240px;flex:1 0}.SearchOrCustomFilter4233897407__searchMobile{justify-content:flex-end;position:absolute;right:18px}.SearchOrCustomFilter4233897407__searchMobile:not(.SearchOrCustomFilter4233897407--expandable){left:18px}.SearchOrCustomFilter4233897407__searchMobile.SearchOrCustomFilter4233897407--expandable.SearchOrCustomFilter4233897407--expanded{left:18px}.AutoCompleteReadonly2918676909__root.AutoCompleteReadonly2918676909--disableEditing{cursor:pointer}.AutoCompleteReadonly2918676909__root.AutoCompleteReadonly2918676909--disableEditing input{cursor:pointer}.ViewsDropdown1450285275__root{width:200px}.DragHandle3340491551__root{display:flex;align-items:center}.DragHandle3340491551__root:not(.DragHandle3340491551--disabled){cursor:grab;color:#a8caff}.DragHandle3340491551__root.DragHandle3340491551--disabled{color:#acafc4}.DragHandle3340491551__root:focus-visible:not(.DragHandle3340491551--disabled){outline:0;box-shadow:0 0 0 3px #a6d0ff}.DragHandle3340491551__root.DragHandle3340491551--disabled{pointer-events:none}.DragHandle3340491551__root.DragHandle3340491551--dragging:not(.DragHandle3340491551--disabled){cursor:grabbing}td:has(>.EditableCell853184343__root){position:relative;overflow:visible}tr:has(.EditableCell853184343__root)>td{padding-top:0!important;padding-bottom:0!important;height:36px}.EditableCell853184343__root{display:flex;align-items:center;padding:0;position:absolute;top:-1px;left:-1px;right:0;bottom:0;overflow:hidden;box-sizing:border-box;outline:0;cursor:default;user-select:none;background:var(--wds-color-fill-surface-raised, var(--wsr-color-D80, #ffffff));border:var(--wds-border-width-default, 1px) solid var(--wds-color-border-dark-secondary, var(--wsr-color-D60, #dfe5eb))}tr:first-child>td>.EditableCell853184343__root{top:0}.EditableCell853184343__root:hover:not(.EditableCell853184343--rowActive):not(.EditableCell853184343--rangeSelected){background:var(--wds-color-black-750, #f6f7f9)}.EditableCell853184343__root.EditableCell853184343--rowActive:not(.EditableCell853184343--rangeSelected){background:var(--wds-color-black-750, #f6f7f9);box-shadow:inset 0 22px 18px -18px rgba(0,6,36,.1)}.EditableCell853184343__root.EditableCell853184343--rowActive:hover:not(.EditableCell853184343--focused):not(.EditableCell853184343--rangeSelected){border-color:var(--wds-input-border-color-hover, var(--wsr-color-B40, #d6e6fe));box-shadow:inset 0 8px 6px -6px rgba(0,6,36,.05)}.EditableCell853184343__root.EditableCell853184343--focused:not(.EditableCell853184343--rangeSelected){border-color:var(--wds-input-border-color-focus, var(--wsr-color-B10, #116dff));box-shadow:inset 0 8px 6px -6px rgba(0,6,36,.05);z-index:2}.EditableCell853184343__root.EditableCell853184343--editing{z-index:3;user-select:auto;overflow:visible;background:var(--wds-color-fill-surface-raised, var(--wsr-color-D80, #ffffff))}.EditableCell853184343__root.EditableCell853184343--editing:not(.EditableCell853184343--showEditWhenFocused){bottom:auto;min-height:calc(100% + 1px)}.EditableCell853184343__root.EditableCell853184343--focused.EditableCell853184343--growable{bottom:auto;min-height:calc(100% + 1px);z-index:3}.EditableCell853184343__root:has([data-inner-focused]){overflow:visible;z-index:3;border-color:var(--wds-input-border-color-focus, var(--wsr-color-B10, #116dff));box-shadow:inset 0 8px 6px -6px rgba(0,6,36,.05)}.EditableCell853184343__root.EditableCell853184343--rangeSelected{background:rgba(56,153,236,.08)}.EditableCell853184343__root.EditableCell853184343--selectionTop:not(.EditableCell853184343--editing){border-top:2px solid var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--selectionBottom:not(.EditableCell853184343--editing){border-bottom:2px solid var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--selectionLeft:not(.EditableCell853184343--editing){border-left:2px solid var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--selectionRight:not(.EditableCell853184343--editing){border-right:2px solid var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--invalid,.EditableCell853184343__root.EditableCell853184343--invalid.EditableCell853184343--rowActive:hover:not(.EditableCell853184343--focused):not(.EditableCell853184343--rangeSelected),.EditableCell853184343__root.EditableCell853184343--invalid.EditableCell853184343--focused:not(.EditableCell853184343--rangeSelected),.EditableCell853184343__root.EditableCell853184343--invalid:has([data-inner-focused]){border-color:var(--wds-color-red-100, var(--wsr-color-R10, #e62214))}.EditableCell853184343__root.EditableCell853184343--copiedTop:not(.EditableCell853184343--selectionTop){border-top:2px dashed var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--copiedBottom:not(.EditableCell853184343--selectionBottom){border-bottom:2px dashed var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--copiedLeft:not(.EditableCell853184343--selectionLeft){border-left:2px dashed var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--copiedRight:not(.EditableCell853184343--selectionRight){border-right:2px dashed var(--wsr-color-B10)}.EditableCell853184343__root.EditableCell853184343--invalid:not(.EditableCell853184343--focused):not(.EditableCell853184343--editing){z-index:1}.EditableCell853184343__errorMessage{position:absolute;top:calc(100% + 4px);left:-1px;z-index:4;box-sizing:border-box;width:max-content;max-width:240px;padding:6px 8px;pointer-events:none;border-radius:var(--wds-popover-border-radius, var(--wds-border-radius-400, 8px));background:var(--wds-popover-fill, var(--wds-color-fill-surface-overlay, var(--wsr-color-D80, #ffffff)));box-shadow:var(--wds-shadow-surface-overlay, 0 0 18px rgba(0, 6, 36, 0.1), 0 6px 6px rgba(0, 6, 36, 0.05))}tr:last-child .EditableCell853184343__errorMessage{top:auto;bottom:calc(100% + 4px)}.HeaderActionsPopover3750238423__root{opacity:0;transition:opacity .15s}th:hover .HeaderActionsPopover3750238423__root,.HeaderActionsPopover3750238423__root[data-menu-open=true],.HeaderActionsPopover3750238423__root:focus-within{opacity:1}.CellViewLayout2743917314__root{width:100%;height:100%;padding:6px 8px;box-sizing:border-box;display:flex;align-items:center;overflow:clip}.CellViewLayout2743917314__root>*{flex:1;min-width:0}.Edit179810824__addressInput{width:100%;height:100%;display:flex;align-items:center;box-sizing:border-box;padding-left:8px;padding-right:8px;min-width:0;overflow:hidden}.Edit179810824__addressInput>div,.Edit179810824__addressInput>div>div,.Edit179810824__addressInput>div>div>div{width:100%;min-width:0}.Edit69223625__jsonInput{width:100%;margin-left:-1px}.Edit3626190483__booleanEdit{display:flex;align-items:center;margin-left:8px}.View1234825910__booleanView{display:flex;align-items:center;margin-left:8px;pointer-events:none}.Edit251814073__root{width:100%;height:100%;display:flex;align-items:center}.Edit71976597__dateInput{width:100%;margin-left:-1px}.Edit2502569259__half{min-width:0;position:relative;display:flex;align-items:center;box-sizing:border-box}.Edit2502569259__dateHalf{flex:60 1 0}.Edit2502569259__timeHalf{flex:40 1 0}.Edit2502569259__divider{width:1px;height:16px;background:var(--wds-color-border-standard, #dfe5eb);flex-shrink:0}.Edit2502569259__passiveText{padding:6px 8px;font-size:14px;line-height:18px;font-family:inherit;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;cursor:pointer;width:100%}.Edit2502569259__placeholderText{color:var(--wds-color-text-placeholder, #868aa5)}.View2592559188__leaf{min-width:0;padding:6px 8px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:14px;line-height:18px;font-family:inherit;box-sizing:border-box}.View2592559188__datePart{flex:60 1 0}.View2592559188__timePart{flex:40 1 0}.View2592559188__placeholder{color:var(--wds-color-text-placeholder, #868aa5)}.View2592559188__divider{width:1px;height:16px;background:var(--wds-color-border-standard, #dfe5eb);flex-shrink:0}.Edit688342946__emailInput{width:100%;margin-left:-1px}.Edit1473858831__numberInput{width:100%;margin-right:2px}.Edit1473858831__numberInput input{text-align:right;direction:ltr}.View1557573447__textView{width:100%;text-align:right}.Edit591042281__jsonInput{width:100%;margin-left:-1px}.Edit2583059106__selectInput{width:100%}.Edit1994557381__editWrapper{width:100%}.Edit1994557381__inputArea{background-color:transparent;width:100%}.Edit1994557381__inputArea input,.Edit1994557381__inputArea textarea{font-size:var(--wds-font-size-body-small, var(--wsr-text-font-size-small, 14px))!important;line-height:var(--wds-font-line-height-body-small, var(--wsr-text-line-height-small, 18px))!important}.Edit1994557381__inputArea input{padding:6px 8px!important;outline:0!important;border:0!important;box-sizing:border-box!important}.Edit1994557381__inputArea>div{border:0!important;border-radius:0!important;box-shadow:none!important;background-color:transparent!important;outline:0!important}.Edit1994557381__inputArea>div::after{box-shadow:none!important}.Edit1994557381__inputArea textarea{padding:6px 8px!important;outline:0!important;border:0!important;box-sizing:border-box!important}.Edit1994557381__inputArea:not(.Edit1994557381--isFocused) textarea{resize:none;overflow:hidden}.Edit1994557381__inputArea:not(.Edit1994557381--isFocused) textarea::-webkit-scrollbar{display:none}.Edit3976434641__wrapper{position:relative;width:100%;height:100%;display:flex;align-items:center;--wds-input-value-font-size-small:var(--wds-font-size-body-small);--wds-input-value-font-line-height-small:var(
|
|
2
2
|
--wds-font-line-height-body-small
|
|
3
|
-
)}.
|
|
3
|
+
)}.Edit3976434641__overlay{position:absolute;inset:2px;pointer-events:none;background:var(--wds-color-background-elevation-base, #fff)}.Edit4029121885__urlInput{width:100%;margin-left:-1px}.View385205916__textView{width:100%;padding:9px 12px;display:flex;align-items:center;justify-content:space-between}.View385205916__urlText{flex:1;min-width:0}.View385205916__suffix{flex-shrink:0;margin-left:10px}.View385205916__textView.View385205916--suffixOnHover:not(:hover) .View385205916__suffix{display:none}.EmptyStateBase3595007617__root{min-height:230px;align-items:center}.EntityPagePlain2909456022__root.EntityPagePlain2909456022--mobile{--wds-page-header-padding-horizontal:0}.Fade532704291__root{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);opacity:1}.Fade532704291__root.Fade532704291--exit{opacity:0}.Heading2024812053__root{visibility:visible}.Heading2024812053__root.Heading2024812053--appearanceH2{font-size:28px!important;line-height:36px!important}.ImportStepUpload3247705764__fileUpload{width:100%}.InputOverflow3729664396__root.InputOverflow3729664396--selected:not(.InputOverflow3729664396--focused) input::placeholder{color:#000624}@keyframes LoadingRow477909419__gradientSwoosh{0%{background-position:50% 50%;background-size:150% 125%}15%{background-position:75% 40%;background-size:130% 115%}30%{background-position:50% 50%;background-size:120% 135%}60%{background-position:30% 50%;background-size:120% 135%}80%{background-position:10% 30%;background-size:130% 155%}to{background-position:40% 45%;background-size:125% 135%}}.LoadingRow477909419__root{background-image:linear-gradient(60deg,rgba(255,255,255,.15)0,rgba(255,255,255,.15) 50%,rgba(95,242,174,.15) 100%),linear-gradient(284.81deg,#fff 67.18%,#91bbff 158.87%),linear-gradient(29deg,rgba(145,187,255,.6)0,#fff 40%,rgba(95,242,174,.6) 100%);height:100%;background-size:150% 125%;background-repeat:no-repeat;animation:LoadingRow477909419__gradientSwoosh 2s ease-out infinite alternate}.MaxHeightText4004829359__root{opacity:1}.MaxHeightText4004829359__root.MaxHeightText4004829359--height24{line-height:24px}.MaxLines2527383402__root{overflow:hidden}.MaxLines2527383402__root.MaxLines2527383402--clamp{-webkit-box-orient:vertical;display:-webkit-box}.MultiBulkActionToolbar2649094695__root{min-width:0}.MultiBulkActionToolbar2649094695__leftGroupWrapper{padding-right:12px;min-width:0;flex-wrap:nowrap;align-items:center}.MultiBulkActionToolbar2649094695__selectedCountItem{min-width:0;flex-shrink:1;white-space:nowrap;overflow:hidden}.MultiBulkActionToolbar2649094695__selectedCountText{display:block;width:100%}.NestedTablePlaceholderStatesRow1438251547__root td{padding:0!important;width:100%}.NestedTableRow774112669__firstLevel td{padding-top:var(--wds-space-300, 18px)!important;padding-bottom:var(--wds-space-300, 18px)!important}.NestedTableRow774112669__root:hover{background-color:var(--wds-table-list-item-fill-hover, var(--wsr-color-B50, #e7f0ff))!important}.NestedTableRow774112669__root.NestedTableRow774112669--expandable{cursor:pointer}.NestedTableRow774112669__placeholder td{padding:0!important;width:100%}.NestedTableRow774112669__root:hover td:first-of-type::before,.NestedTableRow774112669__parentHovered td:first-of-type::before{content:"";position:absolute;top:0;bottom:0;left:0;width:2px;background-color:var(--wds-color-border-standard-primary-active, var(--wsr-color-B10, #116DFF))}.MultipleDragOverlayEffect788284026__root{position:absolute;transform:translate(6px,6px);background-color:var(--wds-color-fill-surface-overlay, var(--wsr-color-D80, #ffffff));box-shadow:var(--wds-shadow-surface-overlay, var(--wsr-shadow20, 0 2px 4px 0 rgba(22, 45, 61, 0.12), 0 0 6px 0 rgba(22, 45, 61, 0.12)))}.NestedTableDragAndDropRow2432249017__root.NestedTableDragAndDropRow2432249017--draggingInto td{background-color:var(--wds-table-list-item-fill-hover, var(--wsr-color-B50, #E7F0FF))!important}.PickerContent2368873188__root{display:flex}.PickerContentAdditionalStep1074001824__titles{display:flex;justify-content:center;flex:1 1 auto;overflow:hidden;flex-direction:column}.PickerContentAdditionalStep1074001824__suffix{display:flex;align-items:center;flex:0 0 auto;overflow:hidden}.PickerTableListItem3679162544__root{box-sizing:border-box}.ScrollableContent513350404__root.ScrollableContent513350404--overflowY{overflow-y:auto}.ScrollableContent513350404__root.ScrollableContent513350404--overflowX{overflow-x:auto}.ScrollableContent513350404__root.ScrollableContent513350404--smooth{scroll-behavior:smooth}.SetupWidget396087111__row{display:flex;flex-direction:column;overflow:clip;--wds-clickable-card-outline-border-color:var(--wds-color-border-dark-secondary, var(--wsr-color-D60, #DFE5EB))}.SetupWidget396087111__row.SetupWidget396087111--focused{--wds-clickable-card-outline-border-color:var(--wds-color-border-standard-primary-active, var(--wsr-color-B10, #116DFF))}.SetupWidget396087111__row.SetupWidget396087111--focused.SetupWidget396087111--withBackground{--wds-color-fill-surface-default:var(--wds-color-fill-standard-tertiary-hover, var(--wsr-color-B60, #F4F7FF))}.SetupWidget396087111__completedCta,.SetupWidget396087111__secondaryCta{opacity:0;transition:opacity .25s ease-in-out}@media (hover:hover){.SetupWidget396087111__row:hover .SetupWidget396087111__completedCta,.SetupWidget396087111__row:hover .SetupWidget396087111__secondaryCta{opacity:1}}.SetupWidget396087111__row:focus-within .SetupWidget396087111__completedCta,.SetupWidget396087111__row:focus-within .SetupWidget396087111__secondaryCta,.SetupWidget396087111__secondaryCta:focus-within{opacity:1}.SetupWidget396087111__card{display:block;width:100%;border:0;border-radius:var(--wds-border-radius-400, 8px);background-color:var(--wds-color-fill-standard-tertiary, var(--wsr-color-D80, #FFFFFF));box-shadow:0 0 6px 0 rgba(0,6,36,.1),0 2px 4px 0 rgba(0,6,36,.05);overflow:clip;box-sizing:border-box;text-align:start;font:inherit;color:inherit;padding:0;margin:0}.SetupWidget396087111__card.SetupWidget396087111--primary{background-color:var(--wds-color-fill-standard-tertiary-hover, var(--wsr-color-B60, #F4F7FF))}.SetupWidget396087111__card.SetupWidget396087111--clickable{cursor:pointer}.SetupWidget396087111__stepIcon{display:flex;align-items:center;flex-shrink:0;height:24px}.SetupWidget396087111__chevron{display:flex;flex-shrink:0;color:var(--wds-color-text-standard-primary, var(--wsr-color-D10, #000624))}.SetupWidget396087111__chevronDisabled{display:flex;flex-shrink:0;color:var(--wds-color-text-disabled, var(--wsr-color-D10-30, rgba(0, 6, 36, 0.30)))}.SetupWidget396087111__inProgressLabel{--wds-color-text-standard-primary:var(--wds-color-text-urgent, var(--wsr-color-O10, #FE620F));text-transform:uppercase}.SkeletonCard577227391__headerLoading{display:block!important}.SlidingModal235468513__root{transition:transform .4s ease 0s;position:fixed;z-index:1}.SlidingModal235468513__root.SlidingModal235468513--overlay{transition:transform 0s ease 0s}.SlidingModal235468513__root.SlidingModal235468513---appendTo-6-parent{position:absolute}.SlidingModal235468513__root.SlidingModal235468513--inset{border-radius:var(--wds-side-panel-standard-corner-radius, 0);will-change:transform}.SlidingModal235468513__root:not(.SlidingModal235468513--exited){box-shadow:0 3px 24px 0 rgba(22,45,61,.18),0 8px 8px 0 rgba(22,45,61,.12)}.AddFieldColumnHeader2927909795__root{display:inline-flex;align-items:center;width:100%;min-width:0}.AddFieldColumnHeader2927909795__title{display:flex;width:100%;min-width:0}.AddFieldColumnHeader2927909795__hoverBridge{display:inline-block;padding:4px 13px 4px 4px;background:0 0}[data-content-element^=popover-content-add-field-popover-][data-hook=popover-content][class]{background:0 0;border:0;box-shadow:none;border-radius:0;padding:0}.TabsFilter3309937656__root .TabsFilter3309937656__titleBox *{color:inherit!important}.ManageTagsModal2960572131__root{display:flex}.ManageTagsModal2960572131__root.ManageTagsModal2960572131--harmony .wds_1_301_0_TableListItem__root{padding-inline-end:16px}.ManageTagsModal2960572131__root.ManageTagsModal2960572131--harmony .wds_1_301_0_TableListItem__optionsContainer{align-items:start}.ToolbarItem2994816163__root{min-width:0}.ToolbarItemBox2577102231__root{min-width:0}.ToolbarItemBox2577102231__root.ToolbarItemBox2577102231--removeStartPadding{margin-left:-24px}.ToolbarItemBox2577102231__root.ToolbarItemBox2577102231--expandable{flex:1 0}.common589529049__column{display:flex;flex-direction:column}.common589529049__fullHeight{height:100%;min-height:0}.CollectionPageHeader433397772__root:not(.CollectionPageHeader433397772--mobile){gap:12px}.CollectionPageHeader433397772__root.CollectionPageHeader433397772--mobile{flex-direction:column;padding-right:18px;padding-left:18px}.CollectionPageHeader433397772__root.CollectionPageHeader433397772--mobile>*{margin-left:0;margin-top:6px!important;height:auto}.FormPageHeader3777948636__root.FormPageHeader3777948636--mobile{flex-direction:column;padding-right:18px;padding-left:18px}.FormPageHeader3777948636__root.FormPageHeader3777948636--mobile>*{margin-left:0;margin-top:6px!important;height:auto}
|
package/dist/cjs/version.js
CHANGED
package/dist/cjs/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["version","exports"],"sources":["../../src/version.ts"],"sourcesContent":["export const version = 'patterns@1.
|
|
1
|
+
{"version":3,"names":["version","exports"],"sources":["../../src/version.ts"],"sourcesContent":["export const version = 'patterns@1.461.0';\n"],"mappings":";;;;AAAO,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG,kBAAkB","ignoreList":[]}
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
|------|------|----------|---------|-------------|
|
|
15
15
|
| `closeSidePanel` | `() => void` | Yes | - | Closes WixPatterns side panel |
|
|
16
16
|
| `openFiltersPanel` | `() => void` | Yes | - | Opens the filters side panel |
|
|
17
|
-
| `openCustomFieldModal` | `(opts?: Pick<OpenFieldModalOptions, "customOrigin" \| "initialField" \| "lockedProperties"> \| undefined) => void` | Yes | - | Opens the custom field modal on create mode. `initialField` prefills the type and/or
|
|
17
|
+
| `openCustomFieldModal` | `(opts?: Pick<OpenFieldModalOptions, "customOrigin" \| "initialField" \| "lockedProperties"> \| undefined) => void` | Yes | - | Opens the custom field modal on create mode. `initialField` prefills the type, name, and/or required rule; `lockedProperties` makes any of those non-editable (a `required` lock is dropped if the picked type's settings section can't apply the prefill). |
|
|
18
18
|
| `getPendingFilter` | `<A>(filter: A) => Filter<any> \| A` | Yes | - | Use this function when using [AddApplyFiltersButton](./?path=/story/features-filter-components--toolbarfilters#Apply_changes) to obtain a reference to the filter that is about to be applied. This is useful when you want to modify the filter value within a custom filter component. |
|
|
19
19
|
|