@localazy/strapi-plugin 1.0.4 → 1.0.9
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/dist/_chunks/FetchIdentity-4kkW9N7Y.js +981 -0
- package/dist/_chunks/FetchIdentity-BWSQAXt-.mjs +983 -0
- package/dist/_chunks/{LanguagesSelector-CeB7tVcb.mjs → LanguagesSelector-DwAGgpcR.mjs} +4 -2
- package/dist/_chunks/{LanguagesSelector-Bd8VFHib.js → LanguagesSelector-yWC_Yb_S.js} +12 -10
- package/dist/_chunks/{App-NRmSxuW3.js → LocalazyApp-DnaA768k.js} +136 -117
- package/dist/_chunks/{App-CtS6CrNn.mjs → LocalazyApp-zySanVTu.mjs} +32 -13
- package/dist/_chunks/{ContentTransferSetup-CeKXlzw_.mjs → LocalazyContentTransferSetup-C7qVIeix.mjs} +49 -456
- package/dist/_chunks/{ContentTransferSetup-DGs8MZPj.js → LocalazyContentTransferSetup-CeOM6bYA.js} +113 -520
- package/dist/_chunks/{GlobalSettings-rOwd0Y0E.mjs → LocalazyGlobalSettings-QvuLdsLe.mjs} +17 -8
- package/dist/_chunks/{GlobalSettings-CRMPRA3Y.js → LocalazyGlobalSettings-ewETL3oG.js} +61 -52
- package/dist/_chunks/LocalazyPanel-BXVLvFgD.js +83 -0
- package/dist/_chunks/LocalazyPanel-BotUsX-y.mjs +83 -0
- package/dist/_chunks/LocalazyStatusColumn-C81HewMg.mjs +51 -0
- package/dist/_chunks/LocalazyStatusColumn-Dt96YcGQ.js +51 -0
- package/dist/_chunks/{isEqual-CC-cEPwY.mjs → RequireLocalazyAuth-CDuyGCrT.mjs} +22 -1
- package/dist/_chunks/{isEqual-0M0aSdTT.js → RequireLocalazyAuth-CWBWETzC.js} +50 -29
- package/dist/_chunks/_commonjsHelpers-Bc2YnDe1.js +7 -0
- package/dist/_chunks/_commonjsHelpers-DWwsNxpa.mjs +8 -0
- package/dist/_chunks/en-CMWcM0nM.js +10 -0
- package/dist/_chunks/en-RX915msK.mjs +10 -0
- package/dist/_chunks/entry-exclusion-service-BVPICve2.mjs +60 -0
- package/dist/_chunks/entry-exclusion-service-CGV6iOkB.js +60 -0
- package/dist/_chunks/{has-model-changed-gNSOSMBa.js → has-model-changed-DVYRxVhM.js} +33 -32
- package/dist/_chunks/{has-model-changed-DViUIQHk.mjs → has-model-changed-DZL36gWh.mjs} +3 -2
- package/dist/_chunks/i18n-0dV2P-Hm.js +2378 -0
- package/dist/_chunks/i18n-RoETLXdU.mjs +2378 -0
- package/dist/_chunks/index-1he9s_bs.js +430 -0
- package/dist/_chunks/index-BIbKC7-V.mjs +432 -0
- package/dist/_chunks/index-CCxXsn7Z.js +254 -0
- package/dist/_chunks/{set-Cbi1yYuW.js → index-CaY3BYnQ.js} +878 -4379
- package/dist/_chunks/{set-Dnhh_SyE.mjs → index-CgI_aKe_.mjs} +906 -4408
- package/dist/_chunks/index-DsrYI6aB.mjs +231 -0
- package/dist/_chunks/initReactI18next-B0H8_DlW.js +60 -0
- package/dist/_chunks/initReactI18next-MHHxeg_9.mjs +61 -0
- package/dist/_chunks/{index-Dj68Ixl2.mjs → strapi-api-base-BE8VMlaA.js} +7 -234
- package/dist/_chunks/{index-Bbwk3kp3.js → strapi-api-base-DjeKGUw7.mjs} +15 -242
- package/dist/_chunks/useTranslation-BdIl-aLe.js +188 -0
- package/dist/_chunks/useTranslation-CZQ4lU1m.mjs +189 -0
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/LocalazyPanel.d.ts +4 -0
- package/dist/admin/src/components/LocalazyStatusColumn.d.ts +3 -0
- package/dist/admin/src/components/RequireLocalazyAuth.d.ts +6 -0
- package/dist/admin/src/index.d.ts +1 -0
- package/dist/admin/src/modules/entry-exclusion/services/entry-exclusion-service.d.ts +18 -0
- package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +8 -0
- package/dist/admin/src/pages/LocalazyApp.d.ts +2 -0
- package/dist/admin/src/pages/LocalazyContentTransferSetup.d.ts +2 -0
- package/dist/admin/src/pages/LocalazyGlobalSettings.d.ts +2 -0
- package/dist/server/index.js +202 -35
- package/dist/server/index.mjs +202 -35
- package/dist/server/src/controllers/entry-exclusion-controller.d.ts +21 -0
- package/dist/server/src/controllers/index.d.ts +7 -0
- package/dist/server/src/core/index.d.ts +6 -0
- package/dist/server/src/index.d.ts +15 -0
- package/dist/server/src/routes/entry-exclusion-routes.d.ts +9 -0
- package/dist/server/src/services/entry-exclusion-service.d.ts +23 -0
- package/dist/server/src/services/index.d.ts +8 -0
- package/package.json +2 -2
- package/dist/_chunks/en-BTf8goGM.mjs +0 -8
- package/dist/_chunks/en-CRtsEFtl.js +0 -8
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { c as createStrapiApiAxiosInstance } from "./
|
|
1
|
+
import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-DjeKGUw7.mjs";
|
|
2
2
|
import { jsxs, jsx } from "react/jsx-runtime";
|
|
3
3
|
import { useState, useEffect } from "react";
|
|
4
|
-
import {
|
|
4
|
+
import { c as cloneDeep } from "./FetchIdentity-BWSQAXt-.mjs";
|
|
5
|
+
import { F as Field, M as MultiSelect, b as MultiSelectOption } from "./index-CgI_aKe_.mjs";
|
|
6
|
+
import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
|
|
5
7
|
const strapiApiInstance = createStrapiApiAxiosInstance();
|
|
6
8
|
class ProjectService {
|
|
7
9
|
static async getConnectedProject() {
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
-
const
|
|
2
|
+
const strapiApiBase = require("./strapi-api-base-BE8VMlaA.js");
|
|
3
3
|
const jsxRuntime = require("react/jsx-runtime");
|
|
4
4
|
const React = require("react");
|
|
5
|
-
const
|
|
6
|
-
const
|
|
5
|
+
const FetchIdentity = require("./FetchIdentity-4kkW9N7Y.js");
|
|
6
|
+
const index = require("./index-CaY3BYnQ.js");
|
|
7
|
+
const useTranslation = require("./useTranslation-BdIl-aLe.js");
|
|
8
|
+
const strapiApiInstance = strapiApiBase.createStrapiApiAxiosInstance();
|
|
7
9
|
class ProjectService {
|
|
8
10
|
static async getConnectedProject() {
|
|
9
11
|
try {
|
|
@@ -15,20 +17,20 @@ class ProjectService {
|
|
|
15
17
|
}
|
|
16
18
|
}
|
|
17
19
|
const LanguagesSelector = (props) => {
|
|
18
|
-
const { t } =
|
|
20
|
+
const { t } = useTranslation.useTranslation();
|
|
19
21
|
const [selectedLanguages, setSelectedLanguages] = React.useState([]);
|
|
20
22
|
const onChange = (values) => {
|
|
21
23
|
setSelectedLanguages(values);
|
|
22
|
-
props.onChange(
|
|
24
|
+
props.onChange(FetchIdentity.cloneDeep(values));
|
|
23
25
|
};
|
|
24
26
|
React.useEffect(() => {
|
|
25
27
|
const existingPreselectedLanguages = props.projectLanguages.filter((lang) => props.preselectedLanguages.includes(lang.code)).map((lang) => lang.code);
|
|
26
28
|
setSelectedLanguages(existingPreselectedLanguages);
|
|
27
29
|
}, [props.projectLanguages, props.preselectedLanguages]);
|
|
28
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
29
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
30
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(index.Field.Root, { hint: props.hint || t("common.select_languages"), children: [
|
|
31
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Field.Label, { children: props.label || t("common.select_languages") }),
|
|
30
32
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
31
|
-
|
|
33
|
+
index.MultiSelect,
|
|
32
34
|
{
|
|
33
35
|
clearLabel: t("plugin_settings.clear"),
|
|
34
36
|
placeholder: props.placeholder || t("common.select_languages"),
|
|
@@ -37,10 +39,10 @@ const LanguagesSelector = (props) => {
|
|
|
37
39
|
onChange: (values) => onChange(values),
|
|
38
40
|
multi: true,
|
|
39
41
|
withTags: true,
|
|
40
|
-
children: props.projectLanguages.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
42
|
+
children: props.projectLanguages.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(index.MultiSelectOption, { value: lang.code, children: `${lang.name} (${lang.code})` }, lang.id))
|
|
41
43
|
}
|
|
42
44
|
),
|
|
43
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
45
|
+
/* @__PURE__ */ jsxRuntime.jsx(index.Field.Hint, {})
|
|
44
46
|
] });
|
|
45
47
|
};
|
|
46
48
|
exports.LanguagesSelector = LanguagesSelector;
|