@strapi/i18n 0.0.0-experimental.a65a85fdea97faae8679d3ffc5f9d79af61abd26 → 0.0.0
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 +1 -17
- package/package.json +4 -83
- package/dist/_chunks/SettingsPage-B73NO_8-.js +0 -585
- package/dist/_chunks/SettingsPage-B73NO_8-.js.map +0 -1
- package/dist/_chunks/SettingsPage-pvdzbKEM.mjs +0 -565
- package/dist/_chunks/SettingsPage-pvdzbKEM.mjs.map +0 -1
- package/dist/_chunks/de-9eCAqqrB.mjs +0 -66
- package/dist/_chunks/de-9eCAqqrB.mjs.map +0 -1
- package/dist/_chunks/de-DtWiGdHl.js +0 -66
- package/dist/_chunks/de-DtWiGdHl.js.map +0 -1
- package/dist/_chunks/dk-2qBjxt-P.mjs +0 -66
- package/dist/_chunks/dk-2qBjxt-P.mjs.map +0 -1
- package/dist/_chunks/dk-D8C-casx.js +0 -66
- package/dist/_chunks/dk-D8C-casx.js.map +0 -1
- package/dist/_chunks/en-BuBc6LKZ.js +0 -69
- package/dist/_chunks/en-BuBc6LKZ.js.map +0 -1
- package/dist/_chunks/en-CnrTsjWS.mjs +0 -69
- package/dist/_chunks/en-CnrTsjWS.mjs.map +0 -1
- package/dist/_chunks/es-DS-XFGSw.js +0 -66
- package/dist/_chunks/es-DS-XFGSw.js.map +0 -1
- package/dist/_chunks/es-DlmMVaBG.mjs +0 -66
- package/dist/_chunks/es-DlmMVaBG.mjs.map +0 -1
- package/dist/_chunks/fr-3S6ke71d.mjs +0 -66
- package/dist/_chunks/fr-3S6ke71d.mjs.map +0 -1
- package/dist/_chunks/fr-BTjekDpq.js +0 -66
- package/dist/_chunks/fr-BTjekDpq.js.map +0 -1
- package/dist/_chunks/index-kcYwoCdE.js +0 -1082
- package/dist/_chunks/index-kcYwoCdE.js.map +0 -1
- package/dist/_chunks/index-lckTPHiZ.mjs +0 -1058
- package/dist/_chunks/index-lckTPHiZ.mjs.map +0 -1
- package/dist/_chunks/ko-DmcGUBQ3.js +0 -65
- package/dist/_chunks/ko-DmcGUBQ3.js.map +0 -1
- package/dist/_chunks/ko-qTjQ8IMw.mjs +0 -65
- package/dist/_chunks/ko-qTjQ8IMw.mjs.map +0 -1
- package/dist/_chunks/pl-B67TSHqT.mjs +0 -66
- package/dist/_chunks/pl-B67TSHqT.mjs.map +0 -1
- package/dist/_chunks/pl-Cn5RYonZ.js +0 -66
- package/dist/_chunks/pl-Cn5RYonZ.js.map +0 -1
- package/dist/_chunks/ru-BMBgVL3s.js +0 -68
- package/dist/_chunks/ru-BMBgVL3s.js.map +0 -1
- package/dist/_chunks/ru-hagMa57T.mjs +0 -68
- package/dist/_chunks/ru-hagMa57T.mjs.map +0 -1
- package/dist/_chunks/tr-CarUU76c.js +0 -66
- package/dist/_chunks/tr-CarUU76c.js.map +0 -1
- package/dist/_chunks/tr-Dw_jmkG-.mjs +0 -66
- package/dist/_chunks/tr-Dw_jmkG-.mjs.map +0 -1
- package/dist/_chunks/zh-57YM4amO.mjs +0 -66
- package/dist/_chunks/zh-57YM4amO.mjs.map +0 -1
- package/dist/_chunks/zh-CukOviB0.js +0 -66
- package/dist/_chunks/zh-CukOviB0.js.map +0 -1
- package/dist/_chunks/zh-Hans-DSHIXAa3.js +0 -57
- package/dist/_chunks/zh-Hans-DSHIXAa3.js.map +0 -1
- package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs +0 -57
- package/dist/_chunks/zh-Hans-Dyc-aR-h.mjs.map +0 -1
- package/dist/admin/index.js +0 -6
- package/dist/admin/index.js.map +0 -1
- package/dist/admin/index.mjs +0 -7
- package/dist/admin/index.mjs.map +0 -1
- package/dist/admin/src/components/CMHeaderActions.d.ts +0 -4
- package/dist/admin/src/components/CMListViewModalsAdditionalInformation.d.ts +0 -4
- package/dist/admin/src/components/CheckboxConfirmation.d.ts +0 -20
- package/dist/admin/src/components/CreateLocale.d.ts +0 -29
- package/dist/admin/src/components/DeleteLocale.d.ts +0 -5
- package/dist/admin/src/components/EditLocale.d.ts +0 -13
- package/dist/admin/src/components/Initializer.d.ts +0 -5
- package/dist/admin/src/components/LocaleListCell.d.ts +0 -9
- package/dist/admin/src/components/LocalePicker.d.ts +0 -2
- package/dist/admin/src/components/LocaleTable.d.ts +0 -11
- package/dist/admin/src/constants.d.ts +0 -22
- package/dist/admin/src/contentManagerHooks/editView.d.ts +0 -6
- package/dist/admin/src/contentManagerHooks/listView.d.ts +0 -22
- package/dist/admin/src/contentReleasesHooks/releaseDetailsView.d.ts +0 -36
- package/dist/admin/src/hooks/useI18n.d.ts +0 -16
- package/dist/admin/src/index.d.ts +0 -16
- package/dist/admin/src/middlewares/extendCTBAttributeInitialData.d.ts +0 -4
- package/dist/admin/src/middlewares/extendCTBInitialData.d.ts +0 -4
- package/dist/admin/src/middlewares/rbac-middleware.d.ts +0 -3
- package/dist/admin/src/pages/SettingsPage.d.ts +0 -3
- package/dist/admin/src/pluginId.d.ts +0 -1
- package/dist/admin/src/services/api.d.ts +0 -3
- package/dist/admin/src/services/locales.d.ts +0 -4
- package/dist/admin/src/types.d.ts +0 -9
- package/dist/admin/src/utils/baseQuery.d.ts +0 -20
- package/dist/admin/src/utils/fields.d.ts +0 -7
- package/dist/admin/src/utils/getTranslation.d.ts +0 -2
- package/dist/admin/src/utils/prefixPluginTranslations.d.ts +0 -3
- package/dist/admin/src/utils/schemas.d.ts +0 -24
- package/dist/admin/src/utils/strings.d.ts +0 -2
- package/dist/server/index.js +0 -3522
- package/dist/server/index.js.map +0 -1
- package/dist/server/index.mjs +0 -3503
- package/dist/server/index.mjs.map +0 -1
- package/dist/server/src/bootstrap.d.ts +0 -6
- package/dist/server/src/bootstrap.d.ts.map +0 -1
- package/dist/server/src/constants/index.d.ts +0 -15
- package/dist/server/src/constants/index.d.ts.map +0 -1
- package/dist/server/src/content-types/index.d.ts +0 -37
- package/dist/server/src/content-types/index.d.ts.map +0 -1
- package/dist/server/src/content-types/locale/index.d.ts +0 -35
- package/dist/server/src/content-types/locale/index.d.ts.map +0 -1
- package/dist/server/src/controllers/content-types.d.ts +0 -6
- package/dist/server/src/controllers/content-types.d.ts.map +0 -1
- package/dist/server/src/controllers/index.d.ts +0 -10
- package/dist/server/src/controllers/index.d.ts.map +0 -1
- package/dist/server/src/controllers/iso-locales.d.ts +0 -4
- package/dist/server/src/controllers/iso-locales.d.ts.map +0 -1
- package/dist/server/src/controllers/locales.d.ts +0 -4
- package/dist/server/src/controllers/locales.d.ts.map +0 -1
- package/dist/server/src/controllers/validate-locale-creation.d.ts +0 -4
- package/dist/server/src/controllers/validate-locale-creation.d.ts.map +0 -1
- package/dist/server/src/domain/locale.d.ts +0 -11
- package/dist/server/src/domain/locale.d.ts.map +0 -1
- package/dist/server/src/graphql.d.ts +0 -8
- package/dist/server/src/graphql.d.ts.map +0 -1
- package/dist/server/src/index.d.ts +0 -148
- package/dist/server/src/index.d.ts.map +0 -1
- package/dist/server/src/migrations/content-type/disable/index.d.ts +0 -3
- package/dist/server/src/migrations/content-type/disable/index.d.ts.map +0 -1
- package/dist/server/src/migrations/content-type/enable/index.d.ts +0 -3
- package/dist/server/src/migrations/content-type/enable/index.d.ts.map +0 -1
- package/dist/server/src/register.d.ts +0 -6
- package/dist/server/src/register.d.ts.map +0 -1
- package/dist/server/src/routes/admin.d.ts +0 -18
- package/dist/server/src/routes/admin.d.ts.map +0 -1
- package/dist/server/src/routes/content-api.d.ts +0 -10
- package/dist/server/src/routes/content-api.d.ts.map +0 -1
- package/dist/server/src/routes/index.d.ts +0 -28
- package/dist/server/src/routes/index.d.ts.map +0 -1
- package/dist/server/src/services/content-types.d.ts +0 -13
- package/dist/server/src/services/content-types.d.ts.map +0 -1
- package/dist/server/src/services/entity-service-decorator.d.ts +0 -29
- package/dist/server/src/services/entity-service-decorator.d.ts.map +0 -1
- package/dist/server/src/services/index.d.ts +0 -71
- package/dist/server/src/services/index.d.ts.map +0 -1
- package/dist/server/src/services/iso-locales.d.ts +0 -10
- package/dist/server/src/services/iso-locales.d.ts.map +0 -1
- package/dist/server/src/services/locales.d.ts +0 -17
- package/dist/server/src/services/locales.d.ts.map +0 -1
- package/dist/server/src/services/localizations.d.ts +0 -8
- package/dist/server/src/services/localizations.d.ts.map +0 -1
- package/dist/server/src/services/metrics.d.ts +0 -8
- package/dist/server/src/services/metrics.d.ts.map +0 -1
- package/dist/server/src/services/permissions/actions.d.ts +0 -16
- package/dist/server/src/services/permissions/actions.d.ts.map +0 -1
- package/dist/server/src/services/permissions/conditions.d.ts +0 -15
- package/dist/server/src/services/permissions/conditions.d.ts.map +0 -1
- package/dist/server/src/services/permissions/engine.d.ts +0 -6
- package/dist/server/src/services/permissions/engine.d.ts.map +0 -1
- package/dist/server/src/services/permissions/sections-builder.d.ts +0 -6
- package/dist/server/src/services/permissions/sections-builder.d.ts.map +0 -1
- package/dist/server/src/services/permissions.d.ts +0 -28
- package/dist/server/src/services/permissions.d.ts.map +0 -1
- package/dist/server/src/utils/index.d.ts +0 -43
- package/dist/server/src/utils/index.d.ts.map +0 -1
- package/dist/server/src/validation/content-types.d.ts +0 -3
- package/dist/server/src/validation/content-types.d.ts.map +0 -1
- package/dist/server/src/validation/locales.d.ts +0 -12
- package/dist/server/src/validation/locales.d.ts.map +0 -1
- package/dist/shared/contracts/content-manager.d.ts +0 -27
- package/dist/shared/contracts/iso-locales.d.ts +0 -21
- package/dist/shared/contracts/locales.d.ts +0 -77
- package/dist/shared/contracts/shared.d.ts +0 -6
- package/strapi-server.js +0 -3
@@ -1,9 +0,0 @@
|
|
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 };
|
@@ -1,11 +0,0 @@
|
|
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 };
|
@@ -1,22 +0,0 @@
|
|
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
|
-
};
|
@@ -1,22 +0,0 @@
|
|
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 };
|
@@ -1,36 +0,0 @@
|
|
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: {
|
22
|
-
type: string;
|
23
|
-
};
|
24
|
-
metadatas: {
|
25
|
-
label: {
|
26
|
-
id: string;
|
27
|
-
defaultMessage: string;
|
28
|
-
};
|
29
|
-
searchable: boolean;
|
30
|
-
sortable: boolean;
|
31
|
-
};
|
32
|
-
name: string;
|
33
|
-
}[];
|
34
|
-
hasI18nEnabled: boolean;
|
35
|
-
};
|
36
|
-
export { addLocaleToReleasesHook };
|
@@ -1,16 +0,0 @@
|
|
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 };
|
@@ -1,16 +0,0 @@
|
|
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;
|
@@ -1,4 +0,0 @@
|
|
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 };
|
@@ -1 +0,0 @@
|
|
1
|
-
export declare const pluginId = "i18n";
|
@@ -1,3 +0,0 @@
|
|
1
|
-
import { type UnknownApiError } from '../utils/baseQuery';
|
2
|
-
declare const i18nApi: import("@reduxjs/toolkit/query/react").Api<import("@reduxjs/toolkit/query/react").BaseQueryFn<string | import("../utils/baseQuery").QueryArguments, unknown, import("../utils/baseQuery").BaseQueryError>, {}, "i18nApi", "Locale", typeof import("@reduxjs/toolkit/query/react").coreModuleName | typeof import("@reduxjs/toolkit/query/react").reactHooksModuleName>;
|
3
|
-
export { i18nApi, type UnknownApiError };
|
@@ -1,4 +0,0 @@
|
|
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("../utils/baseQuery").QueryArguments, unknown, import("../utils/baseQuery").BaseQueryError>, "Locale", CreateLocale.Response, "i18nApi">>, 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("../utils/baseQuery").QueryArguments, unknown, import("../utils/baseQuery").BaseQueryError>, "Locale", DeleteLocale.Response, "i18nApi">>, useGetLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("../utils/baseQuery").QueryArguments, unknown, import("../utils/baseQuery").BaseQueryError>, "Locale", GetLocales.Response, "i18nApi">>, useGetDefaultLocalesQuery: import("@reduxjs/toolkit/dist/query/react/buildHooks").UseQuery<import("@reduxjs/toolkit/query").QueryDefinition<void, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("../utils/baseQuery").QueryArguments, unknown, import("../utils/baseQuery").BaseQueryError>, "Locale", GetISOLocales.Response, "i18nApi">>, 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("../utils/baseQuery").QueryArguments, unknown, import("../utils/baseQuery").BaseQueryError>, "Locale", UpdateLocale.Response, "i18nApi">>;
|
4
|
-
export { useCreateLocaleMutation, useDeleteLocaleMutation, useGetLocalesQuery, useGetDefaultLocalesQuery, useUpdateLocaleMutation, };
|
@@ -1,20 +0,0 @@
|
|
1
|
-
import { SerializedError } from '@reduxjs/toolkit';
|
2
|
-
import { BaseQueryFn } from '@reduxjs/toolkit/query';
|
3
|
-
import { ApiError } from '@strapi/admin/strapi-admin';
|
4
|
-
import { type AxiosRequestConfig } from 'axios';
|
5
|
-
export interface QueryArguments {
|
6
|
-
url: string;
|
7
|
-
method?: AxiosRequestConfig['method'];
|
8
|
-
data?: AxiosRequestConfig['data'];
|
9
|
-
config?: AxiosRequestConfig;
|
10
|
-
}
|
11
|
-
export interface UnknownApiError {
|
12
|
-
name: 'UnknownError';
|
13
|
-
message: string;
|
14
|
-
details?: unknown;
|
15
|
-
status?: number;
|
16
|
-
}
|
17
|
-
export type BaseQueryError = ApiError | UnknownApiError;
|
18
|
-
declare const axiosBaseQuery: () => BaseQueryFn<string | QueryArguments, unknown, BaseQueryError>;
|
19
|
-
declare const isBaseQueryError: (error: BaseQueryError | SerializedError) => error is BaseQueryError;
|
20
|
-
export { axiosBaseQuery, isBaseQueryError };
|
@@ -1,24 +0,0 @@
|
|
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 };
|