@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.
- package/README.md +17 -1
- package/dist/_chunks/SettingsPage-B5sTcP82.mjs +554 -0
- package/dist/_chunks/SettingsPage-B5sTcP82.mjs.map +1 -0
- package/dist/_chunks/SettingsPage-DT1sxWa2.js +574 -0
- package/dist/_chunks/SettingsPage-DT1sxWa2.js.map +1 -0
- package/dist/_chunks/de-9eCAqqrB.mjs +66 -0
- package/dist/_chunks/de-9eCAqqrB.mjs.map +1 -0
- package/dist/_chunks/de-DtWiGdHl.js +66 -0
- package/dist/_chunks/de-DtWiGdHl.js.map +1 -0
- package/dist/_chunks/dk-2qBjxt-P.mjs +66 -0
- package/dist/_chunks/dk-2qBjxt-P.mjs.map +1 -0
- package/dist/_chunks/dk-D8C-casx.js +66 -0
- package/dist/_chunks/dk-D8C-casx.js.map +1 -0
- package/dist/_chunks/en-BsOU9o5z.js +74 -0
- package/dist/_chunks/en-BsOU9o5z.js.map +1 -0
- package/dist/_chunks/en-CM6Pjfyv.mjs +74 -0
- package/dist/_chunks/en-CM6Pjfyv.mjs.map +1 -0
- package/dist/_chunks/es-DS-XFGSw.js +66 -0
- package/dist/_chunks/es-DS-XFGSw.js.map +1 -0
- package/dist/_chunks/es-DlmMVaBG.mjs +66 -0
- package/dist/_chunks/es-DlmMVaBG.mjs.map +1 -0
- package/dist/_chunks/fr-3S6ke71d.mjs +66 -0
- package/dist/_chunks/fr-3S6ke71d.mjs.map +1 -0
- package/dist/_chunks/fr-BTjekDpq.js +66 -0
- package/dist/_chunks/fr-BTjekDpq.js.map +1 -0
- package/dist/_chunks/index-DsNqyQKx.mjs +1369 -0
- package/dist/_chunks/index-DsNqyQKx.mjs.map +1 -0
- package/dist/_chunks/index-jMrzaEb9.js +1391 -0
- package/dist/_chunks/index-jMrzaEb9.js.map +1 -0
- package/dist/_chunks/ko-DmcGUBQ3.js +65 -0
- package/dist/_chunks/ko-DmcGUBQ3.js.map +1 -0
- package/dist/_chunks/ko-qTjQ8IMw.mjs +65 -0
- package/dist/_chunks/ko-qTjQ8IMw.mjs.map +1 -0
- package/dist/_chunks/pl-B67TSHqT.mjs +66 -0
- package/dist/_chunks/pl-B67TSHqT.mjs.map +1 -0
- package/dist/_chunks/pl-Cn5RYonZ.js +66 -0
- package/dist/_chunks/pl-Cn5RYonZ.js.map +1 -0
- package/dist/_chunks/ru-BMBgVL3s.js +68 -0
- package/dist/_chunks/ru-BMBgVL3s.js.map +1 -0
- package/dist/_chunks/ru-hagMa57T.mjs +68 -0
- package/dist/_chunks/ru-hagMa57T.mjs.map +1 -0
- package/dist/_chunks/tr-CarUU76c.js +66 -0
- package/dist/_chunks/tr-CarUU76c.js.map +1 -0
- package/dist/_chunks/tr-Dw_jmkG-.mjs +66 -0
- package/dist/_chunks/tr-Dw_jmkG-.mjs.map +1 -0
- package/dist/_chunks/zh-57YM4amO.mjs +66 -0
- package/dist/_chunks/zh-57YM4amO.mjs.map +1 -0
- package/dist/_chunks/zh-CukOviB0.js +66 -0
- package/dist/_chunks/zh-CukOviB0.js.map +1 -0
- package/dist/_chunks/zh-Hans-DSHIXAa3.js +57 -0
- package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +1 -0
- package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +57 -0
- package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +1 -0
- package/dist/admin/index.js +6 -0
- package/dist/admin/index.js.map +1 -0
- package/dist/admin/index.mjs +7 -0
- package/dist/admin/index.mjs.map +1 -0
- package/dist/admin/src/components/BulkLocaleActionModal.d.ts +15 -0
- package/dist/admin/src/components/CMHeaderActions.d.ts +10 -0
- package/dist/admin/src/components/CMListViewModalsAdditionalInformation.d.ts +4 -0
- package/dist/admin/src/components/CheckboxConfirmation.d.ts +20 -0
- package/dist/admin/src/components/CreateLocale.d.ts +29 -0
- package/dist/admin/src/components/DeleteLocale.d.ts +5 -0
- package/dist/admin/src/components/EditLocale.d.ts +14 -0
- package/dist/admin/src/components/Initializer.d.ts +5 -0
- package/dist/admin/src/components/LocaleListCell.d.ts +9 -0
- package/dist/admin/src/components/LocalePicker.d.ts +2 -0
- package/dist/admin/src/components/LocaleTable.d.ts +11 -0
- package/dist/admin/src/constants.d.ts +22 -0
- package/dist/admin/src/contentManagerHooks/editView.d.ts +6 -0
- package/dist/admin/src/contentManagerHooks/listView.d.ts +22 -0
- package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +40 -0
- package/dist/admin/src/hooks/useI18n.d.ts +16 -0
- package/dist/admin/src/index.d.ts +16 -0
- package/dist/admin/src/middlewares/extendCTBAttributeInitialData.d.ts +4 -0
- package/dist/admin/src/middlewares/extendCTBInitialData.d.ts +4 -0
- package/dist/admin/src/middlewares/rbac-middleware.d.ts +3 -0
- package/dist/admin/src/pages/SettingsPage.d.ts +3 -0
- package/dist/admin/src/pluginId.d.ts +1 -0
- package/dist/admin/src/services/api.d.ts +2 -0
- package/dist/admin/src/services/locales.d.ts +4 -0
- package/dist/admin/src/services/relations.d.ts +7 -0
- package/dist/admin/src/types.d.ts +9 -0
- package/dist/admin/src/utils/baseQuery.d.ts +5 -0
- package/dist/admin/src/utils/fields.d.ts +7 -0
- package/dist/admin/src/utils/getTranslation.d.ts +2 -0
- package/dist/admin/src/utils/prefixPluginTranslations.d.ts +3 -0
- package/dist/admin/src/utils/schemas.d.ts +24 -0
- package/dist/admin/src/utils/strings.d.ts +2 -0
- package/dist/server/index.js +3522 -0
- package/dist/server/index.js.map +1 -0
- package/dist/server/index.mjs +3503 -0
- package/dist/server/index.mjs.map +1 -0
- package/dist/server/src/bootstrap.d.ts +6 -0
- package/dist/server/src/bootstrap.d.ts.map +1 -0
- package/dist/server/src/constants/index.d.ts +15 -0
- package/dist/server/src/constants/index.d.ts.map +1 -0
- package/dist/server/src/content-types/index.d.ts +37 -0
- package/dist/server/src/content-types/index.d.ts.map +1 -0
- package/dist/server/src/content-types/locale/index.d.ts +35 -0
- package/dist/server/src/content-types/locale/index.d.ts.map +1 -0
- package/dist/server/src/controllers/content-types.d.ts +6 -0
- package/dist/server/src/controllers/content-types.d.ts.map +1 -0
- package/dist/server/src/controllers/index.d.ts +10 -0
- package/dist/server/src/controllers/index.d.ts.map +1 -0
- package/dist/server/src/controllers/iso-locales.d.ts +4 -0
- package/dist/server/src/controllers/iso-locales.d.ts.map +1 -0
- package/dist/server/src/controllers/locales.d.ts +4 -0
- package/dist/server/src/controllers/locales.d.ts.map +1 -0
- package/dist/server/src/controllers/validate-locale-creation.d.ts +4 -0
- package/dist/server/src/controllers/validate-locale-creation.d.ts.map +1 -0
- package/dist/server/src/domain/locale.d.ts +11 -0
- package/dist/server/src/domain/locale.d.ts.map +1 -0
- package/dist/server/src/graphql.d.ts +8 -0
- package/dist/server/src/graphql.d.ts.map +1 -0
- package/dist/server/src/index.d.ts +148 -0
- package/dist/server/src/index.d.ts.map +1 -0
- package/dist/server/src/migrations/content-type/disable/index.d.ts +3 -0
- package/dist/server/src/migrations/content-type/disable/index.d.ts.map +1 -0
- package/dist/server/src/migrations/content-type/enable/index.d.ts +3 -0
- package/dist/server/src/migrations/content-type/enable/index.d.ts.map +1 -0
- package/dist/server/src/register.d.ts +6 -0
- package/dist/server/src/register.d.ts.map +1 -0
- package/dist/server/src/routes/admin.d.ts +18 -0
- package/dist/server/src/routes/admin.d.ts.map +1 -0
- package/dist/server/src/routes/content-api.d.ts +10 -0
- package/dist/server/src/routes/content-api.d.ts.map +1 -0
- package/dist/server/src/routes/index.d.ts +28 -0
- package/dist/server/src/routes/index.d.ts.map +1 -0
- package/dist/server/src/services/content-types.d.ts +13 -0
- package/dist/server/src/services/content-types.d.ts.map +1 -0
- package/dist/server/src/services/entity-service-decorator.d.ts +29 -0
- package/dist/server/src/services/entity-service-decorator.d.ts.map +1 -0
- package/dist/server/src/services/index.d.ts +71 -0
- package/dist/server/src/services/index.d.ts.map +1 -0
- package/dist/server/src/services/iso-locales.d.ts +10 -0
- package/dist/server/src/services/iso-locales.d.ts.map +1 -0
- package/dist/server/src/services/locales.d.ts +17 -0
- package/dist/server/src/services/locales.d.ts.map +1 -0
- package/dist/server/src/services/localizations.d.ts +8 -0
- package/dist/server/src/services/localizations.d.ts.map +1 -0
- package/dist/server/src/services/metrics.d.ts +8 -0
- package/dist/server/src/services/metrics.d.ts.map +1 -0
- package/dist/server/src/services/permissions/actions.d.ts +16 -0
- package/dist/server/src/services/permissions/actions.d.ts.map +1 -0
- package/dist/server/src/services/permissions/conditions.d.ts +15 -0
- package/dist/server/src/services/permissions/conditions.d.ts.map +1 -0
- package/dist/server/src/services/permissions/engine.d.ts +6 -0
- package/dist/server/src/services/permissions/engine.d.ts.map +1 -0
- package/dist/server/src/services/permissions/sections-builder.d.ts +6 -0
- package/dist/server/src/services/permissions/sections-builder.d.ts.map +1 -0
- package/dist/server/src/services/permissions.d.ts +28 -0
- package/dist/server/src/services/permissions.d.ts.map +1 -0
- package/dist/server/src/utils/index.d.ts +43 -0
- package/dist/server/src/utils/index.d.ts.map +1 -0
- package/dist/server/src/validation/content-types.d.ts +3 -0
- package/dist/server/src/validation/content-types.d.ts.map +1 -0
- package/dist/server/src/validation/locales.d.ts +12 -0
- package/dist/server/src/validation/locales.d.ts.map +1 -0
- package/dist/shared/contracts/content-manager.d.ts +46 -0
- package/dist/shared/contracts/iso-locales.d.ts +21 -0
- package/dist/shared/contracts/locales.d.ts +77 -0
- package/dist/shared/contracts/shared.d.ts +6 -0
- package/package.json +82 -4
- 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,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,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,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,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 @@
|
|
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,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,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 };
|