@wix/auto-patterns 1.16.0 → 1.17.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/AutoPatternsRoute/AutoPatternsRoutes.js +4 -4
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
- package/dist/cjs/hooks/useNavigationUtils.js +2 -2
- package/dist/cjs/hooks/useNavigationUtils.js.map +1 -1
- package/dist/cjs/types/actions/base.js.map +1 -1
- package/dist/cjs/utils/actions/resolveAction.js +2 -1
- package/dist/cjs/utils/actions/resolveAction.js.map +1 -1
- package/dist/cjs/utils/actions/types.js.map +1 -1
- package/dist/docs/action_cell.md +19 -0
- package/dist/docs/app_config_structure.md +1 -0
- package/dist/docs/auto-patterns-guide.md +20 -0
- package/dist/docs/recipe-crud-operations.md +19 -0
- package/dist/docs/recipe-customization.md +1 -0
- package/dist/docs/recipe-first-dashboard.md +1 -0
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js +1 -1
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
- package/dist/esm/hooks/useNavigationUtils.js +1 -1
- package/dist/esm/hooks/useNavigationUtils.js.map +1 -1
- package/dist/esm/types/actions/base.js.map +1 -1
- package/dist/esm/utils/actions/resolveAction.js +2 -1
- package/dist/esm/utils/actions/resolveAction.js.map +1 -1
- package/dist/esm/utils/actions/types.js.map +1 -1
- package/dist/types/types/actions/base.d.ts +1 -0
- package/dist/types/types/actions/base.d.ts.map +1 -1
- package/dist/types/utils/actions/resolveAction.d.ts +1 -0
- package/dist/types/utils/actions/resolveAction.d.ts.map +1 -1
- package/dist/types/utils/actions/types.d.ts +1 -0
- package/dist/types/utils/actions/types.d.ts.map +1 -1
- package/package.json +19 -18
|
@@ -5,7 +5,7 @@ exports.__esModule = true;
|
|
|
5
5
|
exports.AutoPatternsRoutes = void 0;
|
|
6
6
|
var _react = _interopRequireDefault(require("react"));
|
|
7
7
|
var _hooks = require("../../hooks");
|
|
8
|
-
var
|
|
8
|
+
var _router = require("@wix/patterns/router");
|
|
9
9
|
var _AutoPatternsPage = require("./AutoPatternsPage");
|
|
10
10
|
var _reactRouterDom = require("react-router-dom");
|
|
11
11
|
var _jsxFileName = "/home/builduser/work/73d19ce3378ce4dd/packages/auto-patterns/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.tsx";
|
|
@@ -25,7 +25,7 @@ const AutoPatternsRoutes = ({
|
|
|
25
25
|
if (!routePath) {
|
|
26
26
|
return null;
|
|
27
27
|
}
|
|
28
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
28
|
+
return /*#__PURE__*/_react.default.createElement(_router.PatternsReactRoute, {
|
|
29
29
|
key: page.id,
|
|
30
30
|
type: pageTypeToRouteType[page.type] ?? 'other',
|
|
31
31
|
path: routePath,
|
|
@@ -49,7 +49,7 @@ const AutoPatternsRoutes = ({
|
|
|
49
49
|
if (mainPage) {
|
|
50
50
|
const mainPagePath = getPagePath(mainPage.id);
|
|
51
51
|
if (mainPagePath) {
|
|
52
|
-
routes.push(/*#__PURE__*/_react.default.createElement(
|
|
52
|
+
routes.push(/*#__PURE__*/_react.default.createElement(_router.PatternsReactRoute, {
|
|
53
53
|
key: "main-redirect",
|
|
54
54
|
type: "other",
|
|
55
55
|
path: "/",
|
|
@@ -71,7 +71,7 @@ const AutoPatternsRoutes = ({
|
|
|
71
71
|
}));
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
74
|
+
return /*#__PURE__*/_react.default.createElement(_router.PatternsReactRouter, {
|
|
75
75
|
__self: void 0,
|
|
76
76
|
__source: {
|
|
77
77
|
fileName: _jsxFileName,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_hooks","
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_hooks","_router","_AutoPatternsPage","_reactRouterDom","_jsxFileName","pageTypeToRouteType","collectionPage","entityPage","AutoPatternsRoutes","config","getPagePath","usePagePath","mainPage","pages","find","page","appMainPage","routes","map","routePath","id","default","createElement","PatternsReactRoute","key","type","path","element","AutoPatternsPage","pageConfig","__self","__source","fileName","lineNumber","columnNumber","filter","Boolean","mainPagePath","push","Navigate","to","PatternsReactRouter","exports"],"sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"sourcesContent":["import React from 'react';\nimport { usePagePath } from '../../hooks';\nimport { PatternsReactRoute, PatternsReactRouter } from '@wix/patterns/router';\nimport { AutoPatternsPage } from './AutoPatternsPage';\nimport type { RouteType } from '@wix/patterns/dist/types/components/Router/types';\nimport { Navigate } from 'react-router-dom';\nimport { AppConfig } from '../../types';\n\nconst pageTypeToRouteType: Record<string, RouteType> = {\n collectionPage: 'collection',\n entityPage: 'editEntity',\n};\n\nexport const AutoPatternsRoutes = ({ config }: { config: AppConfig }) => {\n const { getPagePath } = usePagePath(config);\n const mainPage = config.pages.find((page) => page.appMainPage);\n\n const routes = config.pages\n .map((page) => {\n const routePath = getPagePath(page.id);\n\n if (!routePath) {\n return null;\n }\n\n return (\n <PatternsReactRoute\n key={page.id}\n type={pageTypeToRouteType[page.type] ?? 'other'}\n path={routePath}\n element={<AutoPatternsPage pageConfig={page} />}\n />\n );\n })\n .filter(Boolean);\n\n if (mainPage) {\n const mainPagePath = getPagePath(mainPage.id);\n\n if (mainPagePath) {\n routes.push(\n <PatternsReactRoute\n key=\"main-redirect\"\n type=\"other\"\n path=\"/\"\n element={<Navigate to={mainPagePath} />}\n />,\n );\n }\n }\n\n return <PatternsReactRouter>{routes}</PatternsReactRouter>;\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,iBAAA,GAAAH,OAAA;AAEA,IAAAI,eAAA,GAAAJ,OAAA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,YAAY,EAAE;MAChBpB,MAAM,CAACqB,IAAI,cACTzC,MAAA,CAAAwB,OAAA,CAAAC,aAAA,CAACrB,OAAA,CAAAsB,kBAAkB;QACjBC,GAAG,EAAC,eAAe;QACnBC,IAAI,EAAC,OAAO;QACZC,IAAI,EAAC,GAAG;QACRC,OAAO,eAAE9B,MAAA,CAAAwB,OAAA,CAAAC,aAAA,CAACnB,eAAA,CAAAoC,QAAQ;UAACC,EAAE,EAAEH,YAAa;UAAAP,MAAA;UAAAC,QAAA;YAAAC,QAAA,EAAA5B,YAAA;YAAA6B,UAAA;YAAAC,YAAA;UAAA;QAAA,CAAE,CAAE;QAAAJ,MAAA;QAAAC,QAAA;UAAAC,QAAA,EAAA5B,YAAA;UAAA6B,UAAA;UAAAC,YAAA;QAAA;MAAA,CACzC,CACH,CAAC;IACH;EACF;EAEA,oBAAOrC,MAAA,CAAAwB,OAAA,CAAAC,aAAA,CAACrB,OAAA,CAAAwC,mBAAmB;IAAAX,MAAA;IAAAC,QAAA;MAAAC,QAAA,EAAA5B,YAAA;MAAA6B,UAAA;MAAAC,YAAA;IAAA;EAAA,GAAEjB,MAA4B,CAAC;AAC5D,CAAC;AAACyB,OAAA,CAAAlC,kBAAA,GAAAA,kBAAA","ignoreList":[]}
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
exports.__esModule = true;
|
|
4
4
|
exports.useNavigation = void 0;
|
|
5
5
|
var _react = require("react");
|
|
6
|
-
var
|
|
6
|
+
var _router = require("@wix/patterns/router");
|
|
7
7
|
var _providers = require("../providers");
|
|
8
8
|
var _reactRouterDom = require("react-router-dom");
|
|
9
9
|
var _usePagePath = require("./usePagePath");
|
|
10
10
|
const useNavigation = () => {
|
|
11
11
|
const {
|
|
12
12
|
navigateToEntityPage: navigateToEntityPagePatterns
|
|
13
|
-
} = (0,
|
|
13
|
+
} = (0, _router.usePatternsNavigate)();
|
|
14
14
|
const appConfig = (0, _providers.useAppConfigContext)();
|
|
15
15
|
const {
|
|
16
16
|
getSchema
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","
|
|
1
|
+
{"version":3,"names":["_react","require","_router","_providers","_reactRouterDom","_usePagePath","useNavigation","navigateToEntityPage","navigateToEntityPagePatterns","usePatternsNavigate","appConfig","useAppConfigContext","getSchema","useSchemaRegistry","getPagePath","usePagePath","useCallback","item","entityPageId","_route$params","entityPage","pages","find","page","id","route","collectionId","schema","path","params","generatePath","idField","entity","getParentPagePath","parentPageId","exports"],"sources":["../../../src/hooks/useNavigationUtils.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { usePatternsNavigate } from '@wix/patterns/router';\nimport { useAppConfigContext, useSchemaRegistry } from '../providers';\nimport { generatePath } from 'react-router-dom';\nimport { EntityPageConfig } from '../types';\nimport { usePagePath } from './usePagePath';\n\nexport type NavigateToEntityPageFunc = (args: {\n item: any;\n entityPageId?: string;\n}) => void;\n\nexport const useNavigation = () => {\n const { navigateToEntityPage: navigateToEntityPagePatterns } =\n usePatternsNavigate();\n const appConfig = useAppConfigContext();\n const { getSchema } = useSchemaRegistry();\n const { getPagePath } = usePagePath(appConfig);\n\n const navigateToEntityPage = useCallback(\n ({ item, entityPageId }) => {\n const entityPage = entityPageId\n ? appConfig.pages.find((page) => page.id === entityPageId)\n : null;\n\n if (!entityPage) {\n return;\n }\n\n const { route, collectionId } = entityPage.entityPage as EntityPageConfig;\n const schema = getSchema(collectionId);\n if (route.path && route.params?.id && schema) {\n const path = generatePath(route.path, {\n [route.params.id]: item?.[schema.idField] ?? '',\n });\n navigateToEntityPagePatterns({\n path,\n entity: item,\n });\n }\n },\n [appConfig, navigateToEntityPagePatterns, getSchema],\n );\n\n const getParentPagePath = useCallback(\n (parentPageId?: string): string | undefined => {\n return getPagePath(parentPageId);\n },\n [getPagePath],\n );\n\n return {\n navigateToEntityPage,\n getParentPagePath,\n getPagePath,\n };\n};\n"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,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ACJ;EACF,CAAC,EACD,CAACP,SAAS,EAAEF,4BAA4B,EAAEI,SAAS,CACrD,CAAC;EAED,MAAMqB,iBAAiB,GAAG,IAAAjB,kBAAW,EAClCkB,YAAqB,IAAyB;IAC7C,OAAOpB,WAAW,CAACoB,YAAY,CAAC;EAClC,CAAC,EACD,CAACpB,WAAW,CACd,CAAC;EAED,OAAO;IACLP,oBAAoB;IACpB0B,iBAAiB;IACjBnB;EACF,CAAC;AACH,CAAC;AAACqB,OAAA,CAAA7B,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/base.ts"],"sourcesContent":["export type DividerActionConfig = { type: 'divider' };\n\nexport type BaseActionItemConfig = {\n id: string;\n label?: string;\n};\n\nexport interface Feedback {\n successToast?: { text: string };\n errorToast?: { text: string };\n}\n\nexport interface BaseActionModal {\n title?: { text: string };\n actions?: {\n submit?: { text: string };\n cancel?: { text: string };\n };\n feedback?: Feedback;\n}\n\nexport interface ActionModalField {\n id: string;\n label?: string;\n}\n\nexport interface DeleteActionModal extends BaseActionModal {\n description?: { text: string };\n}\n\nexport interface BulkDeleteActionModal extends DeleteActionModal {}\n\nexport type BulkDeleteAction =\n | {\n mode: 'modal';\n modal: BulkDeleteActionModal;\n custom?: never;\n }\n | {\n mode: 'custom';\n custom: CustomAction;\n modal?: never;\n };\n\nexport type DeleteAction = {\n mode: 'modal';\n modal: DeleteActionModal;\n};\n\nexport interface BaseActionPage {\n id: string;\n}\n\nexport type CustomAction = {};\n\nexport interface ActionModalWithFields extends BaseActionModal {\n fields: ActionModalField[];\n}\n\nexport interface UpdateActionModal extends ActionModalWithFields {}\n\nexport interface CreateActionModal extends ActionModalWithFields {}\n\nexport interface UpdateActionPage extends BaseActionPage {}\n\nexport interface CreateActionPage extends BaseActionPage {}\n\nexport type UpdateAction = {\n mode: 'page';\n page: UpdateActionPage;\n};\n\nexport type CreateAction = {\n mode: 'page';\n page: CreateActionPage;\n};\n\nexport type CreateActionConfig = BaseActionItemConfig & {\n type: 'create';\n create: CreateAction;\n};\n\nexport type UpdateActionConfig = BaseActionItemConfig & {\n type: 'update';\n update: UpdateAction;\n};\n\nexport type DeleteActionConfig = BaseActionItemConfig & {\n type: 'delete';\n delete: DeleteAction;\n};\n\nexport type BulkDeleteActionConfig = BaseActionItemConfig & {\n type: 'bulkDelete';\n bulkDelete: BulkDeleteAction;\n};\n\nexport type CustomActionConfig = BaseActionItemConfig & {\n type: 'custom';\n custom: CustomAction;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/base.ts"],"sourcesContent":["export type DividerActionConfig = { type: 'divider' };\n\nexport type BaseActionItemConfig = {\n id: string;\n label?: string;\n skin?: string;\n};\n\nexport interface Feedback {\n successToast?: { text: string };\n errorToast?: { text: string };\n}\n\nexport interface BaseActionModal {\n title?: { text: string };\n actions?: {\n submit?: { text: string };\n cancel?: { text: string };\n };\n feedback?: Feedback;\n}\n\nexport interface ActionModalField {\n id: string;\n label?: string;\n}\n\nexport interface DeleteActionModal extends BaseActionModal {\n description?: { text: string };\n}\n\nexport interface BulkDeleteActionModal extends DeleteActionModal {}\n\nexport type BulkDeleteAction =\n | {\n mode: 'modal';\n modal: BulkDeleteActionModal;\n custom?: never;\n }\n | {\n mode: 'custom';\n custom: CustomAction;\n modal?: never;\n };\n\nexport type DeleteAction = {\n mode: 'modal';\n modal: DeleteActionModal;\n};\n\nexport interface BaseActionPage {\n id: string;\n}\n\nexport type CustomAction = {};\n\nexport interface ActionModalWithFields extends BaseActionModal {\n fields: ActionModalField[];\n}\n\nexport interface UpdateActionModal extends ActionModalWithFields {}\n\nexport interface CreateActionModal extends ActionModalWithFields {}\n\nexport interface UpdateActionPage extends BaseActionPage {}\n\nexport interface CreateActionPage extends BaseActionPage {}\n\nexport type UpdateAction = {\n mode: 'page';\n page: UpdateActionPage;\n};\n\nexport type CreateAction = {\n mode: 'page';\n page: CreateActionPage;\n};\n\nexport type CreateActionConfig = BaseActionItemConfig & {\n type: 'create';\n create: CreateAction;\n};\n\nexport type UpdateActionConfig = BaseActionItemConfig & {\n type: 'update';\n update: UpdateAction;\n};\n\nexport type DeleteActionConfig = BaseActionItemConfig & {\n type: 'delete';\n delete: DeleteAction;\n};\n\nexport type BulkDeleteActionConfig = BaseActionItemConfig & {\n type: 'bulkDelete';\n bulkDelete: BulkDeleteAction;\n};\n\nexport type CustomActionConfig = BaseActionItemConfig & {\n type: 'custom';\n custom: CustomAction;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -5,7 +5,8 @@ exports.resolveAction = void 0;
|
|
|
5
5
|
const resolveAction = (actionConfig, action) => {
|
|
6
6
|
return {
|
|
7
7
|
...action,
|
|
8
|
-
label: actionConfig.label ?? action.label
|
|
8
|
+
label: actionConfig.label ?? action.label,
|
|
9
|
+
skin: actionConfig.skin
|
|
9
10
|
};
|
|
10
11
|
};
|
|
11
12
|
exports.resolveAction = resolveAction;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveAction","actionConfig","action","label","exports"],"sources":["../../../../src/utils/actions/resolveAction.ts"],"sourcesContent":["import { BaseActionItemConfig, ResolvedAction } from '../../types';\n\nexport const resolveAction = (\n actionConfig: BaseActionItemConfig,\n action: Partial<ResolvedAction>,\n) => {\n return {\n ...action,\n label: actionConfig.label ?? action.label,\n };\n};\n"],"mappings":";;;;AAEO,MAAMA,aAAa,GAAGA,CAC3BC,YAAkC,EAClCC,MAA+B,KAC5B;EACH,OAAO;IACL,GAAGA,MAAM;IACTC,KAAK,EAAEF,YAAY,CAACE,KAAK,IAAID,MAAM,CAACC;
|
|
1
|
+
{"version":3,"names":["resolveAction","actionConfig","action","label","skin","exports"],"sources":["../../../../src/utils/actions/resolveAction.ts"],"sourcesContent":["import { BaseActionItemConfig, ResolvedAction } from '../../types';\n\nexport const resolveAction = (\n actionConfig: BaseActionItemConfig,\n action: Partial<ResolvedAction>,\n) => {\n return {\n ...action,\n label: actionConfig.label ?? action.label,\n skin: actionConfig.skin,\n };\n};\n"],"mappings":";;;;AAEO,MAAMA,aAAa,GAAGA,CAC3BC,YAAkC,EAClCC,MAA+B,KAC5B;EACH,OAAO;IACL,GAAGA,MAAM;IACTC,KAAK,EAAEF,YAAY,CAACE,KAAK,IAAID,MAAM,CAACC,KAAK;IACzCC,IAAI,EAAEH,YAAY,CAACG;EACrB,CAAC;AACH,CAAC;AAACC,OAAA,CAAAL,aAAA,GAAAA,aAAA","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/utils/actions/types.ts"],"sourcesContent":["import { ActionCellAPI, CollectionOptimisticActions } from '@wix/patterns';\nimport {\n UpdateActionConfig,\n CustomActionConfig,\n SchemaConfig,\n BulkDeleteActionConfig,\n DeleteActionConfig,\n CreateActionConfig,\n BaseSDK,\n} from '../../types';\nimport { IconElement } from '@wix/design-system';\n\nexport interface ResolvedAction {\n label: string;\n icon: IconElement;\n onClick: () => void;\n disabled?: boolean;\n tooltip?: string;\n}\n\nexport interface BaseContextParams {\n schema: SchemaConfig;\n}\n\nexport interface ActionsSDK extends BaseSDK {\n getSchema: (collectionId: string) => SchemaConfig | undefined;\n collectionId: string; // TODO: Why collectionId is needed here? getSchema with internal collectionId is enough\n getOptimisticActions: (\n collectionId: string,\n ) => CollectionOptimisticActions<any, any>;\n}\n\nexport interface BaseActionParams<T = Record<string, any>> {\n sdk: ActionsSDK;\n actionParams: T;\n}\n\nexport interface ActionCellBaseParams extends BaseActionParams {\n actionParams: {\n item: any;\n index: number;\n api: ActionCellAPI<any, any>;\n };\n}\n\nexport interface BulkDeleteActionParams extends BaseActionParams {\n action: BulkDeleteActionConfig;\n actionParams: {\n selectedValues: any[];\n total: number;\n };\n}\n\nexport interface DeleteActionParams extends ActionCellBaseParams {\n action: DeleteActionConfig;\n}\n\nexport interface UpdateActionParams extends ActionCellBaseParams {\n action: UpdateActionConfig;\n}\n\nexport interface CreateActionParams extends BaseActionParams {\n action: CreateActionConfig;\n}\n\nexport interface CustomActionParams<T> extends BaseActionParams<T> {\n action: CustomActionConfig;\n}\n\nexport interface ActionModalProps {\n modalParams: Record<string, any>;\n actionParams: Record<string, any>;\n sdk: ActionsSDK;\n}\n\nexport interface CustomActionModalProps extends ActionModalProps {\n modalParams: { id: string };\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/utils/actions/types.ts"],"sourcesContent":["import { ActionCellAPI, CollectionOptimisticActions } from '@wix/patterns';\nimport {\n UpdateActionConfig,\n CustomActionConfig,\n SchemaConfig,\n BulkDeleteActionConfig,\n DeleteActionConfig,\n CreateActionConfig,\n BaseSDK,\n} from '../../types';\nimport { IconElement } from '@wix/design-system';\n\nexport interface ResolvedAction {\n label: string;\n icon: IconElement;\n onClick: () => void;\n disabled?: boolean;\n tooltip?: string;\n skin?: string;\n}\n\nexport interface BaseContextParams {\n schema: SchemaConfig;\n}\n\nexport interface ActionsSDK extends BaseSDK {\n getSchema: (collectionId: string) => SchemaConfig | undefined;\n collectionId: string; // TODO: Why collectionId is needed here? getSchema with internal collectionId is enough\n getOptimisticActions: (\n collectionId: string,\n ) => CollectionOptimisticActions<any, any>;\n}\n\nexport interface BaseActionParams<T = Record<string, any>> {\n sdk: ActionsSDK;\n actionParams: T;\n}\n\nexport interface ActionCellBaseParams extends BaseActionParams {\n actionParams: {\n item: any;\n index: number;\n api: ActionCellAPI<any, any>;\n };\n}\n\nexport interface BulkDeleteActionParams extends BaseActionParams {\n action: BulkDeleteActionConfig;\n actionParams: {\n selectedValues: any[];\n total: number;\n };\n}\n\nexport interface DeleteActionParams extends ActionCellBaseParams {\n action: DeleteActionConfig;\n}\n\nexport interface UpdateActionParams extends ActionCellBaseParams {\n action: UpdateActionConfig;\n}\n\nexport interface CreateActionParams extends BaseActionParams {\n action: CreateActionConfig;\n}\n\nexport interface CustomActionParams<T> extends BaseActionParams<T> {\n action: CustomActionConfig;\n}\n\nexport interface ActionModalProps {\n modalParams: Record<string, any>;\n actionParams: Record<string, any>;\n sdk: ActionsSDK;\n}\n\nexport interface CustomActionModalProps extends ActionModalProps {\n modalParams: { id: string };\n}\n"],"mappings":"","ignoreList":[]}
|
package/dist/docs/action_cell.md
CHANGED
|
@@ -37,6 +37,22 @@ Both properties are optional, but at least one should be provided for the Action
|
|
|
37
37
|
- Complex operations
|
|
38
38
|
- ⚠️ Requires implementation: Must register action in overrides
|
|
39
39
|
|
|
40
|
+
### Action Appearance: The `skin` Property
|
|
41
|
+
|
|
42
|
+
All action types support the optional `skin` property to customize the visual appearance of action buttons. The skin determines the button's color scheme and visual emphasis.
|
|
43
|
+
|
|
44
|
+
#### Skin Values by Action Type:
|
|
45
|
+
|
|
46
|
+
**Primary Actions** support these skin values:
|
|
47
|
+
- `"standard"` - Default appearance (blue primary button)
|
|
48
|
+
- `"inverted"` - Inverted color scheme
|
|
49
|
+
- `"premium"` - Premium styling for premium features
|
|
50
|
+
|
|
51
|
+
**Secondary Actions** support these skin values:
|
|
52
|
+
- `"dark"` - Dark appearance
|
|
53
|
+
- `"destructive"` - Red appearance for dangerous actions (ideal for delete operations)
|
|
54
|
+
- `"premium"` - Premium styling for premium features
|
|
55
|
+
|
|
40
56
|
### Type Selection Decision Tree
|
|
41
57
|
|
|
42
58
|
When choosing an action type, follow this decision process:
|
|
@@ -212,3 +228,6 @@ AI agents should verify these requirements before generating ActionCell configur
|
|
|
212
228
|
✓ `inlineCount` (if specified) is a non-negative number ≤ total secondary actions count
|
|
213
229
|
✓ `inlineAlwaysVisible` (if specified) is a boolean value
|
|
214
230
|
✓ Inline secondary actions configuration is applied only when secondary actions exist
|
|
231
|
+
✓ `skin` property (if specified) uses valid skin values:
|
|
232
|
+
- Primary actions: `"standard"`, `"inverted"`, `"premium"`
|
|
233
|
+
- Secondary actions: `"dark"`, `"destructive"`, `"premium"`
|
|
@@ -127,6 +127,7 @@ export interface AppConfig {
|
|
|
127
127
|
id: string; // Unique identifier for the action
|
|
128
128
|
type: 'update' | 'delete' | 'custom'; // Action type
|
|
129
129
|
label?: string; // Text displayed for the action
|
|
130
|
+
skin?: string; // Visual appearance of the action button (see Action Button Skin Values section)
|
|
130
131
|
disabled?: boolean; // Whether the action is disabled
|
|
131
132
|
tooltip?: string; // Tooltip text shown on hover
|
|
132
133
|
update?: { // Required when type is 'update'
|
|
@@ -204,6 +204,7 @@ export interface AppConfig {
|
|
|
204
204
|
id: string; // Unique identifier for the action
|
|
205
205
|
type: 'update' | 'delete' | 'custom'; // Action type
|
|
206
206
|
label?: string; // Text displayed for the action
|
|
207
|
+
skin?: string; // Visual appearance of the action button (see Action Button Skin Values section)
|
|
207
208
|
disabled?: boolean; // Whether the action is disabled
|
|
208
209
|
tooltip?: string; // Tooltip text shown on hover
|
|
209
210
|
update?: { // Required when type is 'update'
|
|
@@ -1225,6 +1226,22 @@ Both properties are optional, but at least one should be provided for the Action
|
|
|
1225
1226
|
- Complex operations
|
|
1226
1227
|
- ⚠️ Requires implementation: Must register action in overrides
|
|
1227
1228
|
|
|
1229
|
+
### Action Appearance: The `skin` Property
|
|
1230
|
+
|
|
1231
|
+
All action types support the optional `skin` property to customize the visual appearance of action buttons. The skin determines the button's color scheme and visual emphasis.
|
|
1232
|
+
|
|
1233
|
+
#### Skin Values by Action Type:
|
|
1234
|
+
|
|
1235
|
+
**Primary Actions** support these skin values:
|
|
1236
|
+
- `"standard"` - Default appearance (blue primary button)
|
|
1237
|
+
- `"inverted"` - Inverted color scheme
|
|
1238
|
+
- `"premium"` - Premium styling for premium features
|
|
1239
|
+
|
|
1240
|
+
**Secondary Actions** support these skin values:
|
|
1241
|
+
- `"dark"` - Dark appearance
|
|
1242
|
+
- `"destructive"` - Red appearance for dangerous actions (ideal for delete operations)
|
|
1243
|
+
- `"premium"` - Premium styling for premium features
|
|
1244
|
+
|
|
1228
1245
|
### Type Selection Decision Tree
|
|
1229
1246
|
|
|
1230
1247
|
When choosing an action type, follow this decision process:
|
|
@@ -1400,6 +1417,9 @@ AI agents should verify these requirements before generating ActionCell configur
|
|
|
1400
1417
|
✓ `inlineCount` (if specified) is a non-negative number ≤ total secondary actions count
|
|
1401
1418
|
✓ `inlineAlwaysVisible` (if specified) is a boolean value
|
|
1402
1419
|
✓ Inline secondary actions configuration is applied only when secondary actions exist
|
|
1420
|
+
✓ `skin` property (if specified) uses valid skin values:
|
|
1421
|
+
- Primary actions: `"standard"`, `"inverted"`, `"premium"`
|
|
1422
|
+
- Secondary actions: `"dark"`, `"destructive"`, `"premium"`
|
|
1403
1423
|
|
|
1404
1424
|
---
|
|
1405
1425
|
|
|
@@ -607,6 +607,22 @@ Both properties are optional, but at least one should be provided for the Action
|
|
|
607
607
|
- Complex operations
|
|
608
608
|
- ⚠️ Requires implementation: Must register action in overrides
|
|
609
609
|
|
|
610
|
+
### Action Appearance: The `skin` Property
|
|
611
|
+
|
|
612
|
+
All action types support the optional `skin` property to customize the visual appearance of action buttons. The skin determines the button's color scheme and visual emphasis.
|
|
613
|
+
|
|
614
|
+
#### Skin Values by Action Type:
|
|
615
|
+
|
|
616
|
+
**Primary Actions** support these skin values:
|
|
617
|
+
- `"standard"` - Default appearance (blue primary button)
|
|
618
|
+
- `"inverted"` - Inverted color scheme
|
|
619
|
+
- `"premium"` - Premium styling for premium features
|
|
620
|
+
|
|
621
|
+
**Secondary Actions** support these skin values:
|
|
622
|
+
- `"dark"` - Dark appearance
|
|
623
|
+
- `"destructive"` - Red appearance for dangerous actions (ideal for delete operations)
|
|
624
|
+
- `"premium"` - Premium styling for premium features
|
|
625
|
+
|
|
610
626
|
### Type Selection Decision Tree
|
|
611
627
|
|
|
612
628
|
When choosing an action type, follow this decision process:
|
|
@@ -782,5 +798,8 @@ AI agents should verify these requirements before generating ActionCell configur
|
|
|
782
798
|
✓ `inlineCount` (if specified) is a non-negative number ≤ total secondary actions count
|
|
783
799
|
✓ `inlineAlwaysVisible` (if specified) is a boolean value
|
|
784
800
|
✓ Inline secondary actions configuration is applied only when secondary actions exist
|
|
801
|
+
✓ `skin` property (if specified) uses valid skin values:
|
|
802
|
+
- Primary actions: `"standard"`, `"inverted"`, `"premium"`
|
|
803
|
+
- Secondary actions: `"dark"`, `"destructive"`, `"premium"`
|
|
785
804
|
|
|
786
805
|
---
|
|
@@ -135,6 +135,7 @@ export interface AppConfig {
|
|
|
135
135
|
id: string; // Unique identifier for the action
|
|
136
136
|
type: 'update' | 'delete' | 'custom'; // Action type
|
|
137
137
|
label?: string; // Text displayed for the action
|
|
138
|
+
skin?: string; // Visual appearance of the action button (see Action Button Skin Values section)
|
|
138
139
|
disabled?: boolean; // Whether the action is disabled
|
|
139
140
|
tooltip?: string; // Tooltip text shown on hover
|
|
140
141
|
update?: { // Required when type is 'update'
|
|
@@ -268,6 +268,7 @@ export interface AppConfig {
|
|
|
268
268
|
id: string; // Unique identifier for the action
|
|
269
269
|
type: 'update' | 'delete' | 'custom'; // Action type
|
|
270
270
|
label?: string; // Text displayed for the action
|
|
271
|
+
skin?: string; // Visual appearance of the action button (see Action Button Skin Values section)
|
|
271
272
|
disabled?: boolean; // Whether the action is disabled
|
|
272
273
|
tooltip?: string; // Tooltip text shown on hover
|
|
273
274
|
update?: { // Required when type is 'update'
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { usePagePath } from '../../hooks';
|
|
3
|
-
import { PatternsReactRoute, PatternsReactRouter } from '@wix/patterns';
|
|
3
|
+
import { PatternsReactRoute, PatternsReactRouter } from '@wix/patterns/router';
|
|
4
4
|
import { AutoPatternsPage } from './AutoPatternsPage';
|
|
5
5
|
import { Navigate } from 'react-router-dom';
|
|
6
6
|
const pageTypeToRouteType = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","usePagePath","PatternsReactRoute","PatternsReactRouter","AutoPatternsPage","Navigate","pageTypeToRouteType","collectionPage","entityPage","AutoPatternsRoutes","_ref","config","getPagePath","mainPage","pages","find","page","appMainPage","routes","map","routePath","id","createElement","key","type","path","element","pageConfig","filter","Boolean","mainPagePath","push","to"],"sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"sourcesContent":["import React from 'react';\nimport { usePagePath } from '../../hooks';\nimport { PatternsReactRoute, PatternsReactRouter } from '@wix/patterns';\nimport { AutoPatternsPage } from './AutoPatternsPage';\nimport type { RouteType } from '@wix/patterns/dist/types/components/Router/types';\nimport { Navigate } from 'react-router-dom';\nimport { AppConfig } from '../../types';\n\nconst pageTypeToRouteType: Record<string, RouteType> = {\n collectionPage: 'collection',\n entityPage: 'editEntity',\n};\n\nexport const AutoPatternsRoutes = ({ config }: { config: AppConfig }) => {\n const { getPagePath } = usePagePath(config);\n const mainPage = config.pages.find((page) => page.appMainPage);\n\n const routes = config.pages\n .map((page) => {\n const routePath = getPagePath(page.id);\n\n if (!routePath) {\n return null;\n }\n\n return (\n <PatternsReactRoute\n key={page.id}\n type={pageTypeToRouteType[page.type] ?? 'other'}\n path={routePath}\n element={<AutoPatternsPage pageConfig={page} />}\n />\n );\n })\n .filter(Boolean);\n\n if (mainPage) {\n const mainPagePath = getPagePath(mainPage.id);\n\n if (mainPagePath) {\n routes.push(\n <PatternsReactRoute\n key=\"main-redirect\"\n type=\"other\"\n path=\"/\"\n element={<Navigate to={mainPagePath} />}\n />,\n );\n }\n }\n\n return <PatternsReactRouter>{routes}</PatternsReactRouter>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,
|
|
1
|
+
{"version":3,"names":["React","usePagePath","PatternsReactRoute","PatternsReactRouter","AutoPatternsPage","Navigate","pageTypeToRouteType","collectionPage","entityPage","AutoPatternsRoutes","_ref","config","getPagePath","mainPage","pages","find","page","appMainPage","routes","map","routePath","id","createElement","key","type","path","element","pageConfig","filter","Boolean","mainPagePath","push","to"],"sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"sourcesContent":["import React from 'react';\nimport { usePagePath } from '../../hooks';\nimport { PatternsReactRoute, PatternsReactRouter } from '@wix/patterns/router';\nimport { AutoPatternsPage } from './AutoPatternsPage';\nimport type { RouteType } from '@wix/patterns/dist/types/components/Router/types';\nimport { Navigate } from 'react-router-dom';\nimport { AppConfig } from '../../types';\n\nconst pageTypeToRouteType: Record<string, RouteType> = {\n collectionPage: 'collection',\n entityPage: 'editEntity',\n};\n\nexport const AutoPatternsRoutes = ({ config }: { config: AppConfig }) => {\n const { getPagePath } = usePagePath(config);\n const mainPage = config.pages.find((page) => page.appMainPage);\n\n const routes = config.pages\n .map((page) => {\n const routePath = getPagePath(page.id);\n\n if (!routePath) {\n return null;\n }\n\n return (\n <PatternsReactRoute\n key={page.id}\n type={pageTypeToRouteType[page.type] ?? 'other'}\n path={routePath}\n element={<AutoPatternsPage pageConfig={page} />}\n />\n );\n })\n .filter(Boolean);\n\n if (mainPage) {\n const mainPagePath = getPagePath(mainPage.id);\n\n if (mainPagePath) {\n routes.push(\n <PatternsReactRoute\n key=\"main-redirect\"\n type=\"other\"\n path=\"/\"\n element={<Navigate to={mainPagePath} />}\n />,\n );\n }\n }\n\n return <PatternsReactRouter>{routes}</PatternsReactRouter>;\n};\n"],"mappings":"AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,WAAW,QAAQ,aAAa;AACzC,SAASC,kBAAkB,EAAEC,mBAAmB,QAAQ,sBAAsB;AAC9E,SAASC,gBAAgB,QAAQ,oBAAoB;AAErD,SAASC,QAAQ,QAAQ,kBAAkB;AAG3C,MAAMC,mBAA8C,GAAG;EACrDC,cAAc,EAAE,YAAY;EAC5BC,UAAU,EAAE;AACd,CAAC;AAED,OAAO,MAAMC,kBAAkB,GAAGC,IAAA,IAAuC;EAAA,IAAtC;IAAEC;EAA8B,CAAC,GAAAD,IAAA;EAClE,MAAM;IAAEE;EAAY,CAAC,GAAG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} from '@wix/patterns';
|
|
2
|
+
import { usePatternsNavigate } from '@wix/patterns/router';
|
|
3
3
|
import { useAppConfigContext, useSchemaRegistry } from '../providers';
|
|
4
4
|
import { generatePath } from 'react-router-dom';
|
|
5
5
|
import { usePagePath } from './usePagePath';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","usePatternsNavigate","useAppConfigContext","useSchemaRegistry","generatePath","usePagePath","useNavigation","navigateToEntityPage","navigateToEntityPagePatterns","appConfig","getSchema","getPagePath","_ref","_route$params","item","entityPageId","entityPage","pages","find","page","id","route","collectionId","schema","path","params","idField","entity","getParentPagePath","parentPageId"],"sources":["../../../src/hooks/useNavigationUtils.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { usePatternsNavigate } from '@wix/patterns';\nimport { useAppConfigContext, useSchemaRegistry } from '../providers';\nimport { generatePath } from 'react-router-dom';\nimport { EntityPageConfig } from '../types';\nimport { usePagePath } from './usePagePath';\n\nexport type NavigateToEntityPageFunc = (args: {\n item: any;\n entityPageId?: string;\n}) => void;\n\nexport const useNavigation = () => {\n const { navigateToEntityPage: navigateToEntityPagePatterns } =\n usePatternsNavigate();\n const appConfig = useAppConfigContext();\n const { getSchema } = useSchemaRegistry();\n const { getPagePath } = usePagePath(appConfig);\n\n const navigateToEntityPage = useCallback(\n ({ item, entityPageId }) => {\n const entityPage = entityPageId\n ? appConfig.pages.find((page) => page.id === entityPageId)\n : null;\n\n if (!entityPage) {\n return;\n }\n\n const { route, collectionId } = entityPage.entityPage as EntityPageConfig;\n const schema = getSchema(collectionId);\n if (route.path && route.params?.id && schema) {\n const path = generatePath(route.path, {\n [route.params.id]: item?.[schema.idField] ?? '',\n });\n navigateToEntityPagePatterns({\n path,\n entity: item,\n });\n }\n },\n [appConfig, navigateToEntityPagePatterns, getSchema],\n );\n\n const getParentPagePath = useCallback(\n (parentPageId?: string): string | undefined => {\n return getPagePath(parentPageId);\n },\n [getPagePath],\n );\n\n return {\n navigateToEntityPage,\n getParentPagePath,\n getPagePath,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,mBAAmB,QAAQ,
|
|
1
|
+
{"version":3,"names":["useCallback","usePatternsNavigate","useAppConfigContext","useSchemaRegistry","generatePath","usePagePath","useNavigation","navigateToEntityPage","navigateToEntityPagePatterns","appConfig","getSchema","getPagePath","_ref","_route$params","item","entityPageId","entityPage","pages","find","page","id","route","collectionId","schema","path","params","idField","entity","getParentPagePath","parentPageId"],"sources":["../../../src/hooks/useNavigationUtils.tsx"],"sourcesContent":["import { useCallback } from 'react';\nimport { usePatternsNavigate } from '@wix/patterns/router';\nimport { useAppConfigContext, useSchemaRegistry } from '../providers';\nimport { generatePath } from 'react-router-dom';\nimport { EntityPageConfig } from '../types';\nimport { usePagePath } from './usePagePath';\n\nexport type NavigateToEntityPageFunc = (args: {\n item: any;\n entityPageId?: string;\n}) => void;\n\nexport const useNavigation = () => {\n const { navigateToEntityPage: navigateToEntityPagePatterns } =\n usePatternsNavigate();\n const appConfig = useAppConfigContext();\n const { getSchema } = useSchemaRegistry();\n const { getPagePath } = usePagePath(appConfig);\n\n const navigateToEntityPage = useCallback(\n ({ item, entityPageId }) => {\n const entityPage = entityPageId\n ? appConfig.pages.find((page) => page.id === entityPageId)\n : null;\n\n if (!entityPage) {\n return;\n }\n\n const { route, collectionId } = entityPage.entityPage as EntityPageConfig;\n const schema = getSchema(collectionId);\n if (route.path && route.params?.id && schema) {\n const path = generatePath(route.path, {\n [route.params.id]: item?.[schema.idField] ?? '',\n });\n navigateToEntityPagePatterns({\n path,\n entity: item,\n });\n }\n },\n [appConfig, navigateToEntityPagePatterns, getSchema],\n );\n\n const getParentPagePath = useCallback(\n (parentPageId?: string): string | undefined => {\n return getPagePath(parentPageId);\n },\n [getPagePath],\n );\n\n return {\n navigateToEntityPage,\n getParentPagePath,\n getPagePath,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,QAAQ,OAAO;AACnC,SAASC,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AAM,EAAEb;MACV,CAAC,CAAC;IACJ;EACF,CAAC,EACD,CAACL,SAAS,EAAED,4BAA4B,EAAEE,SAAS,CACrD,CAAC;EAED,MAAMkB,iBAAiB,GAAG5B,WAAW,CAClC6B,YAAqB,IAAyB;IAC7C,OAAOlB,WAAW,CAACkB,YAAY,CAAC;EAClC,CAAC,EACD,CAAClB,WAAW,CACd,CAAC;EAED,OAAO;IACLJ,oBAAoB;IACpBqB,iBAAiB;IACjBjB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/base.ts"],"sourcesContent":["export type DividerActionConfig = { type: 'divider' };\n\nexport type BaseActionItemConfig = {\n id: string;\n label?: string;\n};\n\nexport interface Feedback {\n successToast?: { text: string };\n errorToast?: { text: string };\n}\n\nexport interface BaseActionModal {\n title?: { text: string };\n actions?: {\n submit?: { text: string };\n cancel?: { text: string };\n };\n feedback?: Feedback;\n}\n\nexport interface ActionModalField {\n id: string;\n label?: string;\n}\n\nexport interface DeleteActionModal extends BaseActionModal {\n description?: { text: string };\n}\n\nexport interface BulkDeleteActionModal extends DeleteActionModal {}\n\nexport type BulkDeleteAction =\n | {\n mode: 'modal';\n modal: BulkDeleteActionModal;\n custom?: never;\n }\n | {\n mode: 'custom';\n custom: CustomAction;\n modal?: never;\n };\n\nexport type DeleteAction = {\n mode: 'modal';\n modal: DeleteActionModal;\n};\n\nexport interface BaseActionPage {\n id: string;\n}\n\nexport type CustomAction = {};\n\nexport interface ActionModalWithFields extends BaseActionModal {\n fields: ActionModalField[];\n}\n\nexport interface UpdateActionModal extends ActionModalWithFields {}\n\nexport interface CreateActionModal extends ActionModalWithFields {}\n\nexport interface UpdateActionPage extends BaseActionPage {}\n\nexport interface CreateActionPage extends BaseActionPage {}\n\nexport type UpdateAction = {\n mode: 'page';\n page: UpdateActionPage;\n};\n\nexport type CreateAction = {\n mode: 'page';\n page: CreateActionPage;\n};\n\nexport type CreateActionConfig = BaseActionItemConfig & {\n type: 'create';\n create: CreateAction;\n};\n\nexport type UpdateActionConfig = BaseActionItemConfig & {\n type: 'update';\n update: UpdateAction;\n};\n\nexport type DeleteActionConfig = BaseActionItemConfig & {\n type: 'delete';\n delete: DeleteAction;\n};\n\nexport type BulkDeleteActionConfig = BaseActionItemConfig & {\n type: 'bulkDelete';\n bulkDelete: BulkDeleteAction;\n};\n\nexport type CustomActionConfig = BaseActionItemConfig & {\n type: 'custom';\n custom: CustomAction;\n};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/base.ts"],"sourcesContent":["export type DividerActionConfig = { type: 'divider' };\n\nexport type BaseActionItemConfig = {\n id: string;\n label?: string;\n skin?: string;\n};\n\nexport interface Feedback {\n successToast?: { text: string };\n errorToast?: { text: string };\n}\n\nexport interface BaseActionModal {\n title?: { text: string };\n actions?: {\n submit?: { text: string };\n cancel?: { text: string };\n };\n feedback?: Feedback;\n}\n\nexport interface ActionModalField {\n id: string;\n label?: string;\n}\n\nexport interface DeleteActionModal extends BaseActionModal {\n description?: { text: string };\n}\n\nexport interface BulkDeleteActionModal extends DeleteActionModal {}\n\nexport type BulkDeleteAction =\n | {\n mode: 'modal';\n modal: BulkDeleteActionModal;\n custom?: never;\n }\n | {\n mode: 'custom';\n custom: CustomAction;\n modal?: never;\n };\n\nexport type DeleteAction = {\n mode: 'modal';\n modal: DeleteActionModal;\n};\n\nexport interface BaseActionPage {\n id: string;\n}\n\nexport type CustomAction = {};\n\nexport interface ActionModalWithFields extends BaseActionModal {\n fields: ActionModalField[];\n}\n\nexport interface UpdateActionModal extends ActionModalWithFields {}\n\nexport interface CreateActionModal extends ActionModalWithFields {}\n\nexport interface UpdateActionPage extends BaseActionPage {}\n\nexport interface CreateActionPage extends BaseActionPage {}\n\nexport type UpdateAction = {\n mode: 'page';\n page: UpdateActionPage;\n};\n\nexport type CreateAction = {\n mode: 'page';\n page: CreateActionPage;\n};\n\nexport type CreateActionConfig = BaseActionItemConfig & {\n type: 'create';\n create: CreateAction;\n};\n\nexport type UpdateActionConfig = BaseActionItemConfig & {\n type: 'update';\n update: UpdateAction;\n};\n\nexport type DeleteActionConfig = BaseActionItemConfig & {\n type: 'delete';\n delete: DeleteAction;\n};\n\nexport type BulkDeleteActionConfig = BaseActionItemConfig & {\n type: 'bulkDelete';\n bulkDelete: BulkDeleteAction;\n};\n\nexport type CustomActionConfig = BaseActionItemConfig & {\n type: 'custom';\n custom: CustomAction;\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["resolveAction","actionConfig","action","label"],"sources":["../../../../src/utils/actions/resolveAction.ts"],"sourcesContent":["import { BaseActionItemConfig, ResolvedAction } from '../../types';\n\nexport const resolveAction = (\n actionConfig: BaseActionItemConfig,\n action: Partial<ResolvedAction>,\n) => {\n return {\n ...action,\n label: actionConfig.label ?? action.label,\n };\n};\n"],"mappings":"AAEA,OAAO,MAAMA,aAAa,GAAGA,CAC3BC,YAAkC,EAClCC,MAA+B,KAC5B;EACH,OAAO;IACL,GAAGA,MAAM;IACTC,KAAK,EAAEF,YAAY,CAACE,KAAK,IAAID,MAAM,CAACC;
|
|
1
|
+
{"version":3,"names":["resolveAction","actionConfig","action","label","skin"],"sources":["../../../../src/utils/actions/resolveAction.ts"],"sourcesContent":["import { BaseActionItemConfig, ResolvedAction } from '../../types';\n\nexport const resolveAction = (\n actionConfig: BaseActionItemConfig,\n action: Partial<ResolvedAction>,\n) => {\n return {\n ...action,\n label: actionConfig.label ?? action.label,\n skin: actionConfig.skin,\n };\n};\n"],"mappings":"AAEA,OAAO,MAAMA,aAAa,GAAGA,CAC3BC,YAAkC,EAClCC,MAA+B,KAC5B;EACH,OAAO;IACL,GAAGA,MAAM;IACTC,KAAK,EAAEF,YAAY,CAACE,KAAK,IAAID,MAAM,CAACC,KAAK;IACzCC,IAAI,EAAEH,YAAY,CAACG;EACrB,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/utils/actions/types.ts"],"sourcesContent":["import { ActionCellAPI, CollectionOptimisticActions } from '@wix/patterns';\nimport {\n UpdateActionConfig,\n CustomActionConfig,\n SchemaConfig,\n BulkDeleteActionConfig,\n DeleteActionConfig,\n CreateActionConfig,\n BaseSDK,\n} from '../../types';\nimport { IconElement } from '@wix/design-system';\n\nexport interface ResolvedAction {\n label: string;\n icon: IconElement;\n onClick: () => void;\n disabled?: boolean;\n tooltip?: string;\n}\n\nexport interface BaseContextParams {\n schema: SchemaConfig;\n}\n\nexport interface ActionsSDK extends BaseSDK {\n getSchema: (collectionId: string) => SchemaConfig | undefined;\n collectionId: string; // TODO: Why collectionId is needed here? getSchema with internal collectionId is enough\n getOptimisticActions: (\n collectionId: string,\n ) => CollectionOptimisticActions<any, any>;\n}\n\nexport interface BaseActionParams<T = Record<string, any>> {\n sdk: ActionsSDK;\n actionParams: T;\n}\n\nexport interface ActionCellBaseParams extends BaseActionParams {\n actionParams: {\n item: any;\n index: number;\n api: ActionCellAPI<any, any>;\n };\n}\n\nexport interface BulkDeleteActionParams extends BaseActionParams {\n action: BulkDeleteActionConfig;\n actionParams: {\n selectedValues: any[];\n total: number;\n };\n}\n\nexport interface DeleteActionParams extends ActionCellBaseParams {\n action: DeleteActionConfig;\n}\n\nexport interface UpdateActionParams extends ActionCellBaseParams {\n action: UpdateActionConfig;\n}\n\nexport interface CreateActionParams extends BaseActionParams {\n action: CreateActionConfig;\n}\n\nexport interface CustomActionParams<T> extends BaseActionParams<T> {\n action: CustomActionConfig;\n}\n\nexport interface ActionModalProps {\n modalParams: Record<string, any>;\n actionParams: Record<string, any>;\n sdk: ActionsSDK;\n}\n\nexport interface CustomActionModalProps extends ActionModalProps {\n modalParams: { id: string };\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/utils/actions/types.ts"],"sourcesContent":["import { ActionCellAPI, CollectionOptimisticActions } from '@wix/patterns';\nimport {\n UpdateActionConfig,\n CustomActionConfig,\n SchemaConfig,\n BulkDeleteActionConfig,\n DeleteActionConfig,\n CreateActionConfig,\n BaseSDK,\n} from '../../types';\nimport { IconElement } from '@wix/design-system';\n\nexport interface ResolvedAction {\n label: string;\n icon: IconElement;\n onClick: () => void;\n disabled?: boolean;\n tooltip?: string;\n skin?: string;\n}\n\nexport interface BaseContextParams {\n schema: SchemaConfig;\n}\n\nexport interface ActionsSDK extends BaseSDK {\n getSchema: (collectionId: string) => SchemaConfig | undefined;\n collectionId: string; // TODO: Why collectionId is needed here? getSchema with internal collectionId is enough\n getOptimisticActions: (\n collectionId: string,\n ) => CollectionOptimisticActions<any, any>;\n}\n\nexport interface BaseActionParams<T = Record<string, any>> {\n sdk: ActionsSDK;\n actionParams: T;\n}\n\nexport interface ActionCellBaseParams extends BaseActionParams {\n actionParams: {\n item: any;\n index: number;\n api: ActionCellAPI<any, any>;\n };\n}\n\nexport interface BulkDeleteActionParams extends BaseActionParams {\n action: BulkDeleteActionConfig;\n actionParams: {\n selectedValues: any[];\n total: number;\n };\n}\n\nexport interface DeleteActionParams extends ActionCellBaseParams {\n action: DeleteActionConfig;\n}\n\nexport interface UpdateActionParams extends ActionCellBaseParams {\n action: UpdateActionConfig;\n}\n\nexport interface CreateActionParams extends BaseActionParams {\n action: CreateActionConfig;\n}\n\nexport interface CustomActionParams<T> extends BaseActionParams<T> {\n action: CustomActionConfig;\n}\n\nexport interface ActionModalProps {\n modalParams: Record<string, any>;\n actionParams: Record<string, any>;\n sdk: ActionsSDK;\n}\n\nexport interface CustomActionModalProps extends ActionModalProps {\n modalParams: { id: string };\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/types/actions/base.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,mBAAmB,GAAG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;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;IACf,MAAM,EAAE,YAAY,CAAC;CACtB,CAAC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { BaseActionItemConfig, ResolvedAction } from '../../types';
|
|
2
2
|
export declare const resolveAction: (actionConfig: BaseActionItemConfig, action: Partial<ResolvedAction>) => {
|
|
3
3
|
label: string | undefined;
|
|
4
|
+
skin: string | undefined;
|
|
4
5
|
icon?: import("@wix/design-system").IconElement | undefined;
|
|
5
6
|
onClick?: (() => void) | undefined;
|
|
6
7
|
disabled?: boolean | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveAction.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/resolveAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnE,eAAO,MAAM,aAAa,GACxB,cAAc,oBAAoB,EAClC,QAAQ,OAAO,CAAC,cAAc,CAAC
|
|
1
|
+
{"version":3,"file":"resolveAction.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/resolveAction.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAEnE,eAAO,MAAM,aAAa,GACxB,cAAc,oBAAoB,EAClC,QAAQ,OAAO,CAAC,cAAc,CAAC;;;;;;;CAOhC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/utils/actions/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,EAAE,2BAA2B,EAAE,MAAM,eAAe,CAAC;AAC3E,OA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|
|
2
2
|
"name": "@wix/auto-patterns",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.17.0",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Matvey Oklander",
|
|
@@ -38,8 +38,7 @@
|
|
|
38
38
|
"@wix/data": "^1.0.222",
|
|
39
39
|
"@wix/wix-ui-icons-common": "^3.76.0",
|
|
40
40
|
"ejs": "^3.1.10",
|
|
41
|
-
"lodash": "^4.17.21"
|
|
42
|
-
"react-router-dom": "^6.30.1"
|
|
41
|
+
"lodash": "^4.17.21"
|
|
43
42
|
},
|
|
44
43
|
"publishConfig": {
|
|
45
44
|
"registry": "https://registry.npmjs.org/",
|
|
@@ -47,24 +46,24 @@
|
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@testing-library/react": "^11.2.7",
|
|
50
|
-
"@types/ejs": "^3",
|
|
49
|
+
"@types/ejs": "^3.1.5",
|
|
51
50
|
"@types/jest": "^27.5.2",
|
|
52
|
-
"@types/lodash": "^4.17.
|
|
51
|
+
"@types/lodash": "^4.17.20",
|
|
53
52
|
"@types/node": "^16.18.126",
|
|
54
53
|
"@types/node-fetch": "^2.6.12",
|
|
55
54
|
"@types/react": "^16.14.65",
|
|
56
55
|
"@wix/crm": "^1.0.385",
|
|
57
|
-
"@wix/design-system": "^1.
|
|
58
|
-
"@wix/eslint-config-yoshi": "^6.
|
|
59
|
-
"@wix/fe-essentials-standalone": "^1.
|
|
60
|
-
"@wix/jest-yoshi-preset": "^6.
|
|
61
|
-
"@wix/patterns": "^1.
|
|
56
|
+
"@wix/design-system": "^1.204.0",
|
|
57
|
+
"@wix/eslint-config-yoshi": "^6.149.0",
|
|
58
|
+
"@wix/fe-essentials-standalone": "^1.1355.0",
|
|
59
|
+
"@wix/jest-yoshi-preset": "^6.149.0",
|
|
60
|
+
"@wix/patterns": "^1.230.0",
|
|
62
61
|
"@wix/sdk": "^1.15.24",
|
|
63
62
|
"@wix/sdk-testkit": ">=0.1.6",
|
|
64
|
-
"@wix/wix-data-items-common": "^1.0.
|
|
65
|
-
"@wix/wix-data-items-sdk": "^1.0.
|
|
66
|
-
"@wix/yoshi-flow-library": "^6.
|
|
67
|
-
"@wix/yoshi-style-dependencies": "^6.
|
|
63
|
+
"@wix/wix-data-items-common": "^1.0.172",
|
|
64
|
+
"@wix/wix-data-items-sdk": "^1.0.362",
|
|
65
|
+
"@wix/yoshi-flow-library": "^6.149.0",
|
|
66
|
+
"@wix/yoshi-style-dependencies": "^6.149.0",
|
|
68
67
|
"chance": "^1.1.13",
|
|
69
68
|
"date-fns": "^2.30.0",
|
|
70
69
|
"express": "^4.21.2",
|
|
@@ -72,13 +71,15 @@
|
|
|
72
71
|
"jest": "^27.5.1",
|
|
73
72
|
"node-fetch": "^2.7.0",
|
|
74
73
|
"react": "16.14.0",
|
|
74
|
+
"react-router-dom": "^6.23.1",
|
|
75
75
|
"typescript": "~5.8.3"
|
|
76
76
|
},
|
|
77
77
|
"peerDependencies": {
|
|
78
78
|
"@wix/dashboard": "^1.3.33",
|
|
79
|
-
"@wix/design-system": "^1.
|
|
80
|
-
"@wix/patterns": "^1.
|
|
81
|
-
"react": "^16.8.0"
|
|
79
|
+
"@wix/design-system": "^1.204.0",
|
|
80
|
+
"@wix/patterns": "^1.230.0",
|
|
81
|
+
"react": "^16.8.0",
|
|
82
|
+
"react-router-dom": "^6.0.0 || ^7.0.0"
|
|
82
83
|
},
|
|
83
84
|
"jest": {
|
|
84
85
|
"preset": "@wix/jest-yoshi-preset"
|
|
@@ -124,5 +125,5 @@
|
|
|
124
125
|
"wallaby": {
|
|
125
126
|
"autoDetect": true
|
|
126
127
|
},
|
|
127
|
-
"falconPackageHash": "
|
|
128
|
+
"falconPackageHash": "b0543b7e396d932bc30b2af3efe67423c43528ee93526a6b8ad577cb"
|
|
128
129
|
}
|