@wix/auto-patterns 1.22.0 → 1.23.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/hooks/useActionCell.js.map +1 -1
- package/dist/cjs/providers/PatternsWizardOverridesContext.js +1 -1
- package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/cjs/types/actions/base.js.map +1 -1
- package/dist/docs/app_config_structure.md +0 -3
- package/dist/docs/auto-patterns-guide.md +87 -22
- package/dist/docs/bulk_actions.md +1 -4
- package/dist/docs/custom_overrides.md +86 -15
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +3 -4
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +1 -2
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js +8 -13
- package/dist/esm/components/AutoPatternsEntityPage/AutoPatternsEntityPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/DateInput.js +6 -10
- package/dist/esm/components/AutoPatternsEntityPage/Fields/DateInput.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/DateTime.js +16 -23
- package/dist/esm/components/AutoPatternsEntityPage/Fields/DateTime.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js +2 -3
- package/dist/esm/components/AutoPatternsEntityPage/Fields/FormFieldInput.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ImageInput.js +6 -9
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ImageInput.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/LongText.js +6 -8
- package/dist/esm/components/AutoPatternsEntityPage/Fields/LongText.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/Number.js +8 -10
- package/dist/esm/components/AutoPatternsEntityPage/Fields/Number.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js +10 -12
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ShortText.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/Url.js +6 -8
- package/dist/esm/components/AutoPatternsEntityPage/Fields/Url.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/SkeletonEntity.js +4 -7
- package/dist/esm/components/AutoPatternsEntityPage/SkeletonEntity.js.map +1 -1
- package/dist/esm/components/ModalRenderer.js +1 -2
- package/dist/esm/components/ModalRenderer.js.map +1 -1
- package/dist/esm/components/modals/actions/BulkDeleteModal.js +7 -12
- package/dist/esm/components/modals/actions/BulkDeleteModal.js.map +1 -1
- package/dist/esm/components/modals/actions/CreateModal.js +6 -11
- package/dist/esm/components/modals/actions/CreateModal.js.map +1 -1
- package/dist/esm/components/modals/actions/EditModal.js +6 -11
- package/dist/esm/components/modals/actions/EditModal.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js +3 -4
- package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/filterUtils.js +1 -2
- package/dist/esm/dataSourceAdapters/cms/filterUtils.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/sortUtils.js +2 -2
- package/dist/esm/dataSourceAdapters/cms/sortUtils.js.map +1 -1
- package/dist/esm/hooks/useActionCell.js +8 -12
- package/dist/esm/hooks/useActionCell.js.map +1 -1
- package/dist/esm/hooks/useBaseTableFeatures.js +1 -2
- package/dist/esm/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useBulkActionToolbar.js +2 -2
- package/dist/esm/hooks/useBulkActionToolbar.js.map +1 -1
- package/dist/esm/hooks/useCollectionPageActions.js +3 -3
- package/dist/esm/hooks/useCollectionPageActions.js.map +1 -1
- package/dist/esm/hooks/useCollectionPageOnRowClickActions.js +1 -1
- package/dist/esm/hooks/useCollectionPageOnRowClickActions.js.map +1 -1
- package/dist/esm/hooks/useColumns.js +7 -12
- package/dist/esm/hooks/useColumns.js.map +1 -1
- package/dist/esm/hooks/useCommonCollectionFeatures.js +7 -8
- package/dist/esm/hooks/useCommonCollectionFeatures.js.map +1 -1
- package/dist/esm/hooks/useEmptyStates.js +5 -6
- package/dist/esm/hooks/useEmptyStates.js.map +1 -1
- package/dist/esm/hooks/useFilters.js +7 -7
- package/dist/esm/hooks/useFilters.js.map +1 -1
- package/dist/esm/hooks/useNavigationUtils.js +2 -3
- package/dist/esm/hooks/useNavigationUtils.js.map +1 -1
- package/dist/esm/hooks/usePagePath.js +3 -4
- package/dist/esm/hooks/usePagePath.js.map +1 -1
- package/dist/esm/hooks/useTableFeatures.js +1 -2
- package/dist/esm/hooks/useTableFeatures.js.map +1 -1
- package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/esm/providers/SchemaContext.js +2 -3
- package/dist/esm/providers/SchemaContext.js.map +1 -1
- package/dist/esm/providers/SchemaRegistryContext.js +1 -1
- package/dist/esm/providers/SchemaRegistryContext.js.map +1 -1
- package/dist/esm/types/actions/base.js.map +1 -1
- package/dist/esm/utils/actions/customAction.js +1 -2
- package/dist/esm/utils/actions/customAction.js.map +1 -1
- package/dist/esm/utils/actions/deleteAction.js +5 -10
- package/dist/esm/utils/actions/deleteAction.js.map +1 -1
- package/dist/esm/utils/filterCreators.js +11 -11
- package/dist/esm/utils/filterCreators.js.map +1 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts +2 -5
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +1 -1
- package/dist/types/types/actions/base.d.ts +0 -4
- package/dist/types/types/actions/base.d.ts.map +1 -1
- package/package.json +10 -10
|
@@ -14,9 +14,9 @@ export const createDateTimeFilter = _ref => {
|
|
|
14
14
|
component: DateRangeFilter,
|
|
15
15
|
props: {
|
|
16
16
|
...commonFilterProps,
|
|
17
|
-
mode: config
|
|
18
|
-
dateRangeOptions: config
|
|
19
|
-
filterByTime: config
|
|
17
|
+
mode: config?.mode,
|
|
18
|
+
dateRangeOptions: config?.presets,
|
|
19
|
+
filterByTime: config?.includeTime
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
};
|
|
@@ -43,10 +43,10 @@ export const createBooleanFilter = _ref2 => {
|
|
|
43
43
|
...commonFilterProps,
|
|
44
44
|
data: [{
|
|
45
45
|
id: 'checked',
|
|
46
|
-
name:
|
|
46
|
+
name: config?.trueLabel || 'Yes'
|
|
47
47
|
}, {
|
|
48
48
|
id: 'unchecked',
|
|
49
|
-
name:
|
|
49
|
+
name: config?.falseLabel || 'No'
|
|
50
50
|
}]
|
|
51
51
|
}
|
|
52
52
|
};
|
|
@@ -65,9 +65,9 @@ export const createNumberFilter = _ref3 => {
|
|
|
65
65
|
component: NumberRangeFilter,
|
|
66
66
|
props: {
|
|
67
67
|
...commonFilterProps,
|
|
68
|
-
min: config
|
|
69
|
-
max: config
|
|
70
|
-
decimal: config
|
|
68
|
+
min: config?.min,
|
|
69
|
+
max: config?.max,
|
|
70
|
+
decimal: config?.allowedDecimals
|
|
71
71
|
}
|
|
72
72
|
};
|
|
73
73
|
};
|
|
@@ -83,10 +83,10 @@ export const createEnumFilter = _ref4 => {
|
|
|
83
83
|
selectionMode,
|
|
84
84
|
optionType
|
|
85
85
|
} = config;
|
|
86
|
-
const data =
|
|
86
|
+
const data = options?.map(option => ({
|
|
87
87
|
id: option.value,
|
|
88
88
|
name: option.label
|
|
89
|
-
}))
|
|
89
|
+
})) ?? [];
|
|
90
90
|
const inlineComponentThreshold = 5;
|
|
91
91
|
let component;
|
|
92
92
|
if (selectionMode === 'single') {
|
|
@@ -126,7 +126,7 @@ export const createReferenceFilter = _ref5 => {
|
|
|
126
126
|
config,
|
|
127
127
|
additionalParams
|
|
128
128
|
} = _ref5;
|
|
129
|
-
const component =
|
|
129
|
+
const component = config?.selectionMode === 'single' ? AutoCompleteFilter : MultiSelectCollectionFilter;
|
|
130
130
|
return {
|
|
131
131
|
key: id,
|
|
132
132
|
fieldId,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["dateRangeFilter","idNameArrayFilter","numberRangeFilter","DateRangeFilter","RadioGroupFilter","NumberRangeFilter","AutoCompleteFilter","MultiSelectCheckboxFilter","MultiInlineCheckboxFilter","MultiSelectCollectionFilter","BooleanFilters","createDateTimeFilter","_ref","id","fieldId","commonFilterProps","config","key","filter","component","props","mode","dateRangeOptions","presets","filterByTime","includeTime","createBooleanFilter","_ref2","matches","fieldValue","filterValue","some","v","checked","unchecked","data","name","trueLabel","falseLabel","createNumberFilter","_ref3","min","max","decimal","allowedDecimals","createEnumFilter","_ref4","options","selectionMode","optionType","map","option","value","label","inlineComponentThreshold","length","collectionData","createReferenceFilter","_ref5","additionalParams","collectionId","referencedSchema"],"sources":["../../../src/utils/filterCreators.ts"],"sourcesContent":["import {\n dateRangeFilter,\n idNameArrayFilter,\n numberRangeFilter,\n DateRangeFilter,\n RadioGroupFilter,\n NumberRangeFilter,\n AutoCompleteFilter,\n MultiSelectCheckboxFilter,\n MultiInlineCheckboxFilter,\n MultiSelectCollectionFilter,\n} from '@wix/patterns';\nimport { BooleanFilters } from '../dataSourceAdapters/constants';\nimport { FilterOptions } from '../hooks/useFilters';\nimport { SchemaConfig } from '../types';\n\ninterface FilterOption {\n value: string;\n label: string;\n}\n\ninterface BaseFilterParams {\n id: string;\n fieldId: string;\n commonFilterProps: Record<string, any>;\n}\n\nexport const createDateTimeFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n mode?: 'ONLY_PREDEFINED' | 'ONLY_CUSTOM' | 'COMBINE';\n presets?: string[];\n includeTime?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: dateRangeFilter(),\n component: DateRangeFilter,\n props: {\n ...commonFilterProps,\n mode: config?.mode,\n dateRangeOptions: config?.presets,\n filterByTime: config?.includeTime,\n },\n});\n\nexport const createBooleanFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n trueLabel?: string;\n falseLabel?: string;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: idNameArrayFilter({\n matches: (fieldValue, filterValue) => {\n if (fieldValue) {\n return filterValue.some((v) => v.id === BooleanFilters.checked);\n }\n return filterValue.some((v) => v.id === BooleanFilters.unchecked);\n },\n }),\n component: RadioGroupFilter,\n props: {\n ...commonFilterProps,\n data: [\n {\n id: 'checked',\n name: config?.trueLabel || 'Yes',\n },\n {\n id: 'unchecked',\n name: config?.falseLabel || 'No',\n },\n ],\n },\n});\n\nexport const createNumberFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: numberRangeFilter(),\n component: NumberRangeFilter,\n props: {\n ...commonFilterProps,\n min: config?.min,\n max: config?.max,\n decimal: config?.allowedDecimals,\n },\n});\n\nexport const createEnumFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config: {\n options?: FilterOption[];\n selectionMode?: 'single' | 'multiple';\n optionType?: 'select' | 'radio' | 'checkbox' | 'inlineCheckbox';\n };\n}): FilterOptions => {\n const { options, selectionMode, optionType } = config;\n const data =\n options?.map((option: FilterOption) => ({\n id: option.value,\n name: option.label,\n })) ?? [];\n\n const inlineComponentThreshold = 5;\n\n let component;\n\n if (selectionMode === 'single') {\n component =\n data.length > inlineComponentThreshold\n ? AutoCompleteFilter\n : RadioGroupFilter;\n if (optionType === 'select') {\n component = AutoCompleteFilter;\n } else if (optionType === 'radio') {\n component = RadioGroupFilter;\n }\n } else {\n component =\n data.length > inlineComponentThreshold\n ? MultiSelectCheckboxFilter\n : MultiInlineCheckboxFilter;\n if (optionType === 'select') {\n component = MultiSelectCollectionFilter;\n } else if (optionType === 'inlineCheckbox') {\n component = MultiInlineCheckboxFilter;\n } else if (optionType === 'checkbox') {\n component = MultiSelectCheckboxFilter;\n }\n }\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionData: data,\n props: { ...commonFilterProps, data },\n };\n};\n\nexport const createReferenceFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n additionalParams,\n}: BaseFilterParams & {\n config?: {\n selectionMode?: 'single' | 'multiple';\n };\n additionalParams: {\n referencedSchema: SchemaConfig;\n };\n}): FilterOptions => {\n const component =\n config?.selectionMode === 'single'\n ? AutoCompleteFilter\n : MultiSelectCollectionFilter;\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionId: additionalParams.referencedSchema.id,\n props: commonFilterProps,\n };\n};\n"],"mappings":"AAAA,SACEA,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,yBAAyB,EACzBC,yBAAyB,EACzBC,2BAA2B,QACtB,eAAe;AACtB,SAASC,cAAc,QAAQ,iCAAiC;AAehE,OAAO,MAAMC,oBAAoB,GAAGC,IAAA;EAAA,IAAC;IACnCC,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC;EAOF,CAAC,GAAAJ,IAAA;EAAA,OAAqB;IACpBK,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAElB,eAAe,CAAC,CAAC;IACzBmB,SAAS,EAAEhB,eAAe;IAC1BiB,KAAK,EAAE;MACL,GAAGL,iBAAiB;MACpBM,IAAI,EAAEL,MAAM,
|
|
1
|
+
{"version":3,"names":["dateRangeFilter","idNameArrayFilter","numberRangeFilter","DateRangeFilter","RadioGroupFilter","NumberRangeFilter","AutoCompleteFilter","MultiSelectCheckboxFilter","MultiInlineCheckboxFilter","MultiSelectCollectionFilter","BooleanFilters","createDateTimeFilter","_ref","id","fieldId","commonFilterProps","config","key","filter","component","props","mode","dateRangeOptions","presets","filterByTime","includeTime","createBooleanFilter","_ref2","matches","fieldValue","filterValue","some","v","checked","unchecked","data","name","trueLabel","falseLabel","createNumberFilter","_ref3","min","max","decimal","allowedDecimals","createEnumFilter","_ref4","options","selectionMode","optionType","map","option","value","label","inlineComponentThreshold","length","collectionData","createReferenceFilter","_ref5","additionalParams","collectionId","referencedSchema"],"sources":["../../../src/utils/filterCreators.ts"],"sourcesContent":["import {\n dateRangeFilter,\n idNameArrayFilter,\n numberRangeFilter,\n DateRangeFilter,\n RadioGroupFilter,\n NumberRangeFilter,\n AutoCompleteFilter,\n MultiSelectCheckboxFilter,\n MultiInlineCheckboxFilter,\n MultiSelectCollectionFilter,\n} from '@wix/patterns';\nimport { BooleanFilters } from '../dataSourceAdapters/constants';\nimport { FilterOptions } from '../hooks/useFilters';\nimport { SchemaConfig } from '../types';\n\ninterface FilterOption {\n value: string;\n label: string;\n}\n\ninterface BaseFilterParams {\n id: string;\n fieldId: string;\n commonFilterProps: Record<string, any>;\n}\n\nexport const createDateTimeFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n mode?: 'ONLY_PREDEFINED' | 'ONLY_CUSTOM' | 'COMBINE';\n presets?: string[];\n includeTime?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: dateRangeFilter(),\n component: DateRangeFilter,\n props: {\n ...commonFilterProps,\n mode: config?.mode,\n dateRangeOptions: config?.presets,\n filterByTime: config?.includeTime,\n },\n});\n\nexport const createBooleanFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n trueLabel?: string;\n falseLabel?: string;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: idNameArrayFilter({\n matches: (fieldValue, filterValue) => {\n if (fieldValue) {\n return filterValue.some((v) => v.id === BooleanFilters.checked);\n }\n return filterValue.some((v) => v.id === BooleanFilters.unchecked);\n },\n }),\n component: RadioGroupFilter,\n props: {\n ...commonFilterProps,\n data: [\n {\n id: 'checked',\n name: config?.trueLabel || 'Yes',\n },\n {\n id: 'unchecked',\n name: config?.falseLabel || 'No',\n },\n ],\n },\n});\n\nexport const createNumberFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config?: {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n };\n}): FilterOptions => ({\n key: id,\n fieldId,\n filter: numberRangeFilter(),\n component: NumberRangeFilter,\n props: {\n ...commonFilterProps,\n min: config?.min,\n max: config?.max,\n decimal: config?.allowedDecimals,\n },\n});\n\nexport const createEnumFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n}: BaseFilterParams & {\n config: {\n options?: FilterOption[];\n selectionMode?: 'single' | 'multiple';\n optionType?: 'select' | 'radio' | 'checkbox' | 'inlineCheckbox';\n };\n}): FilterOptions => {\n const { options, selectionMode, optionType } = config;\n const data =\n options?.map((option: FilterOption) => ({\n id: option.value,\n name: option.label,\n })) ?? [];\n\n const inlineComponentThreshold = 5;\n\n let component;\n\n if (selectionMode === 'single') {\n component =\n data.length > inlineComponentThreshold\n ? AutoCompleteFilter\n : RadioGroupFilter;\n if (optionType === 'select') {\n component = AutoCompleteFilter;\n } else if (optionType === 'radio') {\n component = RadioGroupFilter;\n }\n } else {\n component =\n data.length > inlineComponentThreshold\n ? MultiSelectCheckboxFilter\n : MultiInlineCheckboxFilter;\n if (optionType === 'select') {\n component = MultiSelectCollectionFilter;\n } else if (optionType === 'inlineCheckbox') {\n component = MultiInlineCheckboxFilter;\n } else if (optionType === 'checkbox') {\n component = MultiSelectCheckboxFilter;\n }\n }\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionData: data,\n props: { ...commonFilterProps, data },\n };\n};\n\nexport const createReferenceFilter = ({\n id,\n fieldId,\n commonFilterProps,\n config,\n additionalParams,\n}: BaseFilterParams & {\n config?: {\n selectionMode?: 'single' | 'multiple';\n };\n additionalParams: {\n referencedSchema: SchemaConfig;\n };\n}): FilterOptions => {\n const component =\n config?.selectionMode === 'single'\n ? AutoCompleteFilter\n : MultiSelectCollectionFilter;\n\n return {\n key: id,\n fieldId,\n filter: idNameArrayFilter(),\n component,\n collectionId: additionalParams.referencedSchema.id,\n props: commonFilterProps,\n };\n};\n"],"mappings":"AAAA,SACEA,eAAe,EACfC,iBAAiB,EACjBC,iBAAiB,EACjBC,eAAe,EACfC,gBAAgB,EAChBC,iBAAiB,EACjBC,kBAAkB,EAClBC,yBAAyB,EACzBC,yBAAyB,EACzBC,2BAA2B,QACtB,eAAe;AACtB,SAASC,cAAc,QAAQ,iCAAiC;AAehE,OAAO,MAAMC,oBAAoB,GAAGC,IAAA;EAAA,IAAC;IACnCC,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC;EAOF,CAAC,GAAAJ,IAAA;EAAA,OAAqB;IACpBK,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAElB,eAAe,CAAC,CAAC;IACzBmB,SAAS,EAAEhB,eAAe;IAC1BiB,KAAK,EAAE;MACL,GAAGL,iBAAiB;MACpBM,IAAI,EAAEL,MAAM,EAAEK,IAAI;MAClBC,gBAAgB,EAAEN,MAAM,EAAEO,OAAO;MACjCC,YAAY,EAAER,MAAM,EAAES;IACxB;EACF,CAAC;AAAA,CAAC;AAEF,OAAO,MAAMC,mBAAmB,GAAGC,KAAA;EAAA,IAAC;IAClCd,EAAE;IACFC,OAAO;IACPC,iBAAiB;IACjBC;EAMF,CAAC,GAAAW,KAAA;EAAA,OAAqB;IACpBV,GAAG,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAEjB,iBAAiB,CAAC;MACxB2B,OAAO,EAAEA,CAACC,UAAU,EAAEC,WAAW,KAAK;QACpC,IAAID,UAAU,EAAE;UACd,OAAOC,WAAW,CAACC,IAAI,CAAEC,CAAC,IAAKA,CAAC,CAACnB,EAA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,EAAEJ,EAAE;IACPC,OAAO;IACPI,MAAM,EAAEjB,iBAAiB,CAAC,CAAC;IAC3BkB,SAAS;IACTyC,YAAY,EAAED,gBAAgB,CAACE,gBAAgB,CAAChD,EAAE;IAClDO,KAAK,EAAEL;EACT,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import { CustomComponentProps,
|
|
2
|
+
import { CustomComponentProps, CustomActionCellActionResolver, CustomEntityPageMoreActionsActionResolver, CustomBulkActionsActionResolver, CustomActionCollectionPageActionResolver, CustomActionCollectionPageActionOnRowClickResolver, IColumnValue, SchemaConfig } from '../types';
|
|
3
3
|
import { Section } from '@wix/patterns';
|
|
4
|
-
import { CustomActionParams, ResolvedAction } from '../utils/actions/types';
|
|
5
|
-
import { CollectionPageActionOnRowClickParams, CollectionPageActionParams } from '../types/actions/collectionPageActions';
|
|
6
|
-
import { ActionCellActionParams } from '../types/actions/actionCell';
|
|
7
4
|
export interface PatternsWizardOverridesContextProps {
|
|
8
|
-
actions?: Record<string,
|
|
5
|
+
actions?: Record<string, CustomActionCellActionResolver | CustomBulkActionsActionResolver | CustomEntityPageMoreActionsActionResolver | CustomActionCollectionPageActionResolver | CustomActionCollectionPageActionOnRowClickResolver>;
|
|
9
6
|
columns?: Record<string, (props: IColumnValue<any>) => void>;
|
|
10
7
|
modals?: Record<string, React.FC<any>>;
|
|
11
8
|
emptyState?: Record<string, () => void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PatternsWizardOverridesContext.d.ts","sourceRoot":"","sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,
|
|
1
|
+
{"version":3,"file":"PatternsWizardOverridesContext.d.ts","sourceRoot":"","sources":["../../../src/providers/PatternsWiz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ACpB,KAAK,EAAE,mCAAmC,CAAC;CAC5C,CAMA,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAC1C,mCAAmC,GACnC,SAEH,CAAC"}
|
|
@@ -42,10 +42,8 @@ export interface BulkDeleteActionModal extends DeleteActionModal {
|
|
|
42
42
|
export type BulkDeleteAction = {
|
|
43
43
|
mode: 'modal';
|
|
44
44
|
modal: BulkDeleteActionModal;
|
|
45
|
-
custom?: never;
|
|
46
45
|
} | {
|
|
47
46
|
mode: 'custom';
|
|
48
|
-
custom: CustomAction;
|
|
49
47
|
modal?: never;
|
|
50
48
|
};
|
|
51
49
|
export type DeleteAction = {
|
|
@@ -55,7 +53,6 @@ export type DeleteAction = {
|
|
|
55
53
|
export interface BaseActionPage {
|
|
56
54
|
id: string;
|
|
57
55
|
}
|
|
58
|
-
export type CustomAction = {};
|
|
59
56
|
export interface ActionModalWithFields extends BaseActionModal {
|
|
60
57
|
fields: ActionModalField[];
|
|
61
58
|
}
|
|
@@ -93,6 +90,5 @@ export type BulkDeleteActionConfig = BaseActionItemConfig & {
|
|
|
93
90
|
};
|
|
94
91
|
export type CustomActionConfig = BaseActionItemConfig & {
|
|
95
92
|
type: 'custom';
|
|
96
|
-
custom: CustomAction;
|
|
97
93
|
};
|
|
98
94
|
//# sourceMappingURL=base.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/base.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG;IAAE,IAAI,EAAE,SAAS,CAAA;CAAE,CAAC;AAEtD,MAAM,MAAM,oBAAoB,GAAG;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,CAAC;AAEF,MAAM,WAAW,QAAQ;IACvB,YAAY,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IACh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ACxB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,gBAAgB,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,IAAI,EAAE,QAAQ,CAAC;IACf,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,sBAAsB,GAAG,oBAAoB,GAAG;IAC1D,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,gBAAgB,CAAC;CAC9B,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,oBAAoB,GAAG;IACtD,IAAI,EAAE,QAAQ,CAAC;CAChB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.23.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matvey Oklander",
|
|
@@ -54,16 +54,16 @@
|
|
|
54
54
|
"@types/react": "^16.14.65",
|
|
55
55
|
"@wix/crm": "^1.0.385",
|
|
56
56
|
"@wix/design-system": "^1.206.0",
|
|
57
|
-
"@wix/eslint-config-yoshi": "^6.
|
|
58
|
-
"@wix/fe-essentials-standalone": "^1.
|
|
59
|
-
"@wix/jest-yoshi-preset": "^6.
|
|
60
|
-
"@wix/patterns": "^1.
|
|
57
|
+
"@wix/eslint-config-yoshi": "^6.153.0",
|
|
58
|
+
"@wix/fe-essentials-standalone": "^1.1366.0",
|
|
59
|
+
"@wix/jest-yoshi-preset": "^6.153.0",
|
|
60
|
+
"@wix/patterns": "^1.241.0",
|
|
61
61
|
"@wix/sdk": "^1.15.24",
|
|
62
62
|
"@wix/sdk-testkit": ">=0.1.6",
|
|
63
|
-
"@wix/wix-data-items-common": "^1.0.
|
|
64
|
-
"@wix/wix-data-items-sdk": "^1.0.
|
|
65
|
-
"@wix/yoshi-flow-library": "^6.
|
|
66
|
-
"@wix/yoshi-style-dependencies": "^6.
|
|
63
|
+
"@wix/wix-data-items-common": "^1.0.196",
|
|
64
|
+
"@wix/wix-data-items-sdk": "^1.0.387",
|
|
65
|
+
"@wix/yoshi-flow-library": "^6.153.0",
|
|
66
|
+
"@wix/yoshi-style-dependencies": "^6.153.0",
|
|
67
67
|
"chance": "^1.1.13",
|
|
68
68
|
"date-fns": "^2.30.0",
|
|
69
69
|
"express": "^4.21.2",
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"wallaby": {
|
|
126
126
|
"autoDetect": true
|
|
127
127
|
},
|
|
128
|
-
"falconPackageHash": "
|
|
128
|
+
"falconPackageHash": "2268b5e199bc79736a93acc5d94e7939e96a85206dcebaba62823671"
|
|
129
129
|
}
|