@strapi/i18n 0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05 → 0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266

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 (56) hide show
  1. package/dist/admin/components/CreateLocale.js +1 -1
  2. package/dist/admin/components/CreateLocale.js.map +1 -1
  3. package/dist/admin/components/CreateLocale.mjs +1 -1
  4. package/dist/admin/components/CreateLocale.mjs.map +1 -1
  5. package/dist/admin/components/EditLocale.js +1 -1
  6. package/dist/admin/components/EditLocale.js.map +1 -1
  7. package/dist/admin/components/EditLocale.mjs +1 -1
  8. package/dist/admin/components/EditLocale.mjs.map +1 -1
  9. package/dist/admin/index.js +0 -1
  10. package/dist/admin/index.js.map +1 -1
  11. package/dist/admin/index.mjs +0 -1
  12. package/dist/admin/index.mjs.map +1 -1
  13. package/dist/admin/middlewares/extendCTBAttributeInitialData.js +34 -24
  14. package/dist/admin/middlewares/extendCTBAttributeInitialData.js.map +1 -1
  15. package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs +34 -24
  16. package/dist/admin/middlewares/extendCTBAttributeInitialData.mjs.map +1 -1
  17. package/dist/admin/services/api.js +2 -1
  18. package/dist/admin/services/api.js.map +1 -1
  19. package/dist/admin/services/api.mjs +2 -1
  20. package/dist/admin/services/api.mjs.map +1 -1
  21. package/dist/admin/services/locales.js +4 -2
  22. package/dist/admin/services/locales.js.map +1 -1
  23. package/dist/admin/services/locales.mjs +4 -2
  24. package/dist/admin/services/locales.mjs.map +1 -1
  25. package/dist/admin/src/services/api.d.ts +1 -1
  26. package/dist/admin/src/services/locales.d.ts +1 -1
  27. package/dist/admin/src/services/relations.d.ts +1 -1
  28. package/dist/admin/src/utils/schemas.d.ts +642 -16
  29. package/dist/admin/utils/fields.js +6 -1
  30. package/dist/admin/utils/fields.js.map +1 -1
  31. package/dist/admin/utils/fields.mjs +6 -1
  32. package/dist/admin/utils/fields.mjs.map +1 -1
  33. package/dist/admin/utils/schemas.js +19 -13
  34. package/dist/admin/utils/schemas.js.map +1 -1
  35. package/dist/admin/utils/schemas.mjs +19 -13
  36. package/dist/admin/utils/schemas.mjs.map +1 -1
  37. package/dist/server/routes/content-api.js +11 -7
  38. package/dist/server/routes/content-api.js.map +1 -1
  39. package/dist/server/routes/content-api.mjs +11 -7
  40. package/dist/server/routes/content-api.mjs.map +1 -1
  41. package/dist/server/routes/index.mjs +2 -2
  42. package/dist/server/routes/validation/locale.js +57 -0
  43. package/dist/server/routes/validation/locale.js.map +1 -0
  44. package/dist/server/routes/validation/locale.mjs +36 -0
  45. package/dist/server/routes/validation/locale.mjs.map +1 -0
  46. package/dist/server/src/index.d.ts +3 -7
  47. package/dist/server/src/index.d.ts.map +1 -1
  48. package/dist/server/src/routes/content-api.d.ts +5 -8
  49. package/dist/server/src/routes/content-api.d.ts.map +1 -1
  50. package/dist/server/src/routes/index.d.ts +3 -7
  51. package/dist/server/src/routes/index.d.ts.map +1 -1
  52. package/dist/server/src/routes/validation/index.d.ts +2 -0
  53. package/dist/server/src/routes/validation/index.d.ts.map +1 -0
  54. package/dist/server/src/routes/validation/locale.d.ts +41 -0
  55. package/dist/server/src/routes/validation/locale.d.ts.map +1 -0
  56. package/package.json +10 -9
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var has = require('lodash/has');
4
+
3
5
  const LOCALIZED_FIELDS = [
4
6
  'biginteger',
5
7
  'boolean',
@@ -22,7 +24,10 @@ const LOCALIZED_FIELDS = [
22
24
  'text',
23
25
  'time'
24
26
  ];
25
- const doesPluginOptionsHaveI18nLocalized = (opts)=>typeof opts === 'object' && opts !== null && 'i18n' in opts && typeof opts.i18n === 'object' && opts.i18n !== null && 'localized' in opts.i18n && typeof opts.i18n.localized === 'boolean';
27
+ const doesPluginOptionsHaveI18nLocalized = (opts)=>has(opts, [
28
+ 'i18n',
29
+ 'localized'
30
+ ]);
26
31
 
27
32
  exports.LOCALIZED_FIELDS = LOCALIZED_FIELDS;
28
33
  exports.doesPluginOptionsHaveI18nLocalized = doesPluginOptionsHaveI18nLocalized;
@@ -1 +1 @@
1
- {"version":3,"file":"fields.js","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["const LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } =>\n typeof opts === 'object' &&\n opts !== null &&\n 'i18n' in opts &&\n typeof opts.i18n === 'object' &&\n opts.i18n !== null &&\n 'localized' in opts.i18n &&\n typeof opts.i18n.localized === 'boolean';\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","i18n","localized"],"mappings":";;AAAA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAEA,GAAA,OAAOA,IAAS,KAAA,QAAA,IAChBA,IAAS,KAAA,IAAA,IACT,MAAUA,IAAAA,IAAAA,IACV,OAAOA,IAAAA,CAAKC,IAAI,KAAK,QACrBD,IAAAA,IAAAA,CAAKC,IAAI,KAAK,IACd,IAAA,WAAA,IAAeD,IAAKC,CAAAA,IAAI,IACxB,OAAOD,IAAKC,CAAAA,IAAI,CAACC,SAAS,KAAK;;;;;"}
1
+ {"version":3,"file":"fields.js","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["import has from 'lodash/has';\n\nconst LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } => has(opts, ['i18n', 'localized']);\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","has"],"mappings":";;;;AAEA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAC6CC,GAAAA,GAAAA,CAAID,IAAM,EAAA;AAAC,QAAA,MAAA;AAAQ,QAAA;AAAY,KAAA;;;;;"}
@@ -1,3 +1,5 @@
1
+ import has from 'lodash/has';
2
+
1
3
  const LOCALIZED_FIELDS = [
2
4
  'biginteger',
3
5
  'boolean',
@@ -20,7 +22,10 @@ const LOCALIZED_FIELDS = [
20
22
  'text',
21
23
  'time'
22
24
  ];
23
- const doesPluginOptionsHaveI18nLocalized = (opts)=>typeof opts === 'object' && opts !== null && 'i18n' in opts && typeof opts.i18n === 'object' && opts.i18n !== null && 'localized' in opts.i18n && typeof opts.i18n.localized === 'boolean';
25
+ const doesPluginOptionsHaveI18nLocalized = (opts)=>has(opts, [
26
+ 'i18n',
27
+ 'localized'
28
+ ]);
24
29
 
25
30
  export { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };
26
31
  //# sourceMappingURL=fields.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"fields.mjs","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["const LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } =>\n typeof opts === 'object' &&\n opts !== null &&\n 'i18n' in opts &&\n typeof opts.i18n === 'object' &&\n opts.i18n !== null &&\n 'localized' in opts.i18n &&\n typeof opts.i18n.localized === 'boolean';\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","i18n","localized"],"mappings":"AAAA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAEA,GAAA,OAAOA,IAAS,KAAA,QAAA,IAChBA,IAAS,KAAA,IAAA,IACT,MAAUA,IAAAA,IAAAA,IACV,OAAOA,IAAAA,CAAKC,IAAI,KAAK,QACrBD,IAAAA,IAAAA,CAAKC,IAAI,KAAK,IACd,IAAA,WAAA,IAAeD,IAAKC,CAAAA,IAAI,IACxB,OAAOD,IAAKC,CAAAA,IAAI,CAACC,SAAS,KAAK;;;;"}
1
+ {"version":3,"file":"fields.mjs","sources":["../../../admin/src/utils/fields.ts"],"sourcesContent":["import has from 'lodash/has';\n\nconst LOCALIZED_FIELDS = [\n 'biginteger',\n 'boolean',\n 'component',\n 'date',\n 'datetime',\n 'decimal',\n 'dynamiczone',\n 'email',\n 'enumeration',\n 'float',\n 'integer',\n 'json',\n 'media',\n 'number',\n 'password',\n 'richtext',\n 'blocks',\n 'string',\n 'text',\n 'time',\n];\n\nconst doesPluginOptionsHaveI18nLocalized = (\n opts?: object\n): opts is { i18n: { localized: boolean } } => has(opts, ['i18n', 'localized']);\n\nexport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized };\n"],"names":["LOCALIZED_FIELDS","doesPluginOptionsHaveI18nLocalized","opts","has"],"mappings":";;AAEA,MAAMA,gBAAmB,GAAA;AACvB,IAAA,YAAA;AACA,IAAA,SAAA;AACA,IAAA,WAAA;AACA,IAAA,MAAA;AACA,IAAA,UAAA;AACA,IAAA,SAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,aAAA;AACA,IAAA,OAAA;AACA,IAAA,SAAA;AACA,IAAA,MAAA;AACA,IAAA,OAAA;AACA,IAAA,QAAA;AACA,IAAA,UAAA;AACA,IAAA,UAAA;AACA,IAAA,QAAA;AACA,IAAA,QAAA;AACA,IAAA,MAAA;AACA,IAAA;AACD;AAED,MAAMC,kCAAqC,GAAA,CACzCC,IAC6CC,GAAAA,GAAAA,CAAID,IAAM,EAAA;AAAC,QAAA,MAAA;AAAQ,QAAA;AAAY,KAAA;;;;"}
@@ -5,13 +5,17 @@ var fields = require('./fields.js');
5
5
 
6
6
  /* -------------------------------------------------------------------------------------------------
7
7
  * mutateCTBContentTypeSchema
8
- * -----------------------------------------------------------------------------------------------*/ const mutateCTBContentTypeSchema = (nextSchema, prevSchema)=>{
8
+ * -----------------------------------------------------------------------------------------------*/ // TODO: refactor for CTB refactors
9
+ const mutateCTBContentTypeSchema = (nextSchema, prevSchema)=>{
10
+ if (!prevSchema) {
11
+ return nextSchema;
12
+ }
9
13
  // Don't perform mutations components
10
14
  if (!fields.doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {
11
15
  return nextSchema;
12
16
  }
13
17
  const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;
14
- const isPrevSchemaLocalized = fields.doesPluginOptionsHaveI18nLocalized(prevSchema?.schema?.pluginOptions) ? prevSchema?.schema?.pluginOptions.i18n.localized : false;
18
+ const isPrevSchemaLocalized = fields.doesPluginOptionsHaveI18nLocalized(prevSchema?.pluginOptions) ? prevSchema?.pluginOptions.i18n.localized : false;
15
19
  // No need to perform modification on the schema, if the i18n feature was not changed
16
20
  // at the ct level
17
21
  if (isNextSchemaLocalized && isPrevSchemaLocalized) {
@@ -38,8 +42,8 @@ var fields = require('./fields.js');
38
42
  };
39
43
  /* -------------------------------------------------------------------------------------------------
40
44
  * addLocalisationToFields
41
- * -----------------------------------------------------------------------------------------------*/ const addLocalisationToFields = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
42
- const currentAttribute = attributes[current];
45
+ * -----------------------------------------------------------------------------------------------*/ const addLocalisationToFields = (attributes)=>{
46
+ return attributes.map((currentAttribute)=>{
43
47
  if (fields.LOCALIZED_FIELDS.includes(currentAttribute.type)) {
44
48
  const i18n = {
45
49
  localized: true
@@ -50,19 +54,21 @@ var fields = require('./fields.js');
50
54
  } : {
51
55
  i18n
52
56
  };
53
- acc[current] = {
57
+ return {
54
58
  ...currentAttribute,
55
59
  pluginOptions
56
60
  };
57
- return acc;
58
61
  }
59
- acc[current] = currentAttribute;
60
- return acc;
61
- }, {});
62
- const disableAttributesLocalisation = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
63
- acc[current] = omit(attributes[current], 'pluginOptions.i18n');
64
- return acc;
65
- }, {});
62
+ return currentAttribute;
63
+ });
64
+ };
65
+ /* -------------------------------------------------------------------------------------------------
66
+ * disableAttributesLocalisation
67
+ * -----------------------------------------------------------------------------------------------*/ const disableAttributesLocalisation = (attributes)=>{
68
+ return attributes.map((currentAttribute)=>{
69
+ return omit(currentAttribute, 'pluginOptions.i18n');
70
+ });
71
+ };
66
72
 
67
73
  exports.mutateCTBContentTypeSchema = mutateCTBContentTypeSchema;
68
74
  //# sourceMappingURL=schemas.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.js","sources":["../../../admin/src/utils/schemas.ts"],"sourcesContent":["import omit from 'lodash/omit';\n\nimport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized } from './fields';\n\nimport type { Schema } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * mutateCTBContentTypeSchema\n * -----------------------------------------------------------------------------------------------*/\n\nconst mutateCTBContentTypeSchema = (\n nextSchema: Schema.ContentType,\n prevSchema?: {\n apiID?: string;\n schema?: Schema.ContentType;\n uid?: string;\n }\n) => {\n // Don't perform mutations components\n if (!doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {\n return nextSchema;\n }\n\n const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;\n const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(\n prevSchema?.schema?.pluginOptions\n )\n ? prevSchema?.schema?.pluginOptions.i18n.localized\n : false;\n\n // No need to perform modification on the schema, if the i18n feature was not changed\n // at the ct level\n if (isNextSchemaLocalized && isPrevSchemaLocalized) {\n return nextSchema;\n }\n\n if (isNextSchemaLocalized) {\n const attributes = addLocalisationToFields(nextSchema.attributes);\n\n return { ...nextSchema, attributes };\n }\n\n // Remove the i18n object from the pluginOptions\n if (!isNextSchemaLocalized) {\n const pluginOptions = omit(nextSchema.pluginOptions, 'i18n');\n const attributes = disableAttributesLocalisation(nextSchema.attributes);\n\n return { ...nextSchema, pluginOptions, attributes };\n }\n\n return nextSchema;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * addLocalisationToFields\n * -----------------------------------------------------------------------------------------------*/\n\nconst addLocalisationToFields = (attributes: Schema.ContentType['attributes']) =>\n Object.keys(attributes).reduce<Schema.ContentType['attributes']>((acc, current) => {\n const currentAttribute = attributes[current];\n\n if (LOCALIZED_FIELDS.includes(currentAttribute.type)) {\n const i18n = { localized: true };\n\n const pluginOptions = currentAttribute.pluginOptions\n ? { ...currentAttribute.pluginOptions, i18n }\n : { i18n };\n\n acc[current] = { ...currentAttribute, pluginOptions };\n\n return acc;\n }\n\n acc[current] = currentAttribute;\n\n return acc;\n }, {});\n\n/* -------------------------------------------------------------------------------------------------\n * disableAttributesLocalisation\n * -----------------------------------------------------------------------------------------------*/\n\ntype OmitByPath<T extends object, K extends string[]> = Pick<T, Exclude<keyof T, K[number]>>;\n\nconst disableAttributesLocalisation = (attributes: Schema.ContentType['attributes']) =>\n Object.keys(attributes).reduce<\n Record<string, OmitByPath<Schema.ContentType['attributes'][string], ['pluginOptions', 'i18n']>>\n >((acc, current) => {\n acc[current] = omit(attributes[current], 'pluginOptions.i18n');\n\n return acc;\n }, {});\n\nexport { mutateCTBContentTypeSchema };\n"],"names":["mutateCTBContentTypeSchema","nextSchema","prevSchema","doesPluginOptionsHaveI18nLocalized","pluginOptions","isNextSchemaLocalized","i18n","localized","isPrevSchemaLocalized","schema","attributes","addLocalisationToFields","omit","disableAttributesLocalisation","Object","keys","reduce","acc","current","currentAttribute","LOCALIZED_FIELDS","includes","type"],"mappings":";;;;;AAMA;;qGAIA,MAAMA,0BAA6B,GAAA,CACjCC,UACAC,EAAAA,UAAAA,GAAAA;;AAOA,IAAA,IAAI,CAACC,yCAAAA,CAAmCF,UAAWG,CAAAA,aAAa,CAAG,EAAA;QACjE,OAAOH,UAAAA;AACT;AAEA,IAAA,MAAMI,wBAAwBJ,UAAWG,CAAAA,aAAa,CAACE,IAAI,CAACC,SAAS;IACrE,MAAMC,qBAAAA,GAAwBL,0CAC5BD,UAAYO,EAAAA,MAAAA,EAAQL,iBAElBF,UAAYO,EAAAA,MAAAA,EAAQL,aAAcE,CAAAA,IAAAA,CAAKC,SACvC,GAAA,KAAA;;;AAIJ,IAAA,IAAIF,yBAAyBG,qBAAuB,EAAA;QAClD,OAAOP,UAAAA;AACT;AAEA,IAAA,IAAII,qBAAuB,EAAA;QACzB,MAAMK,UAAAA,GAAaC,uBAAwBV,CAAAA,UAAAA,CAAWS,UAAU,CAAA;QAEhE,OAAO;AAAE,YAAA,GAAGT,UAAU;AAAES,YAAAA;AAAW,SAAA;AACrC;;AAGA,IAAA,IAAI,CAACL,qBAAuB,EAAA;AAC1B,QAAA,MAAMD,aAAgBQ,GAAAA,IAAAA,CAAKX,UAAWG,CAAAA,aAAa,EAAE,MAAA,CAAA;QACrD,MAAMM,UAAAA,GAAaG,6BAA8BZ,CAAAA,UAAAA,CAAWS,UAAU,CAAA;QAEtE,OAAO;AAAE,YAAA,GAAGT,UAAU;AAAEG,YAAAA,aAAAA;AAAeM,YAAAA;AAAW,SAAA;AACpD;IAEA,OAAOT,UAAAA;AACT;AAEA;;qGAIA,MAAMU,uBAA0B,GAAA,CAACD,UAC/BI,GAAAA,MAAAA,CAAOC,IAAI,CAACL,UAAYM,CAAAA,CAAAA,MAAM,CAAmC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACrE,MAAMC,gBAAAA,GAAmBT,UAAU,CAACQ,OAAQ,CAAA;AAE5C,QAAA,IAAIE,uBAAiBC,CAAAA,QAAQ,CAACF,gBAAAA,CAAiBG,IAAI,CAAG,EAAA;AACpD,YAAA,MAAMhB,IAAO,GAAA;gBAAEC,SAAW,EAAA;AAAK,aAAA;YAE/B,MAAMH,aAAAA,GAAgBe,gBAAiBf,CAAAA,aAAa,GAChD;AAAE,gBAAA,GAAGe,iBAAiBf,aAAa;AAAEE,gBAAAA;aACrC,GAAA;AAAEA,gBAAAA;AAAK,aAAA;YAEXW,GAAG,CAACC,QAAQ,GAAG;AAAE,gBAAA,GAAGC,gBAAgB;AAAEf,gBAAAA;AAAc,aAAA;YAEpD,OAAOa,GAAAA;AACT;QAEAA,GAAG,CAACC,QAAQ,GAAGC,gBAAAA;QAEf,OAAOF,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AAQN,MAAMJ,6BAAAA,GAAgC,CAACH,UAAAA,GACrCI,MAAOC,CAAAA,IAAI,CAACL,UAAYM,CAAAA,CAAAA,MAAM,CAE5B,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;AACND,QAAAA,GAAG,CAACC,OAAQ,CAAA,GAAGN,KAAKF,UAAU,CAACQ,QAAQ,EAAE,oBAAA,CAAA;QAEzC,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;;;;"}
1
+ {"version":3,"file":"schemas.js","sources":["../../../admin/src/utils/schemas.ts"],"sourcesContent":["import omit from 'lodash/omit';\n\nimport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized } from './fields';\n\nimport type { Schema } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * mutateCTBContentTypeSchema\n * -----------------------------------------------------------------------------------------------*/\n\n// TODO: refactor for CTB refactors\nconst mutateCTBContentTypeSchema = (\n nextSchema: {\n pluginOptions: Schema.ContentType['pluginOptions'];\n attributes: Schema.Attribute.AnyAttribute[];\n uid?: string;\n },\n prevSchema?: {\n pluginOptions: Schema.ContentType['pluginOptions'];\n attributes: Schema.Attribute.AnyAttribute[];\n uid?: string;\n }\n) => {\n if (!prevSchema) {\n return nextSchema;\n }\n\n // Don't perform mutations components\n if (!doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {\n return nextSchema;\n }\n\n const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;\n const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(prevSchema?.pluginOptions)\n ? prevSchema?.pluginOptions.i18n.localized\n : false;\n\n // No need to perform modification on the schema, if the i18n feature was not changed\n // at the ct level\n if (isNextSchemaLocalized && isPrevSchemaLocalized) {\n return nextSchema;\n }\n\n if (isNextSchemaLocalized) {\n const attributes = addLocalisationToFields(nextSchema.attributes);\n\n return {\n ...nextSchema,\n attributes,\n };\n }\n\n // Remove the i18n object from the pluginOptions\n if (!isNextSchemaLocalized) {\n const pluginOptions = omit(nextSchema.pluginOptions, 'i18n');\n const attributes = disableAttributesLocalisation(nextSchema.attributes);\n\n return {\n ...nextSchema,\n pluginOptions,\n attributes,\n };\n }\n\n return nextSchema;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * addLocalisationToFields\n * -----------------------------------------------------------------------------------------------*/\n\nconst addLocalisationToFields = (attributes: Schema.Attribute.AnyAttribute[]) => {\n return attributes.map((currentAttribute) => {\n if (LOCALIZED_FIELDS.includes(currentAttribute.type)) {\n const i18n = { localized: true };\n\n const pluginOptions = currentAttribute.pluginOptions\n ? { ...currentAttribute.pluginOptions, i18n }\n : { i18n };\n\n return { ...currentAttribute, pluginOptions };\n }\n\n return currentAttribute;\n });\n};\n\n/* -------------------------------------------------------------------------------------------------\n * disableAttributesLocalisation\n * -----------------------------------------------------------------------------------------------*/\n\nconst disableAttributesLocalisation = (attributes: Schema.Attribute.AnyAttribute[]) => {\n return attributes.map((currentAttribute) => {\n return omit(currentAttribute, 'pluginOptions.i18n');\n });\n};\n\nexport { mutateCTBContentTypeSchema };\n"],"names":["mutateCTBContentTypeSchema","nextSchema","prevSchema","doesPluginOptionsHaveI18nLocalized","pluginOptions","isNextSchemaLocalized","i18n","localized","isPrevSchemaLocalized","attributes","addLocalisationToFields","omit","disableAttributesLocalisation","map","currentAttribute","LOCALIZED_FIELDS","includes","type"],"mappings":";;;;;AAMA;;AAEkG;AAG5FA,MAAAA,0BAAAA,GAA6B,CACjCC,UAKAC,EAAAA,UAAAA,GAAAA;AAMA,IAAA,IAAI,CAACA,UAAY,EAAA;QACf,OAAOD,UAAAA;AACT;;AAGA,IAAA,IAAI,CAACE,yCAAAA,CAAmCF,UAAWG,CAAAA,aAAa,CAAG,EAAA;QACjE,OAAOH,UAAAA;AACT;AAEA,IAAA,MAAMI,wBAAwBJ,UAAWG,CAAAA,aAAa,CAACE,IAAI,CAACC,SAAS;AACrE,IAAA,MAAMC,wBAAwBL,yCAAmCD,CAAAA,UAAAA,EAAYE,iBACzEF,UAAYE,EAAAA,aAAAA,CAAcE,KAAKC,SAC/B,GAAA,KAAA;;;AAIJ,IAAA,IAAIF,yBAAyBG,qBAAuB,EAAA;QAClD,OAAOP,UAAAA;AACT;AAEA,IAAA,IAAII,qBAAuB,EAAA;QACzB,MAAMI,UAAAA,GAAaC,uBAAwBT,CAAAA,UAAAA,CAAWQ,UAAU,CAAA;QAEhE,OAAO;AACL,YAAA,GAAGR,UAAU;AACbQ,YAAAA;AACF,SAAA;AACF;;AAGA,IAAA,IAAI,CAACJ,qBAAuB,EAAA;AAC1B,QAAA,MAAMD,aAAgBO,GAAAA,IAAAA,CAAKV,UAAWG,CAAAA,aAAa,EAAE,MAAA,CAAA;QACrD,MAAMK,UAAAA,GAAaG,6BAA8BX,CAAAA,UAAAA,CAAWQ,UAAU,CAAA;QAEtE,OAAO;AACL,YAAA,GAAGR,UAAU;AACbG,YAAAA,aAAAA;AACAK,YAAAA;AACF,SAAA;AACF;IAEA,OAAOR,UAAAA;AACT;AAEA;;qGAIA,MAAMS,0BAA0B,CAACD,UAAAA,GAAAA;IAC/B,OAAOA,UAAAA,CAAWI,GAAG,CAAC,CAACC,gBAAAA,GAAAA;AACrB,QAAA,IAAIC,uBAAiBC,CAAAA,QAAQ,CAACF,gBAAAA,CAAiBG,IAAI,CAAG,EAAA;AACpD,YAAA,MAAMX,IAAO,GAAA;gBAAEC,SAAW,EAAA;AAAK,aAAA;YAE/B,MAAMH,aAAAA,GAAgBU,gBAAiBV,CAAAA,aAAa,GAChD;AAAE,gBAAA,GAAGU,iBAAiBV,aAAa;AAAEE,gBAAAA;aACrC,GAAA;AAAEA,gBAAAA;AAAK,aAAA;YAEX,OAAO;AAAE,gBAAA,GAAGQ,gBAAgB;AAAEV,gBAAAA;AAAc,aAAA;AAC9C;QAEA,OAAOU,gBAAAA;AACT,KAAA,CAAA;AACF,CAAA;AAEA;;qGAIA,MAAMF,gCAAgC,CAACH,UAAAA,GAAAA;IACrC,OAAOA,UAAAA,CAAWI,GAAG,CAAC,CAACC,gBAAAA,GAAAA;AACrB,QAAA,OAAOH,KAAKG,gBAAkB,EAAA,oBAAA,CAAA;AAChC,KAAA,CAAA;AACF,CAAA;;;;"}
@@ -3,13 +3,17 @@ import { doesPluginOptionsHaveI18nLocalized, LOCALIZED_FIELDS } from './fields.m
3
3
 
4
4
  /* -------------------------------------------------------------------------------------------------
5
5
  * mutateCTBContentTypeSchema
6
- * -----------------------------------------------------------------------------------------------*/ const mutateCTBContentTypeSchema = (nextSchema, prevSchema)=>{
6
+ * -----------------------------------------------------------------------------------------------*/ // TODO: refactor for CTB refactors
7
+ const mutateCTBContentTypeSchema = (nextSchema, prevSchema)=>{
8
+ if (!prevSchema) {
9
+ return nextSchema;
10
+ }
7
11
  // Don't perform mutations components
8
12
  if (!doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {
9
13
  return nextSchema;
10
14
  }
11
15
  const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;
12
- const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(prevSchema?.schema?.pluginOptions) ? prevSchema?.schema?.pluginOptions.i18n.localized : false;
16
+ const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(prevSchema?.pluginOptions) ? prevSchema?.pluginOptions.i18n.localized : false;
13
17
  // No need to perform modification on the schema, if the i18n feature was not changed
14
18
  // at the ct level
15
19
  if (isNextSchemaLocalized && isPrevSchemaLocalized) {
@@ -36,8 +40,8 @@ import { doesPluginOptionsHaveI18nLocalized, LOCALIZED_FIELDS } from './fields.m
36
40
  };
37
41
  /* -------------------------------------------------------------------------------------------------
38
42
  * addLocalisationToFields
39
- * -----------------------------------------------------------------------------------------------*/ const addLocalisationToFields = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
40
- const currentAttribute = attributes[current];
43
+ * -----------------------------------------------------------------------------------------------*/ const addLocalisationToFields = (attributes)=>{
44
+ return attributes.map((currentAttribute)=>{
41
45
  if (LOCALIZED_FIELDS.includes(currentAttribute.type)) {
42
46
  const i18n = {
43
47
  localized: true
@@ -48,19 +52,21 @@ import { doesPluginOptionsHaveI18nLocalized, LOCALIZED_FIELDS } from './fields.m
48
52
  } : {
49
53
  i18n
50
54
  };
51
- acc[current] = {
55
+ return {
52
56
  ...currentAttribute,
53
57
  pluginOptions
54
58
  };
55
- return acc;
56
59
  }
57
- acc[current] = currentAttribute;
58
- return acc;
59
- }, {});
60
- const disableAttributesLocalisation = (attributes)=>Object.keys(attributes).reduce((acc, current)=>{
61
- acc[current] = omit(attributes[current], 'pluginOptions.i18n');
62
- return acc;
63
- }, {});
60
+ return currentAttribute;
61
+ });
62
+ };
63
+ /* -------------------------------------------------------------------------------------------------
64
+ * disableAttributesLocalisation
65
+ * -----------------------------------------------------------------------------------------------*/ const disableAttributesLocalisation = (attributes)=>{
66
+ return attributes.map((currentAttribute)=>{
67
+ return omit(currentAttribute, 'pluginOptions.i18n');
68
+ });
69
+ };
64
70
 
65
71
  export { mutateCTBContentTypeSchema };
66
72
  //# sourceMappingURL=schemas.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"schemas.mjs","sources":["../../../admin/src/utils/schemas.ts"],"sourcesContent":["import omit from 'lodash/omit';\n\nimport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized } from './fields';\n\nimport type { Schema } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * mutateCTBContentTypeSchema\n * -----------------------------------------------------------------------------------------------*/\n\nconst mutateCTBContentTypeSchema = (\n nextSchema: Schema.ContentType,\n prevSchema?: {\n apiID?: string;\n schema?: Schema.ContentType;\n uid?: string;\n }\n) => {\n // Don't perform mutations components\n if (!doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {\n return nextSchema;\n }\n\n const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;\n const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(\n prevSchema?.schema?.pluginOptions\n )\n ? prevSchema?.schema?.pluginOptions.i18n.localized\n : false;\n\n // No need to perform modification on the schema, if the i18n feature was not changed\n // at the ct level\n if (isNextSchemaLocalized && isPrevSchemaLocalized) {\n return nextSchema;\n }\n\n if (isNextSchemaLocalized) {\n const attributes = addLocalisationToFields(nextSchema.attributes);\n\n return { ...nextSchema, attributes };\n }\n\n // Remove the i18n object from the pluginOptions\n if (!isNextSchemaLocalized) {\n const pluginOptions = omit(nextSchema.pluginOptions, 'i18n');\n const attributes = disableAttributesLocalisation(nextSchema.attributes);\n\n return { ...nextSchema, pluginOptions, attributes };\n }\n\n return nextSchema;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * addLocalisationToFields\n * -----------------------------------------------------------------------------------------------*/\n\nconst addLocalisationToFields = (attributes: Schema.ContentType['attributes']) =>\n Object.keys(attributes).reduce<Schema.ContentType['attributes']>((acc, current) => {\n const currentAttribute = attributes[current];\n\n if (LOCALIZED_FIELDS.includes(currentAttribute.type)) {\n const i18n = { localized: true };\n\n const pluginOptions = currentAttribute.pluginOptions\n ? { ...currentAttribute.pluginOptions, i18n }\n : { i18n };\n\n acc[current] = { ...currentAttribute, pluginOptions };\n\n return acc;\n }\n\n acc[current] = currentAttribute;\n\n return acc;\n }, {});\n\n/* -------------------------------------------------------------------------------------------------\n * disableAttributesLocalisation\n * -----------------------------------------------------------------------------------------------*/\n\ntype OmitByPath<T extends object, K extends string[]> = Pick<T, Exclude<keyof T, K[number]>>;\n\nconst disableAttributesLocalisation = (attributes: Schema.ContentType['attributes']) =>\n Object.keys(attributes).reduce<\n Record<string, OmitByPath<Schema.ContentType['attributes'][string], ['pluginOptions', 'i18n']>>\n >((acc, current) => {\n acc[current] = omit(attributes[current], 'pluginOptions.i18n');\n\n return acc;\n }, {});\n\nexport { mutateCTBContentTypeSchema };\n"],"names":["mutateCTBContentTypeSchema","nextSchema","prevSchema","doesPluginOptionsHaveI18nLocalized","pluginOptions","isNextSchemaLocalized","i18n","localized","isPrevSchemaLocalized","schema","attributes","addLocalisationToFields","omit","disableAttributesLocalisation","Object","keys","reduce","acc","current","currentAttribute","LOCALIZED_FIELDS","includes","type"],"mappings":";;;AAMA;;qGAIA,MAAMA,0BAA6B,GAAA,CACjCC,UACAC,EAAAA,UAAAA,GAAAA;;AAOA,IAAA,IAAI,CAACC,kCAAAA,CAAmCF,UAAWG,CAAAA,aAAa,CAAG,EAAA;QACjE,OAAOH,UAAAA;AACT;AAEA,IAAA,MAAMI,wBAAwBJ,UAAWG,CAAAA,aAAa,CAACE,IAAI,CAACC,SAAS;IACrE,MAAMC,qBAAAA,GAAwBL,mCAC5BD,UAAYO,EAAAA,MAAAA,EAAQL,iBAElBF,UAAYO,EAAAA,MAAAA,EAAQL,aAAcE,CAAAA,IAAAA,CAAKC,SACvC,GAAA,KAAA;;;AAIJ,IAAA,IAAIF,yBAAyBG,qBAAuB,EAAA;QAClD,OAAOP,UAAAA;AACT;AAEA,IAAA,IAAII,qBAAuB,EAAA;QACzB,MAAMK,UAAAA,GAAaC,uBAAwBV,CAAAA,UAAAA,CAAWS,UAAU,CAAA;QAEhE,OAAO;AAAE,YAAA,GAAGT,UAAU;AAAES,YAAAA;AAAW,SAAA;AACrC;;AAGA,IAAA,IAAI,CAACL,qBAAuB,EAAA;AAC1B,QAAA,MAAMD,aAAgBQ,GAAAA,IAAAA,CAAKX,UAAWG,CAAAA,aAAa,EAAE,MAAA,CAAA;QACrD,MAAMM,UAAAA,GAAaG,6BAA8BZ,CAAAA,UAAAA,CAAWS,UAAU,CAAA;QAEtE,OAAO;AAAE,YAAA,GAAGT,UAAU;AAAEG,YAAAA,aAAAA;AAAeM,YAAAA;AAAW,SAAA;AACpD;IAEA,OAAOT,UAAAA;AACT;AAEA;;qGAIA,MAAMU,uBAA0B,GAAA,CAACD,UAC/BI,GAAAA,MAAAA,CAAOC,IAAI,CAACL,UAAYM,CAAAA,CAAAA,MAAM,CAAmC,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;QACrE,MAAMC,gBAAAA,GAAmBT,UAAU,CAACQ,OAAQ,CAAA;AAE5C,QAAA,IAAIE,gBAAiBC,CAAAA,QAAQ,CAACF,gBAAAA,CAAiBG,IAAI,CAAG,EAAA;AACpD,YAAA,MAAMhB,IAAO,GAAA;gBAAEC,SAAW,EAAA;AAAK,aAAA;YAE/B,MAAMH,aAAAA,GAAgBe,gBAAiBf,CAAAA,aAAa,GAChD;AAAE,gBAAA,GAAGe,iBAAiBf,aAAa;AAAEE,gBAAAA;aACrC,GAAA;AAAEA,gBAAAA;AAAK,aAAA;YAEXW,GAAG,CAACC,QAAQ,GAAG;AAAE,gBAAA,GAAGC,gBAAgB;AAAEf,gBAAAA;AAAc,aAAA;YAEpD,OAAOa,GAAAA;AACT;QAEAA,GAAG,CAACC,QAAQ,GAAGC,gBAAAA;QAEf,OAAOF,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;AAQN,MAAMJ,6BAAAA,GAAgC,CAACH,UAAAA,GACrCI,MAAOC,CAAAA,IAAI,CAACL,UAAYM,CAAAA,CAAAA,MAAM,CAE5B,CAACC,GAAKC,EAAAA,OAAAA,GAAAA;AACND,QAAAA,GAAG,CAACC,OAAQ,CAAA,GAAGN,KAAKF,UAAU,CAACQ,QAAQ,EAAE,oBAAA,CAAA;QAEzC,OAAOD,GAAAA;AACT,KAAA,EAAG,EAAC,CAAA;;;;"}
1
+ {"version":3,"file":"schemas.mjs","sources":["../../../admin/src/utils/schemas.ts"],"sourcesContent":["import omit from 'lodash/omit';\n\nimport { LOCALIZED_FIELDS, doesPluginOptionsHaveI18nLocalized } from './fields';\n\nimport type { Schema } from '@strapi/types';\n\n/* -------------------------------------------------------------------------------------------------\n * mutateCTBContentTypeSchema\n * -----------------------------------------------------------------------------------------------*/\n\n// TODO: refactor for CTB refactors\nconst mutateCTBContentTypeSchema = (\n nextSchema: {\n pluginOptions: Schema.ContentType['pluginOptions'];\n attributes: Schema.Attribute.AnyAttribute[];\n uid?: string;\n },\n prevSchema?: {\n pluginOptions: Schema.ContentType['pluginOptions'];\n attributes: Schema.Attribute.AnyAttribute[];\n uid?: string;\n }\n) => {\n if (!prevSchema) {\n return nextSchema;\n }\n\n // Don't perform mutations components\n if (!doesPluginOptionsHaveI18nLocalized(nextSchema.pluginOptions)) {\n return nextSchema;\n }\n\n const isNextSchemaLocalized = nextSchema.pluginOptions.i18n.localized;\n const isPrevSchemaLocalized = doesPluginOptionsHaveI18nLocalized(prevSchema?.pluginOptions)\n ? prevSchema?.pluginOptions.i18n.localized\n : false;\n\n // No need to perform modification on the schema, if the i18n feature was not changed\n // at the ct level\n if (isNextSchemaLocalized && isPrevSchemaLocalized) {\n return nextSchema;\n }\n\n if (isNextSchemaLocalized) {\n const attributes = addLocalisationToFields(nextSchema.attributes);\n\n return {\n ...nextSchema,\n attributes,\n };\n }\n\n // Remove the i18n object from the pluginOptions\n if (!isNextSchemaLocalized) {\n const pluginOptions = omit(nextSchema.pluginOptions, 'i18n');\n const attributes = disableAttributesLocalisation(nextSchema.attributes);\n\n return {\n ...nextSchema,\n pluginOptions,\n attributes,\n };\n }\n\n return nextSchema;\n};\n\n/* -------------------------------------------------------------------------------------------------\n * addLocalisationToFields\n * -----------------------------------------------------------------------------------------------*/\n\nconst addLocalisationToFields = (attributes: Schema.Attribute.AnyAttribute[]) => {\n return attributes.map((currentAttribute) => {\n if (LOCALIZED_FIELDS.includes(currentAttribute.type)) {\n const i18n = { localized: true };\n\n const pluginOptions = currentAttribute.pluginOptions\n ? { ...currentAttribute.pluginOptions, i18n }\n : { i18n };\n\n return { ...currentAttribute, pluginOptions };\n }\n\n return currentAttribute;\n });\n};\n\n/* -------------------------------------------------------------------------------------------------\n * disableAttributesLocalisation\n * -----------------------------------------------------------------------------------------------*/\n\nconst disableAttributesLocalisation = (attributes: Schema.Attribute.AnyAttribute[]) => {\n return attributes.map((currentAttribute) => {\n return omit(currentAttribute, 'pluginOptions.i18n');\n });\n};\n\nexport { mutateCTBContentTypeSchema };\n"],"names":["mutateCTBContentTypeSchema","nextSchema","prevSchema","doesPluginOptionsHaveI18nLocalized","pluginOptions","isNextSchemaLocalized","i18n","localized","isPrevSchemaLocalized","attributes","addLocalisationToFields","omit","disableAttributesLocalisation","map","currentAttribute","LOCALIZED_FIELDS","includes","type"],"mappings":";;;AAMA;;AAEkG;AAG5FA,MAAAA,0BAAAA,GAA6B,CACjCC,UAKAC,EAAAA,UAAAA,GAAAA;AAMA,IAAA,IAAI,CAACA,UAAY,EAAA;QACf,OAAOD,UAAAA;AACT;;AAGA,IAAA,IAAI,CAACE,kCAAAA,CAAmCF,UAAWG,CAAAA,aAAa,CAAG,EAAA;QACjE,OAAOH,UAAAA;AACT;AAEA,IAAA,MAAMI,wBAAwBJ,UAAWG,CAAAA,aAAa,CAACE,IAAI,CAACC,SAAS;AACrE,IAAA,MAAMC,wBAAwBL,kCAAmCD,CAAAA,UAAAA,EAAYE,iBACzEF,UAAYE,EAAAA,aAAAA,CAAcE,KAAKC,SAC/B,GAAA,KAAA;;;AAIJ,IAAA,IAAIF,yBAAyBG,qBAAuB,EAAA;QAClD,OAAOP,UAAAA;AACT;AAEA,IAAA,IAAII,qBAAuB,EAAA;QACzB,MAAMI,UAAAA,GAAaC,uBAAwBT,CAAAA,UAAAA,CAAWQ,UAAU,CAAA;QAEhE,OAAO;AACL,YAAA,GAAGR,UAAU;AACbQ,YAAAA;AACF,SAAA;AACF;;AAGA,IAAA,IAAI,CAACJ,qBAAuB,EAAA;AAC1B,QAAA,MAAMD,aAAgBO,GAAAA,IAAAA,CAAKV,UAAWG,CAAAA,aAAa,EAAE,MAAA,CAAA;QACrD,MAAMK,UAAAA,GAAaG,6BAA8BX,CAAAA,UAAAA,CAAWQ,UAAU,CAAA;QAEtE,OAAO;AACL,YAAA,GAAGR,UAAU;AACbG,YAAAA,aAAAA;AACAK,YAAAA;AACF,SAAA;AACF;IAEA,OAAOR,UAAAA;AACT;AAEA;;qGAIA,MAAMS,0BAA0B,CAACD,UAAAA,GAAAA;IAC/B,OAAOA,UAAAA,CAAWI,GAAG,CAAC,CAACC,gBAAAA,GAAAA;AACrB,QAAA,IAAIC,gBAAiBC,CAAAA,QAAQ,CAACF,gBAAAA,CAAiBG,IAAI,CAAG,EAAA;AACpD,YAAA,MAAMX,IAAO,GAAA;gBAAEC,SAAW,EAAA;AAAK,aAAA;YAE/B,MAAMH,aAAAA,GAAgBU,gBAAiBV,CAAAA,aAAa,GAChD;AAAE,gBAAA,GAAGU,iBAAiBV,aAAa;AAAEE,gBAAAA;aACrC,GAAA;AAAEA,gBAAAA;AAAK,aAAA;YAEX,OAAO;AAAE,gBAAA,GAAGQ,gBAAgB;AAAEV,gBAAAA;AAAc,aAAA;AAC9C;QAEA,OAAOU,gBAAAA;AACT,KAAA,CAAA;AACF,CAAA;AAEA;;qGAIA,MAAMF,gCAAgC,CAACH,UAAAA,GAAAA;IACrC,OAAOA,UAAAA,CAAWI,GAAG,CAAC,CAACC,gBAAAA,GAAAA;AACrB,QAAA,OAAOH,KAAKG,gBAAkB,EAAA,oBAAA,CAAA;AAChC,KAAA,CAAA;AACF,CAAA;;;;"}
@@ -1,15 +1,19 @@
1
1
  'use strict';
2
2
 
3
- var contentApi = {
4
- type: 'content-api',
5
- routes: [
3
+ var utils = require('@strapi/utils');
4
+ var locale = require('./validation/locale.js');
5
+
6
+ const createContentApiRoutes = utils.createContentApiRoutesFactory(()=>{
7
+ const validator = new locale.I18nLocaleRouteValidator(strapi);
8
+ return [
6
9
  {
7
10
  method: 'GET',
8
11
  path: '/locales',
9
- handler: 'locales.listLocales'
12
+ handler: 'locales.listLocales',
13
+ response: validator.locales
10
14
  }
11
- ]
12
- };
15
+ ];
16
+ });
13
17
 
14
- module.exports = contentApi;
18
+ module.exports = createContentApiRoutes;
15
19
  //# sourceMappingURL=content-api.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-api.js","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["export default {\n type: 'content-api',\n routes: [\n {\n method: 'GET',\n path: '/locales',\n handler: 'locales.listLocales',\n },\n ],\n};\n"],"names":["type","routes","method","path","handler"],"mappings":";;AAAA,iBAAe;IACbA,IAAM,EAAA,aAAA;IACNC,MAAQ,EAAA;AACN,QAAA;YACEC,MAAQ,EAAA,KAAA;YACRC,IAAM,EAAA,UAAA;YACNC,OAAS,EAAA;AACX;AACD;AACH,CAAE;;;;"}
1
+ {"version":3,"file":"content-api.js","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport { createContentApiRoutesFactory } from '@strapi/utils';\nimport { I18nLocaleRouteValidator } from './validation';\n\nconst createContentApiRoutes = createContentApiRoutesFactory((): Core.RouterInput['routes'] => {\n const validator = new I18nLocaleRouteValidator(strapi);\n return [\n {\n method: 'GET',\n path: '/locales',\n handler: 'locales.listLocales',\n response: validator.locales,\n },\n ];\n});\n\nexport default createContentApiRoutes;\n"],"names":["createContentApiRoutes","createContentApiRoutesFactory","validator","I18nLocaleRouteValidator","strapi","method","path","handler","response","locales"],"mappings":";;;;;AAIA,MAAMA,yBAAyBC,mCAA8B,CAAA,IAAA;IAC3D,MAAMC,SAAAA,GAAY,IAAIC,+BAAyBC,CAAAA,MAAAA,CAAAA;IAC/C,OAAO;AACL,QAAA;YACEC,MAAQ,EAAA,KAAA;YACRC,IAAM,EAAA,UAAA;YACNC,OAAS,EAAA,qBAAA;AACTC,YAAAA,QAAAA,EAAUN,UAAUO;AACtB;AACD,KAAA;AACH,CAAA;;;;"}
@@ -1,13 +1,17 @@
1
- var contentApi = {
2
- type: 'content-api',
3
- routes: [
1
+ import { createContentApiRoutesFactory } from '@strapi/utils';
2
+ import { I18nLocaleRouteValidator } from './validation/locale.mjs';
3
+
4
+ const createContentApiRoutes = createContentApiRoutesFactory(()=>{
5
+ const validator = new I18nLocaleRouteValidator(strapi);
6
+ return [
4
7
  {
5
8
  method: 'GET',
6
9
  path: '/locales',
7
- handler: 'locales.listLocales'
10
+ handler: 'locales.listLocales',
11
+ response: validator.locales
8
12
  }
9
- ]
10
- };
13
+ ];
14
+ });
11
15
 
12
- export { contentApi as default };
16
+ export { createContentApiRoutes as default };
13
17
  //# sourceMappingURL=content-api.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-api.mjs","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["export default {\n type: 'content-api',\n routes: [\n {\n method: 'GET',\n path: '/locales',\n handler: 'locales.listLocales',\n },\n ],\n};\n"],"names":["type","routes","method","path","handler"],"mappings":"AAAA,iBAAe;IACbA,IAAM,EAAA,aAAA;IACNC,MAAQ,EAAA;AACN,QAAA;YACEC,MAAQ,EAAA,KAAA;YACRC,IAAM,EAAA,UAAA;YACNC,OAAS,EAAA;AACX;AACD;AACH,CAAE;;;;"}
1
+ {"version":3,"file":"content-api.mjs","sources":["../../../server/src/routes/content-api.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport { createContentApiRoutesFactory } from '@strapi/utils';\nimport { I18nLocaleRouteValidator } from './validation';\n\nconst createContentApiRoutes = createContentApiRoutesFactory((): Core.RouterInput['routes'] => {\n const validator = new I18nLocaleRouteValidator(strapi);\n return [\n {\n method: 'GET',\n path: '/locales',\n handler: 'locales.listLocales',\n response: validator.locales,\n },\n ];\n});\n\nexport default createContentApiRoutes;\n"],"names":["createContentApiRoutes","createContentApiRoutesFactory","validator","I18nLocaleRouteValidator","strapi","method","path","handler","response","locales"],"mappings":";;;AAIA,MAAMA,yBAAyBC,6BAA8B,CAAA,IAAA;IAC3D,MAAMC,SAAAA,GAAY,IAAIC,wBAAyBC,CAAAA,MAAAA,CAAAA;IAC/C,OAAO;AACL,QAAA;YACEC,MAAQ,EAAA,KAAA;YACRC,IAAM,EAAA,UAAA;YACNC,OAAS,EAAA,qBAAA;AACTC,YAAAA,QAAAA,EAAUN,UAAUO;AACtB;AACD,KAAA;AACH,CAAA;;;;"}
@@ -1,9 +1,9 @@
1
1
  import admin from './admin.mjs';
2
- import contentApi from './content-api.mjs';
2
+ import createContentApiRoutes from './content-api.mjs';
3
3
 
4
4
  var routes = {
5
5
  admin,
6
- 'content-api': contentApi
6
+ 'content-api': createContentApiRoutes
7
7
  };
8
8
 
9
9
  export { routes as default };
@@ -0,0 +1,57 @@
1
+ 'use strict';
2
+
3
+ var z = require('zod/v4');
4
+
5
+ function _interopNamespaceDefault(e) {
6
+ var n = Object.create(null);
7
+ if (e) {
8
+ Object.keys(e).forEach(function (k) {
9
+ if (k !== 'default') {
10
+ var d = Object.getOwnPropertyDescriptor(e, k);
11
+ Object.defineProperty(n, k, d.get ? d : {
12
+ enumerable: true,
13
+ get: function () { return e[k]; }
14
+ });
15
+ }
16
+ });
17
+ }
18
+ n.default = e;
19
+ return Object.freeze(n);
20
+ }
21
+
22
+ var z__namespace = /*#__PURE__*/_interopNamespaceDefault(z);
23
+
24
+ /**
25
+ * A validator for i18n locale routes.
26
+ *
27
+ */ class I18nLocaleRouteValidator {
28
+ /**
29
+ * Generates a validation schema for a single locale.
30
+ *
31
+ * @returns A schema for validating locale objects
32
+ */ get locale() {
33
+ return z__namespace.object({
34
+ id: z__namespace.number().int().positive(),
35
+ documentId: z__namespace.string().uuid(),
36
+ name: z__namespace.string(),
37
+ code: z__namespace.string().length(2, 'Locale code must be exactly 2 characters'),
38
+ createdAt: z__namespace.string(),
39
+ updatedAt: z__namespace.string(),
40
+ publishedAt: z__namespace.string().nullable(),
41
+ isDefault: z__namespace.boolean()
42
+ });
43
+ }
44
+ /**
45
+ * Generates a validation schema for an array of locales
46
+ *
47
+ * @returns A schema for validating arrays of locales
48
+ */ get locales() {
49
+ return z__namespace.array(this.locale);
50
+ }
51
+ constructor(strapi){
52
+ this._strapi = strapi;
53
+ }
54
+ }
55
+
56
+ exports.I18nLocaleRouteValidator = I18nLocaleRouteValidator;
57
+ //# sourceMappingURL=locale.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.js","sources":["../../../../server/src/routes/validation/locale.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\n/**\n * A validator for i18n locale routes.\n *\n */\nexport class I18nLocaleRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n /**\n * Generates a validation schema for a single locale.\n *\n * @returns A schema for validating locale objects\n */\n get locale() {\n return z.object({\n id: z.number().int().positive(),\n documentId: z.string().uuid(),\n name: z.string(),\n code: z.string().length(2, 'Locale code must be exactly 2 characters'),\n createdAt: z.string(),\n updatedAt: z.string(),\n publishedAt: z.string().nullable(),\n isDefault: z.boolean(),\n });\n }\n\n /**\n * Generates a validation schema for an array of locales\n *\n * @returns A schema for validating arrays of locales\n */\n get locales() {\n return z.array(this.locale);\n }\n}\n"],"names":["I18nLocaleRouteValidator","locale","z","object","id","number","int","positive","documentId","string","uuid","name","code","length","createdAt","updatedAt","publishedAt","nullable","isDefault","boolean","locales","array","strapi","_strapi"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGA;;;AAGC,IACM,MAAMA,wBAAAA,CAAAA;AAOX;;;;AAIC,MACD,IAAIC,MAAS,GAAA;QACX,OAAOC,YAAAA,CAAEC,MAAM,CAAC;AACdC,YAAAA,EAAAA,EAAIF,YAAEG,CAAAA,MAAM,EAAGC,CAAAA,GAAG,GAAGC,QAAQ,EAAA;YAC7BC,UAAYN,EAAAA,YAAAA,CAAEO,MAAM,EAAA,CAAGC,IAAI,EAAA;AAC3BC,YAAAA,IAAAA,EAAMT,aAAEO,MAAM,EAAA;AACdG,YAAAA,IAAAA,EAAMV,YAAEO,CAAAA,MAAM,EAAGI,CAAAA,MAAM,CAAC,CAAG,EAAA,0CAAA,CAAA;AAC3BC,YAAAA,SAAAA,EAAWZ,aAAEO,MAAM,EAAA;AACnBM,YAAAA,SAAAA,EAAWb,aAAEO,MAAM,EAAA;YACnBO,WAAad,EAAAA,YAAAA,CAAEO,MAAM,EAAA,CAAGQ,QAAQ,EAAA;AAChCC,YAAAA,SAAAA,EAAWhB,aAAEiB,OAAO;AACtB,SAAA,CAAA;AACF;AAEA;;;;AAIC,MACD,IAAIC,OAAU,GAAA;AACZ,QAAA,OAAOlB,YAAEmB,CAAAA,KAAK,CAAC,IAAI,CAACpB,MAAM,CAAA;AAC5B;AA7BA,IAAA,WAAA,CAAmBqB,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB;AA4BF;;;;"}
@@ -0,0 +1,36 @@
1
+ import * as z from 'zod/v4';
2
+
3
+ /**
4
+ * A validator for i18n locale routes.
5
+ *
6
+ */ class I18nLocaleRouteValidator {
7
+ /**
8
+ * Generates a validation schema for a single locale.
9
+ *
10
+ * @returns A schema for validating locale objects
11
+ */ get locale() {
12
+ return z.object({
13
+ id: z.number().int().positive(),
14
+ documentId: z.string().uuid(),
15
+ name: z.string(),
16
+ code: z.string().length(2, 'Locale code must be exactly 2 characters'),
17
+ createdAt: z.string(),
18
+ updatedAt: z.string(),
19
+ publishedAt: z.string().nullable(),
20
+ isDefault: z.boolean()
21
+ });
22
+ }
23
+ /**
24
+ * Generates a validation schema for an array of locales
25
+ *
26
+ * @returns A schema for validating arrays of locales
27
+ */ get locales() {
28
+ return z.array(this.locale);
29
+ }
30
+ constructor(strapi){
31
+ this._strapi = strapi;
32
+ }
33
+ }
34
+
35
+ export { I18nLocaleRouteValidator };
36
+ //# sourceMappingURL=locale.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.mjs","sources":["../../../../server/src/routes/validation/locale.ts"],"sourcesContent":["import type { Core } from '@strapi/types';\nimport * as z from 'zod/v4';\n\n/**\n * A validator for i18n locale routes.\n *\n */\nexport class I18nLocaleRouteValidator {\n protected readonly _strapi: Core.Strapi;\n\n public constructor(strapi: Core.Strapi) {\n this._strapi = strapi;\n }\n\n /**\n * Generates a validation schema for a single locale.\n *\n * @returns A schema for validating locale objects\n */\n get locale() {\n return z.object({\n id: z.number().int().positive(),\n documentId: z.string().uuid(),\n name: z.string(),\n code: z.string().length(2, 'Locale code must be exactly 2 characters'),\n createdAt: z.string(),\n updatedAt: z.string(),\n publishedAt: z.string().nullable(),\n isDefault: z.boolean(),\n });\n }\n\n /**\n * Generates a validation schema for an array of locales\n *\n * @returns A schema for validating arrays of locales\n */\n get locales() {\n return z.array(this.locale);\n }\n}\n"],"names":["I18nLocaleRouteValidator","locale","z","object","id","number","int","positive","documentId","string","uuid","name","code","length","createdAt","updatedAt","publishedAt","nullable","isDefault","boolean","locales","array","strapi","_strapi"],"mappings":";;AAGA;;;AAGC,IACM,MAAMA,wBAAAA,CAAAA;AAOX;;;;AAIC,MACD,IAAIC,MAAS,GAAA;QACX,OAAOC,CAAAA,CAAEC,MAAM,CAAC;AACdC,YAAAA,EAAAA,EAAIF,CAAEG,CAAAA,MAAM,EAAGC,CAAAA,GAAG,GAAGC,QAAQ,EAAA;YAC7BC,UAAYN,EAAAA,CAAAA,CAAEO,MAAM,EAAA,CAAGC,IAAI,EAAA;AAC3BC,YAAAA,IAAAA,EAAMT,EAAEO,MAAM,EAAA;AACdG,YAAAA,IAAAA,EAAMV,CAAEO,CAAAA,MAAM,EAAGI,CAAAA,MAAM,CAAC,CAAG,EAAA,0CAAA,CAAA;AAC3BC,YAAAA,SAAAA,EAAWZ,EAAEO,MAAM,EAAA;AACnBM,YAAAA,SAAAA,EAAWb,EAAEO,MAAM,EAAA;YACnBO,WAAad,EAAAA,CAAAA,CAAEO,MAAM,EAAA,CAAGQ,QAAQ,EAAA;AAChCC,YAAAA,SAAAA,EAAWhB,EAAEiB,OAAO;AACtB,SAAA,CAAA;AACF;AAEA;;;;AAIC,MACD,IAAIC,OAAU,GAAA;AACZ,QAAA,OAAOlB,CAAEmB,CAAAA,KAAK,CAAC,IAAI,CAACpB,MAAM,CAAA;AAC5B;AA7BA,IAAA,WAAA,CAAmBqB,MAAmB,CAAE;QACtC,IAAI,CAACC,OAAO,GAAGD,MAAAA;AACjB;AA4BF;;;;"}
@@ -22,13 +22,9 @@ declare const _default: () => {
22
22
  };
23
23
  }[];
24
24
  };
25
- 'content-api': {
26
- type: string;
27
- routes: {
28
- method: string;
29
- path: string;
30
- handler: string;
31
- }[];
25
+ 'content-api': () => {
26
+ type: "content-api";
27
+ routes: import("@strapi/types/dist/core").RouteInput[];
32
28
  };
33
29
  };
34
30
  controllers: {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAOG"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../server/src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,wBAOG"}
@@ -1,10 +1,7 @@
1
- declare const _default: {
2
- type: string;
3
- routes: {
4
- method: string;
5
- path: string;
6
- handler: string;
7
- }[];
1
+ import type { Core } from '@strapi/types';
2
+ declare const createContentApiRoutes: () => {
3
+ type: "content-api";
4
+ routes: Core.RouteInput[];
8
5
  };
9
- export default _default;
6
+ export default createContentApiRoutes;
10
7
  //# sourceMappingURL=content-api.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"content-api.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/content-api.ts"],"names":[],"mappings":";;;;;;;;AAAA,wBASE"}
1
+ {"version":3,"file":"content-api.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/content-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAI1C,QAAA,MAAM,sBAAsB;;;CAU1B,CAAC;AAEH,eAAe,sBAAsB,CAAC"}
@@ -15,13 +15,9 @@ declare const _default: {
15
15
  };
16
16
  }[];
17
17
  };
