@websolutespa/payload-plugin-bowl 2.0.1 → 3.0.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/CHANGELOG.md +23 -4
- package/README.md +1 -1
- package/dist/blocks/MenuItem.js +219 -0
- package/dist/blocks/MenuItem.js.map +1 -0
- package/dist/blocks/index.js +4 -0
- package/dist/blocks/index.js.map +1 -0
- package/dist/blocks/withComponentBlock.js +31 -0
- package/dist/blocks/withComponentBlock.js.map +1 -0
- package/dist/bowl.js +331 -0
- package/dist/bowl.js.map +1 -0
- package/dist/collections/Address.js +7 -0
- package/dist/collections/Address.js.map +1 -0
- package/dist/collections/Category.js +94 -0
- package/dist/collections/Category.js.map +1 -0
- package/dist/collections/ConsentPreference.js +34 -0
- package/dist/collections/ConsentPreference.js.map +1 -0
- package/dist/collections/Continent.js +24 -0
- package/dist/collections/Continent.js.map +1 -0
- package/dist/collections/Country.js +66 -0
- package/dist/collections/Country.js.map +1 -0
- package/dist/collections/CountryZone.js +24 -0
- package/dist/collections/CountryZone.js.map +1 -0
- package/dist/collections/EmailConfig.js +84 -0
- package/dist/collections/EmailConfig.js.map +1 -0
- package/dist/collections/EndUsers.js +24 -0
- package/dist/collections/EndUsers.js.map +1 -0
- package/dist/collections/Label.js +26 -0
- package/dist/collections/Label.js.map +1 -0
- package/dist/collections/Language.js +35 -0
- package/dist/collections/Language.js.map +1 -0
- package/dist/collections/LegalNotice.js +29 -0
- package/dist/collections/LegalNotice.js.map +1 -0
- package/dist/collections/Market.js +106 -0
- package/dist/collections/Market.js.map +1 -0
- package/dist/collections/Media.js +40 -0
- package/dist/collections/Media.js.map +1 -0
- package/dist/collections/Menu.js +49 -0
- package/dist/collections/Menu.js.map +1 -0
- package/dist/collections/Municipality.js +68 -0
- package/dist/collections/Municipality.js.map +1 -0
- package/dist/collections/Province.js +59 -0
- package/dist/collections/Province.js.map +1 -0
- package/dist/collections/Redirect.js +90 -0
- package/dist/collections/Redirect.js.map +1 -0
- package/dist/collections/Region.js +45 -0
- package/dist/collections/Region.js.map +1 -0
- package/dist/collections/SubContinent.js +36 -0
- package/dist/collections/SubContinent.js.map +1 -0
- package/dist/collections/Template.js +79 -0
- package/dist/collections/Template.js.map +1 -0
- package/dist/collections/Users.js +11 -0
- package/dist/collections/Users.js.map +1 -0
- package/dist/components/Category/CategoryMenu.js +47 -0
- package/dist/components/Category/CategoryMenu.js.map +1 -0
- package/dist/components/Category/CategoryTree.js +430 -0
- package/dist/components/Category/CategoryTree.js.map +1 -0
- package/dist/components/Category/CategoryTree.scss +330 -0
- package/dist/components/Category/CategoryTreeRoute.js +51 -0
- package/dist/components/Category/CategoryTreeRoute.js.map +1 -0
- package/dist/components/Category/category.service.js +32 -0
- package/dist/components/Category/category.service.js.map +1 -0
- package/dist/components/DataTree/DataTree.js +281 -0
- package/dist/components/DataTree/DataTree.js.map +1 -0
- package/dist/components/DataTree/DataTree.scss +363 -0
- package/dist/components/DataTree/DataTreeProvider.js +67 -0
- package/dist/components/DataTree/DataTreeProvider.js.map +1 -0
- package/dist/components/DataTree/EventEmitter.js +38 -0
- package/dist/components/DataTree/EventEmitter.js.map +1 -0
- package/dist/components/DataTree/useDataTree.js +52 -0
- package/dist/components/DataTree/useDataTree.js.map +1 -0
- package/dist/components/DecoratedList/DecoratedList.js +17 -0
- package/dist/components/DecoratedList/DecoratedList.js.map +1 -0
- package/dist/components/IconServer/IconServer.js +15 -0
- package/dist/components/IconServer/IconServer.js.map +1 -0
- package/dist/components/IconServer/IconServer.scss +14 -0
- package/dist/components/ImportExport/ImportExportList.js +91 -0
- package/dist/components/ImportExport/ImportExportList.js.map +1 -0
- package/dist/components/ImportExport/ImportExportList.scss +70 -0
- package/dist/components/ImportExport/ImportExportRedirect.js +142 -0
- package/dist/components/ImportExport/ImportExportRedirect.js.map +1 -0
- package/dist/components/ImportExport/ImportModal.js +458 -0
- package/dist/components/ImportExport/ImportModal.js.map +1 -0
- package/dist/components/ImportExport/ImportModal.scss +99 -0
- package/dist/components/ImportExport/types.js +3 -0
- package/dist/components/ImportExport/types.js.map +1 -0
- package/dist/components/LeaveWithoutSaving/LeaveWithoutSaving.js +83 -0
- package/dist/components/LeaveWithoutSaving/LeaveWithoutSaving.js.map +1 -0
- package/dist/components/LeaveWithoutSaving/LeaveWithoutSaving.scss +46 -0
- package/dist/components/LeaveWithoutSaving/usePreventLeave.js +119 -0
- package/dist/components/LeaveWithoutSaving/usePreventLeave.js.map +1 -0
- package/dist/components/LocalizedDescription/LocalizedDescriptionClient.js +15 -0
- package/dist/components/LocalizedDescription/LocalizedDescriptionClient.js.map +1 -0
- package/dist/components/LocalizedDescription/LocalizedDescriptionServer.js +13 -0
- package/dist/components/LocalizedDescription/LocalizedDescriptionServer.js.map +1 -0
- package/dist/components/LogoServer/LogoServer.js +20 -0
- package/dist/components/LogoServer/LogoServer.js.map +1 -0
- package/dist/components/LogoServer/LogoServer.scss +21 -0
- package/dist/core/access/access.js +181 -0
- package/dist/core/access/access.js.map +1 -0
- package/dist/core/access/access.test.js +454 -0
- package/dist/core/access/access.test.js.map +1 -0
- package/dist/core/access/index.js +3 -0
- package/dist/core/access/index.js.map +1 -0
- package/dist/core/api/action.service.js +441 -0
- package/dist/core/api/action.service.js.map +1 -0
- package/dist/core/api/action.service.test.js +218 -0
- package/dist/core/api/action.service.test.js.map +1 -0
- package/dist/core/api/cache.service.js +33 -0
- package/dist/core/api/cache.service.js.map +1 -0
- package/dist/core/api/cache.service.test.js +33 -0
- package/dist/core/api/cache.service.test.js.map +1 -0
- package/dist/core/api/category.service.js +53 -0
- package/dist/core/api/category.service.js.map +1 -0
- package/dist/core/api/collection.service.js +457 -0
- package/dist/core/api/collection.service.js.map +1 -0
- package/dist/core/api/collection.service.test.js +318 -0
- package/dist/core/api/collection.service.test.js.map +1 -0
- package/dist/core/api/email.service.js +84 -0
- package/dist/core/api/email.service.js.map +1 -0
- package/dist/core/api/global.service.js +18 -0
- package/dist/core/api/global.service.js.map +1 -0
- package/dist/core/api/health.service.js +12 -0
- package/dist/core/api/health.service.js.map +1 -0
- package/dist/core/api/index.js +16 -0
- package/dist/core/api/index.js.map +1 -0
- package/dist/core/api/locale.service.js +58 -0
- package/dist/core/api/locale.service.js.map +1 -0
- package/dist/core/api/locale.service.test.js +46 -0
- package/dist/core/api/locale.service.test.js.map +1 -0
- package/dist/core/api/menu.service.js +81 -0
- package/dist/core/api/menu.service.js.map +1 -0
- package/dist/core/api/menu.service.test.js +300 -0
- package/dist/core/api/menu.service.test.js.map +1 -0
- package/dist/core/api/page.service.js +171 -0
- package/dist/core/api/page.service.js.map +1 -0
- package/dist/core/api/page.service.test.js +68 -0
- package/dist/core/api/page.service.test.js.map +1 -0
- package/dist/core/api/pagination.service.js +29 -0
- package/dist/core/api/pagination.service.js.map +1 -0
- package/dist/core/api/pagination.service.test.js +175 -0
- package/dist/core/api/pagination.service.test.js.map +1 -0
- package/dist/core/api/redirect.service.js +106 -0
- package/dist/core/api/redirect.service.js.map +1 -0
- package/dist/core/api/redirect.service.test.js +106 -0
- package/dist/core/api/redirect.service.test.js.map +1 -0
- package/dist/core/api/route.service.js +451 -0
- package/dist/core/api/route.service.js.map +1 -0
- package/dist/core/api/route.service.test.js +214 -0
- package/dist/core/api/route.service.test.js.map +1 -0
- package/dist/core/api/static.service.js +249 -0
- package/dist/core/api/static.service.js.map +1 -0
- package/dist/core/api/static.service.test.js +240 -0
- package/dist/core/api/static.service.test.js.map +1 -0
- package/dist/core/api/store.service.js +336 -0
- package/dist/core/api/store.service.js.map +1 -0
- package/dist/core/api/store.service.test.js +105 -0
- package/dist/core/api/store.service.test.js.map +1 -0
- package/dist/core/api/types.js +21 -0
- package/dist/core/api/types.js.map +1 -0
- package/dist/core/api/utils.js +83 -0
- package/dist/core/api/utils.js.map +1 -0
- package/dist/core/api/where.service.js +231 -0
- package/dist/core/api/where.service.js.map +1 -0
- package/dist/core/collections/index.js +12 -0
- package/dist/core/collections/index.js.map +1 -0
- package/dist/core/collections/withAction.js +91 -0
- package/dist/core/collections/withAction.js.map +1 -0
- package/dist/core/collections/withAction.test.js +68 -0
- package/dist/core/collections/withAction.test.js.map +1 -0
- package/dist/core/collections/withAddress.js +122 -0
- package/dist/core/collections/withAddress.js.map +1 -0
- package/dist/core/collections/withBlock.js +17 -0
- package/dist/core/collections/withBlock.js.map +1 -0
- package/dist/core/collections/withBlock.test.js +68 -0
- package/dist/core/collections/withBlock.test.js.map +1 -0
- package/dist/core/collections/withCollection.js +61 -0
- package/dist/core/collections/withCollection.js.map +1 -0
- package/dist/core/collections/withCollection.test.js +64 -0
- package/dist/core/collections/withCollection.test.js.map +1 -0
- package/dist/core/collections/withEndUser.js +301 -0
- package/dist/core/collections/withEndUser.js.map +1 -0
- package/dist/core/collections/withGlobal.js +27 -0
- package/dist/core/collections/withGlobal.js.map +1 -0
- package/dist/core/collections/withGlobal.test.js +57 -0
- package/dist/core/collections/withGlobal.test.js.map +1 -0
- package/dist/core/collections/withMenu.js +19 -0
- package/dist/core/collections/withMenu.js.map +1 -0
- package/dist/core/collections/withMenu.test.js +63 -0
- package/dist/core/collections/withMenu.test.js.map +1 -0
- package/dist/core/collections/withPage.js +126 -0
- package/dist/core/collections/withPage.js.map +1 -0
- package/dist/core/collections/withPage.test.js +103 -0
- package/dist/core/collections/withPage.test.js.map +1 -0
- package/dist/core/collections/withStaticCollection.js +60 -0
- package/dist/core/collections/withStaticCollection.js.map +1 -0
- package/dist/core/collections/withStaticCollection.test.js +84 -0
- package/dist/core/collections/withStaticCollection.test.js.map +1 -0
- package/dist/core/collections/withUser.js +56 -0
- package/dist/core/collections/withUser.js.map +1 -0
- package/dist/core/decorators/category.js +28 -0
- package/dist/core/decorators/category.js.map +1 -0
- package/dist/core/decorators/components.js +9 -0
- package/dist/core/decorators/components.js.map +1 -0
- package/dist/core/decorators/href.js +25 -0
- package/dist/core/decorators/href.js.map +1 -0
- package/dist/core/decorators/index.js +11 -0
- package/dist/core/decorators/index.js.map +1 -0
- package/dist/core/decorators/localize.js +27 -0
- package/dist/core/decorators/localize.js.map +1 -0
- package/dist/core/decorators/menu.js +246 -0
- package/dist/core/decorators/menu.js.map +1 -0
- package/dist/core/decorators/nav.js +42 -0
- package/dist/core/decorators/nav.js.map +1 -0
- package/dist/core/decorators/rich-text.js +39 -0
- package/dist/core/decorators/rich-text.js.map +1 -0
- package/dist/core/decorators/schema.js +16 -0
- package/dist/core/decorators/schema.js.map +1 -0
- package/dist/core/decorators/upload.js +44 -0
- package/dist/core/decorators/upload.js.map +1 -0
- package/dist/core/encryption/encryption.js +66 -0
- package/dist/core/encryption/encryption.js.map +1 -0
- package/dist/core/encryption/index.js +3 -0
- package/dist/core/encryption/index.js.map +1 -0
- package/dist/core/fields/index.js +28 -0
- package/dist/core/fields/index.js.map +1 -0
- package/dist/core/fields/withAbstract.js +15 -0
- package/dist/core/fields/withAbstract.js.map +1 -0
- package/dist/core/fields/withAbstract.test.js +72 -0
- package/dist/core/fields/withAbstract.test.js.map +1 -0
- package/dist/core/fields/withAnchor.js +56 -0
- package/dist/core/fields/withAnchor.js.map +1 -0
- package/dist/core/fields/withCategory.js +21 -0
- package/dist/core/fields/withCategory.js.map +1 -0
- package/dist/core/fields/withCategory.test.js +63 -0
- package/dist/core/fields/withCategory.test.js.map +1 -0
- package/dist/core/fields/withCheckbox.js +19 -0
- package/dist/core/fields/withCheckbox.js.map +1 -0
- package/dist/core/fields/withCheckbox.test.js +59 -0
- package/dist/core/fields/withCheckbox.test.js.map +1 -0
- package/dist/core/fields/withComponents.js +17 -0
- package/dist/core/fields/withComponents.js.map +1 -0
- package/dist/core/fields/withComponents.test.js +62 -0
- package/dist/core/fields/withComponents.test.js.map +1 -0
- package/dist/core/fields/withDate.js +18 -0
- package/dist/core/fields/withDate.js.map +1 -0
- package/dist/core/fields/withDate.test.js +56 -0
- package/dist/core/fields/withDate.test.js.map +1 -0
- package/dist/core/fields/withDescription.js +15 -0
- package/dist/core/fields/withDescription.js.map +1 -0
- package/dist/core/fields/withDescription.test.js +72 -0
- package/dist/core/fields/withDescription.test.js.map +1 -0
- package/dist/core/fields/withId.js +19 -0
- package/dist/core/fields/withId.js.map +1 -0
- package/dist/core/fields/withId.test.js +61 -0
- package/dist/core/fields/withId.test.js.map +1 -0
- package/dist/core/fields/withIsActive.js +15 -0
- package/dist/core/fields/withIsActive.js.map +1 -0
- package/dist/core/fields/withIsActive.test.js +59 -0
- package/dist/core/fields/withIsActive.test.js.map +1 -0
- package/dist/core/fields/withIsDefault.js +15 -0
- package/dist/core/fields/withIsDefault.js.map +1 -0
- package/dist/core/fields/withIsDefault.test.js +59 -0
- package/dist/core/fields/withIsDefault.test.js.map +1 -0
- package/dist/core/fields/withLink.js +116 -0
- package/dist/core/fields/withLink.js.map +1 -0
- package/dist/core/fields/withLink.test.js +144 -0
- package/dist/core/fields/withLink.test.js.map +1 -0
- package/dist/core/fields/withMarkets.js +21 -0
- package/dist/core/fields/withMarkets.js.map +1 -0
- package/dist/core/fields/withMarkets.test.js +65 -0
- package/dist/core/fields/withMarkets.test.js.map +1 -0
- package/dist/core/fields/withMedia.js +20 -0
- package/dist/core/fields/withMedia.js.map +1 -0
- package/dist/core/fields/withMedia.test.js +41 -0
- package/dist/core/fields/withMedia.test.js.map +1 -0
- package/dist/core/fields/withMedias.js +25 -0
- package/dist/core/fields/withMedias.js.map +1 -0
- package/dist/core/fields/withMedias.test.js +46 -0
- package/dist/core/fields/withMedias.test.js.map +1 -0
- package/dist/core/fields/withName.js +17 -0
- package/dist/core/fields/withName.js.map +1 -0
- package/dist/core/fields/withName.test.js +59 -0
- package/dist/core/fields/withName.test.js.map +1 -0
- package/dist/core/fields/withNav.js +28 -0
- package/dist/core/fields/withNav.js.map +1 -0
- package/dist/core/fields/withNavs.js +53 -0
- package/dist/core/fields/withNavs.js.map +1 -0
- package/dist/core/fields/withOrder.js +80 -0
- package/dist/core/fields/withOrder.js.map +1 -0
- package/dist/core/fields/withOrder.test.js +56 -0
- package/dist/core/fields/withOrder.test.js.map +1 -0
- package/dist/core/fields/withRelated.js +18 -0
- package/dist/core/fields/withRelated.js.map +1 -0
- package/dist/core/fields/withRelated.test.js +62 -0
- package/dist/core/fields/withRelated.test.js.map +1 -0
- package/dist/core/fields/withRichText.js +68 -0
- package/dist/core/fields/withRichText.js.map +1 -0
- package/dist/core/fields/withRichText.test.js +72 -0
- package/dist/core/fields/withRichText.test.js.map +1 -0
- package/dist/core/fields/withRoles.js +27 -0
- package/dist/core/fields/withRoles.js.map +1 -0
- package/dist/core/fields/withRoles.test.js +49 -0
- package/dist/core/fields/withRoles.test.js.map +1 -0
- package/dist/core/fields/withSelect.js +23 -0
- package/dist/core/fields/withSelect.js.map +1 -0
- package/dist/core/fields/withSelect.test.js +59 -0
- package/dist/core/fields/withSelect.test.js.map +1 -0
- package/dist/core/fields/withSeoWeight.js +19 -0
- package/dist/core/fields/withSeoWeight.js.map +1 -0
- package/dist/core/fields/withSlug.js +33 -0
- package/dist/core/fields/withSlug.js.map +1 -0
- package/dist/core/fields/withSlug.test.js +71 -0
- package/dist/core/fields/withSlug.test.js.map +1 -0
- package/dist/core/fields/withTemplate.js +49 -0
- package/dist/core/fields/withTemplate.js.map +1 -0
- package/dist/core/fields/withTemplate.test.js +93 -0
- package/dist/core/fields/withTemplate.test.js.map +1 -0
- package/dist/core/fields/withTenants.js +21 -0
- package/dist/core/fields/withTenants.js.map +1 -0
- package/dist/core/fields/withTenants.test.js +42 -0
- package/dist/core/fields/withTenants.test.js.map +1 -0
- package/dist/core/fields/withText.js +18 -0
- package/dist/core/fields/withText.js.map +1 -0
- package/dist/core/fields/withText.test.js +56 -0
- package/dist/core/fields/withText.test.js.map +1 -0
- package/dist/core/fields/withTitle.js +17 -0
- package/dist/core/fields/withTitle.js.map +1 -0
- package/dist/core/fields/withTitle.test.js +58 -0
- package/dist/core/fields/withTitle.test.js.map +1 -0
- package/dist/core/index.js +11 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/logger/index.js +3 -0
- package/dist/core/logger/index.js.map +1 -0
- package/dist/core/logger/logger.js +9 -0
- package/dist/core/logger/logger.js.map +1 -0
- package/dist/core/translations/index.js +3 -0
- package/dist/core/translations/index.js.map +1 -0
- package/dist/core/translations/translations.js +137 -0
- package/dist/core/translations/translations.js.map +1 -0
- package/dist/core/translations/translations.test.js +72 -0
- package/dist/core/translations/translations.test.js.map +1 -0
- package/dist/core/utils/findByIDHandler.js +28 -0
- package/dist/core/utils/findByIDHandler.js.map +1 -0
- package/dist/core/utils/findHandler.js +31 -0
- package/dist/core/utils/findHandler.js.map +1 -0
- package/dist/core/utils/getPreviewURL.js +45 -0
- package/dist/core/utils/getPreviewURL.js.map +1 -0
- package/dist/core/utils/getRequestCollection.js +49 -0
- package/dist/core/utils/getRequestCollection.js.map +1 -0
- package/dist/core/utils/index.js +7 -0
- package/dist/core/utils/index.js.map +1 -0
- package/dist/core/utils/mergeCollections.js +18 -0
- package/dist/core/utils/mergeCollections.js.map +1 -0
- package/dist/core/utils/mergeFields.js +20 -0
- package/dist/core/utils/mergeFields.js.map +1 -0
- package/dist/core/utils/mergeGlobals.js +17 -0
- package/dist/core/utils/mergeGlobals.js.map +1 -0
- package/dist/core/utils/richText.js +29 -0
- package/dist/core/utils/richText.js.map +1 -0
- package/dist/core/utils/sortByGroup.js +36 -0
- package/dist/core/utils/sortByGroup.js.map +1 -0
- package/dist/debug.js +25 -0
- package/dist/debug.js.map +1 -0
- package/dist/declaration.d.js +3 -0
- package/dist/declaration.d.js.map +1 -0
- package/dist/exports/client.d.ts +36 -0
- package/dist/exports/client.d.ts.map +1 -0
- package/dist/exports/client.js +8 -0
- package/dist/exports/client.js.map +1 -0
- package/dist/exports/rsc.d.ts +18 -0
- package/dist/exports/rsc.d.ts.map +1 -0
- package/dist/exports/rsc.js +5 -0
- package/dist/exports/rsc.js.map +1 -0
- package/dist/fields/color-picker/ColorCell.js +19 -0
- package/dist/fields/color-picker/ColorCell.js.map +1 -0
- package/dist/fields/color-picker/ColorField.js +131 -0
- package/dist/fields/color-picker/ColorField.js.map +1 -0
- package/dist/fields/color-picker/index.js +26 -0
- package/dist/fields/color-picker/index.js.map +1 -0
- package/dist/fields/color-picker/styles.scss +113 -0
- package/dist/fields/color-picker/utils.js +6 -0
- package/dist/fields/color-picker/utils.js.map +1 -0
- package/dist/fields/index.js +3 -0
- package/dist/fields/index.js.map +1 -0
- package/dist/globals/App.js +97 -0
- package/dist/globals/App.js.map +1 -0
- package/dist/globals/Locale.js +82 -0
- package/dist/globals/Locale.js.map +1 -0
- package/dist/globals/LocaleRowLabel.js +16 -0
- package/dist/globals/LocaleRowLabel.js.map +1 -0
- package/dist/index.d.ts +891 -844
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +11 -9263
- package/dist/index.js.map +1 -0
- package/dist/mapper.js +199 -0
- package/dist/mapper.js.map +1 -0
- package/dist/options.js +76 -0
- package/dist/options.js.map +1 -0
- package/dist/test/blocks/blocks.js +13 -0
- package/dist/test/blocks/blocks.js.map +1 -0
- package/dist/test/collections/ActionCollection.js +12 -0
- package/dist/test/collections/ActionCollection.js.map +1 -0
- package/dist/test/collections/AdminCollection.js +18 -0
- package/dist/test/collections/AdminCollection.js.map +1 -0
- package/dist/test/collections/BlockCollection.js +16 -0
- package/dist/test/collections/BlockCollection.js.map +1 -0
- package/dist/test/collections/Collection.js +12 -0
- package/dist/test/collections/Collection.js.map +1 -0
- package/dist/test/collections/FieldCollection.js +84 -0
- package/dist/test/collections/FieldCollection.js.map +1 -0
- package/dist/test/collections/GlobalCollection.js +12 -0
- package/dist/test/collections/GlobalCollection.js.map +1 -0
- package/dist/test/collections/LinkCollection.js +12 -0
- package/dist/test/collections/LinkCollection.js.map +1 -0
- package/dist/test/collections/MenuCollection.js +12 -0
- package/dist/test/collections/MenuCollection.js.map +1 -0
- package/dist/test/collections/PageCollection.js +12 -0
- package/dist/test/collections/PageCollection.js.map +1 -0
- package/dist/test/collections/RoleCollection.js +19 -0
- package/dist/test/collections/RoleCollection.js.map +1 -0
- package/dist/test/collections/RoleFieldCollection.js +40 -0
- package/dist/test/collections/RoleFieldCollection.js.map +1 -0
- package/dist/test/collections/StaticCollection.js +56 -0
- package/dist/test/collections/StaticCollection.js.map +1 -0
- package/dist/test/collections/StorePageCollection.js +12 -0
- package/dist/test/collections/StorePageCollection.js.map +1 -0
- package/dist/test/collections/TenantCollection.js +22 -0
- package/dist/test/collections/TenantCollection.js.map +1 -0
- package/dist/test/collections/TranslationCollection.js +16 -0
- package/dist/test/collections/TranslationCollection.js.map +1 -0
- package/dist/test/collections/TypeACollection.js +18 -0
- package/dist/test/collections/TypeACollection.js.map +1 -0
- package/dist/test/collections/TypeBCollection.js +18 -0
- package/dist/test/collections/TypeBCollection.js.map +1 -0
- package/dist/test/collections/actions/NewsletterAction.js +29 -0
- package/dist/test/collections/actions/NewsletterAction.js.map +1 -0
- package/dist/test/collections/actions/RegisterAction.js +44 -0
- package/dist/test/collections/actions/RegisterAction.js.map +1 -0
- package/dist/test/collections/users/EndUsers.js +40 -0
- package/dist/test/collections/users/EndUsers.js.map +1 -0
- package/dist/test/collections/users/Users.js +20 -0
- package/dist/test/collections/users/Users.js.map +1 -0
- package/dist/test/index.js +32 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/payload.config.js +106 -0
- package/dist/test/payload.config.js.map +1 -0
- package/dist/test/utils.js +52 -0
- package/dist/test/utils.js.map +1 -0
- package/dist/translations.js +467 -0
- package/dist/translations.js.map +1 -0
- package/dist/types.js +31 -0
- package/dist/types.js.map +1 -0
- package/package.json +119 -37
- package/scss/styles.scss +0 -1
- package/dist/index.css +0 -796
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/index.ts"],"sourcesContent":["export * from './blocks';\r\nexport * from './bowl';\r\nexport * from './core';\r\nexport * from './fields';\r\nexport * from './mapper';\r\nexport * from './options';\r\nexport * from './types';\r\n\r\nimport { bowl } from './bowl';\r\nexport default bowl;\r\n"],"names":["bowl"],"mappings":"AAAA,cAAc,WAAW;AACzB,cAAc,SAAS;AACvB,cAAc,SAAS;AACvB,cAAc,WAAW;AACzB,cAAc,WAAW;AACzB,cAAc,YAAY;AAC1B,cAAc,UAAU;AAExB,SAASA,IAAI,QAAQ,SAAS;AAC9B,eAAeA,KAAK"}
|
package/dist/mapper.js
ADDED
|
@@ -0,0 +1,199 @@
|
|
|
1
|
+
import { withAction, withAddress, withBlock, withCollection, withEndUser, withGlobal, withMenu, withPage, withStaticCollection, withUser } from './core/collections';
|
|
2
|
+
import { withAbstract, withCategory, withCheckbox, withComponents, withDate, withDescription, withId, withIsActive, withIsDefault, withLink, withMarkets, withMedia, withMedias, withName, withNav, withOrder, withRelated, withRichText, withRoles, withSlug, withTemplate, withText, withTitle } from './core/fields';
|
|
3
|
+
import { withAnchor } from './core/fields/withAnchor';
|
|
4
|
+
import { withNavs } from './core/fields/withNavs';
|
|
5
|
+
import { withSelect } from './core/fields/withSelect';
|
|
6
|
+
import { withSeoWeight } from './core/fields/withSeoWeight';
|
|
7
|
+
import { withTenants } from './core/fields/withTenants';
|
|
8
|
+
import { withColor } from './fields';
|
|
9
|
+
export function toCollection(collection) {
|
|
10
|
+
collection = {
|
|
11
|
+
...collection
|
|
12
|
+
};
|
|
13
|
+
delete collection.views;
|
|
14
|
+
const type = collection.type;
|
|
15
|
+
if (!collection.fields) {
|
|
16
|
+
console.log('collection', collection);
|
|
17
|
+
}
|
|
18
|
+
const fields = (collection.fields || []).map((x)=>toField(x));
|
|
19
|
+
delete collection.type;
|
|
20
|
+
delete collection.fields;
|
|
21
|
+
const item = {
|
|
22
|
+
...collection,
|
|
23
|
+
fields
|
|
24
|
+
};
|
|
25
|
+
switch(type){
|
|
26
|
+
case 'withPage':
|
|
27
|
+
return withPage(item); // as WithPageProps
|
|
28
|
+
case 'withCollection':
|
|
29
|
+
return withCollection(item);
|
|
30
|
+
case 'withStatic':
|
|
31
|
+
return withStaticCollection(item);
|
|
32
|
+
case 'withMenu':
|
|
33
|
+
return withMenu(item);
|
|
34
|
+
case 'withAction':
|
|
35
|
+
return withAction(item);
|
|
36
|
+
case 'withUser':
|
|
37
|
+
return withUser(item);
|
|
38
|
+
case 'withEndUser':
|
|
39
|
+
return withEndUser(item);
|
|
40
|
+
case 'withAddress':
|
|
41
|
+
return withAddress(item);
|
|
42
|
+
default:
|
|
43
|
+
return item;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
export function toGlobal(collection) {
|
|
47
|
+
collection = {
|
|
48
|
+
...collection
|
|
49
|
+
};
|
|
50
|
+
delete collection.views;
|
|
51
|
+
const type = collection.type;
|
|
52
|
+
const fields = collection.fields.map((x)=>toField(x));
|
|
53
|
+
delete collection.type;
|
|
54
|
+
delete collection.fields;
|
|
55
|
+
const item = {
|
|
56
|
+
...collection,
|
|
57
|
+
fields
|
|
58
|
+
};
|
|
59
|
+
switch(type){
|
|
60
|
+
case 'withGlobal':
|
|
61
|
+
return withGlobal(item);
|
|
62
|
+
default:
|
|
63
|
+
return item;
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
export function toField(item) {
|
|
67
|
+
item = {
|
|
68
|
+
...item
|
|
69
|
+
};
|
|
70
|
+
if ('fields' in item) {
|
|
71
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
72
|
+
}
|
|
73
|
+
if ('blocks' in item) {
|
|
74
|
+
item.blocks = item.blocks.map((x)=>toBlock(x));
|
|
75
|
+
}
|
|
76
|
+
if ('tabs' in item) {
|
|
77
|
+
item.tabs = item.tabs.map((x)=>toTab(x));
|
|
78
|
+
}
|
|
79
|
+
switch(item.type){
|
|
80
|
+
case 'withAbstract':
|
|
81
|
+
delete item.type;
|
|
82
|
+
return withAbstract(item);
|
|
83
|
+
case 'withAnchor':
|
|
84
|
+
delete item.type;
|
|
85
|
+
return withAnchor(item);
|
|
86
|
+
case 'withCategory':
|
|
87
|
+
delete item.type;
|
|
88
|
+
return withCategory(item);
|
|
89
|
+
case 'withCheckbox':
|
|
90
|
+
delete item.type;
|
|
91
|
+
return withCheckbox(item);
|
|
92
|
+
case 'withColor':
|
|
93
|
+
delete item.type;
|
|
94
|
+
return withColor(item);
|
|
95
|
+
case 'withComponents':
|
|
96
|
+
delete item.type;
|
|
97
|
+
return withComponents(item);
|
|
98
|
+
case 'withDate':
|
|
99
|
+
delete item.type;
|
|
100
|
+
return withDate(item);
|
|
101
|
+
case 'withDescription':
|
|
102
|
+
delete item.type;
|
|
103
|
+
return withDescription(item);
|
|
104
|
+
case 'withId':
|
|
105
|
+
delete item.type;
|
|
106
|
+
return withId(item);
|
|
107
|
+
case 'withIsActive':
|
|
108
|
+
delete item.type;
|
|
109
|
+
return withIsActive(item);
|
|
110
|
+
case 'withIsDefault':
|
|
111
|
+
delete item.type;
|
|
112
|
+
return withIsDefault(item);
|
|
113
|
+
case 'withLink':
|
|
114
|
+
delete item.type;
|
|
115
|
+
return withLink(item);
|
|
116
|
+
case 'withMarkets':
|
|
117
|
+
delete item.type;
|
|
118
|
+
return withMarkets(item);
|
|
119
|
+
case 'withMedia':
|
|
120
|
+
delete item.type;
|
|
121
|
+
return withMedia(item);
|
|
122
|
+
case 'withMedias':
|
|
123
|
+
delete item.type;
|
|
124
|
+
return withMedias(item);
|
|
125
|
+
case 'withNav':
|
|
126
|
+
delete item.type;
|
|
127
|
+
return withNav(item);
|
|
128
|
+
case 'withNavs':
|
|
129
|
+
delete item.type;
|
|
130
|
+
return withNavs(item);
|
|
131
|
+
case 'withName':
|
|
132
|
+
delete item.type;
|
|
133
|
+
return withName(item);
|
|
134
|
+
case 'withOrder':
|
|
135
|
+
delete item.type;
|
|
136
|
+
return withOrder(item);
|
|
137
|
+
case 'withRelated':
|
|
138
|
+
delete item.type;
|
|
139
|
+
return withRelated(item);
|
|
140
|
+
case 'withRichText':
|
|
141
|
+
delete item.type;
|
|
142
|
+
return withRichText(item);
|
|
143
|
+
case 'withSelect':
|
|
144
|
+
delete item.type;
|
|
145
|
+
return withSelect(item);
|
|
146
|
+
case 'withSeoWeight':
|
|
147
|
+
delete item.type;
|
|
148
|
+
return withSeoWeight(item);
|
|
149
|
+
case 'withSlug':
|
|
150
|
+
delete item.type;
|
|
151
|
+
return withSlug(item);
|
|
152
|
+
case 'withTemplate':
|
|
153
|
+
delete item.type;
|
|
154
|
+
return withTemplate(item);
|
|
155
|
+
case 'withText':
|
|
156
|
+
delete item.type;
|
|
157
|
+
return withText(item);
|
|
158
|
+
case 'withTitle':
|
|
159
|
+
delete item.type;
|
|
160
|
+
return withTitle(item);
|
|
161
|
+
case 'withRoles':
|
|
162
|
+
delete item.type;
|
|
163
|
+
return withRoles(item);
|
|
164
|
+
case 'withTenants':
|
|
165
|
+
delete item.type;
|
|
166
|
+
return withTenants(item);
|
|
167
|
+
case 'array':
|
|
168
|
+
// const array = item as ArrayField;
|
|
169
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
170
|
+
return item;
|
|
171
|
+
case 'blocks':
|
|
172
|
+
item.blocks = item.blocks.map((x)=>toBlock(x));
|
|
173
|
+
return item;
|
|
174
|
+
case 'collapsible':
|
|
175
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
176
|
+
return item;
|
|
177
|
+
case 'group':
|
|
178
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
179
|
+
return item;
|
|
180
|
+
case 'row':
|
|
181
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
182
|
+
return item;
|
|
183
|
+
case 'tabs':
|
|
184
|
+
item.tabs = item.tabs.map((x)=>toTab(x));
|
|
185
|
+
return item;
|
|
186
|
+
default:
|
|
187
|
+
return item;
|
|
188
|
+
}
|
|
189
|
+
}
|
|
190
|
+
export function toBlock(item) {
|
|
191
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
192
|
+
return withBlock(item);
|
|
193
|
+
}
|
|
194
|
+
export function toTab(item) {
|
|
195
|
+
item.fields = item.fields.map((x)=>toField(x));
|
|
196
|
+
return item;
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
//# sourceMappingURL=mapper.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/mapper.ts"],"sourcesContent":["import { ArrayField, Block, BlocksField, CollapsibleField, CollectionConfig, Field, GlobalConfig, GroupField, RowField, Tab, TabsField } from 'payload';\r\nimport {\r\n WithActionProps, WithAddressProps, WithCollectionProps, WithEndUserProps, WithMenuProps,\r\n WithStaticProps, WithUserProps, withAction, withAddress, withBlock, withCollection, withEndUser,\r\n withGlobal, withMenu, withPage, withStaticCollection, withUser\r\n} from './core/collections';\r\nimport {\r\n WithAbstractProps, WithCategoryProps, WithCheckboxProps, WithComponentsProps, WithDateProps,\r\n WithDescriptionProps, WithIdProps, WithIsActiveProps, WithIsDefaultProps, WithLinkProps,\r\n WithMarketsProps, WithMediaProps, WithMediasProps, WithNameProps, WithNavProps, WithOrderProps, WithRelatedProps,\r\n WithRichTextProps, WithRolesProps, WithSlugProps, WithTemplateProps, WithTextProps, WithTitleProps,\r\n withAbstract, withCategory, withCheckbox, withComponents, withDate, withDescription, withId,\r\n withIsActive, withIsDefault, withLink, withMarkets, withMedia, withMedias, withName, withNav, withOrder,\r\n withRelated, withRichText, withRoles, withSlug, withTemplate, withText, withTitle\r\n} from './core/fields';\r\nimport { WithAnchorProps, withAnchor } from './core/fields/withAnchor';\r\nimport { WithNavsProps, withNavs } from './core/fields/withNavs';\r\nimport { WithSelectProps, withSelect } from './core/fields/withSelect';\r\nimport { WithSeoWeightProps, withSeoWeight } from './core/fields/withSeoWeight';\r\nimport { WithTenantsProps, withTenants } from './core/fields/withTenants';\r\nimport { WithColorProps, withColor } from './fields';\r\nimport { BowlBlock, BowlCollection, BowlField, BowlGlobal, BowlTab } from './types';\r\n\r\nexport function toCollection(collection: BowlCollection): CollectionConfig {\r\n collection = { ...collection };\r\n delete (collection as any).views;\r\n const type = collection.type;\r\n if (!collection.fields) {\r\n console.log('collection', collection);\r\n }\r\n const fields: Field[] = (collection.fields || []).map(x => toField(x));\r\n delete collection.type;\r\n delete collection.fields;\r\n const item: CollectionConfig = {\r\n ...(collection as Omit<BowlCollection, 'type' | 'fields'>),\r\n fields,\r\n };\r\n switch (type) {\r\n case 'withPage':\r\n return withPage(item); // as WithPageProps\r\n case 'withCollection':\r\n return withCollection(item as WithCollectionProps);\r\n case 'withStatic':\r\n return withStaticCollection(item as WithStaticProps);\r\n case 'withMenu':\r\n return withMenu(item as WithMenuProps);\r\n case 'withAction':\r\n return withAction(item as WithActionProps);\r\n case 'withUser':\r\n return withUser(item as WithUserProps);\r\n case 'withEndUser':\r\n return withEndUser(item as WithEndUserProps);\r\n case 'withAddress':\r\n return withAddress(item as WithAddressProps);\r\n default:\r\n return item;\r\n }\r\n}\r\n\r\nexport function toGlobal(collection: BowlGlobal): GlobalConfig {\r\n collection = { ...collection };\r\n delete (collection as any).views;\r\n const type = collection.type;\r\n const fields: Field[] = collection.fields.map(x => toField(x));\r\n delete collection.type;\r\n delete (collection as any).fields;\r\n const item: GlobalConfig = {\r\n ...(collection as Omit<BowlGlobal, 'type' | 'fields'>),\r\n fields,\r\n };\r\n switch (type) {\r\n case 'withGlobal':\r\n return withGlobal(item);\r\n default:\r\n return item;\r\n }\r\n}\r\n\r\nexport function toField(item: BowlField): Field {\r\n item = { ...item };\r\n if ('fields' in item) {\r\n item.fields = item.fields.map(x => toField(x)) as Field[];\r\n }\r\n if ('blocks' in item) {\r\n item.blocks = item.blocks.map(x => toBlock(x)) as Block[];\r\n }\r\n if ('tabs' in item) {\r\n item.tabs = item.tabs.map(x => toTab(x)) as Tab[];\r\n }\r\n switch (item.type) {\r\n case 'withAbstract':\r\n delete (item as any).type;\r\n return withAbstract(item as WithAbstractProps);\r\n case 'withAnchor':\r\n delete (item as any).type;\r\n return withAnchor(item as WithAnchorProps);\r\n case 'withCategory':\r\n delete (item as any).type;\r\n return withCategory(item as WithCategoryProps);\r\n case 'withCheckbox':\r\n delete (item as any).type;\r\n return withCheckbox(item as WithCheckboxProps);\r\n case 'withColor':\r\n delete (item as any).type;\r\n return withColor(item as WithColorProps);\r\n case 'withComponents':\r\n delete (item as any).type;\r\n return withComponents(item as WithComponentsProps);\r\n case 'withDate':\r\n delete (item as any).type;\r\n return withDate(item as WithDateProps);\r\n case 'withDescription':\r\n delete (item as any).type;\r\n return withDescription(item as WithDescriptionProps);\r\n case 'withId':\r\n delete (item as any).type;\r\n return withId(item as WithIdProps);\r\n case 'withIsActive':\r\n delete (item as any).type;\r\n return withIsActive(item as WithIsActiveProps);\r\n case 'withIsDefault':\r\n delete (item as any).type;\r\n return withIsDefault(item as WithIsDefaultProps);\r\n case 'withLink':\r\n delete (item as any).type;\r\n return withLink(item as WithLinkProps);\r\n case 'withMarkets':\r\n delete (item as any).type;\r\n return withMarkets(item as WithMarketsProps);\r\n case 'withMedia':\r\n delete (item as any).type;\r\n return withMedia(item as WithMediaProps);\r\n case 'withMedias':\r\n delete (item as any).type;\r\n return withMedias(item as WithMediasProps);\r\n case 'withNav':\r\n delete (item as any).type;\r\n return withNav(item as WithNavProps);\r\n case 'withNavs':\r\n delete (item as any).type;\r\n return withNavs(item as WithNavsProps);\r\n case 'withName':\r\n delete (item as any).type;\r\n return withName(item as WithNameProps);\r\n case 'withOrder':\r\n delete (item as any).type;\r\n return withOrder(item as WithOrderProps);\r\n case 'withRelated':\r\n delete (item as any).type;\r\n return withRelated(item as WithRelatedProps);\r\n case 'withRichText':\r\n delete (item as any).type;\r\n return withRichText(item as WithRichTextProps);\r\n case 'withSelect':\r\n delete (item as any).type;\r\n return withSelect(item as WithSelectProps);\r\n case 'withSeoWeight':\r\n delete (item as any).type;\r\n return withSeoWeight(item as WithSeoWeightProps);\r\n case 'withSlug':\r\n delete (item as any).type;\r\n return withSlug(item as WithSlugProps);\r\n case 'withTemplate':\r\n delete (item as any).type;\r\n return withTemplate(item as WithTemplateProps);\r\n case 'withText':\r\n delete (item as any).type;\r\n return withText(item as WithTextProps);\r\n case 'withTitle':\r\n delete (item as any).type;\r\n return withTitle(item as WithTitleProps);\r\n case 'withRoles':\r\n delete (item as any).type;\r\n return withRoles(item as WithRolesProps);\r\n case 'withTenants':\r\n delete (item as any).type;\r\n return withTenants(item as WithTenantsProps);\r\n case 'array':\r\n // const array = item as ArrayField;\r\n item.fields = item.fields.map(x => toField(x)) as Field[];\r\n return item as ArrayField;\r\n case 'blocks':\r\n item.blocks = item.blocks.map(x => toBlock(x)) as Block[];\r\n return item as BlocksField;\r\n case 'collapsible':\r\n item.fields = item.fields.map(x => toField(x)) as Field[];\r\n return item as CollapsibleField;\r\n case 'group':\r\n item.fields = item.fields.map(x => toField(x)) as Field[];\r\n return item as GroupField;\r\n case 'row':\r\n item.fields = item.fields.map(x => toField(x)) as Field[];\r\n return item as RowField;\r\n case 'tabs':\r\n item.tabs = item.tabs.map(x => toTab(x)) as Tab[];\r\n return item as TabsField;\r\n default:\r\n return item as Field;\r\n }\r\n}\r\n\r\nexport function toBlock(item: BowlBlock): Block {\r\n item.fields = item.fields.map(x => toField(x)) as Field[];\r\n return withBlock(item);\r\n}\r\n\r\nexport function toTab(item: BowlTab): Tab {\r\n item.fields = item.fields.map(x => toField(x));\r\n return item as Tab;\r\n}\r\n"],"names":["withAction","withAddress","withBlock","withCollection","withEndUser","withGlobal","withMenu","withPage","withStaticCollection","withUser","withAbstract","withCategory","withCheckbox","withComponents","withDate","withDescription","withId","withIsActive","withIsDefault","withLink","withMarkets","withMedia","withMedias","withName","withNav","withOrder","withRelated","withRichText","withRoles","withSlug","withTemplate","withText","withTitle","withAnchor","withNavs","withSelect","withSeoWeight","withTenants","withColor","toCollection","collection","views","type","fields","console","log","map","x","toField","item","toGlobal","blocks","toBlock","tabs","toTab"],"mappings":"AACA,SAEkCA,UAAU,EAAEC,WAAW,EAAEC,SAAS,EAAEC,cAAc,EAAEC,WAAW,EAC/FC,UAAU,EAAEC,QAAQ,EAAEC,QAAQ,EAAEC,oBAAoB,EAAEC,QAAQ,QACzD,qBAAqB;AAC5B,SAKEC,YAAY,EAAEC,YAAY,EAAEC,YAAY,EAAEC,cAAc,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import { Resource } from '@websolutespa/payload-utils';
|
|
2
|
+
import { translations } from './translations';
|
|
3
|
+
import { roles, rolesEndUser, rolesUser } from './types';
|
|
4
|
+
export const defaultSlug = {
|
|
5
|
+
// core
|
|
6
|
+
address: 'address',
|
|
7
|
+
app: 'app',
|
|
8
|
+
category: 'category',
|
|
9
|
+
emailConfig: 'email_config',
|
|
10
|
+
label: 'label',
|
|
11
|
+
locale: 'locale',
|
|
12
|
+
market: 'market',
|
|
13
|
+
media: 'media',
|
|
14
|
+
menu: 'menu',
|
|
15
|
+
redirect: 'redirect',
|
|
16
|
+
template: 'template',
|
|
17
|
+
// pages
|
|
18
|
+
// gdpr
|
|
19
|
+
consentPreference: 'consent_preference',
|
|
20
|
+
legalNotice: 'legal_notice',
|
|
21
|
+
// users
|
|
22
|
+
endUsers: 'end_users',
|
|
23
|
+
users: 'users',
|
|
24
|
+
// i18n
|
|
25
|
+
continent: 'i18n_continent',
|
|
26
|
+
country: 'i18n_country',
|
|
27
|
+
countryZone: 'i18n_country_zone',
|
|
28
|
+
language: 'i18n_language',
|
|
29
|
+
municipality: 'i18n_municipality',
|
|
30
|
+
province: 'i18n_province',
|
|
31
|
+
region: 'i18n_region',
|
|
32
|
+
subContinent: 'i18n_sub_continent'
|
|
33
|
+
};
|
|
34
|
+
export const defaultGroup = {
|
|
35
|
+
content: 'content',
|
|
36
|
+
shop: 'shop',
|
|
37
|
+
nav: 'nav',
|
|
38
|
+
actions: 'actions',
|
|
39
|
+
gdpr: 'gdpr',
|
|
40
|
+
users: 'users',
|
|
41
|
+
config: 'config',
|
|
42
|
+
i18n: 'i18n'
|
|
43
|
+
};
|
|
44
|
+
export const defaultLocales = [
|
|
45
|
+
'en',
|
|
46
|
+
'it'
|
|
47
|
+
];
|
|
48
|
+
export const defaultLocale = process.env.DEFAULT_LOCALE || 'en';
|
|
49
|
+
export const defaultMarket = process.env.DEFAULT_MARKET || 'ww';
|
|
50
|
+
const rolesList = Object.values(roles);
|
|
51
|
+
rolesList.sort();
|
|
52
|
+
export const options = {
|
|
53
|
+
actions: [],
|
|
54
|
+
bowlCollections: [],
|
|
55
|
+
bowlGlobals: [],
|
|
56
|
+
collections: [],
|
|
57
|
+
defaultLocale: defaultLocale,
|
|
58
|
+
defaultMarket: defaultMarket,
|
|
59
|
+
group: defaultGroup,
|
|
60
|
+
locales: defaultLocales,
|
|
61
|
+
menu: {
|
|
62
|
+
blocks: []
|
|
63
|
+
},
|
|
64
|
+
pages: [],
|
|
65
|
+
plugins: [],
|
|
66
|
+
roles: roles,
|
|
67
|
+
rolesEndUser: rolesEndUser,
|
|
68
|
+
rolesList,
|
|
69
|
+
rolesUser: rolesUser,
|
|
70
|
+
slug: defaultSlug,
|
|
71
|
+
translations,
|
|
72
|
+
users: []
|
|
73
|
+
};
|
|
74
|
+
export const internalSlugs = Object.entries(defaultSlug).map((x)=>x[1]);
|
|
75
|
+
|
|
76
|
+
//# sourceMappingURL=options.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/options.ts"],"sourcesContent":["// import { Resource } from '@websolutespa/payload-utils';\r\nimport { translations } from './translations';\r\nimport { BowlGroup, BowlOptions, BowlSlug, roles, rolesEndUser, rolesUser } from './types';\r\n\r\nexport const defaultSlug: BowlSlug = {\r\n // core\r\n address: 'address',\r\n app: 'app',\r\n category: 'category',\r\n emailConfig: 'email_config',\r\n label: 'label',\r\n locale: 'locale',\r\n market: 'market',\r\n media: 'media',\r\n menu: 'menu',\r\n redirect: 'redirect',\r\n template: 'template',\r\n // pages\r\n // gdpr\r\n consentPreference: 'consent_preference',\r\n legalNotice: 'legal_notice',\r\n // users\r\n endUsers: 'end_users',\r\n users: 'users',\r\n // i18n\r\n continent: 'i18n_continent',\r\n country: 'i18n_country',\r\n countryZone: 'i18n_country_zone',\r\n language: 'i18n_language',\r\n municipality: 'i18n_municipality',\r\n province: 'i18n_province',\r\n region: 'i18n_region',\r\n subContinent: 'i18n_sub_continent',\r\n // actions\r\n};\r\n\r\nexport const defaultGroup: BowlGroup = {\r\n content: 'content',\r\n shop: 'shop',\r\n nav: 'nav',\r\n actions: 'actions',\r\n gdpr: 'gdpr',\r\n users: 'users',\r\n config: 'config',\r\n i18n: 'i18n',\r\n};\r\n\r\nexport const defaultLocales = ['en', 'it'];\r\n\r\nexport const defaultLocale = process.env.DEFAULT_LOCALE || 'en';\r\n\r\nexport const defaultMarket = process.env.DEFAULT_MARKET || 'ww';\r\n\r\nconst rolesList = Object.values(roles);\r\nrolesList.sort();\r\n\r\nexport const options: BowlOptions = {\r\n actions: [],\r\n bowlCollections: [],\r\n bowlGlobals: [],\r\n collections: [],\r\n defaultLocale: defaultLocale,\r\n defaultMarket: defaultMarket,\r\n group: defaultGroup,\r\n locales: defaultLocales,\r\n menu: {\r\n blocks: [],\r\n },\r\n pages: [],\r\n plugins: [],\r\n roles: roles,\r\n rolesEndUser: rolesEndUser,\r\n rolesList,\r\n rolesUser: rolesUser,\r\n slug: defaultSlug,\r\n translations,\r\n users: [],\r\n};\r\n\r\nexport const internalSlugs: string[] = Object.entries(defaultSlug).map(x => x[1]);\r\n"],"names":["translations","roles","rolesEndUser","rolesUser","defaultSlug","address","app","category","emailConfig","label","locale","market","media","menu","redirect","template","consentPreference","legalNotice","endUsers","users","continent","country","countryZone","language","municipality","province","region","subContinent","defaultGroup","content","shop","nav","actions","gdpr","config","i18n","defaultLocales","defaultLocale","process","env","DEFAULT_LOCALE","defaultMarket","DEFAULT_MARKET","rolesList","Object","values","sort","options","bowlCollections","bowlGlobals","collections","group","locales","blocks","pages","plugins","slug","internalSlugs","entries","map","x"],"mappings":"AAAA,0DAA0D;AAC1D,SAASA,YAAY,QAAQ,iBAAiB;AAC9C,SAA2CC,KAAK,EAAEC,YAAY,EAAEC,SAAS,QAAQ,UAAU;AAE3F,OAAO,MAAMC,cAAwB;IACnC,OAAO;IACPC,SAAS;IACTC,KAAK;IACLC,UAAU;IACVC,aAAa;IACbC,OAAO;IACPC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC,MAAM;IACNC,UAAU;IACVC,UAAU;IACV,QAAQ;IACR,OAAO;IACPC,mBAAmB;IACnBC,aAAa;IACb,QAAQ;IACRC,UAAU;IACVC,OAAO;IACP,OAAO;IACPC,WAAW;IACXC,SAAS;IACTC,aAAa;IACbC,UAAU;IACVC,cAAc;IACdC,UAAU;IACVC,QAAQ;IACRC,cAAc;AAEhB,EAAE;AAEF,OAAO,MAAMC,eAA0B;IACrCC,SAAS;IACTC,MAAM;IACNC,KAAK;IACLC,SAAS;IACTC,MAAM;IACNd,OAAO;IACPe,QAAQ;IACRC,MAAM;AACR,EAAE;AAEF,OAAO,MAAMC,iBAAiB;IAAC;IAAM;CAAK,CAAC;AAE3C,OAAO,MAAMC,gBAAgBC,QAAQC,GAAG,CAACC,cAAc,IAAI,KAAK;AAEhE,OAAO,MAAMC,gBAAgBH,QAAQC,GAAG,CAACG,cAAc,IAAI,KAAK;AAEhE,MAAMC,YAAYC,OAAOC,MAAM,CAAC5C;AAChC0C,UAAUG,IAAI;AAEd,OAAO,MAAMC,UAAuB;IAClCf,SAAS,EAAE;IACXgB,iBAAiB,EAAE;IACnBC,aAAa,EAAE;IACfC,aAAa,EAAE;IACfb,eAAeA;IACfI,eAAeA;IACfU,OAAOvB;IACPwB,SAAShB;IACTvB,MAAM;QACJwC,QAAQ,EAAE;IACZ;IACAC,OAAO,EAAE;IACTC,SAAS,EAAE;IACXtD,OAAOA;IACPC,cAAcA;IACdyC;IACAxC,WAAWA;IACXqD,MAAMpD;IACNJ;IACAmB,OAAO,EAAE;AACX,EAAE;AAEF,OAAO,MAAMsC,gBAA0Bb,OAAOc,OAAO,CAACtD,aAAauD,GAAG,CAACC,CAAAA,IAAKA,CAAC,CAAC,EAAE,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/blocks/blocks.ts"],"sourcesContent":["import { BowlBlock } from '@/types';\r\nimport { Option } from 'payload';\r\n\r\nexport const withBlockOption: BowlBlock = {\r\n type: 'withBlock',\r\n slug: 'with_block_option',\r\n fields: [\r\n {\r\n name: 'customField',\r\n type: 'withText',\r\n },\r\n ],\r\n};\r\n\r\nexport const withSelectOption: Option = 'with_select_option';\r\n"],"names":["withBlockOption","type","slug","fields","name","withSelectOption"],"mappings":"AAGA,OAAO,MAAMA,kBAA6B;IACxCC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEC,MAAM;YACNH,MAAM;QACR;KACD;AACH,EAAE;AAEF,OAAO,MAAMI,mBAA2B,qBAAqB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/ActionCollection.ts"],"sourcesContent":["import { BowlCollection } from '@/types';\r\n\r\nexport const ActionCollection: BowlCollection = {\r\n type: 'withAction',\r\n slug: 'action_collection',\r\n fields: [\r\n {\r\n name: 'customField',\r\n type: 'withText',\r\n },\r\n ],\r\n};\r\n"],"names":["ActionCollection","type","slug","fields","name"],"mappings":"AAEA,OAAO,MAAMA,mBAAmC;IAC9CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEC,MAAM;YACNH,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { isAdmin } from '@/core';
|
|
2
|
+
export const AdminCollection = {
|
|
3
|
+
type: 'withCollection',
|
|
4
|
+
slug: 'admin_collection',
|
|
5
|
+
access: {
|
|
6
|
+
read: isAdmin,
|
|
7
|
+
create: isAdmin,
|
|
8
|
+
update: isAdmin,
|
|
9
|
+
delete: isAdmin
|
|
10
|
+
},
|
|
11
|
+
fields: [
|
|
12
|
+
{
|
|
13
|
+
type: 'withName'
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
//# sourceMappingURL=AdminCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/AdminCollection.ts"],"sourcesContent":["import { isAdmin } from '@/core';\r\nimport { BowlCollection } from '@/types';\r\n\r\nexport const AdminCollection: BowlCollection = {\r\n type: 'withCollection',\r\n slug: 'admin_collection',\r\n access: {\r\n read: isAdmin,\r\n create: isAdmin,\r\n update: isAdmin,\r\n delete: isAdmin,\r\n },\r\n fields: [\r\n { type: 'withName' },\r\n ],\r\n};\r\n"],"names":["isAdmin","AdminCollection","type","slug","access","read","create","update","delete","fields"],"mappings":"AAAA,SAASA,OAAO,QAAQ,SAAS;AAGjC,OAAO,MAAMC,kBAAkC;IAC7CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACNC,MAAML;QACNM,QAAQN;QACRO,QAAQP;QACRQ,QAAQR;IACV;IACAS,QAAQ;QACN;YAAEP,MAAM;QAAW;KACpB;AACH,EAAE"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { withBlockOption } from '../blocks/blocks';
|
|
2
|
+
export const BlockCollection = {
|
|
3
|
+
type: 'withCollection',
|
|
4
|
+
slug: 'block_collection',
|
|
5
|
+
fields: [
|
|
6
|
+
{
|
|
7
|
+
name: 'blocks',
|
|
8
|
+
type: 'blocks',
|
|
9
|
+
blocks: [
|
|
10
|
+
withBlockOption
|
|
11
|
+
]
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
//# sourceMappingURL=BlockCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/BlockCollection.ts"],"sourcesContent":["import { BowlCollection } from '@/types';\r\nimport { withBlockOption } from '../blocks/blocks';\r\n\r\nexport const BlockCollection: BowlCollection = {\r\n type: 'withCollection',\r\n slug: 'block_collection',\r\n fields: [\r\n {\r\n name: 'blocks',\r\n type: 'blocks',\r\n blocks: [withBlockOption],\r\n },\r\n ],\r\n};\r\n"],"names":["withBlockOption","BlockCollection","type","slug","fields","name","blocks"],"mappings":"AACA,SAASA,eAAe,QAAQ,mBAAmB;AAEnD,OAAO,MAAMC,kBAAkC;IAC7CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEC,MAAM;YACNH,MAAM;YACNI,QAAQ;gBAACN;aAAgB;QAC3B;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/Collection.ts"],"sourcesContent":["import { BowlCollection } from '@websolutespa/payload-plugin-bowl';\r\n\r\nexport const Collection: BowlCollection = {\r\n type: 'withCollection',\r\n slug: 'collection',\r\n fields: [\r\n {\r\n type: 'withName',\r\n localized: false,\r\n },\r\n ],\r\n};\r\n"],"names":["Collection","type","slug","fields","localized"],"mappings":"AAEA,OAAO,MAAMA,aAA6B;IACxCC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEF,MAAM;YACNG,WAAW;QACb;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import { withBlockOption, withSelectOption } from '../blocks/blocks';
|
|
2
|
+
export const FieldCollection = {
|
|
3
|
+
type: 'withCollection',
|
|
4
|
+
slug: 'field_collection',
|
|
5
|
+
fields: [
|
|
6
|
+
{
|
|
7
|
+
type: 'withAbstract'
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
type: 'withCategory'
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
type: 'withCheckbox'
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
type: 'withComponents',
|
|
17
|
+
blocks: [
|
|
18
|
+
withBlockOption
|
|
19
|
+
]
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
type: 'withDate'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
type: 'withDescription'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
type: 'withId'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
type: 'withIsActive'
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
type: 'withIsDefault'
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
type: 'withMarkets'
|
|
38
|
+
},
|
|
39
|
+
{
|
|
40
|
+
type: 'withMedia'
|
|
41
|
+
},
|
|
42
|
+
{
|
|
43
|
+
type: 'withMedias'
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
type: 'withName'
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
type: 'withOrder',
|
|
50
|
+
slug: 'field_collection'
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
type: 'withRelated',
|
|
54
|
+
blocks: [
|
|
55
|
+
withBlockOption
|
|
56
|
+
]
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
type: 'withRichText'
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
type: 'withSelect',
|
|
63
|
+
options: [
|
|
64
|
+
withSelectOption
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
type: 'withTitle'
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
type: 'withSlug',
|
|
72
|
+
fieldToUse: 'title'
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
type: 'withTemplate',
|
|
76
|
+
slugToUse: 'field_collection'
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
type: 'withText'
|
|
80
|
+
}
|
|
81
|
+
]
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
//# sourceMappingURL=FieldCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/FieldCollection.ts"],"sourcesContent":["import { BowlCollection } from '@/types';\r\nimport { withBlockOption, withSelectOption } from '../blocks/blocks';\r\n\r\nexport const FieldCollection: BowlCollection = {\r\n type: 'withCollection',\r\n slug: 'field_collection',\r\n fields: [\r\n {\r\n type: 'withAbstract',\r\n },\r\n {\r\n type: 'withCategory',\r\n },\r\n {\r\n type: 'withCheckbox',\r\n },\r\n {\r\n type: 'withComponents',\r\n blocks: [withBlockOption],\r\n },\r\n {\r\n type: 'withDate',\r\n },\r\n {\r\n type: 'withDescription',\r\n },\r\n {\r\n type: 'withId',\r\n },\r\n {\r\n type: 'withIsActive',\r\n },\r\n {\r\n type: 'withIsDefault',\r\n },\r\n {\r\n type: 'withMarkets',\r\n },\r\n {\r\n type: 'withMedia',\r\n },\r\n {\r\n type: 'withMedias',\r\n },\r\n {\r\n type: 'withName',\r\n },\r\n {\r\n type: 'withOrder',\r\n slug: 'field_collection',\r\n },\r\n {\r\n type: 'withRelated',\r\n blocks: [withBlockOption],\r\n },\r\n {\r\n type: 'withRichText',\r\n },\r\n {\r\n type: 'withSelect',\r\n options: [withSelectOption],\r\n },\r\n {\r\n type: 'withTitle',\r\n },\r\n {\r\n type: 'withSlug',\r\n fieldToUse: 'title',\r\n },\r\n {\r\n type: 'withTemplate',\r\n slugToUse: 'field_collection',\r\n },\r\n {\r\n type: 'withText',\r\n },\r\n ],\r\n};\r\n"],"names":["withBlockOption","withSelectOption","FieldCollection","type","slug","fields","blocks","options","fieldToUse","slugToUse"],"mappings":"AACA,SAASA,eAAe,EAAEC,gBAAgB,QAAQ,mBAAmB;AAErE,OAAO,MAAMC,kBAAkC;IAC7CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEF,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;YACNG,QAAQ;gBAACN;aAAgB;QAC3B;QACA;YACEG,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;QACR;QACA;YACEA,MAAM;YACNC,MAAM;QACR;QACA;YACED,MAAM;YACNG,QAAQ;gBAACN;aAAgB;QAC3B;QACA;YACEG,MAAM;QACR;QACA;YACEA,MAAM;YACNI,SAAS;gBAACN;aAAiB;QAC7B;QACA;YACEE,MAAM;QACR;QACA;YACEA,MAAM;YACNK,YAAY;QACd;QACA;YACEL,MAAM;YACNM,WAAW;QACb;QACA;YACEN,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/GlobalCollection.ts"],"sourcesContent":["import { BowlGlobal } from '@/types';\r\n\r\nexport const GlobalCollection: BowlGlobal = {\r\n type: 'withGlobal',\r\n slug: 'global_collection',\r\n fields: [\r\n {\r\n name: 'customField',\r\n type: 'withText',\r\n },\r\n ],\r\n};\r\n"],"names":["GlobalCollection","type","slug","fields","name"],"mappings":"AAEA,OAAO,MAAMA,mBAA+B;IAC1CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEC,MAAM;YACNH,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/LinkCollection.ts"],"sourcesContent":["import { BowlCollection } from '@/types';\r\n\r\nexport const LinkCollection: BowlCollection = {\r\n type: 'withCollection',\r\n slug: 'link_collection',\r\n fields: [\r\n // @todo: withLink test with custom props\r\n {\r\n type: 'withLink',\r\n },\r\n ],\r\n};\r\n"],"names":["LinkCollection","type","slug","fields"],"mappings":"AAEA,OAAO,MAAMA,iBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN,yCAAyC;QACzC;YACEF,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/MenuCollection.ts"],"sourcesContent":["import { BowlCollection } from '@/types';\r\n\r\nexport const MenuCollection: BowlCollection = {\r\n type: 'withMenu',\r\n slug: 'menu_collection',\r\n fields: [\r\n {\r\n name: 'customField',\r\n type: 'withText',\r\n },\r\n ],\r\n};\r\n"],"names":["MenuCollection","type","slug","fields","name"],"mappings":"AAEA,OAAO,MAAMA,iBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEC,MAAM;YACNH,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/PageCollection.ts"],"sourcesContent":["import { BowlCollection } from '@/types';\r\n\r\nexport const PageCollection: BowlCollection = {\r\n type: 'withPage',\r\n slug: 'page_collection',\r\n fields: [\r\n {\r\n name: 'customField',\r\n type: 'withText',\r\n },\r\n ],\r\n};\r\n"],"names":["PageCollection","type","slug","fields","name"],"mappings":"AAEA,OAAO,MAAMA,iBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACN;YACEC,MAAM;YACNH,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { isRole } from '@/core';
|
|
2
|
+
import { roles } from '@websolutespa/test/payload';
|
|
3
|
+
export const RoleCollection = {
|
|
4
|
+
type: 'withCollection',
|
|
5
|
+
slug: 'role_collection',
|
|
6
|
+
access: {
|
|
7
|
+
read: isRole(roles.Admin, roles.Editor, roles.User),
|
|
8
|
+
create: isRole(roles.Admin, roles.Editor, roles.User),
|
|
9
|
+
update: isRole(roles.Admin, roles.Editor, roles.User),
|
|
10
|
+
delete: isRole(roles.Admin, roles.Editor, roles.User)
|
|
11
|
+
},
|
|
12
|
+
fields: [
|
|
13
|
+
{
|
|
14
|
+
type: 'withName'
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
//# sourceMappingURL=RoleCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/test/collections/RoleCollection.ts"],"sourcesContent":["import { isRole } from '@/core';\r\nimport { BowlCollection } from '@/types';\r\nimport { roles } from '@websolutespa/test/payload';\r\n\r\nexport const RoleCollection: BowlCollection = {\r\n type: 'withCollection',\r\n slug: 'role_collection',\r\n access: {\r\n read: isRole(roles.Admin, roles.Editor, roles.User),\r\n create: isRole(roles.Admin, roles.Editor, roles.User),\r\n update: isRole(roles.Admin, roles.Editor, roles.User),\r\n delete: isRole(roles.Admin, roles.Editor, roles.User),\r\n },\r\n fields: [\r\n {\r\n type: 'withName',\r\n },\r\n ],\r\n};\r\n"],"names":["isRole","roles","RoleCollection","type","slug","access","read","Admin","Editor","User","create","update","delete","fields"],"mappings":"AAAA,SAASA,MAAM,QAAQ,SAAS;AAEhC,SAASC,KAAK,QAAQ,6BAA6B;AAEnD,OAAO,MAAMC,iBAAiC;IAC5CC,MAAM;IACNC,MAAM;IACNC,QAAQ;QACNC,MAAMN,OAAOC,MAAMM,KAAK,EAAEN,MAAMO,MAAM,EAAEP,MAAMQ,IAAI;QAClDC,QAAQV,OAAOC,MAAMM,KAAK,EAAEN,MAAMO,MAAM,EAAEP,MAAMQ,IAAI;QACpDE,QAAQX,OAAOC,MAAMM,KAAK,EAAEN,MAAMO,MAAM,EAAEP,MAAMQ,IAAI;QACpDG,QAAQZ,OAAOC,MAAMM,KAAK,EAAEN,MAAMO,MAAM,EAAEP,MAAMQ,IAAI;IACtD;IACAI,QAAQ;QACN;YACEV,MAAM;QACR;KACD;AACH,EAAE"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { isAdmin, isRole } from '@/core';
|
|
2
|
+
import { roles } from '@websolutespa/test/payload';
|
|
3
|
+
export const RoleFieldCollection = {
|
|
4
|
+
type: 'withCollection',
|
|
5
|
+
slug: 'role_field_collection',
|
|
6
|
+
access: {
|
|
7
|
+
read: isRole(roles.Admin, roles.Editor, roles.User),
|
|
8
|
+
create: isRole(roles.Admin, roles.Editor, roles.User),
|
|
9
|
+
update: isRole(roles.Admin, roles.Editor, roles.User),
|
|
10
|
+
delete: isRole(roles.Admin, roles.Editor, roles.User)
|
|
11
|
+
},
|
|
12
|
+
fields: [
|
|
13
|
+
{
|
|
14
|
+
name: 'AdminOnlyField',
|
|
15
|
+
type: 'withText',
|
|
16
|
+
access: {
|
|
17
|
+
read: isAdmin,
|
|
18
|
+
update: isAdmin
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'AdminOrEditorField',
|
|
23
|
+
type: 'withText',
|
|
24
|
+
access: {
|
|
25
|
+
read: isRole(roles.Admin, roles.Editor),
|
|
26
|
+
update: isRole(roles.Admin, roles.Editor)
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
{
|
|
30
|
+
name: 'endUserOnlyField',
|
|
31
|
+
type: 'withText',
|
|
32
|
+
access: {
|
|
33
|
+
read: isRole(roles.User),
|
|
34
|
+
update: isRole(roles.User)
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
]
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=RoleFieldCollection.js.map
|