@littlebox/strapi-suite 1.0.51 → 1.0.54

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 (49) hide show
  1. package/README.md +29 -0
  2. package/dist/_chunks/{App-C7RgdLC-.js → App-B7_8BaVG.js} +557 -35
  3. package/dist/_chunks/{App-b_1MuDrk.mjs → App-BfGB2pF_.mjs} +550 -28
  4. package/dist/_chunks/{SlugInput-DlOanbzA.mjs → SlugInput-CvgVtZza.mjs} +1 -2
  5. package/dist/_chunks/{SlugInput-DvQWzpBu.js → SlugInput-eCwgqJtH.js} +3 -4
  6. package/dist/_chunks/{en-CGJcJfk1.js → en-D89cXiov.js} +46 -1
  7. package/dist/_chunks/{en-CRSiVe4w.mjs → en-knG97mCH.mjs} +46 -1
  8. package/dist/_chunks/{index-C3MUddO-.mjs → index-97f0S4q6.mjs} +2270 -73
  9. package/dist/_chunks/{index-UZTUyNY3.js → index-DnXsi_Ar.js} +2292 -78
  10. package/dist/admin/index.js +1 -1
  11. package/dist/admin/index.mjs +2 -2
  12. package/dist/admin/src/components/DocumentTranslateBox.d.ts +5 -0
  13. package/dist/admin/src/components/DocumentTranslateModal.d.ts +11 -0
  14. package/dist/admin/src/components/TranslationAiModal.d.ts +8 -0
  15. package/dist/admin/src/components/TranslationSettingsModal.d.ts +6 -0
  16. package/dist/admin/src/contexts/settings.d.ts +1 -0
  17. package/dist/admin/src/core/config.d.ts +1 -0
  18. package/dist/admin/src/core/gateways/aiGateway.d.ts +19 -0
  19. package/dist/admin/src/core/gateways/documentGateway.d.ts +15 -0
  20. package/dist/admin/src/core/gateways/translationGateway.d.ts +13 -0
  21. package/dist/admin/src/core/usecases/translateDocument.d.ts +33 -0
  22. package/dist/admin/src/core/usecases/translateWithAi.d.ts +17 -0
  23. package/dist/admin/src/core/utils/documentFields.d.ts +23 -0
  24. package/dist/admin/src/core/utils/tabs.d.ts +53 -0
  25. package/dist/admin/src/ctb/TabSelect.d.ts +31 -0
  26. package/dist/admin/src/ctb/TabsEditor.d.ts +21 -0
  27. package/dist/admin/src/ctb/registerTabsInContentTypeBuilder.d.ts +1 -0
  28. package/dist/admin/src/ctb/tabBadges.d.ts +14 -0
  29. package/dist/admin/src/editView/TabSection.d.ts +6 -0
  30. package/dist/admin/src/editView/TabsBar.d.ts +10 -0
  31. package/dist/admin/src/editView/mutateEditViewLayout.d.ts +12 -0
  32. package/dist/admin/src/editView/sectionVisibility.d.ts +7 -0
  33. package/dist/admin/src/editView/tabsStore.d.ts +13 -0
  34. package/dist/server/index.js +812 -392
  35. package/dist/server/index.mjs +812 -392
  36. package/dist/server/src/config/index.d.ts +4 -0
  37. package/dist/server/src/controllers/index.d.ts +6 -0
  38. package/dist/server/src/controllers/modules/ai-translation.d.ts +7 -0
  39. package/dist/server/src/controllers/modules/translation.d.ts +1 -0
  40. package/dist/server/src/index.d.ts +22 -1
  41. package/dist/server/src/middlewares/tabs.d.ts +4 -0
  42. package/dist/server/src/services/app/setting.d.ts +3 -1
  43. package/dist/server/src/services/index.d.ts +16 -1
  44. package/dist/server/src/services/modules/ai-translation.d.ts +35 -0
  45. package/dist/server/src/utils/groupByContentTypeTabs.d.ts +7 -0
  46. package/dist/server/src/utils/tabs.d.ts +17 -0
  47. package/package.json +6 -3
  48. package/dist/_chunks/convertToSlug-DmgViUjP.mjs +0 -84
  49. package/dist/_chunks/convertToSlug-DqHa9ej4.js +0 -83