18
- 'content-api': {
19
- type: string;
20
- routes: {
21
- method: string;
22
- path: string;
23
- handler: string;
24
- }[];
18
+ 'content-api': () => {
19
+ type: "content-api";
20
+ routes: import("@strapi/types/dist/core").RouteInput[];
25
21
  };
26
22
  };
27
23
  export default _default;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,wBAGE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../server/src/routes/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AAGA,wBAGE"}
@@ -0,0 +1,2 @@
1
+ export { I18nLocaleRouteValidator } from './locale';
2
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,UAAU,CAAC"}
@@ -0,0 +1,41 @@
1
+ import type { Core } from '@strapi/types';
2
+ import * as z from 'zod/v4';
3
+ /**
4
+ * A validator for i18n locale routes.
5
+ *
6
+ */
7
+ export declare class I18nLocaleRouteValidator {
8
+ protected readonly _strapi: Core.Strapi;
9
+ constructor(strapi: Core.Strapi);
10
+ /**
11
+ * Generates a validation schema for a single locale.
12
+ *
13
+ * @returns A schema for validating locale objects
14
+ */
15
+ get locale(): z.ZodObject<{
16
+ id: z.ZodNumber;
17
+ documentId: z.ZodString;
18
+ name: z.ZodString;
19
+ code: z.ZodString;
20
+ createdAt: z.ZodString;
21
+ updatedAt: z.ZodString;
22
+ publishedAt: z.ZodNullable<z.ZodString>;
23
+ isDefault: z.ZodBoolean;
24
+ }, z.core.$strip>;
25
+ /**
26
+ * Generates a validation schema for an array of locales
27
+ *
28
+ * @returns A schema for validating arrays of locales
29
+ */
30
+ get locales(): z.ZodArray<z.ZodObject<{
31
+ id: z.ZodNumber;
32
+ documentId: z.ZodString;
33
+ name: z.ZodString;
34
+ code: z.ZodString;
35
+ createdAt: z.ZodString;
36
+ updatedAt: z.ZodString;
37
+ publishedAt: z.ZodNullable<z.ZodString>;
38
+ isDefault: z.ZodBoolean;
39
+ }, z.core.$strip>>;
40
+ }
41
+ //# sourceMappingURL=locale.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locale.d.ts","sourceRoot":"","sources":["../../../../../server/src/routes/validation/locale.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAC1C,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAE5B;;;GAGG;AACH,qBAAa,wBAAwB;IACnC,SAAS,CAAC,QAAQ,CAAC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC;gBAErB,MAAM,EAAE,IAAI,CAAC,MAAM;IAItC;;;;OAIG;IACH,IAAI,MAAM;;;;;;;;;sBAWT;IAED;;;;OAIG;IACH,IAAI,OAAO;;;;;;;;;uBAEV;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@strapi/i18n",
3
- "version": "0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05",
3
+ "version": "0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266",
4
4
  "description": "Create read and update content in different languages, both from the Admin Panel and from the API",
