@griddo/core 11.0.22 → 11.0.23

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 (84) hide show
  1. package/README.md +0 -1
  2. package/dist/autotypes.js +1 -1
  3. package/dist/autotypes.js.map +1 -1
  4. package/dist/bin-tools/autotypes/autotypes.d.ts +11 -0
  5. package/dist/{functions → bin-tools}/autotypes/factories/index.d.ts +3 -1
  6. package/dist/{functions → bin-tools}/autotypes/factories/names/getComponents.d.ts +1 -1
  7. package/dist/{functions → bin-tools}/autotypes/factories/names/getDetailTemplates.d.ts +1 -1
  8. package/dist/bin-tools/autotypes/factories/names/getFormFieldsNames.d.ts +2 -0
  9. package/dist/bin-tools/autotypes/factories/names/getFormTemplatesNames.d.ts +2 -0
  10. package/dist/{functions → bin-tools}/autotypes/factories/names/getModules.d.ts +1 -1
  11. package/dist/{functions → bin-tools}/autotypes/factories/names/getPageData.d.ts +1 -1
  12. package/dist/{functions → bin-tools}/autotypes/factories/names/getSimpleData.d.ts +1 -1
  13. package/dist/{functions → bin-tools}/autotypes/factories/names/getTaxonomy.d.ts +1 -1
  14. package/dist/{functions → bin-tools}/autotypes/factories/names/getTemplates.d.ts +1 -1
  15. package/dist/{functions → bin-tools}/autotypes/factories/props/getPageData.d.ts +1 -1
  16. package/dist/{functions → bin-tools}/autotypes/factories/props/getSectionList.d.ts +1 -1
  17. package/dist/{functions → bin-tools}/autotypes/factories/props/getSimpleData.d.ts +1 -1
  18. package/dist/{functions → bin-tools}/autotypes/factories/props/getTaxonomyData.d.ts +1 -1
  19. package/dist/{functions → bin-tools}/autotypes/factories/props/getTypeFromField/index.d.ts +8 -5
  20. package/dist/{functions → bin-tools}/autotypes/factories/props/getUIAndData/utils.d.ts +3 -3
  21. package/dist/{functions → bin-tools}/autotypes/factories/schemas/getDataPacks.d.ts +1 -1
  22. package/dist/{functions/autotypes/factories/schemas/getMenuItems/index.d.ts → bin-tools/autotypes/factories/schemas/getMenuItems.d.ts} +1 -1
  23. package/dist/{functions → bin-tools}/autotypes/factories/schemas/getModuleCategories.d.ts +1 -1
  24. package/dist/{functions → bin-tools}/autotypes/factories/schemas/getThemes.d.ts +1 -1
  25. package/dist/{functions → bin-tools}/autotypes/misc/ascii.d.ts +1 -2
  26. package/dist/bin-tools/autotypes/misc/types.d.ts +79 -0
  27. package/dist/{functions → bin-tools}/autotypes/misc/utils.d.ts +6 -6
  28. package/dist/components/CloudinaryImage/index.d.ts +16 -0
  29. package/dist/components/Component/index.d.ts +15 -9
  30. package/dist/components/LdJson/index.d.ts +3 -5
  31. package/dist/components/Link/index.d.ts +4 -0
  32. package/dist/components/Page/utils.d.ts +24 -0
  33. package/dist/functions/index.d.ts +3 -7
  34. package/dist/functions/localeDate/index.d.ts +15 -0
  35. package/dist/hooks/index.d.ts +3 -3
  36. package/dist/hooks/useLocaleDate.d.ts +1 -16
  37. package/dist/index.d.ts +4 -5
  38. package/dist/index.js +1 -1
  39. package/dist/index.js.map +1 -1
  40. package/dist/node/index.d.ts +0 -2
  41. package/dist/node/index.js +1 -31
  42. package/dist/react-svg-library.js.map +1 -1
  43. package/dist/types/api-response-fields/index.d.ts +3 -0
  44. package/dist/types/core/index.d.ts +2 -2
  45. package/dist/types/schema-fields/base.d.ts +8 -1
  46. package/dist/types/schema-fields/props.d.ts +14 -3
  47. package/dist/types/schema-fields/simple-content-type-fields.d.ts +3 -3
  48. package/dist/types/schema-fields/ui-fields.d.ts +3 -2
  49. package/dist/types/schema-fields/ui-form-fields.d.ts +37 -0
  50. package/dist/types/schema-fields/ui-form-template-fields.d.ts +37 -0
  51. package/dist/types/schema-fields/ui-template-fields.d.ts +2 -2
  52. package/dist/types/schemas/FormCategories.d.ts +9 -0
  53. package/dist/types/schemas/SimpleContentType.d.ts +9 -0
  54. package/dist/types/schemas/UI.d.ts +40 -3
  55. package/dist/types/schemas/index.d.ts +3 -2
  56. package/dist/utils/index.d.ts +20 -0
  57. package/package.json +2 -2
  58. package/dist/autotypes-legacy.js +0 -2
  59. package/dist/autotypes-legacy.js.map +0 -1
  60. package/dist/constants/cloudinary.d.ts +0 -17
  61. package/dist/functions/autotypes/factories/schemas/getMenuItems/utils.d.ts +0 -3
  62. package/dist/functions/autotypes/index.d.ts +0 -2
  63. package/dist/functions/autotypes/misc/types.d.ts +0 -56
  64. package/dist/functions/autotypes-legacy/ascii.d.ts +0 -3
  65. package/dist/functions/autotypes-legacy/constants.d.ts +0 -5
  66. package/dist/functions/autotypes-legacy/getMenuItemsProps.d.ts +0 -3
  67. package/dist/functions/autotypes-legacy/getTypeFromField.d.ts +0 -24
  68. package/dist/functions/autotypes-legacy/getTypesFromSchemas.d.ts +0 -15
  69. package/dist/functions/autotypes-legacy/index.cjs.d.ts +0 -1
  70. package/dist/functions/autotypes-legacy/main.d.ts +0 -5
  71. package/dist/functions/autotypes-legacy/types.d.ts +0 -24
  72. package/dist/functions/autotypes-legacy/utils.d.ts +0 -92
  73. package/dist/functions/utils.d.ts +0 -52
  74. /package/dist/{functions → bin-tools}/autotypes/factories/props/getTypeFromField/utils.d.ts +0 -0
  75. /package/dist/{functions → bin-tools}/autotypes/factories/props/getUIAndData/index.d.ts +0 -0
  76. /package/dist/{functions → bin-tools}/autotypes/factories/schemas/getLanguages.d.ts +0 -0
  77. /package/dist/{functions/autotypes-legacy → bin-tools/autotypes}/index.d.ts +0 -0
  78. /package/dist/{functions → bin-tools}/react-svg-library/index.d.ts +0 -0
  79. /package/dist/{functions → bin-tools}/react-svg-library/utils.d.ts +0 -0
  80. /package/dist/{assets → components/Component/ComponentWrapper}/svg/Delete.d.ts +0 -0
  81. /package/dist/{assets → components/Component/ComponentWrapper}/svg/Duplicate.d.ts +0 -0
  82. /package/dist/node/{theme-parser → DEPRECATED-theme-parser}/index.d.ts +0 -0
  83. /package/dist/node/{theme-parser → DEPRECATED-theme-parser}/utils.d.ts +0 -0
  84. /package/dist/{functions/image-utils.d.ts → utils/images.d.ts} +0 -0
@@ -0,0 +1,20 @@
1
+ export type PublicApiOperators = "or" | "and" | "OR" | "AND";
2
+ export interface ConcatParams {
3
+ baseUrl: string;
4
+ params: Record<string, any>;
5
+ }
6
+ declare function isLocalStorageAvailable(): boolean;
7
+ declare function getToken(): {
8
+ Authorization: string;
9
+ } | null;
10
+ declare function getSiteID(): any;
11
+ declare function getLang(): number | false;
12
+ /**
13
+ * concatParams
14
+ * @param params
15
+ * @param params.baseUrl base url of the api
16
+ * @param params.params object with the params to be sent
17
+ * @returns a string with the params concatenated
18
+ */
19
+ declare function concatParams({ baseUrl, params }: ConcatParams): string;
20
+ export { concatParams, getLang, getSiteID, getToken, isLocalStorageAvailable };
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "@griddo/core",
3
3
  "description": "Reload version of Griddo Core",
4
4
  "license": "UNLICENSED",
5
- "version": "11.0.22",
5
+ "version": "11.0.23",
6
6
  "authors": [
7
7
  "Álvaro Sánchez' <alvaro.sanches@secuoyas.com>",
8
8
  "Diego M. Béjar <diego.bejar@secuoyas.com>",
@@ -119,5 +119,5 @@
119
119
  "publishConfig": {
120
120
  "access": "public"
121
121
  },
122
- "gitHead": "f47b8da5bc98f03f7f23a65d471a0429785c280d"
122
+ "gitHead": "eec9df5df565f610ec25cfb4b48bf737e9073990"
123
123
  }
