@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.
Files changed (61) hide show
  1. package/dist/_chunks/FetchIdentity-4kkW9N7Y.js +981 -0
  2. package/dist/_chunks/FetchIdentity-BWSQAXt-.mjs +983 -0
  3. package/dist/_chunks/{LanguagesSelector-CeB7tVcb.mjs → LanguagesSelector-DwAGgpcR.mjs} +4 -2
  4. package/dist/_chunks/{LanguagesSelector-Bd8VFHib.js → LanguagesSelector-yWC_Yb_S.js} +12 -10
  5. package/dist/_chunks/{App-NRmSxuW3.js → LocalazyApp-DnaA768k.js} +136 -117
  6. package/dist/_chunks/{App-CtS6CrNn.mjs → LocalazyApp-zySanVTu.mjs} +32 -13
  7. package/dist/_chunks/{ContentTransferSetup-CeKXlzw_.mjs → LocalazyContentTransferSetup-C7qVIeix.mjs} +49 -456
  8. package/dist/_chunks/{ContentTransferSetup-DGs8MZPj.js → LocalazyContentTransferSetup-CeOM6bYA.js} +113 -520
  9. package/dist/_chunks/{GlobalSettings-rOwd0Y0E.mjs → LocalazyGlobalSettings-QvuLdsLe.mjs} +17 -8
  10. package/dist/_chunks/{GlobalSettings-CRMPRA3Y.js → LocalazyGlobalSettings-ewETL3oG.js} +61 -52
  11. package/dist/_chunks/LocalazyPanel-BXVLvFgD.js +83 -0
  12. package/dist/_chunks/LocalazyPanel-BotUsX-y.mjs +83 -0
  13. package/dist/_chunks/LocalazyStatusColumn-C81HewMg.mjs +51 -0
  14. package/dist/_chunks/LocalazyStatusColumn-Dt96YcGQ.js +51 -0
  15. package/dist/_chunks/{isEqual-CC-cEPwY.mjs → RequireLocalazyAuth-CDuyGCrT.mjs} +22 -1
  16. package/dist/_chunks/{isEqual-0M0aSdTT.js → RequireLocalazyAuth-CWBWETzC.js} +50 -29
  17. package/dist/_chunks/_commonjsHelpers-Bc2YnDe1.js +7 -0
  18. package/dist/_chunks/_commonjsHelpers-DWwsNxpa.mjs +8 -0
  19. package/dist/_chunks/en-CMWcM0nM.js +10 -0
  20. package/dist/_chunks/en-RX915msK.mjs +10 -0
  21. package/dist/_chunks/entry-exclusion-service-BVPICve2.mjs +60 -0
  22. package/dist/_chunks/entry-exclusion-service-CGV6iOkB.js +60 -0
  23. package/dist/_chunks/{has-model-changed-gNSOSMBa.js → has-model-changed-DVYRxVhM.js} +33 -32
  24. package/dist/_chunks/{has-model-changed-DViUIQHk.mjs → has-model-changed-DZL36gWh.mjs} +3 -2
  25. package/dist/_chunks/i18n-0dV2P-Hm.js +2378 -0
  26. package/dist/_chunks/i18n-RoETLXdU.mjs +2378 -0
  27. package/dist/_chunks/index-1he9s_bs.js +430 -0
  28. package/dist/_chunks/index-BIbKC7-V.mjs +432 -0
  29. package/dist/_chunks/index-CCxXsn7Z.js +254 -0
  30. package/dist/_chunks/{set-Cbi1yYuW.js → index-CaY3BYnQ.js} +878 -4379
  31. package/dist/_chunks/{set-Dnhh_SyE.mjs → index-CgI_aKe_.mjs} +906 -4408
  32. package/dist/_chunks/index-DsrYI6aB.mjs +231 -0
  33. package/dist/_chunks/initReactI18next-B0H8_DlW.js +60 -0
  34. package/dist/_chunks/initReactI18next-MHHxeg_9.mjs +61 -0
  35. package/dist/_chunks/{index-Dj68Ixl2.mjs → strapi-api-base-BE8VMlaA.js} +7 -234
  36. package/dist/_chunks/{index-Bbwk3kp3.js → strapi-api-base-DjeKGUw7.mjs} +15 -242
  37. package/dist/_chunks/useTranslation-BdIl-aLe.js +188 -0
  38. package/dist/_chunks/useTranslation-CZQ4lU1m.mjs +189 -0
  39. package/dist/admin/index.js +1 -1
  40. package/dist/admin/index.mjs +1 -1
  41. package/dist/admin/src/components/LocalazyPanel.d.ts +4 -0
  42. package/dist/admin/src/components/LocalazyStatusColumn.d.ts +3 -0
  43. package/dist/admin/src/components/RequireLocalazyAuth.d.ts +6 -0
  44. package/dist/admin/src/index.d.ts +1 -0
  45. package/dist/admin/src/modules/entry-exclusion/services/entry-exclusion-service.d.ts +18 -0
  46. package/dist/admin/src/modules/plugin-settings/locale/en.d.ts +8 -0
  47. package/dist/admin/src/pages/LocalazyApp.d.ts +2 -0
  48. package/dist/admin/src/pages/LocalazyContentTransferSetup.d.ts +2 -0
  49. package/dist/admin/src/pages/LocalazyGlobalSettings.d.ts +2 -0
  50. package/dist/server/index.js +202 -35
  51. package/dist/server/index.mjs +202 -35
  52. package/dist/server/src/controllers/entry-exclusion-controller.d.ts +21 -0
  53. package/dist/server/src/controllers/index.d.ts +7 -0
  54. package/dist/server/src/core/index.d.ts +6 -0
  55. package/dist/server/src/index.d.ts +15 -0
  56. package/dist/server/src/routes/entry-exclusion-routes.d.ts +9 -0
  57. package/dist/server/src/services/entry-exclusion-service.d.ts +23 -0
  58. package/dist/server/src/services/index.d.ts +8 -0
  59. package/package.json +2 -2
  60. package/dist/_chunks/en-BTf8goGM.mjs +0 -8
  61. package/dist/_chunks/en-CRtsEFtl.js +0 -8