5
5
  "repository": {
6
6
  "type": "git",
@@ -57,20 +57,21 @@
57
57
  },
58
58
  "dependencies": {
59
59
  "@reduxjs/toolkit": "1.9.7",
60
- "@strapi/design-system": "2.0.0-rc.24",
61
- "@strapi/icons": "2.0.0-rc.24",
62
- "@strapi/utils": "0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05",
60
+ "@strapi/design-system": "2.0.0-rc.30",
61
+ "@strapi/icons": "2.0.0-rc.30",
62
+ "@strapi/utils": "0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266",
63
63
  "lodash": "4.17.21",
64
64
  "qs": "6.11.1",
65
65
  "react-intl": "6.6.2",
66
66
  "react-redux": "8.1.3",
67
- "yup": "0.32.9"
67
+ "yup": "0.32.9",
68
+ "zod": "3.25.67"
68
69
  },
69
70
  "devDependencies": {
70
- "@strapi/admin": "0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05",
71
- "@strapi/admin-test-utils": "0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05",
72
- "@strapi/content-manager": "0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05",
73
- "@strapi/types": "0.0.0-next.883f4fcabd28de02b78b7b00a70e33cd2d151d05",
71
+ "@strapi/admin": "0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266",
72
+ "@strapi/admin-test-utils": "0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266",
73
+ "@strapi/content-manager": "0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266",
74
+ "@strapi/types": "0.0.0-next.8b11c0eca020d4c84f17c9f06f36fb9c87fb3266",
74
75
  "@testing-library/react": "15.0.7",
75
76
  "@testing-library/user-event": "14.5.2",
76
77
  "msw": "1.3.0",