@strapi/i18n 0.0.0 → 5.0.0-beta.11

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.
Files changed (165) hide show
  1. package/README.md +17 -1
  2. package/dist/_chunks/SettingsPage-B5sTcP82.mjs +554 -0
  3. package/dist/_chunks/SettingsPage-B5sTcP82.mjs.map +1 -0
  4. package/dist/_chunks/SettingsPage-DT1sxWa2.js +574 -0
  5. package/dist/_chunks/SettingsPage-DT1sxWa2.js.map +1 -0
  6. package/dist/_chunks/de-9eCAqqrB.mjs +66 -0
  7. package/dist/_chunks/de-9eCAqqrB.mjs.map +1 -0
  8. package/dist/_chunks/de-DtWiGdHl.js +66 -0
  9. package/dist/_chunks/de-DtWiGdHl.js.map +1 -0
  10. package/dist/_chunks/dk-2qBjxt-P.mjs +66 -0
  11. package/dist/_chunks/dk-2qBjxt-P.mjs.map +1 -0
  12. package/dist/_chunks/dk-D8C-casx.js +66 -0
  13. package/dist/_chunks/dk-D8C-casx.js.map +1 -0
  14. package/dist/_chunks/en-BsOU9o5z.js +74 -0
  15. package/dist/_chunks/en-BsOU9o5z.js.map +1 -0
  16. package/dist/_chunks/en-CM6Pjfyv.mjs +74 -0
  17. package/dist/_chunks/en-CM6Pjfyv.mjs.map +1 -0
  18. package/dist/_chunks/es-DS-XFGSw.js +66 -0
  19. package/dist/_chunks/es-DS-XFGSw.js.map +1 -0
  20. package/dist/_chunks/es-DlmMVaBG.mjs +66 -0
  21. package/dist/_chunks/es-DlmMVaBG.mjs.map +1 -0
  22. package/dist/_chunks/fr-3S6ke71d.mjs +66 -0
  23. package/dist/_chunks/fr-3S6ke71d.mjs.map +1 -0
  24. package/dist/_chunks/fr-BTjekDpq.js +66 -0
  25. package/dist/_chunks/fr-BTjekDpq.js.map +1 -0
  26. package/dist/_chunks/index-DsNqyQKx.mjs +1369 -0
  27. package/dist/_chunks/index-DsNqyQKx.mjs.map +1 -0
  28. package/dist/_chunks/index-jMrzaEb9.js +1391 -0
  29. package/dist/_chunks/index-jMrzaEb9.js.map +1 -0
  30. package/dist/_chunks/ko-DmcGUBQ3.js +65 -0
  31. package/dist/_chunks/ko-DmcGUBQ3.js.map +1 -0
  32. package/dist/_chunks/ko-qTjQ8IMw.mjs +65 -0
  33. package/dist/_chunks/ko-qTjQ8IMw.mjs.map +1 -0
  34. package/dist/_chunks/pl-B67TSHqT.mjs +66 -0
  35. package/dist/_chunks/pl-B67TSHqT.mjs.map +1 -0
  36. package/dist/_chunks/pl-Cn5RYonZ.js +66 -0
  37. package/dist/_chunks/pl-Cn5RYonZ.js.map +1 -0
  38. package/dist/_chunks/ru-BMBgVL3s.js +68 -0
  39. package/dist/_chunks/ru-BMBgVL3s.js.map +1 -0
  40. package/dist/_chunks/ru-hagMa57T.mjs +68 -0
  41. package/dist/_chunks/ru-hagMa57T.mjs.map +1 -0
  42. package/dist/_chunks/tr-CarUU76c.js +66 -0
  43. package/dist/_chunks/tr-CarUU76c.js.map +1 -0
  44. package/dist/_chunks/tr-Dw_jmkG-.mjs +66 -0
  45. package/dist/_chunks/tr-Dw_jmkG-.mjs.map +1 -0
  46. package/dist/_chunks/zh-57YM4amO.mjs +66 -0
  47. package/dist/_chunks/zh-57YM4amO.mjs.map +1 -0
  48. package/dist/_chunks/zh-CukOviB0.js +66 -0
  49. package/dist/_chunks/zh-CukOviB0.js.map +1 -0
  50. package/dist/_chunks/zh-Hans-DSHIXAa3.js +57 -0
  51. package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +1 -0
  52. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +57 -0
  53. package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +1 -0
  54. package/dist/admin/index.js +6 -0
  55. package/dist/admin/index.js.map +1 -0
  56. package/dist/admin/index.mjs +7 -0
  57. package/dist/admin/index.mjs.map +1 -0
  58. package/dist/admin/src/components/BulkLocaleActionModal.d.ts +15 -0
  59. package/dist/admin/src/components/CMHeaderActions.d.ts +10 -0
  60. package/dist/admin/src/components/CMListViewModalsAdditionalInformation.d.ts +4 -0
  61. package/dist/admin/src/components/CheckboxConfirmation.d.ts +20 -0
  62. package/dist/admin/src/components/CreateLocale.d.ts +29 -0
  63. package/dist/admin/src/components/DeleteLocale.d.ts +5 -0
  64. package/dist/admin/src/components/EditLocale.d.ts +14 -0
  65. package/dist/admin/src/components/Initializer.d.ts +5 -0
  66. package/dist/admin/src/components/LocaleListCell.d.ts +9 -0
  67. package/dist/admin/src/components/LocalePicker.d.ts +2 -0
  68. package/dist/admin/src/components/LocaleTable.d.ts +11 -0
  69. package/dist/admin/src/constants.d.ts +22 -0
  70. package/dist/admin/src/contentManagerHooks/editView.d.ts +6 -0
  71. package/dist/admin/src/contentManagerHooks/listView.d.ts +22 -0
  72. package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +40 -0
  73. package/dist/admin/src/hooks/useI18n.d.ts +16 -0
  74. package/dist/admin/src/index.d.ts +16 -0
  75. package/dist/admin/src/middlewares/extendCTBAttributeInitialData.d.ts +4 -0
  76. package/dist/admin/src/middlewares/extendCTBInitialData.d.ts +4 -0
  77. package/dist/admin/src/middlewares/rbac-middleware.d.ts +3 -0
  78. package/dist/admin/src/pages/SettingsPage.d.ts +3 -0
  79. package/dist/admin/src/pluginId.d.ts +1 -0
  80. package/dist/admin/src/services/api.d.ts +2 -0
  81. package/dist/admin/src/services/locales.d.ts +4 -0
  82. package/dist/admin/src/services/relations.d.ts +7 -0
  83. package/dist/admin/src/types.d.ts +9 -0
  84. package/dist/admin/src/utils/baseQuery.d.ts +5 -0
  85. package/dist/admin/src/utils/fields.d.ts +7 -0
  86. package/dist/admin/src/utils/getTranslation.d.ts +2 -0
  87. package/dist/admin/src/utils/prefixPluginTranslations.d.ts +3 -0
  88. package/dist/admin/src/utils/schemas.d.ts +24 -0
  89. package/dist/admin/src/utils/strings.d.ts +2 -0
  90. package/dist/server/index.js +3522 -0
  91. package/dist/server/index.js.map +1 -0
  92. package/dist/server/index.mjs +3503 -0
  93. package/dist/server/index.mjs.map +1 -0
  94. package/dist/server/src/bootstrap.d.ts +6 -0
  95. package/dist/server/src/bootstrap.d.ts.map +1 -0
  96. package/dist/server/src/constants/index.d.ts +15 -0
  97. package/dist/server/src/constants/index.d.ts.map +1 -0
  98. package/dist/server/src/content-types/index.d.ts +37 -0
  99. package/dist/server/src/content-types/index.d.ts.map +1 -0
  100. package/dist/server/src/content-types/locale/index.d.ts +35 -0
  101. package/dist/server/src/content-types/locale/index.d.ts.map +1 -0
  102. package/dist/server/src/controllers/content-types.d.ts +6 -0
  103. package/dist/server/src/controllers/content-types.d.ts.map +1 -0
  104. package/dist/server/src/controllers/index.d.ts +10 -0
  105. package/dist/server/src/controllers/index.d.ts.map +1 -0
  106. package/dist/server/src/controllers/iso-locales.d.ts +4 -0
  107. package/dist/server/src/controllers/iso-locales.d.ts.map +1 -0
  108. package/dist/server/src/controllers/locales.d.ts +4 -0
  109. package/dist/server/src/controllers/locales.d.ts.map +1 -0
  110. package/dist/server/src/controllers/validate-locale-creation.d.ts +4 -0
  111. package/dist/server/src/controllers/validate-locale-creation.d.ts.map +1 -0
  112. package/dist/server/src/domain/locale.d.ts +11 -0
  113. package/dist/server/src/domain/locale.d.ts.map +1 -0
  114. package/dist/server/src/graphql.d.ts +8 -0
  115. package/dist/server/src/graphql.d.ts.map +1 -0
  116. package/dist/server/src/index.d.ts +148 -0
  117. package/dist/server/src/index.d.ts.map +1 -0
  118. package/dist/server/src/migrations/content-type/disable/index.d.ts +3 -0
  119. package/dist/server/src/migrations/content-type/disable/index.d.ts.map +1 -0
  120. package/dist/server/src/migrations/content-type/enable/index.d.ts +3 -0
  121. package/dist/server/src/migrations/content-type/enable/index.d.ts.map +1 -0
  122. package/dist/server/src/register.d.ts +6 -0
  123. package/dist/server/src/register.d.ts.map +1 -0
  124. package/dist/server/src/routes/admin.d.ts +18 -0
  125. package/dist/server/src/routes/admin.d.ts.map +1 -0
  126. package/dist/server/src/routes/content-api.d.ts +10 -0
  127. package/dist/server/src/routes/content-api.d.ts.map +1 -0
  128. package/dist/server/src/routes/index.d.ts +28 -0
  129. package/dist/server/src/routes/index.d.ts.map +1 -0
  130. package/dist/server/src/services/content-types.d.ts +13 -0
  131. package/dist/server/src/services/content-types.d.ts.map +1 -0
  132. package/dist/server/src/services/entity-service-decorator.d.ts +29 -0
  133. package/dist/server/src/services/entity-service-decorator.d.ts.map +1 -0
  134. package/dist/server/src/services/index.d.ts +71 -0
  135. package/dist/server/src/services/index.d.ts.map +1 -0
  136. package/dist/server/src/services/iso-locales.d.ts +10 -0
  137. package/dist/server/src/services/iso-locales.d.ts.map +1 -0
  138. package/dist/server/src/services/locales.d.ts +17 -0
  139. package/dist/server/src/services/locales.d.ts.map +1 -0
  140. package/dist/server/src/services/localizations.d.ts +8 -0
  141. package/dist/server/src/services/localizations.d.ts.map +1 -0
  142. package/dist/server/src/services/metrics.d.ts +8 -0
  143. package/dist/server/src/services/metrics.d.ts.map +1 -0
  144. package/dist/server/src/services/permissions/actions.d.ts +16 -0
  145. package/dist/server/src/services/permissions/actions.d.ts.map +1 -0
  146. package/dist/server/src/services/permissions/conditions.d.ts +15 -0
  147. package/dist/server/src/services/permissions/conditions.d.ts.map +1 -0
  148. package/dist/server/src/services/permissions/engine.d.ts +6 -0
  149. package/dist/server/src/services/permissions/engine.d.ts.map +1 -0
  150. package/dist/server/src/services/permissions/sections-builder.d.ts +6 -0
  151. package/dist/server/src/services/permissions/sections-builder.d.ts.map +1 -0
  152. package/dist/server/src/services/permissions.d.ts +28 -0
  153. package/dist/server/src/services/permissions.d.ts.map +1 -0
  154. package/dist/server/src/utils/index.d.ts +43 -0
  155. package/dist/server/src/utils/index.d.ts.map +1 -0
  156. package/dist/server/src/validation/content-types.d.ts +3 -0
  157. package/dist/server/src/validation/content-types.d.ts.map +1 -0
  158. package/dist/server/src/validation/locales.d.ts +12 -0
  159. package/dist/server/src/validation/locales.d.ts.map +1 -0
  160. package/dist/shared/contracts/content-manager.d.ts +46 -0
  161. package/dist/shared/contracts/iso-locales.d.ts +21 -0
  162. package/dist/shared/contracts/locales.d.ts +77 -0
  163. package/dist/shared/contracts/shared.d.ts +6 -0
  164. package/package.json +82 -4
  165. package/strapi-server.js +3 -0