@@ -1,9 +1,15 @@
1
1
  "use strict";
2
- const set = require("./set-Cbi1yYuW.js");
2
+ const FetchIdentity = require("./FetchIdentity-4kkW9N7Y.js");
3
+ const jsxRuntime = require("react/jsx-runtime");
4
+ const index$1 = require("./index-CCxXsn7Z.js");
5
+ const index = require("./index-CaY3BYnQ.js");
6
+ const admin = require("@strapi/strapi/admin");
7
+ require("./i18n-0dV2P-Hm.js");
8
+ const useTranslation = require("./useTranslation-BdIl-aLe.js");
3
9
  function arraySome(array, predicate) {
4
- var index = -1, length = array == null ? 0 : array.length;
5
- while (++index < length) {
6
- if (predicate(array[index], index, array)) {
10
+ var index2 = -1, length = array == null ? 0 : array.length;
11
+ while (++index2 < length) {
12
+ if (predicate(array[index2], index2, array)) {
7
13
  return true;
8
14
  }
9
15
  }
@@ -20,13 +26,13 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
20
26
  if (arrStacked && othStacked) {
21
27
  return arrStacked == other && othStacked == array;
22
28
  }
23
- var index = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new set.SetCache() : void 0;
29
+ var index2 = -1, result = true, seen = bitmask & COMPARE_UNORDERED_FLAG$1 ? new FetchIdentity.SetCache() : void 0;
24
30
  stack.set(array, other);
25
31
  stack.set(other, array);
26
- while (++index < arrLength) {
27
- var arrValue = array[index], othValue = other[index];
32
+ while (++index2 < arrLength) {
33
+ var arrValue = array[index2], othValue = other[index2];
28
34
  if (customizer) {
29
- var compared = isPartial ? customizer(othValue, arrValue, index, other, array, stack) : customizer(arrValue, othValue, index, array, other, stack);
35
+ var compared = isPartial ? customizer(othValue, arrValue, index2, other, array, stack) : customizer(arrValue, othValue, index2, array, other, stack);
30
36
  }
31
37
  if (compared !== void 0) {
32
38
  if (compared) {
@@ -37,7 +43,7 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
37
43
  }
38
44
  if (seen) {
39
45
  if (!arraySome(other, function(othValue2, othIndex) {
40
- if (!set.cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
46
+ if (!FetchIdentity.cacheHas(seen, othIndex) && (arrValue === othValue2 || equalFunc(arrValue, othValue2, bitmask, customizer, stack))) {
41
47
  return seen.push(othIndex);
42
48
  }
43
49
  })) {
@@ -54,16 +60,16 @@ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
54
60
  return result;
55
61
  }
56
62
  function mapToArray(map) {
57
- var index = -1, result = Array(map.size);
63
+ var index2 = -1, result = Array(map.size);
58
64
  map.forEach(function(value, key) {
59
- result[++index] = [key, value];
65
+ result[++index2] = [key, value];
60
66
  });
61
67
  return result;
62
68
  }
63
69
  var COMPARE_PARTIAL_FLAG$2 = 1, COMPARE_UNORDERED_FLAG = 2;
64
70
  var boolTag = "[object Boolean]", dateTag = "[object Date]", errorTag = "[object Error]", mapTag = "[object Map]", numberTag = "[object Number]", regexpTag = "[object RegExp]", setTag = "[object Set]", stringTag = "[object String]", symbolTag = "[object Symbol]";
65
71
  var arrayBufferTag = "[object ArrayBuffer]", dataViewTag = "[object DataView]";
66
- var symbolProto = set.Symbol ? set.Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
72
+ var symbolProto = FetchIdentity.Symbol ? FetchIdentity.Symbol.prototype : void 0, symbolValueOf = symbolProto ? symbolProto.valueOf : void 0;
67
73
  function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
68
74
  switch (tag) {
69
75
  case dataViewTag:
@@ -73,14 +79,14 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
73
79
  object = object.buffer;
74
80
  other = other.buffer;
75
81
  case arrayBufferTag:
76
- if (object.byteLength != other.byteLength || !equalFunc(new set.Uint8Array(object), new set.Uint8Array(other))) {
82
+ if (object.byteLength != other.byteLength || !equalFunc(new FetchIdentity.Uint8Array(object), new FetchIdentity.Uint8Array(other))) {
77
83
  return false;
78
84
  }
79
85
  return true;
80
86
  case boolTag:
81
87
  case dateTag:
82
88
  case numberTag:
83
- return set.eq(+object, +other);
89
+ return FetchIdentity.eq(+object, +other);
84
90
  case errorTag:
85
91
  return object.name == other.name && object.message == other.message;
86
92
  case regexpTag:
@@ -90,7 +96,7 @@ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
90
96
  var convert = mapToArray;
91
97
  case setTag:
92
98
  var isPartial = bitmask & COMPARE_PARTIAL_FLAG$2;
93
- convert || (convert = set.setToArray);
99
+ convert || (convert = FetchIdentity.setToArray);
94
100
  if (object.size != other.size && !isPartial) {
95
101
  return false;
96
102
  }
@@ -114,13 +120,13 @@ var COMPARE_PARTIAL_FLAG$1 = 1;
114
120
  var objectProto$1 = Object.prototype;
115
121
  var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
116
122
  function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
117
- var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = set.getAllKeys(object), objLength = objProps.length, othProps = set.getAllKeys(other), othLength = othProps.length;
123
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG$1, objProps = FetchIdentity.getAllKeys(object), objLength = objProps.length, othProps = FetchIdentity.getAllKeys(other), othLength = othProps.length;
118
124
  if (objLength != othLength && !isPartial) {
119
125
  return false;
120
126
  }
121
- var index = objLength;
122
- while (index--) {
123
- var key = objProps[index];
127
+ var index2 = objLength;
128
+ while (index2--) {
129
+ var key = objProps[index2];
124
130
  if (!(isPartial ? key in other : hasOwnProperty$1.call(other, key))) {
125
131
  return false;
126
132
  }
@@ -134,8 +140,8 @@ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
134
140
  stack.set(object, other);
135
141
  stack.set(other, object);
136
142
  var skipCtor = isPartial;
137
- while (++index < objLength) {
138
- key = objProps[index];
143
+ while (++index2 < objLength) {
144
+ key = objProps[index2];
139
145
  var objValue = object[key], othValue = other[key];
140
146
  if (customizer) {
141
147
  var compared = isPartial ? customizer(othValue, objValue, key, other, object, stack) : customizer(objValue, othValue, key, object, other, stack);
@@ -161,40 +167,40 @@ var argsTag = "[object Arguments]", arrayTag = "[object Array]", objectTag = "[o
161
167
  var objectProto = Object.prototype;
162
168
  var hasOwnProperty = objectProto.hasOwnProperty;
163
169
  function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
164
- var objIsArr = set.isArray(object), othIsArr = set.isArray(other), objTag = objIsArr ? arrayTag : set.getTag(object), othTag = othIsArr ? arrayTag : set.getTag(other);
170
+ var objIsArr = FetchIdentity.isArray(object), othIsArr = FetchIdentity.isArray(other), objTag = objIsArr ? arrayTag : FetchIdentity.getTag(object), othTag = othIsArr ? arrayTag : FetchIdentity.getTag(other);
165
171
  objTag = objTag == argsTag ? objectTag : objTag;
166
172
  othTag = othTag == argsTag ? objectTag : othTag;
167
173
  var objIsObj = objTag == objectTag, othIsObj = othTag == objectTag, isSameTag = objTag == othTag;
168
- if (isSameTag && set.isBuffer(object)) {
169
- if (!set.isBuffer(other)) {
174
+ if (isSameTag && FetchIdentity.isBuffer(object)) {
175
+ if (!FetchIdentity.isBuffer(other)) {
170
176
  return false;
171
177
  }
172
178
  objIsArr = true;
173
179
  objIsObj = false;
174
180
  }
175
181
  if (isSameTag && !objIsObj) {
176
- stack || (stack = new set.Stack());
177
- return objIsArr || set.isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
182
+ stack || (stack = new FetchIdentity.Stack());
183
+ return objIsArr || FetchIdentity.isTypedArray(object) ? equalArrays(object, other, bitmask, customizer, equalFunc, stack) : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
178
184
  }
179
185
  if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
180
186
  var objIsWrapped = objIsObj && hasOwnProperty.call(object, "__wrapped__"), othIsWrapped = othIsObj && hasOwnProperty.call(other, "__wrapped__");
181
187
  if (objIsWrapped || othIsWrapped) {
182
188
  var objUnwrapped = objIsWrapped ? object.value() : object, othUnwrapped = othIsWrapped ? other.value() : other;
183
- stack || (stack = new set.Stack());
189
+ stack || (stack = new FetchIdentity.Stack());
184
190
  return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
185
191
  }
186
192
  }
187
193
  if (!isSameTag) {
188
194
  return false;
189
195
  }
190
- stack || (stack = new set.Stack());
196
+ stack || (stack = new FetchIdentity.Stack());
191
197
  return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
192
198
  }
193
199
  function baseIsEqual(value, other, bitmask, customizer, stack) {
194
200
  if (value === other) {
195
201
  return true;
196
202
  }
197
- if (value == null || other == null || !set.isObjectLike(value) && !set.isObjectLike(other)) {
203
+ if (value == null || other == null || !FetchIdentity.isObjectLike(value) && !FetchIdentity.isObjectLike(other)) {
198
204
  return value !== value && other !== other;
199
205
  }
200
206
  return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
@@ -202,4 +208,19 @@ function baseIsEqual(value, other, bitmask, customizer, stack) {
202
208
  function isEqual(value, other) {
203
209
  return baseIsEqual(value, other);
204
210
  }
211
+ const RequireLocalazyAuth = ({ children }) => {
212
+ const { isLoggedIn, isFetchingIdentity } = FetchIdentity.useLocalazyIdentity();
213
+ const { t } = useTranslation.useTranslation();
214
+ if (!isFetchingIdentity && !isLoggedIn) {
215
+ return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
216
+ /* @__PURE__ */ jsxRuntime.jsx(admin.Layouts.Header, { title: t("common.localazy_plugin"), subtitle: t("common.localazy_plugin_description"), as: "h2" }),
217
+ /* @__PURE__ */ jsxRuntime.jsxs(index.Box, { marginLeft: 10, marginRight: 10, background: "neutral0", padding: 7, hasRadius: true, shadow: "tableShadow", children: [
218
+ /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "epsilon", textColor: "neutral600", children: t("login.you_have_to_own_account_for_the_plugin_to_work_properly") }),
219
+ /* @__PURE__ */ jsxRuntime.jsx(index.Box, { paddingTop: 4, children: /* @__PURE__ */ jsxRuntime.jsx(index.Typography, { variant: "omega", children: /* @__PURE__ */ jsxRuntime.jsx("a", { href: `/admin/plugins/${index$1.PLUGIN_ID}/`, children: t("login.login_with_localazy") }) }) })
220
+ ] })
221
+ ] });
222
+ }
223
+ return children;
224
+ };
225
+ exports.RequireLocalazyAuth = RequireLocalazyAuth;
205
226
  exports.isEqual = isEqual;
@@ -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 "./strapi-api-base-DjeKGUw7.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
+ };
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
3
+ const strapiApiBase = require("./strapi-api-base-BE8VMlaA.js");
4
+ const BASE_PATH = "/entry-exclusion";
5
+ const axiosInstance = strapiApiBase.createStrapiApiAxiosInstance();
6
+ class EntryExclusionService {
7
+ /**
8
+ * Get entry exclusion state for a specific entry
9
+ */
10
+ static async getEntryExclusion(contentType, documentId) {
11
+ try {
12
+ const result = await axiosInstance.get(`${BASE_PATH}/${contentType}/${documentId}`);
13
+ return result.data.isExcluded;
14
+ } catch (error) {
15
+ console.error("Error getting entry exclusion:", error);
16
+ throw error;
17
+ }
18
+ }
19
+ /**
20
+ * Set entry exclusion state for a specific entry
21
+ */
22
+ static async setEntryExclusion(contentType, documentId, isExcluded) {
23
+ try {
24
+ const result = await axiosInstance.put(`${BASE_PATH}/${contentType}/${documentId}`, {
25
+ isExcluded
26
+ });
27
+ return result.data.isExcluded;
28
+ } catch (error) {
29
+ console.error("Error setting entry exclusion:", error);
30
+ throw error;
31
+ }
32
+ }
33
+ /**
34
+ * Set exclusion state for multiple entries
35
+ */
36
+ static async setMultipleEntriesExclusion(contentType, documentIds, isExcluded) {
37
+ try {
38
+ for (let i = 0; i < documentIds.length; i++) {
39
+ const docId = documentIds[i];
40
+ await this.setEntryExclusion(contentType, docId, isExcluded);
41
+ }
42
+ } catch (error) {
43
+ console.error("Error setting multiple entries exclusion:", error);
44
+ throw error;
45
+ }
46
+ }
47
+ /**
48
+ * Get all excluded entries for a content type
49
+ */
50
+ static async getContentTypeExclusions(contentType) {
51
+ try {
52
+ const result = await axiosInstance.get(`${BASE_PATH}/${contentType}`);
53
+ return result.data.excludedIds;
54
+ } catch (error) {
55
+ console.error("Error getting content type exclusions:", error);
56
+ throw error;
57
+ }
58
+ }
59
+ }
60
+ exports.default = EntryExclusionService;
@@ -1,20 +1,21 @@
1
1
  "use strict";
2
- const set = require("./set-Cbi1yYuW.js");
3
- const index = require("./index-Bbwk3kp3.js");
2
+ const FetchIdentity = require("./FetchIdentity-4kkW9N7Y.js");
3
+ const strapiApiBase = require("./strapi-api-base-BE8VMlaA.js");
4
+ const _commonjsHelpers = require("./_commonjsHelpers-Bc2YnDe1.js");
4
5
  function baseGet(object, path) {
5
- path = set.castPath(path, object);
6
- var index2 = 0, length = path.length;
7
- while (object != null && index2 < length) {
8
- object = object[set.toKey(path[index2++])];
6
+ path = FetchIdentity.castPath(path, object);
7
+ var index = 0, length = path.length;
8
+ while (object != null && index < length) {
9
+ object = object[FetchIdentity.toKey(path[index++])];
9
10
  }
10
- return index2 && index2 == length ? object : void 0;
11
+ return index && index == length ? object : void 0;
11
12
  }
12
13
  function get(object, path, defaultValue) {
13
14
  var result = object == null ? void 0 : baseGet(object, path);
14
15
  return result === void 0 ? defaultValue : result;
15
16
  }
16
17
  const BASE_PATH = "/strapi";
17
- const strapiApiAxiosInstance = index.createStrapiApiAxiosInstance();
18
+ const strapiApiAxiosInstance = strapiApiBase.createStrapiApiAxiosInstance();
18
19
  class StrapiModelService {
19
20
  static async getModels() {
20
21
  try {
@@ -113,10 +114,10 @@ const findModelValueByKey = (allModelsTree, key) => {
113
114
  return get(objectivizedModelsTree, key);
114
115
  };
115
116
  function baseFindIndex(array, predicate, fromIndex, fromRight) {
116
- var length = array.length, index2 = fromIndex + -1;
117
- while (++index2 < length) {
118
- if (predicate(array[index2], index2, array)) {
119
- return index2;
117
+ var length = array.length, index = fromIndex + -1;
118
+ while (++index < length) {
119
+ if (predicate(array[index], index, array)) {
120
+ return index;
120
121
  }
121
122
  }
122
123
  return -1;
@@ -125,10 +126,10 @@ function baseIsNaN(value) {
125
126
  return value !== value;
126
127
  }
127
128
  function strictIndexOf(array, value, fromIndex) {
128
- var index2 = fromIndex - 1, length = array.length;
129
- while (++index2 < length) {
130
- if (array[index2] === value) {
131
- return index2;
129
+ var index = fromIndex - 1, length = array.length;
130
+ while (++index < length) {
131
+ if (array[index] === value) {
132
+ return index;
132
133
  }
133
134
  }
134
135
  return -1;
@@ -143,26 +144,26 @@ function arrayIncludes(array, value) {
143
144
  function noop() {
144
145
  }
145
146
  var INFINITY = 1 / 0;
146
- var createSet = !(set.Set && 1 / set.setToArray(new set.Set([, -0]))[1] == INFINITY) ? noop : function(values) {
147
- return new set.Set(values);
147
+ var createSet = !(FetchIdentity.Set && 1 / FetchIdentity.setToArray(new FetchIdentity.Set([, -0]))[1] == INFINITY) ? noop : function(values) {
148
+ return new FetchIdentity.Set(values);
148
149
  };
149
150
  var LARGE_ARRAY_SIZE = 200;
150
151
  function baseUniq(array, iteratee, comparator) {
151
- var index2 = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
152
+ var index = -1, includes = arrayIncludes, length = array.length, isCommon = true, result = [], seen = result;
152
153
  if (length >= LARGE_ARRAY_SIZE) {
153
- var set$1 = createSet(array);
154
- if (set$1) {
155
- return set.setToArray(set$1);
154
+ var set = createSet(array);
155
+ if (set) {
156
+ return FetchIdentity.setToArray(set);
156
157
  }
157
158
  isCommon = false;
158
- includes = set.cacheHas;
159
- seen = new set.SetCache();
159
+ includes = FetchIdentity.cacheHas;
160
+ seen = new FetchIdentity.SetCache();
160
161
  } else {
161
162
  seen = result;
162
163
  }
163
164
  outer:
164
- while (++index2 < length) {
165
- var value = array[index2], computed = value;
165
+ while (++index < length) {
166
+ var value = array[index], computed = value;
166
167
  value = value !== 0 ? value : 0;
167
168
  if (isCommon && computed === computed) {
168
169
  var seenIndex = seen.length;
@@ -196,10 +197,10 @@ function deepKeys(obj, stack, parent, intermediate) {
196
197
  if (intermediate) stack.push(parent ? p : escaped);
197
198
  deepKeys(obj[el], stack, p || escaped, intermediate);
198
199
  } else if (isArray(obj[el])) {
199
- obj[el].forEach((item, index2) => {
200
- var p2 = parent ? parent + `.${escaped}.${index2}` : parent;
201
- if (intermediate) stack.push(parent ? p2 : `${escaped}.${index2}`);
202
- deepKeys(item, stack, p2 || `${escaped}.${index2}`, intermediate);
200
+ obj[el].forEach((item, index) => {
201
+ var p2 = parent ? parent + `.${escaped}.${index}` : parent;
202
+ if (intermediate) stack.push(parent ? p2 : `${escaped}.${index}`);
203
+ deepKeys(item, stack, p2 || `${escaped}.${index}`, intermediate);
203
204
  });
204
205
  } else {
205
206
  var key = parent ? parent + "." + escaped : escaped;
@@ -211,7 +212,7 @@ function deepKeys(obj, stack, parent, intermediate) {
211
212
  var deepKeys_1 = function(obj, intermediate) {
212
213
  return deepKeys(obj, [], null, intermediate);
213
214
  };
214
- const deepKeys$1 = /* @__PURE__ */ set.getDefaultExportFromCjs(deepKeys_1);
215
+ const deepKeys$1 = /* @__PURE__ */ _commonjsHelpers.getDefaultExportFromCjs(deepKeys_1);
215
216
  const sortByModelName = (a, b) => {
216
217
  const uidA = Object.keys(a)[0].toLowerCase();
217
218
  const uidB = Object.keys(b)[0].toLowerCase();
@@ -282,7 +283,7 @@ const hasModelChanged = async (localizableTree = null, storedSetupSchema = null,
282
283
  localizableTree = getModelsTree(models, localizableModels);
283
284
  }
284
285
  if (!storedSetupSchema) {
285
- storedSetupSchema = (await set.PluginSettingsService.getContentTransferSetup()).setup;
286
+ storedSetupSchema = (await FetchIdentity.PluginSettingsService.getContentTransferSetup()).setup;
286
287
  }
287
288
  if (!allModelsTree) {
288
289
  allModelsTree = getModelsTree(models, models);
@@ -1,5 +1,6 @@
1
- import { W as castPath, X as toKey, Y as Set, Z as setToArray, _ as SetCache, $ as cacheHas, g as getDefaultExportFromCjs, P as PluginSettingsService } from "./set-Dnhh_SyE.mjs";
2
- import { c as createStrapiApiAxiosInstance } from "./index-Dj68Ixl2.mjs";
1
+ import { q as castPath, t as toKey, r as Set, d as setToArray, S as SetCache, a as cacheHas, P as PluginSettingsService } from "./FetchIdentity-BWSQAXt-.mjs";
2
+ import { c as createStrapiApiAxiosInstance } from "./strapi-api-base-DjeKGUw7.mjs";
3
+ import { g as getDefaultExportFromCjs } from "./_commonjsHelpers-DWwsNxpa.mjs";
3
4
  function baseGet(object, path) {
4
5
  path = castPath(path, object);
5
6
  var index = 0, length = path.length;