@@ -1,2 +0,0 @@
1
- import e from"path";import{writeFile as t}from"fs";import n from"prettier";import o from"node:path";import{fileURLToPath as i}from"node:url";import r from"node:process";import s from"node:fs";function l(e,t,n,o){return new(n||(n=Promise))((function(i,r){function s(e){try{a(o.next(e))}catch(e){r(e)}}function l(e){try{a(o.throw(e))}catch(e){r(e)}}function a(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(s,l)}a((o=o.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const a="Props",p=/[\p{Lu}]/u,c=/[\p{Ll}]/u,u=/^[\p{Lu}](?![\p{Lu}])/gu,d=/([\p{Alpha}\p{N}_]|$)/u,m=/[_.\- ]+/,y=new RegExp("^"+m.source),f=new RegExp(m.source+d.source,"gu"),g=new RegExp("\\d+"+d.source,"gu");function h(e,t){if("string"!=typeof e&&!Array.isArray(e))throw new TypeError("Expected the input to be `string | string[]`");if(t={pascalCase:!1,preserveConsecutiveUppercase:!1,...t},0===(e=Array.isArray(e)?e.map((e=>e.trim())).filter((e=>e.length)).join("-"):e.trim()).length)return"";const n=!1===t.locale?e=>e.toLowerCase():e=>e.toLocaleLowerCase(t.locale),o=!1===t.locale?e=>e.toUpperCase():e=>e.toLocaleUpperCase(t.locale);if(1===e.length)return m.test(e)?"":t.pascalCase?o(e):n(e);return e!==n(e)&&(e=((e,t,n,o)=>{let i=!1,r=!1,s=!1,l=!1;for(let a=0;a<e.length;a++){const u=e[a];l=!(a>2)||"-"===e[a-3],i&&p.test(u)?(e=e.slice(0,a)+"-"+e.slice(a),i=!1,s=r,r=!0,a++):r&&s&&c.test(u)&&(!l||o)?(e=e.slice(0,a-1)+"-"+e.slice(a-1),s=r,r=!1,i=!0):(i=t(u)===u&&n(u)!==u,s=r,r=n(u)===u&&t(u)!==u)}return e})(e,n,o,t.preserveConsecutiveUppercase)),e=e.replace(y,""),e=t.preserveConsecutiveUppercase?((e,t)=>(u.lastIndex=0,e.replaceAll(u,(e=>t(e)))))(e,n):n(e),t.pascalCase&&(e=o(e.charAt(0))+e.slice(1)),((e,t)=>(f.lastIndex=0,g.lastIndex=0,e.replaceAll(g,((n,o,i)=>["_","-"].includes(e.charAt(i+n.length))?n:t(n))).replaceAll(f,((e,n)=>t(n)))))(e,o)}const $={directory:"isDirectory",file:"isFile"};const F=(e,t)=>t[$[e]]();function T(e,{cwd:t=r.cwd(),type:n="file",allowSymlinks:l=!0}={}){var a;!function(e){if(!Object.hasOwnProperty.call($,e))throw new Error(`Invalid type specified: ${e}`)}(n),t=(a=t)instanceof URL?i(a):a;const p=l?s.statSync:s.lstatSync;for(const i of e)try{const e=p(o.resolve(t,i),{throwIfNoEntry:!1});if(!e)continue;if(F(n,e))return i}catch{}}const C=Symbol("findUpStop");function v(e,t={}){let n=o.resolve(((r=t.cwd)instanceof URL?i(r):r)||"");var r;const{root:s}=o.parse(n),l=t.stopAt||s,a=t.limit||Number.POSITIVE_INFINITY,p=[e].flat(),c=t=>{if("function"!=typeof e)return T(p,t);const n=e(t.cwd);return"string"==typeof n?T([n],t):n},u=[];for(;;){const e=c({...t,cwd:n});if(e===C)break;if(e&&u.push(o.resolve(n,e)),n===l||u.length>=a)break;n=o.dirname(n)}return u}function b({cwd:e}={}){const t=function(e,t={}){return v(e,{...t,limit:1})[0]}("package.json",{cwd:e});return t&&o.dirname(t)}function j(e,t){var n;const{returnTypeName:o,generic:i}=t||{},r="hideable"in e&&Boolean(e.hideable),s=i?`<${i}>`:"",l=`${o||_(e.type)}${s}`,a=r?`Hideable<${l}>`:`${l}`;return`\n\t\t${(null===(n=e._autoType)||void 0===n?void 0:n.doc)||""}\n\t\t${`${e.key}?: ${a}`}\n\t`}function k(e,t){const n=(null==t?void 0:t.interfaceSuffix)||a;return e.length>1?`{\n\t\t\t${e.map((e=>`${h(e)}?: ${e}${n}`)).join(",")}\n\t\t\t}`:e.map((e=>`${e}${n}`)).join("")}function _(e){return{ArrayFieldGroup:"Fields.ArrayFieldGroup",AsyncCheckGroup:"Fields.AsyncCheckGroup",AsyncSelect:"Fields.AsyncSelect",CheckGroup:"Fields.CheckGroup",ColorPicker:"Fields.ColorPicker",ComponentArray:"Fields.ComponentArray",ComponentContainer:"Fields.ComponentContainer",ConditionalField:"Fields.Conditional",DateField:"Fields.Date",FieldGroup:"Fields.FieldGroup",FieldsDivider:"Fields.FieldsDivider",FileField:"Fields.File",HeadingField:"Fields.Heading",ImageField:"Fields.Image",LinkField:"Fields.Link",MultiCheckSelect:"Fields.MultiCheckSelect",MultiCheckSelectGroup:"Fields.MultiCheckSelectGroup",NoteField:"Fields.Note",NumberField:"Fields.Number",RadioGroup:"Fields.RadioGroup",ReferenceField:"Fields.Reference",RichText:"Fields.RichText",Select:"Fields.Select",SliderField:"Fields.Slider",TagsField:"Fields.Tags",TextArea:"Fields.TextArea",TextField:"Fields.Text",TimeField:"Fields.Time",ToggleField:"Fields.Toggle",UniqueCheck:"Fields.UniqueCheck",UrlField:"Fields.Url",VisualUniqueSelection:"Fields.VisualUniqueSelection",Wysiwyg:"Fields.Wysiwyg"}[e]}const x=__dirname.includes("node_modules");function S(){const t=__dirname,n=x?"../../../":"../griddo-components";return e.resolve(b({cwd:t}),n)}function A(e,t,n,o){var i,r;const s=(null==o?void 0:o.interfaceSuffix)||a;if("FieldsDivider"===e.type)return"// FieldsDivider";if(null===(i=e._autoType)||void 0===i?void 0:i.ignore)return"// Ignored by AutoType.ignore";const{type:l,_autoType:p,key:c}=e,{hasDistributorData:u,getStaticData:d}=n;if(!l||!c)return"\n\t\t\t/** · (ノ-_-)ノ ミ ┴┴ You forgot to write the `type` | `key` or some mandatory prop */\n\t\t";if("DateField"===l||"FileField"===l||"ImageField"===l||"NoteField"===l||"NumberField"===l||"RichText"===l||"SliderField"===l||"TagsField"===l||"TextArea"===l||"TextField"===l||"TimeField"===l||"ToggleField"===l||"UniqueCheck"===l||"UrlField"===l||"Wysiwyg"===l)return j(e);if("MultiCheckSelect"===l){if("pageContentType"===t||"simpleContentType"===t){return j(e,{generic:`Relations, FromList, ${`${e.source}ContentTypeProps`}<false, false>, FromDistributor`})}return j(e,{generic:"true"})}if("AsyncCheckGroup"===l){if("pageContentType"===t||"simpleContentType"===t){return j(e,{generic:`Relations, FromList, ${`${e.source}ContentTypeProps`}<false, false>, FromDistributor`})}return j(e,{generic:"true"})}if("MultiCheckSelectGroup"===l){const t=e.elements.map((e=>`"${e.key}"`)).join("|");return j(e,{generic:[t,null===(r=e._autoType)||void 0===r?void 0:r.relations].join(",")})}if("ColorPicker"===l)return e.isThemePalette?j(e,{returnTypeName:"Fields.ColorPickerFixed"}):j(e);if("HeadingField"===l||"RadioGroup"===l||"Select"===l){const{options:t}=e,n=function(e){return e.map((({value:e})=>"string"==typeof e?`"${e}"`:e)).join("|")}(t);return j(e,{generic:n})}if("CheckGroup"===l){const{options:t}=e,n=function(e){return e.map((({name:e})=>"string"==typeof e?`"${e}"`:e)).join("|")}(t);return j(e,{generic:n})}if("LinkField"===l){const{whiteList:t}=e;return j(e,{generic:k(t,o)})}if("AsyncSelect"===l){if("entity"in e&&"menu_containers"===e.entity)return`\n${c}?: Menu`;if("pageContentType"===t||"simpleContentType"===t){return j(e,{generic:`Relations, FromList, ${`${e.source}ContentTypeProps`}<false, false>, FromDistributor`})}return`\n${c}?: Fields.AsyncSelect;`}if("FieldGroup"===l)return`\n\t\t\t// << ${l}\n\t\t\t${e.fields.map((e=>A(e,t,n))).join("")}\n\t\t\t// end >>\n\t\t`;if("ArrayFieldGroup"===l){return`\n\t\t\t\n${(null==p?void 0:p.doc)||""}\n${c}?: Fields.ArrayFieldGroup<{${e.fields.map((e=>A(e,t,n))).join(",")}}>\n\t\t`}if("ConditionalField"===l){const o=e.fields.map((e=>A(e,t,n))),i=(null==p?void 0:p.doc)||"",r="hideable"in e&&e.hideable,s=r?">":"";return`\n\t\t\t// << ${l}\n\t\t\t\n${i}\n${c}?: ${r?"Hideable<":""}${_(l)}<${e.options.map((e=>"string"==typeof e.value?`"${e.value}"`:e.value)).join("|")}>${s};\n\t\t\t${o.join("")}\n\t\t\t// end >>\n\t\t`}if("ComponentArray"===l){const o="template"===t||"pageContentType"===t?"TemplateSection":"ComponentArray",i="template"===t?"":"?",r=e,{key:l,_autoType:a,whiteList:p}=r,c=(null==a?void 0:a.doc)||"",u=(e,t,n)=>e.filter((e=>{if(e&&"schemaType"in e&&"module"===(null==e?void 0:e.schemaType))return(null==e?void 0:e.sectionList)&&!!(null==e?void 0:e.sectionList[t])})).map((e=>({t:null==e?void 0:e.sectionList[t].filter((e=>e===n)),m:null==e?void 0:e.component}))).filter((e=>{var t;return null===(t=null==e?void 0:e.t)||void 0===t?void 0:t.length})).map((e=>null==e?void 0:e.m)).filter(Boolean);let d="";"template"===t&&(d=u(n.moduleSchemas,n.schema.component,l).join("|"));return`\n${c}\n${l}${i}: Fields.${o}<${[...new Set([...d.split("|"),...p])].filter(Boolean).map((e=>`${e}${s}`)).join("|")}>;`}if("ComponentContainer"===l&&("object"===t||"component"===t||"module"===t||"template"===t||"pageContentType"===t)){const t=e,{whiteList:n}=t;return j(e,{generic:k(n,o)})}if("ReferenceField"===l){const t=e.sources||[{structuredData:void 0}],n=Array.isArray(t)&&t.map((e=>e.structuredData?`${e.structuredData}ContentType${s}`:"unknown")).join("|")||"";return`\n\t\t \t${j(e,{generic:n})}\n\t\t \t${u||d?`queriedItems?: Fields.QueriedData<${n}>;`:""}\n\t\t `}if("VisualUniqueSelection"===l){const t=e.options[0],n=e.options[0];let o="";if(t.value){o=e.options.map((e=>`"${e.value}"`)).join("|")}if(n.theme){o=e.options[0].options.map((e=>`"${e.value}"`)).join("|")}return j(e,{generic:o})}return console.warn(`The field ${e.type} has not been implemented yet ㅠ.ㅠ`),""}function w(e){return e?e.map((e=>A(e,"object",{hasDistributorData:!1,getStaticData:!1,moduleSchemas:[],schema:{}}))).join(""):""}function D(e,t){const n=(null==t?void 0:t.contentTypeSuffix)||"ContentType",o=(null==t?void 0:t.interfaceSuffix)||a,i=(null==t?void 0:t.publicApiSuffix)||"List",r=[],s=[],l=[];return`\n${e.map((t=>{var a;let p,c="",u="",d="",m="",y="",f="",g=!1,h=!1,$="";const{component:F}=t;f=(null===(a=t._autoType)||void 0===a?void 0:a.relations)||!1?"<Relations = unknown, FromList = unknown, FromDistributor = true>":"";const T=e.map((e=>{if("schemaType"in e&&"module"===e.schemaType)return e})).filter(Boolean);if("fromPage"in t){if(p=t.fromPage?"pageContentType":"simpleContentType",c=n,u=`__contentTypeName: "${t.component}";`,d=`__contentTypeKind: "${p}";`,"pageContentType"===p&&r.push(`"${t.component}"`),"simpleContentType"!==p||t.taxonomy||s.push(`"${t.component}"`),"simpleContentType"===p&&t.taxonomy&&l.push(`"${t.component}"`),"schema"in t){const e=t.schema.fields.map((e=>"source"in e&&(null==e?void 0:e.source))).filter(Boolean);m=e.length?`__relatedContentTypeNames: ${JSON.stringify(e)}`:""}f="<Relations = unknown, FromList = unknown, FromDistributor = true>",$=`\n\t\t\t\t/** Type to be consumed by public API: useList(), etc.. */\n\t\t\t\texport type ${F}${c}${i}${o}<R extends Core.ContentTypeRelations = false> = ${F}${c}${o}<R, true>;\n\t\t\t\t`}"schemaType"in t&&(p=t.schemaType,y=`component: "${F}";`,"template"!==t.schemaType&&"module"!==t.schemaType&&"component"!==t.schemaType||(g=t.default.hasDistributorData,h=t.default.getStaticData));const C="fromPage"in t&&!1===t.fromPage&&!0===t.taxonomy,v="schemaType"in t&&"template"===t.schemaType&&("list"===t.type.mode||"paginated-data"===t.type.mode),b=(j=[v?"Fields.ExtraListTemplateProps":""]).filter((e=>e.length)).length<1?"":`extends ${j.join(", ")}`;var j;const k=function(e){if("fromPage"in e)return e.taxonomy?[]:e.schema.fields;if("template"===e.schemaType)return[...e.content||[],...e.config||[]];if("component"===e.schemaType||"module"===e.schemaType)return e.configTabs.flatMap((e=>e.fields));throw new Error(`Wrong schema ${JSON.stringify(e,null,2)}`)}(t).map((e=>A(e,p,{hasDistributorData:g,getStaticData:h,moduleSchemas:T,schema:t}))).filter(Boolean).join("");return`\n\t\t\t\texport interface ${F}${c}${o}${f} ${b} {\n\t\t\t\t\t${u}\n\t\t\t\t\t${d}\n\t\t\t\t\t${m}\n\t\t\t\t\t${y}\n\t\t\t\t\t${k}\n\t\t\t\t\t${C?"title?: string; code?: string":""}\n\t\t\t\t}\n\t\t\t\t${$}\n\t\t\t\t`})).join("")}\n${r&&r.length?`export type PageContentTypes = ${r.join("|")};`:""}\n${s&&s.length?`export type SimpleContentTypes = ${s.join("|")};`:""}\n${l&&l.length?`export type TaxonomyContentTypes = ${l.join("|")};`:""}\n`}const L=e.join(S(),"griddo.config.ts"),P=require(L);!function(o,i,r,s,a,p,c,u,d){l(this,void 0,void 0,(function*(){var l,m;const y=(f=o,Object.keys(f).map((e=>Object.assign(Object.assign({},f[e]),{component:e}))));var f;const g=function(e){const t=[],n=[],o=[],i=[];for(let r=e.length,s=0;s<r;++s){const r=e[s];if("component"in r){const e=r.component;"component"===r.schemaType&&t.push(`"${e}"`),"module"===r.schemaType&&n.push(`"${e}"`),"template"===r.schemaType&&(o.push(`"${e}"`),"detail"===r.type.mode&&i.push(`"${e}"`))}}return`\n\t\t\n\t\texport type Components =\n\t\t\t${t.join("|")}\n\t\n\t\t\n\t\texport type Modules =\n\t\t\t${n.join("|")}\n\t\n\t\t\n\t\texport type Templates =\n\t\t\t${o.join("|")}\n\t\n\t\t\n\t\texport type DetailTemplates =\n\t\t\t${i.join("|")}\n\t\n\t`}(y),h=function(e){return`export type SectionList = { ${e.filter((e=>"schemaType"in e&&"template"===e.schemaType)).map((e=>{const t=e,n=t.content.filter((e=>"ComponentArray"===e.type)).map((({key:e})=>`"${e}"`)).filter(Boolean);return n&&(null==n?void 0:n.length)>0?`${t.component}?: NonEmptyArray<${n.join("|")}>;`:""})).join("")} }`}(y),$=D(y,d),F=null===(l=null==i?void 0:i.link)||void 0===l?void 0:l.fields,T=null===(m=null==i?void 0:i.group)||void 0===m?void 0:m.fields,C=`\n\t\texport interface InstanceMenuItems {\n\t\t\tlink:{\n\t\t\t\t${w(F)}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: "link";\n\t\t\t\t};\n\t\t\t};\n\t\t\tgroup: {\n\t\t\t\turl?: null;\n\t\t\t\t${w(T)}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: "group";\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\t\texport type LinkMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems["link"];\n\t\texport type GroupMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems["group"];\n\t\texport type MenuElement = LinkMenuElement | GroupMenuElement;\n\t\texport type Menu = Fields.Menu<InstanceMenuItems>;\n\t`,v=`\n\t\t// Type for the language schema\n\t\texport interface SiteLanguage {\n\t\t\tdomain: { id: number; url: string; slug: string };\n\t\t\thome: string;\n\t\t\tid: number;\n\t\t\tisDefault: boolean;\n\t\t\tlabel: ${Object.keys(r).map((e=>`"${r[e].label}"`)).join("|")};\n\t\t\tlanguage: ${Object.keys(r).map((e=>`"${r[e].name}"`)).join("|")};\n\t\t\tlocale: ${Object.keys(r).map((e=>`"${e}"`)).join("|")};\n\t\t\tpath: string;\n\t\t}\n\t`,b=s?`type ModuleCategories = ${s.map((e=>`"${e.value}"`)).join("|")}`:"",j=a?`type Datapacks = ${Object.keys(a).map((e=>`"${e}"`)).join("|")}`:"",k=p?`type DatapacksCategories = ${Object.keys(p).map((e=>`"${e}"`)).join("|")}`:"",_=`type AllTaxonomyContentTypeProps = ${function(e){return e.map((e=>{if("taxonomy"in e&&e.taxonomy)return`${e.component||""}ContentTypeProps`})).filter(Boolean).join("|")}(y)}`,x=`type AllPageContentTypeProps = ${function(e){return e.map((e=>{if("fromPage"in e&&!e.fromPage&&!e.taxonomy)return`${e.component||""}ContentTypeProps`})).filter(Boolean).join("|")}(y)}`,A=`type AllSimpleContentTypeProps = ${function(e){return e.map((e=>{if("fromPage"in e&&e.fromPage)return`${e.component||""}ContentTypeProps`})).filter(Boolean).join("|")}(y)}`,L=c?`type Themes = ${c.map((e=>`"${e.value}"`)).join("|")}`:"",P=u?`type Subthemes = ${u.map((e=>`"${e}"`)).join("|")}`:"",I=yield n.resolveConfigFile(),G=(yield n.resolveConfig(I))||{useTabs:!0},M=`\n\t\t/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\ \\\n// º / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;·;______ ) AutoTypes\n// O º, | , , \\ \\\\ ·..~~.·~.·\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' ⎩, <\\/\\ \\ \\\n// \\_/ /\\_____⎩/ > > >\n// '___' <_(_)__> / \\ <\n// / / ´ \\ | \\___//\\\\\n// / / | / > > \\\\\n// · ··~~~~·~·~~~~~~~·~··~~~~~·~·~~·~~~~·~~~~~·· · ·\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from "@griddo/core"\n//\n\n\t\t${C}\n\t\t${v}\n\t\t${$}\n\t\t${g}\n\t\t${h}\n\t\t${b}\n\t\t${j}\n\t\t${k}\n\t\t${_}\n\t\t${x}\n\t\t${A}\n\t\t${L}\n\t\t${P}\n\t\t`,E=Object.assign(Object.assign({},G),{parser:"typescript"}),R=(yield n.format(M,E)).replace(/^\s*\n/gm,"");t(`${e.join(S(),"autotypes.d.ts")}`,R,(e=>{if(e)throw e})),console.log("🤖 AutoTypes ✓")}))}(Object.assign(Object.assign(Object.assign({},P.schemas.all),P.schemas.templates),P.schemas.structuredData),P.schemas.menuItems,P.schemas.languages,P.moduleCategories,P.schemas.dataPacks,P.schemas.dataPacksCategories,P.themes,P.subthemes,P.autotypes);
2
- //# sourceMappingURL=autotypes-legacy.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"autotypes-legacy.js","sources":["../../../node_modules/tslib/tslib.es6.js","../src/functions/autotypes-legacy/ascii.ts","../src/functions/autotypes-legacy/constants.ts","../node_modules/camelcase/index.js","../node_modules/locate-path/index.js","../node_modules/find-up/index.js","../node_modules/pkg-dir/index.js","../src/functions/autotypes-legacy/utils.ts","../src/functions/autotypes-legacy/getTypeFromField.ts","../src/functions/autotypes-legacy/getMenuItemsProps.ts","../src/functions/autotypes-legacy/getTypesFromSchemas.ts","../src/functions/autotypes-legacy/index.ts","../src/functions/autotypes-legacy/main.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","/* eslint-disable no-useless-escape */\nconst HEAD_DESIGN = `/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\\\ \\\\\n// º / /\\\\ \\\\\n// ' / / \\\\ _>\n// ' _\\\\ \\\\__> \\\\__\n// ' O ( __;·;______ ) AutoTypes\n// O º, | , , \\\\ \\\\\\\\ ·..~~.·~.·\n// ,,, /| , , /\\\\ <\\\\\\\\\n// \\\\''\\\\-' ⎩, <\\\\/\\\\ \\\\ \\\\\n// \\\\_/ /\\\\_____⎩/ > > >\n// '___' <_(_)__> / \\\\ <\n// / / ´ \\\\ | \\\\___//\\\\\\\\\n// / / | / > > \\\\\\\\\n// · ··~~~~·~·~~~~~~~·~··~~~~~·~·~~·~~~~·~~~~~·· · ·\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from \"@griddo/core\"\n//\n`;\n\nconst FOOTER_DESIGN = `\n//\n// . + . . . . . . . ..\n// . . . *\n// . * . . . . . . + . +\n// . . . . + . . .\n// . . . . . . .\n// . . . . . +. + . *\n// + . . . .\n// . . . * . . . . + . .\n// + . . . + . .\n// . . + .+. . .\n// . . . + . . . . .\n// . . . . . . . . ! / +\n// * . . . + . . - O -\n// . . . + . . * . . / | . .\n// . + . . . .. + .\n// . . . . * . * . +.. . * +\n// . . . . . . . . + . . +\n//\n//\n// The beauty of a living thing is not the atoms that go into it,\n// but the way those atoms are put together\n//\n// Carl Sagan\n//\n`;\n\nexport { FOOTER_DESIGN, HEAD_DESIGN };\n","const TYPE_FILE_NAME = \"autotypes.d.ts\";\nconst INTERFACE_SUFFIX = \"Props\";\nconst CONTENT_TYPE_SUFFIX = \"ContentType\";\nconst PUBLIC_API_SUFFIX = \"List\";\n\nexport {\n\tTYPE_FILE_NAME,\n\tINTERFACE_SUFFIX,\n\tCONTENT_TYPE_SUFFIX,\n\tPUBLIC_API_SUFFIX,\n};\n","const UPPERCASE = /[\\p{Lu}]/u;\nconst LOWERCASE = /[\\p{Ll}]/u;\nconst LEADING_CAPITAL = /^[\\p{Lu}](?![\\p{Lu}])/gu;\nconst IDENTIFIER = /([\\p{Alpha}\\p{N}_]|$)/u;\nconst SEPARATORS = /[_.\\- ]+/;\n\nconst LEADING_SEPARATORS = new RegExp('^' + SEPARATORS.source);\nconst SEPARATORS_AND_IDENTIFIER = new RegExp(SEPARATORS.source + IDENTIFIER.source, 'gu');\nconst NUMBERS_AND_IDENTIFIER = new RegExp('\\\\d+' + IDENTIFIER.source, 'gu');\n\nconst preserveCamelCase = (string, toLowerCase, toUpperCase, preserveConsecutiveUppercase) => {\n\tlet isLastCharLower = false;\n\tlet isLastCharUpper = false;\n\tlet isLastLastCharUpper = false;\n\tlet isLastLastCharPreserved = false;\n\n\tfor (let index = 0; index < string.length; index++) {\n\t\tconst character = string[index];\n\t\tisLastLastCharPreserved = index > 2 ? string[index - 3] === '-' : true;\n\n\t\tif (isLastCharLower && UPPERCASE.test(character)) {\n\t\t\tstring = string.slice(0, index) + '-' + string.slice(index);\n\t\t\tisLastCharLower = false;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = true;\n\t\t\tindex++;\n\t\t} else if (isLastCharUpper && isLastLastCharUpper && LOWERCASE.test(character) && (!isLastLastCharPreserved || preserveConsecutiveUppercase)) {\n\t\t\tstring = string.slice(0, index - 1) + '-' + string.slice(index - 1);\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = false;\n\t\t\tisLastCharLower = true;\n\t\t} else {\n\t\t\tisLastCharLower = toLowerCase(character) === character && toUpperCase(character) !== character;\n\t\t\tisLastLastCharUpper = isLastCharUpper;\n\t\t\tisLastCharUpper = toUpperCase(character) === character && toLowerCase(character) !== character;\n\t\t}\n\t}\n\n\treturn string;\n};\n\nconst preserveConsecutiveUppercase = (input, toLowerCase) => {\n\tLEADING_CAPITAL.lastIndex = 0;\n\n\treturn input.replaceAll(LEADING_CAPITAL, match => toLowerCase(match));\n};\n\nconst postProcess = (input, toUpperCase) => {\n\tSEPARATORS_AND_IDENTIFIER.lastIndex = 0;\n\tNUMBERS_AND_IDENTIFIER.lastIndex = 0;\n\n\treturn input\n\t\t.replaceAll(NUMBERS_AND_IDENTIFIER, (match, pattern, offset) => ['_', '-'].includes(input.charAt(offset + match.length)) ? match : toUpperCase(match))\n\t\t.replaceAll(SEPARATORS_AND_IDENTIFIER, (_, identifier) => toUpperCase(identifier));\n};\n\nexport default function camelCase(input, options) {\n\tif (!(typeof input === 'string' || Array.isArray(input))) {\n\t\tthrow new TypeError('Expected the input to be `string | string[]`');\n\t}\n\n\toptions = {\n\t\tpascalCase: false,\n\t\tpreserveConsecutiveUppercase: false,\n\t\t...options,\n\t};\n\n\tif (Array.isArray(input)) {\n\t\tinput = input.map(x => x.trim())\n\t\t\t.filter(x => x.length)\n\t\t\t.join('-');\n\t} else {\n\t\tinput = input.trim();\n\t}\n\n\tif (input.length === 0) {\n\t\treturn '';\n\t}\n\n\tconst toLowerCase = options.locale === false\n\t\t? string => string.toLowerCase()\n\t\t: string => string.toLocaleLowerCase(options.locale);\n\n\tconst toUpperCase = options.locale === false\n\t\t? string => string.toUpperCase()\n\t\t: string => string.toLocaleUpperCase(options.locale);\n\n\tif (input.length === 1) {\n\t\tif (SEPARATORS.test(input)) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn options.pascalCase ? toUpperCase(input) : toLowerCase(input);\n\t}\n\n\tconst hasUpperCase = input !== toLowerCase(input);\n\n\tif (hasUpperCase) {\n\t\tinput = preserveCamelCase(input, toLowerCase, toUpperCase, options.preserveConsecutiveUppercase);\n\t}\n\n\tinput = input.replace(LEADING_SEPARATORS, '');\n\tinput = options.preserveConsecutiveUppercase ? preserveConsecutiveUppercase(input, toLowerCase) : toLowerCase(input);\n\n\tif (options.pascalCase) {\n\t\tinput = toUpperCase(input.charAt(0)) + input.slice(1);\n\t}\n\n\treturn postProcess(input, toUpperCase);\n}\n","import process from 'node:process';\nimport path from 'node:path';\nimport fs, {promises as fsPromises} from 'node:fs';\nimport {fileURLToPath} from 'node:url';\nimport pLocate from 'p-locate';\n\nconst typeMappings = {\n\tdirectory: 'isDirectory',\n\tfile: 'isFile',\n};\n\nfunction checkType(type) {\n\tif (Object.hasOwnProperty.call(typeMappings, type)) {\n\t\treturn;\n\t}\n\n\tthrow new Error(`Invalid type specified: ${type}`);\n}\n\nconst matchType = (type, stat) => stat[typeMappings[type]]();\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport async function locatePath(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t\tconcurrency,\n\t\tpreserveOrder,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fsPromises.stat : fsPromises.lstat;\n\n\treturn pLocate(paths, async path_ => {\n\t\ttry {\n\t\t\tconst stat = await statFunction(path.resolve(cwd, path_));\n\t\t\treturn matchType(type, stat);\n\t\t} catch {\n\t\t\treturn false;\n\t\t}\n\t}, {concurrency, preserveOrder});\n}\n\nexport function locatePathSync(\n\tpaths,\n\t{\n\t\tcwd = process.cwd(),\n\t\ttype = 'file',\n\t\tallowSymlinks = true,\n\t} = {},\n) {\n\tcheckType(type);\n\tcwd = toPath(cwd);\n\n\tconst statFunction = allowSymlinks ? fs.statSync : fs.lstatSync;\n\n\tfor (const path_ of paths) {\n\t\ttry {\n\t\t\tconst stat = statFunction(path.resolve(cwd, path_), {\n\t\t\t\tthrowIfNoEntry: false,\n\t\t\t});\n\n\t\t\tif (!stat) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (matchType(type, stat)) {\n\t\t\t\treturn path_;\n\t\t\t}\n\t\t} catch {}\n\t}\n}\n","import path from 'node:path';\nimport {fileURLToPath} from 'node:url';\nimport {locatePath, locatePathSync} from 'locate-path';\n\nconst toPath = urlOrPath => urlOrPath instanceof URL ? fileURLToPath(urlOrPath) : urlOrPath;\n\nexport const findUpStop = Symbol('findUpStop');\n\nexport async function findUpMultiple(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = path.resolve(directory, options.stopAt || root);\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = async locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePath(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = await name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePath([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\t// eslint-disable-next-line no-await-in-loop\n\t\tconst foundPath = await runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport function findUpMultipleSync(name, options = {}) {\n\tlet directory = path.resolve(toPath(options.cwd) || '');\n\tconst {root} = path.parse(directory);\n\tconst stopAt = options.stopAt || root;\n\tconst limit = options.limit || Number.POSITIVE_INFINITY;\n\tconst paths = [name].flat();\n\n\tconst runMatcher = locateOptions => {\n\t\tif (typeof name !== 'function') {\n\t\t\treturn locatePathSync(paths, locateOptions);\n\t\t}\n\n\t\tconst foundPath = name(locateOptions.cwd);\n\t\tif (typeof foundPath === 'string') {\n\t\t\treturn locatePathSync([foundPath], locateOptions);\n\t\t}\n\n\t\treturn foundPath;\n\t};\n\n\tconst matches = [];\n\t// eslint-disable-next-line no-constant-condition\n\twhile (true) {\n\t\tconst foundPath = runMatcher({...options, cwd: directory});\n\n\t\tif (foundPath === findUpStop) {\n\t\t\tbreak;\n\t\t}\n\n\t\tif (foundPath) {\n\t\t\tmatches.push(path.resolve(directory, foundPath));\n\t\t}\n\n\t\tif (directory === stopAt || matches.length >= limit) {\n\t\t\tbreak;\n\t\t}\n\n\t\tdirectory = path.dirname(directory);\n\t}\n\n\treturn matches;\n}\n\nexport async function findUp(name, options = {}) {\n\tconst matches = await findUpMultiple(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport function findUpSync(name, options = {}) {\n\tconst matches = findUpMultipleSync(name, {...options, limit: 1});\n\treturn matches[0];\n}\n\nexport {\n\tpathExists,\n\tpathExistsSync,\n} from 'path-exists';\n","import path from 'node:path';\nimport {findUp, findUpSync} from 'find-up';\n\nexport async function packageDirectory({cwd} = {}) {\n\tconst filePath = await findUp('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n\nexport function packageDirectorySync({cwd} = {}) {\n\tconst filePath = findUpSync('package.json', {cwd});\n\treturn filePath && path.dirname(filePath);\n}\n","import type {\n\tFieldReturnTypes,\n\tFields,\n\tSchemaFieldTypes,\n\tSchemaType,\n\tSchemaTypeWithComponentProp,\n} from \"./types\";\nimport type { Schema } from \"../..\";\nimport type { UITemplateFields } from \"../../types/schema-fields/ui-template-fields\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport path from \"path\";\n\nimport camelcase from \"camelcase\";\nimport { packageDirectorySync } from \"pkg-dir\";\n\nimport { INTERFACE_SUFFIX } from \"./constants\";\n\n/** Get all fields from one schema */\nfunction getAllFields(schema: SchemaType) {\n\t// ContentType\n\t// Simple, Page\n\tif (\"fromPage\" in schema) {\n\t\t// AutoTypes doesn't generate types from categories\n\t\tif (!schema.taxonomy) {\n\t\t\treturn schema.schema.fields;\n\t\t}\n\t\t// hack???\n\t\treturn [];\n\t}\n\n\t// Templates\n\tif (schema.schemaType === \"template\") {\n\t\tconst content = (schema.content as Array<UITemplateFields>) || [];\n\t\tconst config = (schema.config as Array<UITemplateFields>) || [];\n\t\treturn [...content, ...config];\n\t}\n\n\t// Objects, components and modules\n\tif (schema.schemaType === \"component\" || schema.schemaType === \"module\") {\n\t\treturn schema.configTabs.flatMap((tab) => tab.fields);\n\t}\n\n\tthrow new Error(`Wrong schema ${JSON.stringify(schema, null, 2)}`);\n}\n\n/** Build a interface prop based on the field from the schema.\n * Optionally it can receives a custom value for the type and a generic string to use as generic value\n *\n * @example\n * getInterfacePropType(TextFieldObjectFromSchema)\n * // -> TextFieldObjectFromSchema.key: Fields.TextField\n * getInterfacePropType(TextFieldObjectFromSchema, 'MyCustomValue', 'foo')\n * // -> TextFieldObjectFromSchema.key: MyCustomValue<foo>\n */\ntype GetInterfacePropTypeOptions = {\n\treturnTypeName?: FieldReturnTypes;\n\tgeneric?: string;\n};\n\n/**\n * Return a serialized type from a Griddo schema field.\n *\n * @param Fields A Griddo field object\n * @param options An options object\n * @returns A string that represent a interface prop type.\n * @example\n * interface SomeInterface {\n * \tprop: boolean; // this function returns a string for this: `prop: boolean`\n * }\n */\nfunction getInterfacePropType(\n\tfield: Fields,\n\toptions?: GetInterfacePropTypeOptions,\n) {\n\tconst { returnTypeName, generic } = options || {};\n\n\t// The field has `hideable: true`\n\tconst hasHideable = \"hideable\" in field ? Boolean(field.hideable) : false;\n\t// Generic part\n\tconst genericStr = generic ? `<${generic}>` : \"\";\n\t// The field type is from field.type prop or custom\n\tconst returnTypeNameStr = returnTypeName || returnType(field.type);\n\t// Field type with generic: field<generic>\n\tconst returnTypeNameWithGeneriStr = `${returnTypeNameStr}${genericStr}`;\n\t// Field type wrapped in Hideable helper type: Hideable<field<generic>>\n\tconst typeWrappedWithHideable = hasHideable\n\t\t? `Hideable<${returnTypeNameWithGeneriStr}>`\n\t\t: `${returnTypeNameWithGeneriStr}`;\n\n\t// JSDoc\n\tconst jsDocString = field._autoType?.doc || \"\";\n\t// prop?: Type\n\tconst typeString = `${field.key}?: ${typeWrappedWithHideable}`;\n\n\treturn `\n\t\t${jsDocString}\n\t\t${typeString}\n\t`;\n}\n\n/**\n * Return a string separated by the pipe char \"|\" using the `value` from object array.\n */\nfunction getGenericFromOptions<T = unknown>(options: Array<{ value: T }>) {\n\treturn options\n\t\t.map(({ value }) => (typeof value === \"string\" ? `\"${value}\"` : value))\n\t\t.join(\"|\");\n}\n\n/**\n * Return a string separated by the pipe char \"|\" using the `name` from object array.\n */\nfunction getGenericFromCheckBoxOptions<T>(options: Array<{ name: T }>) {\n\treturn options\n\t\t.map(({ name }) => (typeof name === \"string\" ? `\"${name}\"` : name))\n\t\t.join(\"|\");\n}\n\n// for components containers\n// whitelist.length = 1\n// whitelist.length > 1\nfunction getGenericFromWhitelist(\n\twhiteList: Array<string>,\n\tconfig?: AutoTypesConfig,\n) {\n\t// Config\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\n\tif (whiteList.length > 1) {\n\t\treturn `{\n\t\t\t${whiteList\n\t\t\t\t.map((whiteListItem) => {\n\t\t\t\t\treturn `${camelcase(\n\t\t\t\t\t\twhiteListItem,\n\t\t\t\t\t)}?: ${whiteListItem}${interfaceSuffix}`;\n\t\t\t\t})\n\t\t\t\t.join(\",\")}\n\t\t\t}`;\n\t}\n\n\t// Si solo hay un elemento\n\treturn whiteList.map((item) => `${item}${interfaceSuffix}`).join(\"\");\n}\n\n/**\n * Convert an object of schemas into an array of objects of these schemas.\n *\n * @example\n * input:\n * `schemas` is an object of schemas like so:\n *\t{\n *\t\tBasicContent: {\n *\t\t\tcomponent: \"BasicContent\",\n *\t\t\t...\n *\t\t},\n *\t\t...\n *\t}\n *\n * output:\n * [ {component: \"BasicContent\"}, {component: \"NewsTemplate\"}, ... ]\n */\nfunction schemasToArray(\n\tobjectSchemas: Record<string, SchemaType>,\n): Array<SchemaTypeWithComponentProp> {\n\treturn (Object.keys(objectSchemas) as Array<Capitalize<string>>).map(\n\t\t(componentName) => ({\n\t\t\t// This component prop is for the ContentType schemas,\n\t\t\t// ui schemas have already one.\n\t\t\t...objectSchemas[componentName],\n\t\t\tcomponent: componentName,\n\t\t}),\n\t);\n}\n\nfunction returnType(type: SchemaFieldTypes) {\n\tconst typeObj: Record<SchemaFieldTypes, FieldReturnTypes> = {\n\t\tArrayFieldGroup: \"Fields.ArrayFieldGroup\",\n\t\tAsyncCheckGroup: \"Fields.AsyncCheckGroup\",\n\t\tAsyncSelect: \"Fields.AsyncSelect\",\n\t\tCheckGroup: \"Fields.CheckGroup\",\n\t\tColorPicker: \"Fields.ColorPicker\",\n\t\tComponentArray: \"Fields.ComponentArray\",\n\t\tComponentContainer: \"Fields.ComponentContainer\",\n\t\tConditionalField: \"Fields.Conditional\",\n\t\tDateField: \"Fields.Date\",\n\t\tFieldGroup: \"Fields.FieldGroup\",\n\t\tFieldsDivider: \"Fields.FieldsDivider\",\n\t\tFileField: \"Fields.File\",\n\t\tHeadingField: \"Fields.Heading\",\n\t\tImageField: \"Fields.Image\",\n\t\tLinkField: \"Fields.Link\",\n\t\tMultiCheckSelect: \"Fields.MultiCheckSelect\",\n\t\tMultiCheckSelectGroup: \"Fields.MultiCheckSelectGroup\",\n\t\tNoteField: \"Fields.Note\",\n\t\tNumberField: \"Fields.Number\",\n\t\tRadioGroup: \"Fields.RadioGroup\",\n\t\tReferenceField: \"Fields.Reference\",\n\t\tRichText: \"Fields.RichText\",\n\t\tSelect: \"Fields.Select\",\n\t\tSliderField: \"Fields.Slider\",\n\t\tTagsField: \"Fields.Tags\",\n\t\tTextArea: \"Fields.TextArea\",\n\t\tTextField: \"Fields.Text\",\n\t\tTimeField: \"Fields.Time\",\n\t\tToggleField: \"Fields.Toggle\",\n\t\tUniqueCheck: \"Fields.UniqueCheck\",\n\t\tUrlField: \"Fields.Url\",\n\t\tVisualUniqueSelection: \"Fields.VisualUniqueSelection\",\n\t\tWysiwyg: \"Fields.Wysiwyg\",\n\t};\n\treturn typeObj[type];\n}\n\nfunction extendsType(types: Array<string>) {\n\treturn types.filter((typeStr) => typeStr.length).length < 1\n\t\t? \"\"\n\t\t: `extends ${types.join(\", \")}`;\n}\n\nfunction getPageContentTypesUnionType(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"fromPage\" in schema && schema.fromPage) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\nfunction getSimpleContentTypeUnionProps(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"fromPage\" in schema && !schema.fromPage && !schema.taxonomy) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\nfunction getTaxonomyContentTypesUnionType(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n) {\n\treturn schemas\n\t\t.map((schema) => {\n\t\t\tif (\"taxonomy\" in schema && schema.taxonomy) {\n\t\t\t\treturn `${schema.component || \"\"}ContentTypeProps`;\n\t\t\t}\n\t\t\treturn undefined;\n\t\t})\n\t\t.filter(Boolean)\n\t\t.join(\"|\");\n}\n\n/**\n * Get union types for components, modules and tempaltes like so:\n *\n * @example\n * type Components = \"ComponentA\" | \"ComponentB\"\n * type Modules = \"ModuleA\" | \"ModuleB\"\n * type Templates = \"TemplateA\" | \"TemplateB\"\n */\nfunction getElementsUnionType(schemas: Array<SchemaType>) {\n\tconst unionOfComponents = [];\n\tconst unionOfModules = [];\n\tconst unionOfTemplates = [];\n\tconst detailTemplates = [];\n\tfor (let length = schemas.length, i = 0; i < length; ++i) {\n\t\tconst schema = schemas[i];\n\t\t// `in` to narrow only schemas with `component` prop\n\t\tif (\"component\" in schema) {\n\t\t\tconst componentName = schema.component;\n\t\t\tif (schema.schemaType === \"component\") {\n\t\t\t\tunionOfComponents.push(`\"${componentName}\"`);\n\t\t\t}\n\t\t\tif (schema.schemaType === \"module\") {\n\t\t\t\tunionOfModules.push(`\"${componentName}\"`);\n\t\t\t}\n\t\t\tif (schema.schemaType === \"template\") {\n\t\t\t\tunionOfTemplates.push(`\"${componentName}\"`);\n\t\t\t\tif (schema.type.mode === \"detail\") {\n\t\t\t\t\tdetailTemplates.push(`\"${componentName}\"`);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\n\tconst ComponentsUnion = `\n\t\texport type Components =\n\t\t\t${unionOfComponents.join(\"|\")}\n\t`;\n\n\tconst ModulesUnion = `\n\t\texport type Modules =\n\t\t\t${unionOfModules.join(\"|\")}\n\t`;\n\n\tconst TemplatesUnion = `\n\t\texport type Templates =\n\t\t\t${unionOfTemplates.join(\"|\")}\n\t`;\n\n\tconst DetailTemplatesUnion = `\n\t\texport type DetailTemplates =\n\t\t\t${detailTemplates.join(\"|\")}\n\t`;\n\n\treturn `\n\t\t${ComponentsUnion}\n\t\t${ModulesUnion}\n\t\t${TemplatesUnion}\n\t\t${DetailTemplatesUnion}\n\t`;\n}\n\n/**\n * Lista de templates y sus secciones\n * Esto es algo que se usa en los schemas de Griddo. Es como el inverso a un\n * whitelist donde indicamos en qué secciones de qué templates puede\n * aparecer un módulo.\n */\nfunction getSectionList(schemas: Array<SchemaType>) {\n\tconst names = schemas\n\t\t.filter((schema) => {\n\t\t\tif (\"schemaType\" in schema) {\n\t\t\t\treturn schema.schemaType === \"template\";\n\t\t\t}\n\t\t\treturn false;\n\t\t})\n\t\t.map((schema) => {\n\t\t\tconst templateSchema = schema as Schema.Template;\n\t\t\tconst sectionNames = templateSchema.content\n\t\t\t\t.filter((field) => field.type === \"ComponentArray\")\n\t\t\t\t.map(({ key }) => `\"${key}\"`)\n\t\t\t\t.filter(Boolean);\n\t\t\treturn sectionNames && sectionNames?.length > 0\n\t\t\t\t? `${templateSchema.component}?: NonEmptyArray<${sectionNames.join(\n\t\t\t\t\t\t\"|\",\n\t\t\t\t\t)}>;`\n\t\t\t\t: \"\";\n\t\t})\n\t\t.join(\"\");\n\n\treturn `export type SectionList = { ${names} }`;\n}\n\nconst IS_COMPONENT_LIBRARY = __dirname.includes(\"node_modules\");\n\n/**\n * Returns the instance or monorepo paths.\n *\n * @param customPath The path for the instance components\n */\nfunction resolveComponentsPath() {\n\tconst cwd = __dirname;\n\tconst componentsPath = IS_COMPONENT_LIBRARY\n\t\t? \"../../../\"\n\t\t: \"../griddo-components\";\n\n\treturn path.resolve(packageDirectorySync({ cwd }), componentsPath);\n}\n\nexport {\n\textendsType,\n\tgetAllFields,\n\tgetElementsUnionType,\n\tgetGenericFromCheckBoxOptions,\n\tgetGenericFromOptions,\n\tgetGenericFromWhitelist,\n\tgetInterfacePropType,\n\tgetPageContentTypesUnionType,\n\tgetSectionList,\n\tgetSimpleContentTypeUnionProps,\n\tgetTaxonomyContentTypesUnionType,\n\tresolveComponentsPath,\n\treturnType,\n\tschemasToArray,\n};\n","/* eslint-disable @typescript-eslint/no-explicit-any */\nimport type { KindSchema, SchemaTypeWithComponentProp } from \"./types\";\nimport type * as PageContentType_Fields from \"../../types/schema-fields/page-content-type-fields\";\nimport type { PageContentTypeFields } from \"../../types/schema-fields/page-content-type-fields\";\nimport type {\n\tThemeVisualUniqueSelection,\n\tThumbnailOption,\n} from \"../../types/schema-fields/props\";\nimport type { SimpleContentTypeFields } from \"../../types/schema-fields/simple-content-type-fields\";\nimport type * as UI_Fields from \"../../types/schema-fields/ui-fields\";\nimport type { UIFields } from \"../../types/schema-fields/ui-fields\";\nimport type { UITemplateFields } from \"../../types/schema-fields/ui-template-fields\";\nimport type { Module } from \"../../types/schemas\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport { INTERFACE_SUFFIX } from \"./constants\";\nimport {\n\tgetGenericFromCheckBoxOptions,\n\tgetGenericFromOptions,\n\tgetGenericFromWhitelist,\n\tgetInterfacePropType,\n\treturnType,\n} from \"./utils\";\n\n/**\n * Return a property with a Griddo type (serialized) based on a schema field.\n *\n * @param field A Griddo field object\n * @param kind Schema type in order to later do some operations with fields\n * @param options Object options\n * @example\n * { type: 'TextField', key: 'name' } => \"name?: Fields.Text\"\n * { type: 'UrlField', key: 'image' } => \"name?: Fields.Url\"\n */\nfunction getTypeFromField(\n\tfield:\n\t\t| UIFields\n\t\t| UITemplateFields\n\t\t| SimpleContentTypeFields\n\t\t| PageContentTypeFields,\n\tkind: KindSchema,\n\toptions: {\n\t\thasDistributorData: boolean;\n\t\tgetStaticData: boolean;\n\t\tmoduleSchemas: Array<Module | undefined>;\n\t\tschema: SchemaTypeWithComponentProp;\n\t},\n\tconfig?: AutoTypesConfig,\n): string | undefined {\n\t// Config\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\n\t//\n\t// Ignore - Bypass\n\t//\n\t// Empezamos ignorando ciertos fields que no necesitamos que generen types\n\t// aunque estén en los schemas. De esta manera los quitamos del proceso en\n\t// primera instancia y evitamos errores en los types de esta función.\n\tif (field.type === \"FieldsDivider\") {\n\t\treturn \"// FieldsDivider\";\n\t}\n\n\t// Ignore type generation from schema _autoType prop\n\tif (field._autoType?.ignore) {\n\t\treturn \"// Ignored by AutoType.ignore\";\n\t}\n\n\t//\n\t// Go!\n\t//\n\tconst { type, _autoType, key } = field;\n\tconst { hasDistributorData, getStaticData } = options;\n\n\t// If the field is missing the prop key or type, return an \"error\" string.\n\tif (!type || !key) {\n\t\treturn `\n\t\t\t/** · (ノ-_-)ノ ミ ┴┴ You forgot to write the \\`type\\` | \\`key\\` or some mandatory prop */\n\t\t`;\n\t}\n\n\t// Simple fields\n\t// { type: \"TextField\", key: \"foo\" } --> \"foo?: Fields.Text\"\n\tif (\n\t\ttype === \"DateField\" ||\n\t\ttype === \"FileField\" ||\n\t\ttype === \"ImageField\" ||\n\t\ttype === \"NoteField\" ||\n\t\ttype === \"NumberField\" ||\n\t\ttype === \"RichText\" ||\n\t\ttype === \"SliderField\" ||\n\t\ttype === \"TagsField\" ||\n\t\ttype === \"TextArea\" ||\n\t\ttype === \"TextField\" ||\n\t\ttype === \"TimeField\" ||\n\t\ttype === \"ToggleField\" ||\n\t\ttype === \"UniqueCheck\" ||\n\t\ttype === \"UrlField\" ||\n\t\ttype === \"Wysiwyg\"\n\t) {\n\t\treturn getInterfacePropType(field);\n\t}\n\n\t// MultiCheckSelect\n\t// { type: \"MultiCheckSelect\", key: \"foo\" } --> \"foo?: Fields.MultiCheckSelectGroup<Relations, true>\"\n\tif (type === \"MultiCheckSelect\") {\n\t\t// - MultiCheckSelect in a ContentType schema (page or simple)\n\t\t//\n\t\t// Cuando está dentro de un ContentType el field devuelve cosas\n\t\t// distintas a cuando está dentro de un schema de UI y tiene en cuenta:\n\t\t// - Si está siendo requerido por API pública (useList)\n\t\t// - Si tiene relations\n\t\t// - Se añade el contentType relacionado para poder hacera autocomplete\n\t\tif (kind === \"pageContentType\" || kind === \"simpleContentType\") {\n\t\t\tconst relationData = `${field.source}ContentTypeProps`;\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\tgeneric: `Relations, FromList, ${relationData}<false, false>, FromDistributor`,\n\t\t\t});\n\t\t}\n\n\t\t// - Rest of schemas\n\t\t//\n\t\t// { type: \"MultiCheckSelect\", key: \"foo\" } --> \"foo?: Fields.MultiCheckSelectGroup<Relations>\"\n\t\treturn getInterfacePropType(field, {\n\t\t\tgeneric: \"true\",\n\t\t});\n\t}\n\n\t// AsyncCheckGroup\n\t// Duplicate from MultiCheckSelect\n\tif (type === \"AsyncCheckGroup\") {\n\t\tif (kind === \"pageContentType\" || kind === \"simpleContentType\") {\n\t\t\tconst relationData = `${field.source}ContentTypeProps`;\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\tgeneric: `Relations, FromList, ${relationData}<false, false>, FromDistributor`,\n\t\t\t});\n\t\t}\n\n\t\treturn getInterfacePropType(field, {\n\t\t\tgeneric: \"true\",\n\t\t});\n\t}\n\n\t// MultiCheckSelectGroup\n\t// { type: \"MultiCheckSelectGroup\", key: \"foo\" } --> \"foo?: Fields.MultiCheckSelectGroup<>\"\n\tif (type === \"MultiCheckSelectGroup\") {\n\t\tconst keys = field.elements.map((element) => `\"${element.key}\"`).join(\"|\");\n\t\tconst relations = field._autoType?.relations;\n\t\tconst generic = [keys, relations].join(\",\");\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// ColorPicker\n\t// { type: \"ColorPickerFixed\", key: \"foo\" } --> \"foo?: Fields.ColorPickerFixed<>\"\n\tif (type === \"ColorPicker\") {\n\t\tif (field.isThemePalette) {\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\treturnTypeName: \"Fields.ColorPickerFixed\",\n\t\t\t});\n\t\t}\n\n\t\treturn getInterfacePropType(field);\n\t}\n\n\t// HeadingField, RadioGroup, Select\n\t// Generic from options.values\n\t// { type: \"HeadingField\", key: \"foo\" } --> \"foo?: Fields.Heading<>\"\n\tif (type === \"HeadingField\" || type === \"RadioGroup\" || type === \"Select\") {\n\t\tconst { options } = field;\n\t\tconst generic = getGenericFromOptions(options);\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// CheckGroup\n\t// Generic from options.name\n\t// { type: \"CheckGroup\", key: \"foo\" } --> \"Fields.CheckGroup<>\n\tif (type === \"CheckGroup\") {\n\t\tconst { options } = field;\n\t\tconst generic = getGenericFromCheckBoxOptions(options);\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// LinkField\n\t// Generic from whitelist\n\t// type === \"LinkField\" --> key: Fields.Link<{video:Video, image:Image}>\n\tif (type === \"LinkField\") {\n\t\tconst { whiteList } = field;\n\t\tconst generic = getGenericFromWhitelist(whiteList as Array<string>, config);\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\t// AsyncSelect\n\t// { type: \"AsyncSelect\", key: \"foo\" } --> \"foo?: Fields.{AsyncSelectType}\"\n\t// TODO: waiting for the field documentation\n\tif (type === \"AsyncSelect\") {\n\t\t// Entities\n\t\tif (\"entity\" in field) {\n\t\t\t// Menu\n\t\t\tif (field.entity === \"menu_containers\") {\n\t\t\t\treturn `\\n${key}?: Menu`;\n\t\t\t}\n\t\t\t// // Pages\n\t\t\t// if (field.entity === \"sites\") {\n\t\t\t// \treturn `${key}?: Fields.Menu;`;\n\t\t\t// }\n\t\t\t// // Sites\n\t\t\t// if (field.entity === \"pages\") {\n\t\t\t// \treturn `${key}?: Fields.Menu;`;\n\t\t\t// }\n\t\t}\n\n\t\tif (kind === \"pageContentType\" || kind === \"simpleContentType\") {\n\t\t\tconst relationData = `${field.source}ContentTypeProps`;\n\t\t\treturn getInterfacePropType(field, {\n\t\t\t\tgeneric: `Relations, FromList, ${relationData}<false, false>, FromDistributor`,\n\t\t\t});\n\t\t}\n\n\t\treturn `\\n${key}?: Fields.AsyncSelect;`;\n\t}\n\n\t// FieldGroup\n\t// { type: \"FieldGroup\", key: \"foo\" } --> \"foo?: Fields.???\"\n\t// <Recursive>\n\tif (type === \"FieldGroup\") {\n\t\treturn `\n\t\t\t// << ${type}\n\t\t\t${field.fields.map((field) => getTypeFromField(field, kind, options)).join(\"\")}\n\t\t\t// end >>\n\t\t`;\n\t}\n\n\t// ArrayFieldGroup\n\tif (type === \"ArrayFieldGroup\") {\n\t\tconst doc = _autoType?.doc || \"\";\n\n\t\treturn `\n\t\t\t\\n${doc}\\n${key}?: Fields.ArrayFieldGroup<{${field.fields\n\t\t\t\t.map((childField) => getTypeFromField(childField, kind, options))\n\t\t\t\t.join(\",\")}}>\n\t\t`;\n\t}\n\n\t// ConditionalField\n\t// <Recursive>\n\tif (type === \"ConditionalField\") {\n\t\tconst conditionalChildrenFields = field.fields.map((field) => {\n\t\t\treturn getTypeFromField(field, kind, options);\n\t\t});\n\t\tconst doc = _autoType?.doc || \"\";\n\t\tconst conditionalHasHideable = \"hideable\" in field ? field.hideable : false;\n\t\tconst startHideable = conditionalHasHideable ? \"Hideable<\" : \"\";\n\t\tconst endHideable = conditionalHasHideable ? \">\" : \"\";\n\n\t\treturn `\n\t\t\t// << ${type}\n\t\t\t\\n${doc}\\n${key}?: ${startHideable}${returnType(type)}<${field.options\n\t\t\t\t.map((option) => {\n\t\t\t\t\treturn typeof option.value === \"string\"\n\t\t\t\t\t\t? `\"${option.value}\"`\n\t\t\t\t\t\t: option.value;\n\t\t\t\t})\n\t\t\t\t.join(\"|\")}>${endHideable};\n\t\t\t${conditionalChildrenFields.join(\"\")}\n\t\t\t// end >>\n\t\t`;\n\t}\n\n\t// ComponentArray\n\t// <Complex>\n\tif (type === \"ComponentArray\") {\n\t\t// El type de Griddo es dinstinto para un ComponentArray si este está\n\t\t// dentro de un template.\n\t\tconst returnTypeName =\n\t\t\tkind === \"template\" || kind === \"pageContentType\"\n\t\t\t\t? \"TemplateSection\"\n\t\t\t\t: \"ComponentArray\";\n\n\t\tconst optional = kind === \"template\" ? \"\" : \"?\";\n\n\t\t// Type assertion, el field ComponentArray solo puede ser UI o Page\n\t\tconst fieldCasted = field as\n\t\t\t| UI_Fields.ComponentArray\n\t\t\t| PageContentType_Fields.ComponentArray;\n\n\t\tconst { key, _autoType, whiteList } = fieldCasted;\n\t\tconst doc = _autoType?.doc || \"\";\n\n\t\t// TODO: Research to compute this with type itself.\n\t\t// SHAME: Remove anys!!\n\t\tconst getModulesFromTemplateSectionList = (\n\t\t\tmodules: Array<Module | undefined>,\n\t\t\ttemplateName: string,\n\t\t\ttemplateSection: string,\n\t\t): Array<Module | undefined> => {\n\t\t\treturn modules\n\t\t\t\t.filter((entry: any) => {\n\t\t\t\t\tif (\n\t\t\t\t\t\tentry &&\n\t\t\t\t\t\t\"schemaType\" in entry &&\n\t\t\t\t\t\tentry?.schemaType === \"module\"\n\t\t\t\t\t) {\n\t\t\t\t\t\treturn entry?.sectionList && !!entry?.sectionList[templateName];\n\t\t\t\t\t}\n\n\t\t\t\t\treturn undefined;\n\t\t\t\t})\n\t\t\t\t.map((entry: any) => {\n\t\t\t\t\treturn {\n\t\t\t\t\t\tt: entry?.sectionList[templateName].filter(\n\t\t\t\t\t\t\t(s: any) => s === templateSection,\n\t\t\t\t\t\t),\n\t\t\t\t\t\tm: entry?.component,\n\t\t\t\t\t};\n\t\t\t\t})\n\t\t\t\t.filter((entry: any) => entry?.t?.length)\n\t\t\t\t.map((entry: any) => entry?.m)\n\t\t\t\t.filter(Boolean);\n\t\t};\n\n\t\t// BasicTemplate -> mainSection\n\t\tlet modulesInSectionLists = \"\";\n\t\tif (kind === \"template\") {\n\t\t\tmodulesInSectionLists = getModulesFromTemplateSectionList(\n\t\t\t\toptions.moduleSchemas,\n\t\t\t\toptions.schema.component,\n\t\t\t\tkey,\n\t\t\t).join(\"|\");\n\t\t}\n\n\t\t// 1 - Mix whitelist and sectionList\n\t\t// 2 - Remove duplicate modules due to mixing between sectionList and whiteList\n\t\tconst everyModuleInTemplateSection = [\n\t\t\t...new Set([...modulesInSectionLists.split(\"|\"), ...whiteList]),\n\t\t].filter(Boolean);\n\n\t\treturn `\\n${doc}\\n${key}${optional}: Fields.${returnTypeName}<${everyModuleInTemplateSection\n\t\t\t.map((component) => `${component}${interfaceSuffix}`)\n\t\t\t.join(\"|\")}>;`;\n\t}\n\n\t// ComponentContainer\n\t// <Complex>\n\tif (type === \"ComponentContainer\") {\n\t\t// UI\n\t\tif (\n\t\t\tkind === \"object\" ||\n\t\t\tkind === \"component\" ||\n\t\t\tkind === \"module\" ||\n\t\t\tkind === \"template\" ||\n\t\t\tkind === \"pageContentType\"\n\t\t) {\n\t\t\tconst FieldCasted = field as UI_Fields.ComponentContainer;\n\t\t\tconst { whiteList } = FieldCasted;\n\n\t\t\tconst generic = getGenericFromWhitelist(\n\t\t\t\twhiteList as Array<string>,\n\t\t\t\tconfig,\n\t\t\t);\n\n\t\t\treturn getInterfacePropType(field, { generic });\n\t\t}\n\t}\n\n\t// ReferenceField\n\t// TODO: Create correct generic using from/key values\n\tif (type === \"ReferenceField\") {\n\t\tconst sources = field.sources || [{ structuredData: undefined }];\n\t\tconst generic =\n\t\t\t(Array.isArray(sources) &&\n\t\t\t\tsources\n\t\t\t\t\t.map((item) =>\n\t\t\t\t\t\titem.structuredData\n\t\t\t\t\t\t\t? `${item.structuredData}ContentType${interfaceSuffix}`\n\t\t\t\t\t\t\t: \"unknown\",\n\t\t\t\t\t)\n\t\t\t\t\t.join(\"|\")) ||\n\t\t\t\"\";\n\t\tconst referenceField = getInterfacePropType(field, { generic });\n\t\tconst queriedItems =\n\t\t\thasDistributorData || getStaticData\n\t\t\t\t? `queriedItems?: Fields.QueriedData<${generic}>;`\n\t\t\t\t: \"\";\n\n\t\treturn `\n\t\t \t${referenceField}\n\t\t \t${queriedItems}\n\t\t `;\n\n\t\t// const { source } = field;\n\t\t// const generic = source\n\t\t// \t.map((item) => `${item}ContentType${interfaceSuffix}`)\n\t\t// \t.join(\"|\");\n\t\t// const referenceField = getInterfacePropType(field, { generic });\n\t\t// const queriedItems = hasDistributorData\n\t\t// \t? `queriedItems?: Fields.QueriedData<${generic}>;`\n\t\t// \t: \"\";\n\n\t\t// return `\n\t\t// \t${referenceField}\n\t\t// \t${queriedItems}\n\t\t// `;\n\t}\n\n\t// VisualUniqueSelection\n\tif (type === \"VisualUniqueSelection\") {\n\t\tconst withValue = field.options[0] as ThumbnailOption;\n\t\tconst withTheme = field.options[0] as ThemeVisualUniqueSelection;\n\t\tlet generic = \"\";\n\n\t\t// ThumbnailOption\n\t\tif (withValue.value) {\n\t\t\tconst all = field.options as Array<ThumbnailOption>;\n\t\t\tgeneric = all.map((item) => `\"${item.value}\"`).join(\"|\");\n\t\t}\n\n\t\t// ThemeVisualUniqueSelection\n\t\tif (withTheme.theme) {\n\t\t\tconst all = field.options as Array<ThemeVisualUniqueSelection>;\n\t\t\tgeneric = all[0].options.map((i) => `\"${i.value}\"`).join(\"|\");\n\t\t}\n\n\t\treturn getInterfacePropType(field, { generic });\n\t}\n\n\tconsole.warn(`The field ${field.type} has not been implemented yet ㅠ.ㅠ`);\n\n\treturn \"\";\n\n\t// throw new Error(`Wrong schema field! ${JSON.stringify(field, null, 2)}`);\n}\n\nexport { getTypeFromField };\n","import type { Fields, SchemaTypeWithComponentProp } from \"./types\";\n\nimport { getTypeFromField } from \"./getTypeFromField\";\n\nfunction getMenuItemsProps(fields?: Array<Fields>) {\n\tif (!fields) {\n\t\treturn \"\";\n\t}\n\n\treturn fields\n\t\t.map((field) =>\n\t\t\tgetTypeFromField(field, \"object\", {\n\t\t\t\thasDistributorData: false,\n\t\t\t\tgetStaticData: false,\n\t\t\t\tmoduleSchemas: [],\n\t\t\t\tschema: {} as SchemaTypeWithComponentProp,\n\t\t\t}),\n\t\t)\n\t\t.join(\"\");\n}\n\nexport { getMenuItemsProps };\n","import type { KindSchema, SchemaTypeWithComponentProp } from \"./types\";\nimport type { Module } from \"../../types/schemas\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\n\nimport {\n\tCONTENT_TYPE_SUFFIX,\n\tINTERFACE_SUFFIX,\n\tPUBLIC_API_SUFFIX,\n} from \"./constants\";\nimport { getTypeFromField } from \"./getTypeFromField\";\nimport { extendsType, getAllFields } from \"./utils\";\n\n/**\n * Return an interface for every schema in the prop schemas.\n *\n * @example\n * interface SchemaProps {\n * \t\tschemaFieldKey: apiResponsveFieldType\n * \t\ttitle: Fields.Heading\n *\t\titemsPerPage: Fields.Number\n *\t\t...\n * }\n */\nfunction getTypesFromSchemas(\n\tschemas: Array<SchemaTypeWithComponentProp>,\n\tconfig?: AutoTypesConfig,\n) {\n\t// Config\n\tconst contentTypeSuffix = config?.contentTypeSuffix || CONTENT_TYPE_SUFFIX;\n\tconst interfaceSuffix = config?.interfaceSuffix || INTERFACE_SUFFIX;\n\tconst publicApiSuffix = config?.publicApiSuffix || PUBLIC_API_SUFFIX;\n\n\t// ContentType names list\n\tconst contentTypePageListNames: Array<string> = [];\n\tconst contentTypeSimpleListNames: Array<string> = [];\n\tconst contentTypeTaxonomyListNames: Array<string> = [];\n\n\t// Map over every schema\n\tconst autoTypesSchemas = schemas\n\t\t.map((schema) => {\n\t\t\tlet kind: KindSchema;\n\t\t\tlet contentTypeSuffixStr = \"\";\n\t\t\tlet contentTypeName = \"\";\n\t\t\tlet contentTypeKind = \"\";\n\t\t\tlet relatedContentTypeNames = \"\";\n\t\t\tlet componentName = \"\";\n\t\t\tlet relationsGeneric = \"\";\n\t\t\tlet hasDistributorData = false;\n\t\t\tlet getStaticData = false;\n\t\t\tlet interfaceForPublicAPI = \"\";\n\n\t\t\tconst { component } = schema;\n\t\t\tconst hasRelations = schema._autoType?.relations || false;\n\n\t\t\t// Si el schema va a tener un field al que se le pueda pasar un\n\t\t\t// relations este es pasado por un genérico en la `interface` que se\n\t\t\t// pondrá si `schema._autoType === true`.\n\t\t\trelationsGeneric = hasRelations\n\t\t\t\t? \"<Relations = unknown, FromList = unknown, FromDistributor = true>\"\n\t\t\t\t: \"\";\n\n\t\t\t// Array of module schemas\n\t\t\tconst MODULE_SCHEMAS: Array<Module | undefined> = schemas\n\t\t\t\t.map((schema) => {\n\t\t\t\t\tif (\"schemaType\" in schema && schema.schemaType === \"module\") {\n\t\t\t\t\t\treturn schema;\n\t\t\t\t\t}\n\t\t\t\t\treturn undefined;\n\t\t\t\t})\n\t\t\t\t.filter(Boolean);\n\n\t\t\t//\n\t\t\t// ContentType schema\n\t\t\t//\n\t\t\tif (\"fromPage\" in schema) {\n\t\t\t\tkind = schema.fromPage ? \"pageContentType\" : \"simpleContentType\";\n\t\t\t\tcontentTypeSuffixStr = contentTypeSuffix;\n\t\t\t\tcontentTypeName = `__contentTypeName: \"${schema.component}\";`;\n\t\t\t\tcontentTypeKind = `__contentTypeKind: \"${kind}\";`;\n\n\t\t\t\t// Add page ContentType name to the array\n\t\t\t\tif (kind === \"pageContentType\") {\n\t\t\t\t\tcontentTypePageListNames.push(`\"${schema.component}\"`);\n\t\t\t\t}\n\t\t\t\t// Add simple ContentType name to the array\n\t\t\t\tif (kind === \"simpleContentType\" && !schema.taxonomy) {\n\t\t\t\t\tcontentTypeSimpleListNames.push(`\"${schema.component}\"`);\n\t\t\t\t}\n\t\t\t\t// Add taxonomy (category) ContentType name to the array\n\t\t\t\tif (kind === \"simpleContentType\" && schema.taxonomy) {\n\t\t\t\t\tcontentTypeTaxonomyListNames.push(`\"${schema.component}\"`);\n\t\t\t\t}\n\n\t\t\t\tif (\"schema\" in schema) {\n\t\t\t\t\tconst relatedContentTypeNamesValues = schema.schema.fields\n\t\t\t\t\t\t.map((field) => {\n\t\t\t\t\t\t\tif (\"source\" in field) {\n\t\t\t\t\t\t\t\treturn field?.source;\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t})\n\t\t\t\t\t\t.filter(Boolean);\n\n\t\t\t\t\trelatedContentTypeNames = relatedContentTypeNamesValues.length\n\t\t\t\t\t\t? `__relatedContentTypeNames: ${JSON.stringify(\n\t\t\t\t\t\t\t\trelatedContentTypeNamesValues,\n\t\t\t\t\t\t\t)}`\n\t\t\t\t\t\t: \"\";\n\t\t\t\t}\n\n\t\t\t\t// En el caso de los schemas de ContentType se pondrá siempre el\n\t\t\t\t// genérico a unknown para así poder pasarle el relations en el\n\t\t\t\t// componente de React, por ejemplo cuando se utilice el Type en\n\t\t\t\t// un hook como `useContentType`\n\t\t\t\t// `useList<AutoTypes.MEMBERContentType<true>>()`\n\t\t\t\t// ^\n\t\t\t\t// relations\n\t\t\t\trelationsGeneric =\n\t\t\t\t\t\"<Relations = unknown, FromList = unknown, FromDistributor = true>\";\n\n\t\t\t\tinterfaceForPublicAPI = `\n\t\t\t\t/** Type to be consumed by public API: useList(), etc.. */\n\t\t\t\texport type ${component}${contentTypeSuffixStr}${publicApiSuffix}${interfaceSuffix}<R extends Core.ContentTypeRelations = false> = ${component}${contentTypeSuffixStr}${interfaceSuffix}<R, true>;\n\t\t\t\t`;\n\t\t\t}\n\n\t\t\t//\n\t\t\t// UI schema - ALL\n\t\t\t// set:\n\t\t\t// kind, componentName and hasDistributorData/getStaticData\n\t\t\tif (\"schemaType\" in schema) {\n\t\t\t\tkind = schema.schemaType;\n\t\t\t\tcomponentName = `component: \"${component}\";`;\n\n\t\t\t\t// Handle hasDistributorData/getStaticData to create the prop/type queriedData\n\t\t\t\t// automatically.\n\t\t\t\tif (\n\t\t\t\t\tschema.schemaType === \"template\" ||\n\t\t\t\t\tschema.schemaType === \"module\" ||\n\t\t\t\t\tschema.schemaType === \"component\"\n\t\t\t\t) {\n\t\t\t\t\thasDistributorData = schema.default.hasDistributorData as boolean;\n\t\t\t\t\tgetStaticData = schema.default.getStaticData as boolean;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t//\n\t\t\t// Is a Category (Simple ContentType) interface\n\t\t\t// TODO: Total SHAME!\n\t\t\tconst isACategoryInterface =\n\t\t\t\t\"fromPage\" in schema &&\n\t\t\t\tschema.fromPage === false &&\n\t\t\t\tschema.taxonomy === true;\n\n\t\t\t//\n\t\t\t// UI Schemas - List templates\n\t\t\t// This kind of templates return several extra properties from the build phase.\n\t\t\t//\n\t\t\tconst isListTemplate =\n\t\t\t\t\"schemaType\" in schema &&\n\t\t\t\tschema.schemaType === \"template\" &&\n\t\t\t\t(schema.type.mode === \"list\" || schema.type.mode === \"paginated-data\");\n\n\t\t\tconst extraListTemplateProps = isListTemplate\n\t\t\t\t? \"Fields.ExtraListTemplateProps\"\n\t\t\t\t: \"\";\n\n\t\t\t//\n\t\t\t// Extra extends for the final interface\n\t\t\t//\n\t\t\tconst extendsString = extendsType([extraListTemplateProps]);\n\n\t\t\t//\n\t\t\t// Props for the interface\n\t\t\t//\n\t\t\tconst propsFromFields = getAllFields(schema)\n\t\t\t\t.map((field) => {\n\t\t\t\t\treturn getTypeFromField(field, kind, {\n\t\t\t\t\t\thasDistributorData,\n\t\t\t\t\t\tgetStaticData,\n\t\t\t\t\t\tmoduleSchemas: MODULE_SCHEMAS,\n\t\t\t\t\t\tschema,\n\t\t\t\t\t});\n\t\t\t\t})\n\t\t\t\t.filter(Boolean)\n\t\t\t\t.join(\"\");\n\n\t\t\t//\n\t\t\t// Compose the final interface string\n\t\t\t//\n\t\t\treturn `\n\t\t\t\texport interface ${component}${contentTypeSuffixStr}${interfaceSuffix}${relationsGeneric} ${extendsString} {\n\t\t\t\t\t${contentTypeName}\n\t\t\t\t\t${contentTypeKind}\n\t\t\t\t\t${relatedContentTypeNames}\n\t\t\t\t\t${componentName}\n\t\t\t\t\t${propsFromFields}\n\t\t\t\t\t${isACategoryInterface ? \"title?: string; code?: string\" : \"\"}\n\t\t\t\t}\n\t\t\t\t${interfaceForPublicAPI}\n\t\t\t\t`;\n\t\t})\n\t\t.join(\"\");\n\n\tconst pageContentTypesStr =\n\t\tcontentTypePageListNames && contentTypePageListNames.length\n\t\t\t? `export type PageContentTypes = ${contentTypePageListNames.join(\"|\")};`\n\t\t\t: \"\";\n\tconst simpleContentTypesStr =\n\t\tcontentTypeSimpleListNames && contentTypeSimpleListNames.length\n\t\t\t? `export type SimpleContentTypes = ${contentTypeSimpleListNames.join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)};`\n\t\t\t: \"\";\n\tconst taxonomyContentTypesStr =\n\t\tcontentTypeTaxonomyListNames && contentTypeTaxonomyListNames.length\n\t\t\t? `export type TaxonomyContentTypes = ${contentTypeTaxonomyListNames.join(\n\t\t\t\t\t\"|\",\n\t\t\t\t)};`\n\t\t\t: \"\";\n\n\treturn `\n${autoTypesSchemas}\n${pageContentTypesStr}\n${simpleContentTypesStr}\n${taxonomyContentTypesStr}\n`;\n}\n\nexport { getTypesFromSchemas };\n","/* eslint-disable @typescript-eslint/no-var-requires */\nimport path from \"path\";\n\nimport { main } from \"./main\";\nimport { resolveComponentsPath } from \"./utils\";\n\nconst rawSchemasFromComponents = path.join(\n\tresolveComponentsPath(),\n\t\"griddo.config.ts\",\n);\n\nconst configFile = require(rawSchemasFromComponents);\n\nmain(\n\t{\n\t\t...configFile.schemas.all,\n\t\t...configFile.schemas.templates,\n\t\t...configFile.schemas.structuredData,\n\t},\n\tconfigFile.schemas.menuItems,\n\tconfigFile.schemas.languages,\n\tconfigFile.moduleCategories,\n\tconfigFile.schemas.dataPacks,\n\tconfigFile.schemas.dataPacksCategories,\n\tconfigFile.themes,\n\tconfigFile.subthemes,\n\tconfigFile.autotypes,\n);\n","/* eslint-disable @typescript-eslint/no-var-requires */\nimport type { LanguagesSchema, MenuItemsSchema, SchemaType } from \"./types\";\nimport type {\n\tDataPack,\n\tDataPackCategory,\n\tModuleCategories,\n} from \"../../types/schemas\";\nimport type { AutoTypesConfig } from \"../../types/schemas/AutoTypes\";\nimport type { ThemeEntry } from \"../../types/schemas/Themes\";\n\nimport { writeFile } from \"fs\";\nimport path from \"path\";\n\nimport prettier from \"prettier\";\n\nimport { HEAD_DESIGN } from \"./ascii\";\nimport { TYPE_FILE_NAME } from \"./constants\";\nimport { getMenuItemsProps } from \"./getMenuItemsProps\";\nimport { getTypesFromSchemas } from \"./getTypesFromSchemas\";\nimport {\n\tgetElementsUnionType,\n\tgetPageContentTypesUnionType,\n\tgetSectionList,\n\tgetSimpleContentTypeUnionProps,\n\tgetTaxonomyContentTypesUnionType,\n\tresolveComponentsPath,\n\tschemasToArray,\n} from \"./utils\";\n\n//\n// Main function\n//\nexport async function main(\n\tinputSchemas: Record<string, SchemaType>,\n\tmenuItemsSchemas: MenuItemsSchema,\n\tlanguagesSchemas: LanguagesSchema,\n\tmoduleCategoriesSchema: ModuleCategories,\n\tdatapacksSchema: Record<string, DataPack>,\n\tdatapacksCategoriesSchema: Record<string, DataPackCategory>,\n\tthemesSchema: Array<ThemeEntry>,\n\tsubthemesSchema: Array<string>,\n\tconfig?: AutoTypesConfig,\n) {\n\t// Config\n\tconst typeFileName = TYPE_FILE_NAME;\n\n\t// Schemas\n\tconst schemas = schemasToArray(inputSchemas);\n\n\t// Types\n\tconst elementsUnionTypes = getElementsUnionType(schemas);\n\tconst templateSectionList = getSectionList(schemas);\n\tconst allTypes = getTypesFromSchemas(schemas, config);\n\n\t// Menu items types Griddo + Instance\n\tconst linkFields = menuItemsSchemas?.link?.fields as any;\n\tconst groupFields = menuItemsSchemas?.group?.fields as any;\n\tconst menuItemsLinksProps = getMenuItemsProps(linkFields);\n\tconst menuItemsGroupProps = getMenuItemsProps(groupFields);\n\tconst menuItemsInterface = `\n\t\texport interface InstanceMenuItems {\n\t\t\tlink:{\n\t\t\t\t${menuItemsLinksProps}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: \"link\";\n\t\t\t\t};\n\t\t\t};\n\t\t\tgroup: {\n\t\t\t\turl?: null;\n\t\t\t\t${menuItemsGroupProps}\n\t\t\t\tconfig?: {\n\t\t\t\t\theaderStyle?: string;\n\t\t\t\t\tfooterStyle?: string;\n\t\t\t\t\ttype?: \"group\";\n\t\t\t\t};\n\t\t\t};\n\t\t}\n\t\texport type LinkMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems[\"link\"];\n\t\texport type GroupMenuElement = Fields.BaseLinkElement<InstanceMenuItems> & InstanceMenuItems[\"group\"];\n\t\texport type MenuElement = LinkMenuElement | GroupMenuElement;\n\t\texport type Menu = Fields.Menu<InstanceMenuItems>;\n\t`;\n\n\t// ${JSON.stringify(languagesSchemas)}\n\n\tconst languagesInterface = `\n\t\t// Type for the language schema\n\t\texport interface SiteLanguage {\n\t\t\tdomain: { id: number; url: string; slug: string };\n\t\t\thome: string;\n\t\t\tid: number;\n\t\t\tisDefault: boolean;\n\t\t\tlabel: ${(Object.keys(languagesSchemas) as Array<keyof typeof languagesSchemas>)\n\t\t\t\t.map((loc) => `\"${languagesSchemas[loc].label}\"`)\n\t\t\t\t.join(\"|\")};\n\t\t\tlanguage: ${(\n\t\t\t\tObject.keys(languagesSchemas) as Array<keyof typeof languagesSchemas>\n\t\t\t)\n\t\t\t\t.map((loc) => `\"${languagesSchemas[loc].name}\"`)\n\t\t\t\t.join(\"|\")};\n\t\t\tlocale: ${Object.keys(languagesSchemas)\n\t\t\t\t.map((loc) => `\"${loc}\"`)\n\t\t\t\t.join(\"|\")};\n\t\t\tpath: string;\n\t\t}\n\t`;\n\n\tconst moduleCategories = moduleCategoriesSchema\n\t\t? `type ModuleCategories = ${moduleCategoriesSchema\n\t\t\t\t.map((entry) => `\"${entry.value}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst datapacks = datapacksSchema\n\t\t? `type Datapacks = ${Object.keys(datapacksSchema)\n\t\t\t\t.map((entry) => `\"${entry}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst datapacksCategories = datapacksCategoriesSchema\n\t\t? `type DatapacksCategories = ${Object.keys(datapacksCategoriesSchema)\n\t\t\t\t.map((entry) => `\"${entry}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst allTaxonomyContentTypeProps = `type AllTaxonomyContentTypeProps = ${getTaxonomyContentTypesUnionType(schemas)}`;\n\tconst allSimpleContentTypeProps = `type AllPageContentTypeProps = ${getSimpleContentTypeUnionProps(schemas)}`;\n\tconst allPageContentTypeProps = `type AllSimpleContentTypeProps = ${getPageContentTypesUnionType(schemas)}`;\n\n\tconst themes = themesSchema\n\t\t? `type Themes = ${themesSchema\n\t\t\t\t.map((entry) => `\"${entry.value}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\tconst subthemes = subthemesSchema\n\t\t? `type Subthemes = ${subthemesSchema\n\t\t\t\t.map((entry) => `\"${entry}\"`)\n\t\t\t\t.join(\"|\")}`\n\t\t: \"\";\n\n\t// Prettier\n\tconst localConfFile = await prettier.resolveConfigFile();\n\tconst localConf = await prettier.resolveConfig(localConfFile as string);\n\tconst autoTypesConfig = { useTabs: true };\n\tconst prettierConfig = localConf || autoTypesConfig;\n\n\tconst stringToPrettify = `\n\t\t${HEAD_DESIGN}\n\t\t${menuItemsInterface}\n\t\t${languagesInterface}\n\t\t${allTypes}\n\t\t${elementsUnionTypes}\n\t\t${templateSectionList}\n\t\t${moduleCategories}\n\t\t${datapacks}\n\t\t${datapacksCategories}\n\t\t${allTaxonomyContentTypeProps}\n\t\t${allSimpleContentTypeProps}\n\t\t${allPageContentTypeProps}\n\t\t${themes}\n\t\t${subthemes}\n\t\t`;\n\n\tconst prettierConfigProps = {\n\t\t...prettierConfig,\n\t\tparser: \"typescript\",\n\t};\n\n\tconst allTypesPrettify = await prettier.format(\n\t\tstringToPrettify,\n\t\tprettierConfigProps,\n\t);\n\n\t// Remove extra new lines\n\tconst stringData = allTypesPrettify.replace(/^\\s*\\n/gm, \"\");\n\n\t// Write it out!\n\n\t// const dstPath = path.resolve(pkgDir.sync(__dirname) || \"\", \"../../..\");\n\twriteFile(\n\t\t`${path.join(resolveComponentsPath(), typeFileName)}`,\n\t\tstringData,\n\t\t(err) => {\n\t\t\tif (err) throw err;\n\t\t},\n\t);\n\n\t// :)\n\tconsole.log(\"🤖 AutoTypes ✓\");\n}\n"],"names":["__awaiter","thisArg","_arguments","P","generator","Promise","resolve","reject","fulfilled","value","step","next","e","rejected","result","done","then","apply","SuppressedError","INTERFACE_SUFFIX","UPPERCASE","LOWERCASE","LEADING_CAPITAL","IDENTIFIER","SEPARATORS","LEADING_SEPARATORS","RegExp","source","SEPARATORS_AND_IDENTIFIER","NUMBERS_AND_IDENTIFIER","camelCase","input","options","Array","isArray","TypeError","pascalCase","preserveConsecutiveUppercase","map","x","trim","filter","length","join","toLowerCase","locale","string","toLocaleLowerCase","toUpperCase","toLocaleUpperCase","test","isLastCharLower","isLastCharUpper","isLastLastCharUpper","isLastLastCharPreserved","index","character","slice","preserveCamelCase","replace","lastIndex","replaceAll","match","charAt","pattern","offset","includes","_","identifier","postProcess","typeMappings","directory","file","matchType","type","stat","locatePathSync","paths","cwd","process","allowSymlinks","urlOrPath","Object","hasOwnProperty","call","Error","checkType","URL","fileURLToPath","statFunction","fs","statSync","lstatSync","path_","path","throwIfNoEntry","findUpStop","Symbol","findUpMultipleSync","name","root","parse","stopAt","limit","Number","POSITIVE_INFINITY","flat","runMatcher","locateOptions","foundPath","matches","push","dirname","packageDirectorySync","filePath","findUpSync","getInterfacePropType","field","returnTypeName","generic","hasHideable","Boolean","hideable","genericStr","returnTypeNameWithGeneriStr","returnType","typeWrappedWithHideable","_a","_autoType","doc","key","getGenericFromWhitelist","whiteList","config","interfaceSuffix","whiteListItem","camelcase","item","ArrayFieldGroup","AsyncCheckGroup","AsyncSelect","CheckGroup","ColorPicker","ComponentArray","ComponentContainer","ConditionalField","DateField","FieldGroup","FieldsDivider","FileField","HeadingField","ImageField","LinkField","MultiCheckSelect","MultiCheckSelectGroup","NoteField","NumberField","RadioGroup","ReferenceField","RichText","Select","SliderField","TagsField","TextArea","TextField","TimeField","ToggleField","UniqueCheck","UrlField","VisualUniqueSelection","Wysiwyg","IS_COMPONENT_LIBRARY","__dirname","resolveComponentsPath","componentsPath","getTypeFromField","kind","ignore","hasDistributorData","getStaticData","keys","elements","element","_b","relations","isThemePalette","getGenericFromOptions","getGenericFromCheckBoxOptions","entity","fields","childField","conditionalChildrenFields","conditionalHasHideable","endHideable","option","optional","fieldCasted","getModulesFromTemplateSectionList","modules","templateName","templateSection","entry","schemaType","sectionList","t","s","m","component","modulesInSectionLists","moduleSchemas","schema","Set","split","FieldCasted","sources","structuredData","undefined","withValue","withTheme","theme","i","console","warn","getMenuItemsProps","getTypesFromSchemas","schemas","contentTypeSuffix","publicApiSuffix","contentTypePageListNames","contentTypeSimpleListNames","contentTypeTaxonomyListNames","contentTypeSuffixStr","contentTypeName","contentTypeKind","relatedContentTypeNames","componentName","relationsGeneric","interfaceForPublicAPI","MODULE_SCHEMAS","fromPage","taxonomy","relatedContentTypeNamesValues","JSON","stringify","default","isACategoryInterface","isListTemplate","mode","extendsString","types","typeStr","propsFromFields","content","configTabs","flatMap","tab","getAllFields","rawSchemasFromComponents","configFile","require","inputSchemas","menuItemsSchemas","languagesSchemas","moduleCategoriesSchema","datapacksSchema","datapacksCategoriesSchema","themesSchema","subthemesSchema","objectSchemas","assign","elementsUnionTypes","unionOfComponents","unionOfModules","unionOfTemplates","detailTemplates","getElementsUnionType","templateSectionList","templateSchema","sectionNames","getSectionList","allTypes","linkFields","link","groupFields","group","menuItemsInterface","languagesInterface","loc","label","moduleCategories","datapacks","datapacksCategories","allTaxonomyContentTypeProps","getTaxonomyContentTypesUnionType","allSimpleContentTypeProps","getSimpleContentTypeUnionProps","allPageContentTypeProps","getPageContentTypesUnionType","themes","subthemes","localConfFile","prettier","resolveConfigFile","prettierConfig","resolveConfig","useTabs","stringToPrettify","prettierConfigProps","parser","stringData","format","writeFile","err","log","main","all","templates","menuItems","languages","dataPacks","dataPacksCategories","autotypes"],"mappings":"gMAkHO,SAASA,EAAUC,EAASC,EAAYC,EAAGC,GAE9C,OAAO,IAAKD,IAAMA,EAAIE,WAAU,SAAUC,EAASC,GAC/C,SAASC,EAAUC,GAAS,IAAMC,EAAKN,EAAUO,KAAKF,GAAU,CAAC,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC1F,SAASC,EAASJ,GAAS,IAAMC,EAAKN,EAAiB,MAAEK,GAAU,CAAC,MAAOG,GAAKL,EAAOK,EAAI,CAAE,CAC7F,SAASF,EAAKI,GAJlB,IAAeL,EAIaK,EAAOC,KAAOT,EAAQQ,EAAOL,QAJ1CA,EAIyDK,EAAOL,MAJhDA,aAAiBN,EAAIM,EA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C,oBAG/BC,SAFkBF,EAASG,cAAcJ,KACvB,CAAEK,SAAS,GAG7BC,EAAmB,u3CAEtBrB,UACAC,UACAN,UACAV,UACAM,UACAa,UACAC,UACAC,UACAC,UACAE,UACAE,UACAE,UACAC,UAGGQ,iCACFJ,GAAc,CACjBK,OAAQ,eASHC,SANyBR,EAASS,OACvCJ,EACAC,IAImCxP,QAAQ,WAAY,IAKxD4P,EACC,GAAGzN,EAAKnD,KAAKkI,IVvLQ,oBUwLrBwI,GACCG,IACA,GAAIA,EAAK,MAAMA,CAAG,IAKpB3F,QAAQ4F,IAAI,oBACZ,CDnLDC,CAAIxO,OAAA2L,OAAA3L,OAAA2L,OAAA3L,OAAA2L,OAAA,CAAA,EAECX,EAAWjC,QAAQ0F,KACnBzD,EAAWjC,QAAQ2F,WACnB1D,EAAWjC,QAAQV,gBAEvB2C,EAAWjC,QAAQ4F,UACnB3D,EAAWjC,QAAQ6F,UACnB5D,EAAW+B,iBACX/B,EAAWjC,QAAQ8F,UACnB7D,EAAWjC,QAAQ+F,oBACnB9D,EAAWwC,OACXxC,EAAWyC,UACXzC,EAAW+D","x_google_ignoreList":[0,3,4,5,6]}
@@ -1,17 +0,0 @@
1
- declare const _default: {
2
- domain: string;
3
- uploadFolder: string;
4
- fallback404ImageId: string;
5
- quality: number;
6
- crop: string;
7
- gravity: string;
8
- format: string;
9
- loading: string;
10
- backgroundLazy: boolean;
11
- decoding: string;
12
- responsive: {
13
- breakpoint: null;
14
- width: string;
15
- }[];
16
- };
17
- export default _default;
@@ -1,3 +0,0 @@
1
- import type { Fields } from "../../../misc/types";
2
- declare function getMenuItemsProps(fields?: Array<Fields>): string;
3
- export { getMenuItemsProps };
@@ -1,2 +0,0 @@
1
- import type { MainAutotypesProps } from "./misc/types";
2
- export declare function main(props: MainAutotypesProps): Promise<void>;
@@ -1,56 +0,0 @@
1
- import type * as PageContentType_Fields from "../../../types/schema-fields/page-content-type-fields";
2
- import type * as SimpleContentType_Fields from "../../../types/schema-fields/simple-content-type-fields";
3
- import type * as UI_Fields from "../../../types/schema-fields/ui-fields";
4
- import type * as UITemplate_Fields from "../../../types/schema-fields/ui-template-fields";
5
- import type { Core, Schema } from "@core-types";
6
- import type { AutoTypesConfig, DataPack, DataPackCategory, ModuleCategories, ThemeEntry } from "@schema-types";
7
- type SchemaFieldTypes = "ArrayFieldGroup" | "AsyncCheckGroup" | "AsyncSelect" | "AsyncSelect" | "CheckGroup" | "ColorPicker" | "ComponentArray" | "ComponentContainer" | "ConditionalField" | "DateField" | "FieldGroup" | "FieldsDivider" | "FileField" | "HeadingField" | "ImageField" | "LinkField" | "MultiCheckSelect" | "MultiCheckSelectGroup" | "NoteField" | "NumberField" | "RadioGroup" | "ReferenceField" | "RichText" | "Select" | "SliderField" | "TagsField" | "TextArea" | "TextField" | "TimeField" | "ToggleField" | "UniqueCheck" | "UrlField" | "VisualUniqueSelection" | "Wysiwyg";
8
- type FieldReturnTypes = "Fields.ArrayFieldGroup" | "Fields.AsyncCheckGroup" | "Fields.AsyncSelect" | "Fields.CheckGroup" | "Fields.ColorPicker" | "Fields.ColorPickerFixed" | "Fields.ComponentArray" | "Fields.ComponentContainer" | "Fields.Conditional" | "Fields.Date" | "Fields.FieldGroup" | "Fields.FieldsDivider" | "Fields.File" | "Fields.Heading" | "Fields.Image" | "Fields.Link" | "Fields.MultiCheckSelect" | "Fields.MultiCheckSelectGroup" | "Fields.Note" | "Fields.Number" | "Fields.RadioGroup" | "Fields.Reference" | "Fields.RichText" | "Fields.Select" | "Fields.Slider" | "Fields.Tags" | "Fields.TextArea" | "Fields.Text" | "Fields.Time" | "Fields.Toggle" | "Fields.UniqueCheck" | "Fields.Url" | "Fields.VisualUniqueSelection" | "Fields.Wysiwyg";
9
- type SchemaType = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | Schema.SimpleContentType | Schema.CategoryContentType | Schema.PageContentType;
10
- type SchemaTypeWithComponentProp = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | (Schema.CategoryContentType & {
11
- component: string;
12
- }) | (Schema.SimpleContentType & {
13
- component: string;
14
- }) | (Schema.PageContentType & {
15
- component: string;
16
- });
17
- type Fields = UI_Fields.UIFields | UITemplate_Fields.UITemplateFields | SimpleContentType_Fields.SimpleContentTypeFields | PageContentType_Fields.PageContentTypeFields;
18
- type KindSchema = "object" | "component" | "module" | "template" | "simpleContentType" | "pageContentType";
19
- interface MenuItemsSchema {
20
- link: Record<string, SchemaType>;
21
- group: Record<string, SchemaType>;
22
- }
23
- type LanguagesSchema = Record<Core.Locale, {
24
- name: string;
25
- label: string;
26
- }>;
27
- type GlobalState = {
28
- kind: KindSchema;
29
- contentTypeSuffixStr: string;
30
- contentTypeName: string;
31
- contentTypeKind: string;
32
- relatedContentTypeNames: string;
33
- componentName: string;
34
- hasDistributorData: boolean;
35
- getStaticData: boolean;
36
- interfaceForPublicAPI: string;
37
- relationsGeneric: string;
38
- };
39
- export type { FieldReturnTypes, Fields, GlobalState, KindSchema, LanguagesSchema, MenuItemsSchema, SchemaFieldTypes, SchemaType, SchemaTypeWithComponentProp, };
40
- export interface MainAutotypesProps {
41
- categoryContentTypes: Record<string, Schema.CategoryContentType>;
42
- pageContentTypes: Record<string, Schema.PageContentType>;
43
- simpleContentTypes: Record<string, Schema.SimpleContentType>;
44
- componentsSchema: Record<string, Schema.Component>;
45
- modulesSchema: Record<string, Schema.Module>;
46
- templatesSchema: Record<string, Schema.Template | Schema.ListTemplate | Schema.PaginatedDataTemplate>;
47
- structuredDataSchema: Record<string, SchemaType>;
48
- menuItemsSchemas: MenuItemsSchema;
49
- languagesSchemas: LanguagesSchema;
50
- moduleCategoriesSchema: ModuleCategories;
51
- datapacksSchema: Record<string, DataPack>;
52
- datapacksCategoriesSchema: Record<string, DataPackCategory>;
53
- themesSchema: Array<ThemeEntry>;
54
- subthemesSchema: Array<string>;
55
- config?: AutoTypesConfig;
56
- }
@@ -1,3 +0,0 @@
1
- declare const HEAD_DESIGN = "/* eslint-disable @typescript-eslint/ban-types */\n/* eslint-disable @typescript-eslint/no-unused-vars */\n/* eslint-disable no-use-before-define */\n//\n//\n// ' ____\n// /\\ \\\n// \u00BA / /\\ \\\n// ' / / \\ _>\n// ' _\\ \\__> \\__\n// ' O ( __;\u00B7;______ ) AutoTypes\n// O \u00BA, | , , \\ \\\\ \u00B7..~~.\u00B7~.\u00B7\n// ,,, /| , , /\\ <\\\\\n// \\''\\-' \u23A9, <\\/\\ \\ \\\n// \\_/ /\\_____\u23A9/ > > >\n// '___' <_(_)__> / \\ <\n// / / \u00B4 \\ | \\___//\\\\\n// / / | / > > \\\\\n// \u00B7 \u00B7\u00B7~~~~\u00B7~\u00B7~~~~~~~\u00B7~\u00B7\u00B7~~~~~\u00B7~\u00B7~~\u00B7~~~~\u00B7~~~~~\u00B7\u00B7 \u00B7 \u00B7\n//\n// Embrace the beauty of effortless typing by indulging in the benefits of them\n// sans the actual typing!\n//\n// Behold! These dynamically generated types were conjured from the schemas\n// nestled within this repository. However, should you yearn to expand upon\n// these types, kindly abstain from doing so in this file, lest AutoTypes'\n// magic shall smite your changes with each schema modification.\n//\n// Check out the details of Griddo AutoTypes in:\n// https://griddoio.notion.site/Griddo-AutoTypes-e7420867dd2e489c8da34a493b763cd8>\n//\n// Happy magic types!\n//\nimport { Core, Fields, Hideable, NonEmptyArray } from \"@griddo/core\"\n//\n";
2
- declare const FOOTER_DESIGN = "\n//\n// . + . . . . . . . ..\n// . . . *\n// . * . . . . . . + . +\n// . . . . + . . .\n// . . . . . . .\n// . . . . . +. + . *\n// + . . . .\n// . . . * . . . . + . .\n// + . . . + . .\n// . . + .+. . .\n// . . . + . . . . .\n// . . . . . . . . ! / +\n// * . . . + . . - O -\n// . . . + . . * . . / | . .\n// . + . . . .. + .\n// . . . . * . * . +.. . * +\n// . . . . . . . . + . . +\n//\n//\n// The beauty of a living thing is not the atoms that go into it,\n// but the way those atoms are put together\n//\n// Carl Sagan\n//\n";
3
- export { FOOTER_DESIGN, HEAD_DESIGN };
@@ -1,5 +0,0 @@
1
- declare const TYPE_FILE_NAME = "autotypes.d.ts";
2
- declare const INTERFACE_SUFFIX = "Props";
3
- declare const CONTENT_TYPE_SUFFIX = "ContentType";
4
- declare const PUBLIC_API_SUFFIX = "List";
5
- export { TYPE_FILE_NAME, INTERFACE_SUFFIX, CONTENT_TYPE_SUFFIX, PUBLIC_API_SUFFIX, };
@@ -1,3 +0,0 @@
1
- import type { Fields } from "./types";
2
- declare function getMenuItemsProps(fields?: Array<Fields>): string;
3
- export { getMenuItemsProps };
@@ -1,24 +0,0 @@
1
- import type { KindSchema, SchemaTypeWithComponentProp } from "./types";
2
- import type { PageContentTypeFields } from "../../types/schema-fields/page-content-type-fields";
3
- import type { SimpleContentTypeFields } from "../../types/schema-fields/simple-content-type-fields";
4
- import type { UIFields } from "../../types/schema-fields/ui-fields";
5
- import type { UITemplateFields } from "../../types/schema-fields/ui-template-fields";
6
- import type { Module } from "../../types/schemas";
7
- import type { AutoTypesConfig } from "../../types/schemas/AutoTypes";
8
- /**
9
- * Return a property with a Griddo type (serialized) based on a schema field.
10
- *
11
- * @param field A Griddo field object
12
- * @param kind Schema type in order to later do some operations with fields
13
- * @param options Object options
14
- * @example
15
- * { type: 'TextField', key: 'name' } => "name?: Fields.Text"
16
- * { type: 'UrlField', key: 'image' } => "name?: Fields.Url"
17
- */
18
- declare function getTypeFromField(field: UIFields | UITemplateFields | SimpleContentTypeFields | PageContentTypeFields, kind: KindSchema, options: {
19
- hasDistributorData: boolean;
20
- getStaticData: boolean;
21
- moduleSchemas: Array<Module | undefined>;
22
- schema: SchemaTypeWithComponentProp;
23
- }, config?: AutoTypesConfig): string | undefined;
24
- export { getTypeFromField };
@@ -1,15 +0,0 @@
1
- import type { SchemaTypeWithComponentProp } from "./types";
2
- import type { AutoTypesConfig } from "../../types/schemas/AutoTypes";
3
- /**
4
- * Return an interface for every schema in the prop schemas.
5
- *
6
- * @example
7
- * interface SchemaProps {
8
- * schemaFieldKey: apiResponsveFieldType
9
- * title: Fields.Heading
10
- * itemsPerPage: Fields.Number
11
- * ...
12
- * }
13
- */
14
- declare function getTypesFromSchemas(schemas: Array<SchemaTypeWithComponentProp>, config?: AutoTypesConfig): string;
15
- export { getTypesFromSchemas };
@@ -1 +0,0 @@
1
- export {};
@@ -1,5 +0,0 @@
1
- import type { LanguagesSchema, MenuItemsSchema, SchemaType } from "./types";
2
- import type { DataPack, DataPackCategory, ModuleCategories } from "../../types/schemas";
3
- import type { AutoTypesConfig } from "../../types/schemas/AutoTypes";
4
- import type { ThemeEntry } from "../../types/schemas/Themes";
5
- export declare function main(inputSchemas: Record<string, SchemaType>, menuItemsSchemas: MenuItemsSchema, languagesSchemas: LanguagesSchema, moduleCategoriesSchema: ModuleCategories, datapacksSchema: Record<string, DataPack>, datapacksCategoriesSchema: Record<string, DataPackCategory>, themesSchema: Array<ThemeEntry>, subthemesSchema: Array<string>, config?: AutoTypesConfig): Promise<void>;
@@ -1,24 +0,0 @@
1
- import type { Core, Schema } from "../..";
2
- import type * as PageContentType_Fields from "../../types/schema-fields/page-content-type-fields";
3
- import type * as SimpleContentType_Fields from "../../types/schema-fields/simple-content-type-fields";
4
- import type * as UI_Fields from "../../types/schema-fields/ui-fields";
5
- import type * as UITemplate_Fields from "../../types/schema-fields/ui-template-fields";
6
- type SchemaFieldTypes = "ArrayFieldGroup" | "AsyncCheckGroup" | "AsyncSelect" | "AsyncSelect" | "CheckGroup" | "ColorPicker" | "ComponentArray" | "ComponentContainer" | "ConditionalField" | "DateField" | "FieldGroup" | "FieldsDivider" | "FileField" | "HeadingField" | "ImageField" | "LinkField" | "MultiCheckSelect" | "MultiCheckSelectGroup" | "NoteField" | "NumberField" | "RadioGroup" | "ReferenceField" | "RichText" | "Select" | "SliderField" | "TagsField" | "TextArea" | "TextField" | "TimeField" | "ToggleField" | "UniqueCheck" | "UrlField" | "VisualUniqueSelection" | "Wysiwyg";
7
- type FieldReturnTypes = "Fields.ArrayFieldGroup" | "Fields.AsyncCheckGroup" | "Fields.AsyncSelect" | "Fields.CheckGroup" | "Fields.ColorPicker" | "Fields.ColorPickerFixed" | "Fields.ComponentArray" | "Fields.ComponentContainer" | "Fields.Conditional" | "Fields.Date" | "Fields.FieldGroup" | "Fields.FieldsDivider" | "Fields.File" | "Fields.Heading" | "Fields.Image" | "Fields.Link" | "Fields.MultiCheckSelect" | "Fields.MultiCheckSelectGroup" | "Fields.Note" | "Fields.Number" | "Fields.RadioGroup" | "Fields.Reference" | "Fields.RichText" | "Fields.Select" | "Fields.Slider" | "Fields.Tags" | "Fields.TextArea" | "Fields.Text" | "Fields.Time" | "Fields.Toggle" | "Fields.UniqueCheck" | "Fields.Url" | "Fields.VisualUniqueSelection" | "Fields.Wysiwyg";
8
- type SchemaType = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | Schema.SimpleContentType | Schema.PageContentType;
9
- type SchemaTypeWithComponentProp = Schema.Component | Schema.ContentTypeModule | Schema.MultiPageModule | Schema.Module | Schema.Template | Schema.ListTemplate | (Schema.SimpleContentType & {
10
- component: string;
11
- }) | (Schema.PageContentType & {
12
- component: string;
13
- });
14
- type Fields = UI_Fields.UIFields | UITemplate_Fields.UITemplateFields | SimpleContentType_Fields.SimpleContentTypeFields | PageContentType_Fields.PageContentTypeFields;
15
- type KindSchema = "object" | "component" | "module" | "template" | "simpleContentType" | "pageContentType";
16
- interface MenuItemsSchema {
17
- link: Record<string, SchemaType>;
18
- group: Record<string, SchemaType>;
19
- }
20
- type LanguagesSchema = Record<Core.Locale, {
21
- name: string;
22
- label: string;
23
- }>;
24
- export type { FieldReturnTypes, Fields, KindSchema, LanguagesSchema, MenuItemsSchema, SchemaFieldTypes, SchemaType, SchemaTypeWithComponentProp, };