@wix/auto-patterns 1.20.0 → 1.22.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/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +109 -0
- package/dist/cjs/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -0
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +5 -14
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +19 -68
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/ImageInput.js +5 -4
- package/dist/cjs/components/AutoPatternsEntityPage/Fields/ImageInput.js.map +1 -1
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js +3 -1
- package/dist/cjs/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -1
- package/dist/cjs/hooks/useActionCell.js +10 -2
- package/dist/cjs/hooks/useActionCell.js.map +1 -1
- package/dist/cjs/hooks/useBaseTableFeatures.js +4 -3
- package/dist/cjs/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableFeatures.js +3 -1
- package/dist/cjs/hooks/useTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js +4 -2
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
- package/dist/cjs/types/actions/actionCell.js.map +1 -1
- package/dist/docs/action_cell.md +13 -3
- package/dist/docs/app_config_structure.md +8 -2
- package/dist/docs/auto-patterns-guide.md +202 -14
- package/dist/docs/custom_overrides.md +181 -9
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js +72 -0
- package/dist/esm/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.js.map +1 -0
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +1 -3
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +17 -48
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ImageInput.js +4 -3
- package/dist/esm/components/AutoPatternsEntityPage/Fields/ImageInput.js.map +1 -1
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js +2 -0
- package/dist/esm/components/AutoPatternsTable/AutoPatternsTable.js.map +1 -1
- package/dist/esm/hooks/useActionCell.js +10 -2
- package/dist/esm/hooks/useActionCell.js.map +1 -1
- package/dist/esm/hooks/useBaseTableFeatures.js +3 -2
- package/dist/esm/hooks/useBaseTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableFeatures.js +3 -1
- package/dist/esm/hooks/useTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableGridSwitchFeatures.js +4 -2
- package/dist/esm/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/esm/providers/PatternsWizardOverridesContext.js.map +1 -1
- package/dist/esm/types/CollectionPageConfig.js.map +1 -1
- package/dist/esm/types/actions/actionCell.js.map +1 -1
- package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts +7 -0
- package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsEntityPage/Fields/ImageInput.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsTable/AutoPatternsTable.d.ts.map +1 -1
- package/dist/types/hooks/useActionCell.d.ts.map +1 -1
- package/dist/types/hooks/useBaseTableFeatures.d.ts +1 -0
- package/dist/types/hooks/useBaseTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableFeatures.d.ts +1 -0
- package/dist/types/hooks/useTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts +1 -0
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts.map +1 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts +1 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +8 -1
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
- package/dist/types/types/actions/actionCell.d.ts +1 -0
- package/dist/types/types/actions/actionCell.d.ts.map +1 -1
- package/package.json +13 -13
|
@@ -17,7 +17,7 @@ export const useActionCell = _ref => {
|
|
|
17
17
|
collectionId
|
|
18
18
|
});
|
|
19
19
|
const buildCellActions = useCallback((item, index, api) => {
|
|
20
|
-
var _config$primaryAction, _config$secondaryActi, _config$secondaryActi2, _config$secondaryActi3, _config$secondaryActi4;
|
|
20
|
+
var _config$primaryAction, _config$primaryAction2, _config$secondaryActi, _config$secondaryActi2, _config$secondaryActi3, _config$secondaryActi4;
|
|
21
21
|
const buildAction = actionConfig => {
|
|
22
22
|
if (actionConfig.type === 'divider') {
|
|
23
23
|
return {
|
|
@@ -71,6 +71,11 @@ export const useActionCell = _ref => {
|
|
|
71
71
|
};
|
|
72
72
|
};
|
|
73
73
|
const primaryAction = config != null && (_config$primaryAction = config.primaryAction) != null && _config$primaryAction.item ? buildAction(config.primaryAction.item) : undefined;
|
|
74
|
+
const primaryActionProps = {
|
|
75
|
+
...(config != null && (_config$primaryAction2 = config.primaryAction) != null && _config$primaryAction2.alwaysVisible ? {
|
|
76
|
+
visibility: 'always'
|
|
77
|
+
} : {})
|
|
78
|
+
};
|
|
74
79
|
const rawSecondaryActions = config != null && (_config$secondaryActi = config.secondaryActions) != null && _config$secondaryActi.items.length ? config.secondaryActions.items.map(buildAction).filter(Boolean) : [];
|
|
75
80
|
|
|
76
81
|
// Process secondary actions with inline count consideration
|
|
@@ -82,7 +87,10 @@ export const useActionCell = _ref => {
|
|
|
82
87
|
}
|
|
83
88
|
return {
|
|
84
89
|
...(primaryAction ? {
|
|
85
|
-
primaryAction
|
|
90
|
+
primaryAction: {
|
|
91
|
+
...primaryAction,
|
|
92
|
+
...primaryActionProps
|
|
93
|
+
}
|
|
86
94
|
} : {
|
|
87
95
|
primaryAction: undefined
|
|
88
96
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useActionsSDK","updateAction","customAction","resolveAction","deleteAction","cleanupActionsWithDividers","actions","inlineCount","clean","a","filter","x","i","ar","_ar","divider","length","slice","useActionCell","_ref","config","collectionId","sdk","buildCellActions","item","index","api","_config$primaryAction","_config$secondaryActi","_config$secondaryActi2","_config$secondaryActi3","_config$secondaryActi4","buildAction","actionConfig","type","actionToResolve","baseParams","actionParams","action","resolvedAction","label","tooltip","resolvedActionProps","text","disabledDescription","primaryAction","undefined","rawSecondaryActions","secondaryActions","items","map","Boolean","numOfVisibleSecondaryActions","alwaysShowSecondaryActions","inlineAlwaysVisible"],"sources":["../../../src/hooks/useActionCell.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport {\n ActionCellConfig,\n ActionCellItemConfig,\n ResolvedAction,\n} from '../types';\nimport { useActionsSDK } from './useActionsSDK';\nimport {\n updateAction,\n customAction,\n resolveAction,\n deleteAction,\n} from '../utils/actions';\nimport { DividerActionConfig } from '../types/actions/base';\n\nexport interface useActionCellParams {\n config?: ActionCellConfig;\n collectionId: string;\n}\n\nconst cleanupActionsWithDividers = (\n actions: any[],\n inlineCount?: number,\n): any[] => {\n const clean = (a: any[]) =>\n a.filter(\n (x, i, ar) =>\n x?.divider !== true ||\n (i > 0 && i < ar.length - 1 && ar[i - 1]?.divider !== true),\n );\n return !actions?.length || !inlineCount || inlineCount >= actions.length\n ? clean(actions || [])\n : [\n
|
|
1
|
+
{"version":3,"names":["useCallback","useActionsSDK","updateAction","customAction","resolveAction","deleteAction","cleanupActionsWithDividers","actions","inlineCount","clean","a","filter","x","i","ar","_ar","divider","length","slice","useActionCell","_ref","config","collectionId","sdk","buildCellActions","item","index","api","_config$primaryAction","_config$primaryAction2","_config$secondaryActi","_config$secondaryActi2","_config$secondaryActi3","_config$secondaryActi4","buildAction","actionConfig","type","actionToResolve","baseParams","actionParams","action","resolvedAction","label","tooltip","resolvedActionProps","text","disabledDescription","primaryAction","undefined","primaryActionProps","alwaysVisible","visibility","rawSecondaryActions","secondaryActions","items","map","Boolean","numOfVisibleSecondaryActions","alwaysShowSecondaryActions","inlineAlwaysVisible"],"sources":["../../../src/hooks/useActionCell.ts"],"sourcesContent":["import { useCallback } from 'react';\nimport {\n ActionCellConfig,\n ActionCellItemConfig,\n ResolvedAction,\n} from '../types';\nimport { useActionsSDK } from './useActionsSDK';\nimport {\n updateAction,\n customAction,\n resolveAction,\n deleteAction,\n} from '../utils/actions';\nimport { DividerActionConfig } from '../types/actions/base';\n\nexport interface useActionCellParams {\n config?: ActionCellConfig;\n collectionId: string;\n}\n\nconst cleanupActionsWithDividers = (\n actions: any[],\n inlineCount?: number,\n): any[] => {\n const clean = (a: any[]) =>\n a.filter(\n (x, i, ar) =>\n x?.divider !== true ||\n (i > 0 && i < ar.length - 1 && ar[i - 1]?.divider !== true),\n );\n return !actions?.length || !inlineCount || inlineCount >= actions.length\n ? clean(actions || [])\n : [\n ...clean(actions.slice(0, inlineCount)),\n ...clean(actions.slice(inlineCount)),\n ];\n};\n\nexport const useActionCell = ({\n config,\n collectionId,\n}: useActionCellParams) => {\n const sdk = useActionsSDK({\n collectionId,\n });\n\n const buildCellActions = useCallback(\n (item, index, api) => {\n const buildAction = (\n actionConfig: ActionCellItemConfig | DividerActionConfig,\n ) => {\n if (actionConfig.type === 'divider') {\n return { divider: true };\n }\n\n let actionToResolve: Partial<ResolvedAction> | null = null;\n\n const baseParams = {\n actionParams: { item, index, api },\n sdk,\n };\n\n switch (actionConfig.type) {\n case 'update':\n actionToResolve = updateAction({\n action: actionConfig,\n ...baseParams,\n });\n break;\n\n case 'delete':\n actionToResolve = deleteAction({\n action: actionConfig,\n ...baseParams,\n });\n break;\n\n case 'custom':\n actionToResolve = customAction({\n action: actionConfig,\n ...baseParams,\n });\n break;\n\n default:\n return null;\n }\n\n if (!actionToResolve) {\n return null;\n }\n\n const resolvedAction = resolveAction(actionConfig, actionToResolve);\n const { label, tooltip, ...resolvedActionProps } = resolvedAction;\n\n return {\n ...resolvedActionProps,\n text: resolvedAction.label,\n disabledDescription: resolvedAction.tooltip,\n };\n };\n\n const primaryAction = config?.primaryAction?.item\n ? buildAction(config.primaryAction.item)\n : undefined;\n\n const primaryActionProps = {\n ...(config?.primaryAction?.alwaysVisible\n ? { visibility: 'always' }\n : {}),\n };\n\n const rawSecondaryActions = config?.secondaryActions?.items.length\n ? config.secondaryActions.items.map(buildAction).filter(Boolean)\n : [];\n\n // Process secondary actions with inline count consideration\n const secondaryActions = cleanupActionsWithDividers(\n rawSecondaryActions,\n config?.secondaryActions?.inlineCount,\n );\n\n const numOfVisibleSecondaryActions =\n config?.secondaryActions?.inlineCount;\n const alwaysShowSecondaryActions =\n config?.secondaryActions?.inlineAlwaysVisible;\n\n if (!primaryAction && !secondaryActions.length) {\n return {};\n }\n\n return {\n ...(primaryAction\n ? {\n primaryAction: {\n ...primaryAction,\n ...primaryActionProps,\n },\n }\n : { primaryAction: undefined }),\n ...(secondaryActions.length && { secondaryActions }),\n numOfVisibleSecondaryActions,\n alwaysShowSecondaryActions,\n };\n },\n [config, sdk],\n );\n\n return buildCellActions;\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AAMnC,SAASC,aAAa,QAAQ,iBAAiB;AAC/C,SACEC,YA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yColumns = configuration.stickyColumns;
|
|
23
23
|
const stickySelectionColumn = !!stickyColumns; // Sticky selection column is true if stickyColumns is positive number
|
|
24
|
-
|
|
24
|
+
const showTitleBar = configuration.showTitleBar ?? true;
|
|
25
25
|
return {
|
|
26
26
|
columns,
|
|
27
27
|
visibleFieldIds,
|
|
28
28
|
onRowClick,
|
|
29
29
|
customColumns: (_configuration$custom = configuration.customColumns) != null && _configuration$custom.enabled ? /*#__PURE__*/React.createElement(CustomColumns, null) : undefined,
|
|
30
30
|
stickyColumns,
|
|
31
|
-
stickySelectionColumn
|
|
31
|
+
stickySelectionColumn,
|
|
32
|
+
showTitleBar
|
|
32
33
|
};
|
|
33
34
|
};
|
|
34
35
|
//# sourceMappingURL=useBaseTableFeatures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useMemo","useColumns","CustomColumns","useCollectionPageOnRowClickActions","useNavigation","useBaseTableFeatures","configuration","_configuration$custom","navigateToEntityPage","columns","visibleFieldIds","map","column","id","entityPageId","onRowClickOverride","collectionPageOnRowClickActions","onRowClick","collectionId","collection","item","stickyColumns","stickySelectionColumn","customColumns","enabled","createElement","undefined"],"sources":["../../../src/hooks/useBaseTableFeatures.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { TableConfig } from '../types';\nimport { useColumns } from './useColumns';\nimport { CustomColumns } from '@wix/patterns';\nimport { useCollectionPageOnRowClickActions } from './useCollectionPageOnRowClickActions';\nimport { useNavigation } from './useNavigationUtils';\n\nexport const useBaseTableFeatures = (configuration: TableConfig) => {\n const { navigateToEntityPage } = useNavigation();\n const columns = useColumns(configuration.columns);\n const visibleFieldIds = useMemo(\n () => configuration.columns.map((column) => column.id),\n [configuration],\n );\n\n const entityPageId = configuration.entityPageId;\n\n const onRowClickOverride = useCollectionPageOnRowClickActions({\n collectionPageOnRowClickActions: configuration.onRowClick,\n collectionId: configuration.collection.collectionId,\n });\n\n const onRowClick = configuration.onRowClick\n ? onRowClickOverride\n : (item: any) =>\n navigateToEntityPage({\n item,\n entityPageId,\n });\n\n const stickyColumns = configuration.stickyColumns;\n const stickySelectionColumn = !!stickyColumns; // Sticky selection column is true if stickyColumns is positive number\n\n return {\n columns,\n visibleFieldIds,\n onRowClick,\n customColumns: configuration.customColumns?.enabled ? (\n <CustomColumns />\n ) : undefined,\n stickyColumns,\n stickySelectionColumn,\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,kCAAkC,QAAQ,sCAAsC;AACzF,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,OAAO,MAAMC,oBAAoB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA;EAClE,MAAM;IAAEC;EAAqB,CAAC,GAAGJ,aAAa,CAAC,CAAC;EAChD,MAAMK,OAAO,GAAGR,UAAU,CAACK,aAAa,CAACG,OAAO,CAAC;EACjD,MAAMC,eAAe,GAAGV,OAAO,CAC7B,MAAMM,aAAa,CAACG,OAAO,CAACE,GAAG,CAAEC,MAAM,IAAKA,MAAM,CAACC,EAAE,CAAC,EACtD,CAACP,aAAa,CAChB,CAAC;EAED,MAAMQ,YAAY,GAAGR,aAAa,CAACQ,YAAY;EAE/C,MAAMC,kBAAkB,GAAGZ,kCAAkC,CAAC;IAC5Da,+BAA+B,EAAEV,aAAa,CAACW,UAAU;IACzDC,YAAY,EAAEZ,aAAa,CAACa,UAAU,CAACD;EACzC,CAAC,CAAC;EAEF,MAAMD,UAAU,GAAGX,aAAa,CAACW,UAAU,GACvCF,kBAAkB,GACjBK,IAAS,IACRZ,oBAAoB,CAAC;IACnBY,IAAI;IACJN;EACF,CAAC,CAAC;EAER,MAAMO,aAAa,GAAGf,aAAa,CAACe,aAAa;EACjD,MAAMC,qBAAqB,GAAG,CAAC,CAACD,aAAa,CAAC,CAAC
|
|
1
|
+
{"version":3,"names":["React","useMemo","useColumns","CustomColumns","useCollectionPageOnRowClickActions","useNavigation","useBaseTableFeatures","configuration","_configuration$custom","navigateToEntityPage","columns","visibleFieldIds","map","column","id","entityPageId","onRowClickOverride","collectionPageOnRowClickActions","onRowClick","collectionId","collection","item","stickyColumns","stickySelectionColumn","showTitleBar","customColumns","enabled","createElement","undefined"],"sources":["../../../src/hooks/useBaseTableFeatures.tsx"],"sourcesContent":["import React, { useMemo } from 'react';\nimport { TableConfig } from '../types';\nimport { useColumns } from './useColumns';\nimport { CustomColumns } from '@wix/patterns';\nimport { useCollectionPageOnRowClickActions } from './useCollectionPageOnRowClickActions';\nimport { useNavigation } from './useNavigationUtils';\n\nexport const useBaseTableFeatures = (configuration: TableConfig) => {\n const { navigateToEntityPage } = useNavigation();\n const columns = useColumns(configuration.columns);\n const visibleFieldIds = useMemo(\n () => configuration.columns.map((column) => column.id),\n [configuration],\n );\n\n const entityPageId = configuration.entityPageId;\n\n const onRowClickOverride = useCollectionPageOnRowClickActions({\n collectionPageOnRowClickActions: configuration.onRowClick,\n collectionId: configuration.collection.collectionId,\n });\n\n const onRowClick = configuration.onRowClick\n ? onRowClickOverride\n : (item: any) =>\n navigateToEntityPage({\n item,\n entityPageId,\n });\n\n const stickyColumns = configuration.stickyColumns;\n const stickySelectionColumn = !!stickyColumns; // Sticky selection column is true if stickyColumns is positive number\n const showTitleBar = configuration.showTitleBar ?? true;\n\n return {\n columns,\n visibleFieldIds,\n onRowClick,\n customColumns: configuration.customColumns?.enabled ? (\n <CustomColumns />\n ) : undefined,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n };\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AAEtC,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,aAAa,QAAQ,eAAe;AAC7C,SAASC,kCAAkC,QAAQ,sCAAsC;AACzF,SAASC,aAAa,QAAQ,sBAAsB;AAEpD,OAAO,MAAMC,oBAAoB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA;EAClE,MAAM;IAAEC;EAAqB,CAAC,GAAGJ,aAAa,CAAC,CAAC;EAChD,MAAMK,OAAO,GAAGR,UAAU,CAACK,aAAa,CAACG,OAAO,CAAC;EACjD,MAAMC,eAAe,GAAGV,OAAO,CAC7B,MAAMM,aAAa,CAACG,OAAO,CAACE,GAAG,CAAEC,MAAM,IAAKA,MAAM,CAACC,EAAE,CAAC,EACtD,CAACP,aAAa,CAChB,CAAC;EAED,MAAMQ,YAAY,GAAGR,aAAa,CAACQ,YAAY;EAE/C,MAAMC,kBAAkB,GAAGZ,kCAAkC,CAAC;IAC5Da,+BAA+B,EAAEV,aAAa,CAACW,UAAU;IACzDC,YAAY,EAAEZ,aAAa,CAACa,UAAU,CAACD;EACzC,CAAC,CAAC;EAEF,MAAMD,UAAU,GAAGX,aAAa,CAACW,UAAU,GACvCF,kBAAkB,GACjBK,IAAS,IACRZ,oBAAoB,CAAC;IACnBY,IAAI;IACJN;EACF,CAAC,CAAC;EAER,MAAMO,aAAa,GAAGf,aAAa,CAACe,aAAa;EACjD,MAAMC,qBAAqB,GAAG,CAAC,CAACD,aAAa,CAAC,CAAC;EAC/C,MAAME,YAAY,GAAGjB,aAAa,CAACiB,YAAY,IAAI,IAAI;EAEvD,OAAO;IACLd,OAAO;IACPC,eAAe;IACfO,UAAU;IACVO,aAAa,EAAE,CAAAjB,qBAAA,GAAAD,aAAa,CAACkB,aAAa,aAA3BjB,qBAAA,CAA6BkB,OAAO,gBACjD1B,KAAA,CAAA2B,aAAA,CAACxB,aAAa,MAAE,CAAC,GACfyB,SAAS;IACbN,aAAa;IACbC,qBAAqB;IACrBC;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -26,7 +26,8 @@ export const useTableFeatures = configuration => {
|
|
|
26
26
|
columns,
|
|
27
27
|
onRowClick,
|
|
28
28
|
stickyColumns,
|
|
29
|
-
stickySelectionColumn
|
|
29
|
+
stickySelectionColumn,
|
|
30
|
+
showTitleBar
|
|
30
31
|
} = useBaseTableFeatures(configuration);
|
|
31
32
|
const {
|
|
32
33
|
fetchData
|
|
@@ -73,6 +74,7 @@ export const useTableFeatures = configuration => {
|
|
|
73
74
|
onRowClick,
|
|
74
75
|
stickyColumns,
|
|
75
76
|
stickySelectionColumn,
|
|
77
|
+
showTitleBar,
|
|
76
78
|
sections
|
|
77
79
|
};
|
|
78
80
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useFetchData","TableSections","useTableCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseTableFeatures","usePatternsWizardOverridesContext","useTableFeatures","configuration","_configuration$sectio","_overrides$sections","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","customColumns","visibleFieldIds","columns","onRowClick","stickyColumns","stickySelectionColumn","fetchData","searchableFieldIds","schema","overrides","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","optimisticActions","commonFeatures","sections","id","renderSection","undefined"],"sources":["../../../src/hooks/useTableFeatures.tsx"],"sourcesContent":["import { TableConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { TableSections, useTableCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\nimport { usePatternsWizardOverridesContext } from '../providers/PatternsWizardOverridesContext';\n\nexport const useTableFeatures = (configuration: TableConfig) => {\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = configuration.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n configuration.filters,\n );\n const {\n customColumns,\n visibleFieldIds,\n columns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n } = useBaseTableFeatures(configuration);\n\n const { fetchData } = useFetchData({\n searchableFieldIds: visibleFieldIds,\n filterFieldMapping,\n });\n\n const schema = useSchema();\n const overrides = usePatternsWizardOverridesContext();\n\n const state = useTableCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...configuration,\n optimisticActions,\n });\n\n const sections =\n configuration.sections?.id &&\n overrides?.sections?.[configuration.sections.id]\n ? {\n renderSection: overrides.sections[configuration.sections.id],\n TableSections,\n }\n : undefined;\n\n return {\n ...commonFeatures,\n state,\n columns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n sections,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,eAAe;AACjE,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,iCAAiC,QAAQ,6CAA6C;AAE/F,OAAO,MAAMC,gBAAgB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA,EAAAC,mBAAA;EAC9D,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGP,aAAa,CAACQ,UAAU;EAE5B,MAAM;IAAEC,eAAe;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GAAGjB,UAAU,CACvEM,aAAa,CAACY,OAChB,CAAC;EACD,MAAM;IACJC,aAAa;IACbC,eAAe;IACfC,OAAO;IACPC,UAAU;IACVC,aAAa;IACbC;EACF,CAAC,
|
|
1
|
+
{"version":3,"names":["useFetchData","TableSections","useTableCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseTableFeatures","usePatternsWizardOverridesContext","useTableFeatures","configuration","_configuration$sectio","_overrides$sections","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","customColumns","visibleFieldIds","columns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","searchableFieldIds","schema","overrides","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","optimisticActions","commonFeatures","sections","id","renderSection","undefined"],"sources":["../../../src/hooks/useTableFeatures.tsx"],"sourcesContent":["import { TableConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { TableSections, useTableCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\nimport { usePatternsWizardOverridesContext } from '../providers/PatternsWizardOverridesContext';\n\nexport const useTableFeatures = (configuration: TableConfig) => {\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = configuration.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n configuration.filters,\n );\n const {\n customColumns,\n visibleFieldIds,\n columns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n } = useBaseTableFeatures(configuration);\n\n const { fetchData } = useFetchData({\n searchableFieldIds: visibleFieldIds,\n filterFieldMapping,\n });\n\n const schema = useSchema();\n const overrides = usePatternsWizardOverridesContext();\n\n const state = useTableCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...configuration,\n optimisticActions,\n });\n\n const sections =\n configuration.sections?.id &&\n overrides?.sections?.[configuration.sections.id]\n ? {\n renderSection: overrides.sections[configuration.sections.id],\n TableSections,\n }\n : undefined;\n\n return {\n ...commonFeatures,\n state,\n columns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n sections,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,aAAa,EAAEC,kBAAkB,QAAQ,eAAe;AACjE,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,oBAAoB,QAAQ,wBAAwB;AAC7D,SAASC,iCAAiC,QAAQ,6CAA6C;AAE/F,OAAO,MAAMC,gBAAgB,GAAIC,aAA0B,IAAK;EAAA,IAAAC,qBAAA,EAAAC,mBAAA;EAC9D,MAAM;IACJC,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGP,aAAa,CAACQ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,CAAAzC,qBAAA,GAAAD,aAAa,CAAC0C,QAAQ,aAAtBzC,qBAAA,CAAwB0C,EAAE,IAC1BpB,SAAS,aAAArB,mBAAA,GAATqB,SAAS,CAAEmB,QAAQ,aAAnBxC,mBAAA,CAAsBF,aAAa,CAAC0C,QAAQ,CAACC,EAAE,CAAC,GAC5C;IACEC,aAAa,EAAErB,SAAS,CAACmB,QAAQ,CAAC1C,aAAa,CAAC0C,QAAQ,CAACC,EAAE,CAAC;IAC5DpD;EACF,CAAC,GACDsD,SAAS;EAEf,OAAO;IACL,GAAGJ,cAAc;IACjBjB,KAAK;IACLT,OAAO;IACPH,OAAO,EAAEH,eAAe;IACxB+B,iBAAiB;IACjB3B,aAAa;IACbG,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrBC,YAAY;IACZuB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -32,7 +32,8 @@ export const useTableGridSwitchFeatures = config => {
|
|
|
32
32
|
columns: tableColumns,
|
|
33
33
|
onRowClick,
|
|
34
34
|
stickyColumns,
|
|
35
|
-
stickySelectionColumn
|
|
35
|
+
stickySelectionColumn,
|
|
36
|
+
showTitleBar
|
|
36
37
|
} = useBaseTableFeatures(config);
|
|
37
38
|
const {
|
|
38
39
|
fetchData: tableFetchData
|
|
@@ -77,7 +78,8 @@ export const useTableGridSwitchFeatures = config => {
|
|
|
77
78
|
// Grid specific features
|
|
78
79
|
imagePlacement,
|
|
79
80
|
preset,
|
|
80
|
-
renderItem
|
|
81
|
+
renderItem,
|
|
82
|
+
showTitleBar
|
|
81
83
|
};
|
|
82
84
|
};
|
|
83
85
|
//# sourceMappingURL=useTableGridSwitchFeatures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useFetchData","useTableGridSwitchCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseGridFeatures","useBaseTableFeatures","useTableGridSwitchFeatures","config","schema","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","preset","imagePlacement","visibleFieldIds","gridVisibleFieldIds","renderItem","customColumns","tableVisibleFieldIds","columns","tableColumns","onRowClick","stickyColumns","stickySelectionColumn","fetchData","tableFetchData","searchableFieldIds","Array","from","Set","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","optimisticActions","commonFeatures","horizontalScroll"],"sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"sourcesContent":["import { TableGridSwitchConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { useTableGridSwitchCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseGridFeatures } from './useBaseGridFeatures';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\n\nexport const useTableGridSwitchFeatures = (config: TableGridSwitchConfig) => {\n const schema = useSchema();\n\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = config.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n config.filters,\n );\n\n const {\n preset,\n imagePlacement,\n visibleFieldIds: gridVisibleFieldIds,\n renderItem,\n } = useBaseGridFeatures(config);\n\n const {\n customColumns,\n visibleFieldIds: tableVisibleFieldIds,\n columns: tableColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n } = useBaseTableFeatures(config);\n\n const { fetchData: tableFetchData } = useFetchData({\n searchableFieldIds: Array.from(\n new Set([...tableVisibleFieldIds, ...gridVisibleFieldIds]),\n ),\n filterFieldMapping,\n });\n\n const state = useTableGridSwitchCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData: tableFetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...config,\n optimisticActions,\n });\n\n return {\n ...commonFeatures,\n state,\n columns: tableColumns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n horizontalScroll: true,\n // Grid specific features\n imagePlacement,\n preset,\n renderItem,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,4BAA4B,QAAQ,eAAe;AAC5D,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D,OAAO,MAAMC,0BAA0B,GAAIC,MAA6B,IAAK;EAC3E,MAAMC,MAAM,GAAGN,SAAS,CAAC,CAAC;EAE1B,MAAM;IACJO,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGN,MAAM,CAACO,UAAU;EAErB,MAAM;IAAEC,eAAe;IAAEC,aAAa;IAAEC;EAAmB,CAAC,GAAGhB,UAAU,CACvEM,MAAM,CAACW,OACT,CAAC;EAED,MAAM;IACJC,MAAM;IACNC,cAAc;IACdC,eAAe,EAAEC,mBAAmB;IACpCC;EACF,CAAC,GAAGnB,mBAAmB,CAACG,MAAM,CAAC;EAE/B,MAAM;IACJiB,aAAa;IACbH,eAAe,EAAEI,oBAAoB;IACrCC,OAAO,EAAEC,YAAY;IACrBC,UAAU;IACVC,aAAa;IACbC;EACF,CAAC,
|
|
1
|
+
{"version":3,"names":["useFetchData","useTableGridSwitchCollection","useCommonCollectionFeatures","useFilters","useSchema","useAutoPatternsOptimisticActions","useBaseGridFeatures","useBaseTableFeatures","useTableGridSwitchFeatures","config","schema","collectionId","limit","reflectQueryInUrl","selectAllScope","selectionUpdateMode","collection","filterComponent","filtersObject","filterFieldMapping","filters","preset","imagePlacement","visibleFieldIds","gridVisibleFieldIds","renderItem","customColumns","tableVisibleFieldIds","columns","tableColumns","onRowClick","stickyColumns","stickySelectionColumn","showTitleBar","fetchData","tableFetchData","searchableFieldIds","Array","from","Set","state","queryName","itemKey","item","idField","itemName","displayField","toExtendedFields","extendedFields","fetchErrorMessage","_ref","err","String","persistQueryToUrl","disableAutoSelectAllCount","selectionConsistencyMode","optimisticActions","commonFeatures","horizontalScroll"],"sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"sourcesContent":["import { TableGridSwitchConfig } from '../types';\nimport { useFetchData } from './useFetchData';\nimport { useTableGridSwitchCollection } from '@wix/patterns';\nimport { useCommonCollectionFeatures } from './useCommonCollectionFeatures';\nimport { useFilters } from './useFilters';\nimport { useSchema } from '../providers/SchemaContext';\nimport { useAutoPatternsOptimisticActions } from './useAutoPatternsOptimisticActions';\nimport { useBaseGridFeatures } from './useBaseGridFeatures';\nimport { useBaseTableFeatures } from './useBaseTableFeatures';\n\nexport const useTableGridSwitchFeatures = (config: TableGridSwitchConfig) => {\n const schema = useSchema();\n\n const {\n collectionId,\n limit,\n reflectQueryInUrl,\n selectAllScope,\n selectionUpdateMode,\n } = config.collection;\n\n const { filterComponent, filtersObject, filterFieldMapping } = useFilters(\n config.filters,\n );\n\n const {\n preset,\n imagePlacement,\n visibleFieldIds: gridVisibleFieldIds,\n renderItem,\n } = useBaseGridFeatures(config);\n\n const {\n customColumns,\n visibleFieldIds: tableVisibleFieldIds,\n columns: tableColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n showTitleBar,\n } = useBaseTableFeatures(config);\n\n const { fetchData: tableFetchData } = useFetchData({\n searchableFieldIds: Array.from(\n new Set([...tableVisibleFieldIds, ...gridVisibleFieldIds]),\n ),\n filterFieldMapping,\n });\n\n const state = useTableGridSwitchCollection<any>({\n queryName: `${collectionId}`,\n itemKey: (item) => item[schema.idField],\n itemName: (item) => item[schema.displayField],\n filters: filtersObject,\n toExtendedFields: (item) => item.extendedFields,\n fetchErrorMessage: ({ err }) => String(err),\n fetchData: tableFetchData,\n limit,\n persistQueryToUrl: reflectQueryInUrl,\n disableAutoSelectAllCount: selectAllScope === 'page',\n selectionConsistencyMode: selectionUpdateMode,\n });\n\n const optimisticActions = useAutoPatternsOptimisticActions(\n collectionId,\n state.collection,\n );\n\n const commonFeatures = useCommonCollectionFeatures({\n ...config,\n optimisticActions,\n });\n\n return {\n ...commonFeatures,\n state,\n columns: tableColumns,\n filters: filterComponent,\n optimisticActions,\n customColumns,\n onRowClick,\n stickyColumns,\n stickySelectionColumn,\n horizontalScroll: true,\n // Grid specific features\n imagePlacement,\n preset,\n renderItem,\n showTitleBar,\n };\n};\n"],"mappings":"AACA,SAASA,YAAY,QAAQ,gBAAgB;AAC7C,SAASC,4BAA4B,QAAQ,eAAe;AAC5D,SAASC,2BAA2B,QAAQ,+BAA+B;AAC3E,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,gCAAgC,QAAQ,oCAAoC;AACrF,SAASC,mBAAmB,QAAQ,uBAAuB;AAC3D,SAASC,oBAAoB,QAAQ,wBAAwB;AAE7D,OAAO,MAAMC,0BAA0B,GAAIC,MAA6B,IAAK;EAC3E,MAAMC,MAAM,GAAGN,SAAS,CAAC,CAAC;EAE1B,MAAM;IACJO,YAAY;IACZC,KAAK;IACLC,iBAAiB;IACjBC,cAAc;IACdC;EACF,CAAC,GAAGN,MAAM,CAACO,UAAU;EAErB,MAAM;IAAEC,eA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xDM,YAAY,EACZ6B,KAAK,CAACxB,UACR,CAAC;EAED,MAAMyC,cAAc,GAAGvD,2BAA2B,CAAC;IACjD,GAAGO,MAAM;IACT+C;EACF,CAAC,CAAC;EAEF,OAAO;IACL,GAAGC,cAAc;IACjBjB,KAAK;IACLZ,OAAO,EAAEC,YAAY;IACrBT,OAAO,EAAEH,eAAe;IACxBuC,iBAAiB;IACjB9B,aAAa;IACbI,UAAU;IACVC,aAAa;IACbC,qBAAqB;IACrB0B,gBAAgB,EAAE,IAAI;IACtB;IACApC,cAAc;IACdD,MAAM;IACNI,UAAU;IACVQ;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","createContext","useContext","PatternsWizardOverridesContext","undefined","PatternsWizardOverridesProvider","_ref","children","value","createElement","Provider","usePatternsWizardOverridesContext"],"sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from 'react';\nimport {\n CustomComponentProps,\n EntityPageMoreActionsActionParams,\n IColumnValue,\n SchemaConfig,\n} from '../types';\n\nimport { Section } from '@wix/patterns';\n\nimport { CustomActionParams, ResolvedAction } from '../utils/actions/types';\nimport {\n CollectionPageActionOnRowClickParams,\n CollectionPageActionParams,\n} from '../types/actions/collectionPageActions';\nimport { ActionCellActionParams } from '../types/actions/actionCell';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<\n string,\n (\n props: CustomActionParams<\n | EntityPageMoreActionsActionParams\n | CollectionPageActionParams\n | ActionCellActionParams\n | CollectionPageActionOnRowClickParams\n >,\n ) => ResolvedAction\n >;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n modals?: Record<string, React.FC<any>>;\n
|
|
1
|
+
{"version":3,"names":["React","createContext","useContext","PatternsWizardOverridesContext","undefined","PatternsWizardOverridesProvider","_ref","children","value","createElement","Provider","usePatternsWizardOverridesContext"],"sources":["../../../src/providers/PatternsWizardOverridesContext.tsx"],"sourcesContent":["import React, { createContext, useContext, ReactNode } from 'react';\nimport {\n CustomComponentProps,\n EntityPageMoreActionsActionParams,\n IColumnValue,\n SchemaConfig,\n} from '../types';\n\nimport { Section } from '@wix/patterns';\n\nimport { CustomActionParams, ResolvedAction } from '../utils/actions/types';\nimport {\n CollectionPageActionOnRowClickParams,\n CollectionPageActionParams,\n} from '../types/actions/collectionPageActions';\nimport { ActionCellActionParams } from '../types/actions/actionCell';\n\nexport interface PatternsWizardOverridesContextProps {\n actions?: Record<\n string,\n (\n props: CustomActionParams<\n | EntityPageMoreActionsActionParams\n | CollectionPageActionParams\n | ActionCellActionParams\n | CollectionPageActionOnRowClickParams\n >,\n ) => ResolvedAction\n >;\n columns?: Record<string, (props: IColumnValue<any>) => void>;\n modals?: Record<string, React.FC<any>>;\n emptyState?: Record<string, () => void>;\n components?: Record<string, React.FC<CustomComponentProps>>;\n slots?: Record<string, React.FC>;\n customDataSources?: Record<\n string,\n (collectionId: string, context: any) => Promise<SchemaConfig>\n >;\n sections?: Record<string, (item: any) => Section>;\n}\n\nconst PatternsWizardOverridesContext = createContext<\n PatternsWizardOverridesContextProps | undefined\n>(undefined);\n\nexport const PatternsWizardOverridesProvider: React.FC<{\n children: ReactNode;\n value: PatternsWizardOverridesContextProps;\n}> = ({ children, value }) => {\n return (\n <PatternsWizardOverridesContext.Provider value={value}>\n {children}\n </PatternsWizardOverridesContext.Provider>\n );\n};\n\nexport const usePatternsWizardOverridesContext = ():\n | PatternsWizardOverridesContextProps\n | undefined => {\n return useContext(PatternsWizardOverridesContext);\n};\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,QAAmB,OAAO;AAyCnE,MAAMC,8BAA8B,gBAAGF,aAAa,CAElDG,SAAS,CAAC;AAEZ,OAAO,MAAMC,+BAGX,GAAGC,IAAA,IAAyB;EAAA,IAAxB;IAAEC,QAAQ;IAAEC;EAAM,CAAC,GAAAF,IAAA;EACvB,oBACEN,KAAA,CAAAS,aAAA,CAACN,8BAA8B,CAACO,QAAQ;IAACF,KAAK,EAAEA;EAAM,GACnDD,QACsC,CAAC;AAE9C,CAAC;AAED,OAAO,MAAMI,iCAAiC,GAAGA,CAAA,KAEhC;EACf,OAAOT,UAAU,CAACC,8BAA8B,CAAC;AACnD,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["ComponentTypeEnum"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport { DateRangeFilterMode, DateRangeOptions } from '@wix/patterns/core';\nimport { BaseCollectionConfig } from './types';\nimport {\n ActionCellConfig,\n BulkActionsConfig,\n CollectionPageOnRowClickActionConfig,\n CollectionPagePrimaryActions,\n CollectionPageSecondaryActions,\n} from './actions';\n\nexport interface CollectionPageTitle {\n text: string;\n hideTotal?: boolean;\n}\n\nexport interface CollectionPageSubtitle {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n}\n\nexport interface CollectionPageConfig {\n route: {\n path: string;\n };\n title: CollectionPageTitle;\n subtitle?: CollectionPageSubtitle;\n actions?: {\n primaryActions?: CollectionPagePrimaryActions;\n secondaryActions?: CollectionPageSecondaryActions;\n };\n components: ComponentConfig[];\n}\n\nexport interface
|
|
1
|
+
{"version":3,"names":["ComponentTypeEnum"],"sources":["../../../src/types/CollectionPageConfig.ts"],"sourcesContent":["import { CollectionToolbarFiltersProps } from '@wix/patterns';\nimport { DateRangeFilterMode, DateRangeOptions } from '@wix/patterns/core';\nimport { BaseCollectionConfig } from './types';\nimport {\n ActionCellConfig,\n BulkActionsConfig,\n CollectionPageOnRowClickActionConfig,\n CollectionPagePrimaryActions,\n CollectionPageSecondaryActions,\n} from './actions';\n\nexport interface CollectionPageTitle {\n text: string;\n hideTotal?: boolean;\n}\n\nexport interface CollectionPageSubtitle {\n text: string;\n learnMore?: {\n url: string;\n label?: string;\n };\n}\n\nexport interface CollectionPageConfig {\n route: {\n path: string;\n };\n title: CollectionPageTitle;\n subtitle?: CollectionPageSubtitle;\n actions?: {\n primaryActions?: CollectionPagePrimaryActions;\n secondaryActions?: CollectionPageSecondaryActions;\n };\n components: ComponentConfig[];\n}\n\nexport interface CollectionComponentConfig\n extends BaseCollectionComponentConfig {\n type: 'collection';\n layout: LayoutItemConfig[];\n}\n\nexport interface CustomComponentConfig {\n type: 'custom';\n id: string;\n}\n\nexport type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;\n\nexport interface LayoutItemConfig {\n type: 'Table' | 'Grid';\n table?: TableSpecificConfig;\n grid?: GridSpecificConfig;\n}\n\nexport type ColumnsConfig = Column[];\n\nexport interface TableSpecificConfig {\n columns: ColumnsConfig;\n customColumns?: {\n enabled: boolean;\n };\n stickyColumns?: number;\n onRowClick?: CollectionPageOnRowClickActionConfig;\n showTitleBar?: boolean;\n sections?: {\n id: string;\n };\n}\n\nexport interface GridSpecificConfig {\n item: GridItem;\n}\n\nexport interface TableConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig {}\nexport interface GridConfig\n extends BaseCollectionComponentConfig,\n GridSpecificConfig {}\nexport interface TableGridSwitchConfig\n extends BaseCollectionComponentConfig,\n TableSpecificConfig,\n GridSpecificConfig {}\n\nexport type CollectionConfig = BaseCollectionConfig & {\n limit?: number;\n reflectQueryInUrl?: boolean;\n selectAllScope?: 'page' | 'all';\n selectionUpdateMode?: 'preserve' | 'clear';\n};\n\nexport interface BaseCollectionComponentConfig {\n collection: CollectionConfig;\n entityPageId?: string;\n search?: { shown?: boolean };\n toolbarTitle?: ToolbarTitle;\n actionCell?: ActionCellConfig;\n emptyState?: EmptyState;\n filters?: FiltersConfig;\n bulkActionToolbar?: BulkActionsConfig;\n}\n\nexport interface ToolbarTitle {\n title: string;\n subtitle?: {\n text: string;\n info?: {\n content: {\n text: string;\n link?: {\n url: string;\n label: string;\n };\n };\n };\n learnMore?: {\n url: string;\n label?: string;\n };\n };\n showTotal?: boolean;\n itemsLimit?: number;\n}\n\nexport interface Column {\n id: string;\n name: string;\n width: string;\n sortable?: boolean;\n defaultSortOrder?: 'asc' | 'desc';\n sortMode?: 'asc' | 'desc';\n defaultHidden?: boolean;\n hiddenFromCustomColumnsSelection?: boolean;\n hideable?: boolean;\n reorderDisabled?: boolean;\n}\n\nexport interface GridItem {\n titleFieldId: string;\n subtitleFieldId?: string;\n imageFieldId?: string;\n cardContentMode?: 'full' | 'title' | 'empty'; // Footer is not supported in auto-patterns\n imagePlacement?: 'top' | 'side';\n}\n\nexport interface EmptyState {\n title?: string;\n subtitle?: string;\n image?: {\n id: string;\n };\n addNewCta?: {\n id?: string;\n text?: string;\n };\n customCta?: {\n id?: string;\n };\n}\n\nexport interface FilterOption {\n value: string;\n label: string;\n}\n\nexport type FilterSelectionMode = 'single' | 'multiple';\nexport type FilterOptionType =\n | 'checkbox'\n | 'inlineCheckbox'\n | 'radio'\n | 'select';\n\nexport enum ComponentTypeEnum {\n SINGLE = 'single',\n MULTI_SELECT = 'multi-select',\n RADIO_GROUP = 'radio-group',\n NUMBER = 'number',\n DATE_RANGE = 'date-range',\n}\n\nexport type FilterItems = Filter[];\nexport interface FiltersConfig {\n items: FilterItems;\n maxInlineFilters?: CollectionToolbarFiltersProps['inline'];\n panelTitle?: string;\n}\n\nexport interface BaseOptionsFilterConfig {\n selectionMode: FilterSelectionMode;\n}\n\nexport interface DateFilterConfig {\n mode?: DateRangeFilterMode;\n presets?: DateRangeOptions;\n includeTime?: boolean;\n}\n\nexport interface NumberFilterConfig {\n min?: number;\n max?: number;\n allowedDecimals?: boolean;\n}\n\nexport interface BooleanFilterConfig {\n trueLabel?: string;\n falseLabel?: string;\n}\n\nexport interface EnumFilterConfig extends BaseOptionsFilterConfig {\n options: FilterOption[];\n optionType?: FilterOptionType;\n}\n\nexport interface DynamicOptionsFilterConfig extends BaseOptionsFilterConfig {}\n\nexport interface Filter {\n id: string;\n fieldId: string;\n displayName?: string;\n sectionTitle?: string;\n openByDefault?: boolean;\n tagLabel?: string;\n numberConfig?: NumberFilterConfig;\n dateConfig?: DateFilterConfig;\n booleanConfig?: BooleanFilterConfig;\n enumConfig?: EnumFilterConfig;\n dynamicOptionsConfig?: DynamicOptionsFilterConfig;\n}\n"],"mappings":"AA8KA,WAAYA,iBAAiB,0BAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/actionCell.ts"],"sourcesContent":["import {\n CustomActionModalProps,\n CustomActionParams,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n CustomActionConfig,\n DeleteActionConfig,\n UpdateActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type ActionCellItemConfig =\n | UpdateActionConfig\n | CustomActionConfig\n | DeleteActionConfig;\n\nexport interface ActionCellPrimaryAction {\n item: ActionCellItemConfig;\n}\n\nexport interface ActionCellSecondaryActions {\n items: (ActionCellItemConfig | DividerActionConfig)[];\n inlineCount?: number;\n inlineAlwaysVisible?: boolean;\n}\n\nexport interface ActionCellConfig {\n primaryAction?: ActionCellPrimaryAction;\n secondaryActions?: ActionCellSecondaryActions;\n}\n\nexport interface ActionCellActionParams {\n item: any;\n}\n\nexport type CustomActionCellActionParams =\n CustomActionParams<ActionCellActionParams>;\n\nexport type CustomActionCellActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCellActionModalProps\n extends CustomActionModalProps {\n actionParams: ActionCellActionParams;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/actionCell.ts"],"sourcesContent":["import {\n CustomActionModalProps,\n CustomActionParams,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n CustomActionConfig,\n DeleteActionConfig,\n UpdateActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type ActionCellItemConfig =\n | UpdateActionConfig\n | CustomActionConfig\n | DeleteActionConfig;\n\nexport interface ActionCellPrimaryAction {\n item: ActionCellItemConfig;\n alwaysVisible?: boolean;\n}\n\nexport interface ActionCellSecondaryActions {\n items: (ActionCellItemConfig | DividerActionConfig)[];\n inlineCount?: number;\n inlineAlwaysVisible?: boolean;\n}\n\nexport interface ActionCellConfig {\n primaryAction?: ActionCellPrimaryAction;\n secondaryActions?: ActionCellSecondaryActions;\n}\n\nexport interface ActionCellActionParams {\n item: any;\n}\n\nexport type CustomActionCellActionParams =\n CustomActionParams<ActionCellActionParams>;\n\nexport type CustomActionCellActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCellActionModalProps\n extends CustomActionModalProps {\n actionParams: ActionCellActionParams;\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/types/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { CollectionComponentConfig } from '../../types';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
export declare const AutoPatternsCollectionComponent: ({ component, index, }: {
|
|
4
|
+
component: CollectionComponentConfig;
|
|
5
|
+
index: number;
|
|
6
|
+
}) => React.JSX.Element;
|
|
7
|
+
//# sourceMappingURL=AutoPatternsCollectionComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionComponent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionComponent/AutoPatternsCollectionComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAMxD,OAAO,KAAkB,MAAM,OAAO,CAAC;AAEvC,eAAO,MAAM,+BAA+B,GAAI,uBAG7C;IACD,SAAS,EAAE,yBAAyB,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;CACf,sBAqDA,CAAC"}
|
package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPage.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAGxE,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CAqBhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsCollectionPageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPageContent.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAInD,MAAM,WAAW,sCAAsC;IACrD,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,iCAAiC,GAAI,oBAE/C,sCAAsC,sBA+BxC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ImageInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/ImageInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"ImageInput.d.ts","sourceRoot":"","sources":["../../../../../src/components/AutoPatternsEntityPage/Fields/ImageInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAWzC,MAAM,WAAW,eAAgB,SAAQ,cAAc,CAAC,MAAM,CAAC;CAAG;AAElE,eAAO,MAAM,UAAU,GAAI,OAAO,eAAe,sBAmEhD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsTable/AutoPatternsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,MAAM,WAAW,6BAA6B;IAC5C,aAAa,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAAI,oBAE/B,6BAA6B,
|
|
1
|
+
{"version":3,"file":"AutoPatternsTable.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsTable/AutoPatternsTable.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAG1C,MAAM,WAAW,6BAA6B;IAC5C,aAAa,EAAE,WAAW,CAAC;CAC5B;AAED,eAAO,MAAM,iBAAiB,GAAI,oBAE/B,6BAA6B,sBAsC/B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useActionCell.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionCell.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,eAAO,MAAM,aAAa,GAAI,2BAG3B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"useActionCell.d.ts","sourceRoot":"","sources":["../../../src/hooks/useActionCell.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAGjB,MAAM,UAAU,CAAC;AAUlB,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,gBAAgB,CAAC;IAC1B,YAAY,EAAE,MAAM,CAAC;CACtB;AAoBD,eAAO,MAAM,aAAa,GAAI,2BAG3B,mBAAmB,4CA4GrB,CAAC"}
|
|
@@ -7,5 +7,6 @@ export declare const useBaseTableFeatures: (configuration: TableConfig) => {
|
|
|
7
7
|
customColumns: React.JSX.Element | undefined;
|
|
8
8
|
stickyColumns: number | undefined;
|
|
9
9
|
stickySelectionColumn: boolean;
|
|
10
|
+
showTitleBar: boolean;
|
|
10
11
|
};
|
|
11
12
|
//# sourceMappingURL=useBaseTableFeatures.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useBaseTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBaseTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMvC,eAAO,MAAM,oBAAoB,GAAI,eAAe,WAAW
|
|
1
|
+
{"version":3,"file":"useBaseTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useBaseTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAMvC,eAAO,MAAM,oBAAoB,GAAI,eAAe,WAAW;;;;;;;;CAsC9D,CAAC"}
|
|
@@ -8,6 +8,7 @@ export declare const useTableFeatures: (configuration: TableConfig) => {
|
|
|
8
8
|
onRowClick: (item: any, index: any) => void | null;
|
|
9
9
|
stickyColumns: number | undefined;
|
|
10
10
|
stickySelectionColumn: boolean;
|
|
11
|
+
showTitleBar: boolean;
|
|
11
12
|
sections: {
|
|
12
13
|
renderSection: (item: any) => import("@wix/patterns").Section;
|
|
13
14
|
TableSections: (<T, F extends import("@wix/patterns").FiltersMap>({ renderSection, table, columns, ...collectionTableProps }: import("@wix/patterns/dist/types/components/TableSections").TableSectionsProps<T, F>) => React.JSX.Element) & {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAUvC,eAAO,MAAM,gBAAgB,GAAI,eAAe,WAAW
|
|
1
|
+
{"version":3,"file":"useTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAUvC,eAAO,MAAM,gBAAgB,GAAI,eAAe,WAAW;;;;;;;;;;;;;;;;;;;;;CA4E1D,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useTableGridSwitchFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAUjD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,qBAAqB
|
|
1
|
+
{"version":3,"file":"useTableGridSwitchFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAUjD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAgFvE,CAAC"}
|
|
@@ -8,9 +8,9 @@ export interface PatternsWizardOverridesContextProps {
|
|
|
8
8
|
actions?: Record<string, (props: CustomActionParams<EntityPageMoreActionsActionParams | CollectionPageActionParams | ActionCellActionParams | CollectionPageActionOnRowClickParams>) => ResolvedAction>;
|
|
9
9
|
columns?: Record<string, (props: IColumnValue<any>) => void>;
|
|
10
10
|
modals?: Record<string, React.FC<any>>;
|
|
11
|
-
HeaderAddon?: React.FC;
|
|
12
11
|
emptyState?: Record<string, () => void>;
|
|
13
12
|
components?: Record<string, React.FC<CustomComponentProps>>;
|
|
13
|
+
slots?: Record<string, React.FC>;
|
|
14
14
|
customDataSources?: Record<string, (collectionId: string, context: any) => Promise<SchemaConfig>>;
|
|
15
15
|
sections?: Record<string, (item: any) => Section>;
|
|
16
16
|
}
|
|
@@ -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,iCAAiC,EACjC,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,oCAAoC,EACpC,0BAA0B,EAC3B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACN,CACE,KAAK,EAAE,kBAAkB,CACrB,iCAAiC,GACjC,0BAA0B,GAC1B,sBAAsB,GACtB,oCAAoC,CACvC,KACE,cAAc,CACpB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,
|
|
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,iCAAiC,EACjC,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAExC,OAAO,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC5E,OAAO,EACL,oCAAoC,EACpC,0BAA0B,EAC3B,MAAM,wCAAwC,CAAC;AAChD,OAAO,EAAE,sBAAsB,EAAE,MAAM,6BAA6B,CAAC;AAErE,MAAM,WAAW,mCAAmC;IAClD,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACN,CACE,KAAK,EAAE,kBAAkB,CACrB,iCAAiC,GACjC,0BAA0B,GAC1B,sBAAsB,GACtB,oCAAoC,CACvC,KACE,cAAc,CACpB,CAAC;IACF,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,YAAY,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC;IAC7D,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACvC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,IAAI,CAAC,CAAC;IACxC,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CAAC,CAAC,CAAC;IAC5D,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,CACxB,MAAM,EACN,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,YAAY,CAAC,CAC9D,CAAC;IACF,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC;CACnD;AAMD,eAAO,MAAM,+BAA+B,EAAE,KAAK,CAAC,EAAE,CAAC;IACrD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,mCAAmC,CAAC;CAC5C,CAMA,CAAC;AAEF,eAAO,MAAM,iCAAiC,QAC1C,mCAAmC,GACnC,SAEH,CAAC"}
|
|
@@ -25,9 +25,15 @@ export interface CollectionPageConfig {
|
|
|
25
25
|
};
|
|
26
26
|
components: ComponentConfig[];
|
|
27
27
|
}
|
|
28
|
-
export interface
|
|
28
|
+
export interface CollectionComponentConfig extends BaseCollectionComponentConfig {
|
|
29
|
+
type: 'collection';
|
|
29
30
|
layout: LayoutItemConfig[];
|
|
30
31
|
}
|
|
32
|
+
export interface CustomComponentConfig {
|
|
33
|
+
type: 'custom';
|
|
34
|
+
id: string;
|
|
35
|
+
}
|
|
36
|
+
export type ComponentConfig = CollectionComponentConfig | CustomComponentConfig;
|
|
31
37
|
export interface LayoutItemConfig {
|
|
32
38
|
type: 'Table' | 'Grid';
|
|
33
39
|
table?: TableSpecificConfig;
|
|
@@ -41,6 +47,7 @@ export interface TableSpecificConfig {
|
|
|
41
47
|
};
|
|
42
48
|
stickyColumns?: number;
|
|
43
49
|
onRowClick?: CollectionPageOnRowClickActionConfig;
|
|
50
|
+
showTitleBar?: boolean;
|
|
44
51
|
sections?: {
|
|
45
52
|
id: string;
|
|
46
53
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CollectionPageConfig.d.ts","sourceRoot":"","sources":["../../../src/types/CollectionPageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAC/C,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,oCAAoC,EACpC,4BAA4B,EAC5B,8BAA8B,EAC/B,MAAM,WAAW,CAAC;AAEnB,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE;QACV,GAAG,EAAE,MAAM,CAAC;QACZ,KAAK,CAAC,EAAE,MAAM,CAAC;KAChB,CAAC;CACH;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE;QACL,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,KAAK,EAAE,mBAAmB,CAAC;IAC3B,QAAQ,CAAC,EAAE,sBAAsB,CAAC;IAClC,OAAO,CAAC,EAAE;QACR,cAAc,CAAC,EAAE,4BAA4B,CAAC;QAC9C,gBAAgB,CAAC,EAAE,8BAA8B,CAAC;KACnD,CAAC;IACF,UAAU,EAAE,eAAe,EAAE,CAAC;CAC/B;AAED,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"CollectionPageConfig.d.ts","sourceRoot":"","sources":["../../../src/types/CollectionPageConfig.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,6BAA6B,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,mBAAmB,EAAE,gBAAgB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YAAY,EAAE,CAAC;IACxB,UAAU,CAAC,EAAE,gBAAgB,CAAC;CAC/B;AAED,MAAM,WAAW,0BAA2B,SAAQ,uBAAuB;CAAG;AAE9E,MAAM,WAAW,MAAM;IACrB,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,kBAAkB,CAAC;IAClC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC,UAAU,CAAC,EAAE,gBAAgB,CAAC;IAC9B,oBAAoB,CAAC,EAAE,0BAA0B,CAAC;CACnD"}
|
|
@@ -3,6 +3,7 @@ import { CustomActionConfig, DeleteActionConfig, UpdateActionConfig, DividerActi
|
|
|
3
3
|
export type ActionCellItemConfig = UpdateActionConfig | CustomActionConfig | DeleteActionConfig;
|
|
4
4
|
export interface ActionCellPrimaryAction {
|
|
5
5
|
item: ActionCellItemConfig;
|
|
6
|
+
alwaysVisible?: boolean;
|
|
6
7
|
}
|
|
7
8
|
export interface ActionCellSecondaryActions {
|
|
8
9
|
items: (ActionCellItemConfig | DividerActionConfig)[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actionCell.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/actionCell.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,oBAAoB,GAC5B,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"actionCell.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/actionCell.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,sBAAsB,EACtB,kBAAkB,EAClB,cAAc,EACf,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EACL,kBAAkB,EAClB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,QAAQ,CAAC;AAEhB,MAAM,MAAM,oBAAoB,GAC5B,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,CAAC;AAEvB,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,oBAAoB,CAAC;IAC3B,aAAa,CAAC,EAAE,OAAO,CAAC;CACzB;AAED,MAAM,WAAW,0BAA0B;IACzC,KAAK,EAAE,CAAC,oBAAoB,GAAG,mBAAmB,CAAC,EAAE,CAAC;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,uBAAuB,CAAC;IACxC,gBAAgB,CAAC,EAAE,0BAA0B,CAAC;CAC/C;AAED,MAAM,WAAW,sBAAsB;IACrC,IAAI,EAAE,GAAG,CAAC;CACX;AAED,MAAM,MAAM,4BAA4B,GACtC,kBAAkB,CAAC,sBAAsB,CAAC,CAAC;AAE7C,MAAM,MAAM,8BAA8B,GAAG,CAC3C,MAAM,EAAE,4BAA4B,KACjC,cAAc,CAAC;AAEpB,MAAM,WAAW,gCACf,SAAQ,sBAAsB;IAC9B,YAAY,EAAE,sBAAsB,CAAC;CACtC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wix/auto-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matvey Oklander",
|
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
"dependencies": {
|
|
37
37
|
"@babel/runtime": "^7.27.6",
|
|
38
38
|
"@wix/data": "^1.0.222",
|
|
39
|
-
"@wix/wix-ui-icons-common": "^3.
|
|
39
|
+
"@wix/wix-ui-icons-common": "^3.79.0",
|
|
40
40
|
"ejs": "^3.1.10",
|
|
41
41
|
"lodash": "^4.17.21"
|
|
42
42
|
},
|
|
@@ -53,17 +53,17 @@
|
|
|
53
53
|
"@types/node-fetch": "^2.6.12",
|
|
54
54
|
"@types/react": "^16.14.65",
|
|
55
55
|
"@wix/crm": "^1.0.385",
|
|
56
|
-
"@wix/design-system": "^1.
|
|
57
|
-
"@wix/eslint-config-yoshi": "^6.
|
|
58
|
-
"@wix/fe-essentials-standalone": "^1.
|
|
59
|
-
"@wix/jest-yoshi-preset": "^6.
|
|
60
|
-
"@wix/patterns": "^1.
|
|
56
|
+
"@wix/design-system": "^1.206.0",
|
|
57
|
+
"@wix/eslint-config-yoshi": "^6.151.0",
|
|
58
|
+
"@wix/fe-essentials-standalone": "^1.1364.0",
|
|
59
|
+
"@wix/jest-yoshi-preset": "^6.151.0",
|
|
60
|
+
"@wix/patterns": "^1.239.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.192",
|
|
64
|
+
"@wix/wix-data-items-sdk": "^1.0.383",
|
|
65
|
+
"@wix/yoshi-flow-library": "^6.151.0",
|
|
66
|
+
"@wix/yoshi-style-dependencies": "^6.151.0",
|
|
67
67
|
"chance": "^1.1.13",
|
|
68
68
|
"date-fns": "^2.30.0",
|
|
69
69
|
"express": "^4.21.2",
|
|
@@ -77,7 +77,7 @@
|
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@wix/dashboard": "^1.3.33",
|
|
79
79
|
"@wix/design-system": "^1.204.0",
|
|
80
|
-
"@wix/patterns": "^1.
|
|
80
|
+
"@wix/patterns": "^1.239.0",
|
|
81
81
|
"react": "^16.8.0",
|
|
82
82
|
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
83
83
|
},
|
|
@@ -125,5 +125,5 @@
|
|
|
125
125
|
"wallaby": {
|
|
126
126
|
"autoDetect": true
|
|
127
127
|
},
|
|
128
|
-
"falconPackageHash": "
|
|
128
|
+
"falconPackageHash": "e07bf7a954d3451adaa50b391f05325919675bd385a3a031b028d8ad"
|
|
129
129
|
}
|