@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
package/README.md CHANGED
@@ -4,3 +4,32 @@ The Littlebox Strapi Suite is a plugin designed to enhance Strapi for building a
4
4
 
5
5
  For installation instructions and detailed documentation, please refer to:
6
6
  [Before Starting - Littlebox Strapi Suite Documentation](https://strapi-suite.littlebox.pt/before-starting)
7
+
8
+ ## Content type tabs
9
+
10
+ Organize the fields of a collection type or single type in tabs.
11
+
12
+ 1. In the Content-Type Builder, open the content type settings and, under **Advanced settings → Tabs**, add, rename and reorder the tabs.
13
+ 2. In the advanced settings of each field, pick the **Tab** where it is shown. Fields without a tab stay visible above the tabs.
14
+
15
+ The Content Manager edit view shows one tab at a time. Switching tabs keeps unsaved changes, and the active tab is kept in the URL hash (`#ltbTab=<key>`).
16
+
17
+ REST read requests (`find` and `findOne`) and the slugs module routes (`/api/littlebox-strapi-suite/modules/pages/home` and `/api/littlebox-strapi-suite/modules/pages?slug=...`) return the fields of each tab inside a property named after the tab. The name is converted to lowercase, accents are removed, spaces become `_` and other special characters are dropped (`"Loja - Vitrine"` → `loja_vitrine`):
18
+
19
+ ```json
20
+ {
21
+ "data": {
22
+ "id": 1,
23
+ "documentId": "abc",
24
+ "title": "Home",
25
+ "loja_vitrine": { "banner": {}, "produtos_destaque": [] }
26
+ }
27
+ }
28
+ ```
29
+
30
+ Notes:
31
+
32
+ - Only the root level of the response is grouped. `filters`, `sort`, `fields` and `populate` keep using the original field names.
33
+ - Renaming a tab changes its key in the API.
34
+ - A tab whose key is empty or conflicts with a root field is not grouped, and a warning is logged.
35
+ - Writes through the REST API and GraphQL are not affected.