@@ -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-C3MUddO-.mjs";
10
- import { c as convertToSlug, F as FetchLocales } from "./convertToSlug-DmgViUjP.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-97f0S4q6.mjs";
11
10
  const BoxInput = styled(Box)`
12
11
  & > div {
13
12
  width: 100%;
@@ -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-UZTUyNY3.js");
12
- const convertToSlug = require("./convertToSlug-DqHa9ej4.js");
11
+ const index = require("./index-DnXsi_Ar.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,
@@ -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",
@@ -171,6 +201,21 @@ const en = {
171
201
  "littlebox-strapi-suite.modal.handler.input.uid.error.duplicated": "The UID already exists",
172
202
  "littlebox-strapi-suite.modal.handler.input.name": "Name",
173
203
  "littlebox-strapi-suite.modal.input.name": "Name",
174
- "littlebox-strapi-suite.modal.handler.button": "Save"
204
+ "littlebox-strapi-suite.modal.handler.button": "Save",
205
+ "littlebox-strapi-suite.tabs.ctb.content-type.label": "Tabs",
206
+ "littlebox-strapi-suite.tabs.ctb.content-type.description": "Organize the fields of this content type in tabs. Fields in a tab are returned by the REST API inside a property named after the tab.",
207
+ "littlebox-strapi-suite.tabs.ctb.field.label": "Tab",
208
+ "littlebox-strapi-suite.tabs.ctb.field.description": "Tab where this field is shown. Fields without a tab are always visible.",
209
+ "littlebox-strapi-suite.tabs.ctb.field.none": "None (always visible)",
210
+ "littlebox-strapi-suite.tabs.ctb.add": "Add tab",
211
+ "littlebox-strapi-suite.tabs.ctb.remove": "Remove tab",
212
+ "littlebox-strapi-suite.tabs.ctb.reorder": "Drag to reorder",
213
+ "littlebox-strapi-suite.tabs.ctb.name.placeholder": "Tab name",
214
+ "littlebox-strapi-suite.tabs.ctb.empty": "No tabs yet.",
215
+ "littlebox-strapi-suite.tabs.ctb.error.name.required": "Every tab needs a name",
216
+ "littlebox-strapi-suite.tabs.ctb.error.key.empty": "Tab names must contain letters or numbers",
217
+ "littlebox-strapi-suite.tabs.ctb.error.key.duplicated": "Two tabs generate the same API key",
218
+ "littlebox-strapi-suite.tabs.edit-view.label": "Content tabs",
219
+ "littlebox-strapi-suite.tabs.edit-view.errors": "{count, plural, one {# error} other {# errors}}"
175
220
  };
176
221
  exports.default = en;
@@ -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",
@@ -169,7 +199,22 @@ const en = {
169
199
  "littlebox-strapi-suite.modal.handler.input.uid.error.duplicated": "The UID already exists",
170
200
  "littlebox-strapi-suite.modal.handler.input.name": "Name",
171
201
  "littlebox-strapi-suite.modal.input.name": "Name",
172
- "littlebox-strapi-suite.modal.handler.button": "Save"
202
+ "littlebox-strapi-suite.modal.handler.button": "Save",
203
+ "littlebox-strapi-suite.tabs.ctb.content-type.label": "Tabs",
204
+ "littlebox-strapi-suite.tabs.ctb.content-type.description": "Organize the fields of this content type in tabs. Fields in a tab are returned by the REST API inside a property named after the tab.",
205
+ "littlebox-strapi-suite.tabs.ctb.field.label": "Tab",
206
+ "littlebox-strapi-suite.tabs.ctb.field.description": "Tab where this field is shown. Fields without a tab are always visible.",
207
+ "littlebox-strapi-suite.tabs.ctb.field.none": "None (always visible)",
208
+ "littlebox-strapi-suite.tabs.ctb.add": "Add tab",
209
+ "littlebox-strapi-suite.tabs.ctb.remove": "Remove tab",
210
+ "littlebox-strapi-suite.tabs.ctb.reorder": "Drag to reorder",
211
+ "littlebox-strapi-suite.tabs.ctb.name.placeholder": "Tab name",
212
+ "littlebox-strapi-suite.tabs.ctb.empty": "No tabs yet.",
213
+ "littlebox-strapi-suite.tabs.ctb.error.name.required": "Every tab needs a name",
214
+ "littlebox-strapi-suite.tabs.ctb.error.key.empty": "Tab names must contain letters or numbers",
215
+ "littlebox-strapi-suite.tabs.ctb.error.key.duplicated": "Two tabs generate the same API key",
216
+ "littlebox-strapi-suite.tabs.edit-view.label": "Content tabs",
217
+ "littlebox-strapi-suite.tabs.edit-view.errors": "{count, plural, one {# error} other {# errors}}"
173
218
  };
174
219
  export {
175
220
  en as default