@wix/patterns 1.350.0 → 1.352.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/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/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/CustomFieldFilters/OperatorFilterCustomFieldFilter.js +23 -0
- package/dist/cjs/components/CustomFieldFilters/OperatorFilterCustomFieldFilter.js.map +1 -0
- package/dist/cjs/components/CustomFieldFilters/buildCustomFieldFilterElement.js +6 -31
- package/dist/cjs/components/CustomFieldFilters/buildCustomFieldFilterElement.js.map +1 -1
- package/dist/cjs/components/DataExtension/CollectionDataExtensionState.js +7 -15
- package/dist/cjs/components/DataExtension/CollectionDataExtensionState.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/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/InputOverflow/InputOverflow.st.css.js +2 -2
- package/dist/cjs/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
- package/dist/cjs/components/Kanban/Card.js +29 -17
- package/dist/cjs/components/Kanban/Card.js.map +1 -1
- package/dist/cjs/components/Kanban/Kanban.uni.driver.js +3 -0
- package/dist/cjs/components/Kanban/Kanban.uni.driver.js.map +1 -1
- package/dist/cjs/components/Kanban/KanbanCardTags.js +77 -0
- package/dist/cjs/components/Kanban/KanbanCardTags.js.map +1 -0
- 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/OperatorFilterPicker/OperatorFilterPicker.js +18 -11
- package/dist/cjs/components/OperatorFilterPicker/OperatorFilterPicker.js.map +1 -1
- package/dist/cjs/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.js +30 -0
- package/dist/cjs/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.js.map +1 -0
- package/dist/cjs/components/PickerContent/PickerContent.st.css.js +2 -2
- package/dist/cjs/components/PickerContent/PickerContent.st.css.js.map +1 -1
- package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js +4 -4
- package/dist/cjs/components/PickerContent/PickerContentAdditionalStep.st.css.js.map +1 -1
- package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js +2 -2
- package/dist/cjs/components/PickerTableListItem/PickerTableListItem.st.css.js.map +1 -1
- package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js +2 -2
- package/dist/cjs/components/ScrollableContent/ScrollableContent.st.css.js.map +1 -1
- package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js +3 -3
- package/dist/cjs/components/SkeletonCard/SkeletonCard.st.css.js.map +1 -1
- package/dist/cjs/components/SlidingModal/SlidingModal.st.css.js +2 -2
- package/dist/cjs/components/SlidingModal/SlidingModal.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/hooks/useOperatorFilterState.js +5 -17
- package/dist/cjs/hooks/useOperatorFilterState.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/FormPage/FormPageHeader.st.css.js +2 -2
- package/dist/cjs/state/FormPage/FormPageHeader.st.css.js.map +1 -1
- package/dist/cjs/state/KanbanState/KanbanState.js +32 -0
- package/dist/cjs/state/KanbanState/KanbanState.js.map +1 -1
- package/dist/cjs/state/ToolbarCollectionState.js +9 -2
- package/dist/cjs/state/ToolbarCollectionState.js.map +1 -1
- package/dist/cjs/styles.global.css +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/cjs/version.js.map +1 -1
- package/dist/esm/components/CardContainer/CardContainer.st.css.js +2 -2
- package/dist/esm/components/CardContainer/CardContainer.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/CollectionPageNew/CollectionPage.st.css.js.map +1 -1
- 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/CollectionToolbar/CollectionToolbar.st.css.js +2 -2
- package/dist/esm/components/CollectionToolbar/CollectionToolbar.st.css.js.map +1 -1
- package/dist/esm/components/CollectionToolbar/SearchOrCustomFilter.st.css.js +2 -2
- package/dist/esm/components/CollectionViewsDropdown/AutoCompleteReadonly.st.css.js +2 -2
- package/dist/esm/components/CollectionViewsDropdown/ViewsDropdown.st.css.js +2 -2
- package/dist/esm/components/CustomFieldFilters/OperatorFilterCustomFieldFilter.js +9 -0
- package/dist/esm/components/CustomFieldFilters/OperatorFilterCustomFieldFilter.js.map +1 -0
- package/dist/esm/components/CustomFieldFilters/buildCustomFieldFilterElement.js +4 -5
- package/dist/esm/components/CustomFieldFilters/buildCustomFieldFilterElement.js.map +1 -1
- package/dist/esm/components/DataExtension/CollectionDataExtensionState.js +8 -5
- package/dist/esm/components/DataExtension/CollectionDataExtensionState.js.map +1 -1
- package/dist/esm/components/DragHandle/DragHandle.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/Heading/Heading.st.css.js +2 -2
- package/dist/esm/components/Heading/Heading.st.css.js.map +1 -1
- package/dist/esm/components/InputOverflow/InputOverflow.st.css.js +2 -2
- package/dist/esm/components/InputOverflow/InputOverflow.st.css.js.map +1 -1
- package/dist/esm/components/Kanban/Card.js +4 -2
- package/dist/esm/components/Kanban/Card.js.map +1 -1
- package/dist/esm/components/Kanban/Kanban.uni.driver.js +4 -1
- package/dist/esm/components/Kanban/Kanban.uni.driver.js.map +1 -1
- package/dist/esm/components/Kanban/KanbanCardTags.js +30 -0
- package/dist/esm/components/Kanban/KanbanCardTags.js.map +1 -0
- 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/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/NestedTablePlaceholderStatesRow.st.css.js.map +1 -1
- package/dist/esm/components/NestedTable/NestedTableRow.st.css.js +2 -2
- package/dist/esm/components/NestedTableDragAndDrop/MultipleDragOverlayEffect.st.css.js +2 -2
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.js +2 -2
- package/dist/esm/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.js.map +1 -1
- package/dist/esm/components/OperatorFilterPicker/OperatorFilterPicker.js +17 -7
- package/dist/esm/components/OperatorFilterPicker/OperatorFilterPicker.js.map +1 -1
- package/dist/esm/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.js +16 -0
- package/dist/esm/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.js.map +1 -0
- 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/SkeletonCard/SkeletonCard.st.css.js +2 -2
- package/dist/esm/components/SlidingModal/SlidingModal.st.css.js +2 -2
- package/dist/esm/components/TabsFilter/TabsFilter.st.css.js +2 -2
- package/dist/esm/components/TabsFilter/TabsFilter.st.css.js.map +1 -1
- 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/hooks/useOperatorFilterState.js +2 -11
- package/dist/esm/hooks/useOperatorFilterState.js.map +1 -1
- package/dist/esm/state/CollectionPage/CollectionPageHeader.st.css.js +2 -2
- package/dist/esm/state/FormPage/FormPageHeader.st.css.js +2 -2
- package/dist/esm/state/KanbanState/KanbanState.js +30 -0
- package/dist/esm/state/KanbanState/KanbanState.js.map +1 -1
- package/dist/esm/state/ToolbarCollectionState.js +5 -2
- package/dist/esm/state/ToolbarCollectionState.js.map +1 -1
- package/dist/esm/styles.global.css +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/components/CardContainer/CardContainer.st.css.d.ts.map +1 -1
- package/dist/types/components/CollectionPageNew/CollectionPage.st.css.d.ts.map +1 -1
- package/dist/types/components/CollectionToolbar/CollectionToolbar.st.css.d.ts.map +1 -1
- package/dist/types/components/CustomFieldFilters/OperatorFilterCustomFieldFilter.d.ts +21 -0
- package/dist/types/components/CustomFieldFilters/OperatorFilterCustomFieldFilter.d.ts.map +1 -0
- package/dist/types/components/CustomFieldFilters/buildCustomFieldFilterElement.d.ts.map +1 -1
- package/dist/types/components/DataExtension/CollectionDataExtensionState.d.ts.map +1 -1
- package/dist/types/components/Heading/Heading.st.css.d.ts.map +1 -1
- package/dist/types/components/InputOverflow/InputOverflow.st.css.d.ts.map +1 -1
- package/dist/types/components/Kanban/Card.d.ts +1 -1
- package/dist/types/components/Kanban/Card.d.ts.map +1 -1
- package/dist/types/components/Kanban/Kanban.uni.driver.d.ts +3 -0
- package/dist/types/components/Kanban/Kanban.uni.driver.d.ts.map +1 -1
- package/dist/types/components/Kanban/KanbanCardTags.d.ts +19 -0
- package/dist/types/components/Kanban/KanbanCardTags.d.ts.map +1 -0
- package/dist/types/components/LoadingRow/LoadingRow.st.css.d.ts.map +1 -1
- package/dist/types/components/NestedTable/NestedTablePlaceholderStatesRow.st.css.d.ts.map +1 -1
- package/dist/types/components/NestedTableDragAndDrop/NestedTableDragAndDropRow.st.css.d.ts.map +1 -1
- package/dist/types/components/OperatorFilterPicker/OperatorFilterPicker.d.ts +12 -7
- package/dist/types/components/OperatorFilterPicker/OperatorFilterPicker.d.ts.map +1 -1
- package/dist/types/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.d.ts +14 -0
- package/dist/types/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.d.ts.map +1 -0
- package/dist/types/components/TabsFilter/TabsFilter.st.css.d.ts.map +1 -1
- package/dist/types/hooks/useOperatorFilterState.d.ts +1 -3
- package/dist/types/hooks/useOperatorFilterState.d.ts.map +1 -1
- package/dist/types/state/KanbanState/KanbanState.d.ts +1 -0
- package/dist/types/state/KanbanState/KanbanState.d.ts.map +1 -1
- package/dist/types/state/ToolbarCollectionState.d.ts.map +1 -1
- package/dist/types/testkit/jsdom.d.ts +3 -0
- package/dist/types/testkit/jsdom.d.ts.map +1 -1
- package/dist/types/testkit/puppeteer.d.ts +3 -0
- package/dist/types/testkit/puppeteer.d.ts.map +1 -1
- package/dist/types/version.d.ts +1 -1
- package/package.json +3 -3
- package/src/components/CardContainer/CardContainer.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/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/CustomFieldFilters/OperatorFilterCustomFieldFilter.tsx +17 -0
- package/src/components/CustomFieldFilters/buildCustomFieldFilterElement.tsx +5 -25
- package/src/components/DataExtension/CollectionDataExtensionState.ts +9 -4
- package/src/components/DragHandle/DragHandle.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/InputOverflow/InputOverflow.st.css.ts +2 -2
- package/src/components/Kanban/Card.tsx +9 -1
- package/src/components/Kanban/Kanban.uni.driver.ts +19 -0
- package/src/components/Kanban/KanbanCardTags.tsx +94 -0
- 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/OperatorFilterPicker/OperatorFilterPicker.tsx +35 -14
- package/src/components/OperatorFilterPicker/renderOperatorFilterToolbarTag.ts +31 -0
- 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/SkeletonCard/SkeletonCard.st.css.ts +2 -2
- package/src/components/SlidingModal/SlidingModal.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/hooks/useOperatorFilterState.ts +5 -17
- package/src/state/CollectionPage/CollectionPageHeader.st.css.ts +2 -2
- package/src/state/FormPage/FormPageHeader.st.css.ts +2 -2
- package/src/state/KanbanState/KanbanState.ts +38 -0
- package/src/state/ToolbarCollectionState.ts +7 -2
- package/src/styles.global.css +1 -1
- package/src/version.ts +1 -1
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
CustomField,
|
|
3
|
-
CustomFieldType,
|
|
4
|
-
FiltersMap,
|
|
5
|
-
STRING_OPERATORS,
|
|
6
|
-
} from '@wix/bex-core';
|
|
1
|
+
import { CustomField, CustomFieldType, FiltersMap } from '@wix/bex-core';
|
|
7
2
|
import { ToolbarCollectionState } from '../../state';
|
|
8
3
|
import React from 'react';
|
|
9
4
|
import { DateCustomFieldFilter } from './DateCustomFieldFilter';
|
|
@@ -11,7 +6,7 @@ import { DateTimeCustomFieldFilter } from './DateTimeCustomFieldFilter';
|
|
|
11
6
|
import { FilterProps } from '../../model';
|
|
12
7
|
import { CheckboxCustomFieldFilter } from './CheckboxCustomFieldFilter';
|
|
13
8
|
import { NumberRangeFilter } from '../NumberRangeFilter';
|
|
14
|
-
import {
|
|
9
|
+
import { OperatorFilterCustomFieldFilter } from './OperatorFilterCustomFieldFilter';
|
|
15
10
|
|
|
16
11
|
export const buildCustomFieldFilterElement = <T, F extends FiltersMap>(
|
|
17
12
|
state: ToolbarCollectionState<T, F>,
|
|
@@ -25,24 +20,9 @@ export const buildCustomFieldFilterElement = <T, F extends FiltersMap>(
|
|
|
25
20
|
checkbox: CheckboxCustomFieldFilter,
|
|
26
21
|
integer: NumberRangeFilter,
|
|
27
22
|
decimal: (props) => <NumberRangeFilter {...props} decimal />,
|
|
28
|
-
shortText:
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
allowedOperators={STRING_OPERATORS}
|
|
32
|
-
/>
|
|
33
|
-
),
|
|
34
|
-
url: (props) => (
|
|
35
|
-
<OperatorFilterPicker
|
|
36
|
-
{...props}
|
|
37
|
-
allowedOperators={STRING_OPERATORS}
|
|
38
|
-
/>
|
|
39
|
-
),
|
|
40
|
-
longText: (props) => (
|
|
41
|
-
<OperatorFilterPicker
|
|
42
|
-
{...props}
|
|
43
|
-
allowedOperators={STRING_OPERATORS}
|
|
44
|
-
/>
|
|
45
|
-
),
|
|
23
|
+
shortText: OperatorFilterCustomFieldFilter,
|
|
24
|
+
url: OperatorFilterCustomFieldFilter,
|
|
25
|
+
longText: OperatorFilterCustomFieldFilter,
|
|
46
26
|
};
|
|
47
27
|
|
|
48
28
|
const CustomFieldFilterComponent =
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
CustomFieldType,
|
|
16
16
|
numberRangeFilter,
|
|
17
17
|
stringOperatorFilter,
|
|
18
|
+
STRING_OPERATORS,
|
|
18
19
|
} from '@wix/bex-core';
|
|
19
20
|
import { ToolbarCollectionState } from '../../state';
|
|
20
21
|
import { DataExtensionProps, DataExtensionType } from './DataExtension';
|
|
@@ -130,7 +131,11 @@ export class CollectionDataExtensionState<T, F extends FiltersMap> {
|
|
|
130
131
|
}
|
|
131
132
|
|
|
132
133
|
_addCustomFieldFilters() {
|
|
133
|
-
const
|
|
134
|
+
const createStringFilter = (params: Partial<FilterStateBaseParams<any>>) =>
|
|
135
|
+
stringOperatorFilter({
|
|
136
|
+
...params,
|
|
137
|
+
allowedOperators: STRING_OPERATORS,
|
|
138
|
+
});
|
|
134
139
|
|
|
135
140
|
const customFieldFilter: {
|
|
136
141
|
[key in CustomFieldType]?: (
|
|
@@ -142,9 +147,9 @@ export class CollectionDataExtensionState<T, F extends FiltersMap> {
|
|
|
142
147
|
checkbox: idNameArrayFilter,
|
|
143
148
|
decimal: numberRangeFilter,
|
|
144
149
|
integer: numberRangeFilter,
|
|
145
|
-
shortText:
|
|
146
|
-
url:
|
|
147
|
-
longText:
|
|
150
|
+
shortText: createStringFilter,
|
|
151
|
+
url: createStringFilter,
|
|
152
|
+
longText: createStringFilter,
|
|
148
153
|
};
|
|
149
154
|
|
|
150
155
|
this.dataExtension.filterableCustomFields.forEach(
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "DragHandle1719636738";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"DragHandle1719636738__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "EntityPagePlain2454018564";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"EntityPagePlain2454018564__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "Fade4100073960";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"Fade4100073960__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "Heading1810640181";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"Heading1810640181__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "InputOverflow259513846";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"InputOverflow259513846__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -6,6 +6,7 @@ import { KanbanBaseProps } from './KanbanProps';
|
|
|
6
6
|
import { ItemActionsState } from '../../state';
|
|
7
7
|
import { CardActions } from './CardActions';
|
|
8
8
|
import { KanbanState } from '../../state/KanbanState';
|
|
9
|
+
import { KanbanCardTags } from './KanbanCardTags';
|
|
9
10
|
|
|
10
11
|
export interface KanbanCardProps<T, S, F extends FiltersMap> {
|
|
11
12
|
keyedItem: KeyedItem<T>;
|
|
@@ -36,6 +37,7 @@ function _CardComponent<T, S, F extends FiltersMap>({
|
|
|
36
37
|
itemActionsState,
|
|
37
38
|
isDragging,
|
|
38
39
|
state,
|
|
40
|
+
tags,
|
|
39
41
|
}: KanbanCardProps<T, S, F>) {
|
|
40
42
|
const { title, subtitle, additionalInfo, badge } = item;
|
|
41
43
|
|
|
@@ -56,6 +58,7 @@ function _CardComponent<T, S, F extends FiltersMap>({
|
|
|
56
58
|
dataHook={`kanban-card-${stageKey}-${item.key}`}
|
|
57
59
|
direction="vertical"
|
|
58
60
|
>
|
|
61
|
+
<Box marginBottom="3px">{badge}</Box>
|
|
59
62
|
{typeof title === 'string' ? (
|
|
60
63
|
<Box paddingBottom="3px">
|
|
61
64
|
<Text
|
|
@@ -79,7 +82,12 @@ function _CardComponent<T, S, F extends FiltersMap>({
|
|
|
79
82
|
)}
|
|
80
83
|
|
|
81
84
|
<Box direction="vertical" gap="1px">
|
|
82
|
-
|
|
85
|
+
{tags && (
|
|
86
|
+
<KanbanCardTags
|
|
87
|
+
item={originalItem}
|
|
88
|
+
dataHook={`kanban-card-tags-${stageKey}-${item.key}`}
|
|
89
|
+
/>
|
|
90
|
+
)}
|
|
83
91
|
<Box>{subtitle}</Box>
|
|
84
92
|
<Box>{additionalInfo}</Box>
|
|
85
93
|
</Box>
|
|
@@ -10,6 +10,8 @@ import {
|
|
|
10
10
|
IconButtonUniDriver,
|
|
11
11
|
MessageModalLayoutUniDriver,
|
|
12
12
|
PopoverMenuUniDriver,
|
|
13
|
+
TagListUniDriver,
|
|
14
|
+
TagUniDriver,
|
|
13
15
|
TextUniDriver,
|
|
14
16
|
TooltipUniDriver,
|
|
15
17
|
} from '@wix/design-system/dist/testkit/unidriver';
|
|
@@ -169,6 +171,23 @@ export function KanbanUniDriver(base: UniDriver, body: UniDriver) {
|
|
|
169
171
|
body.$('[data-hook="collection-action-modal"]'),
|
|
170
172
|
body,
|
|
171
173
|
),
|
|
174
|
+
tagList: (stageKey: string, itemId: string) =>
|
|
175
|
+
TagListUniDriver(
|
|
176
|
+
base.$(`[data-hook="kanban-card-tags-${stageKey}-${itemId}"]`),
|
|
177
|
+
body,
|
|
178
|
+
),
|
|
179
|
+
tagInList: (stageKey: string, itemId: string, tagId: string) =>
|
|
180
|
+
TagUniDriver(
|
|
181
|
+
base.$(
|
|
182
|
+
`[data-hook="kanban-card-tags-${stageKey}-${itemId}-${tagId}"]`,
|
|
183
|
+
),
|
|
184
|
+
body,
|
|
185
|
+
),
|
|
186
|
+
toggleHiddenTagsCounter: (stageKey: string, itemId: string) =>
|
|
187
|
+
TagUniDriver(
|
|
188
|
+
base.$(`[data-hook="kanban-card-tags-${stageKey}-${itemId}-toggle"]`),
|
|
189
|
+
body,
|
|
190
|
+
),
|
|
172
191
|
stagesSkeleton: () =>
|
|
173
192
|
BoxUniDriver(base.$('[data-hook="kanban-stages-skeleton"]'), body),
|
|
174
193
|
noResultsBox: (stageKey: string) =>
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { Box, Tag as TagComponent } from '@wix/design-system';
|
|
2
|
+
import { useToolbarCollectionContext } from '../ToolbarCollectionContext';
|
|
3
|
+
import React, { useState } from 'react';
|
|
4
|
+
import { Tag } from '@wix/bex-utils/@wix/ambassador-os-tags-v1-tag/types';
|
|
5
|
+
import { observer } from 'mobx-react-lite';
|
|
6
|
+
import { Tags } from '@wix/bex-core';
|
|
7
|
+
|
|
8
|
+
const MAX_VISIBLE_TAGS = 3;
|
|
9
|
+
|
|
10
|
+
export interface KanbanCardTagsProps<T> {
|
|
11
|
+
item: T;
|
|
12
|
+
/**
|
|
13
|
+
* Data hook for the tags container
|
|
14
|
+
*/
|
|
15
|
+
dataHook?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Maximum number of tags to show before collapsing
|
|
18
|
+
* @default 3
|
|
19
|
+
*/
|
|
20
|
+
maxVisibleTags?: number;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function _KanbanCardTags<T>({
|
|
24
|
+
item,
|
|
25
|
+
dataHook,
|
|
26
|
+
maxVisibleTags = MAX_VISIBLE_TAGS,
|
|
27
|
+
}: KanbanCardTagsProps<T>) {
|
|
28
|
+
const { tagsCollectionState } = useToolbarCollectionContext();
|
|
29
|
+
const [isExpanded, setIsExpanded] = useState(false);
|
|
30
|
+
|
|
31
|
+
if (!tagsCollectionState?.tagsManagementState) {
|
|
32
|
+
return null;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const tags: Tags | undefined =
|
|
36
|
+
tagsCollectionState._getTags?.(item) ?? (item as { tags?: Tags }).tags;
|
|
37
|
+
|
|
38
|
+
if (!tags?.privateTags?.tagIds?.length) {
|
|
39
|
+
return null;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const tagItems = tags.privateTags.tagIds
|
|
43
|
+
.map((tagId: string) =>
|
|
44
|
+
tagsCollectionState.tagsManagementState.items.find(
|
|
45
|
+
(tag: Tag) => tag.id === tagId,
|
|
46
|
+
),
|
|
47
|
+
)
|
|
48
|
+
.filter(Boolean) as Tag[];
|
|
49
|
+
|
|
50
|
+
if (tagItems.length === 0) {
|
|
51
|
+
return null;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
const visibleTags = isExpanded ? tagItems : tagItems.slice(0, maxVisibleTags);
|
|
55
|
+
const hiddenCount = tagItems.length - maxVisibleTags;
|
|
56
|
+
const hasMoreTags = hiddenCount > 0;
|
|
57
|
+
|
|
58
|
+
return (
|
|
59
|
+
<Box
|
|
60
|
+
dataHook={dataHook}
|
|
61
|
+
direction="horizontal"
|
|
62
|
+
gap="tiny"
|
|
63
|
+
verticalAlign="middle"
|
|
64
|
+
flexWrap="wrap"
|
|
65
|
+
marginTop="6px"
|
|
66
|
+
>
|
|
67
|
+
{visibleTags.map((tag) => (
|
|
68
|
+
<TagComponent
|
|
69
|
+
key={tag.id}
|
|
70
|
+
id={tag.id!}
|
|
71
|
+
dataHook={`${dataHook}-${tag.id}`}
|
|
72
|
+
size="tiny"
|
|
73
|
+
removable={false}
|
|
74
|
+
>
|
|
75
|
+
{tag.name}
|
|
76
|
+
</TagComponent>
|
|
77
|
+
))}
|
|
78
|
+
{hasMoreTags && !isExpanded && (
|
|
79
|
+
<TagComponent
|
|
80
|
+
id={`${dataHook}-toggle`}
|
|
81
|
+
dataHook={`${dataHook}-toggle`}
|
|
82
|
+
size="tiny"
|
|
83
|
+
removable={false}
|
|
84
|
+
onClick={() => setIsExpanded(!isExpanded)}
|
|
85
|
+
skin="lightOutlined"
|
|
86
|
+
>
|
|
87
|
+
{`+${hiddenCount}`}
|
|
88
|
+
</TagComponent>
|
|
89
|
+
)}
|
|
90
|
+
</Box>
|
|
91
|
+
);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const KanbanCardTags = observer(_KanbanCardTags);
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "LoadingRow1962776937";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,8 +13,8 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
17
|
-
export var keyframes = {"gradientSwoosh":"
|
|
16
|
+
export var classes = {"root":"LoadingRow1962776937__root"};
|
|
17
|
+
export var keyframes = {"gradientSwoosh":"LoadingRow1962776937__gradientSwoosh"};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
20
20
|
export var stVars = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "MaxHeightText3996867344";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"MaxHeightText3996867344__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "MaxLines4229375414";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"MaxLines4229375414__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "MultiBulkActionToolbar1760143859";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"MultiBulkActionToolbar1760143859__root","leftGroupWrapper":"MultiBulkActionToolbar1760143859__leftGroupWrapper","selectedCountItem":"MultiBulkActionToolbar1760143859__selectedCountItem","selectedCountText":"MultiBulkActionToolbar1760143859__selectedCountText"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "NestedTablePlaceholderStatesRow218800380";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"NestedTablePlaceholderStatesRow218800380__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "NestedTableRow3140066734";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"NestedTableRow3140066734__root","firstLevel":"NestedTableRow3140066734__firstLevel","placeholder":"NestedTableRow3140066734__placeholder","parentHovered":"NestedTableRow3140066734__parentHovered"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "MultipleDragOverlayEffect2746358990";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"MultipleDragOverlayEffect2746358990__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "NestedTableDragAndDropRow2229560427";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"NestedTableDragAndDropRow2229560427__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React, { useEffect, useMemo } from 'react';
|
|
2
2
|
import { observer } from 'mobx-react-lite';
|
|
3
3
|
import {
|
|
4
4
|
Box,
|
|
@@ -12,29 +12,42 @@ import {
|
|
|
12
12
|
FilterOperator,
|
|
13
13
|
OperatorFilterValue,
|
|
14
14
|
getOperatorLabel,
|
|
15
|
+
operatorNeedsValue,
|
|
16
|
+
OperatorFilterState,
|
|
15
17
|
} from '@wix/bex-core';
|
|
16
18
|
import { useWixPatternsContainer } from '@wix/bex-core/react';
|
|
17
19
|
import { useOperatorFilterState } from '../../hooks/useOperatorFilterState';
|
|
18
20
|
import { FilterProps } from '../../model';
|
|
19
21
|
import { ChevronDown } from '@wix/wix-ui-icons-common';
|
|
22
|
+
import { renderOperatorFilterToolbarTag } from './renderOperatorFilterToolbarTag';
|
|
20
23
|
|
|
21
24
|
export interface OperatorPickerProps<T>
|
|
22
|
-
extends FilterProps<OperatorFilterValue<T>> {
|
|
23
|
-
/**
|
|
24
|
-
* List of allowed operators for this filter
|
|
25
|
-
* @external
|
|
26
|
-
*/
|
|
27
|
-
allowedOperators: FilterOperator[];
|
|
28
|
-
}
|
|
25
|
+
extends FilterProps<OperatorFilterValue<T>> {}
|
|
29
26
|
|
|
30
27
|
function _OperatorFilterPicker<T>(props: OperatorPickerProps<T>) {
|
|
31
|
-
const { filter
|
|
28
|
+
const { filter } = props;
|
|
32
29
|
const { translate: t } = useWixPatternsContainer();
|
|
33
30
|
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
31
|
+
const filterState = filter as OperatorFilterState<T>;
|
|
32
|
+
const allowedOperators = filterState.allowedOperators;
|
|
33
|
+
const hasOperatorWithValue = useMemo(
|
|
34
|
+
() => allowedOperators.some((op) => operatorNeedsValue(op)),
|
|
35
|
+
[allowedOperators],
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
if (!hasOperatorWithValue) {
|
|
39
|
+
throw new Error(
|
|
40
|
+
`[OperatorFilterPicker] Invalid configuration for filter "${filter.name}": ` +
|
|
41
|
+
`All operators in allowedOperators [${allowedOperators.join(
|
|
42
|
+
', ',
|
|
43
|
+
)}] don't require a value. ` +
|
|
44
|
+
`When using only value-less operators like EXISTS, IS_EMPTY, or NOT_EXISTS, ` +
|
|
45
|
+
`you should use a Checkbox filter component instead of OperatorFilterPicker. ` +
|
|
46
|
+
`OperatorFilterPicker is designed for operators that require user input (e.g., EQUALS, CONTAINS, STARTS_WITH).`,
|
|
47
|
+
);
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
const state = useOperatorFilterState<T>({ filter });
|
|
38
51
|
|
|
39
52
|
useEffect(() => state.init(), [state]);
|
|
40
53
|
|
|
@@ -96,4 +109,12 @@ function _OperatorFilterPicker<T>(props: OperatorPickerProps<T>) {
|
|
|
96
109
|
);
|
|
97
110
|
}
|
|
98
111
|
|
|
99
|
-
export const OperatorFilterPicker = observer(
|
|
112
|
+
export const OperatorFilterPicker = observer(
|
|
113
|
+
_OperatorFilterPicker,
|
|
114
|
+
) as typeof _OperatorFilterPicker & {
|
|
115
|
+
displayName?: string;
|
|
116
|
+
renderPresetToolbarTag?: typeof renderOperatorFilterToolbarTag;
|
|
117
|
+
};
|
|
118
|
+
|
|
119
|
+
OperatorFilterPicker.displayName = 'OperatorFilterPicker';
|
|
120
|
+
OperatorFilterPicker.renderPresetToolbarTag = renderOperatorFilterToolbarTag;
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import {
|
|
2
|
+
FilterItem,
|
|
3
|
+
OperatorFilterValue,
|
|
4
|
+
getOperatorLabel,
|
|
5
|
+
Translate,
|
|
6
|
+
} from '@wix/bex-core';
|
|
7
|
+
import { createElement } from 'react';
|
|
8
|
+
import { FilterProps } from '../../model';
|
|
9
|
+
import { FilterTagContent } from '../AppliedFiltersTagList/FilterTagContent';
|
|
10
|
+
|
|
11
|
+
export const renderOperatorFilterToolbarTag = (
|
|
12
|
+
container: { translate: Translate },
|
|
13
|
+
params: { filterProps: FilterProps<any> },
|
|
14
|
+
) => {
|
|
15
|
+
return <T>(item: FilterItem<OperatorFilterValue<T>>) => {
|
|
16
|
+
const { filterProps } = params;
|
|
17
|
+
const { translate: t } = container;
|
|
18
|
+
const { operator, value } = item as FilterItem<OperatorFilterValue<T>>;
|
|
19
|
+
|
|
20
|
+
const operatorLabel = t(getOperatorLabel(operator));
|
|
21
|
+
const displayValue = value != null && value !== '' ? ` ${value}` : '';
|
|
22
|
+
|
|
23
|
+
return {
|
|
24
|
+
children: createElement(
|
|
25
|
+
FilterTagContent,
|
|
26
|
+
{ filterProps },
|
|
27
|
+
`${operatorLabel}${displayValue}`,
|
|
28
|
+
),
|
|
29
|
+
};
|
|
30
|
+
};
|
|
31
|
+
};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "PickerContent3852751846";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"PickerContent3852751846__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "PickerContentAdditionalStep505382893";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"PickerContentAdditionalStep505382893__root","titles":"PickerContentAdditionalStep505382893__titles","suffix":"PickerContentAdditionalStep505382893__suffix"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|
|
@@ -5,7 +5,7 @@ import { classesRuntime, statesRuntime } from "../../stylable-esm-runtime.js";
|
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var _namespace_ = "
|
|
8
|
+
var _namespace_ = "PickerTableListItem3274383082";
|
|
9
9
|
var _style_ = classesRuntime.bind(null, _namespace_);
|
|
10
10
|
|
|
11
11
|
export var cssStates = statesRuntime.bind(null, _namespace_);
|
|
@@ -13,7 +13,7 @@ export var style = _style_;
|
|
|
13
13
|
export var st: import("@stylable/runtime").STFunction = _style_;
|
|
14
14
|
|
|
15
15
|
export var namespace = _namespace_;
|
|
16
|
-
export var classes = {"root":"
|
|
16
|
+
export var classes = {"root":"PickerTableListItem3274383082__root"};
|
|
17
17
|
export var keyframes = {};
|
|
18
18
|
export var layers = {};
|
|
19
19
|
export var containers = {};
|