@@ -0,0 +1,15 @@
1
+ import { FormErrors } from '@strapi/admin/strapi-admin';
2
+ import { Locale } from '../../../shared/contracts/locales';
3
+ import { LocaleStatus } from './CMHeaderActions';
4
+ interface BulkLocaleActionModalProps {
5
+ rows: LocaleStatus[];
6
+ headers: {
7
+ label: string;
8
+ name: string;
9
+ }[];
10
+ localesMetadata: Locale[];
11
+ validationErrors?: FormErrors;
12
+ }
13
+ declare const BulkLocaleActionModal: ({ headers, rows, localesMetadata, validationErrors, }: BulkLocaleActionModalProps) => import("react/jsx-runtime").JSX.Element;
14
+ export { BulkLocaleActionModal };
15
+ export type { BulkLocaleActionModalProps };
@@ -0,0 +1,10 @@
1
+ import { type HeaderActionComponent, type DocumentActionComponent } from '@strapi/content-manager/strapi-admin';
2
+ import { Modules } from '@strapi/types';
3
+ declare const LocalePickerAction: HeaderActionComponent;
4
+ declare const DeleteLocaleAction: DocumentActionComponent;
5
+ export type LocaleStatus = {
6
+ locale: string;
7
+ status: Modules.Documents.Params.PublicationStatus.Kind | 'modified';
8
+ };
9
+ declare const BulkLocalePublishAction: DocumentActionComponent;
10
+ export { BulkLocalePublishAction, DeleteLocaleAction, LocalePickerAction };
@@ -0,0 +1,4 @@
1
+ declare const DeleteModalAdditionalInfo: () => import("react/jsx-runtime").JSX.Element | null;
2
+ declare const PublishModalAdditionalInfo: () => import("react/jsx-runtime").JSX.Element | null;
3
+ declare const UnpublishModalAdditionalInfo: () => import("react/jsx-runtime").JSX.Element | null;
4
+ export { DeleteModalAdditionalInfo, PublishModalAdditionalInfo, UnpublishModalAdditionalInfo };
@@ -0,0 +1,20 @@
1
+ import { MessageDescriptor } from 'react-intl';
2
+ interface IntlMessage extends MessageDescriptor {
3
+ values: object;
4
+ }
5
+ interface CheckboxConfirmationProps {
6
+ description: IntlMessage;
7
+ intlLabel: IntlMessage;
8
+ isCreating?: boolean;
9
+ name: string;
10
+ onChange: (event: {
11
+ target: {
12
+ name: string;
13
+ value: boolean;
14
+ type: string;
15
+ };
16
+ }) => void;
17
+ value: boolean;
18
+ }
19
+ declare const CheckboxConfirmation: ({ description, isCreating, intlLabel, name, onChange, value, }: CheckboxConfirmationProps) => import("react/jsx-runtime").JSX.Element;
20
+ export { CheckboxConfirmation };
@@ -0,0 +1,29 @@
1
+ import { ButtonProps } from '@strapi/design-system';
2
+ import * as yup from 'yup';
3
+ import { CreateLocale } from '../../../shared/contracts/locales';
4
+ interface CreateLocaleProps extends Pick<ButtonProps, 'disabled' | 'variant'> {
5
+ }
6
+ declare const CreateLocale: ({ disabled, variant }: CreateLocaleProps) => import("react/jsx-runtime").JSX.Element;
7
+ declare const LOCALE_SCHEMA: yup.default<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
8
+ code: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
9
+ name: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
10
+ isDefault: yup.BooleanSchema<boolean | undefined, Record<string, any>, boolean | undefined>;
11
+ }>, Record<string, any>, import("yup/lib/object").TypeOfShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
12
+ code: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
13
+ name: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
14
+ isDefault: yup.BooleanSchema<boolean | undefined, Record<string, any>, boolean | undefined>;
15
+ }>>, import("yup/lib/object").AssertsShape<import("yup/lib/object").Assign<import("yup/lib/object").ObjectShape, {
16
+ code: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
17
+ name: import("yup/lib/string").RequiredStringSchema<string | undefined, Record<string, any>>;
18
+ isDefault: yup.BooleanSchema<boolean | undefined, Record<string, any>, boolean | undefined>;
19
+ }>>>;
20
+ declare const SubmitButton: () => import("react/jsx-runtime").JSX.Element;
21
+ interface BaseFormProps {
22
+ mode?: 'create' | 'edit';
23
+ }
24
+ declare const BaseForm: ({ mode }: BaseFormProps) => import("react/jsx-runtime").JSX.Element | null;
25
+ type AdvancedFormProps = {
26
+ isDefaultLocale?: boolean;
27
+ };
28
+ declare const AdvancedForm: ({ isDefaultLocale }: AdvancedFormProps) => import("react/jsx-runtime").JSX.Element;
29
+ export { CreateLocale, BaseForm, AdvancedForm, SubmitButton, LOCALE_SCHEMA };
@@ -0,0 +1,5 @@
1
+ import type { Locale } from '../../../shared/contracts/locales';
2
+ interface DeleteLocaleProps extends Locale {
3
+ }
4
+ declare const DeleteLocale: ({ id, name }: DeleteLocaleProps) => import("react/jsx-runtime").JSX.Element;
5
+ export { DeleteLocale };
@@ -0,0 +1,14 @@
1
+ import { Locale } from '../../../shared/contracts/locales';
2
+ interface EditLocaleProps extends Omit<EditModalProps, 'open' | 'onOpenChange'> {
3
+ }
4
+ declare const EditLocale: (props: EditLocaleProps) => import("react/jsx-runtime").JSX.Element;
5
+ interface EditModalProps extends Pick<Locale, 'id' | 'isDefault' | 'name' | 'code'> {
6
+ open: boolean;
7
+ onOpenChange: (open: boolean) => void;
8
+ }
9
+ /**
10
+ * @internal
11
+ * @description Exported to be used when someone clicks on a table row.
12
+ */
13
+ declare const EditModal: ({ id, code, isDefault, name, open, onOpenChange }: EditModalProps) => import("react/jsx-runtime").JSX.Element;
14
+ export { EditLocale, EditModal };
@@ -0,0 +1,5 @@
1
+ type InitializerProps = {
2
+ setPlugin: (plugin: string) => void;
3
+ };
4
+ declare const Initializer: ({ setPlugin }: InitializerProps) => null;
5
+ export { Initializer };
@@ -0,0 +1,9 @@
1
+ interface LocaleListCellProps {
2
+ documentId: string;
3
+ collectionType: string;
4
+ locale: string;
5
+ model: string;
6
+ }
7
+ declare const LocaleListCell: ({ documentId, locale: currentLocale, collectionType, model, }: LocaleListCellProps) => import("react/jsx-runtime").JSX.Element | null;
8
+ export { LocaleListCell };
9
+ export type { LocaleListCellProps };
@@ -0,0 +1,2 @@
1
+ declare const LocalePicker: () => import("react/jsx-runtime").JSX.Element | null;
2
+ export { LocalePicker };
@@ -0,0 +1,11 @@
1
+ import type { Locale } from '../../../shared/contracts/locales';
2
+ type LocaleTableProps = {
3
+ locales?: Locale[];
4
+ canDelete?: boolean;
5
+ canUpdate?: boolean;
6
+ onDeleteLocale?: (locale: Locale) => void;
7
+ onEditLocale?: (locale: Locale) => void;
8
+ };
9
+ declare const LocaleTable: ({ locales, canDelete, canUpdate }: LocaleTableProps) => import("react/jsx-runtime").JSX.Element;
10
+ export { LocaleTable };
11
+ export type { LocaleTableProps };
@@ -0,0 +1,22 @@
1
+ export declare const PERMISSIONS: {
2
+ accessMain: {
3
+ action: string;
4
+ subject: null;
5
+ }[];
6
+ create: {
7
+ action: string;
8
+ subject: null;
9
+ }[];
10
+ delete: {
11
+ action: string;
12
+ subject: null;
13
+ }[];
14
+ update: {
15
+ action: string;
16
+ subject: null;
17
+ }[];
18
+ read: {
19
+ action: string;
20
+ subject: null;
21
+ }[];
22
+ };
@@ -0,0 +1,6 @@
1
+ import type { EditLayout } from '@strapi/content-manager/strapi-admin';
2
+ interface MutateEditViewArgs {
3
+ layout: EditLayout;
4
+ }
5
+ declare const mutateEditViewHook: ({ layout }: MutateEditViewArgs) => MutateEditViewArgs;
6
+ export { mutateEditViewHook };
@@ -0,0 +1,22 @@
1
+ import type { ListFieldLayout, ListLayout } from '@strapi/content-manager/strapi-admin';
2
+ interface AddColumnToTableHookArgs {
3
+ layout: ListLayout;
4
+ displayedHeaders: ListFieldLayout[];
5
+ }
6
+ declare const addColumnToTableHook: ({ displayedHeaders, layout }: AddColumnToTableHookArgs) => {
7
+ displayedHeaders: (ListFieldLayout | {
8
+ attribute: {
9
+ type: string;
10
+ };
11
+ label: {
12
+ id: string;
13
+ defaultMessage: string;
14
+ };
15
+ searchable: boolean;
16
+ sortable: boolean;
17
+ name: string;
18
+ cellFormatter: (props: any, _header: any, meta: any) => import("react/jsx-runtime").JSX.Element;
19
+ })[];
20
+ layout: ListLayout;
21
+ };
22
+ export { addColumnToTableHook };
@@ -0,0 +1,40 @@
1
+ import { Schema } from '@strapi/types';
2
+ interface AddLocaleToReleasesHookArgs {
3
+ displayedHeaders: {
4
+ key: string;
5
+ fieldSchema: Schema.Attribute.Kind | 'custom';
6
+ metadatas: {
7
+ label: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ };
11
+ searchable: boolean;
12
+ sortable: boolean;
13
+ };
14
+ name: string;
15
+ }[];
16
+ hasI18nEnabled: boolean;
17
+ }
18
+ declare const addLocaleToReleasesHook: ({ displayedHeaders }: AddLocaleToReleasesHookArgs) => {
19
+ displayedHeaders: ({
20
+ key: string;
21
+ fieldSchema: Schema.Attribute.Kind | 'custom';
22
+ metadatas: {
23
+ label: {
24
+ id: string;
25
+ defaultMessage: string;
26
+ };
27
+ searchable: boolean;
28
+ sortable: boolean;
29
+ };
30
+ name: string;
31
+ } | {
32
+ label: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ };
36
+ name: string;
37
+ })[];
38
+ hasI18nEnabled: boolean;
39
+ };
40
+ export { addLocaleToReleasesHook };
@@ -0,0 +1,16 @@
1
+ type UseI18n = () => {
2
+ hasI18n: boolean;
3
+ canCreate: string[];
4
+ canRead: string[];
5
+ canUpdate: string[];
6
+ canDelete: string[];
7
+ canPublish: string[];
8
+ };
9
+ /**
10
+ * @alpha
11
+ * @description This hook is used to get the i18n status of a content type.
12
+ * Also returns the CRUDP permission locale properties for the content type
13
+ * so we know which locales the user can perform actions on.
14
+ */
15
+ declare const useI18n: UseI18n;
16
+ export { useI18n };
@@ -0,0 +1,16 @@
1
+ declare const _default: {
2
+ register(app: any): void;
3
+ bootstrap(app: any): void;
4
+ registerTrads({ locales }: {
5
+ locales: string[];
6
+ }): Promise<({
7
+ data: {
8
+ [x: string]: string;
9
+ };
10
+ locale: string;
11
+ } | {
12
+ data: {};
13
+ locale: string;
14
+ })[]>;
15
+ };
16
+ export default _default;
@@ -0,0 +1,4 @@
1
+ import type { Middleware } from '@reduxjs/toolkit';
2
+ import type { Store } from '@strapi/admin/strapi-admin';
3
+ declare const extendCTBAttributeInitialDataMiddleware: () => Middleware<object, ReturnType<Store['getState']>>;
4
+ export { extendCTBAttributeInitialDataMiddleware };
@@ -0,0 +1,4 @@
1
+ import type { Middleware } from '@reduxjs/toolkit';
2
+ import type { Store } from '@strapi/admin/strapi-admin';
3
+ declare const extendCTBInitialDataMiddleware: () => Middleware<object, ReturnType<Store['getState']>>;
4
+ export { extendCTBInitialDataMiddleware };
@@ -0,0 +1,3 @@
1
+ import type { RBACMiddleware } from '@strapi/admin/strapi-admin';
2
+ declare const localeMiddleware: RBACMiddleware;
3
+ export { localeMiddleware };
@@ -0,0 +1,3 @@
1
+ declare const SettingsPage: () => import("react/jsx-runtime").JSX.Element;
2
+ declare const ProtectedSettingsPage: () => import("react/jsx-runtime").JSX.Element;
3
+ export { ProtectedSettingsPage, SettingsPage };
@@ -0,0 +1 @@
1
+ export declare const pluginId = "i18n";
@@ -0,0 +1,2 @@
1
+ declare const i18nApi: import("@reduxjs/toolkit/query").Api<import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, import("@reduxjs/toolkit/dist/query/endpointDefinitions").UpdateDefinitions<{}, "Locale", never>, "adminApi", "Locale", typeof import("@reduxjs/toolkit/query").coreModuleName | typeof import("@reduxjs/toolkit/dist/query/react").reactHooksModuleName>;
2
+ export { i18nApi };
@@ -0,0 +1,4 @@
1
+ import type { GetISOLocales } from '../../../shared/contracts/iso-locales';
2
+ import type { GetLocales, CreateLocale, DeleteLocale, UpdateLocale } from '../../../shared/contracts/locales';
3
+ declare const useCreateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Omit<import("../../../shared/contracts/locales").Locale, keyof import("../../../shared/contracts/shared").Entity>, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", CreateLocale.Response, "adminApi">>, useDeleteLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<import("@strapi/types/dist/data").ID, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", DeleteLocale.Response, "adminApi">>, useGetLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", GetLocales.Response, "adminApi">>, useGetDefaultLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", GetISOLocales.Response, "adminApi">>, useUpdateLocaleMutation: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseMutation<import("@reduxjs/toolkit/query").MutationDefinition<Pick<import("../../../shared/contracts/locales").Locale, "name" | "isDefault"> & UpdateLocale.Params, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", UpdateLocale.Response, "adminApi">>;
4
+ export { useCreateLocaleMutation, useDeleteLocaleMutation, useGetLocalesQuery, useGetDefaultLocalesQuery, useUpdateLocaleMutation, };
@@ -0,0 +1,7 @@
1
+ declare const useGetManyDraftRelationCountQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<{
2
+ documentIds?: string[] | undefined;
3
+ locale?: string | string[] | null | undefined;
4
+ } & {
5
+ model: string;
6
+ }, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@strapi/admin/strapi-admin").QueryArguments, unknown, import("@strapi/admin/strapi-admin").BaseQueryError, {}, {}>, "Locale", number, "adminApi">>;
7
+ export { useGetManyDraftRelationCountQuery };
@@ -0,0 +1,9 @@
1
+ import type { Modules } from '@strapi/types';
2
+ export interface I18nBaseQuery {
3
+ plugins?: {
4
+ i18n?: {
5
+ locale?: string;
6
+ relatedEntityId?: Modules.Documents.ID;
7
+ };
8
+ };
9
+ }
@@ -0,0 +1,5 @@
1
+ import { SerializedError } from '@reduxjs/toolkit';
2
+ import { type ApiError, type UnknownApiError } from '@strapi/admin/strapi-admin';
3
+ type BaseQueryError = ApiError | UnknownApiError | SerializedError;
4
+ declare const isBaseQueryError: (error: BaseQueryError) => error is ApiError | UnknownApiError;
5
+ export { isBaseQueryError };
@@ -0,0 +1,7 @@
1
+ declare const LOCALIZED_FIELDS: string[];
2
+ declare const doesPluginOptionsHaveI18nLocalized: (opts?: object) => opts is {
3
+ i18n: {
4
+ localized: boolean;
5
+ };
6
+ };
7
+ export { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };
@@ -0,0 +1,2 @@
1
+ declare const getTranslation: (id: string) => string;
2
+ export { getTranslation };
@@ -0,0 +1,3 @@
1
+ type TradOptions = Record<string, string>;
2
+ declare const prefixPluginTranslations: (trad: TradOptions, pluginId: string) => TradOptions;
3
+ export { prefixPluginTranslations };
@@ -0,0 +1,24 @@
1
+ import type { Schema } from '@strapi/types';
2
+ declare const mutateCTBContentTypeSchema: (nextSchema: Schema.ContentType, prevSchema?: {
3
+ apiID?: string;
4
+ schema?: Schema.ContentType;
5
+ uid?: string;
6
+ }) => import("@strapi/types/dist/struct").ContentTypeSchema | {
7
+ pluginOptions: Pick<{
8
+ i18n: {
9
+ localized: boolean;
10
+ };
11
+ }, never>;
12
+ attributes: Record<string, OmitByPath<Schema.Attribute.AnyAttribute, ["pluginOptions", "i18n"]>>;
13
+ modelType: "contentType";
14
+ uid: import("@strapi/types/dist/uid").ContentType;
15
+ kind: import("@strapi/types/dist/struct").ContentTypeKind;
16
+ info: import("@strapi/types/dist/struct").ContentTypeSchemaInfo;
17
+ indexes?: unknown[] | undefined;
18
+ modelName: string;
19
+ globalId: string;
20
+ options?: import("@strapi/types/dist/struct").SchemaOptions | undefined;
21
+ collectionName?: string | undefined;
22
+ };
23
+ type OmitByPath<T extends object, K extends string[]> = Pick<T, Exclude<keyof T, K[number]>>;
24
+ export { mutateCTBContentTypeSchema };
@@ -0,0 +1,2 @@
1
+ declare const capitalize: (str: string) => string;
2
+ export { capitalize };