@localazy/strapi-plugin 1.0.4 → 1.0.8

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 (55) hide show
  1. package/dist/_chunks/{App-CtS6CrNn.mjs → App-C0ogWaOz.mjs} +8 -4
  2. package/dist/_chunks/{App-NRmSxuW3.js → App-Dl58PZKy.js} +91 -87
  3. package/dist/_chunks/{ContentTransferSetup-CeKXlzw_.mjs → ContentTransferSetup-ClR8Nwv2.mjs} +41 -452
  4. package/dist/_chunks/{ContentTransferSetup-DGs8MZPj.js → ContentTransferSetup-DWQg9zDj.js} +91 -502
  5. package/dist/_chunks/{GlobalSettings-rOwd0Y0E.mjs → GlobalSettings-B_h5sPwa.mjs} +7 -4
  6. package/dist/_chunks/{GlobalSettings-CRMPRA3Y.js → GlobalSettings-BpY7BoXu.js} +43 -40
  7. package/dist/_chunks/{LanguagesSelector-Bd8VFHib.js → LanguagesSelector-Bfrsr3-P.js} +10 -8
  8. package/dist/_chunks/{LanguagesSelector-CeB7tVcb.mjs → LanguagesSelector-u9iDsQqB.mjs} +4 -2
  9. package/dist/_chunks/LocalazyPanel-BedTxk3C.js +83 -0
  10. package/dist/_chunks/LocalazyPanel-CuvdSJYx.mjs +83 -0
  11. package/dist/_chunks/LocalazyStatusColumn-955GpXAv.mjs +51 -0
  12. package/dist/_chunks/LocalazyStatusColumn-Bf1ntoc7.js +51 -0
  13. package/dist/_chunks/_commonjsHelpers-Bc2YnDe1.js +7 -0
  14. package/dist/_chunks/_commonjsHelpers-DWwsNxpa.mjs +8 -0
  15. package/dist/_chunks/en-CMWcM0nM.js +10 -0
  16. package/dist/_chunks/en-RX915msK.mjs +10 -0
  17. package/dist/_chunks/entry-exclusion-service-BlyFqyBY.mjs +60 -0
  18. package/dist/_chunks/entry-exclusion-service-bm-lp4za.js +60 -0
  19. package/dist/_chunks/{has-model-changed-gNSOSMBa.js → has-model-changed-B5SSh8XW.js} +4 -3
  20. package/dist/_chunks/{has-model-changed-DViUIQHk.mjs → has-model-changed-DIHY9LBA.mjs} +3 -2
  21. package/dist/_chunks/i18n-0dV2P-Hm.js +2378 -0
  22. package/dist/_chunks/i18n-RoETLXdU.mjs +2378 -0
  23. package/dist/_chunks/index-1he9s_bs.js +430 -0
  24. package/dist/_chunks/index-BIbKC7-V.mjs +432 -0
  25. package/dist/_chunks/{index-Dj68Ixl2.mjs → index-C15Goe6p.mjs} +120 -4
  26. package/dist/_chunks/{set-Cbi1yYuW.js → index-CaY3BYnQ.js} +878 -4379
  27. package/dist/_chunks/{set-Dnhh_SyE.mjs → index-DOCSzcPH.mjs} +907 -4409
  28. package/dist/_chunks/{index-Bbwk3kp3.js → index-Q3-srfXc.js} +142 -4
  29. package/dist/_chunks/initReactI18next-B0H8_DlW.js +60 -0
  30. package/dist/_chunks/initReactI18next-MHHxeg_9.mjs +61 -0
  31. package/dist/_chunks/{isEqual-CC-cEPwY.mjs → isEqual-BazjlHGf.mjs} +1 -1
  32. package/dist/_chunks/{isEqual-0M0aSdTT.js → isEqual-CrlZhAtq.js} +1 -1
  33. package/dist/_chunks/set-BRyy4Ra6.mjs +893 -0
  34. package/dist/_chunks/set-CmcBsVOP.js +891 -0
  35. package/dist/_chunks/useTranslation-BdIl-aLe.js +188 -0
  36. package/dist/_chunks/useTranslation-CZQ4lU1m.mjs +189 -0
  37. package/dist/admin/index.js +1 -1
  38. package/dist/admin/index.mjs +1 -1
  39. package/dist/admin/src/components/LocalazyPanel.d.ts +4 -0
  40. package/dist/admin/src/components/LocalazyStatusColumn.d.ts +3 -0
  41. package/dist/admin/src/index.d.ts +1 -0
  42. package/dist/admin/src/modules/entry-exclusion/services/entry-exclusion-service.d.ts +18 -0
  43. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +8 -0
  44. package/dist/server/index.js +202 -35
  45. package/dist/server/index.mjs +202 -35
  46. package/dist/server/src/controllers/entry-exclusion-controller.d.ts +21 -0
  47. package/dist/server/src/controllers/index.d.ts +7 -0
  48. package/dist/server/src/core/index.d.ts +6 -0
  49. package/dist/server/src/index.d.ts +15 -0
  50. package/dist/server/src/routes/entry-exclusion-routes.d.ts +9 -0
  51. package/dist/server/src/services/entry-exclusion-service.d.ts +23 -0
  52. package/dist/server/src/services/index.d.ts +8 -0
  53. package/package.json +2 -2
  54. package/dist/_chunks/en-BTf8goGM.mjs +0 -8
  55. package/dist/_chunks/en-CRtsEFtl.js +0 -8
