@littlebox/strapi-suite 1.0.50 → 1.0.52

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 (35) hide show
  1. package/dist/_chunks/{App-CUhT6I0p.js → App-C-h--Kv_.js} +565 -36
  2. package/dist/_chunks/{App-CVOV2lQP.mjs → App-C1HyspTk.mjs} +558 -29
  3. package/dist/_chunks/{SlugInput-Cy1-zfz_.js → SlugInput-3gkr6B0t.js} +3 -4
  4. package/dist/_chunks/{SlugInput-DDRjbmRt.mjs → SlugInput-CU9_b0dd.mjs} +1 -2
  5. package/dist/_chunks/{en-CGJcJfk1.js → en-CLNZnNeq.js} +30 -0
  6. package/dist/_chunks/{en-CRSiVe4w.mjs → en-F6RYx79c.mjs} +30 -0
  7. package/dist/_chunks/{index-B0aQw-t1.js → index-60sq8G6p.js} +667 -20
  8. package/dist/_chunks/{index-fPknNRw6.mjs → index-DQ3vX9So.mjs} +639 -9
  9. package/dist/admin/index.js +1 -1
  10. package/dist/admin/index.mjs +2 -2
  11. package/dist/admin/src/components/DocumentTranslateBox.d.ts +5 -0
  12. package/dist/admin/src/components/DocumentTranslateModal.d.ts +11 -0
  13. package/dist/admin/src/components/TranslationAiModal.d.ts +8 -0
  14. package/dist/admin/src/components/TranslationSettingsModal.d.ts +6 -0
  15. package/dist/admin/src/contexts/settings.d.ts +1 -0
  16. package/dist/admin/src/core/config.d.ts +1 -0
  17. package/dist/admin/src/core/gateways/aiGateway.d.ts +19 -0
  18. package/dist/admin/src/core/gateways/documentGateway.d.ts +15 -0
  19. package/dist/admin/src/core/gateways/translationGateway.d.ts +13 -0
  20. package/dist/admin/src/core/usecases/translateDocument.d.ts +33 -0
  21. package/dist/admin/src/core/usecases/translateWithAi.d.ts +17 -0
  22. package/dist/admin/src/core/utils/documentFields.d.ts +23 -0
  23. package/dist/server/index.js +386 -79
  24. package/dist/server/index.mjs +386 -79
  25. package/dist/server/src/config/index.d.ts +4 -0
  26. package/dist/server/src/controllers/index.d.ts +6 -0
  27. package/dist/server/src/controllers/modules/ai-translation.d.ts +7 -0
  28. package/dist/server/src/controllers/modules/translation.d.ts +1 -0
  29. package/dist/server/src/index.d.ts +22 -1
  30. package/dist/server/src/services/app/setting.d.ts +3 -1
  31. package/dist/server/src/services/index.d.ts +16 -1
  32. package/dist/server/src/services/modules/ai-translation.d.ts +35 -0
  33. package/package.json +1 -1
  34. package/dist/_chunks/convertToSlug-B-OmazDp.js +0 -83
  35. package/dist/_chunks/convertToSlug-Bht0pDyl.mjs +0 -84
@@ -8,8 +8,7 @@ const designSystem = require("@strapi/design-system");
8
8
  const icons = require("@strapi/icons");
9
9
  const admin = require("@strapi/strapi/admin");
10
10
  const styled = require("styled-components");
11
- const index = require("./index-B0aQw-t1.js");
12
- const convertToSlug = require("./convertToSlug-B-OmazDp.js");
11
+ const index = require("./index-60sq8G6p.js");
13
12
  const _interopDefault = (e) => e && e.__esModule ? e : { default: e };
