strapi-plugin-navigation 2.5.4 → 3.0.0-beta.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/README.md +43 -70
- package/dist/_chunks/ca-BR-kBlg0.mjs +478 -0
- package/dist/_chunks/ca-BR-kBlg0.mjs.map +1 -0
- package/dist/_chunks/ca-CUqlPpIU.js +478 -0
- package/dist/_chunks/ca-CUqlPpIU.js.map +1 -0
- package/dist/_chunks/en-BX9EIpFS.js +480 -0
- package/dist/_chunks/en-BX9EIpFS.js.map +1 -0
- package/dist/_chunks/en-DGoYXo3O.mjs +480 -0
- package/dist/_chunks/en-DGoYXo3O.mjs.map +1 -0
- package/dist/_chunks/fr-C7TqeT5C.mjs +480 -0
- package/dist/_chunks/fr-C7TqeT5C.mjs.map +1 -0
- package/dist/_chunks/fr-DmfGsoRQ.js +480 -0
- package/dist/_chunks/fr-DmfGsoRQ.js.map +1 -0
- package/dist/admin/index.js +57380 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/index.mjs +57361 -0
- package/dist/admin/index.mjs.map +1 -0
- package/dist/admin/src/api/client.d.ts +190 -0
- package/dist/admin/src/api/index.d.ts +1 -0
- package/dist/admin/src/api/validators.d.ts +1828 -0
- package/dist/admin/src/components/ConfirmationDialog/index.d.ts +20 -0
- package/dist/admin/src/components/Initializer.d.ts +5 -0
- package/dist/admin/src/components/RestartAlert/index.d.ts +2 -0
- package/{admin → dist/admin}/src/components/TextArrayInput/index.d.ts +1 -4
- package/dist/admin/src/components/icons/index.d.ts +1 -0
- package/dist/admin/src/components/icons/navigation.d.ts +4 -0
- package/dist/admin/src/components/icons/pluginIcon.d.ts +7 -0
- package/dist/admin/src/index.d.ts +10 -0
- package/dist/admin/src/pages/App.d.ts +2 -0
- package/dist/admin/src/pages/HomePage/components/AdditionalFieldInput/index.d.ts +12 -0
- package/dist/admin/src/pages/HomePage/components/CollapseButton/index.d.ts +8 -0
- package/{admin/src → dist/admin/src/pages/HomePage}/components/DragButton/index.d.ts +0 -1
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/I18nCopyNavigationItems/index.d.ts +2 -3
- package/dist/admin/src/pages/HomePage/components/NavigationContentHeader/index.d.ts +7 -0
- package/{admin/src/hooks/useNavigationManager.d.ts → dist/admin/src/pages/HomePage/components/NavigationHeader/hooks.d.ts} +1 -2
- package/dist/admin/src/pages/HomePage/components/NavigationHeader/index.d.ts +23 -0
- package/dist/admin/src/pages/HomePage/components/NavigationHeader/styles.d.ts +2 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemForm/index.d.ts +22 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemForm/types.d.ts +45 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemForm/utils/form.d.ts +184 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemForm/utils/hooks.d.ts +1 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemForm/utils/properties.d.ts +33 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemList/Wrapper.d.ts +5 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemList/index.d.ts +24 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/ItemCardBadge/index.d.ts +2 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/ItemCardHeader/Wrapper.d.ts +2 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/ItemCardHeader/icons.d.ts +5 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/ItemCardHeader/index.d.ts +16 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/ItemCardRemovedOverlay/index.d.ts +2 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/Wrapper.d.ts +6 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemListItem/index.d.ts +43 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemPopup/NavigationItemPopupFooter.d.ts +10 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemPopup/NavigationItemPopupHeader.d.ts +4 -0
- package/dist/admin/src/pages/HomePage/components/NavigationItemPopup/index.d.ts +19 -0
- package/dist/admin/src/pages/HomePage/components/NavigationManager/AllNavigations/icons.d.ts +3 -0
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/AllNavigations/index.d.ts +3 -4
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/DeletionConfirm/index.d.ts +3 -4
- package/dist/admin/src/pages/HomePage/components/NavigationManager/ErrorDetails/index.d.ts +7 -0
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/Footer/index.d.ts +7 -6
- package/dist/admin/src/pages/HomePage/components/NavigationManager/Form/hooks.d.ts +8 -0
- package/dist/admin/src/pages/HomePage/components/NavigationManager/Form/index.d.ts +10 -0
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/NavigationUpdate/index.d.ts +3 -4
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/NewNavigation/index.d.ts +3 -4
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/PurgeCacheConfirm/index.d.ts +3 -4
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/index.d.ts +3 -4
- package/{admin/src/pages/View → dist/admin/src/pages/HomePage}/components/NavigationManager/types.d.ts +14 -14
- package/dist/admin/src/pages/HomePage/components/Search/index.d.ts +11 -0
- package/dist/admin/src/pages/HomePage/components/index.d.ts +1 -0
- package/dist/admin/src/pages/HomePage/hooks/index.d.ts +143 -0
- package/dist/admin/src/pages/HomePage/index.d.ts +2 -0
- package/dist/admin/src/pages/HomePage/utils/index.d.ts +5 -0
- package/dist/admin/src/pages/HomePage/utils/parsers.d.ts +46 -0
- package/dist/admin/src/pages/SettingsPage/common/const.d.ts +1 -0
- package/dist/admin/src/pages/SettingsPage/common/index.d.ts +1 -0
- package/dist/admin/src/pages/SettingsPage/components/CustomFieldForm/hooks/index.d.ts +10 -0
- package/{admin → dist/admin}/src/pages/SettingsPage/components/CustomFieldForm/index.d.ts +2 -3
- package/{admin → dist/admin}/src/pages/SettingsPage/components/CustomFieldModal/index.d.ts +2 -3
- package/{admin → dist/admin}/src/pages/SettingsPage/components/CustomFieldTable/index.d.ts +4 -4
- package/dist/admin/src/pages/SettingsPage/hooks/index.d.ts +427 -0
- package/dist/admin/src/pages/SettingsPage/index.d.ts +1 -0
- package/dist/admin/src/pages/SettingsPage/types.d.ts +7 -0
- package/dist/admin/src/pages/SettingsPage/utils/index.d.ts +9 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/schemas/config.d.ts +453 -0
- package/dist/admin/src/schemas/content-type.d.ts +49 -0
- package/dist/admin/src/schemas/index.d.ts +2 -0
- package/dist/admin/src/translations/ca.d.ts +475 -0
- package/dist/admin/src/translations/en.d.ts +478 -0
- package/dist/admin/src/translations/fr.d.ts +477 -0
- package/dist/admin/src/translations/index.d.ts +14 -0
- package/dist/admin/src/types.d.ts +3 -0
- package/dist/admin/src/utils/constants.d.ts +1 -0
- package/dist/admin/src/utils/getTranslation.d.ts +3 -0
- package/{admin/src → dist/admin/src/utils}/permissions.d.ts +6 -7
- package/dist/admin/src/utils/prefixPluginTranslations.d.ts +3 -0
- package/dist/assets/configuration.png +0 -0
- package/dist/assets/logo.png +0 -0
- package/dist/assets/manager-view.png +0 -0
- package/dist/assets/marketplace.png +0 -0
- package/dist/assets/preview.png +0 -0
- package/dist/server/index.js +16463 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +16426 -0
- package/dist/server/index.mjs.map +1 -0
- package/dist/server/src/app-errors.d.ts +11 -0
- package/dist/server/src/bootstrap.d.ts +5 -0
- package/dist/server/src/cache/index.d.ts +4 -0
- package/dist/server/src/config/index.d.ts +20 -0
- package/dist/server/src/config/setup.d.ts +41 -0
- package/{server → dist/server/src}/content-types/audience/index.d.ts +0 -1
- package/{server → dist/server/src}/content-types/audience/schema.d.ts +0 -1
- package/{server → dist/server/src}/content-types/index.d.ts +11 -65
- package/{server → dist/server/src}/content-types/navigation/index.d.ts +7 -10
- package/dist/server/src/content-types/navigation/lifecycles.d.ts +2 -0
- package/{server → dist/server/src}/content-types/navigation/schema.d.ts +6 -9
- package/{server → dist/server/src}/content-types/navigation-item/index.d.ts +3 -6
- package/dist/server/src/content-types/navigation-item/lifecycles.d.ts +2 -0
- package/{server → dist/server/src}/content-types/navigation-item/schema.d.ts +2 -5
- package/dist/server/src/controllers/admin.d.ts +241 -0
- package/dist/server/src/controllers/client.d.ts +192 -0
- package/dist/server/src/controllers/index.d.ts +7 -0
- package/dist/server/src/controllers/utils.d.ts +4 -0
- package/dist/server/src/controllers/validators.d.ts +49 -0
- package/dist/server/src/destroy.d.ts +5 -0
- package/dist/server/src/dtos/config.d.ts +28 -0
- package/dist/server/src/dtos/index.d.ts +3 -0
- package/dist/server/src/dtos/navigation-item.d.ts +52 -0
- package/dist/server/src/dtos/navigation.d.ts +5 -0
- package/dist/server/src/graphql/config.d.ts +5 -0
- package/dist/server/src/graphql/index.d.ts +1 -0
- package/dist/server/src/graphql/queries/index.d.ts +1 -0
- package/dist/server/src/graphql/queries/render-navigation-child.d.ts +31 -0
- package/dist/server/src/graphql/queries/render-navigation.d.ts +32 -0
- package/{server → dist/server/src}/graphql/resolvers-config.d.ts +1 -3
- package/dist/server/src/graphql/setup.d.ts +4 -0
- package/dist/server/src/graphql/types/content-types-name-fields.d.ts +2 -0
- package/dist/server/src/graphql/types/content-types.d.ts +2 -0
- package/dist/server/src/graphql/types/create-navigation-item.d.ts +2 -0
- package/dist/server/src/graphql/types/create-navigation-related.d.ts +2 -0
- package/dist/server/src/graphql/types/create-navigation.d.ts +2 -0
- package/dist/server/src/graphql/types/index.d.ts +1 -0
- package/dist/server/src/graphql/types/navigation-config.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-details.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-item-additional-field-media.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-item-additional-fields.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-item-related-data.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-item-related.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-item.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation-render-type.d.ts +2 -0
- package/dist/server/src/graphql/types/navigation.d.ts +2 -0
- package/dist/server/src/i18n/index.d.ts +4 -0
- package/dist/server/src/index.d.ts +582 -0
- package/dist/server/src/middlewares/index.d.ts +2 -0
- package/dist/server/src/permissions/index.d.ts +3 -0
- package/{permissions.d.ts → dist/server/src/permissions/permissions.d.ts} +0 -1
- package/dist/server/src/permissions/setup.d.ts +4 -0
- package/dist/server/src/permissions.d.ts +13 -0
- package/dist/server/src/policies/index.d.ts +2 -0
- package/dist/server/src/register.d.ts +5 -0
- package/dist/server/src/repositories/audience.d.ts +11 -0
- package/dist/server/src/repositories/generic.d.ts +27 -0
- package/dist/server/src/repositories/index.d.ts +4 -0
- package/dist/server/src/repositories/navigation-item.d.ts +24 -0
- package/dist/server/src/repositories/navigation.d.ts +47 -0
- package/dist/server/src/routes/admin.d.ts +24 -0
- package/dist/server/src/routes/client.d.ts +17 -0
- package/dist/server/src/routes/index.d.ts +37 -0
- package/dist/server/src/schemas/config.d.ts +424 -0
- package/dist/server/src/schemas/content-type.d.ts +918 -0
- package/dist/server/src/schemas/index.d.ts +3 -0
- package/dist/server/src/schemas/navigation.d.ts +237 -0
- package/dist/server/src/services/admin/admin.d.ts +32 -0
- package/dist/server/src/services/admin/index.d.ts +3 -0
- package/dist/server/src/services/admin/types.d.ts +45 -0
- package/dist/server/src/services/admin/utils.d.ts +32 -0
- package/dist/server/src/services/client/client.d.ts +93 -0
- package/dist/server/src/services/client/index.d.ts +3 -0
- package/dist/server/src/services/client/types.d.ts +66 -0
- package/dist/server/src/services/client/utils.d.ts +12 -0
- package/dist/server/src/services/common/common.d.ts +31 -0
- package/dist/server/src/services/common/index.d.ts +3 -0
- package/dist/server/src/services/common/types.d.ts +68 -0
- package/dist/server/src/services/common/utils.d.ts +12 -0
- package/dist/server/src/services/index.d.ts +320 -0
- package/dist/server/src/services/migration/index.d.ts +3 -0
- package/dist/server/src/services/migration/migration.d.ts +8 -0
- package/dist/server/src/types.d.ts +40 -0
- package/dist/server/src/utils/constants.d.ts +13 -0
- package/dist/server/src/utils/functions.d.ts +30 -0
- package/dist/server/src/utils/index.d.ts +2 -0
- package/package.json +118 -33
- package/admin/src/components/AdditionalFieldInput/index.d.ts +0 -5
- package/admin/src/components/AdditionalFieldInput/index.js +0 -99
- package/admin/src/components/AdditionalFieldInput/types.d.ts +0 -15
- package/admin/src/components/AdditionalFieldInput/types.js +0 -3
- package/admin/src/components/Alert/styles.d.ts +0 -2
- package/admin/src/components/Alert/styles.js +0 -14
- package/admin/src/components/CollapseButton/index.d.ts +0 -7
- package/admin/src/components/CollapseButton/index.js +0 -30
- package/admin/src/components/ConfirmationDialog/index.d.ts +0 -28
- package/admin/src/components/ConfirmationDialog/index.js +0 -34
- package/admin/src/components/DragButton/index.js +0 -62
- package/admin/src/components/EmptyView/index.d.ts +0 -3
- package/admin/src/components/EmptyView/index.js +0 -30
- package/admin/src/components/Item/ItemCardBadge/index.d.ts +0 -3
- package/admin/src/components/Item/ItemCardBadge/index.js +0 -26
- package/admin/src/components/Item/ItemCardHeader/Wrapper.d.ts +0 -3
- package/admin/src/components/Item/ItemCardHeader/Wrapper.js +0 -21
- package/admin/src/components/Item/ItemCardHeader/icons.d.ts +0 -5
- package/admin/src/components/Item/ItemCardHeader/icons.js +0 -13
- package/admin/src/components/Item/ItemCardHeader/index.d.ts +0 -17
- package/admin/src/components/Item/ItemCardHeader/index.js +0 -38
- package/admin/src/components/Item/ItemCardRemovedOverlay/index.d.ts +0 -2
- package/admin/src/components/Item/ItemCardRemovedOverlay/index.js +0 -18
- package/admin/src/components/Item/Wrapper.d.ts +0 -3
- package/admin/src/components/Item/Wrapper.js +0 -43
- package/admin/src/components/Item/index.d.ts +0 -31
- package/admin/src/components/Item/index.js +0 -188
- package/admin/src/components/NavigationItemList/Wrapper.d.ts +0 -3
- package/admin/src/components/NavigationItemList/Wrapper.js +0 -26
- package/admin/src/components/NavigationItemList/index.d.ts +0 -36
- package/admin/src/components/NavigationItemList/index.js +0 -32
- package/admin/src/components/RestartAlert/index.d.ts +0 -3
- package/admin/src/components/RestartAlert/index.js +0 -13
- package/admin/src/components/Search/index.d.ts +0 -12
- package/admin/src/components/Search/index.js +0 -97
- package/admin/src/components/TextArrayInput/index.js +0 -45
- package/admin/src/components/icons/navigation.d.ts +0 -6
- package/admin/src/components/icons/navigation.js +0 -12
- package/admin/src/contexts/DataManagerContext.d.ts +0 -3
- package/admin/src/contexts/DataManagerContext.js +0 -6
- package/admin/src/hooks/useAllContentTypes.d.ts +0 -3
- package/admin/src/hooks/useAllContentTypes.js +0 -8
- package/admin/src/hooks/useDataManager.d.ts +0 -3
- package/admin/src/hooks/useDataManager.js +0 -10
- package/admin/src/hooks/useI18nCopyNavigationItemsModal.d.ts +0 -9
- package/admin/src/hooks/useI18nCopyNavigationItemsModal.js +0 -51
- package/admin/src/hooks/useNavigationConfig.d.ts +0 -10
- package/admin/src/hooks/useNavigationConfig.js +0 -54
- package/admin/src/hooks/useNavigationManager.js +0 -41
- package/admin/src/index.d.ts +0 -14
- package/admin/src/index.js +0 -87
- package/admin/src/pages/App/index.d.ts +0 -3
- package/admin/src/pages/App/index.js +0 -43
- package/admin/src/pages/DataManagerProvider/actions.d.ts +0 -21
- package/admin/src/pages/DataManagerProvider/actions.js +0 -24
- package/admin/src/pages/DataManagerProvider/index.d.ts +0 -12
- package/admin/src/pages/DataManagerProvider/index.js +0 -382
- package/admin/src/pages/DataManagerProvider/init.d.ts +0 -3
- package/admin/src/pages/DataManagerProvider/init.js +0 -7
- package/admin/src/pages/DataManagerProvider/reducer.d.ts +0 -20
- package/admin/src/pages/DataManagerProvider/reducer.js +0 -132
- package/admin/src/pages/NoAccessPage/index.d.ts +0 -3
- package/admin/src/pages/NoAccessPage/index.js +0 -31
- package/admin/src/pages/SettingsPage/common/const.d.ts +0 -2
- package/admin/src/pages/SettingsPage/common/const.js +0 -5
- package/admin/src/pages/SettingsPage/common/index.d.ts +0 -2
- package/admin/src/pages/SettingsPage/common/index.js +0 -18
- package/admin/src/pages/SettingsPage/components/CustomFieldForm/index.js +0 -129
- package/admin/src/pages/SettingsPage/components/CustomFieldModal/index.js +0 -20
- package/admin/src/pages/SettingsPage/components/CustomFieldTable/index.js +0 -105
- package/admin/src/pages/SettingsPage/components/DisableI18nModal/index.d.ts +0 -23
- package/admin/src/pages/SettingsPage/components/DisableI18nModal/index.js +0 -86
- package/admin/src/pages/SettingsPage/index.d.ts +0 -3
- package/admin/src/pages/SettingsPage/index.js +0 -321
- package/admin/src/pages/SettingsPage/types.d.ts +0 -35
- package/admin/src/pages/SettingsPage/types.js +0 -3
- package/admin/src/pages/SettingsPage/utils/form.d.ts +0 -20
- package/admin/src/pages/SettingsPage/utils/form.js +0 -37
- package/admin/src/pages/SettingsPage/utils/functions.d.ts +0 -3
- package/admin/src/pages/SettingsPage/utils/functions.js +0 -26
- package/admin/src/pages/View/components/I18nCopyNavigationItems/index.js +0 -15
- package/admin/src/pages/View/components/NavigationContentHeader/index.d.ts +0 -6
- package/admin/src/pages/View/components/NavigationContentHeader/index.js +0 -14
- package/admin/src/pages/View/components/NavigationHeader/index.d.ts +0 -14
- package/admin/src/pages/View/components/NavigationHeader/index.js +0 -92
- package/admin/src/pages/View/components/NavigationHeader/styles.d.ts +0 -2
- package/admin/src/pages/View/components/NavigationHeader/styles.js +0 -18
- package/admin/src/pages/View/components/NavigationItemForm/index.d.ts +0 -5
- package/admin/src/pages/View/components/NavigationItemForm/index.js +0 -470
- package/admin/src/pages/View/components/NavigationItemForm/types.d.ts +0 -99
- package/admin/src/pages/View/components/NavigationItemForm/types.js +0 -3
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.d.ts +0 -28
- package/admin/src/pages/View/components/NavigationItemForm/utils/form.js +0 -123
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.d.ts +0 -25
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupFooter.js +0 -31
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupHeader.d.ts +0 -5
- package/admin/src/pages/View/components/NavigationItemPopup/NavigationItemPopupHeader.js +0 -20
- package/admin/src/pages/View/components/NavigationItemPopup/index.d.ts +0 -33
- package/admin/src/pages/View/components/NavigationItemPopup/index.js +0 -90
- package/admin/src/pages/View/components/NavigationManager/AllNavigations/icons.d.ts +0 -4
- package/admin/src/pages/View/components/NavigationManager/AllNavigations/icons.js +0 -12
- package/admin/src/pages/View/components/NavigationManager/AllNavigations/index.js +0 -151
- package/admin/src/pages/View/components/NavigationManager/DeletionConfirm/index.js +0 -34
- package/admin/src/pages/View/components/NavigationManager/ErrorDetails/index.d.ts +0 -8
- package/admin/src/pages/View/components/NavigationManager/ErrorDetails/index.js +0 -53
- package/admin/src/pages/View/components/NavigationManager/Footer/index.js +0 -13
- package/admin/src/pages/View/components/NavigationManager/Form/index.d.ts +0 -19
- package/admin/src/pages/View/components/NavigationManager/Form/index.js +0 -103
- package/admin/src/pages/View/components/NavigationManager/NavigationUpdate/index.js +0 -59
- package/admin/src/pages/View/components/NavigationManager/NewNavigation/index.js +0 -62
- package/admin/src/pages/View/components/NavigationManager/PurgeCacheConfirm/index.js +0 -34
- package/admin/src/pages/View/components/NavigationManager/index.js +0 -203
- package/admin/src/pages/View/components/NavigationManager/types.js +0 -3
- package/admin/src/pages/View/index.d.ts +0 -4
- package/admin/src/pages/View/index.js +0 -269
- package/admin/src/pages/View/utils/form.d.ts +0 -2
- package/admin/src/pages/View/utils/form.js +0 -16
- package/admin/src/pages/View/utils/index.d.ts +0 -2
- package/admin/src/pages/View/utils/index.js +0 -11
- package/admin/src/pages/View/utils/parsers.d.ts +0 -51
- package/admin/src/pages/View/utils/parsers.js +0 -272
- package/admin/src/pages/View/utils/types.d.ts +0 -3
- package/admin/src/pages/View/utils/types.js +0 -3
- package/admin/src/permissions.js +0 -13
- package/admin/src/pluginId.d.ts +0 -3
- package/admin/src/pluginId.js +0 -5
- package/admin/src/translations/ca.json +0 -199
- package/admin/src/translations/en.json +0 -220
- package/admin/src/translations/fr.json +0 -48
- package/admin/src/translations/index.d.ts +0 -15
- package/admin/src/translations/index.js +0 -21
- package/admin/src/utils/api.d.ts +0 -9
- package/admin/src/utils/api.js +0 -20
- package/admin/src/utils/enums.d.ts +0 -25
- package/admin/src/utils/enums.js +0 -30
- package/admin/src/utils/functions.d.ts +0 -16
- package/admin/src/utils/functions.js +0 -46
- package/admin/src/utils/index.d.ts +0 -4
- package/admin/src/utils/index.js +0 -20
- package/permissions.js +0 -13
- package/server/bootstrap/index.d.ts +0 -4
- package/server/bootstrap/index.js +0 -50
- package/server/cache/index.d.ts +0 -2
- package/server/cache/index.js +0 -18
- package/server/cache/serviceEnhancers.d.ts +0 -3
- package/server/cache/serviceEnhancers.js +0 -16
- package/server/cache/setupStrategy.d.ts +0 -3
- package/server/cache/setupStrategy.js +0 -38
- package/server/cache/types.d.ts +0 -11
- package/server/cache/types.js +0 -3
- package/server/cache/utils.d.ts +0 -11
- package/server/cache/utils.js +0 -19
- package/server/config/index.d.ts +0 -5
- package/server/config/index.js +0 -37
- package/server/config/setupStrategy.d.ts +0 -3
- package/server/config/setupStrategy.js +0 -55
- package/server/content-types/audience/index.js +0 -10
- package/server/content-types/audience/schema.js +0 -26
- package/server/content-types/index.js +0 -16
- package/server/content-types/navigation/index.js +0 -12
- package/server/content-types/navigation/lifecycles.d.ts +0 -3
- package/server/content-types/navigation/lifecycles.js +0 -7
- package/server/content-types/navigation/schema.js +0 -57
- package/server/content-types/navigation-item/index.js +0 -12
- package/server/content-types/navigation-item/lifecycles.d.ts +0 -3
- package/server/content-types/navigation-item/lifecycles.js +0 -7
- package/server/content-types/navigation-item/schema.js +0 -113
- package/server/content-types/navigations-items-related/index.d.ts +0 -51
- package/server/content-types/navigations-items-related/index.js +0 -10
- package/server/content-types/navigations-items-related/schema.d.ts +0 -49
- package/server/content-types/navigations-items-related/schema.js +0 -50
- package/server/controllers/admin.d.ts +0 -4
- package/server/controllers/admin.js +0 -164
- package/server/controllers/client.d.ts +0 -4
- package/server/controllers/client.js +0 -75
- package/server/controllers/index.d.ts +0 -4
- package/server/controllers/index.js +0 -13
- package/server/destroy.d.ts +0 -3
- package/server/destroy.js +0 -5
- package/server/graphql/config.d.ts +0 -4
- package/server/graphql/config.js +0 -28
- package/server/graphql/index.d.ts +0 -2
- package/server/graphql/index.js +0 -18
- package/server/graphql/queries/index.d.ts +0 -3
- package/server/graphql/queries/index.js +0 -17
- package/server/graphql/queries/render-navigation-child.d.ts +0 -15
- package/server/graphql/queries/render-navigation-child.js +0 -25
- package/server/graphql/queries/render-navigation.d.ts +0 -21
- package/server/graphql/queries/render-navigation.js +0 -32
- package/server/graphql/resolvers-config.js +0 -6
- package/server/graphql/setupStrategy.d.ts +0 -3
- package/server/graphql/setupStrategy.js +0 -15
- package/server/graphql/types/content-types-name-fields.d.ts +0 -6
- package/server/graphql/types/content-types-name-fields.js +0 -14
- package/server/graphql/types/content-types.d.ts +0 -5
- package/server/graphql/types/content-types.js +0 -18
- package/server/graphql/types/create-navigation-item.d.ts +0 -5
- package/server/graphql/types/create-navigation-item.js +0 -19
- package/server/graphql/types/create-navigation-related.d.ts +0 -5
- package/server/graphql/types/create-navigation-related.js +0 -10
- package/server/graphql/types/create-navigation.d.ts +0 -5
- package/server/graphql/types/create-navigation.js +0 -9
- package/server/graphql/types/index.d.ts +0 -3
- package/server/graphql/types/index.js +0 -18
- package/server/graphql/types/navigation-config.d.ts +0 -5
- package/server/graphql/types/navigation-config.js +0 -11
- package/server/graphql/types/navigation-details.d.ts +0 -5
- package/server/graphql/types/navigation-details.js +0 -12
- package/server/graphql/types/navigation-item-additional-field-media.d.ts +0 -5
- package/server/graphql/types/navigation-item-additional-field-media.js +0 -13
- package/server/graphql/types/navigation-item-related-data.d.ts +0 -5
- package/server/graphql/types/navigation-item-related-data.js +0 -9
- package/server/graphql/types/navigation-item-related.d.ts +0 -7
- package/server/graphql/types/navigation-item-related.js +0 -25
- package/server/graphql/types/navigation-item.d.ts +0 -6
- package/server/graphql/types/navigation-item.js +0 -55
- package/server/graphql/types/navigation-render-type.d.ts +0 -5
- package/server/graphql/types/navigation-render-type.js +0 -7
- package/server/graphql/types/navigation.d.ts +0 -5
- package/server/graphql/types/navigation.js +0 -11
- package/server/i18n/constant.d.ts +0 -2
- package/server/i18n/constant.js +0 -5
- package/server/i18n/errors.d.ts +0 -7
- package/server/i18n/errors.js +0 -14
- package/server/i18n/graphQLEnhancers.d.ts +0 -10
- package/server/i18n/graphQLEnhancers.js +0 -10
- package/server/i18n/index.d.ts +0 -8
- package/server/i18n/index.js +0 -23
- package/server/i18n/navigationSetupStrategy.d.ts +0 -3
- package/server/i18n/navigationSetupStrategy.js +0 -147
- package/server/i18n/serviceEnhancers.d.ts +0 -13
- package/server/i18n/serviceEnhancers.js +0 -156
- package/server/i18n/types.d.ts +0 -60
- package/server/i18n/types.js +0 -3
- package/server/i18n/utils.d.ts +0 -13
- package/server/i18n/utils.js +0 -33
- package/server/index.d.ts +0 -262
- package/server/index.js +0 -26
- package/server/navigation/index.d.ts +0 -2
- package/server/navigation/index.js +0 -18
- package/server/navigation/setupStrategy.d.ts +0 -3
- package/server/navigation/setupStrategy.js +0 -39
- package/server/register/index.d.ts +0 -3
- package/server/register/index.js +0 -4
- package/server/routes/admin.d.ts +0 -4
- package/server/routes/admin.js +0 -209
- package/server/routes/client.d.ts +0 -4
- package/server/routes/client.js +0 -33
- package/server/routes/index.d.ts +0 -6
- package/server/routes/index.js +0 -13
- package/server/services/admin.d.ts +0 -5
- package/server/services/admin.js +0 -347
- package/server/services/client.d.ts +0 -5
- package/server/services/client.js +0 -335
- package/server/services/common.d.ts +0 -5
- package/server/services/common.js +0 -385
- package/server/services/index.d.ts +0 -7
- package/server/services/index.js +0 -15
- package/server/utils/constant.d.ts +0 -27
- package/server/utils/constant.js +0 -43
- package/server/utils/functions.d.ts +0 -157
- package/server/utils/functions.js +0 -339
- package/server/utils/index.d.ts +0 -3
- package/server/utils/index.js +0 -19
- package/strapi-admin.d.ts +0 -3
- package/strapi-admin.js +0 -8
- package/strapi-server.d.ts +0 -262
- package/strapi-server.js +0 -7
- package/tsconfig.tsbuildinfo +0 -1
- package/types/bootstrap.d.ts +0 -16
- package/types/bootstrap.js +0 -3
- package/types/config.d.ts +0 -27
- package/types/config.js +0 -3
- package/types/contentTypes.d.ts +0 -112
- package/types/contentTypes.js +0 -3
- package/types/controllers.d.ts +0 -65
- package/types/controllers.js +0 -5
- package/types/graphQL.d.ts +0 -3
- package/types/graphQL.js +0 -3
- package/types/i18n.d.ts +0 -9
- package/types/i18n.js +0 -3
- package/types/index.d.ts +0 -10
- package/types/index.js +0 -26
- package/types/lifecycle.d.ts +0 -22
- package/types/lifecycle.js +0 -3
- package/types/services.d.ts +0 -106
- package/types/services.js +0 -3
- package/types/utils.d.ts +0 -72
- package/types/utils.js +0 -41
- package/utils/InvalidParamNavigationError.d.ts +0 -4
- package/utils/InvalidParamNavigationError.js +0 -8
- package/utils/NavigationError.d.ts +0 -5
- package/utils/NavigationError.js +0 -11
package/server/services/admin.js
DELETED
|
@@ -1,347 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const utils_1 = require("@strapi/utils");
|
|
4
|
-
const lodash_1 = require("lodash");
|
|
5
|
-
const utils_2 = require("../utils");
|
|
6
|
-
const i18n_1 = require("../i18n");
|
|
7
|
-
const NavigationError_1 = require("../../utils/NavigationError");
|
|
8
|
-
const serviceEnhancers_1 = require("../cache/serviceEnhancers");
|
|
9
|
-
const adminService = ({ strapi, }) => ({
|
|
10
|
-
async config(viaSettingsPage = false) {
|
|
11
|
-
const commonService = (0, utils_2.getPluginService)("common");
|
|
12
|
-
const { audienceModel } = (0, utils_2.getPluginModels)();
|
|
13
|
-
const pluginStore = await commonService.getPluginStore();
|
|
14
|
-
const config = await pluginStore.get({
|
|
15
|
-
key: "config",
|
|
16
|
-
});
|
|
17
|
-
const additionalFields = config.additionalFields;
|
|
18
|
-
const cascadeMenuAttached = config.cascadeMenuAttached;
|
|
19
|
-
const contentTypesNameFields = config.contentTypesNameFields;
|
|
20
|
-
const contentTypesPopulate = config.contentTypesPopulate;
|
|
21
|
-
const pathDefaultFields = config.pathDefaultFields;
|
|
22
|
-
const allowedLevels = config.allowedLevels;
|
|
23
|
-
const preferCustomContentTypes = config.preferCustomContentTypes;
|
|
24
|
-
const isGQLPluginEnabled = !(0, lodash_1.isNil)(strapi.plugin("graphql"));
|
|
25
|
-
let extendedResult = {
|
|
26
|
-
allowedContentTypes: utils_2.ALLOWED_CONTENT_TYPES,
|
|
27
|
-
restrictedContentTypes: utils_2.RESTRICTED_CONTENT_TYPES,
|
|
28
|
-
};
|
|
29
|
-
const configContentTypes = await commonService.configContentTypes();
|
|
30
|
-
const result = {
|
|
31
|
-
contentTypes: await commonService.configContentTypes(viaSettingsPage),
|
|
32
|
-
contentTypesNameFields: {
|
|
33
|
-
default: utils_2.CONTENT_TYPES_NAME_FIELDS_DEFAULTS,
|
|
34
|
-
...((0, lodash_1.isObject)(contentTypesNameFields) ? contentTypesNameFields : {}),
|
|
35
|
-
},
|
|
36
|
-
contentTypesPopulate: (0, lodash_1.isObject)(contentTypesPopulate)
|
|
37
|
-
? contentTypesPopulate
|
|
38
|
-
: {},
|
|
39
|
-
pathDefaultFields: (0, lodash_1.isObject)(pathDefaultFields) ? pathDefaultFields : {},
|
|
40
|
-
allowedLevels,
|
|
41
|
-
additionalFields: viaSettingsPage
|
|
42
|
-
? additionalFields
|
|
43
|
-
: additionalFields.filter((field) => typeof field === "string" || (0, lodash_1.get)(field, "enabled", false)),
|
|
44
|
-
gql: {
|
|
45
|
-
navigationItemRelated: configContentTypes.map(({ labelSingular }) => labelSingular.replace(/\s+/g, "")),
|
|
46
|
-
},
|
|
47
|
-
isGQLPluginEnabled: viaSettingsPage ? isGQLPluginEnabled : undefined,
|
|
48
|
-
cascadeMenuAttached,
|
|
49
|
-
preferCustomContentTypes,
|
|
50
|
-
};
|
|
51
|
-
const i18nConfig = await (0, i18n_1.addI18NConfigFields)({
|
|
52
|
-
strapi,
|
|
53
|
-
viaSettingsPage,
|
|
54
|
-
previousConfig: {},
|
|
55
|
-
});
|
|
56
|
-
const cacheConfig = await (0, serviceEnhancers_1.addCacheConfigFields)({ strapi, previousConfig: {} });
|
|
57
|
-
if (additionalFields.includes("audience")) {
|
|
58
|
-
const audienceItems = await strapi
|
|
59
|
-
.query(audienceModel.uid)
|
|
60
|
-
.findMany({
|
|
61
|
-
limit: Number.MAX_SAFE_INTEGER,
|
|
62
|
-
});
|
|
63
|
-
extendedResult = {
|
|
64
|
-
...extendedResult,
|
|
65
|
-
availableAudience: audienceItems,
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
return {
|
|
69
|
-
...result,
|
|
70
|
-
...extendedResult,
|
|
71
|
-
...i18nConfig,
|
|
72
|
-
...cacheConfig,
|
|
73
|
-
};
|
|
74
|
-
},
|
|
75
|
-
async get(ids, ignoreLocale = false) {
|
|
76
|
-
const { masterModel } = (0, utils_2.getPluginModels)();
|
|
77
|
-
const { enabled: i18nEnabled, locales } = await (0, i18n_1.getI18nStatus)({ strapi });
|
|
78
|
-
const whereClause = {};
|
|
79
|
-
if (ids) {
|
|
80
|
-
whereClause.id = { $in: ids };
|
|
81
|
-
}
|
|
82
|
-
let entities = await strapi.query(masterModel.uid).findMany({
|
|
83
|
-
limit: Number.MAX_SAFE_INTEGER,
|
|
84
|
-
populate: utils_2.DEFAULT_POPULATE,
|
|
85
|
-
where: whereClause,
|
|
86
|
-
});
|
|
87
|
-
if (i18nEnabled && !ignoreLocale) {
|
|
88
|
-
entities = entities.reduce((acc, entity) => {
|
|
89
|
-
if (entity.localeCode && locales?.includes(entity.localeCode)) {
|
|
90
|
-
acc.push({
|
|
91
|
-
...entity,
|
|
92
|
-
localizations: entity.localizations?.filter(({ localeCode }) => localeCode && locales?.includes(localeCode)),
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
return acc;
|
|
96
|
-
}, []);
|
|
97
|
-
}
|
|
98
|
-
return entities;
|
|
99
|
-
},
|
|
100
|
-
async getById(id) {
|
|
101
|
-
const commonService = (0, utils_2.getPluginService)("common");
|
|
102
|
-
const { masterModel, itemModel } = (0, utils_2.getPluginModels)();
|
|
103
|
-
const entity = await strapi
|
|
104
|
-
.query(masterModel.uid)
|
|
105
|
-
.findOne({ where: { id }, populate: utils_2.DEFAULT_POPULATE });
|
|
106
|
-
const entityItems = await strapi
|
|
107
|
-
.query(itemModel.uid)
|
|
108
|
-
.findMany({
|
|
109
|
-
where: {
|
|
110
|
-
master: id,
|
|
111
|
-
},
|
|
112
|
-
limit: Number.MAX_SAFE_INTEGER,
|
|
113
|
-
orderBy: [{ order: "asc" }],
|
|
114
|
-
populate: ["related", "parent", "audience"],
|
|
115
|
-
});
|
|
116
|
-
const entities = await commonService.getRelatedItems(entityItems);
|
|
117
|
-
return {
|
|
118
|
-
...entity,
|
|
119
|
-
items: (0, utils_2.buildNestedStructure)(entities),
|
|
120
|
-
};
|
|
121
|
-
},
|
|
122
|
-
async post(payload, auditLog) {
|
|
123
|
-
const commonService = (0, utils_2.getPluginService)("common");
|
|
124
|
-
const adminService = (0, utils_2.getPluginService)("admin");
|
|
125
|
-
const { enabled: i18nEnabled, defaultLocale } = await (0, i18n_1.getI18nStatus)({
|
|
126
|
-
strapi,
|
|
127
|
-
});
|
|
128
|
-
const { masterModel } = (0, utils_2.getPluginModels)();
|
|
129
|
-
const { name, visible } = payload;
|
|
130
|
-
const data = {
|
|
131
|
-
name,
|
|
132
|
-
slug: await commonService.getSlug(name),
|
|
133
|
-
visible,
|
|
134
|
-
localeCode: i18nEnabled && defaultLocale ? defaultLocale : null
|
|
135
|
-
};
|
|
136
|
-
const existingEntity = await strapi
|
|
137
|
-
.query(masterModel.uid)
|
|
138
|
-
.create({ data });
|
|
139
|
-
const result = await commonService
|
|
140
|
-
.createBranch(payload.items, existingEntity, null, {})
|
|
141
|
-
.then(() => adminService.getById(existingEntity.id))
|
|
142
|
-
.then((newEntity) => {
|
|
143
|
-
(0, utils_2.sendAuditLog)(auditLog, "onChangeNavigation", {
|
|
144
|
-
actionType: "CREATE",
|
|
145
|
-
oldEntity: existingEntity,
|
|
146
|
-
newEntity,
|
|
147
|
-
});
|
|
148
|
-
return newEntity;
|
|
149
|
-
});
|
|
150
|
-
await commonService.emitEvent(masterModel.uid, "entry.create", existingEntity);
|
|
151
|
-
if (i18nEnabled && defaultLocale) {
|
|
152
|
-
await (0, i18n_1.i18nNavigationSetupStrategy)({ strapi });
|
|
153
|
-
}
|
|
154
|
-
return result;
|
|
155
|
-
},
|
|
156
|
-
async put(id, payload, auditLog) {
|
|
157
|
-
const adminService = (0, utils_2.getPluginService)("admin");
|
|
158
|
-
const commonService = (0, utils_2.getPluginService)("common");
|
|
159
|
-
const { enabled: i18nEnabled } = await (0, i18n_1.getI18nStatus)({ strapi });
|
|
160
|
-
const { masterModel } = (0, utils_2.getPluginModels)();
|
|
161
|
-
const { name, visible } = payload;
|
|
162
|
-
const existingEntity = await adminService.getById(id);
|
|
163
|
-
const detailsHaveChanged = existingEntity.name !== name || existingEntity.visible !== visible;
|
|
164
|
-
if (detailsHaveChanged) {
|
|
165
|
-
const newName = detailsHaveChanged ? name : existingEntity.name;
|
|
166
|
-
const newSlug = detailsHaveChanged
|
|
167
|
-
? await commonService.getSlug(name)
|
|
168
|
-
: existingEntity.slug;
|
|
169
|
-
await strapi.query(masterModel.uid).update({
|
|
170
|
-
where: { id },
|
|
171
|
-
data: {
|
|
172
|
-
name: newName,
|
|
173
|
-
slug: newSlug,
|
|
174
|
-
visible,
|
|
175
|
-
},
|
|
176
|
-
});
|
|
177
|
-
if (i18nEnabled && existingEntity.localizations) {
|
|
178
|
-
for (const locale of existingEntity.localizations) {
|
|
179
|
-
await strapi.query(masterModel.uid).update({
|
|
180
|
-
where: {
|
|
181
|
-
id: locale.id,
|
|
182
|
-
},
|
|
183
|
-
data: {
|
|
184
|
-
name: newName,
|
|
185
|
-
slug: `${newSlug}-${locale.localeCode}`,
|
|
186
|
-
visible,
|
|
187
|
-
},
|
|
188
|
-
});
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
const result = await commonService
|
|
193
|
-
.analyzeBranch(payload.items, existingEntity)
|
|
194
|
-
.then((auditLogsOperations) => Promise.all([
|
|
195
|
-
auditLog
|
|
196
|
-
? (0, utils_2.prepareAuditLog)((auditLogsOperations || []).flat(Number.MAX_SAFE_INTEGER))
|
|
197
|
-
: [],
|
|
198
|
-
adminService.getById(existingEntity.id),
|
|
199
|
-
]))
|
|
200
|
-
.then(([actionType, newEntity]) => {
|
|
201
|
-
(0, utils_2.sendAuditLog)(auditLog, "onChangeNavigation", {
|
|
202
|
-
actionType,
|
|
203
|
-
oldEntity: existingEntity,
|
|
204
|
-
newEntity,
|
|
205
|
-
});
|
|
206
|
-
return newEntity;
|
|
207
|
-
});
|
|
208
|
-
const navigationEntity = await strapi
|
|
209
|
-
.query(masterModel.uid)
|
|
210
|
-
.findOne({ where: { id } });
|
|
211
|
-
await commonService.emitEvent(masterModel.uid, "entry.update", navigationEntity);
|
|
212
|
-
return result;
|
|
213
|
-
},
|
|
214
|
-
async delete(id, auditLog) {
|
|
215
|
-
const { masterModel, itemModel } = (0, utils_2.getPluginModels)();
|
|
216
|
-
const entity = await this.getById(id);
|
|
217
|
-
const { enabled: i18nEnabled } = await (0, i18n_1.getI18nStatus)({ strapi });
|
|
218
|
-
const cleanNavigationItems = async (masterIds) => {
|
|
219
|
-
if (masterIds.length < 1) {
|
|
220
|
-
return;
|
|
221
|
-
}
|
|
222
|
-
const navigationItems = await strapi.query(itemModel.uid).findMany({
|
|
223
|
-
where: {
|
|
224
|
-
$or: masterIds.map((id) => ({ master: id })),
|
|
225
|
-
},
|
|
226
|
-
limit: Number.MAX_SAFE_INTEGER,
|
|
227
|
-
});
|
|
228
|
-
await strapi.query(itemModel.uid).deleteMany({
|
|
229
|
-
where: {
|
|
230
|
-
id: navigationItems.map(({ id }) => (id)),
|
|
231
|
-
},
|
|
232
|
-
});
|
|
233
|
-
};
|
|
234
|
-
await cleanNavigationItems([id]);
|
|
235
|
-
await strapi.query(masterModel.uid).delete({
|
|
236
|
-
where: {
|
|
237
|
-
id,
|
|
238
|
-
},
|
|
239
|
-
});
|
|
240
|
-
if (i18nEnabled && entity.localizations) {
|
|
241
|
-
await cleanNavigationItems(entity.localizations.map(_ => _.id));
|
|
242
|
-
await strapi.query(masterModel.uid).deleteMany({
|
|
243
|
-
where: {
|
|
244
|
-
id: {
|
|
245
|
-
$in: entity.localizations.map((_) => _.id),
|
|
246
|
-
},
|
|
247
|
-
},
|
|
248
|
-
});
|
|
249
|
-
}
|
|
250
|
-
(0, utils_2.sendAuditLog)(auditLog, "onNavigationDeletion", {
|
|
251
|
-
entity,
|
|
252
|
-
actionType: "DELETE",
|
|
253
|
-
});
|
|
254
|
-
},
|
|
255
|
-
async restart() {
|
|
256
|
-
setImmediate(() => strapi.reload());
|
|
257
|
-
},
|
|
258
|
-
async restoreConfig() {
|
|
259
|
-
const commonService = (0, utils_2.getPluginService)("common", strapi);
|
|
260
|
-
const pluginStore = await commonService.getPluginStore();
|
|
261
|
-
await pluginStore.delete({ key: "config" });
|
|
262
|
-
await commonService.setDefaultConfig();
|
|
263
|
-
},
|
|
264
|
-
async updateConfig(newConfig) {
|
|
265
|
-
const commonService = (0, utils_2.getPluginService)("common");
|
|
266
|
-
const pluginStore = await commonService.getPluginStore();
|
|
267
|
-
const config = await pluginStore.get({
|
|
268
|
-
key: "config",
|
|
269
|
-
});
|
|
270
|
-
(0, utils_2.validateAdditionalFields)(newConfig.additionalFields);
|
|
271
|
-
await pluginStore.set({ key: "config", value: newConfig });
|
|
272
|
-
const removedFields = (0, lodash_1.differenceBy)(config.additionalFields, newConfig.additionalFields, "name").filter((i) => i !== "audience");
|
|
273
|
-
if (!(0, lodash_1.isEmpty)(removedFields)) {
|
|
274
|
-
await commonService.pruneCustomFields(removedFields);
|
|
275
|
-
}
|
|
276
|
-
},
|
|
277
|
-
async fillFromOtherLocale({ target, source, auditLog }) {
|
|
278
|
-
const { enabled } = await (0, i18n_1.getI18nStatus)({ strapi });
|
|
279
|
-
if (!enabled) {
|
|
280
|
-
throw new NavigationError_1.NavigationError("Not yet implemented.");
|
|
281
|
-
}
|
|
282
|
-
const adminService = (0, utils_2.getPluginService)("admin");
|
|
283
|
-
const commonService = (0, utils_2.getPluginService)("common");
|
|
284
|
-
const targetEntity = await adminService.getById(target);
|
|
285
|
-
return await (0, i18n_1.i18nNavigationContentsCopy)({
|
|
286
|
-
source: await adminService.getById(source),
|
|
287
|
-
target: targetEntity,
|
|
288
|
-
service: commonService,
|
|
289
|
-
strapi,
|
|
290
|
-
})
|
|
291
|
-
.then(() => adminService.getById(target))
|
|
292
|
-
.then((updated) => {
|
|
293
|
-
(0, utils_2.sendAuditLog)(auditLog, "onChangeNavigation", {
|
|
294
|
-
actionType: "UPDATE",
|
|
295
|
-
oldEntity: targetEntity,
|
|
296
|
-
newEntity: updated,
|
|
297
|
-
});
|
|
298
|
-
return updated;
|
|
299
|
-
});
|
|
300
|
-
},
|
|
301
|
-
async readNavigationItemFromLocale({ source, target, path }) {
|
|
302
|
-
const sourceNavigation = await this.getById(source);
|
|
303
|
-
const targetNavigation = await this.getById(target);
|
|
304
|
-
if (!sourceNavigation) {
|
|
305
|
-
throw new utils_1.errors.NotFoundError("Unable to find source navigation for specified query");
|
|
306
|
-
}
|
|
307
|
-
if (!targetNavigation) {
|
|
308
|
-
throw new utils_1.errors.NotFoundError("Unable to find target navigation for specified query");
|
|
309
|
-
}
|
|
310
|
-
return await (0, i18n_1.i18nNavigationItemRead)({
|
|
311
|
-
path,
|
|
312
|
-
source: sourceNavigation,
|
|
313
|
-
target: targetNavigation,
|
|
314
|
-
strapi,
|
|
315
|
-
});
|
|
316
|
-
},
|
|
317
|
-
async purgeNavigationCache(id, clearLocalisations) {
|
|
318
|
-
const entity = await this.getById(id);
|
|
319
|
-
const regexps = [];
|
|
320
|
-
const mapToRegExp = (id) => new RegExp(`/api/navigation/render/${id}`);
|
|
321
|
-
if (!entity) {
|
|
322
|
-
throw new utils_1.errors.NotFoundError("Navigation is not defined");
|
|
323
|
-
}
|
|
324
|
-
if (clearLocalisations) {
|
|
325
|
-
const { enabled: isI18nEnabled } = await (0, i18n_1.getI18nStatus)({ strapi });
|
|
326
|
-
if (isI18nEnabled) {
|
|
327
|
-
entity.localizations?.forEach((navigation) => {
|
|
328
|
-
regexps.push(mapToRegExp(navigation.id));
|
|
329
|
-
});
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
const restCachePlugin = strapi.plugin("rest-cache");
|
|
333
|
-
const cacheStore = restCachePlugin.service("cacheStore");
|
|
334
|
-
regexps.push(mapToRegExp(id));
|
|
335
|
-
await cacheStore.clearByRegexp(regexps);
|
|
336
|
-
return { success: true };
|
|
337
|
-
},
|
|
338
|
-
async purgeNavigationsCache() {
|
|
339
|
-
const restCachePlugin = strapi.plugin("rest-cache");
|
|
340
|
-
const cacheStore = restCachePlugin.service("cacheStore");
|
|
341
|
-
const regex = new RegExp("/api/navigation/render(.*)");
|
|
342
|
-
await cacheStore.clearByRegexp([regex]);
|
|
343
|
-
return { success: true };
|
|
344
|
-
}
|
|
345
|
-
});
|
|
346
|
-
exports.default = adminService;
|
|
347
|
-
//# sourceMappingURL=admin.js.map
|
|
@@ -1,335 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
const lodash_1 = require("lodash");
|
|
4
|
-
const uuid_1 = require("uuid");
|
|
5
|
-
const types_1 = require("../../types");
|
|
6
|
-
const utils_1 = require("../utils");
|
|
7
|
-
const utils_2 = require("@strapi/utils");
|
|
8
|
-
const i18n_1 = require("../i18n");
|
|
9
|
-
const NavigationError_1 = require("../../utils/NavigationError");
|
|
10
|
-
const fp_1 = require("lodash/fp");
|
|
11
|
-
const clientService = ({ strapi }) => ({
|
|
12
|
-
async readAll({ locale, orderBy = 'createdAt', orderDirection = "DESC" }) {
|
|
13
|
-
const { masterModel } = (0, utils_1.getPluginModels)();
|
|
14
|
-
const { enabled: i18nEnabled, locales } = await (0, i18n_1.getI18nStatus)({ strapi });
|
|
15
|
-
let navigations = await strapi
|
|
16
|
-
.query(masterModel.uid)
|
|
17
|
-
.findMany({
|
|
18
|
-
where: locale
|
|
19
|
-
? {
|
|
20
|
-
localeCode: locale,
|
|
21
|
-
}
|
|
22
|
-
: undefined,
|
|
23
|
-
orderBy: { [orderBy]: orderDirection },
|
|
24
|
-
limit: Number.MAX_SAFE_INTEGER,
|
|
25
|
-
populate: false
|
|
26
|
-
});
|
|
27
|
-
if (i18nEnabled) {
|
|
28
|
-
navigations = navigations.reduce((acc, navigation) => {
|
|
29
|
-
if (navigation.localeCode && locales?.includes(navigation.localeCode)) {
|
|
30
|
-
acc.push({
|
|
31
|
-
...navigation,
|
|
32
|
-
localizations: navigation.localizations?.filter(({ localeCode }) => localeCode && locales?.includes(localeCode)),
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
-
return acc;
|
|
36
|
-
}, []);
|
|
37
|
-
}
|
|
38
|
-
return navigations;
|
|
39
|
-
},
|
|
40
|
-
async render({ idOrSlug, type = utils_1.RENDER_TYPES.FLAT, menuOnly = false, rootPath = null, wrapRelated = false, locale, populate, }) {
|
|
41
|
-
const clientService = (0, utils_1.getPluginService)('client');
|
|
42
|
-
const findById = !isNaN((0, lodash_1.toNumber)(idOrSlug)) || (0, uuid_1.validate)(idOrSlug);
|
|
43
|
-
const criteria = findById ? { id: idOrSlug } : { slug: idOrSlug };
|
|
44
|
-
const itemCriteria = menuOnly ? { menuAttached: true } : {};
|
|
45
|
-
return await clientService.renderType({
|
|
46
|
-
type, criteria, itemCriteria, filter: null, rootPath, wrapRelated, locale, populate
|
|
47
|
-
});
|
|
48
|
-
},
|
|
49
|
-
async renderChildren({ idOrSlug, childUIKey, type = utils_1.RENDER_TYPES.FLAT, menuOnly = false, wrapRelated = false, locale, }) {
|
|
50
|
-
const clientService = (0, utils_1.getPluginService)('client');
|
|
51
|
-
const findById = !isNaN((0, lodash_1.toNumber)(idOrSlug)) || (0, uuid_1.validate)(idOrSlug);
|
|
52
|
-
const criteria = findById ? { id: idOrSlug } : { slug: idOrSlug };
|
|
53
|
-
const filter = type === utils_1.RENDER_TYPES.FLAT ? null : childUIKey;
|
|
54
|
-
const itemCriteria = {
|
|
55
|
-
...(menuOnly && { menuAttached: true }),
|
|
56
|
-
...(type === utils_1.RENDER_TYPES.FLAT ? { uiRouterKey: childUIKey } : {}),
|
|
57
|
-
};
|
|
58
|
-
return clientService.renderType({ type, criteria, itemCriteria, filter, rootPath: null, wrapRelated, locale });
|
|
59
|
-
},
|
|
60
|
-
renderRFR({ items, parent = null, parentNavItem = null, contentTypes = [], enabledCustomFieldsNames, }) {
|
|
61
|
-
const clientService = (0, utils_1.getPluginService)('client');
|
|
62
|
-
let pages = {};
|
|
63
|
-
let nav = {};
|
|
64
|
-
let navItems = [];
|
|
65
|
-
items.forEach(item => {
|
|
66
|
-
const { items: itemChilds, ...itemProps } = item;
|
|
67
|
-
const itemNav = clientService.renderRFRNav(itemProps);
|
|
68
|
-
const itemPage = clientService.renderRFRPage(itemProps, parent, enabledCustomFieldsNames);
|
|
69
|
-
if (item.type !== "EXTERNAL") {
|
|
70
|
-
pages = {
|
|
71
|
-
...pages,
|
|
72
|
-
[itemPage.id]: {
|
|
73
|
-
...itemPage,
|
|
74
|
-
},
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
if (item.menuAttached) {
|
|
78
|
-
navItems.push(itemNav);
|
|
79
|
-
}
|
|
80
|
-
if (!parent) {
|
|
81
|
-
nav = {
|
|
82
|
-
...nav,
|
|
83
|
-
root: navItems,
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
else {
|
|
87
|
-
const navLevel = navItems
|
|
88
|
-
.filter(navItem => navItem.type !== "EXTERNAL");
|
|
89
|
-
if (!(0, lodash_1.isEmpty)(navLevel))
|
|
90
|
-
nav = {
|
|
91
|
-
...nav,
|
|
92
|
-
[parent]: navLevel.concat(parentNavItem ? parentNavItem : []),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
if (!(0, lodash_1.isEmpty)(itemChilds)) {
|
|
96
|
-
const { nav: nestedNavs } = clientService.renderRFR({
|
|
97
|
-
items: itemChilds,
|
|
98
|
-
parent: itemPage.id,
|
|
99
|
-
parentNavItem: itemNav,
|
|
100
|
-
contentTypes,
|
|
101
|
-
enabledCustomFieldsNames,
|
|
102
|
-
});
|
|
103
|
-
const { pages: nestedPages } = clientService.renderRFR({
|
|
104
|
-
items: (itemChilds).filter(child => child.type !== "EXTERNAL"),
|
|
105
|
-
parent: itemPage.id,
|
|
106
|
-
parentNavItem: itemNav,
|
|
107
|
-
contentTypes,
|
|
108
|
-
enabledCustomFieldsNames,
|
|
109
|
-
});
|
|
110
|
-
pages = {
|
|
111
|
-
...pages,
|
|
112
|
-
...nestedPages,
|
|
113
|
-
};
|
|
114
|
-
nav = {
|
|
115
|
-
...nav,
|
|
116
|
-
...nestedNavs,
|
|
117
|
-
};
|
|
118
|
-
}
|
|
119
|
-
});
|
|
120
|
-
return {
|
|
121
|
-
pages,
|
|
122
|
-
nav,
|
|
123
|
-
};
|
|
124
|
-
},
|
|
125
|
-
renderRFRNav(item) {
|
|
126
|
-
const { uiRouterKey, title, path, type, audience } = item;
|
|
127
|
-
const itemCommon = {
|
|
128
|
-
label: title,
|
|
129
|
-
type: type,
|
|
130
|
-
audience,
|
|
131
|
-
};
|
|
132
|
-
if (type === "EXTERNAL") {
|
|
133
|
-
(0, types_1.assertNotEmpty)(path, new NavigationError_1.NavigationError("External navigation item's path is undefined", item));
|
|
134
|
-
return {
|
|
135
|
-
...itemCommon,
|
|
136
|
-
url: path
|
|
137
|
-
};
|
|
138
|
-
}
|
|
139
|
-
if (type === "INTERNAL") {
|
|
140
|
-
return {
|
|
141
|
-
...itemCommon,
|
|
142
|
-
page: uiRouterKey,
|
|
143
|
-
};
|
|
144
|
-
}
|
|
145
|
-
if (type === "WRAPPER") {
|
|
146
|
-
return {
|
|
147
|
-
...itemCommon,
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
throw new NavigationError_1.NavigationError("Unknown item type", item);
|
|
151
|
-
},
|
|
152
|
-
renderRFRPage(item, parent, enabledCustomFieldsNames) {
|
|
153
|
-
const { uiRouterKey, title, path, slug, related, type, audience, menuAttached } = item;
|
|
154
|
-
const { __contentType, id, __templateName } = related || {};
|
|
155
|
-
const contentType = __contentType || '';
|
|
156
|
-
return {
|
|
157
|
-
id: uiRouterKey,
|
|
158
|
-
title,
|
|
159
|
-
templateName: __templateName,
|
|
160
|
-
related: type === "INTERNAL" ? {
|
|
161
|
-
contentType,
|
|
162
|
-
id,
|
|
163
|
-
} : undefined,
|
|
164
|
-
path,
|
|
165
|
-
slug,
|
|
166
|
-
parent,
|
|
167
|
-
audience,
|
|
168
|
-
menuAttached,
|
|
169
|
-
...enabledCustomFieldsNames.reduce((acc, field) => ({ ...acc, [field]: (0, lodash_1.get)(item, field) }), {})
|
|
170
|
-
};
|
|
171
|
-
},
|
|
172
|
-
async renderTree(items = [], id = null, field = 'parent', path = '', itemParser = (i) => i) {
|
|
173
|
-
return (await Promise.all(items
|
|
174
|
-
.filter((item) => {
|
|
175
|
-
if (item[field] === null && id === null) {
|
|
176
|
-
return true;
|
|
177
|
-
}
|
|
178
|
-
let data = item[field];
|
|
179
|
-
if (data && typeof id === 'string') {
|
|
180
|
-
data = data.toString();
|
|
181
|
-
}
|
|
182
|
-
if (!!data && typeof data === 'object' && 'id' in data) {
|
|
183
|
-
return data.id === id;
|
|
184
|
-
}
|
|
185
|
-
return (data && data === id);
|
|
186
|
-
})
|
|
187
|
-
.filter(utils_1.filterOutUnpublished)
|
|
188
|
-
.map(async (item) => itemParser({
|
|
189
|
-
...item,
|
|
190
|
-
}, path, field))))
|
|
191
|
-
.sort((x, y) => {
|
|
192
|
-
if (x.order !== undefined && y.order !== undefined)
|
|
193
|
-
return x.order - y.order;
|
|
194
|
-
else
|
|
195
|
-
return 0;
|
|
196
|
-
});
|
|
197
|
-
},
|
|
198
|
-
async renderType({ type = utils_1.RENDER_TYPES.FLAT, criteria = {}, itemCriteria = {}, filter = null, rootPath = null, wrapRelated = false, locale, populate, }) {
|
|
199
|
-
const clientService = (0, utils_1.getPluginService)('client');
|
|
200
|
-
const adminService = (0, utils_1.getPluginService)('admin');
|
|
201
|
-
const commonService = (0, utils_1.getPluginService)('common');
|
|
202
|
-
const entityWhereClause = {
|
|
203
|
-
...criteria,
|
|
204
|
-
visible: true,
|
|
205
|
-
};
|
|
206
|
-
const { masterModel, itemModel } = (0, utils_1.getPluginModels)();
|
|
207
|
-
const entity = await (0, i18n_1.i18nAwareEntityReadHandler)({
|
|
208
|
-
entity: await strapi
|
|
209
|
-
.query(masterModel.uid)
|
|
210
|
-
.findOne({
|
|
211
|
-
where: entityWhereClause,
|
|
212
|
-
}),
|
|
213
|
-
entityUid: masterModel.uid,
|
|
214
|
-
strapi,
|
|
215
|
-
whereClause: entityWhereClause,
|
|
216
|
-
localeCode: locale,
|
|
217
|
-
});
|
|
218
|
-
if (entity && entity.id) {
|
|
219
|
-
const entities = await strapi.query(itemModel.uid).findMany({
|
|
220
|
-
where: {
|
|
221
|
-
master: entity.id,
|
|
222
|
-
...itemCriteria,
|
|
223
|
-
},
|
|
224
|
-
limit: Number.MAX_SAFE_INTEGER,
|
|
225
|
-
orderBy: [{ order: 'asc', }],
|
|
226
|
-
populate: ['related', 'audience', 'parent'],
|
|
227
|
-
});
|
|
228
|
-
if (!entities) {
|
|
229
|
-
return [];
|
|
230
|
-
}
|
|
231
|
-
const items = await commonService.getRelatedItems(entities, populate);
|
|
232
|
-
const { contentTypes, contentTypesNameFields, additionalFields } = await adminService.config(false);
|
|
233
|
-
const enabledCustomFieldsNames = (0, utils_1.getCustomFields)(additionalFields)
|
|
234
|
-
.reduce((acc, curr) => curr.enabled ? [...acc, curr.name] : acc, []);
|
|
235
|
-
const wrapContentType = (itemContentType) => wrapRelated && itemContentType ? {
|
|
236
|
-
id: itemContentType.id,
|
|
237
|
-
attributes: { ...itemContentType }
|
|
238
|
-
} : itemContentType;
|
|
239
|
-
const pickMediaFields = (0, fp_1.pick)(["name", "url", "mime", "width", "height", "previewUrl"]);
|
|
240
|
-
const customFieldsDefinitions = additionalFields.filter(_ => typeof _ !== "string");
|
|
241
|
-
switch (type) {
|
|
242
|
-
case utils_1.RENDER_TYPES.TREE:
|
|
243
|
-
case utils_1.RENDER_TYPES.RFR:
|
|
244
|
-
const getTemplateName = await (0, utils_1.templateNameFactory)(items, strapi, contentTypes);
|
|
245
|
-
const itemParser = async (item, path = '', field) => {
|
|
246
|
-
const isExternal = item.type === "EXTERNAL";
|
|
247
|
-
const parentPath = isExternal ? undefined : `${path === '/' ? '' : path}/${(0, lodash_1.first)(item.path) === '/'
|
|
248
|
-
? item.path.substring(1)
|
|
249
|
-
: item.path}`;
|
|
250
|
-
const slug = (0, lodash_1.isString)(parentPath) ? await commonService.getSlug(((0, lodash_1.first)(parentPath) === '/' ? parentPath.substring(1) : parentPath).replace(/\//g, '-')) : undefined;
|
|
251
|
-
const lastRelated = (0, lodash_1.isArray)(item.related) ? (0, lodash_1.last)(item.related) : item.related;
|
|
252
|
-
const relatedContentType = wrapContentType(lastRelated);
|
|
253
|
-
const customFields = enabledCustomFieldsNames.reduce((acc, field) => {
|
|
254
|
-
const mapper = customFieldsDefinitions.find(({ name }) => name === field)?.type === "media"
|
|
255
|
-
? (_) => pickMediaFields(JSON.parse(_))
|
|
256
|
-
: fp_1.identity;
|
|
257
|
-
const content = (0, lodash_1.get)(item, `additionalFields.${field}`);
|
|
258
|
-
return { ...acc, [field]: content ? mapper(content) : content };
|
|
259
|
-
}, {});
|
|
260
|
-
return {
|
|
261
|
-
id: item.id,
|
|
262
|
-
title: (0, utils_1.composeItemTitle)(item, contentTypesNameFields, contentTypes),
|
|
263
|
-
menuAttached: item.menuAttached,
|
|
264
|
-
order: item.order,
|
|
265
|
-
path: isExternal ? item.externalPath : parentPath,
|
|
266
|
-
type: item.type,
|
|
267
|
-
uiRouterKey: item.uiRouterKey,
|
|
268
|
-
slug: !slug && item.uiRouterKey ? commonService.getSlug(item.uiRouterKey) : slug,
|
|
269
|
-
external: isExternal,
|
|
270
|
-
related: isExternal || !lastRelated ? undefined : {
|
|
271
|
-
...relatedContentType,
|
|
272
|
-
__templateName: getTemplateName((lastRelated.relatedType || lastRelated.__contentType), lastRelated.id),
|
|
273
|
-
},
|
|
274
|
-
audience: !(0, lodash_1.isEmpty)(item.audience) ? item.audience.map(({ key }) => key) : undefined,
|
|
275
|
-
items: isExternal ? undefined : await clientService.renderTree(items, item.id, field, parentPath, itemParser),
|
|
276
|
-
...customFields
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
const { items: itemsFilteredByPath, root: rootElement, } = (0, utils_1.filterByPath)(items, rootPath);
|
|
280
|
-
const treeStructure = await clientService.renderTree((0, lodash_1.isNil)(rootPath) ? items : itemsFilteredByPath, (0, lodash_1.get)(rootElement, 'parent.id') ?? null, 'parent', (0, lodash_1.get)(rootElement, 'parent.path'), itemParser);
|
|
281
|
-
const filteredStructure = filter
|
|
282
|
-
? treeStructure.filter((item) => item.uiRouterKey === filter)
|
|
283
|
-
: treeStructure;
|
|
284
|
-
if (type === utils_1.RENDER_TYPES.RFR) {
|
|
285
|
-
return clientService.renderRFR({
|
|
286
|
-
items: filteredStructure,
|
|
287
|
-
contentTypes,
|
|
288
|
-
enabledCustomFieldsNames,
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
return filteredStructure;
|
|
292
|
-
default:
|
|
293
|
-
const publishedItems = items.filter(utils_1.filterOutUnpublished);
|
|
294
|
-
const result = (0, lodash_1.isNil)(rootPath) ? items : (0, utils_1.filterByPath)(publishedItems, rootPath).items;
|
|
295
|
-
const defaultCache = new Map();
|
|
296
|
-
const getNestedOrders = (id, cache = defaultCache) => {
|
|
297
|
-
const cached = cache.get(id);
|
|
298
|
-
if (!(0, lodash_1.isNil)(cached))
|
|
299
|
-
return cached;
|
|
300
|
-
const item = result.find(item => item.id === id);
|
|
301
|
-
if ((0, lodash_1.isNil)(item))
|
|
302
|
-
return [0];
|
|
303
|
-
const { order, parent } = item;
|
|
304
|
-
const nestedOrders = parent
|
|
305
|
-
? getNestedOrders(parent.id, cache).concat(order)
|
|
306
|
-
: [order];
|
|
307
|
-
cache.set(id, nestedOrders);
|
|
308
|
-
return nestedOrders;
|
|
309
|
-
};
|
|
310
|
-
return result
|
|
311
|
-
.map(({ additionalFields, autoSync: _, ...item }) => {
|
|
312
|
-
const customFields = enabledCustomFieldsNames.reduce((acc, field) => {
|
|
313
|
-
const mapper = customFieldsDefinitions.find(({ name }) => name === field)?.type === "media"
|
|
314
|
-
? (_) => pickMediaFields(JSON.parse(_.toString()))
|
|
315
|
-
: fp_1.identity;
|
|
316
|
-
const content = (0, lodash_1.get)(additionalFields, field);
|
|
317
|
-
return { ...acc, [field]: content ? mapper(content) : content };
|
|
318
|
-
}, {});
|
|
319
|
-
return ({
|
|
320
|
-
...item,
|
|
321
|
-
audience: item.audience?.map(_ => (_).key),
|
|
322
|
-
title: (0, utils_1.composeItemTitle)({ ...item, additionalFields }, contentTypesNameFields, contentTypes) || '',
|
|
323
|
-
related: wrapContentType(item.related),
|
|
324
|
-
items: null,
|
|
325
|
-
...customFields,
|
|
326
|
-
});
|
|
327
|
-
})
|
|
328
|
-
.sort((a, b) => (0, utils_1.compareArraysOfNumbers)(getNestedOrders(a.id), getNestedOrders(b.id)));
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
throw new utils_2.errors.NotFoundError();
|
|
332
|
-
},
|
|
333
|
-
});
|
|
334
|
-
exports.default = clientService;
|
|
335
|
-
//# sourceMappingURL=client.js.map
|