@@ -1,10 +1,13 @@
1
1
  import { jsxs, Fragment, jsx } from "react/jsx-runtime";
2
2
  import { useState, useEffect } from "react";
3
- import { u as useTranslation, c as Flex, B as Button, p as ForwardRef$4z, d as Box, A as Alert, T as Typography, q as Field, r as Toggle, M as MultiSelect, t as MultiSelectOption, D as Divider, v as SingleSelect, w as SingleSelectOption, P as PluginSettingsService$1, n as cloneDeep, s as set } from "./set-Dnhh_SyE.mjs";
3
+ import { P as PluginSettingsService$1, c as cloneDeep, s as set } from "./set-BRyy4Ra6.mjs";
4
4
  import { Layouts } from "@strapi/strapi/admin";
5
- import { i as isEqual } from "./isEqual-CC-cEPwY.mjs";
6
- import { L as LanguagesSelector, P as ProjectService } from "./LanguagesSelector-CeB7tVcb.mjs";
7
- import { c as createStrapiApiAxiosInstance } from "./index-Dj68Ixl2.mjs";
5
+ import { F as Flex, B as Button, b as ForwardRef$4z, c as Box, A as Alert, T as Typography, d as Field, a as Toggle, M as MultiSelect, e as MultiSelectOption, D as Divider, S as SingleSelect, f as SingleSelectOption } from "./index-DOCSzcPH.mjs";
6
+ import { i as isEqual } from "./isEqual-BazjlHGf.mjs";
7
+ import { L as LanguagesSelector, P as ProjectService } from "./LanguagesSelector-u9iDsQqB.mjs";
8
+ import { c as createStrapiApiAxiosInstance } from "./index-C15Goe6p.mjs";
9
+ import "./i18n-RoETLXdU.mjs";
10
+ import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
8
11
  class PluginSettingsService {
9
12
  static async getAdminPanelUsers() {
10
13
  try {
@@ -2,11 +2,14 @@
2
2
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const set = require("./set-Cbi1yYuW.js");
5
+ const set = require("./set-CmcBsVOP.js");
6
6
  const admin = require("@strapi/strapi/admin");
7
- const isEqual = require("./isEqual-0M0aSdTT.js");
8
- const LanguagesSelector = require("./LanguagesSelector-Bd8VFHib.js");
9
- const index = require("./index-Bbwk3kp3.js");
7
+ const index$1 = require("./index-CaY3BYnQ.js");
8
+ const isEqual = require("./isEqual-CrlZhAtq.js");
9
+ const LanguagesSelector = require("./LanguagesSelector-Bfrsr3-P.js");
10
+ const index = require("./index-Q3-srfXc.js");
11
+ require("./i18n-0dV2P-Hm.js");
12
+ const useTranslation = require("./useTranslation-BdIl-aLe.js");
10
13
  class PluginSettingsService {
11
14
  static async getAdminPanelUsers() {
12
15
  try {
@@ -25,7 +28,7 @@ class PluginSettingsService {
25
28
  }
26
29
  }
27
30
  const GlobalSettings = () => {
28
- const { t } = set.useTranslation();
31
+ const { t } = useTranslation.useTranslation();
29
32
  const [projectLanguages, setProjectLanguages] = React.useState([]);
30
33
  const [isLoading, setIsLoading] = React.useState(true);
31
34
  const [showSavedAlert, setShowSavedAlert] = React.useState(false);
@@ -77,12 +80,12 @@ const GlobalSettings = () => {
77
80
  {
78
81
  title: t("plugin_settings.global_settings"),
79
82
  subtitle: t("plugin_settings.global_settings_description"),
80
- primaryAction: /* @__PURE__ */ jsxRuntime.jsxs(set.Flex, { gap: 2, children: [
81
- /* @__PURE__ */ jsxRuntime.jsx(set.Button, { variant: "secondary", disabled: !hasUnsavedChanges, onClick: onCancelClick, children: t("plugin_settings.cancel") }),
83
+ primaryAction: /* @__PURE__ */ jsxRuntime.jsxs(index$1.Flex, { gap: 2, children: [
84
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Button, { variant: "secondary", disabled: !hasUnsavedChanges, onClick: onCancelClick, children: t("plugin_settings.cancel") }),
82
85
  /* @__PURE__ */ jsxRuntime.jsx(
83
- set.Button,
86
+ index$1.Button,
84
87
  {
85
- startIcon: /* @__PURE__ */ jsxRuntime.jsx(set.ForwardRef$4z, {}),
88
+ startIcon: /* @__PURE__ */ jsxRuntime.jsx(index$1.ForwardRef$4z, {}),
86
89
  disabled: !hasUnsavedChanges,
87
90
  onClick: () => {
88
91
  saveGlobalSettings(formModel);
@@ -94,9 +97,9 @@ const GlobalSettings = () => {
94
97
  as: "h2"
95
98
  }
96
99
  ),
97
- /* @__PURE__ */ jsxRuntime.jsxs(set.Box, { marginRight: 10, marginLeft: 10, children: [
98
- !isLoading && showSavedAlert && /* @__PURE__ */ jsxRuntime.jsx(set.Box, { marginBottom: 8, children: /* @__PURE__ */ jsxRuntime.jsx(
99
- set.Alert,
100
+ /* @__PURE__ */ jsxRuntime.jsxs(index$1.Box, { marginRight: 10, marginLeft: 10, children: [
101
+ !isLoading && showSavedAlert && /* @__PURE__ */ jsxRuntime.jsx(index$1.Box, { marginBottom: 8, children: /* @__PURE__ */ jsxRuntime.jsx(
102
+ index$1.Alert,
100
103
  {
101
104
  onClose: () => setShowSavedAlert(false),
102
105
  closeLabel: t("plugin_settings.close"),
@@ -105,20 +108,20 @@ const GlobalSettings = () => {
105
108
  children: t("plugin_settings.global_settings_saved_successfully")
106
109
  }
107
110
  ) }),
108
- !isLoading && /* @__PURE__ */ jsxRuntime.jsx(set.Box, { background: "neutral0", padding: 7, paddingTop: 6, shadow: "tableShadow", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
109
- set.Box,
111
+ !isLoading && /* @__PURE__ */ jsxRuntime.jsx(index$1.Box, { background: "neutral0", padding: 7, paddingTop: 6, shadow: "tableShadow", hasRadius: true, children: /* @__PURE__ */ jsxRuntime.jsxs(
112
+ index$1.Box,
110
113
  {
111
114
  style: {
112
115
  maxWidth: "500px"
113
116
  },
114
117
  children: [
115
- /* @__PURE__ */ jsxRuntime.jsx(set.Typography, { variant: "delta", textColor: "neutral800", children: t("plugin_settings.upload_settings") }),
118
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Typography, { variant: "delta", textColor: "neutral800", children: t("plugin_settings.upload_settings") }),
116
119
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
117
120
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
118
- /* @__PURE__ */ jsxRuntime.jsxs(set.Field.Root, { hint: t("plugin_settings.allow_automated_upload_to_localazy_info"), children: [
119
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Label, { children: t("plugin_settings.allow_automated_upload_to_localazy") }),
121
+ /* @__PURE__ */ jsxRuntime.jsxs(index$1.Field.Root, { hint: t("plugin_settings.allow_automated_upload_to_localazy_info"), children: [
122
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Label, { children: t("plugin_settings.allow_automated_upload_to_localazy") }),
120
123
  /* @__PURE__ */ jsxRuntime.jsx(
121
- set.Toggle,
124
+ index$1.Toggle,
122
125
  {
123
126
  offLabel: t("plugin_settings.off"),
124
127
  onLabel: t("plugin_settings.on"),
@@ -126,14 +129,14 @@ const GlobalSettings = () => {
126
129
  onChange: (e) => patchFormModel("upload.allowAutomated", e.target.checked)
127
130
  }
128
131
  ),
129
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Hint, {})
132
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Hint, {})
130
133
  ] }),
131
134
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
132
135
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
133
- /* @__PURE__ */ jsxRuntime.jsxs(set.Field.Root, { hint: t("plugin_settings.automated_upload_triggers_info"), children: [
134
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Label, { children: t("plugin_settings.automated_upload_triggers") }),
136
+ /* @__PURE__ */ jsxRuntime.jsxs(index$1.Field.Root, { hint: t("plugin_settings.automated_upload_triggers_info"), children: [
137
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Label, { children: t("plugin_settings.automated_upload_triggers") }),
135
138
  /* @__PURE__ */ jsxRuntime.jsxs(
136
- set.MultiSelect,
139
+ index$1.MultiSelect,
137
140
  {
138
141
  label: t("plugin_settings.automated_upload_triggers"),
139
142
  hint: t("plugin_settings.automated_upload_triggers_info"),
@@ -146,19 +149,19 @@ const GlobalSettings = () => {
146
149
  multi: true,
147
150
  withTags: true,
148
151
  children: [
149
- /* @__PURE__ */ jsxRuntime.jsx(set.MultiSelectOption, { value: "created", children: t("plugin_settings.creating_new_data_entry") }),
150
- /* @__PURE__ */ jsxRuntime.jsx(set.MultiSelectOption, { value: "updated", children: t("plugin_settings.editing_data_entry") })
152
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.MultiSelectOption, { value: "created", children: t("plugin_settings.creating_new_data_entry") }),
153
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.MultiSelectOption, { value: "updated", children: t("plugin_settings.editing_data_entry") })
151
154
  ]
152
155
  }
153
156
  ),
154
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Hint, {})
157
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Hint, {})
155
158
  ] }),
156
159
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
157
160
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
158
- /* @__PURE__ */ jsxRuntime.jsxs(set.Field.Root, { hint: t("plugin_settings.deprecate_source_keys_on_delete_info"), children: [
159
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Label, { children: t("plugin_settings.deprecate_source_keys_on_delete") }),
161
+ /* @__PURE__ */ jsxRuntime.jsxs(index$1.Field.Root, { hint: t("plugin_settings.deprecate_source_keys_on_delete_info"), children: [
162
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Label, { children: t("plugin_settings.deprecate_source_keys_on_delete") }),
160
163
  /* @__PURE__ */ jsxRuntime.jsx(
161
- set.Toggle,
164
+ index$1.Toggle,
162
165
  {
163
166
  hint: t("plugin_settings.deprecate_source_keys_on_delete_info"),
164
167
  offLabel: t("plugin_settings.off"),
@@ -167,20 +170,20 @@ const GlobalSettings = () => {
167
170
  onChange: (e) => patchFormModel("upload.allowDeprecate", e.target.checked)
168
171
  }
169
172
  ),
170
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Hint, {})
173
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Hint, {})
171
174
  ] }),
172
175
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
173
176
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
174
- /* @__PURE__ */ jsxRuntime.jsx(set.Divider, {}),
177
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Divider, {}),
175
178
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
176
179
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
177
- /* @__PURE__ */ jsxRuntime.jsx(set.Typography, { variant: "delta", textColor: "neutral800", children: t("plugin_settings.download_settings") }),
180
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Typography, { variant: "delta", textColor: "neutral800", children: t("plugin_settings.download_settings") }),
178
181
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
179
182
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
180
- /* @__PURE__ */ jsxRuntime.jsxs(set.Field.Root, { hint: t("plugin_settings.processing_of_download_webhook_info"), children: [
181
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Label, { children: t("plugin_settings.processing_of_download_webhook") }),
183
+ /* @__PURE__ */ jsxRuntime.jsxs(index$1.Field.Root, { hint: t("plugin_settings.processing_of_download_webhook_info"), children: [
184
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Label, { children: t("plugin_settings.processing_of_download_webhook") }),
182
185
  /* @__PURE__ */ jsxRuntime.jsx(
183
- set.Toggle,
186
+ index$1.Toggle,
184
187
  {
185
188
  hint: t("plugin_settings.processing_of_download_webhook_info"),
186
189
  offLabel: t("plugin_settings.off"),
@@ -189,14 +192,14 @@ const GlobalSettings = () => {
189
192
  onChange: (e) => patchFormModel("download.processDownloadWebhook", e.target.checked)
190
193
  }
191
194
  ),
192
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Hint, {})
195
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Hint, {})
193
196
  ] }),
194
197
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
195
198
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
196
- /* @__PURE__ */ jsxRuntime.jsxs(set.Field.Root, { hint: t("plugin_settings.webhook_author_info"), children: [
197
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Label, { children: t("plugin_settings.webhook_author") }),
199
+ /* @__PURE__ */ jsxRuntime.jsxs(index$1.Field.Root, { hint: t("plugin_settings.webhook_author_info"), children: [
200
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Label, { children: t("plugin_settings.webhook_author") }),
198
201
  /* @__PURE__ */ jsxRuntime.jsx(
199
- set.SingleSelect,
202
+ index$1.SingleSelect,
200
203
  {
201
204
  hint: t("plugin_settings.webhook_author_info"),
202
205
  clearLabel: t("plugin_settings.clear"),
@@ -204,10 +207,10 @@ const GlobalSettings = () => {
204
207
  onClear: () => patchFormModel("download.webhookAuthorId", null),
205
208
  value: formModel?.download?.webhookAuthorId || null,
206
209
  onChange: (value) => patchFormModel("download.webhookAuthorId", value),
207
- children: users.map((user) => /* @__PURE__ */ jsxRuntime.jsx(set.SingleSelectOption, { value: user.id, children: getUserLabel(user) }, user.id))
210
+ children: users.map((user) => /* @__PURE__ */ jsxRuntime.jsx(index$1.SingleSelectOption, { value: user.id, children: getUserLabel(user) }, user.id))
208
211
  }
209
212
  ),
210
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Hint, {})
213
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Hint, {})
211
214
  ] }),
212
215
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
213
216
  /* @__PURE__ */ jsxRuntime.jsx("br", {}),
@@ -1,8 +1,10 @@
1
1
  "use strict";
2
- const index = require("./index-Bbwk3kp3.js");
2
+ const index = require("./index-Q3-srfXc.js");
3
3
  const jsxRuntime = require("react/jsx-runtime");
4
4
  const React = require("react");
5
- const set = require("./set-Cbi1yYuW.js");
5
+ const set = require("./set-CmcBsVOP.js");
6
+ const index$1 = require("./index-CaY3BYnQ.js");
7
+ const useTranslation = require("./useTranslation-BdIl-aLe.js");
6
8
  const strapiApiInstance = index.createStrapiApiAxiosInstance();
7
9
  class ProjectService {
8
10
  static async getConnectedProject() {
@@ -15,7 +17,7 @@ class ProjectService {
15
17
  }
16
18
  }
17
19
  const LanguagesSelector = (props) => {
18
- const { t } = set.useTranslation();
20
+ const { t } = useTranslation.useTranslation();
19
21
  const [selectedLanguages, setSelectedLanguages] = React.useState([]);
20
22
  const onChange = (values) => {
21
23
  setSelectedLanguages(values);
@@ -25,10 +27,10 @@ const LanguagesSelector = (props) => {
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(set.Field.Root, { hint: props.hint || t("common.select_languages"), children: [
29
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Label, { children: props.label || t("common.select_languages") }),
30
+ return /* @__PURE__ */ jsxRuntime.jsxs(index$1.Field.Root, { hint: props.hint || t("common.select_languages"), children: [
31
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Label, { children: props.label || t("common.select_languages") }),
30
32
  /* @__PURE__ */ jsxRuntime.jsx(
31
- set.MultiSelect,
33
+ index$1.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(set.MultiSelectOption, { value: lang.code, children: `${lang.name} (${lang.code})` }, lang.id))
42
+ children: props.projectLanguages.map((lang) => /* @__PURE__ */ jsxRuntime.jsx(index$1.MultiSelectOption, { value: lang.code, children: `${lang.name} (${lang.code})` }, lang.id))
41
43
  }
42
44
  ),
43
- /* @__PURE__ */ jsxRuntime.jsx(set.Field.Hint, {})
45
+ /* @__PURE__ */ jsxRuntime.jsx(index$1.Field.Hint, {})
44
46
  ] });
45
47
  };
46
48
  exports.LanguagesSelector = LanguagesSelector;
@@ -1,7 +1,9 @@
1
- import { c as createStrapiApiAxiosInstance } from "./index-Dj68Ixl2.mjs";
1
+ import { c as createStrapiApiAxiosInstance } from "./index-C15Goe6p.mjs";
2
2
  import { jsxs, jsx } from "react/jsx-runtime";
3
3
  import { useState, useEffect } from "react";
4
- import { u as useTranslation, q as Field, M as MultiSelect, t as MultiSelectOption, n as cloneDeep } from "./set-Dnhh_SyE.mjs";
4
+ import { c as cloneDeep } from "./set-BRyy4Ra6.mjs";
5
+ import { d as Field, M as MultiSelect, e as MultiSelectOption } from "./index-DOCSzcPH.mjs";
6
+ import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
5
7
  const strapiApiInstance = createStrapiApiAxiosInstance();
6
8
  class ProjectService {
7
9
  static async getConnectedProject() {
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const reactRouterDom = require("react-router-dom");
6
+ const index = require("./index-CaY3BYnQ.js");
7
+ const entryExclusionService = require("./entry-exclusion-service-bm-lp4za.js");
8
+ require("./i18n-0dV2P-Hm.js");
9
+ const useTranslation = require("./useTranslation-BdIl-aLe.js");
10
+ const LocalazyPanel = () => {
11
+ const { t } = useTranslation.useTranslation();
12
+ const location = reactRouterDom.useLocation();
13
+ const [isExcluded, setIsExcluded] = React.useState(false);
14
+ const [isLoading, setIsLoading] = React.useState(true);
15
+ const [contentType, setContentType] = React.useState(null);
16
+ const [documentId, setDocumentId] = React.useState(null);
17
+ React.useEffect(() => {
18
+ const extractEntryInfo = () => {
19
+ const pathParts = location.pathname.split("/");
20
+ const contentManagerIndex = pathParts.indexOf("content-manager");
21
+ if (contentManagerIndex !== -1 && pathParts[contentManagerIndex + 1] === "collection-types") {
22
+ const extractedContentType = pathParts[contentManagerIndex + 2];
23
+ const extractedDocumentId = pathParts[contentManagerIndex + 3];
24
+ if (extractedContentType && extractedDocumentId) {
25
+ setContentType(extractedContentType);
26
+ setDocumentId(extractedDocumentId);
27
+ }
28
+ }
29
+ };
30
+ extractEntryInfo();
31
+ }, [location.pathname]);
32
+ React.useEffect(() => {
33
+ const loadExclusionState = async () => {
34
+ if (!contentType || !documentId) {
35
+ setIsLoading(false);
36
+ return;
37
+ }
38
+ try {
39
+ setIsLoading(true);
40
+ const exclusionState = await entryExclusionService.default.getEntryExclusion(contentType, documentId);
41
+ setIsExcluded(exclusionState);
42
+ } catch (error) {
43
+ console.error("Failed to load entry exclusion state:", error);
44
+ setIsExcluded(false);
45
+ } finally {
46
+ setIsLoading(false);
47
+ }
48
+ };
49
+ loadExclusionState();
50
+ }, [contentType, documentId]);
51
+ const handleToggleChange = async (event) => {
52
+ const { checked } = event.target;
53
+ const value = checked;
54
+ if (!contentType || !documentId) {
55
+ console.warn("Cannot save exclusion state: missing content type or document ID");
56
+ return;
57
+ }
58
+ try {
59
+ await entryExclusionService.default.setEntryExclusion(contentType, documentId, value);
60
+ setIsExcluded(value);
61
+ } catch (error) {
62
+ console.error("Failed to save entry exclusion state:", error);
63
+ setIsExcluded(!value);
64
+ }
65
+ };
66
+ return {
67
+ title: "Localazy",
68
+ content: /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
69
+ /* @__PURE__ */ jsxRuntime.jsx("div", { style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { children: t("plugin_settings.exclude_from_translation") }) }),
70
+ /* @__PURE__ */ jsxRuntime.jsx(
71
+ index.Toggle,
72
+ {
73
+ checked: isExcluded,
74
+ onLabel: "True",
75
+ offLabel: "False",
76
+ disabled: isLoading || !contentType || !documentId,
77
+ onChange: handleToggleChange
78
+ }
79
+ )
80
+ ] })
81
+ };
82
+ };
83
+ exports.default = LocalazyPanel;
@@ -0,0 +1,83 @@
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
3
+ import { useLocation } from "react-router-dom";
4
+ import { T as Typography, a as Toggle } from "./index-DOCSzcPH.mjs";
5
+ import EntryExclusionService from "./entry-exclusion-service-BlyFqyBY.mjs";
6
+ import "./i18n-RoETLXdU.mjs";
7
+ import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
8
+ const LocalazyPanel = () => {
9
+ const { t } = useTranslation();
10
+ const location = useLocation();
11
+ const [isExcluded, setIsExcluded] = useState(false);
12
+ const [isLoading, setIsLoading] = useState(true);
13
+ const [contentType, setContentType] = useState(null);
14
+ const [documentId, setDocumentId] = useState(null);
15
+ useEffect(() => {
16
+ const extractEntryInfo = () => {
17
+ const pathParts = location.pathname.split("/");
18
+ const contentManagerIndex = pathParts.indexOf("content-manager");
19
+ if (contentManagerIndex !== -1 && pathParts[contentManagerIndex + 1] === "collection-types") {
20
+ const extractedContentType = pathParts[contentManagerIndex + 2];
21
+ const extractedDocumentId = pathParts[contentManagerIndex + 3];
22
+ if (extractedContentType && extractedDocumentId) {
23
+ setContentType(extractedContentType);
24
+ setDocumentId(extractedDocumentId);
25
+ }
26
+ }
27
+ };
28
+ extractEntryInfo();
29
+ }, [location.pathname]);
30
+ useEffect(() => {
31
+ const loadExclusionState = async () => {
32
+ if (!contentType || !documentId) {
33
+ setIsLoading(false);
34
+ return;
35
+ }
36
+ try {
37
+ setIsLoading(true);
38
+ const exclusionState = await EntryExclusionService.getEntryExclusion(contentType, documentId);
39
+ setIsExcluded(exclusionState);
40
+ } catch (error) {
41
+ console.error("Failed to load entry exclusion state:", error);
42
+ setIsExcluded(false);
43
+ } finally {
44
+ setIsLoading(false);
45
+ }
46
+ };
47
+ loadExclusionState();
48
+ }, [contentType, documentId]);
49
+ const handleToggleChange = async (event) => {
50
+ const { checked } = event.target;
51
+ const value = checked;
52
+ if (!contentType || !documentId) {
53
+ console.warn("Cannot save exclusion state: missing content type or document ID");
54
+ return;
55
+ }
56
+ try {
57
+ await EntryExclusionService.setEntryExclusion(contentType, documentId, value);
58
+ setIsExcluded(value);
59
+ } catch (error) {
60
+ console.error("Failed to save entry exclusion state:", error);
61
+ setIsExcluded(!value);
62
+ }
63
+ };
64
+ return {
65
+ title: "Localazy",
66
+ content: /* @__PURE__ */ jsxs("div", { children: [
67
+ /* @__PURE__ */ jsx("div", { style: { marginBottom: "8px" }, children: /* @__PURE__ */ jsx(Typography, { children: t("plugin_settings.exclude_from_translation") }) }),
68
+ /* @__PURE__ */ jsx(
69
+ Toggle,
70
+ {
71
+ checked: isExcluded,
72
+ onLabel: "True",
73
+ offLabel: "False",
74
+ disabled: isLoading || !contentType || !documentId,
75
+ onChange: handleToggleChange
76
+ }
77
+ )
78
+ ] })
79
+ };
80
+ };
81
+ export {
82
+ LocalazyPanel as default
83
+ };
@@ -0,0 +1,51 @@
1
+ import { jsx } from "react/jsx-runtime";
2
+ import { useState, useEffect } from "react";
3
+ import EntryExclusionService from "./entry-exclusion-service-BlyFqyBY.mjs";
4
+ import "./i18n-RoETLXdU.mjs";
5
+ import { u as useTranslation } from "./useTranslation-CZQ4lU1m.mjs";
6
+ const LocalazyStatusColumn = ({ data, model }) => {
7
+ const { t } = useTranslation();
8
+ const [isExcluded, setIsExcluded] = useState(null);
9
+ const [isLoading, setIsLoading] = useState(true);
10
+ useEffect(() => {
11
+ const checkStatus = async () => {
12
+ if (!data?.documentId || !model) {
13
+ setIsLoading(false);
14
+ return;
15
+ }
16
+ try {
17
+ const excluded = await EntryExclusionService.getEntryExclusion(model, data.documentId);
18
+ setIsExcluded(excluded);
19
+ } catch (error) {
20
+ console.error("Error checking Localazy status:", error);
21
+ setIsExcluded(null);
22
+ } finally {
23
+ setIsLoading(false);
24
+ }
25
+ };
26
+ checkStatus();
27
+ }, [data?.documentId, model]);
28
+ if (isLoading) {
29
+ return /* @__PURE__ */ jsx("span", { style: { color: "#666", fontSize: "12px" }, children: "..." });
30
+ }
31
+ if (isExcluded === null) {
32
+ return /* @__PURE__ */ jsx("span", { style: { color: "#666", fontSize: "12px" }, children: "-" });
33
+ }
34
+ return /* @__PURE__ */ jsx(
35
+ "span",
36
+ {
37
+ style: {
38
+ padding: "4px 8px",
39
+ borderRadius: "4px",
40
+ fontSize: "12px",
41
+ fontWeight: "bold",
42
+ backgroundColor: isExcluded ? "#ff6b6b" : "#51cf66",
43
+ color: "white"
44
+ },
45
+ children: isExcluded ? t("plugin_settings.status_excluded") : t("plugin_settings.status_included")
46
+ }
47
+ );
48
+ };
49
+ export {
50
+ LocalazyStatusColumn as default
51
+ };
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const React = require("react");
5
+ const entryExclusionService = require("./entry-exclusion-service-bm-lp4za.js");
6
+ require("./i18n-0dV2P-Hm.js");
7
+ const useTranslation = require("./useTranslation-BdIl-aLe.js");
8
+ const LocalazyStatusColumn = ({ data, model }) => {
9
+ const { t } = useTranslation.useTranslation();
10
+ const [isExcluded, setIsExcluded] = React.useState(null);
11
+ const [isLoading, setIsLoading] = React.useState(true);
12
+ React.useEffect(() => {
13
+ const checkStatus = async () => {
14
+ if (!data?.documentId || !model) {
15
+ setIsLoading(false);
16
+ return;
17
+ }
18
+ try {
19
+ const excluded = await entryExclusionService.default.getEntryExclusion(model, data.documentId);
20
+ setIsExcluded(excluded);
21
+ } catch (error) {
22
+ console.error("Error checking Localazy status:", error);
23
+ setIsExcluded(null);
24
+ } finally {
25
+ setIsLoading(false);
26
+ }
27
+ };
28
+ checkStatus();
29
+ }, [data?.documentId, model]);
30
+ if (isLoading) {
31
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#666", fontSize: "12px" }, children: "..." });
32
+ }
33
+ if (isExcluded === null) {
34
+ return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { color: "#666", fontSize: "12px" }, children: "-" });
35
+ }
36
+ return /* @__PURE__ */ jsxRuntime.jsx(
37
+ "span",
38
+ {
39
+ style: {
40
+ padding: "4px 8px",
41
+ borderRadius: "4px",
42
+ fontSize: "12px",
43
+ fontWeight: "bold",
44
+ backgroundColor: isExcluded ? "#ff6b6b" : "#51cf66",
45
+ color: "white"
46
+ },
47
+ children: isExcluded ? t("plugin_settings.status_excluded") : t("plugin_settings.status_included")
48
+ }
49
+ );
50
+ };
51
+ exports.default = LocalazyStatusColumn;
@@ -0,0 +1,7 @@
1
+ "use strict";
2
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
3
+ function getDefaultExportFromCjs(x) {
4
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
5
+ }
6
+ exports.commonjsGlobal = commonjsGlobal;
7
+ exports.getDefaultExportFromCjs = getDefaultExportFromCjs;
@@ -0,0 +1,8 @@
1
+ var commonjsGlobal = typeof globalThis !== "undefined" ? globalThis : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : {};
2
+ function getDefaultExportFromCjs(x) {
3
+ return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
4
+ }
5
+ export {
6
+ commonjsGlobal as c,
7
+ getDefaultExportFromCjs as g
8
+ };
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const en = {
4
+ "localazy.name": "Localazy",
5
+ "localazy.localazy_settings": "Localazy Settings",
6
+ "localazy.content_transfer_setup": "Content Transfer Setup",
7
+ "localazy.exclude_from_translation": "Exclude from translation",
8
+ "localazy.include_to_translation": "Include to translation"
9
+ };
10
+ exports.default = en;
@@ -0,0 +1,10 @@
1
+ const en = {
2
+ "localazy.name": "Localazy",
3
+ "localazy.localazy_settings": "Localazy Settings",
4
+ "localazy.content_transfer_setup": "Content Transfer Setup",
5
+ "localazy.exclude_from_translation": "Exclude from translation",
6
+ "localazy.include_to_translation": "Include to translation"
7
+ };
8
+ export {
9
+ en as default
10
+ };
@@ -0,0 +1,60 @@
1
+ import { c as createStrapiApiAxiosInstance } from "./index-C15Goe6p.mjs";
2
+ const BASE_PATH = "/entry-exclusion";
3
+ const axiosInstance = createStrapiApiAxiosInstance();
4
+ class EntryExclusionService {
5
+ /**
6
+ * Get entry exclusion state for a specific entry
7
+ */
8
+ static async getEntryExclusion(contentType, documentId) {
9
+ try {
10
+ const result = await axiosInstance.get(`${BASE_PATH}/${contentType}/${documentId}`);
11
+ return result.data.isExcluded;
12
+ } catch (error) {
13
+ console.error("Error getting entry exclusion:", error);
14
+ throw error;
15
+ }
16
+ }
17
+ /**
18
+ * Set entry exclusion state for a specific entry
19
+ */
20
+ static async setEntryExclusion(contentType, documentId, isExcluded) {
21
+ try {
22
+ const result = await axiosInstance.put(`${BASE_PATH}/${contentType}/${documentId}`, {
23
+ isExcluded
24
+ });
25
+ return result.data.isExcluded;
26
+ } catch (error) {
27
+ console.error("Error setting entry exclusion:", error);
28
+ throw error;
29
+ }
30
+ }
31
+ /**
32
+ * Set exclusion state for multiple entries
33
+ */
34
+ static async setMultipleEntriesExclusion(contentType, documentIds, isExcluded) {
35
+ try {
36
+ for (let i = 0; i < documentIds.length; i++) {
37
+ const docId = documentIds[i];
38
+ await this.setEntryExclusion(contentType, docId, isExcluded);
39
+ }
40
+ } catch (error) {
41
+ console.error("Error setting multiple entries exclusion:", error);
42
+ throw error;
43
+ }
44
+ }
45
+ /**
46
+ * Get all excluded entries for a content type
47
+ */
48
+ static async getContentTypeExclusions(contentType) {
49
+ try {
50
+ const result = await axiosInstance.get(`${BASE_PATH}/${contentType}`);
51
+ return result.data.excludedIds;
52
+ } catch (error) {
53
+ console.error("Error getting content type exclusions:", error);
54
+ throw error;
55
+ }
56
+ }
57
+ }
58
+ export {
59
+ EntryExclusionService as default
60
+ };