14
13
  function _interopNamespace(e) {
15
14
  if (e && e.__esModule) return e;
@@ -67,7 +66,7 @@ const Input = React__namespace.forwardRef(
67
66
  return searchParams.get("plugins[i18n][locale]");
68
67
  }
69
68
  async function fetchLocales() {
70
- const fetchLocales2 = new convertToSlug.FetchLocales();
69
+ const fetchLocales2 = new index.FetchLocales();
71
70
  const fetchLocalesOutput = await fetchLocales2.execute();
72
71
  setI18nLocales(fetchLocalesOutput);
73
72
  }
@@ -77,7 +76,7 @@ const Input = React__namespace.forwardRef(
77
76
  setAppSettings(settings);
78
77
  }
79
78
  function createChangeEvent(text) {
80
- const convertedText = convertToSlug.convertToSlug(text);
79
+ const convertedText = index.convertToSlug(text);
81
80
  const mockChangeEvent = {
82
81
  target: {
83
82
  name,
@@ -6,8 +6,7 @@ import { useComposedRefs, Field, Box, Typography, TextInput, IconButton, Button
6
6
  import { Pin, Cross } from "@strapi/icons";
7
7
  import { useFocusInputField, unstable_useContentManagerContext } from "@strapi/strapi/admin";
8
8
  import styled from "styled-components";
9
- import { R as Registry, P as PageAttributeUpdated, D as DocumentCustomFieldStarted, d as PluginIcon, g as getTranslation, c as config, e as FetchModuleSettings } from "./index-fPknNRw6.mjs";
10
- import { c as convertToSlug, F as FetchLocales } from "./convertToSlug-Bht0pDyl.mjs";
9
+ import { R as Registry, P as PageAttributeUpdated, D as DocumentCustomFieldStarted, h as PluginIcon, g as getTranslation, c as config, e as convertToSlug, d as FetchLocales, i as FetchModuleSettings } from "./index-DQ3vX9So.mjs";
11
10
  const BoxInput = styled(Box)`
12
11
  & > div {
13
12
  width: 100%;
@@ -154,6 +154,36 @@ const en = {
154
154
  "littlebox-strapi-suite.module.translation.modal.handler.input.languages": "Languages",
155
155
  "littlebox-strapi-suite.module.translation.modal.handler.input.translation.error": "You must enter at least one language",
156
156
  "littlebox-strapi-suite.module.translation.modal.input.title": "Title",
157
+ "littlebox-strapi-suite.module.translation.button.translate-with-ai": "Translate with AI",
158
+ "littlebox-strapi-suite.module.translation.modal.settings.title": "Settings",
159
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-enabled.title": "Translate with artificial intelligence",
160
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-enabled.description": "Enable the OpenAI powered translation of the entries of this module",
161
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-api-key.title": "OpenAI API key",
162
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-api-key.description": "The key is stored on the server and is never shown again. Leave it empty to keep the current one",
163
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-api-key.placeholder": "No API key set",
164
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-model.title": "OpenAI model",
165
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-model.description": "The model used to generate the translations",
166
+ "littlebox-strapi-suite.module.translation.modal.settings.hint": "Each translation is billed by OpenAI on the account that owns the API key",
167
+ "littlebox-strapi-suite.module.translation.modal.settings.button.save": "Save",
168
+ "littlebox-strapi-suite.module.translation.modal.ai.title": "Translate with AI",
169
+ "littlebox-strapi-suite.module.translation.modal.ai.input.source.title": "Base language",
170
+ "littlebox-strapi-suite.module.translation.modal.ai.input.source.description": "The language the entries are translated from",
171
+ "littlebox-strapi-suite.module.translation.modal.ai.input.targets.title": "Languages to translate to",
172
+ "littlebox-strapi-suite.module.translation.modal.ai.input.targets.select-all": "Select all",
173
+ "littlebox-strapi-suite.module.translation.modal.ai.input.overwrite.title": "Overwrite existing translations",
174
+ "littlebox-strapi-suite.module.translation.modal.ai.input.overwrite.description": "When disabled only the missing translations are generated",
175
+ "littlebox-strapi-suite.module.translation.modal.ai.progress": "Translating. This can take a few minutes, please keep this window open",
176
+ "littlebox-strapi-suite.module.translation.modal.ai.result": "{translated} translated, {skipped} skipped, {failed} failed",
177
+ "littlebox-strapi-suite.module.translation.modal.ai.error": "The translation request failed",
178
+ "littlebox-strapi-suite.module.translation.modal.ai.button.translate": "Translate",
179
+ "littlebox-strapi-suite.module.translation.panel.title": "Translation",
180
+ "littlebox-strapi-suite.module.translation.panel.ai.title": "Translate with AI",
181
+ "littlebox-strapi-suite.module.translation.panel.ai.input.source.description": "This entry is translated into {target} from the language you pick here",
182
+ "littlebox-strapi-suite.module.translation.panel.ai.input.overwrite.title": "Overwrite fields that already have content",
183
+ "littlebox-strapi-suite.module.translation.panel.ai.input.overwrite.description": "When disabled only the empty fields are filled in",
184
+ "littlebox-strapi-suite.module.translation.panel.ai.error.no-source": "This entry does not exist yet in the language you picked as the base",
185
+ "littlebox-strapi-suite.module.translation.panel.ai.result.save": "Review the fields and save the entry to keep them",
186
+ "littlebox-strapi-suite.module.translation.panel.ai.result.unmatched": "{unmatched} fields of the base language have no match here, the two entries have a different structure",
157
187
  "littlebox-strapi-suite.module.template.name": "Template",
158
188
  "littlebox-strapi-suite.module.template.description": "Easily and quickly name the templates for each frontend page.",
159
189
  "littlebox-strapi-suite.table.search.label": "Clearing the search",
@@ -152,6 +152,36 @@ const en = {
152
152
  "littlebox-strapi-suite.module.translation.modal.handler.input.languages": "Languages",
153
153
  "littlebox-strapi-suite.module.translation.modal.handler.input.translation.error": "You must enter at least one language",
154
154
  "littlebox-strapi-suite.module.translation.modal.input.title": "Title",
155
+ "littlebox-strapi-suite.module.translation.button.translate-with-ai": "Translate with AI",
156
+ "littlebox-strapi-suite.module.translation.modal.settings.title": "Settings",
157
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-enabled.title": "Translate with artificial intelligence",
158
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-enabled.description": "Enable the OpenAI powered translation of the entries of this module",
159
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-api-key.title": "OpenAI API key",
160
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-api-key.description": "The key is stored on the server and is never shown again. Leave it empty to keep the current one",
161
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-api-key.placeholder": "No API key set",
162
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-model.title": "OpenAI model",
163
+ "littlebox-strapi-suite.module.translation.modal.settings.input.ai-model.description": "The model used to generate the translations",
164
+ "littlebox-strapi-suite.module.translation.modal.settings.hint": "Each translation is billed by OpenAI on the account that owns the API key",
165
+ "littlebox-strapi-suite.module.translation.modal.settings.button.save": "Save",
166
+ "littlebox-strapi-suite.module.translation.modal.ai.title": "Translate with AI",
167
+ "littlebox-strapi-suite.module.translation.modal.ai.input.source.title": "Base language",
168
+ "littlebox-strapi-suite.module.translation.modal.ai.input.source.description": "The language the entries are translated from",
169
+ "littlebox-strapi-suite.module.translation.modal.ai.input.targets.title": "Languages to translate to",
170
+ "littlebox-strapi-suite.module.translation.modal.ai.input.targets.select-all": "Select all",
171
+ "littlebox-strapi-suite.module.translation.modal.ai.input.overwrite.title": "Overwrite existing translations",
172
+ "littlebox-strapi-suite.module.translation.modal.ai.input.overwrite.description": "When disabled only the missing translations are generated",
173
+ "littlebox-strapi-suite.module.translation.modal.ai.progress": "Translating. This can take a few minutes, please keep this window open",
174
+ "littlebox-strapi-suite.module.translation.modal.ai.result": "{translated} translated, {skipped} skipped, {failed} failed",
175
+ "littlebox-strapi-suite.module.translation.modal.ai.error": "The translation request failed",
176
+ "littlebox-strapi-suite.module.translation.modal.ai.button.translate": "Translate",
177
+ "littlebox-strapi-suite.module.translation.panel.title": "Translation",
178
+ "littlebox-strapi-suite.module.translation.panel.ai.title": "Translate with AI",
179
+ "littlebox-strapi-suite.module.translation.panel.ai.input.source.description": "This entry is translated into {target} from the language you pick here",
180
+ "littlebox-strapi-suite.module.translation.panel.ai.input.overwrite.title": "Overwrite fields that already have content",
181
+ "littlebox-strapi-suite.module.translation.panel.ai.input.overwrite.description": "When disabled only the empty fields are filled in",
182
+ "littlebox-strapi-suite.module.translation.panel.ai.error.no-source": "This entry does not exist yet in the language you picked as the base",
183
+ "littlebox-strapi-suite.module.translation.panel.ai.result.save": "Review the fields and save the entry to keep them",
184
+ "littlebox-strapi-suite.module.translation.panel.ai.result.unmatched": "{unmatched} fields of the base language have no match here, the two entries have a different structure",
155
185
  "littlebox-strapi-suite.module.template.name": "Template",
156
186
  "littlebox-strapi-suite.module.template.description": "Easily and quickly name the templates for each frontend page.",
157
187
  "littlebox-strapi-suite.table.search.label": "Clearing the search",