@webiny/app-headless-cms 6.6.0-alpha.0 → 6.6.0-alpha.1
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/ContentEntriesModule.js +3 -3
- package/ContentEntriesModule.js.map +1 -1
- package/HeadlessCMS.js +7 -2
- package/HeadlessCMS.js.map +1 -1
- package/admin/RoutesConfig.js +14 -1
- package/admin/RoutesConfig.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionDelete.d.ts +2 -2
- package/admin/components/ContentEntries/BulkActions/ActionDelete.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionMove.d.ts +2 -2
- package/admin/components/ContentEntries/BulkActions/ActionMove.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionPublish.d.ts +2 -2
- package/admin/components/ContentEntries/BulkActions/ActionPublish.js.map +1 -1
- package/admin/components/ContentEntries/BulkActions/ActionUnpublish.d.ts +2 -2
- package/admin/components/ContentEntries/BulkActions/ActionUnpublish.js.map +1 -1
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js +1 -0
- package/admin/components/ContentModelEditor/ContentModelEditorProvider.js.map +1 -1
- package/admin/components/ContentModelEditor/FieldsSidebar.js +12 -2
- package/admin/components/ContentModelEditor/FieldsSidebar.js.map +1 -1
- package/admin/components/ContentModelEditor/evaluateExpression.js +4 -0
- package/admin/components/ContentModelEditor/evaluateExpression.js.map +1 -1
- package/admin/components/Dialogs/PublishEntryConfirmDialog.d.ts +26 -1
- package/admin/components/Dialogs/PublishEntryConfirmDialog.js +4 -3
- package/admin/components/Dialogs/PublishEntryConfirmDialog.js.map +1 -1
- package/admin/components/Dialogs/UnpublishEntryConfirmDialog.d.ts +26 -1
- package/admin/components/Dialogs/UnpublishEntryConfirmDialog.js +4 -3
- package/admin/components/Dialogs/UnpublishEntryConfirmDialog.js.map +1 -1
- package/admin/components/FieldEditor/EditFieldDialog/PermissionsEditor/PermissionsEditor.js +3 -3
- package/admin/components/FieldEditor/EditFieldDialog/PermissionsEditor/PermissionsEditor.js.map +1 -1
- package/admin/components/FieldEditor/EditFieldDialog.d.ts +2 -2
- package/admin/components/FieldEditor/EditFieldDialog.js +5 -2
- package/admin/components/FieldEditor/EditFieldDialog.js.map +1 -1
- package/admin/components/FieldEditor/Field.js +1 -1
- package/admin/components/FieldEditor/Field.js.map +1 -1
- package/admin/components/FieldEditor/FieldEditor.js +2 -2
- package/admin/components/FieldEditor/FieldEditor.js.map +1 -1
- package/admin/components/FieldEditor/FieldEditorContext.d.ts +1 -1
- package/admin/components/FieldEditor/FieldEditorContext.js +6 -1
- package/admin/components/FieldEditor/FieldEditorContext.js.map +1 -1
- package/admin/components/LexicalCmsEditor/LexicalEditor.js +10 -6
- package/admin/components/LexicalCmsEditor/LexicalEditor.js.map +1 -1
- package/admin/components/LexicalCmsEditor/TypographyDropDown.js +3 -2
- package/admin/components/LexicalCmsEditor/TypographyDropDown.js.map +1 -1
- package/admin/config/contentEntries/editor/ContentEntryEditorConfig.d.ts +60 -2
- package/admin/config/contentEntries/editor/ContentEntryEditorConfig.js +18 -5
- package/admin/config/contentEntries/editor/ContentEntryEditorConfig.js.map +1 -1
- package/admin/config/contentEntries/editor/NewEntryWizard.d.ts +8 -1
- package/admin/config/contentEntries/editor/NewEntryWizard.js +20 -5
- package/admin/config/contentEntries/editor/NewEntryWizard.js.map +1 -1
- package/admin/config/contentEntries/list/Browser/BreadcrumbRoot.d.ts +38 -0
- package/admin/config/contentEntries/list/Browser/BreadcrumbRoot.js +23 -0
- package/admin/config/contentEntries/list/Browser/BreadcrumbRoot.js.map +1 -0
- package/admin/config/contentEntries/list/Browser/index.d.ts +21 -0
- package/admin/config/contentEntries/list/Browser/index.js +2 -0
- package/admin/config/contentEntries/list/Browser/index.js.map +1 -1
- package/admin/config/contentEntries/list/ContentEntryListConfig.d.ts +39 -0
- package/admin/config/contentEntries/list/ContentEntryListConfig.js +2 -1
- package/admin/config/contentEntries/list/ContentEntryListConfig.js.map +1 -1
- package/admin/graphql/contentModels.d.ts +1 -1
- package/admin/graphql/contentModels.js +2 -1
- package/admin/graphql/contentModels.js.map +1 -1
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js +24 -1
- package/admin/plugins/editor/formSettings/components/GeneralSettings.js.map +1 -1
- package/exports/admin/cms/entry/editor.d.ts +1 -0
- package/exports/admin/cms/entry/editor.js +1 -0
- package/exports/admin/cms/entry/list.d.ts +2 -0
- package/exports/admin/cms/entry/list.js +2 -0
- package/exports/admin/cms.d.ts +2 -0
- package/exports/admin/cms.js +2 -0
- package/features/contentEntry/EntryGraphQLFields.js +1 -1
- package/features/contentEntry/EntryGraphQLFields.js.map +1 -1
- package/features/contentEntry/createEntry/CreateEntryRepository.d.ts +3 -1
- package/features/contentEntry/createEntry/CreateEntryRepository.js +10 -2
- package/features/contentEntry/createEntry/CreateEntryRepository.js.map +1 -1
- package/features/contentEntry/deleteEntry/DeleteEntryRepository.d.ts +3 -1
- package/features/contentEntry/deleteEntry/DeleteEntryRepository.js +12 -2
- package/features/contentEntry/deleteEntry/DeleteEntryRepository.js.map +1 -1
- package/features/contentEntry/refTypes.d.ts +7 -0
- package/features/contentEntry/refTypes.js.map +1 -1
- package/features/contentEntry/updateEntry/UpdateEntryRepository.d.ts +3 -1
- package/features/contentEntry/updateEntry/UpdateEntryRepository.js +10 -2
- package/features/contentEntry/updateEntry/UpdateEntryRepository.js.map +1 -1
- package/features/formModel/mappers/AssetFieldMapper.d.ts +12 -0
- package/features/formModel/mappers/AssetFieldMapper.js +13 -0
- package/features/formModel/mappers/AssetFieldMapper.js.map +1 -0
- package/features/formModel/mappers/index.js +2 -0
- package/features/formModel/mappers/index.js.map +1 -1
- package/features/model/updateModel/UpdateModelGateway.js +1 -0
- package/features/model/updateModel/UpdateModelGateway.js.map +1 -1
- package/index.d.ts +1 -1
- package/index.js +1 -1
- package/package.json +24 -24
- package/presentation/contentEntries/list/ContentEntriesPresenter.test.js +4 -0
- package/presentation/contentEntries/list/ContentEntriesPresenter.test.js.map +1 -1
- package/presentation/contentEntries/preview/ComponentDiscoveryIframe.d.ts +6 -0
- package/presentation/contentEntries/preview/ComponentDiscoveryIframe.js +47 -0
- package/presentation/contentEntries/preview/ComponentDiscoveryIframe.js.map +1 -0
- package/presentation/contentEntries/preview/LivePreviewPresenter.d.ts +14 -0
- package/presentation/contentEntries/preview/LivePreviewPresenter.js +33 -0
- package/presentation/contentEntries/preview/LivePreviewPresenter.js.map +1 -0
- package/presentation/contentEntries/preview/ModelEditorComponentDiscovery.d.ts +2 -0
- package/presentation/contentEntries/preview/ModelEditorComponentDiscovery.js +27 -0
- package/presentation/contentEntries/preview/ModelEditorComponentDiscovery.js.map +1 -0
- package/presentation/contentEntries/preview/PreviewComponentsContext.d.ts +15 -0
- package/presentation/contentEntries/preview/PreviewComponentsContext.js +43 -0
- package/presentation/contentEntries/preview/PreviewComponentsContext.js.map +1 -0
- package/presentation/contentEntries/preview/PreviewDecorator.d.ts +2 -0
- package/presentation/contentEntries/preview/PreviewDecorator.js +48 -0
- package/presentation/contentEntries/preview/PreviewDecorator.js.map +1 -0
- package/presentation/contentEntries/preview/PreviewPane.d.ts +9 -0
- package/presentation/contentEntries/preview/PreviewPane.js +181 -0
- package/presentation/contentEntries/preview/PreviewPane.js.map +1 -0
- package/presentation/contentEntries/preview/abstractions.d.ts +16 -0
- package/presentation/contentEntries/preview/abstractions.js +5 -0
- package/presentation/contentEntries/preview/abstractions.js.map +1 -0
- package/presentation/contentEntries/preview/feature.d.ts +3 -0
- package/presentation/contentEntries/preview/feature.js +17 -0
- package/presentation/contentEntries/preview/feature.js.map +1 -0
- package/presentation/contentEntries/preview/resolvePreviewUrl.d.ts +5 -0
- package/presentation/contentEntries/preview/resolvePreviewUrl.js +29 -0
- package/presentation/contentEntries/preview/resolvePreviewUrl.js.map +1 -0
- package/presentation/contentEntries/preview/useLivePreviewPresenter.d.ts +1 -0
- package/presentation/contentEntries/preview/useLivePreviewPresenter.js +8 -0
- package/presentation/contentEntries/preview/useLivePreviewPresenter.js.map +1 -0
- package/presentation/contentEntries/trashBin/CmsTrashBin.d.ts +2 -2
- package/presentation/contentEntries/views/CmsAdvancedSearch.d.ts +2 -2
- package/presentation/contentEntries/views/ContentEntriesBreadcrumbs.d.ts +13 -0
- package/presentation/contentEntries/views/ContentEntriesBreadcrumbs.js +54 -0
- package/presentation/contentEntries/views/ContentEntriesBreadcrumbs.js.map +1 -0
- package/presentation/contentEntries/views/ContentEntriesListLayout.d.ts +2 -2
- package/presentation/contentEntries/views/ContentEntriesListLayout.js +3 -2
- package/presentation/contentEntries/views/ContentEntriesListLayout.js.map +1 -1
- package/presentation/contentEntries/views/ContentEntryFormView.d.ts +2 -2
- package/presentation/contentEntries/views/ContentEntryFormView.js +5 -6
- package/presentation/contentEntries/views/ContentEntryFormView.js.map +1 -1
- package/presentation/contentEntries/views/RevisionDrawer.d.ts +2 -2
- package/presentation/contentEntries/views/RevisionsList.d.ts +2 -2
- package/presentation/contentEntries/views/SingleEntryLayout.d.ts +2 -2
- package/presentation/contentEntries/views/Table/Table.d.ts +2 -2
- package/presentation/contentEntries/views/actions/CreateNewRevisionButton.d.ts +2 -2
- package/presentation/contentEntries/views/actions/DeleteEntryMenuItem.d.ts +2 -2
- package/presentation/contentEntries/views/actions/PublishOnlyButton.d.ts +2 -2
- package/presentation/contentEntries/views/actions/RevisionSelector.d.ts +2 -2
- package/presentation/contentEntries/views/actions/SaveAndPublishButton.d.ts +2 -2
- package/presentation/contentEntries/views/actions/SaveContentButton.d.ts +2 -2
- package/presentation/contentEntries/views/actions/ShowRevisionListMenuItem.d.ts +2 -2
- package/presentation/contentEntries/views/layout/ContentEntryForm.d.ts +12 -12
- package/presentation/contentEntries/views/layout/ContentEntryFormContent.d.ts +10 -6
- package/presentation/contentEntries/views/layout/ContentEntryFormContent.js +7 -2
- package/presentation/contentEntries/views/layout/ContentEntryFormContent.js.map +1 -1
- package/presentation/contentModels/components/CloneContentModelDialog.d.ts +2 -2
- package/presentation/contentModels/components/ContentModels.d.ts +2 -2
- package/presentation/contentModels/components/ContentModelsDataList.d.ts +2 -2
- package/presentation/contentModels/components/NewContentModelDialog.d.ts +2 -2
- package/presentation/contentModels/components/fullDelete/types.js.map +1 -1
- package/presentation/fieldEditor/FieldEditorPresenter.js +1 -1
- package/presentation/fieldEditor/FieldEditorPresenter.js.map +1 -1
- package/presentation/fieldEditor/groups/ValidationsGroup.js +1 -1
- package/presentation/fieldEditor/groups/ValidationsGroup.js.map +1 -1
- package/presentation/fieldEditor/renderers/CmsAccessControlRulesRenderer.js +3 -3
- package/presentation/fieldEditor/renderers/CmsAccessControlRulesRenderer.js.map +1 -1
- package/presentation/fieldRenderers/ref/CmsRefDetailedMultipleRenderer.js +8 -0
- package/presentation/fieldRenderers/ref/CmsRefDetailedMultipleRenderer.js.map +1 -1
- package/presentation/fieldRenderers/ref/CmsRefDetailedSingleRenderer.js +8 -0
- package/presentation/fieldRenderers/ref/CmsRefDetailedSingleRenderer.js.map +1 -1
- package/presentation/fieldRenderers/ref/components/EditEntryDrawer.d.ts +10 -0
- package/presentation/fieldRenderers/ref/components/EditEntryDrawer.js +94 -0
- package/presentation/fieldRenderers/ref/components/EditEntryDrawer.js.map +1 -0
- package/presentation/fieldRenderers/ref/components/EntryCard.d.ts +2 -0
- package/presentation/fieldRenderers/ref/components/EntryCard.js +13 -3
- package/presentation/fieldRenderers/ref/components/EntryCard.js.map +1 -1
- package/presentation/fieldRenderers/ref/components/RefFieldOptions.d.ts +2 -2
- package/presentation/fieldRenderers/ref/detailed/RefDetailedPresenter.d.ts +2 -1
- package/presentation/fieldRenderers/ref/detailed/RefDetailedPresenter.js +6 -0
- package/presentation/fieldRenderers/ref/detailed/RefDetailedPresenter.js.map +1 -1
- package/presentation/fieldRenderers/ref/detailed/abstractions.d.ts +2 -1
- package/presentation/fieldRenderers/ref/detailed/abstractions.js.map +1 -1
- package/presentation/fieldRenderers/ref/editEntry/EditEntryPresenter.d.ts +13 -0
- package/presentation/fieldRenderers/ref/editEntry/EditEntryPresenter.js +25 -0
- package/presentation/fieldRenderers/ref/editEntry/EditEntryPresenter.js.map +1 -0
- package/presentation/fieldRenderers/ref/editEntry/abstractions.d.ts +10 -0
- package/presentation/fieldRenderers/ref/editEntry/abstractions.js +5 -0
- package/presentation/fieldRenderers/ref/editEntry/abstractions.js.map +1 -0
- package/presentation/fieldRenderers/ref/editEntry/feature.d.ts +3 -0
- package/presentation/fieldRenderers/ref/editEntry/feature.js +17 -0
- package/presentation/fieldRenderers/ref/editEntry/feature.js.map +1 -0
- package/presentation/fieldTypes/abstractions.d.ts +12 -0
- package/presentation/fieldTypes/abstractions.js.map +1 -1
- package/presentation/fieldTypes/renderers/common/SelectBoxRenderer.js +1 -1
- package/presentation/fieldTypes/renderers/common/SelectBoxRenderer.js.map +1 -1
- package/presentation/fieldTypes/renderers/dynamicZone/DynamicZoneRenderer.js +6 -2
- package/presentation/fieldTypes/renderers/dynamicZone/DynamicZoneRenderer.js.map +1 -1
- package/presentation/fieldTypes/renderers/object/ObjectAccordionRenderer.js +2 -0
- package/presentation/fieldTypes/renderers/object/ObjectAccordionRenderer.js.map +1 -1
- package/presentation/fieldTypes/renderers/object/ObjectsAccordionRenderer.js +6 -0
- package/presentation/fieldTypes/renderers/object/ObjectsAccordionRenderer.js.map +1 -1
- package/presentation/fieldTypes/types/DynamicZoneFieldType.d.ts +3 -6
- package/presentation/fieldTypes/types/DynamicZoneFieldType.js +2 -12
- package/presentation/fieldTypes/types/DynamicZoneFieldType.js.map +1 -1
- package/presentation/fieldTypes/types/dynamicZone/TemplateDialog.js +25 -3
- package/presentation/fieldTypes/types/dynamicZone/TemplateDialog.js.map +1 -1
- package/presentation/importContentModels/ImportContentModelsDialog.d.ts +2 -2
- package/presentation/importContentModels/components/DataList.d.ts +2 -2
- package/presentation/importContentModels/components/FileUpload.d.ts +2 -2
- package/presentation/importContentModels/components/Model/DataListModels.d.ts +2 -2
- package/presentation/menus/ContentGroupsMenuItems.d.ts +2 -2
- package/presentation/modelGroup/ModelGroupPresenter.d.ts +3 -1
- package/presentation/modelGroup/ModelGroupPresenter.js +7 -9
- package/presentation/modelGroup/ModelGroupPresenter.js.map +1 -1
- package/presentation/modelGroup/components/ContentModelGroups.d.ts +2 -2
- package/presentation/modelGroup/components/ContentModelGroupsDataList.d.ts +6 -2
- package/presentation/modelGroup/components/ContentModelGroupsForm.d.ts +8 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin/config/contentEntries/list/Browser/index.js","sources":["../../../../../../src/admin/config/contentEntries/list/Browser/index.ts"],"sourcesContent":["import type { AdvancedSearchConfig } from \"./AdvancedSearch/index.js\";\nimport { AdvancedSearch } from \"./AdvancedSearch/index.js\";\nimport type { BulkActionConfig } from \"./BulkAction.js\";\nimport { BulkAction } from \"./BulkAction.js\";\nimport { EntryAction } from \"./EntryAction.js\";\nimport type { FilterConfig } from \"./Filter.js\";\nimport { Filter } from \"./Filter.js\";\nimport type { FiltersToWhereConverter } from \"./FiltersToWhere.js\";\nimport { FiltersToWhere } from \"./FiltersToWhere.js\";\nimport { FolderAction } from \"./FolderAction.js\";\nimport type { TableConfig } from \"./Table/index.js\";\nimport { Table } from \"./Table/index.js\";\nimport { FolderDropConfirmation } from \"./FolderDropConfirmation.js\";\nimport { FolderConfig } from \"@webiny/app-aco/config/folder\";\nimport { RecordConfig } from \"@webiny/app-aco/config/record\";\nimport type { SidebarFooterConfig } from \"./SidebarFooter.js\";\nimport { SidebarFooter } from \"./SidebarFooter.js\";\n\nexport type { SidebarFooterConfig };\n\nexport interface BrowserConfig {\n advancedSearch: AdvancedSearchConfig;\n table: TableConfig;\n folder: FolderConfig[];\n entry: RecordConfig[];\n bulkActions: BulkActionConfig[];\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n sidebarFooter: SidebarFooterConfig[];\n}\n\nexport const Browser = {\n AdvancedSearch,\n BulkAction,\n Filter,\n FiltersToWhere,\n Table,\n Sidebar: {\n Footer: SidebarFooter\n },\n Folder: {\n Action: FolderAction,\n DropConfirmation: FolderDropConfirmation\n },\n Entry: {\n Action: EntryAction\n }\n};\n"],"names":["Browser","AdvancedSearch","BulkAction","Filter","FiltersToWhere","Table","SidebarFooter","FolderAction","FolderDropConfirmation","EntryAction"],"mappings":"
|
|
1
|
+
{"version":3,"file":"admin/config/contentEntries/list/Browser/index.js","sources":["../../../../../../src/admin/config/contentEntries/list/Browser/index.ts"],"sourcesContent":["import type { AdvancedSearchConfig } from \"./AdvancedSearch/index.js\";\nimport { AdvancedSearch } from \"./AdvancedSearch/index.js\";\nimport type { BulkActionConfig } from \"./BulkAction.js\";\nimport { BulkAction } from \"./BulkAction.js\";\nimport { EntryAction } from \"./EntryAction.js\";\nimport type { FilterConfig } from \"./Filter.js\";\nimport { Filter } from \"./Filter.js\";\nimport type { FiltersToWhereConverter } from \"./FiltersToWhere.js\";\nimport { FiltersToWhere } from \"./FiltersToWhere.js\";\nimport { FolderAction } from \"./FolderAction.js\";\nimport type { TableConfig } from \"./Table/index.js\";\nimport { Table } from \"./Table/index.js\";\nimport { FolderDropConfirmation } from \"./FolderDropConfirmation.js\";\nimport { FolderConfig } from \"@webiny/app-aco/config/folder\";\nimport { RecordConfig } from \"@webiny/app-aco/config/record\";\nimport type { SidebarFooterConfig } from \"./SidebarFooter.js\";\nimport { SidebarFooter } from \"./SidebarFooter.js\";\nimport type { BreadcrumbRootConfig } from \"./BreadcrumbRoot.js\";\nimport { BreadcrumbRoot } from \"./BreadcrumbRoot.js\";\n\nexport type { SidebarFooterConfig };\n\nexport interface BrowserConfig {\n advancedSearch: AdvancedSearchConfig;\n table: TableConfig;\n folder: FolderConfig[];\n entry: RecordConfig[];\n bulkActions: BulkActionConfig[];\n filters: FilterConfig[];\n filtersToWhere: FiltersToWhereConverter[];\n sidebarFooter: SidebarFooterConfig[];\n breadcrumbRoot?: BreadcrumbRootConfig;\n}\n\nexport const Browser = {\n AdvancedSearch,\n BulkAction,\n BreadcrumbRoot,\n Filter,\n FiltersToWhere,\n Table,\n Sidebar: {\n Footer: SidebarFooter\n },\n Folder: {\n Action: FolderAction,\n DropConfirmation: FolderDropConfirmation\n },\n Entry: {\n Action: EntryAction\n }\n};\n"],"names":["Browser","AdvancedSearch","BulkAction","BreadcrumbRoot","Filter","FiltersToWhere","Table","SidebarFooter","FolderAction","FolderDropConfirmation","EntryAction"],"mappings":";;;;;;;;;;AAkCO,MAAMA,UAAU;IACnBC,gBAAcA;IACdC,YAAUA;IACVC,gBAAcA;IACdC,QAAMA;IACNC,gBAAcA;IACdC,OAAKA;IACL,SAAS;QACL,QAAQC;IACZ;IACA,QAAQ;QACJ,QAAQC;QACR,kBAAkBC;IACtB;IACA,OAAO;QACH,QAAQC;IACZ;AACJ"}
|
|
@@ -38,6 +38,25 @@ export declare const ContentEntryListConfig: typeof PublicContentEntryListConfig
|
|
|
38
38
|
useButtons: () => import("@webiny/app-admin/components/Buttons/useButtons.js").ButtonsProviderContext;
|
|
39
39
|
useDialog: () => import("@webiny/app-admin/index.js").UseDialogWithReportResponse;
|
|
40
40
|
};
|
|
41
|
+
BreadcrumbRoot: (({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null) & {
|
|
42
|
+
original: ({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null;
|
|
43
|
+
originalName: string;
|
|
44
|
+
displayName: string;
|
|
45
|
+
} & {
|
|
46
|
+
original: (({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null) & {
|
|
47
|
+
original: ({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null;
|
|
48
|
+
originalName: string;
|
|
49
|
+
displayName: string;
|
|
50
|
+
};
|
|
51
|
+
originalName: string;
|
|
52
|
+
displayName: string;
|
|
53
|
+
} & {
|
|
54
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null) & {
|
|
55
|
+
original: ({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null;
|
|
56
|
+
originalName: string;
|
|
57
|
+
displayName: string;
|
|
58
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
59
|
+
};
|
|
41
60
|
Filter: (({ name, element, modelIds, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element | null) & {
|
|
42
61
|
original: ({ name, element, modelIds, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element | null;
|
|
43
62
|
originalName: string;
|
|
@@ -160,6 +179,25 @@ export declare const InternalContentEntryListConfig: typeof InternalEntryListCon
|
|
|
160
179
|
useButtons: () => import("@webiny/app-admin/components/Buttons/useButtons.js").ButtonsProviderContext;
|
|
161
180
|
useDialog: () => import("@webiny/app-admin/index.js").UseDialogWithReportResponse;
|
|
162
181
|
};
|
|
182
|
+
BreadcrumbRoot: (({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null) & {
|
|
183
|
+
original: ({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null;
|
|
184
|
+
originalName: string;
|
|
185
|
+
displayName: string;
|
|
186
|
+
} & {
|
|
187
|
+
original: (({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null) & {
|
|
188
|
+
original: ({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null;
|
|
189
|
+
originalName: string;
|
|
190
|
+
displayName: string;
|
|
191
|
+
};
|
|
192
|
+
originalName: string;
|
|
193
|
+
displayName: string;
|
|
194
|
+
} & {
|
|
195
|
+
createDecorator: (decorator: import("@webiny/react-composition").ComponentDecorator<(({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null) & {
|
|
196
|
+
original: ({ label, to, modelIds }: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootProps) => React.JSX.Element | null;
|
|
197
|
+
originalName: string;
|
|
198
|
+
displayName: string;
|
|
199
|
+
}>) => (props: unknown) => React.JSX.Element;
|
|
200
|
+
};
|
|
163
201
|
Filter: (({ name, element, modelIds, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element | null) & {
|
|
164
202
|
original: ({ name, element, modelIds, after, before, remove }: import("./Browser/Filter.js").FilterProps) => React.JSX.Element | null;
|
|
165
203
|
originalName: string;
|
|
@@ -263,6 +301,7 @@ export declare function useContentEntryListConfig(): {
|
|
|
263
301
|
filters: import("./Browser/Filter.js").FilterConfig[];
|
|
264
302
|
filtersToWhere: import("./Browser/FiltersToWhere.js").FiltersToWhereConverter[];
|
|
265
303
|
sidebarFooter: import("./Browser/SidebarFooter.js").SidebarFooterConfig[];
|
|
304
|
+
breadcrumbRoot: import("./Browser/BreadcrumbRoot.js").BreadcrumbRootConfig | undefined;
|
|
266
305
|
};
|
|
267
306
|
};
|
|
268
307
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin/config/contentEntries/list/ContentEntryListConfig.js","sources":["../../../../../src/admin/config/contentEntries/list/ContentEntryListConfig.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createConfigurableComponent } from \"@webiny/react-properties\";\nimport type { BrowserConfig } from \"./Browser/index.js\";\nimport { Browser } from \"./Browser/index.js\";\nimport { CompositionScope } from \"@webiny/react-composition\";\nimport { useAcoConfig } from \"@webiny/app-aco\";\n\nconst base = createConfigurableComponent<ContentEntryListConfig>(\"ContentEntryListConfig\");\n\nconst InternalEntryListConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"cms\"}>\n <base.Config priority={\"primary\"}>{children}</base.Config>\n </CompositionScope>\n );\n};\n\nconst PublicContentEntryListConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"cms\"}>\n <base.Config priority={\"secondary\"}>{children}</base.Config>\n </CompositionScope>\n );\n};\n\nPublicContentEntryListConfig.displayName = \"ContentEntryListConfig\";\n\n/* This one is a public API for other apps and third party developers. */\nexport const ContentEntryListConfig = Object.assign(PublicContentEntryListConfig, { Browser });\n\n/* This one is an internal API for the base app. It ensures this config is always applied first. */\nexport const InternalContentEntryListConfig = Object.assign(InternalEntryListConfig, { Browser });\n\nexport const ContentEntryListWithConfig = base.WithConfig;\n\ninterface ContentEntryListConfig {\n browser: BrowserConfig;\n}\n\nexport function useContentEntryListConfig() {\n const config = base.useConfig();\n const acoConfig = useAcoConfig(config);\n\n const browser = config.browser || {};\n\n return useMemo(\n () => ({\n browser: {\n advancedSearch: acoConfig.advancedSearch,\n table: acoConfig.table,\n folder: acoConfig.folder,\n entry: acoConfig.record,\n bulkActions: [...(browser.bulkActions || [])],\n filters: [...(browser.filters || [])],\n filtersToWhere: [...(browser.filtersToWhere || [])],\n sidebarFooter: [...(browser.sidebarFooter || [])]\n }\n }),\n [config]\n );\n}\n"],"names":["base","createConfigurableComponent","InternalEntryListConfig","children","CompositionScope","PublicContentEntryListConfig","ContentEntryListConfig","Object","Browser","InternalContentEntryListConfig","ContentEntryListWithConfig","useContentEntryListConfig","config","acoConfig","useAcoConfig","browser","useMemo"],"mappings":";;;;;AAOA,MAAMA,OAAOC,4BAAoD;AAEjE,MAAMC,0BAA0B,CAAC,EAAEC,QAAQ,EAAiC,GACjE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACJ,KAAK,MAAM;QAAC,UAAU;OAAYG;AAK/C,MAAME,+BAA+B,CAAC,EAAEF,QAAQ,EAAiC,GACtE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACJ,KAAK,MAAM;QAAC,UAAU;OAAcG;AAKjDE,6BAA6B,WAAW,GAAG;AAGpC,MAAMC,yBAAyBC,OAAO,MAAM,CAACF,8BAA8B;IAAEG,SAAOA;AAAC;AAGrF,MAAMC,iCAAiCF,OAAO,MAAM,CAACL,yBAAyB;IAAEM,SAAOA;AAAC;AAExF,MAAME,6BAA6BV,KAAK,UAAU;AAMlD,SAASW;IACZ,MAAMC,SAASZ,KAAK,SAAS;IAC7B,MAAMa,YAAYC,aAAaF;IAE/B,MAAMG,UAAUH,OAAO,OAAO,IAAI,CAAC;IAEnC,OAAOI,QACH,IAAO;YACH,SAAS;gBACL,gBAAgBH,UAAU,cAAc;gBACxC,OAAOA,UAAU,KAAK;gBACtB,QAAQA,UAAU,MAAM;gBACxB,OAAOA,UAAU,MAAM;gBACvB,aAAa;uBAAKE,QAAQ,WAAW,IAAI,EAAE;iBAAE;gBAC7C,SAAS;uBAAKA,QAAQ,OAAO,IAAI,EAAE;iBAAE;gBACrC,gBAAgB;uBAAKA,QAAQ,cAAc,IAAI,EAAE;iBAAE;gBACnD,eAAe;uBAAKA,QAAQ,aAAa,IAAI,EAAE;iBAAE;
|
|
1
|
+
{"version":3,"file":"admin/config/contentEntries/list/ContentEntryListConfig.js","sources":["../../../../../src/admin/config/contentEntries/list/ContentEntryListConfig.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { createConfigurableComponent } from \"@webiny/react-properties\";\nimport type { BrowserConfig } from \"./Browser/index.js\";\nimport { Browser } from \"./Browser/index.js\";\nimport { CompositionScope } from \"@webiny/react-composition\";\nimport { useAcoConfig } from \"@webiny/app-aco\";\n\nconst base = createConfigurableComponent<ContentEntryListConfig>(\"ContentEntryListConfig\");\n\nconst InternalEntryListConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"cms\"}>\n <base.Config priority={\"primary\"}>{children}</base.Config>\n </CompositionScope>\n );\n};\n\nconst PublicContentEntryListConfig = ({ children }: { children: React.ReactNode }) => {\n return (\n <CompositionScope name={\"cms\"}>\n <base.Config priority={\"secondary\"}>{children}</base.Config>\n </CompositionScope>\n );\n};\n\nPublicContentEntryListConfig.displayName = \"ContentEntryListConfig\";\n\n/* This one is a public API for other apps and third party developers. */\nexport const ContentEntryListConfig = Object.assign(PublicContentEntryListConfig, { Browser });\n\n/* This one is an internal API for the base app. It ensures this config is always applied first. */\nexport const InternalContentEntryListConfig = Object.assign(InternalEntryListConfig, { Browser });\n\nexport const ContentEntryListWithConfig = base.WithConfig;\n\ninterface ContentEntryListConfig {\n browser: BrowserConfig;\n}\n\nexport function useContentEntryListConfig() {\n const config = base.useConfig();\n const acoConfig = useAcoConfig(config);\n\n const browser = config.browser || {};\n\n return useMemo(\n () => ({\n browser: {\n advancedSearch: acoConfig.advancedSearch,\n table: acoConfig.table,\n folder: acoConfig.folder,\n entry: acoConfig.record,\n bulkActions: [...(browser.bulkActions || [])],\n filters: [...(browser.filters || [])],\n filtersToWhere: [...(browser.filtersToWhere || [])],\n sidebarFooter: [...(browser.sidebarFooter || [])],\n breadcrumbRoot: browser.breadcrumbRoot\n }\n }),\n [config]\n );\n}\n"],"names":["base","createConfigurableComponent","InternalEntryListConfig","children","CompositionScope","PublicContentEntryListConfig","ContentEntryListConfig","Object","Browser","InternalContentEntryListConfig","ContentEntryListWithConfig","useContentEntryListConfig","config","acoConfig","useAcoConfig","browser","useMemo"],"mappings":";;;;;AAOA,MAAMA,OAAOC,4BAAoD;AAEjE,MAAMC,0BAA0B,CAAC,EAAEC,QAAQ,EAAiC,GACjE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACJ,KAAK,MAAM;QAAC,UAAU;OAAYG;AAK/C,MAAME,+BAA+B,CAAC,EAAEF,QAAQ,EAAiC,GACtE,WAAP,GACI,oBAACC,kBAAgBA;QAAC,MAAM;qBACpB,oBAACJ,KAAK,MAAM;QAAC,UAAU;OAAcG;AAKjDE,6BAA6B,WAAW,GAAG;AAGpC,MAAMC,yBAAyBC,OAAO,MAAM,CAACF,8BAA8B;IAAEG,SAAOA;AAAC;AAGrF,MAAMC,iCAAiCF,OAAO,MAAM,CAACL,yBAAyB;IAAEM,SAAOA;AAAC;AAExF,MAAME,6BAA6BV,KAAK,UAAU;AAMlD,SAASW;IACZ,MAAMC,SAASZ,KAAK,SAAS;IAC7B,MAAMa,YAAYC,aAAaF;IAE/B,MAAMG,UAAUH,OAAO,OAAO,IAAI,CAAC;IAEnC,OAAOI,QACH,IAAO;YACH,SAAS;gBACL,gBAAgBH,UAAU,cAAc;gBACxC,OAAOA,UAAU,KAAK;gBACtB,QAAQA,UAAU,MAAM;gBACxB,OAAOA,UAAU,MAAM;gBACvB,aAAa;uBAAKE,QAAQ,WAAW,IAAI,EAAE;iBAAE;gBAC7C,SAAS;uBAAKA,QAAQ,OAAO,IAAI,EAAE;iBAAE;gBACrC,gBAAgB;uBAAKA,QAAQ,cAAc,IAAI,EAAE;iBAAE;gBACnD,eAAe;uBAAKA,QAAQ,aAAa,IAAI,EAAE;iBAAE;gBACjD,gBAAgBA,QAAQ,cAAc;YAC1C;QACJ,IACA;QAACH;KAAO;AAEhB"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CmsErrorResponse, CmsModel } from "../../types.js";
|
|
2
2
|
export declare const FIELDS_FIELDS = "\n id\n fieldId\n storageId\n type\n label\n tags\n placeholder\n description\n note\n help\n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n list\n renderer {\n name\n settings\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n rules {\n type\n target\n operator\n value\n action\n }\n";
|
|
3
|
-
export declare const MODEL_FIELDS = "\n name\n group\n icon\n description\n modelId\n singularApiName\n pluralApiName\n savedOn\n createdBy {\n id\n displayName\n }\n titleFieldId\n descriptionFieldId\n imageFieldId\n layout\n tags\n fields {\n \n id\n fieldId\n storageId\n type\n label\n tags\n placeholder\n description\n note\n help\n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n list\n renderer {\n name\n settings\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n rules {\n type\n target\n operator\n value\n action\n }\n\n }\n plugin\n isBeingDeleted\n valuesSelection\n";
|
|
3
|
+
export declare const MODEL_FIELDS = "\n name\n group\n icon\n description\n modelId\n singularApiName\n pluralApiName\n savedOn\n createdBy {\n id\n displayName\n }\n titleFieldId\n descriptionFieldId\n imageFieldId\n layout\n tags\n fields {\n \n id\n fieldId\n storageId\n type\n label\n tags\n placeholder\n description\n note\n help\n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n list\n renderer {\n name\n settings\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n rules {\n type\n target\n operator\n value\n action\n }\n\n }\n plugin\n isBeingDeleted\n metadata { valuesSelection }\n settings\n";
|
|
4
4
|
/**
|
|
5
5
|
* ############################
|
|
6
6
|
* Get Query
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin/graphql/contentModels.js","sources":["../../../src/admin/graphql/contentModels.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { CmsErrorResponse, CmsModel } from \"~/types.js\";\n\nconst ERROR_FIELDS = `\n message\n code\n data\n`;\nexport const FIELDS_FIELDS = `\n id\n fieldId\n storageId\n type\n label\n tags\n placeholder\n description\n note\n help\n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n list\n renderer {\n name\n settings\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n rules {\n type\n target\n operator\n value\n action\n }\n`;\n\nexport const MODEL_FIELDS = `\n name\n group\n icon\n description\n modelId\n singularApiName\n pluralApiName\n savedOn\n createdBy {\n id\n displayName\n }\n titleFieldId\n descriptionFieldId\n imageFieldId\n layout\n tags\n fields {\n ${FIELDS_FIELDS}\n }\n plugin\n isBeingDeleted\n valuesSelection\n`;\n/**\n * ############################\n * Get Query\n */\nexport interface GetCmsModelQueryResponse {\n getContentModel: {\n data?: CmsModel;\n error?: CmsErrorResponse;\n };\n}\nexport interface GetCmsModelQueryVariables {\n modelId: string;\n}\nexport const GET_CONTENT_MODEL = gql`\n query CmsGetContentModel($modelId: ID!) {\n getContentModel(modelId: $modelId) {\n data {\n ${MODEL_FIELDS}\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n`;\n\n/**\n * ############################\n * Update Mutation\n */\nexport interface UpdateCmsModelMutationResponse {\n updateContentModel: {\n data: CmsModel | null;\n error: CmsErrorResponse | null;\n };\n}\nexport interface UpdateCmsModelMutationVariables {\n modelId: string;\n // TODO @ts-refactor write the types.\n data: Partial<CmsModel>;\n}\nexport const UPDATE_CONTENT_MODEL = gql`\n mutation CmsUpdateContentModel($modelId: ID!, $data: CmsContentModelUpdateInput!) {\n updateContentModel(modelId: $modelId, data: $data) {\n data {\n ${MODEL_FIELDS}\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n`;\n"],"names":["ERROR_FIELDS","FIELDS_FIELDS","MODEL_FIELDS","GET_CONTENT_MODEL","gql","UPDATE_CONTENT_MODEL"],"mappings":";AAGA,MAAMA,eAAe,CAAC;;;;AAItB,CAAC;AACM,MAAMC,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0C9B,CAAC;AAEM,MAAMC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;QAmBrB,EAAED,cAAc
|
|
1
|
+
{"version":3,"file":"admin/graphql/contentModels.js","sources":["../../../src/admin/graphql/contentModels.ts"],"sourcesContent":["import gql from \"graphql-tag\";\nimport type { CmsErrorResponse, CmsModel } from \"~/types.js\";\n\nconst ERROR_FIELDS = `\n message\n code\n data\n`;\nexport const FIELDS_FIELDS = `\n id\n fieldId\n storageId\n type\n label\n tags\n placeholder\n description\n note\n help\n predefinedValues {\n enabled\n values {\n label\n value\n selected\n }\n }\n list\n renderer {\n name\n settings\n }\n validation {\n name\n settings\n message\n }\n listValidation {\n name\n settings\n message\n }\n settings\n rules {\n type\n target\n operator\n value\n action\n }\n`;\n\nexport const MODEL_FIELDS = `\n name\n group\n icon\n description\n modelId\n singularApiName\n pluralApiName\n savedOn\n createdBy {\n id\n displayName\n }\n titleFieldId\n descriptionFieldId\n imageFieldId\n layout\n tags\n fields {\n ${FIELDS_FIELDS}\n }\n plugin\n isBeingDeleted\n metadata { valuesSelection }\n settings\n`;\n/**\n * ############################\n * Get Query\n */\nexport interface GetCmsModelQueryResponse {\n getContentModel: {\n data?: CmsModel;\n error?: CmsErrorResponse;\n };\n}\nexport interface GetCmsModelQueryVariables {\n modelId: string;\n}\nexport const GET_CONTENT_MODEL = gql`\n query CmsGetContentModel($modelId: ID!) {\n getContentModel(modelId: $modelId) {\n data {\n ${MODEL_FIELDS}\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n`;\n\n/**\n * ############################\n * Update Mutation\n */\nexport interface UpdateCmsModelMutationResponse {\n updateContentModel: {\n data: CmsModel | null;\n error: CmsErrorResponse | null;\n };\n}\nexport interface UpdateCmsModelMutationVariables {\n modelId: string;\n // TODO @ts-refactor write the types.\n data: Partial<CmsModel>;\n}\nexport const UPDATE_CONTENT_MODEL = gql`\n mutation CmsUpdateContentModel($modelId: ID!, $data: CmsContentModelUpdateInput!) {\n updateContentModel(modelId: $modelId, data: $data) {\n data {\n ${MODEL_FIELDS}\n }\n error {\n ${ERROR_FIELDS}\n }\n }\n }\n`;\n"],"names":["ERROR_FIELDS","FIELDS_FIELDS","MODEL_FIELDS","GET_CONTENT_MODEL","gql","UPDATE_CONTENT_MODEL"],"mappings":";AAGA,MAAMA,eAAe,CAAC;;;;AAItB,CAAC;AACM,MAAMC,gBAAgB,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0C9B,CAAC;AAEM,MAAMC,eAAe,CAAC;;;;;;;;;;;;;;;;;;;QAmBrB,EAAED,cAAc;;;;;;AAMxB,CAAC;AAcM,MAAME,oBAAoBC,WAAG,CAAC;;;;gBAIrB,EAAEF,aAAa;;;gBAGf,EAAEF,aAAa;;;;AAI/B,CAAC;AAiBM,MAAMK,uBAAuBD,WAAG,CAAC;;;;gBAIxB,EAAEF,aAAa;;;gBAGf,EAAEF,aAAa;;;;AAI/B,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import react from "react";
|
|
2
|
-
import { Grid, Input, Tags, Textarea } from "@webiny/admin-ui";
|
|
2
|
+
import { Grid, Input, Switch, Tags, Textarea } from "@webiny/admin-ui";
|
|
3
3
|
import { validation } from "@webiny/validation";
|
|
4
4
|
import GroupSelect from "./GroupSelect.js";
|
|
5
5
|
import { IconPicker } from "../../../../components/IconPicker.js";
|
|
@@ -58,6 +58,29 @@ const GeneralSettings = ({ Bind })=>/*#__PURE__*/ react.createElement(react.Frag
|
|
|
58
58
|
protectedValues: [
|
|
59
59
|
"type:model"
|
|
60
60
|
]
|
|
61
|
+
}))), /*#__PURE__*/ react.createElement(Grid.Column, {
|
|
62
|
+
span: 12
|
|
63
|
+
}, /*#__PURE__*/ react.createElement(Bind, {
|
|
64
|
+
name: "settings.aiEntryWizard"
|
|
65
|
+
}, /*#__PURE__*/ react.createElement(Switch, {
|
|
66
|
+
label: "Generate with AI",
|
|
67
|
+
note: "Show an AI-powered wizard that generates content before opening the editor."
|
|
68
|
+
}))), /*#__PURE__*/ react.createElement(Grid.Column, {
|
|
69
|
+
span: 6
|
|
70
|
+
}, /*#__PURE__*/ react.createElement(Bind, {
|
|
71
|
+
name: "settings.previewPrefix"
|
|
72
|
+
}, /*#__PURE__*/ react.createElement(Input, {
|
|
73
|
+
label: "Preview URL Prefix",
|
|
74
|
+
placeholder: "http://localhost:3000/articles",
|
|
75
|
+
description: "Base URL for live preview."
|
|
76
|
+
}))), /*#__PURE__*/ react.createElement(Grid.Column, {
|
|
77
|
+
span: 6
|
|
78
|
+
}, /*#__PURE__*/ react.createElement(Bind, {
|
|
79
|
+
name: "settings.previewSlug"
|
|
80
|
+
}, /*#__PURE__*/ react.createElement(Input, {
|
|
81
|
+
label: "Preview Slug",
|
|
82
|
+
placeholder: "{values.slug}",
|
|
83
|
+
description: "Entry field pattern for the URL slug. Use {values.fieldId}."
|
|
61
84
|
})))));
|
|
62
85
|
const components_GeneralSettings = GeneralSettings;
|
|
63
86
|
export default components_GeneralSettings;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"admin/plugins/editor/formSettings/components/GeneralSettings.js","sources":["../../../../../../src/admin/plugins/editor/formSettings/components/GeneralSettings.tsx"],"sourcesContent":["import React from \"react\";\nimport { Grid, Input, Textarea, Tags } from \"@webiny/admin-ui\";\nimport { validation } from \"@webiny/validation\";\nimport type { BindComponent } from \"@webiny/form\";\nimport GroupSelect from \"./GroupSelect.js\";\nimport { IconPicker } from \"~/admin/components/IconPicker.js\";\n\ninterface GeneralSettingsProps {\n Bind: BindComponent;\n}\n\nconst GeneralSettings = ({ Bind }: GeneralSettingsProps) => {\n return (\n <React.Fragment>\n <Grid>\n <Grid.Column span={12}>\n <Bind name={\"name\"}>\n <Input label={\"Content model name\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"modelId\"}>\n <Input disabled={true} label={\"Content model ID\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"singularApiName\"}>\n <Input disabled={true} label={\"Singular API Name\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"pluralApiName\"}>\n <Input disabled={true} label={\"Plural API Name\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"description\"}>\n <Textarea rows={5} label={\"Content model description\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"group\"} validators={validation.create(\"required\")}>\n <GroupSelect />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name=\"icon\">\n <IconPicker\n label={`Icon`}\n description={`Choose an icon to represent the model.`}\n />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"tags\"}>\n <Tags label={\"Tags\"} protectedValues={[\"type:model\"]} />\n </Bind>\n </Grid.Column>\n </Grid>\n </React.Fragment>\n );\n};\n\nexport default GeneralSettings;\n"],"names":["GeneralSettings","Bind","React","Grid","Input","Textarea","validation","GroupSelect","IconPicker","Tags"],"mappings":";;;;;AAWA,MAAMA,kBAAkB,CAAC,EAAEC,IAAI,EAAwB,GAC5C,WAAP,GACI,oBAACC,MAAAA,QAAc,sBACX,oBAACC,MAAIA,MAAAA,WAAAA,GACD,oBAACA,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,OAAO;wBAGtB,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,UAAU;QAAM,OAAO;wBAGtC,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,UAAU;QAAM,OAAO;wBAGtC,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,UAAU;QAAM,OAAO;wBAGtC,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACI,UAAQA;QAAC,MAAM;QAAG,OAAO;wBAGlC,oBAACF,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;QAAS,YAAYK,WAAW,MAAM,CAAC;qBAC/C,oBAACC,aAAWA,SAAAA,WAAAA,GAGpB,oBAACJ,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAK;qBACP,oBAACO,YAAUA;QACP,OAAO;QACP,aAAa;wBAIzB,oBAACL,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACQ,MAAIA;QAAC,OAAO;QAAQ,iBAAiB;YAAC;SAAa;;
|
|
1
|
+
{"version":3,"file":"admin/plugins/editor/formSettings/components/GeneralSettings.js","sources":["../../../../../../src/admin/plugins/editor/formSettings/components/GeneralSettings.tsx"],"sourcesContent":["import React from \"react\";\nimport { Grid, Input, Switch, Textarea, Tags } from \"@webiny/admin-ui\";\nimport { validation } from \"@webiny/validation\";\nimport type { BindComponent } from \"@webiny/form\";\nimport GroupSelect from \"./GroupSelect.js\";\nimport { IconPicker } from \"~/admin/components/IconPicker.js\";\n\ninterface GeneralSettingsProps {\n Bind: BindComponent;\n}\n\nconst GeneralSettings = ({ Bind }: GeneralSettingsProps) => {\n return (\n <React.Fragment>\n <Grid>\n <Grid.Column span={12}>\n <Bind name={\"name\"}>\n <Input label={\"Content model name\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"modelId\"}>\n <Input disabled={true} label={\"Content model ID\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"singularApiName\"}>\n <Input disabled={true} label={\"Singular API Name\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"pluralApiName\"}>\n <Input disabled={true} label={\"Plural API Name\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"description\"}>\n <Textarea rows={5} label={\"Content model description\"} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"group\"} validators={validation.create(\"required\")}>\n <GroupSelect />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name=\"icon\">\n <IconPicker\n label={`Icon`}\n description={`Choose an icon to represent the model.`}\n />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"tags\"}>\n <Tags label={\"Tags\"} protectedValues={[\"type:model\"]} />\n </Bind>\n </Grid.Column>\n <Grid.Column span={12}>\n <Bind name={\"settings.aiEntryWizard\"}>\n <Switch\n label={\"Generate with AI\"}\n note={\n \"Show an AI-powered wizard that generates content before opening the editor.\"\n }\n />\n </Bind>\n </Grid.Column>\n <Grid.Column span={6}>\n <Bind name={\"settings.previewPrefix\"}>\n <Input\n label={\"Preview URL Prefix\"}\n placeholder={\"http://localhost:3000/articles\"}\n description={\"Base URL for live preview.\"}\n />\n </Bind>\n </Grid.Column>\n <Grid.Column span={6}>\n <Bind name={\"settings.previewSlug\"}>\n <Input\n label={\"Preview Slug\"}\n placeholder={\"{values.slug}\"}\n description={\n \"Entry field pattern for the URL slug. Use {values.fieldId}.\"\n }\n />\n </Bind>\n </Grid.Column>\n </Grid>\n </React.Fragment>\n );\n};\n\nexport default GeneralSettings;\n"],"names":["GeneralSettings","Bind","React","Grid","Input","Textarea","validation","GroupSelect","IconPicker","Tags","Switch"],"mappings":";;;;;AAWA,MAAMA,kBAAkB,CAAC,EAAEC,IAAI,EAAwB,GAC5C,WAAP,GACI,oBAACC,MAAAA,QAAc,sBACX,oBAACC,MAAIA,MAAAA,WAAAA,GACD,oBAACA,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,OAAO;wBAGtB,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,UAAU;QAAM,OAAO;wBAGtC,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,UAAU;QAAM,OAAO;wBAGtC,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QAAC,UAAU;QAAM,OAAO;wBAGtC,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACI,UAAQA;QAAC,MAAM;QAAG,OAAO;wBAGlC,oBAACF,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;QAAS,YAAYK,WAAW,MAAM,CAAC;qBAC/C,oBAACC,aAAWA,SAAAA,WAAAA,GAGpB,oBAACJ,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAK;qBACP,oBAACO,YAAUA;QACP,OAAO;QACP,aAAa;wBAIzB,oBAACL,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACQ,MAAIA;QAAC,OAAO;QAAQ,iBAAiB;YAAC;SAAa;wBAG5D,oBAACN,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACS,QAAMA;QACH,OAAO;QACP,MACI;wBAKhB,oBAACP,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QACF,OAAO;QACP,aAAa;QACb,aAAa;wBAIzB,oBAACD,KAAK,MAAM;QAAC,MAAM;qBACf,oBAACF,MAAAA;QAAK,MAAM;qBACR,oBAACG,OAAKA;QACF,OAAO;QACP,aAAa;QACb,aACI;;AAUhC,mCAAeJ"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { RevisionsListPresenter } from "../../../../presentation/contentEntries/revisionsList/abstractions.js";
|
|
1
2
|
export { ContentEntryFormContent } from "../../../../presentation/contentEntries/views/layout/index.js";
|
|
2
3
|
export { ContentEntryForm } from "../../../../presentation/contentEntries/views/layout/index.js";
|
|
3
4
|
export { useModel } from "../../../../admin/components/ModelProvider/index.js";
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
export { RevisionsListPresenter } from "../../../../presentation/contentEntries/revisionsList/abstractions.js";
|
|
1
2
|
export { ContentEntryForm, ContentEntryFormContent } from "../../../../presentation/contentEntries/views/layout/index.js";
|
|
2
3
|
export { useModel } from "../../../../admin/components/ModelProvider/index.js";
|
|
3
4
|
export { useContentEntryFormPresenter } from "../../../../presentation/contentEntries/form/useContentEntryFormPresenter.js";
|
|
@@ -5,3 +5,5 @@ export { ListEntriesGraphQLFieldSelection } from "../../../../features/contentEn
|
|
|
5
5
|
export type { IListEntriesGraphQLFieldSelection } from "../../../../features/contentEntry/listEntries/abstractions.js";
|
|
6
6
|
export { GetEntryGraphQLFieldSelection } from "../../../../features/contentEntry/getEntry/abstractions.js";
|
|
7
7
|
export type { IGetEntryGraphQLFieldSelection } from "../../../../features/contentEntry/getEntry/abstractions.js";
|
|
8
|
+
export { BulkActionFeature } from "../../../../features/contentEntry/bulkAction/feature.js";
|
|
9
|
+
export { BulkActionUseCase } from "../../../../features/contentEntry/bulkAction/abstractions.js";
|
|
@@ -3,3 +3,5 @@ export { ContentEntryListConfig } from "../../../../admin/config/contentEntries/
|
|
|
3
3
|
export { TableRowMapper } from "../../../../presentation/contentEntries/views/Table/abstractions.js";
|
|
4
4
|
export { ListEntriesGraphQLFieldSelection } from "../../../../features/contentEntry/listEntries/abstractions.js";
|
|
5
5
|
export { GetEntryGraphQLFieldSelection } from "../../../../features/contentEntry/getEntry/abstractions.js";
|
|
6
|
+
export { BulkActionFeature } from "../../../../features/contentEntry/bulkAction/feature.js";
|
|
7
|
+
export { BulkActionUseCase } from "../../../../features/contentEntry/bulkAction/abstractions.js";
|
package/exports/admin/cms.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ export { CmsGraphQLClient } from "../../features/graphQLClient/index.js";
|
|
|
2
2
|
export { useModel } from "../../admin/components/ModelProvider/index.js";
|
|
3
3
|
export { usePermission } from "../../admin/hooks/usePermission.js";
|
|
4
4
|
export { IsModelPublishable } from "../../admin/components/IsModelPublishable.js";
|
|
5
|
+
export { PublishEntryConfirmDialog } from "../../admin/components/Dialogs/PublishEntryConfirmDialog.js";
|
|
6
|
+
export { UnpublishEntryConfirmDialog } from "../../admin/components/Dialogs/UnpublishEntryConfirmDialog.js";
|
|
5
7
|
export { Routes } from "../../routes.js";
|
|
6
8
|
export { EntryAfterCreateEventHandler, EntryAfterUpdateEventHandler, EntryAfterDeleteEventHandler } from "../../features/contentEntry/events/index.js";
|
|
7
9
|
export type { EntryAfterCreatePayload, EntryAfterUpdatePayload, EntryAfterDeletePayload } from "../../features/contentEntry/events/index.js";
|
package/exports/admin/cms.js
CHANGED
|
@@ -2,5 +2,7 @@ export { CmsGraphQLClient } from "../../features/graphQLClient/index.js";
|
|
|
2
2
|
export { useModel } from "../../admin/components/ModelProvider/index.js";
|
|
3
3
|
export { usePermission } from "../../admin/hooks/usePermission.js";
|
|
4
4
|
export { IsModelPublishable } from "../../admin/components/IsModelPublishable.js";
|
|
5
|
+
export { PublishEntryConfirmDialog } from "../../admin/components/Dialogs/PublishEntryConfirmDialog.js";
|
|
6
|
+
export { UnpublishEntryConfirmDialog } from "../../admin/components/Dialogs/UnpublishEntryConfirmDialog.js";
|
|
5
7
|
export { Routes } from "../../routes.js";
|
|
6
8
|
export { EntryAfterCreateEventHandler, EntryAfterDeleteEventHandler, EntryAfterUpdateEventHandler } from "../../features/contentEntry/events/index.js";
|
|
@@ -60,7 +60,7 @@ class EntryGraphQLFieldsImpl {
|
|
|
60
60
|
`;
|
|
61
61
|
}
|
|
62
62
|
getValuesBlock(model) {
|
|
63
|
-
const selection = model.valuesSelection;
|
|
63
|
+
const selection = model.metadata.valuesSelection;
|
|
64
64
|
if (!selection || "_empty" === selection) return "";
|
|
65
65
|
return `values {\n${selection}\n}`;
|
|
66
66
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/EntryGraphQLFields.js","sources":["../../../src/features/contentEntry/EntryGraphQLFields.ts"],"sourcesContent":["import { CMS_MODEL_SINGLETON_TAG } from \"@webiny/app-headless-cms-common\";\nimport type { CmsModel } from \"~/types.js\";\nimport { EntryGraphQLFields as Abstraction } from \"./abstractions.js\";\n\nconst CONTENT_META_FIELDS = /* GraphQL */ `\n title\n description\n image\n version\n locked\n status\n`;\n\nconst IDENTITY_FIELDS = /* GraphQL */ `\n id\n type\n displayName\n`;\n\nclass EntryGraphQLFieldsImpl implements Abstraction.Interface {\n getSystemFields(model: CmsModel): string {\n const isSingleton = model.tags.includes(CMS_MODEL_SINGLETON_TAG);\n\n let optionalFields = \"\";\n if (!isSingleton) {\n optionalFields = `\n wbyAco_location {\n folderId\n }\n meta {\n ${CONTENT_META_FIELDS}\n }\n `;\n }\n\n return /* GraphQL */ `\n id\n entryId\n createdOn\n savedOn\n modifiedOn\n deletedOn\n firstPublishedOn\n lastPublishedOn\n createdBy { ${IDENTITY_FIELDS} }\n savedBy { ${IDENTITY_FIELDS} }\n modifiedBy { ${IDENTITY_FIELDS} }\n deletedBy { ${IDENTITY_FIELDS} }\n firstPublishedBy { ${IDENTITY_FIELDS} }\n lastPublishedBy { ${IDENTITY_FIELDS} }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionDeletedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy { ${IDENTITY_FIELDS} }\n revisionSavedBy { ${IDENTITY_FIELDS} }\n revisionModifiedBy { ${IDENTITY_FIELDS} }\n revisionDeletedBy { ${IDENTITY_FIELDS} }\n revisionFirstPublishedBy { ${IDENTITY_FIELDS} }\n revisionLastPublishedBy { ${IDENTITY_FIELDS} }\n ${optionalFields}\n live {\n version\n }\n revisionDescription\n `;\n }\n\n getValuesBlock(model: CmsModel): string {\n const selection = model.valuesSelection;\n\n if (!selection || selection === \"_empty\") {\n return \"\";\n }\n\n return `values {\\n${selection}\\n}`;\n }\n}\n\nexport const EntryGraphQLFields = Abstraction.createImplementation({\n implementation: EntryGraphQLFieldsImpl,\n dependencies: []\n});\n"],"names":["CONTENT_META_FIELDS","IDENTITY_FIELDS","EntryGraphQLFieldsImpl","model","isSingleton","CMS_MODEL_SINGLETON_TAG","optionalFields","selection","EntryGraphQLFields","Abstraction"],"mappings":";;AAIA,MAAMA,sBAAoC,CAAC;;;;;;;AAO3C,CAAC;AAED,MAAMC,kBAAgC,CAAC;;;;AAIvC,CAAC;AAED,MAAMC;IACF,gBAAgBC,KAAe,EAAU;QACrC,MAAMC,cAAcD,MAAM,IAAI,CAAC,QAAQ,CAACE;QAExC,IAAIC,iBAAiB;QACrB,IAAI,CAACF,aACDE,iBAAiB,CAAC;;;;;oBAKV,EAAEN,oBAAoB;;YAE9B,CAAC;QAGL,OAAqB,CAAC;;;;;;;;;wBASN,EAAEC,gBAAgB;sBACpB,EAAEA,gBAAgB;yBACf,EAAEA,gBAAgB;wBACnB,EAAEA,gBAAgB;+BACX,EAAEA,gBAAgB;8BACnB,EAAEA,gBAAgB;;;;;;;gCAOhB,EAAEA,gBAAgB;8BACpB,EAAEA,gBAAgB;iCACf,EAAEA,gBAAgB;gCACnB,EAAEA,gBAAgB;uCACX,EAAEA,gBAAgB;sCACnB,EAAEA,gBAAgB;YAC5C,EAAEK,eAAe;;;;;QAKrB,CAAC;IACL;IAEA,eAAeH,KAAe,EAAU;QACpC,MAAMI,YAAYJ,MAAM,eAAe;
|
|
1
|
+
{"version":3,"file":"features/contentEntry/EntryGraphQLFields.js","sources":["../../../src/features/contentEntry/EntryGraphQLFields.ts"],"sourcesContent":["import { CMS_MODEL_SINGLETON_TAG } from \"@webiny/app-headless-cms-common\";\nimport type { CmsModel } from \"~/types.js\";\nimport { EntryGraphQLFields as Abstraction } from \"./abstractions.js\";\n\nconst CONTENT_META_FIELDS = /* GraphQL */ `\n title\n description\n image\n version\n locked\n status\n`;\n\nconst IDENTITY_FIELDS = /* GraphQL */ `\n id\n type\n displayName\n`;\n\nclass EntryGraphQLFieldsImpl implements Abstraction.Interface {\n getSystemFields(model: CmsModel): string {\n const isSingleton = model.tags.includes(CMS_MODEL_SINGLETON_TAG);\n\n let optionalFields = \"\";\n if (!isSingleton) {\n optionalFields = `\n wbyAco_location {\n folderId\n }\n meta {\n ${CONTENT_META_FIELDS}\n }\n `;\n }\n\n return /* GraphQL */ `\n id\n entryId\n createdOn\n savedOn\n modifiedOn\n deletedOn\n firstPublishedOn\n lastPublishedOn\n createdBy { ${IDENTITY_FIELDS} }\n savedBy { ${IDENTITY_FIELDS} }\n modifiedBy { ${IDENTITY_FIELDS} }\n deletedBy { ${IDENTITY_FIELDS} }\n firstPublishedBy { ${IDENTITY_FIELDS} }\n lastPublishedBy { ${IDENTITY_FIELDS} }\n revisionCreatedOn\n revisionSavedOn\n revisionModifiedOn\n revisionDeletedOn\n revisionFirstPublishedOn\n revisionLastPublishedOn\n revisionCreatedBy { ${IDENTITY_FIELDS} }\n revisionSavedBy { ${IDENTITY_FIELDS} }\n revisionModifiedBy { ${IDENTITY_FIELDS} }\n revisionDeletedBy { ${IDENTITY_FIELDS} }\n revisionFirstPublishedBy { ${IDENTITY_FIELDS} }\n revisionLastPublishedBy { ${IDENTITY_FIELDS} }\n ${optionalFields}\n live {\n version\n }\n revisionDescription\n `;\n }\n\n getValuesBlock(model: CmsModel): string {\n const selection = model.metadata.valuesSelection;\n\n if (!selection || selection === \"_empty\") {\n return \"\";\n }\n\n return `values {\\n${selection}\\n}`;\n }\n}\n\nexport const EntryGraphQLFields = Abstraction.createImplementation({\n implementation: EntryGraphQLFieldsImpl,\n dependencies: []\n});\n"],"names":["CONTENT_META_FIELDS","IDENTITY_FIELDS","EntryGraphQLFieldsImpl","model","isSingleton","CMS_MODEL_SINGLETON_TAG","optionalFields","selection","EntryGraphQLFields","Abstraction"],"mappings":";;AAIA,MAAMA,sBAAoC,CAAC;;;;;;;AAO3C,CAAC;AAED,MAAMC,kBAAgC,CAAC;;;;AAIvC,CAAC;AAED,MAAMC;IACF,gBAAgBC,KAAe,EAAU;QACrC,MAAMC,cAAcD,MAAM,IAAI,CAAC,QAAQ,CAACE;QAExC,IAAIC,iBAAiB;QACrB,IAAI,CAACF,aACDE,iBAAiB,CAAC;;;;;oBAKV,EAAEN,oBAAoB;;YAE9B,CAAC;QAGL,OAAqB,CAAC;;;;;;;;;wBASN,EAAEC,gBAAgB;sBACpB,EAAEA,gBAAgB;yBACf,EAAEA,gBAAgB;wBACnB,EAAEA,gBAAgB;+BACX,EAAEA,gBAAgB;8BACnB,EAAEA,gBAAgB;;;;;;;gCAOhB,EAAEA,gBAAgB;8BACpB,EAAEA,gBAAgB;iCACf,EAAEA,gBAAgB;gCACnB,EAAEA,gBAAgB;uCACX,EAAEA,gBAAgB;sCACnB,EAAEA,gBAAgB;YAC5C,EAAEK,eAAe;;;;;QAKrB,CAAC;IACL;IAEA,eAAeH,KAAe,EAAU;QACpC,MAAMI,YAAYJ,MAAM,QAAQ,CAAC,eAAe;QAEhD,IAAI,CAACI,aAAaA,AAAc,aAAdA,WACd,OAAO;QAGX,OAAO,CAAC,UAAU,EAAEA,UAAU,GAAG,CAAC;IACtC;AACJ;AAEO,MAAMC,wCAAqBC,mBAAAA,oBAAgC,CAAC;IAC/D,gBAAgBP;IAChB,cAAc,EAAE;AACpB"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { CreateEntryRepository as RepositoryAbstraction, CreateEntryGateway } from "./abstractions.js";
|
|
2
2
|
import { ContentEntriesCacheProvider } from "../../../features/contentEntry/abstractions.js";
|
|
3
3
|
import type { ICreateEntryGatewayParams } from "./abstractions.js";
|
|
4
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
4
5
|
declare class CreateEntryRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
5
6
|
private cacheProvider;
|
|
6
7
|
private gateway;
|
|
7
|
-
|
|
8
|
+
private eventPublisher;
|
|
9
|
+
constructor(cacheProvider: ContentEntriesCacheProvider.Interface, gateway: CreateEntryGateway.Interface, eventPublisher: EventPublisher.Interface);
|
|
8
10
|
execute(params: ICreateEntryGatewayParams): Promise<import("@webiny/app-headless-cms-common/types/index.js").CmsContentEntry<import("@webiny/app/types.js").GenericRecord>>;
|
|
9
11
|
}
|
|
10
12
|
export declare const CreateEntryRepository: typeof CreateEntryRepositoryImpl & {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { CreateEntryGateway, CreateEntryRepository } from "./abstractions.js";
|
|
2
2
|
import { ContentEntriesCacheProvider } from "../abstractions.js";
|
|
3
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
4
|
+
import { EntryAfterCreateEvent } from "../events/EntryAfterCreateEvent.js";
|
|
3
5
|
class CreateEntryRepositoryImpl {
|
|
4
|
-
constructor(cacheProvider, gateway){
|
|
6
|
+
constructor(cacheProvider, gateway, eventPublisher){
|
|
5
7
|
this.cacheProvider = cacheProvider;
|
|
6
8
|
this.gateway = gateway;
|
|
9
|
+
this.eventPublisher = eventPublisher;
|
|
7
10
|
}
|
|
8
11
|
async execute(params) {
|
|
9
12
|
const entry = await this.gateway.execute(params);
|
|
@@ -11,6 +14,10 @@ class CreateEntryRepositoryImpl {
|
|
|
11
14
|
cache.addItems([
|
|
12
15
|
entry
|
|
13
16
|
]);
|
|
17
|
+
await this.eventPublisher.publish(new EntryAfterCreateEvent({
|
|
18
|
+
entry,
|
|
19
|
+
model: params.model
|
|
20
|
+
}));
|
|
14
21
|
return entry;
|
|
15
22
|
}
|
|
16
23
|
}
|
|
@@ -18,7 +25,8 @@ const CreateEntryRepository_CreateEntryRepository = CreateEntryRepository.create
|
|
|
18
25
|
implementation: CreateEntryRepositoryImpl,
|
|
19
26
|
dependencies: [
|
|
20
27
|
ContentEntriesCacheProvider,
|
|
21
|
-
CreateEntryGateway
|
|
28
|
+
CreateEntryGateway,
|
|
29
|
+
EventPublisher
|
|
22
30
|
]
|
|
23
31
|
});
|
|
24
32
|
export { CreateEntryRepository_CreateEntryRepository as CreateEntryRepository };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/createEntry/CreateEntryRepository.js","sources":["../../../../src/features/contentEntry/createEntry/CreateEntryRepository.ts"],"sourcesContent":["import {\n CreateEntryRepository as RepositoryAbstraction,\n CreateEntryGateway\n} from \"./abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"~/features/contentEntry/abstractions.js\";\nimport type { ICreateEntryGatewayParams } from \"./abstractions.js\";\n\nclass CreateEntryRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(\n private cacheProvider: ContentEntriesCacheProvider.Interface,\n private gateway: CreateEntryGateway.Interface\n ) {}\n\n async execute(params: ICreateEntryGatewayParams) {\n const entry = await this.gateway.execute(params);\n\n const cache = this.cacheProvider.get(params.model.modelId);\n cache.addItems([entry]);\n\n return entry;\n }\n}\n\nexport const CreateEntryRepository = RepositoryAbstraction.createImplementation({\n implementation: CreateEntryRepositoryImpl,\n dependencies: [ContentEntriesCacheProvider, CreateEntryGateway]\n});\n"],"names":["CreateEntryRepositoryImpl","cacheProvider","gateway","params","entry","cache","CreateEntryRepository","RepositoryAbstraction","ContentEntriesCacheProvider","CreateEntryGateway"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/contentEntry/createEntry/CreateEntryRepository.js","sources":["../../../../src/features/contentEntry/createEntry/CreateEntryRepository.ts"],"sourcesContent":["import {\n CreateEntryRepository as RepositoryAbstraction,\n CreateEntryGateway\n} from \"./abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"~/features/contentEntry/abstractions.js\";\nimport type { ICreateEntryGatewayParams } from \"./abstractions.js\";\nimport { EventPublisher } from \"@webiny/app/features/eventPublisher/index.js\";\nimport { EntryAfterCreateEvent } from \"~/features/contentEntry/events/EntryAfterCreateEvent.js\";\n\nclass CreateEntryRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(\n private cacheProvider: ContentEntriesCacheProvider.Interface,\n private gateway: CreateEntryGateway.Interface,\n private eventPublisher: EventPublisher.Interface\n ) {}\n\n async execute(params: ICreateEntryGatewayParams) {\n const entry = await this.gateway.execute(params);\n\n const cache = this.cacheProvider.get(params.model.modelId);\n cache.addItems([entry]);\n\n await this.eventPublisher.publish(\n new EntryAfterCreateEvent({ entry, model: params.model })\n );\n\n return entry;\n }\n}\n\nexport const CreateEntryRepository = RepositoryAbstraction.createImplementation({\n implementation: CreateEntryRepositoryImpl,\n dependencies: [ContentEntriesCacheProvider, CreateEntryGateway, EventPublisher]\n});\n"],"names":["CreateEntryRepositoryImpl","cacheProvider","gateway","eventPublisher","params","entry","cache","EntryAfterCreateEvent","CreateEntryRepository","RepositoryAbstraction","ContentEntriesCacheProvider","CreateEntryGateway","EventPublisher"],"mappings":";;;;AASA,MAAMA;IACF,YACYC,aAAoD,EACpDC,OAAqC,EACrCC,cAAwC,CAClD;aAHUF,aAAa,GAAbA;aACAC,OAAO,GAAPA;aACAC,cAAc,GAAdA;IACT;IAEH,MAAM,QAAQC,MAAiC,EAAE;QAC7C,MAAMC,QAAQ,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAACD;QAEzC,MAAME,QAAQ,IAAI,CAAC,aAAa,CAAC,GAAG,CAACF,OAAO,KAAK,CAAC,OAAO;QACzDE,MAAM,QAAQ,CAAC;YAACD;SAAM;QAEtB,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAC7B,IAAIE,sBAAsB;YAAEF;YAAO,OAAOD,OAAO,KAAK;QAAC;QAG3D,OAAOC;IACX;AACJ;AAEO,MAAMG,8CAAwBC,sBAAAA,oBAA0C,CAAC;IAC5E,gBAAgBT;IAChB,cAAc;QAACU;QAA6BC;QAAoBC;KAAe;AACnF"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { DeleteEntryRepository as RepositoryAbstraction, DeleteEntryGateway } from "./abstractions.js";
|
|
2
2
|
import { ContentEntriesCacheProvider } from "../../../features/contentEntry/abstractions.js";
|
|
3
3
|
import type { IDeleteEntryParams } from "./abstractions.js";
|
|
4
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
4
5
|
declare class DeleteEntryRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
5
6
|
private cacheProvider;
|
|
6
7
|
private gateway;
|
|
7
|
-
|
|
8
|
+
private eventPublisher;
|
|
9
|
+
constructor(cacheProvider: ContentEntriesCacheProvider.Interface, gateway: DeleteEntryGateway.Interface, eventPublisher: EventPublisher.Interface);
|
|
8
10
|
execute(params: IDeleteEntryParams): Promise<boolean>;
|
|
9
11
|
}
|
|
10
12
|
export declare const DeleteEntryRepository: typeof DeleteEntryRepositoryImpl & {
|
|
@@ -1,14 +1,23 @@
|
|
|
1
1
|
import { DeleteEntryGateway, DeleteEntryRepository } from "./abstractions.js";
|
|
2
2
|
import { ContentEntriesCacheProvider } from "../abstractions.js";
|
|
3
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
4
|
+
import { EntryAfterDeleteEvent } from "../events/EntryAfterDeleteEvent.js";
|
|
3
5
|
class DeleteEntryRepositoryImpl {
|
|
4
|
-
constructor(cacheProvider, gateway){
|
|
6
|
+
constructor(cacheProvider, gateway, eventPublisher){
|
|
5
7
|
this.cacheProvider = cacheProvider;
|
|
6
8
|
this.gateway = gateway;
|
|
9
|
+
this.eventPublisher = eventPublisher;
|
|
7
10
|
}
|
|
8
11
|
async execute(params) {
|
|
9
12
|
const result = await this.gateway.execute(params);
|
|
10
13
|
const cache = this.cacheProvider.get(params.model.modelId);
|
|
11
14
|
cache.removeItems((item)=>item.id === params.id || item.entryId === params.id);
|
|
15
|
+
const entryId = params.id.includes("#") ? params.id.split("#")[0] : params.id;
|
|
16
|
+
await this.eventPublisher.publish(new EntryAfterDeleteEvent({
|
|
17
|
+
model: params.model,
|
|
18
|
+
id: params.id,
|
|
19
|
+
entryId
|
|
20
|
+
}));
|
|
12
21
|
return result;
|
|
13
22
|
}
|
|
14
23
|
}
|
|
@@ -16,7 +25,8 @@ const DeleteEntryRepository_DeleteEntryRepository = DeleteEntryRepository.create
|
|
|
16
25
|
implementation: DeleteEntryRepositoryImpl,
|
|
17
26
|
dependencies: [
|
|
18
27
|
ContentEntriesCacheProvider,
|
|
19
|
-
DeleteEntryGateway
|
|
28
|
+
DeleteEntryGateway,
|
|
29
|
+
EventPublisher
|
|
20
30
|
]
|
|
21
31
|
});
|
|
22
32
|
export { DeleteEntryRepository_DeleteEntryRepository as DeleteEntryRepository };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/deleteEntry/DeleteEntryRepository.js","sources":["../../../../src/features/contentEntry/deleteEntry/DeleteEntryRepository.ts"],"sourcesContent":["import {\n DeleteEntryRepository as RepositoryAbstraction,\n DeleteEntryGateway\n} from \"./abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"~/features/contentEntry/abstractions.js\";\nimport type { IDeleteEntryParams } from \"./abstractions.js\";\n\nclass DeleteEntryRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(\n private cacheProvider: ContentEntriesCacheProvider.Interface,\n private gateway: DeleteEntryGateway.Interface\n ) {}\n\n async execute(params: IDeleteEntryParams) {\n const result = await this.gateway.execute(params);\n\n const cache = this.cacheProvider.get(params.model.modelId);\n cache.removeItems(item => item.id === params.id || item.entryId === params.id);\n\n return result;\n }\n}\n\nexport const DeleteEntryRepository = RepositoryAbstraction.createImplementation({\n implementation: DeleteEntryRepositoryImpl,\n dependencies: [ContentEntriesCacheProvider, DeleteEntryGateway]\n});\n"],"names":["DeleteEntryRepositoryImpl","cacheProvider","gateway","params","result","cache","item","DeleteEntryRepository","RepositoryAbstraction","ContentEntriesCacheProvider","DeleteEntryGateway"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/contentEntry/deleteEntry/DeleteEntryRepository.js","sources":["../../../../src/features/contentEntry/deleteEntry/DeleteEntryRepository.ts"],"sourcesContent":["import {\n DeleteEntryRepository as RepositoryAbstraction,\n DeleteEntryGateway\n} from \"./abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"~/features/contentEntry/abstractions.js\";\nimport type { IDeleteEntryParams } from \"./abstractions.js\";\nimport { EventPublisher } from \"@webiny/app/features/eventPublisher/index.js\";\nimport { EntryAfterDeleteEvent } from \"~/features/contentEntry/events/EntryAfterDeleteEvent.js\";\n\nclass DeleteEntryRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(\n private cacheProvider: ContentEntriesCacheProvider.Interface,\n private gateway: DeleteEntryGateway.Interface,\n private eventPublisher: EventPublisher.Interface\n ) {}\n\n async execute(params: IDeleteEntryParams) {\n const result = await this.gateway.execute(params);\n\n const cache = this.cacheProvider.get(params.model.modelId);\n cache.removeItems(item => item.id === params.id || item.entryId === params.id);\n\n const entryId = params.id.includes(\"#\") ? params.id.split(\"#\")[0] : params.id;\n await this.eventPublisher.publish(\n new EntryAfterDeleteEvent({ model: params.model, id: params.id, entryId })\n );\n\n return result;\n }\n}\n\nexport const DeleteEntryRepository = RepositoryAbstraction.createImplementation({\n implementation: DeleteEntryRepositoryImpl,\n dependencies: [ContentEntriesCacheProvider, DeleteEntryGateway, EventPublisher]\n});\n"],"names":["DeleteEntryRepositoryImpl","cacheProvider","gateway","eventPublisher","params","result","cache","item","entryId","EntryAfterDeleteEvent","DeleteEntryRepository","RepositoryAbstraction","ContentEntriesCacheProvider","DeleteEntryGateway","EventPublisher"],"mappings":";;;;AASA,MAAMA;IACF,YACYC,aAAoD,EACpDC,OAAqC,EACrCC,cAAwC,CAClD;aAHUF,aAAa,GAAbA;aACAC,OAAO,GAAPA;aACAC,cAAc,GAAdA;IACT;IAEH,MAAM,QAAQC,MAA0B,EAAE;QACtC,MAAMC,SAAS,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAACD;QAE1C,MAAME,QAAQ,IAAI,CAAC,aAAa,CAAC,GAAG,CAACF,OAAO,KAAK,CAAC,OAAO;QACzDE,MAAM,WAAW,CAACC,CAAAA,OAAQA,KAAK,EAAE,KAAKH,OAAO,EAAE,IAAIG,KAAK,OAAO,KAAKH,OAAO,EAAE;QAE7E,MAAMI,UAAUJ,OAAO,EAAE,CAAC,QAAQ,CAAC,OAAOA,OAAO,EAAE,CAAC,KAAK,CAAC,IAAI,CAAC,EAAE,GAAGA,OAAO,EAAE;QAC7E,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAC7B,IAAIK,sBAAsB;YAAE,OAAOL,OAAO,KAAK;YAAE,IAAIA,OAAO,EAAE;YAAEI;QAAQ;QAG5E,OAAOH;IACX;AACJ;AAEO,MAAMK,8CAAwBC,sBAAAA,oBAA0C,CAAC;IAC5E,gBAAgBX;IAChB,cAAc;QAACY;QAA6BC;QAAoBC;KAAe;AACnF"}
|
|
@@ -34,4 +34,11 @@ export interface CmsReferenceValue {
|
|
|
34
34
|
id: string;
|
|
35
35
|
modelId: string;
|
|
36
36
|
}
|
|
37
|
+
/**
|
|
38
|
+
* A partial update to an already-resolved reference entry, keyed by `entryId`.
|
|
39
|
+
* Used to patch the in-memory card after editing a referenced entry, avoiding a refetch.
|
|
40
|
+
*/
|
|
41
|
+
export type CmsReferenceEntryPatch = Partial<CmsReferenceEntry> & {
|
|
42
|
+
entryId: string;
|
|
43
|
+
};
|
|
37
44
|
export declare const REFERENCE_ENTRY_FIELDS = "\n data {\n id\n entryId\n status\n title\n description\n image\n createdOn\n savedOn\n createdBy {\n id\n type\n displayName\n }\n modifiedBy {\n id\n type\n displayName\n }\n model {\n modelId\n name\n }\n published {\n id\n entryId\n title\n }\n wbyAco_location {\n folderId\n }\n }\n error {\n message\n code\n data\n }\n";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/refTypes.js","sources":["../../../src/features/contentEntry/refTypes.ts"],"sourcesContent":["export interface CmsReferenceEntry {\n id: string;\n entryId: string;\n status: string;\n title: string;\n description: string | null;\n image: string | null;\n createdOn: string;\n savedOn: string;\n createdBy: { id: string; type: string; displayName: string };\n modifiedBy: { id: string; type: string; displayName: string } | null;\n model: { modelId: string; name: string };\n published: { id: string; entryId: string; title: string } | null;\n wbyAco_location: { folderId: string } | null;\n}\n\nexport interface CmsReferenceValue {\n id: string;\n modelId: string;\n}\n\nexport const REFERENCE_ENTRY_FIELDS = /* GraphQL */ `\n data {\n id\n entryId\n status\n title\n description\n image\n createdOn\n savedOn\n createdBy {\n id\n type\n displayName\n }\n modifiedBy {\n id\n type\n displayName\n }\n model {\n modelId\n name\n }\n published {\n id\n entryId\n title\n }\n wbyAco_location {\n folderId\n }\n }\n error {\n message\n code\n data\n }\n`;\n"],"names":["REFERENCE_ENTRY_FIELDS"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/contentEntry/refTypes.js","sources":["../../../src/features/contentEntry/refTypes.ts"],"sourcesContent":["export interface CmsReferenceEntry {\n id: string;\n entryId: string;\n status: string;\n title: string;\n description: string | null;\n image: string | null;\n createdOn: string;\n savedOn: string;\n createdBy: { id: string; type: string; displayName: string };\n modifiedBy: { id: string; type: string; displayName: string } | null;\n model: { modelId: string; name: string };\n published: { id: string; entryId: string; title: string } | null;\n wbyAco_location: { folderId: string } | null;\n}\n\nexport interface CmsReferenceValue {\n id: string;\n modelId: string;\n}\n\n/**\n * A partial update to an already-resolved reference entry, keyed by `entryId`.\n * Used to patch the in-memory card after editing a referenced entry, avoiding a refetch.\n */\nexport type CmsReferenceEntryPatch = Partial<CmsReferenceEntry> & { entryId: string };\n\nexport const REFERENCE_ENTRY_FIELDS = /* GraphQL */ `\n data {\n id\n entryId\n status\n title\n description\n image\n createdOn\n savedOn\n createdBy {\n id\n type\n displayName\n }\n modifiedBy {\n id\n type\n displayName\n }\n model {\n modelId\n name\n }\n published {\n id\n entryId\n title\n }\n wbyAco_location {\n folderId\n }\n }\n error {\n message\n code\n data\n }\n`;\n"],"names":["REFERENCE_ENTRY_FIELDS"],"mappings":"AA2BO,MAAMA,yBAAuC,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsCrD,CAAC"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { UpdateEntryRepository as RepositoryAbstraction, UpdateEntryGateway } from "./abstractions.js";
|
|
2
2
|
import { ContentEntriesCacheProvider } from "../../../features/contentEntry/abstractions.js";
|
|
3
3
|
import type { IUpdateEntryParams } from "./abstractions.js";
|
|
4
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
4
5
|
declare class UpdateEntryRepositoryImpl implements RepositoryAbstraction.Interface {
|
|
5
6
|
private cacheProvider;
|
|
6
7
|
private gateway;
|
|
7
|
-
|
|
8
|
+
private eventPublisher;
|
|
9
|
+
constructor(cacheProvider: ContentEntriesCacheProvider.Interface, gateway: UpdateEntryGateway.Interface, eventPublisher: EventPublisher.Interface);
|
|
8
10
|
execute(params: IUpdateEntryParams): Promise<import("@webiny/app-headless-cms-common/types/index.js").CmsContentEntry<import("@webiny/app/types.js").GenericRecord>>;
|
|
9
11
|
}
|
|
10
12
|
export declare const UpdateEntryRepository: typeof UpdateEntryRepositoryImpl & {
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { UpdateEntryGateway, UpdateEntryRepository } from "./abstractions.js";
|
|
2
2
|
import { ContentEntriesCacheProvider } from "../abstractions.js";
|
|
3
|
+
import { EventPublisher } from "@webiny/app/features/eventPublisher/index.js";
|
|
4
|
+
import { EntryAfterUpdateEvent } from "../events/EntryAfterUpdateEvent.js";
|
|
3
5
|
class UpdateEntryRepositoryImpl {
|
|
4
|
-
constructor(cacheProvider, gateway){
|
|
6
|
+
constructor(cacheProvider, gateway, eventPublisher){
|
|
5
7
|
this.cacheProvider = cacheProvider;
|
|
6
8
|
this.gateway = gateway;
|
|
9
|
+
this.eventPublisher = eventPublisher;
|
|
7
10
|
}
|
|
8
11
|
async execute(params) {
|
|
9
12
|
const entry = await this.gateway.execute(params);
|
|
@@ -11,6 +14,10 @@ class UpdateEntryRepositoryImpl {
|
|
|
11
14
|
cache.addItems([
|
|
12
15
|
entry
|
|
13
16
|
]);
|
|
17
|
+
await this.eventPublisher.publish(new EntryAfterUpdateEvent({
|
|
18
|
+
entry,
|
|
19
|
+
model: params.model
|
|
20
|
+
}));
|
|
14
21
|
return entry;
|
|
15
22
|
}
|
|
16
23
|
}
|
|
@@ -18,7 +25,8 @@ const UpdateEntryRepository_UpdateEntryRepository = UpdateEntryRepository.create
|
|
|
18
25
|
implementation: UpdateEntryRepositoryImpl,
|
|
19
26
|
dependencies: [
|
|
20
27
|
ContentEntriesCacheProvider,
|
|
21
|
-
UpdateEntryGateway
|
|
28
|
+
UpdateEntryGateway,
|
|
29
|
+
EventPublisher
|
|
22
30
|
]
|
|
23
31
|
});
|
|
24
32
|
export { UpdateEntryRepository_UpdateEntryRepository as UpdateEntryRepository };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/contentEntry/updateEntry/UpdateEntryRepository.js","sources":["../../../../src/features/contentEntry/updateEntry/UpdateEntryRepository.ts"],"sourcesContent":["import {\n UpdateEntryRepository as RepositoryAbstraction,\n UpdateEntryGateway\n} from \"./abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"~/features/contentEntry/abstractions.js\";\nimport type { IUpdateEntryParams } from \"./abstractions.js\";\n\nclass UpdateEntryRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(\n private cacheProvider: ContentEntriesCacheProvider.Interface,\n private gateway: UpdateEntryGateway.Interface\n ) {}\n\n async execute(params: IUpdateEntryParams) {\n const entry = await this.gateway.execute(params);\n\n const cache = this.cacheProvider.get(params.model.modelId);\n cache.addItems([entry]);\n\n return entry;\n }\n}\n\nexport const UpdateEntryRepository = RepositoryAbstraction.createImplementation({\n implementation: UpdateEntryRepositoryImpl,\n dependencies: [ContentEntriesCacheProvider, UpdateEntryGateway]\n});\n"],"names":["UpdateEntryRepositoryImpl","cacheProvider","gateway","params","entry","cache","UpdateEntryRepository","RepositoryAbstraction","ContentEntriesCacheProvider","UpdateEntryGateway"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/contentEntry/updateEntry/UpdateEntryRepository.js","sources":["../../../../src/features/contentEntry/updateEntry/UpdateEntryRepository.ts"],"sourcesContent":["import {\n UpdateEntryRepository as RepositoryAbstraction,\n UpdateEntryGateway\n} from \"./abstractions.js\";\nimport { ContentEntriesCacheProvider } from \"~/features/contentEntry/abstractions.js\";\nimport type { IUpdateEntryParams } from \"./abstractions.js\";\nimport { EventPublisher } from \"@webiny/app/features/eventPublisher/index.js\";\nimport { EntryAfterUpdateEvent } from \"~/features/contentEntry/events/EntryAfterUpdateEvent.js\";\n\nclass UpdateEntryRepositoryImpl implements RepositoryAbstraction.Interface {\n constructor(\n private cacheProvider: ContentEntriesCacheProvider.Interface,\n private gateway: UpdateEntryGateway.Interface,\n private eventPublisher: EventPublisher.Interface\n ) {}\n\n async execute(params: IUpdateEntryParams) {\n const entry = await this.gateway.execute(params);\n\n const cache = this.cacheProvider.get(params.model.modelId);\n cache.addItems([entry]);\n\n await this.eventPublisher.publish(\n new EntryAfterUpdateEvent({ entry, model: params.model })\n );\n\n return entry;\n }\n}\n\nexport const UpdateEntryRepository = RepositoryAbstraction.createImplementation({\n implementation: UpdateEntryRepositoryImpl,\n dependencies: [ContentEntriesCacheProvider, UpdateEntryGateway, EventPublisher]\n});\n"],"names":["UpdateEntryRepositoryImpl","cacheProvider","gateway","eventPublisher","params","entry","cache","EntryAfterUpdateEvent","UpdateEntryRepository","RepositoryAbstraction","ContentEntriesCacheProvider","UpdateEntryGateway","EventPublisher"],"mappings":";;;;AASA,MAAMA;IACF,YACYC,aAAoD,EACpDC,OAAqC,EACrCC,cAAwC,CAClD;aAHUF,aAAa,GAAbA;aACAC,OAAO,GAAPA;aACAC,cAAc,GAAdA;IACT;IAEH,MAAM,QAAQC,MAA0B,EAAE;QACtC,MAAMC,QAAQ,MAAM,IAAI,CAAC,OAAO,CAAC,OAAO,CAACD;QAEzC,MAAME,QAAQ,IAAI,CAAC,aAAa,CAAC,GAAG,CAACF,OAAO,KAAK,CAAC,OAAO;QACzDE,MAAM,QAAQ,CAAC;YAACD;SAAM;QAEtB,MAAM,IAAI,CAAC,cAAc,CAAC,OAAO,CAC7B,IAAIE,sBAAsB;YAAEF;YAAO,OAAOD,OAAO,KAAK;QAAC;QAG3D,OAAOC;IACX;AACJ;AAEO,MAAMG,8CAAwBC,sBAAAA,oBAA0C,CAAC;IAC5E,gBAAgBT;IAChB,cAAc;QAACU;QAA6BC;QAAoBC;KAAe;AACnF"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ICmsFieldTypeMapper, ICmsFieldMapperContext } from "../abstractions.js";
|
|
2
|
+
import type { IFieldBuilderRegistry } from "@webiny/app-admin/features/formModel/abstractions.js";
|
|
3
|
+
import type { CmsModelField } from "../../../types.js";
|
|
4
|
+
declare module "@webiny/app-admin/features/formModel/abstractions.js" {
|
|
5
|
+
interface IFieldBuilderRegistry {
|
|
6
|
+
asset(): IFieldBuilder<"asset">;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
export declare class AssetFieldMapper implements ICmsFieldTypeMapper {
|
|
10
|
+
readonly type = "asset";
|
|
11
|
+
map(field: CmsModelField, registry: IFieldBuilderRegistry, context: ICmsFieldMapperContext): import("@webiny/app-admin/index.js").IFieldBuilder<string, false, unknown>;
|
|
12
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { applyFieldProps } from "./applyFieldProps.js";
|
|
2
|
+
class AssetFieldMapper {
|
|
3
|
+
map(field, registry, context) {
|
|
4
|
+
const builder = registry.asset();
|
|
5
|
+
return applyFieldProps(builder, field, context.rendererMap);
|
|
6
|
+
}
|
|
7
|
+
constructor(){
|
|
8
|
+
this.type = "asset";
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
export { AssetFieldMapper };
|
|
12
|
+
|
|
13
|
+
//# sourceMappingURL=AssetFieldMapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"features/formModel/mappers/AssetFieldMapper.js","sources":["../../../../src/features/formModel/mappers/AssetFieldMapper.ts"],"sourcesContent":["import type { ICmsFieldTypeMapper, ICmsFieldMapperContext } from \"../abstractions.js\";\nimport type { IFieldBuilderRegistry } from \"@webiny/app-admin/features/formModel/abstractions.js\";\nimport type { CmsModelField } from \"~/types.js\";\nimport { applyFieldProps } from \"./applyFieldProps.js\";\n\ndeclare module \"@webiny/app-admin/features/formModel/abstractions.js\" {\n interface IFieldBuilderRegistry {\n asset(): IFieldBuilder<\"asset\">;\n }\n}\n\nexport class AssetFieldMapper implements ICmsFieldTypeMapper {\n readonly type = \"asset\";\n\n map(field: CmsModelField, registry: IFieldBuilderRegistry, context: ICmsFieldMapperContext) {\n const builder = registry.asset();\n return applyFieldProps(builder, field, context.rendererMap);\n }\n}\n"],"names":["AssetFieldMapper","field","registry","context","builder","applyFieldProps"],"mappings":";AAWO,MAAMA;IAGT,IAAIC,KAAoB,EAAEC,QAA+B,EAAEC,OAA+B,EAAE;QACxF,MAAMC,UAAUF,SAAS,KAAK;QAC9B,OAAOG,gBAAgBD,SAASH,OAAOE,QAAQ,WAAW;IAC9D;;aALS,IAAI,GAAG;;AAMpB"}
|
|
@@ -3,6 +3,7 @@ import { NumberFieldMapper } from "./NumberFieldMapper.js";
|
|
|
3
3
|
import { BooleanFieldMapper } from "./BooleanFieldMapper.js";
|
|
4
4
|
import { DateTimeFieldMapper } from "./DateTimeFieldMapper.js";
|
|
5
5
|
import { FileFieldMapper } from "./FileFieldMapper.js";
|
|
6
|
+
import { AssetFieldMapper } from "./AssetFieldMapper.js";
|
|
6
7
|
import { RichTextFieldMapper } from "./RichTextFieldMapper.js";
|
|
7
8
|
import { ObjectFieldMapper } from "./ObjectFieldMapper.js";
|
|
8
9
|
import { DynamicZoneFieldMapper } from "./DynamicZoneFieldMapper.js";
|
|
@@ -16,6 +17,7 @@ function createBuiltInMappers() {
|
|
|
16
17
|
new BooleanFieldMapper(),
|
|
17
18
|
new DateTimeFieldMapper(),
|
|
18
19
|
new FileFieldMapper(),
|
|
20
|
+
new AssetFieldMapper(),
|
|
19
21
|
new RichTextFieldMapper(),
|
|
20
22
|
new ObjectFieldMapper(),
|
|
21
23
|
new DynamicZoneFieldMapper(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"features/formModel/mappers/index.js","sources":["../../../../src/features/formModel/mappers/index.ts"],"sourcesContent":["import type { ICmsFieldTypeMapper } from \"../abstractions.js\";\nimport { TextFieldMapper, LongTextFieldMapper, JsonFieldMapper } from \"./TextFieldMapper.js\";\nimport { NumberFieldMapper } from \"./NumberFieldMapper.js\";\nimport { BooleanFieldMapper } from \"./BooleanFieldMapper.js\";\nimport { DateTimeFieldMapper } from \"./DateTimeFieldMapper.js\";\nimport { FileFieldMapper } from \"./FileFieldMapper.js\";\nimport { RichTextFieldMapper } from \"./RichTextFieldMapper.js\";\nimport { ObjectFieldMapper } from \"./ObjectFieldMapper.js\";\nimport { DynamicZoneFieldMapper } from \"./DynamicZoneFieldMapper.js\";\nimport { RefFieldMapper } from \"./RefFieldMapper.js\";\n\nexport function createBuiltInMappers(): ICmsFieldTypeMapper[] {\n return [\n new TextFieldMapper(),\n new LongTextFieldMapper(),\n new JsonFieldMapper(),\n new NumberFieldMapper(),\n new BooleanFieldMapper(),\n new DateTimeFieldMapper(),\n new FileFieldMapper(),\n new RichTextFieldMapper(),\n new ObjectFieldMapper(),\n new DynamicZoneFieldMapper(),\n new RefFieldMapper()\n ];\n}\n"],"names":["createBuiltInMappers","TextFieldMapper","LongTextFieldMapper","JsonFieldMapper","NumberFieldMapper","BooleanFieldMapper","DateTimeFieldMapper","FileFieldMapper","RichTextFieldMapper","ObjectFieldMapper","DynamicZoneFieldMapper","RefFieldMapper"],"mappings":"
|
|
1
|
+
{"version":3,"file":"features/formModel/mappers/index.js","sources":["../../../../src/features/formModel/mappers/index.ts"],"sourcesContent":["import type { ICmsFieldTypeMapper } from \"../abstractions.js\";\nimport { TextFieldMapper, LongTextFieldMapper, JsonFieldMapper } from \"./TextFieldMapper.js\";\nimport { NumberFieldMapper } from \"./NumberFieldMapper.js\";\nimport { BooleanFieldMapper } from \"./BooleanFieldMapper.js\";\nimport { DateTimeFieldMapper } from \"./DateTimeFieldMapper.js\";\nimport { FileFieldMapper } from \"./FileFieldMapper.js\";\nimport { AssetFieldMapper } from \"./AssetFieldMapper.js\";\nimport { RichTextFieldMapper } from \"./RichTextFieldMapper.js\";\nimport { ObjectFieldMapper } from \"./ObjectFieldMapper.js\";\nimport { DynamicZoneFieldMapper } from \"./DynamicZoneFieldMapper.js\";\nimport { RefFieldMapper } from \"./RefFieldMapper.js\";\n\nexport function createBuiltInMappers(): ICmsFieldTypeMapper[] {\n return [\n new TextFieldMapper(),\n new LongTextFieldMapper(),\n new JsonFieldMapper(),\n new NumberFieldMapper(),\n new BooleanFieldMapper(),\n new DateTimeFieldMapper(),\n new FileFieldMapper(),\n new AssetFieldMapper(),\n new RichTextFieldMapper(),\n new ObjectFieldMapper(),\n new DynamicZoneFieldMapper(),\n new RefFieldMapper()\n ];\n}\n"],"names":["createBuiltInMappers","TextFieldMapper","LongTextFieldMapper","JsonFieldMapper","NumberFieldMapper","BooleanFieldMapper","DateTimeFieldMapper","FileFieldMapper","AssetFieldMapper","RichTextFieldMapper","ObjectFieldMapper","DynamicZoneFieldMapper","RefFieldMapper"],"mappings":";;;;;;;;;;AAYO,SAASA;IACZ,OAAO;QACH,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;QACJ,IAAIC;KACP;AACL"}
|