@wix/auto-patterns 1.28.0 → 1.30.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/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +19 -58
- package/dist/cjs/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.js +48 -0
- package/dist/cjs/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.js.map +1 -0
- package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js +1 -1
- package/dist/cjs/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js.map +1 -1
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js +11 -7
- package/dist/cjs/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
- package/dist/cjs/components/ModalRenderer.js +1 -1
- package/dist/cjs/components/ModalRenderer.js.map +1 -1
- package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js +5 -0
- package/dist/cjs/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
- package/dist/cjs/hooks/index.js +0 -7
- package/dist/cjs/hooks/index.js.map +1 -1
- package/dist/cjs/hooks/useAppContextSync.js +24 -0
- package/dist/cjs/hooks/useAppContextSync.js.map +1 -0
- package/dist/cjs/hooks/useAutoPatternsOptimisticActions.js +2 -2
- package/dist/cjs/hooks/useAutoPatternsOptimisticActions.js.map +1 -1
- package/dist/cjs/hooks/useBaseSDK.js +1 -1
- package/dist/cjs/hooks/useBaseSDK.js.map +1 -1
- package/dist/cjs/hooks/useColumns.js +1 -1
- package/dist/cjs/hooks/useColumns.js.map +1 -1
- package/dist/cjs/hooks/useEmptyStates.js +1 -1
- package/dist/cjs/hooks/useEmptyStates.js.map +1 -1
- package/dist/cjs/hooks/useEntityPageHeaderTexts.js +2 -2
- package/dist/cjs/hooks/useEntityPageHeaderTexts.js.map +1 -1
- package/dist/cjs/hooks/useFilters.js +2 -2
- package/dist/cjs/hooks/useFilters.js.map +1 -1
- package/dist/cjs/hooks/useGridFeatures.js +10 -2
- package/dist/cjs/hooks/useGridFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableFeatures.js +12 -4
- package/dist/cjs/hooks/useTableFeatures.js.map +1 -1
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js +10 -2
- package/dist/cjs/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/cjs/providers/AppContext.js +10 -8
- package/dist/cjs/providers/AppContext.js.map +1 -1
- package/dist/cjs/providers/AppContextData.js +40 -0
- package/dist/cjs/providers/AppContextData.js.map +1 -0
- package/dist/cjs/providers/{PatternsWizardOverridesContext.js → AutoPatternsOverridesContext.js} +14 -11
- package/dist/cjs/providers/AutoPatternsOverridesContext.js.map +1 -0
- package/dist/cjs/providers/ItemsContext.js +14 -11
- package/dist/cjs/providers/ItemsContext.js.map +1 -1
- package/dist/cjs/providers/SchemaContext.js +24 -7
- package/dist/cjs/providers/SchemaContext.js.map +1 -1
- package/dist/cjs/providers/index.js +11 -4
- package/dist/cjs/providers/index.js.map +1 -1
- package/dist/cjs/types/BaseSDK.js.map +1 -1
- package/dist/cjs/types/CollectionPageConfig.js.map +1 -1
- package/dist/cjs/types/EntityPageConfig.js.map +1 -1
- package/dist/cjs/types/actions/actionCell.js.map +1 -1
- package/dist/cjs/types/actions/base.js.map +1 -1
- package/dist/cjs/types/actions/bulkActions.js.map +1 -1
- package/dist/cjs/types/actions/collectionPageActions.js.map +1 -1
- package/dist/cjs/types/actions/entityPageActions.js.map +1 -1
- package/dist/cjs/types/fetchData.js.map +1 -1
- package/dist/cjs/types/types.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/cjs/utils/vibe.js +11 -0
- package/dist/cjs/utils/vibe.js.map +1 -0
- package/dist/docs/action_cell.md +18 -8
- package/dist/docs/app_config_structure.md +36 -1
- package/dist/docs/app_context.md +109 -0
- package/dist/docs/auto-patterns-guide.md +244 -64
- package/dist/docs/bulk_actions.md +10 -5
- package/dist/docs/collection_page.md +1 -1
- package/dist/docs/collection_page_actions.md +16 -9
- package/dist/docs/custom_overrides.md +21 -21
- package/dist/docs/entity_page.md +10 -10
- package/dist/docs/entity_page_actions.md +11 -4
- package/dist/docs/index.md +4 -0
- package/dist/docs/installation.md +3 -3
- package/dist/docs/resolved_action.md +6 -2
- package/dist/docs/wix_fqdn_custom_data_source.md +2 -2
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js +2 -25
- package/dist/esm/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js +2 -2
- package/dist/esm/components/AutoPatternsCollectionPageContent/AutoPatternsCollectionPageContent.js.map +1 -1
- package/dist/esm/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.js +29 -0
- package/dist/esm/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.js.map +1 -0
- package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js +2 -2
- package/dist/esm/components/AutoPatternsEntityPage/RenderLayout/RenderLayoutContent.js.map +1 -1
- package/dist/esm/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js +2 -2
- package/dist/esm/components/AutoPatternsEntityPage/ViewEntityPage/RenderViewLayoutContent.js.map +1 -1
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js +5 -1
- package/dist/esm/components/AutoPatternsRoute/AutoPatternsRoutes.js.map +1 -1
- package/dist/esm/components/ModalRenderer.js +2 -2
- package/dist/esm/components/ModalRenderer.js.map +1 -1
- package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js +4 -0
- package/dist/esm/dataSourceAdapters/cms/cmsAdapter.js.map +1 -1
- package/dist/esm/hooks/index.js +0 -1
- package/dist/esm/hooks/index.js.map +1 -1
- package/dist/esm/hooks/useAppContextSync.js +19 -0
- package/dist/esm/hooks/useAppContextSync.js.map +1 -0
- package/dist/esm/hooks/useAutoPatternsOptimisticActions.js +2 -2
- package/dist/esm/hooks/useAutoPatternsOptimisticActions.js.map +1 -1
- package/dist/esm/hooks/useBaseSDK.js +2 -2
- package/dist/esm/hooks/useBaseSDK.js.map +1 -1
- package/dist/esm/hooks/useColumns.js +2 -2
- package/dist/esm/hooks/useColumns.js.map +1 -1
- package/dist/esm/hooks/useEmptyStates.js +2 -2
- package/dist/esm/hooks/useEmptyStates.js.map +1 -1
- package/dist/esm/hooks/useEntityPageHeaderTexts.js +2 -2
- package/dist/esm/hooks/useEntityPageHeaderTexts.js.map +1 -1
- package/dist/esm/hooks/useFilters.js +2 -2
- package/dist/esm/hooks/useFilters.js.map +1 -1
- package/dist/esm/hooks/useGridFeatures.js +10 -2
- package/dist/esm/hooks/useGridFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableFeatures.js +12 -4
- package/dist/esm/hooks/useTableFeatures.js.map +1 -1
- package/dist/esm/hooks/useTableGridSwitchFeatures.js +10 -2
- package/dist/esm/hooks/useTableGridSwitchFeatures.js.map +1 -1
- package/dist/esm/providers/AppContext.js +7 -5
- package/dist/esm/providers/AppContext.js.map +1 -1
- package/dist/esm/providers/AppContextData.js +26 -0
- package/dist/esm/providers/AppContextData.js.map +1 -0
- package/dist/esm/providers/AutoPatternsOverridesContext.js +19 -0
- package/dist/esm/providers/AutoPatternsOverridesContext.js.map +1 -0
- package/dist/esm/providers/ItemsContext.js +10 -7
- package/dist/esm/providers/ItemsContext.js.map +1 -1
- package/dist/esm/providers/SchemaContext.js +23 -6
- package/dist/esm/providers/SchemaContext.js.map +1 -1
- package/dist/esm/providers/index.js +2 -1
- package/dist/esm/providers/index.js.map +1 -1
- package/dist/esm/types/BaseSDK.js.map +1 -1
- package/dist/esm/types/CollectionPageConfig.js.map +1 -1
- package/dist/esm/types/EntityPageConfig.js.map +1 -1
- package/dist/esm/types/actions/actionCell.js.map +1 -1
- package/dist/esm/types/actions/base.js.map +1 -1
- package/dist/esm/types/actions/bulkActions.js.map +1 -1
- package/dist/esm/types/actions/collectionPageActions.js.map +1 -1
- package/dist/esm/types/actions/entityPageActions.js.map +1 -1
- package/dist/esm/types/fetchData.js.map +1 -1
- package/dist/esm/types/types.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/esm/utils/vibe.js +6 -0
- package/dist/esm/utils/vibe.js.map +1 -0
- package/dist/types/components/AutoPatternsCollectionPage/AutoPatternsCollectionPage.d.ts.map +1 -1
- package/dist/types/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.d.ts +3 -0
- package/dist/types/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.d.ts.map +1 -0
- package/dist/types/components/AutoPatternsRoute/AutoPatternsRoutes.d.ts.map +1 -1
- package/dist/types/dataSourceAdapters/cms/cmsAdapter.d.ts +2 -1
- package/dist/types/dataSourceAdapters/cms/cmsAdapter.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +0 -1
- package/dist/types/hooks/index.d.ts.map +1 -1
- package/dist/types/hooks/useAppContextSync.d.ts +2 -0
- package/dist/types/hooks/useAppContextSync.d.ts.map +1 -0
- package/dist/types/hooks/useEntityPageHeaderTexts.d.ts.map +1 -1
- package/dist/types/hooks/useGridFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableFeatures.d.ts.map +1 -1
- package/dist/types/hooks/useTableGridSwitchFeatures.d.ts.map +1 -1
- package/dist/types/providers/AppContext.d.ts +2 -2
- package/dist/types/providers/AppContext.d.ts.map +1 -1
- package/dist/types/providers/AppContextData.d.ts +13 -0
- package/dist/types/providers/AppContextData.d.ts.map +1 -0
- package/dist/types/providers/{PatternsWizardOverridesContext.d.ts → AutoPatternsOverridesContext.d.ts} +12 -4
- package/dist/types/providers/AutoPatternsOverridesContext.d.ts.map +1 -0
- package/dist/types/providers/ItemsContext.d.ts +6 -4
- package/dist/types/providers/ItemsContext.d.ts.map +1 -1
- package/dist/types/providers/SchemaContext.d.ts.map +1 -1
- package/dist/types/providers/index.d.ts +2 -1
- package/dist/types/providers/index.d.ts.map +1 -1
- package/dist/types/types/BaseSDK.d.ts +2 -2
- package/dist/types/types/BaseSDK.d.ts.map +1 -1
- package/dist/types/types/CollectionPageConfig.d.ts +315 -0
- package/dist/types/types/CollectionPageConfig.d.ts.map +1 -1
- package/dist/types/types/EntityPageConfig.d.ts +111 -0
- package/dist/types/types/EntityPageConfig.d.ts.map +1 -1
- package/dist/types/types/actions/actionCell.d.ts +41 -0
- package/dist/types/types/actions/actionCell.d.ts.map +1 -1
- package/dist/types/types/actions/base.d.ts +85 -0
- package/dist/types/types/actions/base.d.ts.map +1 -1
- package/dist/types/types/actions/bulkActions.d.ts +40 -0
- package/dist/types/types/actions/bulkActions.d.ts.map +1 -1
- package/dist/types/types/actions/collectionPageActions.d.ts +30 -0
- package/dist/types/types/actions/collectionPageActions.d.ts.map +1 -1
- package/dist/types/types/actions/entityPageActions.d.ts +25 -0
- package/dist/types/types/actions/entityPageActions.d.ts.map +1 -1
- package/dist/types/types/fetchData.d.ts +35 -0
- package/dist/types/types/fetchData.d.ts.map +1 -1
- package/dist/types/types/types.d.ts +114 -2
- package/dist/types/types/types.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/dist/types/utils/vibe.d.ts +2 -0
- package/dist/types/utils/vibe.d.ts.map +1 -0
- package/package.json +10 -10
- package/dist/cjs/dataSourceAdapters/factory.js +0 -14
- package/dist/cjs/dataSourceAdapters/factory.js.map +0 -1
- package/dist/cjs/hooks/useUpdateAppContextItems.js +0 -18
- package/dist/cjs/hooks/useUpdateAppContextItems.js.map +0 -1
- package/dist/cjs/providers/PatternsWizardOverridesContext.js.map +0 -1
- package/dist/esm/dataSourceAdapters/factory.js +0 -10
- package/dist/esm/dataSourceAdapters/factory.js.map +0 -1
- package/dist/esm/hooks/useUpdateAppContextItems.js +0 -13
- package/dist/esm/hooks/useUpdateAppContextItems.js.map +0 -1
- package/dist/esm/providers/PatternsWizardOverridesContext.js +0 -15
- package/dist/esm/providers/PatternsWizardOverridesContext.js.map +0 -1
- package/dist/types/dataSourceAdapters/factory.d.ts +0 -3
- package/dist/types/dataSourceAdapters/factory.d.ts.map +0 -1
- package/dist/types/hooks/useUpdateAppContextItems.d.ts +0 -2
- package/dist/types/hooks/useUpdateAppContextItems.d.ts.map +0 -1
- package/dist/types/providers/PatternsWizardOverridesContext.d.ts.map +0 -1
|
@@ -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';\nimport { IconElement } from '@wix/design-system';\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 ResolvedActionCellPrimaryAction\n extends Omit<ResolvedAction, 'icon'> {\n prefixIcon?: IconElement;\n suffixIcon?: IconElement;\n}\n\nexport interface ActionCellActionParams {\n item: any;\n}\n\nexport type CustomActionCellActionParams =\n CustomActionParams<ActionCellActionParams>;\n\nexport type CustomActionCellPrimaryActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedActionCellPrimaryAction;\n\nexport type CustomActionCellSecondaryActionResolver = (\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';\nimport { IconElement } from '@wix/design-system';\n\nexport type ActionCellItemConfig =\n | UpdateActionConfig\n | CustomActionConfig\n | DeleteActionConfig;\n\nexport interface ActionCellPrimaryAction {\n /**\n * The action item configuration.\n */\n item: ActionCellItemConfig;\n /**\n * Whether the primary action should always be visible.\n * If true, the action is always visible; if false, it is visible only when hovering the row.\n * @default false\n */\n alwaysVisible?: boolean;\n}\n\nexport interface ActionCellSecondaryActions {\n /**\n * Array of action items and dividers for the secondary actions menu.\n */\n items: (ActionCellItemConfig | DividerActionConfig)[];\n /**\n * Number of secondary actions to show inline before moving to overflow menu.\n * Remaining actions appear in a \"more actions\" dropdown.\n * @default 0 (all actions in dropdown)\n */\n inlineCount?: number;\n /**\n * Whether inline secondary actions should always be visible.\n * If true, the inline actions are always visible; if false, they are visible only when hovering the row.\n * @default false\n */\n inlineAlwaysVisible?: boolean;\n}\n\nexport interface ActionCellConfig {\n /**\n * Primary action configuration.\n * Shown as the main action button in each row.\n */\n primaryAction?: ActionCellPrimaryAction;\n /**\n * Secondary actions configuration.\n * Shown as additional actions in dropdown or inline.\n */\n secondaryActions?: ActionCellSecondaryActions;\n}\n\nexport interface ResolvedActionCellPrimaryAction\n extends Omit<ResolvedAction, 'icon'> {\n /**\n * Icon displayed before the action label.\n */\n prefixIcon?: IconElement;\n /**\n * Icon displayed after the action label.\n */\n suffixIcon?: IconElement;\n}\n\nexport interface ActionCellActionParams {\n /**\n * The data item (row) that the action is being performed on.\n */\n item: any;\n}\n\nexport type CustomActionCellActionParams =\n CustomActionParams<ActionCellActionParams>;\n\nexport type CustomActionCellPrimaryActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedActionCellPrimaryAction;\n\nexport type CustomActionCellSecondaryActionResolver = (\n params: CustomActionCellActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCellActionModalProps\n extends CustomActionModalProps {\n /**\n * Action parameters including the row item context.\n */\n actionParams: ActionCellActionParams;\n}\n"],"mappings":"","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 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 }\n | {\n mode: 'custom';\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 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};\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/base.ts"],"sourcesContent":["export type DividerActionConfig = { type: 'divider' };\n\nexport type BaseActionItemConfig = {\n /**\n * Unique identifier for the action.\n */\n id: string;\n /**\n * Display text for the action button/menu item.\n */\n label?: string;\n /**\n * Visual appearance of the action button (e.g., 'standard', 'destructive', 'primary').\n */\n skin?: string;\n /**\n * BI tracking name.\n */\n biName?: string;\n};\n\nexport interface Feedback {\n /**\n * Success message displayed in a toast notification.\n */\n successToast?: { text: string };\n /**\n * Error message displayed in a toast notification.\n */\n errorToast?: { text: string };\n}\n\nexport interface BaseActionModal {\n /**\n * Modal header title.\n */\n title?: { text: string };\n /**\n * Modal action buttons configuration.\n */\n actions?: {\n /**\n * Submit/confirm button text.\n */\n submit?: { text: string };\n /**\n * Cancel button text.\n */\n cancel?: { text: string };\n };\n /**\n * Toast notifications for action completion.\n */\n feedback?: Feedback;\n}\n\nexport interface ActionModalField {\n /**\n * Field identifier.\n */\n id: string;\n /**\n * Field display label.\n */\n label?: string;\n}\n\nexport interface DeleteActionModal extends BaseActionModal {\n /**\n * Optional description text explaining the delete operation.\n */\n description?: { text: string };\n}\n\nexport interface BulkDeleteActionModal extends DeleteActionModal {}\n\nexport type BulkDeleteAction =\n | {\n mode: 'modal';\n modal: BulkDeleteActionModal;\n }\n | {\n mode: 'custom';\n modal?: never;\n };\n\nexport type DeleteAction = {\n /**\n * Show a confirmation modal.\n */\n mode: 'modal';\n modal: DeleteActionModal;\n};\n\nexport interface BaseActionPage {\n /**\n * Unique identifier.\n */\n id: string;\n}\n\nexport interface ActionModalWithFields extends BaseActionModal {\n /**\n * Form fields to display in the modal.\n */\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 /**\n * Navigate to a page for the update operation.\n */\n mode: 'page';\n page: UpdateActionPage;\n};\n\nexport type CreateAction = {\n /**\n * Navigate to a page for the create operation.\n */\n mode: 'page';\n page: CreateActionPage;\n};\n\nexport type CreateActionConfig = BaseActionItemConfig & {\n /**\n * Action type discriminator.\n */\n type: 'create';\n /**\n * Create action implementation configuration.\n */\n create: CreateAction;\n};\n\nexport type UpdateActionConfig = BaseActionItemConfig & {\n /**\n * Action type discriminator.\n */\n type: 'update';\n /**\n * Update action implementation configuration.\n */\n update: UpdateAction;\n};\n\nexport type DeleteActionConfig = BaseActionItemConfig & {\n /**\n * Action type discriminator.\n */\n type: 'delete';\n /**\n * Delete action implementation configuration.\n */\n delete: DeleteAction;\n};\n\nexport type BulkDeleteActionConfig = BaseActionItemConfig & {\n /**\n * Action type discriminator.\n */\n type: 'bulkDelete';\n /**\n * Bulk delete action implementation configuration.\n */\n bulkDelete: BulkDeleteAction;\n};\n\nexport type CustomActionConfig = BaseActionItemConfig & {\n /**\n * Action type discriminator.\n */\n type: 'custom';\n};\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/bulkActions.ts"],"sourcesContent":["import {\n BaseActionParams,\n CustomActionModalProps,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n BulkDeleteActionConfig,\n CustomActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type BulkActionItemConfig = BulkDeleteActionConfig | CustomActionConfig;\n\ntype BulkActionItem = {\n type: 'action';\n action: {\n item: BulkActionItemConfig;\n };\n menu?: never;\n};\n\ntype BulkActionMenu = {\n type: 'menu';\n menu: {\n label: string;\n items: (BulkActionItemConfig | DividerActionConfig)[];\n };\n action?: never;\n};\n\nexport interface BulkActionsConfig {\n primaryActions?: (BulkActionItem | BulkActionMenu)[];\n secondaryActions?: (BulkActionItemConfig | DividerActionConfig)[];\n}\n\nexport interface BulkActionsActionParams {\n selectedValues: any[];\n total: number;\n}\n\nexport interface CustomBulkActionsActionParams extends BaseActionParams {\n actionParams: BulkActionsActionParams;\n}\nexport type CustomBulkActionsActionResolver = (\n params: CustomBulkActionsActionParams,\n) => ResolvedAction;\n\nexport interface CustomBulkActionsActionModalProps\n extends CustomActionModalProps {\n actionParams: BulkActionsActionParams;\n}\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/bulkActions.ts"],"sourcesContent":["import {\n BaseActionParams,\n CustomActionModalProps,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n BulkDeleteActionConfig,\n CustomActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type BulkActionItemConfig = BulkDeleteActionConfig | CustomActionConfig;\n\ntype BulkActionItem = {\n /**\n * Layout type discriminator.\n */\n type: 'action';\n /**\n * Single bulk action configuration.\n */\n action: {\n item: BulkActionItemConfig;\n };\n menu?: never;\n};\n\ntype BulkActionMenu = {\n /**\n * Layout type discriminator.\n */\n type: 'menu';\n /**\n * Menu configuration with multiple bulk actions.\n */\n menu: {\n /**\n * Menu group label displayed in the bulk actions toolbar.\n */\n label: string;\n /**\n * List of bulk actions and dividers in the menu.\n */\n items: (BulkActionItemConfig | DividerActionConfig)[];\n };\n action?: never;\n};\n\nexport interface BulkActionsConfig {\n /**\n * Primary bulk actions configuration.\n * Array of actions or menus shown prominently in the bulk actions toolbar.\n * Can include both single actions and grouped menu actions.\n */\n primaryActions?: (BulkActionItem | BulkActionMenu)[];\n /**\n * Secondary bulk actions configuration.\n * Array of individual actions and dividers shown in secondary position.\n * Typically displayed as individual buttons or in an overflow menu.\n */\n secondaryActions?: (BulkActionItemConfig | DividerActionConfig)[];\n}\n\nexport interface BulkActionsActionParams {\n /**\n * Array of selected item values to perform the bulk action on.\n */\n selectedValues: any[];\n /**\n * Total number of selected items.\n */\n total: number;\n}\n\nexport interface CustomBulkActionsActionParams extends BaseActionParams {\n /**\n * Bulk action parameters.\n */\n actionParams: BulkActionsActionParams;\n}\n\nexport type CustomBulkActionsActionResolver = (\n params: CustomBulkActionsActionParams,\n) => ResolvedAction;\n\nexport interface CustomBulkActionsActionModalProps\n extends CustomActionModalProps {\n /**\n * Bulk action parameters.\n */\n actionParams: BulkActionsActionParams;\n}\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/collectionPageActions.ts"],"sourcesContent":["import {\n CustomActionModalProps,\n CustomActionParams,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n CreateActionConfig,\n CustomActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type CollectionPageActionConfig = (\n | CreateActionConfig\n | CustomActionConfig\n) & {\n collection:\n | {\n collectionId: string;\n entityTypeSource: 'cms';\n custom?: never;\n }\n | {\n collectionId: string;\n entityTypeSource: 'custom';\n custom: {\n id: string;\n };\n };\n};\n\ntype CollectionPageAction = {\n type: 'action';\n action: {\n item: CollectionPageActionConfig;\n };\n menu?: never;\n};\n\ntype CollectionPageMenu = {\n type: 'menu';\n menu: {\n label: string;\n items: (CollectionPageActionConfig | DividerActionConfig)[];\n };\n action?: never;\n};\n\nexport type CollectionPagePrimaryActions =\n | CollectionPageAction\n | CollectionPageMenu;\n\nexport type CollectionPageSecondaryActions =\n | CollectionPageAction\n | CollectionPageMenu;\n\nexport interface CollectionPageActionParams {\n collectionId: string;\n}\n\nexport type CustomActionCollectionPageActionParams =\n CustomActionParams<CollectionPageActionParams>;\n\nexport type CustomActionCollectionPageActionResolver = (\n params: CustomActionCollectionPageActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCollectionPageActionModalProps\n extends CustomActionModalProps {\n actionParams: CollectionPageActionParams;\n}\n\nexport type CollectionPageOnRowClickActionConfig = CustomActionConfig & {\n item: any;\n};\n\nexport interface CollectionPageActionOnRowClickParams {\n item: any;\n}\n\nexport type CustomActionCollectionPageActionOnRowClickParams =\n CustomActionParams<CollectionPageActionOnRowClickParams>;\n\nexport type CustomActionCollectionPageActionOnRowClickResolver = (\n params: CustomActionCollectionPageActionOnRowClickParams,\n) => ResolvedAction;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/collectionPageActions.ts"],"sourcesContent":["import {\n CustomActionModalProps,\n CustomActionParams,\n ResolvedAction,\n} from '../../exports/types';\nimport {\n CreateActionConfig,\n CustomActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type CollectionPageActionConfig = (\n | CreateActionConfig\n | CustomActionConfig\n) & {\n collection:\n | {\n collectionId: string;\n entityTypeSource: 'cms';\n custom?: never;\n }\n | {\n collectionId: string;\n entityTypeSource: 'custom';\n custom: {\n id: string;\n };\n };\n};\n\ntype CollectionPageAction = {\n /**\n * Layout type discriminator.\n */\n type: 'action';\n /**\n * Single action configuration.\n */\n action: {\n item: CollectionPageActionConfig;\n };\n menu?: never;\n};\n\ntype CollectionPageMenu = {\n /**\n * Layout type discriminator.\n */\n type: 'menu';\n /**\n * Menu configuration with multiple actions.\n */\n menu: {\n /**\n * Menu group label displayed in the UI.\n */\n label: string;\n /**\n * List of actions and dividers in the menu.\n */\n items: (CollectionPageActionConfig | DividerActionConfig)[];\n };\n action?: never;\n};\n\nexport type CollectionPagePrimaryActions =\n | CollectionPageAction\n | CollectionPageMenu;\n\nexport type CollectionPageSecondaryActions =\n | CollectionPageAction\n | CollectionPageMenu;\n\nexport interface CollectionPageActionParams {\n /**\n * The collection ID that the action is operating on.\n */\n collectionId: string;\n}\n\nexport type CustomActionCollectionPageActionParams =\n CustomActionParams<CollectionPageActionParams>;\n\nexport type CustomActionCollectionPageActionResolver = (\n params: CustomActionCollectionPageActionParams,\n) => ResolvedAction;\n\nexport interface CustomActionCollectionPageActionModalProps\n extends CustomActionModalProps {\n /**\n * Collection-specific action parameters.\n */\n actionParams: CollectionPageActionParams;\n}\n\nexport type CollectionPageOnRowClickActionConfig = CustomActionConfig & {\n /**\n * The data item that was clicked (row/card data).\n */\n item: any;\n};\n\nexport interface CollectionPageActionOnRowClickParams {\n /**\n * The data item that was clicked (row/card data).\n */\n item: any;\n}\n\nexport type CustomActionCollectionPageActionOnRowClickParams =\n CustomActionParams<CollectionPageActionOnRowClickParams>;\n\nexport type CustomActionCollectionPageActionOnRowClickResolver = (\n params: CustomActionCollectionPageActionOnRowClickParams,\n) => ResolvedAction;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../../src/types/actions/entityPageActions.ts"],"sourcesContent":["import { FieldValues, UseFormReturn } from '@wix/patterns/form';\nimport { CustomActionParams, ResolvedAction } from '../..';\nimport {\n CreateActionConfig,\n CustomActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type EntityPageMoreActions = (\n | CustomActionConfig\n | DividerActionConfig\n)[];\n\nexport type EntityPageActionConfig = CreateActionConfig | CustomActionConfig;\n\ntype EntityPageAction = {\n type: 'action';\n action: {\n item: EntityPageActionConfig;\n };\n menu?: never;\n};\n\ntype EntityPageMenu = {\n type: 'menu';\n menu: {\n label: string;\n items: (EntityPageActionConfig | DividerActionConfig)[];\n };\n action?: never;\n};\n\nexport type EntityPagePrimaryActions = EntityPageAction | EntityPageMenu;\nexport type EntityPageSecondaryActions = EntityPageAction | EntityPageMenu;\n\nexport interface EntityPageActionParams {\n entity: any;\n form?: UseFormReturn<FieldValues, any, undefined>;\n}\n\nexport type CustomEntityPageActionParams =\n CustomActionParams<EntityPageActionParams>;\n\nexport type CustomEntityPageActionResolver = (\n params: CustomEntityPageActionParams,\n) => ResolvedAction;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../../src/types/actions/entityPageActions.ts"],"sourcesContent":["import { FieldValues, UseFormReturn } from '@wix/patterns/form';\nimport { CustomActionParams, ResolvedAction } from '../..';\nimport {\n CreateActionConfig,\n CustomActionConfig,\n DividerActionConfig,\n} from './base';\n\nexport type EntityPageMoreActions = (\n | CustomActionConfig\n | DividerActionConfig\n)[];\n\nexport type EntityPageActionConfig = CreateActionConfig | CustomActionConfig;\n\ntype EntityPageAction = {\n /**\n * Layout type discriminator.\n */\n type: 'action';\n /**\n * Single action configuration.\n */\n action: {\n item: EntityPageActionConfig;\n };\n menu?: never;\n};\n\ntype EntityPageMenu = {\n /**\n * Layout type discriminator.\n */\n type: 'menu';\n /**\n * Menu configuration with multiple actions.\n */\n menu: {\n /**\n * Menu group label displayed in the UI.\n */\n label: string;\n /**\n * List of actions and dividers in the menu.\n */\n items: (EntityPageActionConfig | DividerActionConfig)[];\n };\n action?: never;\n};\n\nexport type EntityPagePrimaryActions = EntityPageAction | EntityPageMenu;\n\nexport type EntityPageSecondaryActions = EntityPageAction | EntityPageMenu;\n\nexport interface EntityPageActionParams {\n /**\n * The current entity data being viewed/edited.\n */\n entity: any;\n /**\n * Form APIs available when in edit mode.\n * Undefined in view mode.\n */\n form?: UseFormReturn<FieldValues, any, undefined>;\n}\n\nexport type CustomEntityPageActionParams =\n CustomActionParams<EntityPageActionParams>;\n\nexport type CustomEntityPageActionResolver = (\n params: CustomEntityPageActionParams,\n) => ResolvedAction;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/types/fetchData.ts"],"sourcesContent":["import { CursorQuery, OffsetQuery } from '@wix/patterns';\n\nexport type Mode = 'cursor' | 'offset';\n\nexport type UseFetchDataProps<M extends Mode> = {\n searchableFieldIds?: string[];\n filterFieldMapping?: Record<string, { fieldId: string }>;\n paginationMode?: M;\n};\n\nexport interface CursorQueryResult {\n items: any[];\n cursor?: string | undefined | null;\n total?: number | null;\n}\n\nexport interface OffsetQueryResult {\n items: any[];\n total?: number | null;\n hasNext?: boolean;\n}\n\nexport type FetchDataFn<M extends Mode> = M extends 'cursor'\n ? (q: CursorQuery<any>) => Promise<CursorQueryResult>\n : (q: OffsetQuery<any>) => Promise<OffsetQueryResult>;\n"],"mappings":"","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/fetchData.ts"],"sourcesContent":["import { CursorQuery, OffsetQuery } from '@wix/patterns';\n\nexport type Mode = 'cursor' | 'offset';\n\nexport type UseFetchDataProps<M extends Mode> = {\n /**\n * Array of field IDs that support search functionality.\n * These fields will be included in search operations.\n */\n searchableFieldIds?: string[];\n /**\n * Mapping between filter IDs and actual field IDs.\n * Used to translate filter configurations to actual field queries.\n */\n filterFieldMapping?: Record<string, { fieldId: string }>;\n /**\n * Pagination mode to use for data fetching.\n * Affects the query structure and result format.\n * @default 'offset'\n */\n paginationMode?: M;\n};\n\nexport interface CursorQueryResult {\n /**\n * Array of data items returned by the query.\n */\n items: any[];\n /**\n * Cursor for fetching the next page of results.\n * Undefined or null indicates no more pages available.\n */\n cursor?: string | undefined | null;\n /**\n * Total number of items available (optional).\n * Used for displaying total counts and progress indicators.\n */\n total?: number | null;\n}\n\nexport interface OffsetQueryResult {\n /**\n * Array of data items returned by the query.\n */\n items: any[];\n /**\n * Total number of items available (optional).\n * Used for displaying total counts and calculating page numbers.\n */\n total?: number | null;\n /**\n * Whether there are more pages available.\n * Used to enable/disable next page navigation.\n */\n hasNext?: boolean;\n}\n\nexport type FetchDataFn<M extends Mode> = M extends 'cursor'\n ? (q: CursorQuery<any>) => Promise<CursorQueryResult>\n : (q: OffsetQuery<any>) => Promise<OffsetQueryResult>;\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\nimport { useOptimisticActions } from '@wix/patterns';\nimport { CursorQueryResult, OffsetQueryResult } from './fetchData';\n\ninterface BaseCollectionConfigCommon {\n collectionId: string;\n}\n\
|
|
1
|
+
{"version":3,"names":[],"sources":["../../../src/types/types.ts"],"sourcesContent":["import { EntityPageConfig } from './EntityPageConfig';\nimport { CollectionPageConfig } from './CollectionPageConfig';\nimport { useOptimisticActions } from '@wix/patterns';\nimport { CursorQueryResult, OffsetQueryResult } from './fetchData';\n\ninterface BaseCollectionConfigCommon {\n /**\n * Collection identifier.\n * - For CMS: the Wix Data collection ID.\n * - For custom sources: the logical collection/entity type ID your data provider recognizes.\n */\n collectionId: string;\n}\n\nexport interface CMSCollectionConfig extends BaseCollectionConfigCommon {\n /**\n * Declares this collection pulls schema/data from Wix CMS.\n */\n entityTypeSource: 'cms';\n /**\n * Optional override for CMS schema metadata.\n * Use this if you already have the schema and want to provide it directly.\n */\n cms?: {\n schema?: { id: string };\n };\n custom?: never;\n}\n\ninterface CustomCollectionConfig extends BaseCollectionConfigCommon {\n /**\n * Declares this collection is backed by a custom data source.\n */\n entityTypeSource: 'custom';\n cms?: never;\n /**\n * Required metadata for custom sources.\n * `id` must match the identifier your custom data source registers under.\n */\n custom: {\n id: string;\n };\n}\n\nexport type BaseCollectionConfig = CMSCollectionConfig | CustomCollectionConfig;\n\nexport type PatternsFieldType =\n | 'SHORT_TEXT'\n | 'LONG_TEXT'\n | 'NUMBER'\n | 'BOOLEAN'\n | 'DATE'\n | 'DATETIME'\n | 'URL'\n | 'ARRAY'\n | 'REFERENCE'\n | 'IMAGE';\n\nexport interface AppConfig {\n /** List of pages to render and route between. */\n pages: PageConfig[];\n}\n\nexport interface BasePageConfig {\n /**\n * Page unique identifier.\n * - Used for routing, navigation, and cross references (e.g. `entityPageId`, `parentPageId`).\n */\n id: string;\n /**\n * Marks this page as the main landing page of the app.\n * - Exactly one page should have `true`.\n * - Used to determine the default route.\n */\n appMainPage?: boolean;\n}\n\nexport interface CollectionPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'collectionPage';\n /**\n * Collection page configuration.\n */\n collectionPage: CollectionPageConfig;\n entityPage?: never;\n}\n\nexport interface EntityPageConfigType extends BasePageConfig {\n /**\n * Page type discriminator.\n */\n type: 'entityPage';\n /**\n * Entity page configuration.\n */\n entityPage: EntityPageConfig;\n collectionPage?: never;\n}\n\nexport type PageConfig = CollectionPageConfigType | EntityPageConfigType;\n\nexport type EntityProps = { [key: string]: any };\n\nexport interface IMenuItem<T extends EntityProps = any> {\n item: T;\n}\n\nexport interface IColumnValue<T> {\n value: T;\n row: Record<string, any>;\n}\n\nexport type QueryOperator =\n | 'CONTAINS'\n | 'ENDS_WITH'\n | 'EQ'\n | 'EXISTS'\n | 'GT'\n | 'GTE'\n | 'HAS_ALL'\n | 'HAS_SOME'\n | 'LT'\n | 'LTE'\n | 'NE'\n | 'STARTS_WITH'\n | 'URLIZED';\n\ninterface BaseField {\n /**\n * Field unique identifier (dot-path supported, e.g. 'primaryInfo.email').\n */\n id: string;\n /**\n * Human-readable field display name.\n */\n displayName: string;\n /**\n * Optional validation rules for UI inputs/editing.\n */\n validation?: {\n numberRange?: NumberRange;\n stringLengthRange?: StringLengthRange;\n /**\n * Whether the field is required when creating/updating an entity.\n */\n required: boolean;\n };\n /**\n * Capabilities informing UI and query layer behavior.\n */\n capabilities: {\n /**\n * Operators allowed for querying/filtering this field.\n */\n supportedQueryOperators: QueryOperator[];\n /**\n * Whether the field supports sorting.\n */\n sortable: boolean;\n };\n}\n\nexport interface ReferenceField extends BaseField {\n type: 'REFERENCE';\n referenceMetadata: {\n /**\n * Target collection ID referenced by this field.\n */\n referencedCollectionId: string;\n };\n}\n\nexport interface NonReferenceField extends BaseField {\n type: Exclude<PatternsFieldType, 'REFERENCE'>;\n}\n\nexport type Field = ReferenceField | NonReferenceField;\n\nexport interface NumberRange {\n min?: number;\n max?: number;\n}\n\nexport interface StringLengthRange {\n minLength?: number;\n maxLength?: number;\n}\n\nexport interface Query {\n limit: number;\n offset?: number;\n page: number;\n search?: string;\n cursor?: string | null;\n filters: Record<string, any>;\n sort?: {\n fieldName: string;\n order: 'asc' | 'desc';\n }[];\n}\n\nexport interface SchemaConfig {\n /**\n * Schema unique identifier (usually same as collectionId).\n */\n id: string;\n /**\n * Field registry by fieldId. Undefined value allows reserving keys conditionally.\n */\n fields: Record<string, Field | undefined>;\n /**\n * The fieldId that best represents the entity for titles/selections.\n */\n displayField: string;\n /**\n * The underlying identifier field used by your data source (e.g. '_id').\n */\n idField: string;\n /**\n * Data access layer for entities of this schema.\n */\n actions: {\n /**\n * Fetch a single entity by ID.\n */\n get: (entityId: string) => Promise<any>;\n /**\n * Create a new entity with the provided partial.\n */\n create: (newEntity: Partial<any>) => Promise<any>;\n /**\n * Update an existing entity.\n */\n update: (updatedEntity: any) => Promise<any>;\n /**\n * Delete an entity by ID.\n */\n delete: (entityId: string) => Promise<any>;\n /**\n * Bulk deletion by IDs.\n */\n bulkDelete: (entityIds: string[]) => Promise<any>;\n /**\n * Query for entities with pagination/sort/filter.\n * Return shape depends on pagination mode (see CollectionConfig.paginationMode):\n * - Cursor mode: { items, cursor, total? }\n * - Offset mode (default): { items, hasNext, total? }\n */\n find: (\n query: Query,\n options?: {\n /**\n * Overrides the set of fieldIds used for search term matching.\n */\n searchableFieldIds?: string[];\n /**\n * Maps UI filter ids to underlying fieldIds when they differ.\n */\n filterFieldMapping?: Record<string, { fieldId: string }>;\n },\n ) => Promise<CursorQueryResult | OffsetQueryResult>;\n };\n}\n\nexport type OptimisticActionsParams = Parameters<\n typeof useOptimisticActions\n>[1];\n"],"mappings":"","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
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;
|
|
1
|
+
{"version":3,"names":["resolveAction","actionConfig","action","label","skin","biName"],"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 biName: actionConfig.biName,\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,IAAI;IACvBC,MAAM,EAAEJ,YAAY,CAACI;EACvB,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 hidden?: 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 BaseActionParams {\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 hidden?: boolean;\n tooltip?: string;\n skin?: string;\n biName?: 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 BaseActionParams {\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":[]}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
// Copied https://github.com/wix-private/picasso-giza-host/blob/7750022685df79e499194fc7f5225f5f49d62ee0/packages/picasso-common/src/services/metaSiteIdService.ts#L2
|
|
2
|
+
export const getMetasiteId = () => {
|
|
3
|
+
const match = window.location.href.match(/[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i);
|
|
4
|
+
return match == null ? void 0 : match[0];
|
|
5
|
+
};
|
|
6
|
+
//# sourceMappingURL=vibe.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getMetasiteId","match","window","location","href"],"sources":["../../../src/utils/vibe.ts"],"sourcesContent":["// Copied https://github.com/wix-private/picasso-giza-host/blob/7750022685df79e499194fc7f5225f5f49d62ee0/packages/picasso-common/src/services/metaSiteIdService.ts#L2\nexport const getMetasiteId = () => {\n const match = window.location.href.match(\n /[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}/i,\n );\n return match?.[0];\n};\n"],"mappings":"AAAA;AACA,OAAO,MAAMA,aAAa,GAAGA,CAAA,KAAM;EACjC,MAAMC,KAAK,GAAGC,MAAM,CAACC,QAAQ,CAACC,IAAI,CAACH,KAAK,CACtC,0EACF,CAAC;EACD,OAAOA,KAAK,oBAALA,KAAK,CAAG,CAAC,CAAC;AACnB,CAAC","ignoreList":[]}
|
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;AAG1B,OAAO,EAAE,oBAAoB,EAAE,MAAM,kCAAkC,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;AAIxE,MAAM,WAAW,+BAA+B;IAC9C,aAAa,EAAE,oBAAoB,CAAC;CACrC;AAED,eAAO,MAAM,0BAA0B,EAAE,KAAK,CAAC,EAAE,CAC/C,+BAA+B,CAwBhC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsCollectionPageFooter.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsCollectionPageFooter/AutoPatternsCollectionPageFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAO1B,eAAO,MAAM,gCAAgC,gCA4B5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AutoPatternsRoutes.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"AutoPatternsRoutes.d.ts","sourceRoot":"","sources":["../../../../src/components/AutoPatternsRoute/AutoPatternsRoutes.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAQxC,eAAO,MAAM,kBAAkB,GAAI,YAAY;IAAE,MAAM,EAAE,SAAS,CAAA;CAAE,sBAmDnE,CAAC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SchemaConfig, PatternsFieldType } from '../../types';
|
|
2
2
|
import { collections } from '@wix/data';
|
|
3
3
|
export declare const CmsFieldTypeToPatternsFieldType: Partial<Record<collections.Type, PatternsFieldType>>;
|
|
4
|
-
export declare function fetchCmsSchema(collectionId: string): Promise<
|
|
4
|
+
export declare function fetchCmsSchema(collectionId: string): Promise<collections.DataCollection>;
|
|
5
|
+
export declare function transformCmsSchema(schema: collections.DataCollection): SchemaConfig;
|
|
5
6
|
//# sourceMappingURL=cmsAdapter.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmsAdapter.d.ts","sourceRoot":"","sources":["../../../../src/dataSourceAdapters/cms/cmsAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,WAAW,EAAS,MAAM,WAAW,CAAC;AAI/C,eAAO,MAAM,+BAA+B,EAAE,OAAO,CACnD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAgB5C,CAAC;AAEF,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,
|
|
1
|
+
{"version":3,"file":"cmsAdapter.d.ts","sourceRoot":"","sources":["../../../../src/dataSourceAdapters/cms/cmsAdapter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,YAAY,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,WAAW,EAAS,MAAM,WAAW,CAAC;AAI/C,eAAO,MAAM,+BAA+B,EAAE,OAAO,CACnD,MAAM,CAAC,WAAW,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAgB5C,CAAC;AAEF,wBAAsB,cAAc,CAClC,YAAY,EAAE,MAAM,GACnB,OAAO,CAAC,WAAW,CAAC,cAAc,CAAC,CAMrC;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,WAAW,CAAC,cAAc,GACjC,YAAY,CAkGd"}
|
|
@@ -4,6 +4,5 @@ export * from './useGridFeatures';
|
|
|
4
4
|
export * from './useNavigationUtils';
|
|
5
5
|
export * from './usePagePath';
|
|
6
6
|
export * from './useEntityPageHeaderTexts';
|
|
7
|
-
export * from './useUpdateAppContextItems';
|
|
8
7
|
export { useAppContext } from '../providers/AppContext';
|
|
9
8
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/hooks/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC;AACnC,cAAc,cAAc,CAAC;AAC7B,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,4BAA4B,CAAC;AAC3C,OAAO,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppContextSync.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAppContextSync.ts"],"names":[],"mappings":"AAGA,eAAO,MAAM,iBAAiB,GAC5B,OAAO,GAAG,EAAE,EACZ,mBAAmB,MAAM,IAAI,SAe9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useEntityPageHeaderTexts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageHeaderTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,wBAAwB,GAAI,kEAMtC;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"useEntityPageHeaderTexts.d.ts","sourceRoot":"","sources":["../../../src/hooks/useEntityPageHeaderTexts.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAG5C,eAAO,MAAM,wBAAwB,GAAI,kEAMtC;IACD,MAAM,EAAE,gBAAgB,CAAC;IACzB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;CAC9B;;;;;;;;;;;;;;;iBA2BS,CAAJ;;;CA6BL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGridFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGridFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"useGridFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useGridFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAUtC,eAAO,MAAM,eAAe,GAAI,eAAe,UAAU;;;;;;;;;;;;;;;;;CA2CxD,CAAC"}
|
|
@@ -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;
|
|
1
|
+
{"version":3,"file":"useTableFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAWvC,eAAO,MAAM,gBAAgB,GAAI,eAAe,WAAW;;;;;;;;;;;;;;;;;;;;;CAgE1D,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;
|
|
1
|
+
{"version":3,"file":"useTableGridSwitchFeatures.d.ts","sourceRoot":"","sources":["../../../src/hooks/useTableGridSwitchFeatures.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,UAAU,CAAC;AAWjD,eAAO,MAAM,0BAA0B,GAAI,QAAQ,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;CAmEvE,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
interface AppContextValue extends Pick<
|
|
2
|
+
import { AppContextDataValue } from './AppContextData';
|
|
3
|
+
interface AppContextValue extends Pick<AppContextDataValue, 'items' | 'refreshCollection'> {
|
|
4
4
|
}
|
|
5
5
|
export interface AppContextProviderProps {
|
|
6
6
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AppContext.d.ts","sourceRoot":"","sources":["../../../src/providers/AppContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AACpE,OAAO,EAEL,
|
|
1
|
+
{"version":3,"file":"AppContext.d.ts","sourceRoot":"","sources":["../../../src/providers/AppContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAA6B,MAAM,OAAO,CAAC;AACpE,OAAO,EAEL,mBAAmB,EAEpB,MAAM,kBAAkB,CAAC;AAE1B,UAAU,eACR,SAAQ,IAAI,CAAC,mBAAmB,EAAE,OAAO,GAAG,mBAAmB,CAAC;CAAG;AAIrE,MAAM,WAAW,uBAAuB;IACtC,QAAQ,EAAE,SAAS,CAAC;CACrB;AAeD,eAAO,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAQhE,CAAC;AAEF,eAAO,MAAM,aAAa,QAAO,eAQhC,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
|
+
export interface AppContextDataValue {
|
|
3
|
+
items: any[];
|
|
4
|
+
setItems: (items: any[]) => void;
|
|
5
|
+
refreshCollection: () => void;
|
|
6
|
+
setRefreshCollection: (refreshFn: () => void) => void;
|
|
7
|
+
}
|
|
8
|
+
export interface AppContextDataProviderProps {
|
|
9
|
+
children: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare const AppContextDataProvider: React.FC<AppContextDataProviderProps>;
|
|
12
|
+
export declare const useAppContextData: () => AppContextDataValue;
|
|
13
|
+
//# sourceMappingURL=AppContextData.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppContextData.d.ts","sourceRoot":"","sources":["../../../src/providers/AppContextData.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAE9E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACjC,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACvD;AAMD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAoBxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,mBAUpC,CAAC"}
|
|
@@ -2,7 +2,8 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
import { CustomComponentProps, CustomActionCellPrimaryActionResolver, CustomActionCellSecondaryActionResolver, CustomEntityPageActionResolver, CustomBulkActionsActionResolver, CustomActionCollectionPageActionResolver, CustomActionCollectionPageActionOnRowClickResolver, IColumnValue, SchemaConfig } from '../types';
|
|
3
3
|
import { Section, useOptimisticActions } from '@wix/patterns';
|
|
4
4
|
import { BadgeSkin, IconElement } from '@wix/design-system';
|
|
5
|
-
|
|
5
|
+
import { collections } from '@wix/data';
|
|
6
|
+
export interface AutoPatternsOverridesContextProps {
|
|
6
7
|
actions?: Record<string, CustomActionCellPrimaryActionResolver | CustomActionCellSecondaryActionResolver | CustomBulkActionsActionResolver | CustomEntityPageActionResolver | CustomActionCollectionPageActionResolver | CustomActionCollectionPageActionOnRowClickResolver>;
|
|
7
8
|
columns?: Record<string, (props: IColumnValue<any>) => void>;
|
|
8
9
|
modals?: Record<string, React.FC<any>>;
|
|
@@ -19,12 +20,19 @@ export interface PatternsWizardOverridesContextProps {
|
|
|
19
20
|
suffixIcon?: IconElement;
|
|
20
21
|
}[]>;
|
|
21
22
|
customDataSources?: Record<string, (collectionId: string, context: any) => Promise<SchemaConfig>>;
|
|
23
|
+
cmsSchema?: Record<string, collections.DataCollection>;
|
|
22
24
|
sections?: Record<string, (item: any) => Section>;
|
|
23
25
|
optimisticActions?: Record<string, Parameters<typeof useOptimisticActions>[1]>;
|
|
24
26
|
}
|
|
27
|
+
export declare const AutoPatternsOverridesProvider: React.FC<{
|
|
28
|
+
children: ReactNode;
|
|
29
|
+
value: AutoPatternsOverridesContextProps;
|
|
30
|
+
}>;
|
|
31
|
+
export declare const useAutoPatternsOverridesContext: () => AutoPatternsOverridesContextProps | undefined;
|
|
32
|
+
export interface PatternsWizardOverridesContextProps extends AutoPatternsOverridesContextProps {
|
|
33
|
+
}
|
|
25
34
|
export declare const PatternsWizardOverridesProvider: React.FC<{
|
|
26
35
|
children: ReactNode;
|
|
27
|
-
value:
|
|
36
|
+
value: AutoPatternsOverridesContextProps;
|
|
28
37
|
}>;
|
|
29
|
-
|
|
30
|
-
//# sourceMappingURL=PatternsWizardOverridesContext.d.ts.map
|
|
38
|
+
//# sourceMappingURL=AutoPatternsOverridesContext.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AutoPatternsOverridesContext.d.ts","sourceRoot":"","sources":["../../../src/providers/AutoPatternsOverridesContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAA6B,SAAS,EAAE,MAAM,OAAO,CAAC;AACpE,OAAO,EACL,oBAAoB,EACpB,qCAAqC,EACrC,uCAAuC,EACvC,8BAA8B,EAC9B,+BAA+B,EAC/B,wCAAwC,EACxC,kDAAkD,EAClD,YAAY,EACZ,YAAY,EACb,MAAM,UAAU,CAAC;AAElB,OAAO,EAAE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAExC,MAAM,WAAW,iCAAiC;IAChD,OAAO,CAAC,EAAE,MAAM,CACd,MAAM,EACJ,qCAAqC,GACrC,uCAAuC,GACvC,+BAA+B,GAC/B,8BAA8B,GAC9B,wCAAwC,GACxC,kDAAkD,CACrD,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,wBAAwB,CAAC,EAAE,MAAM,CAC/B,MAAM,EACN,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,CAClD,CAAC;IACF,sBAAsB,CAAC,EAAE,MAAM,CAC7B,MAAM,EACN,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK;QAC/B,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,CAAC,EAAE,SAAS,CAAC;QACjB,UAAU,CAAC,EAAE,WAAW,CAAC;QACzB,UAAU,CAAC,EAAE,WAAW,CAAC;KAC1B,EAAE,CACJ,CAAC;IACF,iBAAiB,CAAC,EAAE,MAAM,CACxB,MAAM,EACN,CAAC,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,YAAY,CAAC,CAC9D,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,cAAc,CAAC,CAAC;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,KAAK,OAAO,CAAC,CAAC;IAClD,iBAAiB,CAAC,EAAE,MAAM,CACxB,MAAM,EACN,UAAU,CAAC,OAAO,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAC3C,CAAC;CACH;AAMD,eAAO,MAAM,6BAA6B,EAAE,KAAK,CAAC,EAAE,CAAC;IACnD,QAAQ,EAAE,SAAS,CAAC;IACpB,KAAK,EAAE,iCAAiC,CAAC;CAC1C,CAMA,CAAC;AAEF,eAAO,MAAM,+BAA+B,QACxC,iCAAiC,GACjC,SAEH,CAAC;AAGF,MAAM,WAAW,mCACf,SAAQ,iCAAiC;CAAG;AAC9C,eAAO,MAAM,+BAA+B;cAnBhC,SAAS;WACZ,iCAAiC;EAkBkC,CAAC"}
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
import React, { ReactNode } from 'react';
|
|
2
|
-
export interface
|
|
2
|
+
export interface AppContextDataValue {
|
|
3
3
|
items: any[];
|
|
4
4
|
setItems: (items: any[]) => void;
|
|
5
|
+
refreshCollection?: () => void;
|
|
6
|
+
setRefreshCollection: (refreshFn: () => void) => void;
|
|
5
7
|
}
|
|
6
|
-
export interface
|
|
8
|
+
export interface AppContextDataProviderProps {
|
|
7
9
|
children: ReactNode;
|
|
8
10
|
}
|
|
9
|
-
export declare const
|
|
10
|
-
export declare const
|
|
11
|
+
export declare const AppContextDataProvider: React.FC<AppContextDataProviderProps>;
|
|
12
|
+
export declare const useAppContextData: () => AppContextDataValue;
|
|
11
13
|
//# sourceMappingURL=ItemsContext.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ItemsContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ItemsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAE9E,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"ItemsContext.d.ts","sourceRoot":"","sources":["../../../src/providers/ItemsContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAuC,MAAM,OAAO,CAAC;AAE9E,MAAM,WAAW,mBAAmB;IAClC,KAAK,EAAE,GAAG,EAAE,CAAC;IACb,QAAQ,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IACjC,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC/B,oBAAoB,EAAE,CAAC,SAAS,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC;CACvD;AAMD,MAAM,WAAW,2BAA2B;IAC1C,QAAQ,EAAE,SAAS,CAAC;CACrB;AAED,eAAO,MAAM,sBAAsB,EAAE,KAAK,CAAC,EAAE,CAAC,2BAA2B,CAoBxE,CAAC;AAEF,eAAO,MAAM,iBAAiB,QAAO,mBAUpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SchemaContext.d.ts","sourceRoot":"","sources":["../../../src/providers/SchemaContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"SchemaContext.d.ts","sourceRoot":"","sources":["../../../src/providers/SchemaContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAKZ,SAAS,EACV,MAAM,OAAO,CAAC;AAEf,OAAO,EAAE,YAAY,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAY9D,UAAU,mBAAmB;IAC3B,UAAU,EAAE,oBAAoB,CAAC;IACjC,QAAQ,EAAE,SAAS,CAAC;IACpB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;CACvB;AAED,eAAO,MAAM,cAAc,GAAI,qCAI5B,mBAAmB,sBAwIrB,CAAC;AAEF,eAAO,MAAM,SAAS,QAAO,YAM5B,CAAC"}
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export * from './SchemaContext';
|
|
2
|
-
export * from './
|
|
2
|
+
export * from './AutoPatternsOverridesContext';
|
|
3
3
|
export * from './ModalContext';
|
|
4
4
|
export * from './SchemaRegistryContext';
|
|
5
5
|
export * from './AppConfigContext';
|
|
6
6
|
export * from './ErrorContext';
|
|
7
|
+
export * from './AppContextData';
|
|
7
8
|
export { useAppContext } from './AppContext';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/providers/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,gCAAgC,CAAC;AAC/C,cAAc,gBAAgB,CAAC;AAC/B,cAAc,yBAAyB,CAAC;AACxC,cAAc,oBAAoB,CAAC;AACnC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { ModalId } from '../providers/ModalContext';
|
|
2
|
-
import {
|
|
2
|
+
import { AutoPatternsOverridesContextProps } from '../providers';
|
|
3
3
|
import { AppConfig } from './types';
|
|
4
4
|
import { NavigateToEntityPageFunc } from '../hooks';
|
|
5
5
|
export interface BaseSDK {
|
|
6
6
|
appConfig: AppConfig;
|
|
7
7
|
openModal: (id: ModalId, props?: Record<string, any>) => void;
|
|
8
8
|
closeModal: () => void;
|
|
9
|
-
overrides?:
|
|
9
|
+
overrides?: AutoPatternsOverridesContextProps;
|
|
10
10
|
navigateToEntityPage?: NavigateToEntityPageFunc;
|
|
11
11
|
}
|
|
12
12
|
//# sourceMappingURL=BaseSDK.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BaseSDK.d.ts","sourceRoot":"","sources":["../../../src/types/BaseSDK.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"BaseSDK.d.ts","sourceRoot":"","sources":["../../../src/types/BaseSDK.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACpD,OAAO,EAAE,iCAAiC,EAAE,MAAM,cAAc,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AACpC,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC;AAEpD,MAAM,WAAW,OAAO;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,SAAS,EAAE,CAAC,EAAE,EAAE,OAAO,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,CAAC;IAC9D,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,SAAS,CAAC,EAAE,iCAAiC,CAAC;IAC9C,oBAAoB,CAAC,EAAE,wBAAwB,CAAC;CACjD"}
|