@woodylab/payload 0.0.142 → 0.0.143

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.
@@ -1,6 +1,6 @@
1
- import { seedStyles } from './styles';
2
- import { seedViewModes } from './viewModes';
3
- import { seedComponents } from './components';
1
+ import { seedStyles } from './seedStyles';
2
+ import { seedViewModes } from './seedViewMode';
3
+ import { seedComponents } from './seedComponent';
4
4
  export async function UIMSSeeder({ payload, include }) {
5
5
  if (include.includes('styles')) {
6
6
  await seedStyles(payload);
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../tailwind/index.cjs.js");function t(){const t=[];for(const s of e.tailwindSelectorVariants)for(const n of Object.values(e.tailwindFieldsSelectors))for(const e of n){const n=`${s.value}${e}`,o=`t:${n}`;t.push({name:o,css:n})}return t}const s=[{name:"Container",component:"Container",styles:[{slot:"root",style:"container mx-auto"}]},{name:"Card",component:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}},styles:[{slot:"root",style:"bg-white rounded-md shadow-md"}]}];const n=[{name:"Card",componentName:"Card",propsSchema:{titleProps:{text:"string",className:"string"},descriptionProps:{text:"string",className:"string"},imageProps:{src:"string",className:"string"}}}];exports.UIMSSeeder=async function({payload:e,include:o}){o.includes("styles")&&await async function(e){const s=t(),n=await e.find({collection:"styles",limit:1e6,depth:0}),o=new Set(n.docs.map(e=>e.name));for(const t of s)if(!o.has(t.name))try{await e.create({collection:"styles",data:{name:t.name,css:{className:t.css}}})}catch(e){console.warn(`[SEED STYLES] Errore su "${t.name}", skip`,e?.message??e)}}(e),o.includes("viewMode")&&await async function(e){const t=await e.find({collection:"view-modes",limit:1e6,depth:0}),n=new Set(t.docs.map(e=>e.name));for(const t of s)if(!n.has(t.name))try{await e.create({collection:"view-modes",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e),o.includes("component")&&await async function(e){const t=await e.find({collection:"component-definitions",limit:1e6,depth:0}),s=new Set(t.docs.map(e=>e.name));for(const t of n)if(!s.has(t.name))try{await e.create({collection:"component-definitions",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e)},exports.generateTailwindStyles=t;
1
+ "use strict";var e=require("../tailwind/index.cjs.js");function t(){const t=[];for(const s of e.tailwindSelectorVariants)for(const n of Object.values(e.tailwindFieldsSelectors))for(const e of n){const n=`${s.value}${e}`,o=`t:${n}`;t.push({name:o,css:n})}return t}const s=[{name:"Container",component:"Container",styles:[{slot:"root",style:"container mx-auto"}]},{name:"Card",component:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}},styles:[{slot:"root",style:"bg-white rounded-md shadow-md"}]}];const n=[{name:"Card",componentName:"Card",propsSchema:{titleProps:{text:"string",className:"string"},descriptionProps:{text:"string",className:"string"},imageProps:{src:"string",className:"string"}}}];exports.UIMSSeeder=async function({payload:e,include:o}){o.includes("styles")&&await async function(e){const s=t(),n=await e.find({collection:"styles",limit:1e6,depth:0}),o=new Set(n.docs.map(e=>e.name));for(const t of s)if(!o.has(t.name))try{await e.create({collection:"styles",data:{name:t.name,css:{className:t.css}}})}catch(e){console.warn(`[SEED STYLES] Errore su "${t.name}", skip`,e?.message??e)}}(e),o.includes("viewMode")&&await async function(e){const t=await e.find({collection:"view-modes",limit:1e6,depth:0}),n=new Set(t.docs.map(e=>e.name));for(const t of s)if(!n.has(t.name))try{await e.create({collection:"view-modes",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e),o.includes("component")&&await async function(e){const t=await e.find({collection:"component-definitions",limit:1e6,depth:0}),s=new Set(t.docs.map(e=>e.name));for(const t of n)if(!s.has(t.name))try{await e.create({collection:"component-definitions",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e)},exports.listStyles=t;
2
2
  //# sourceMappingURL=index.cjs.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.cjs.js","sources":["../../src/seeders/generateTailwindStyles.ts","../../src/seeders/ViewModeList.ts","../../src/seeders/ComponentList.ts","../../src/seeders/UIMSSeeder.ts","../../src/seeders/styles.ts","../../src/seeders/viewModes.ts","../../src/seeders/components.ts"],"sourcesContent":["import { tailwindSelectorVariants } from '../tailwind/tailwindSelectorVariants'\nimport { tailwindFieldsSelectors } from '../tailwind/tailwindFieldSelectors'\n\ntype StyleSeed = {\n name: string\n css: string\n}\n\nexport function generateTailwindStyles(): StyleSeed[] {\n const styles: StyleSeed[] = []\n\n for (const variant of tailwindSelectorVariants) {\n for (const selectors of Object.values(tailwindFieldsSelectors)) {\n for (const selector of selectors) {\n const value = `${variant.value}${selector}` // es. md:mx-auto\n const name = `t:${value}`\n styles.push({\n name,\n css: value,\n })\n }\n }\n }\n\n return styles\n}\n","export const ViewModeList = [\n {\n name: 'Container',\n component: 'Container',\n styles: [\n {\n slot: 'root',\n style: 'container mx-auto',\n },\n ],\n },\n {\n name: 'Card',\n component: 'Card',\n blockPropsMapping: {\n titleProps: {\n text: 'titleProps.text',\n },\n descriptionProps: {\n text: 'descriptionProps.text',\n },\n imageProps: {\n src: 'imageProps.image.value.url',\n },\n },\n styles: [\n {\n slot: 'root',\n style: 'bg-white rounded-md shadow-md',\n },\n ],\n },\n]\n","export const ComponentList = [\n {\n name: 'Card',\n componentName: 'Card',\n propsSchema: {\n titleProps: {\n text: 'string',\n className: 'string',\n },\n descriptionProps: {\n text: 'string',\n className: 'string',\n },\n imageProps: {\n src: 'string',\n className: 'string',\n },\n },\n },\n]\n","import { seedStyles } from './styles'\nimport { seedViewModes } from './viewModes'\nimport { seedComponents } from './components'\n\ntype SeederTarget = 'styles' | 'viewMode' | 'component'\n\ninterface SeederOptions {\n payload: any\n include: SeederTarget[]\n}\n\nexport async function UIMSSeeder({ payload, include }: SeederOptions): Promise<void> {\n if (include.includes('styles')) {\n await seedStyles(payload)\n }\n\n if (include.includes('viewMode')) {\n await seedViewModes(payload)\n }\n\n if (include.includes('component')) {\n await seedComponents(payload)\n }\n}\n","import { generateTailwindStyles } from './generateTailwindStyles'\n\nexport async function seedStyles(payload: any): Promise<void> {\n const generatedStyles = generateTailwindStyles()\n\n const existing = await payload.find({\n collection: 'styles',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((style: any) => style.name))\n\n for (const style of generatedStyles) {\n if (existingNames.has(style.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'styles',\n data: {\n name: style.name,\n css: { className: style.css },\n },\n })\n } catch (error: any) {\n console.warn(`[SEED STYLES] Errore su \"${style.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ViewModeList } from './ViewModeList'\n\nexport async function seedViewModes(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'view-modes',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const viewMode of ViewModeList) {\n if (existingNames.has(viewMode.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'view-modes',\n data: {\n ...viewMode,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${viewMode.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ComponentList } from './ComponentList'\n\nexport async function seedComponents(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'component-definitions',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const component of ComponentList) {\n if (existingNames.has(component.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'component-definitions',\n data: {\n ...component,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${component.name}\", skip`, error?.message ?? error)\n }\n }\n}\n"],"names":["generateTailwindStyles","styles","variant","tailwindSelectorVariants","selectors","Object","values","tailwindFieldsSelectors","selector","value","name","push","css","ViewModeList","component","slot","style","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ComponentList","componentName","propsSchema","className","async","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","seedComponents"],"mappings":"gEAQgBA,IACd,MAAMC,EAAsB,GAE5B,IAAK,MAAMC,KAAWC,2BACpB,IAAK,MAAMC,KAAaC,OAAOC,OAAOC,EAAAA,yBACpC,IAAK,MAAMC,KAAYJ,EAAW,CAChC,MAAMK,EAAQ,GAAGP,EAAQO,QAAQD,IAC3BE,EAAO,KAAKD,IAClBR,EAAOU,KAAK,CACVD,OACAE,IAAKH,GAET,CAIJ,OAAOR,CACT,CCzBO,MAAMY,EAAe,CAC1B,CACEH,KAAM,YACNI,UAAW,YACXb,OAAQ,CACN,CACEc,KAAM,OACNC,MAAO,uBAIb,CACEN,KAAM,OACNI,UAAW,OACXG,kBAAmB,CACjBC,WAAY,CACVC,KAAM,mBAERC,iBAAkB,CAChBD,KAAM,yBAERE,WAAY,CACVC,IAAK,+BAGTrB,OAAQ,CACN,CACEc,KAAM,OACNC,MAAO,oCC5BR,MAAMO,EAAgB,CAC3B,CACEb,KAAM,OACNc,cAAe,OACfC,YAAa,CACXP,WAAY,CACVC,KAAM,SACNO,UAAW,UAEbN,iBAAkB,CAChBD,KAAM,SACNO,UAAW,UAEbL,WAAY,CACVC,IAAK,SACLI,UAAW,gCCJZC,gBAA0BC,QAAEA,EAAOC,QAAEA,IACtCA,EAAQC,SAAS,iBCVhBH,eAA0BC,GAC/B,MAAMG,EAAkB/B,IAElBgC,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,SACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKxB,GAAeA,EAAMN,OAEtE,IAAK,MAAMM,KAASe,EAClB,IAAIM,EAAcI,IAAIzB,EAAMN,MAI5B,UACQkB,EAAQc,OAAO,CACnBR,WAAY,SACZS,KAAM,CACJjC,KAAMM,EAAMN,KACZE,IAAK,CAAEc,UAAWV,EAAMJ,OAG9B,CAAE,MAAOgC,GACPC,QAAQC,KAAK,4BAA4B9B,EAAMN,cAAekC,GAAOG,SAAWH,EAClF,CAEJ,CDjBUI,CAAWpB,GAGfC,EAAQC,SAAS,mBEdhBH,eAA6BC,GAClC,MAAMI,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,aACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKS,GAAYA,EAAGvC,OAEhE,IAAK,MAAMwC,KAAYrC,EACrB,IAAIwB,EAAcI,IAAIS,EAASxC,MAI/B,UACQkB,EAAQc,OAAO,CACnBR,WAAY,aACZS,KAAM,IACDO,IAGT,CAAE,MAAON,GACPC,QAAQC,KAAK,8BAA8BI,EAASxC,cAAekC,GAAOG,SAAWH,EACvF,CAEJ,CFVUO,CAAcvB,GAGlBC,EAAQC,SAAS,oBGlBhBH,eAA8BC,GACnC,MAAMI,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,wBACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKS,GAAYA,EAAGvC,OAEhE,IAAK,MAAMI,KAAaS,EACtB,IAAIc,EAAcI,IAAI3B,EAAUJ,MAIhC,UACQkB,EAAQc,OAAO,CACnBR,WAAY,wBACZS,KAAM,IACD7B,IAGT,CAAE,MAAO8B,GACPC,QAAQC,KAAK,8BAA8BhC,EAAUJ,cAAekC,GAAOG,SAAWH,EACxF,CAEJ,CHNUQ,CAAexB,EAEzB"}
1
+ {"version":3,"file":"index.cjs.js","sources":["../../src/seeders/listStyles.ts","../../src/seeders/listViewMode.ts","../../src/seeders/listComponent.ts","../../src/seeders/UIMSSeeder.ts","../../src/seeders/seedStyles.ts","../../src/seeders/seedViewMode.ts","../../src/seeders/seedComponent.ts"],"sourcesContent":["import { tailwindSelectorVariants } from '../tailwind/tailwindSelectorVariants'\nimport { tailwindFieldsSelectors } from '../tailwind/tailwindFieldSelectors'\n\ntype StyleSeed = {\n name: string\n css: string\n}\n\nexport function listStyles(): StyleSeed[] {\n const styles: StyleSeed[] = []\n\n for (const variant of tailwindSelectorVariants) {\n for (const selectors of Object.values(tailwindFieldsSelectors)) {\n for (const selector of selectors) {\n const value = `${variant.value}${selector}` // es. md:mx-auto\n const name = `t:${value}`\n styles.push({\n name,\n css: value,\n })\n }\n }\n }\n\n return styles\n}\n","export const ListViewMode = [\n {\n name: 'Container',\n component: 'Container',\n styles: [\n {\n slot: 'root',\n style: 'container mx-auto',\n },\n ],\n },\n {\n name: 'Card',\n component: 'Card',\n blockPropsMapping: {\n titleProps: {\n text: 'titleProps.text',\n },\n descriptionProps: {\n text: 'descriptionProps.text',\n },\n imageProps: {\n src: 'imageProps.image.value.url',\n },\n },\n styles: [\n {\n slot: 'root',\n style: 'bg-white rounded-md shadow-md',\n },\n ],\n },\n]\n","export const ListComponent = [\n {\n name: 'Card',\n componentName: 'Card',\n propsSchema: {\n titleProps: {\n text: 'string',\n className: 'string',\n },\n descriptionProps: {\n text: 'string',\n className: 'string',\n },\n imageProps: {\n src: 'string',\n className: 'string',\n },\n },\n },\n]\n","import { seedStyles } from './seedStyles'\nimport { seedViewModes } from './seedViewMode'\nimport { seedComponents } from './seedComponent'\n\ntype SeederTarget = 'styles' | 'viewMode' | 'component'\n\ninterface SeederOptions {\n payload: any\n include: SeederTarget[]\n}\n\nexport async function UIMSSeeder({ payload, include }: SeederOptions): Promise<void> {\n if (include.includes('styles')) {\n await seedStyles(payload)\n }\n\n if (include.includes('viewMode')) {\n await seedViewModes(payload)\n }\n\n if (include.includes('component')) {\n await seedComponents(payload)\n }\n}\n","import { listStyles } from './listStyles'\n\nexport async function seedStyles(payload: any): Promise<void> {\n const generatedStyles = listStyles()\n\n const existing = await payload.find({\n collection: 'styles',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((style: any) => style.name))\n\n for (const style of generatedStyles) {\n if (existingNames.has(style.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'styles',\n data: {\n name: style.name,\n css: { className: style.css },\n },\n })\n } catch (error: any) {\n console.warn(`[SEED STYLES] Errore su \"${style.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ListViewMode } from './listViewMode'\n\nexport async function seedViewModes(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'view-modes',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const viewMode of ListViewMode) {\n if (existingNames.has(viewMode.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'view-modes',\n data: {\n ...viewMode,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${viewMode.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ListComponent } from './listComponent'\n\nexport async function seedComponents(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'component-definitions',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const component of ListComponent) {\n if (existingNames.has(component.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'component-definitions',\n data: {\n ...component,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${component.name}\", skip`, error?.message ?? error)\n }\n }\n}\n"],"names":["listStyles","styles","variant","tailwindSelectorVariants","selectors","Object","values","tailwindFieldsSelectors","selector","value","name","push","css","ListViewMode","component","slot","style","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ListComponent","componentName","propsSchema","className","async","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","seedComponents"],"mappings":"gEAQgBA,IACd,MAAMC,EAAsB,GAE5B,IAAK,MAAMC,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I,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,aACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKS,GAAYA,EAAGvC,OAEhE,IAAK,MAAMwC,KAAYrC,EACrB,IAAIwB,EAAcI,IAAIS,EAASxC,MAI/B,UACQkB,EAAQc,OAAO,CACnBR,WAAY,aACZS,KAAM,IACDO,IAGT,CAAE,MAAON,GACPC,QAAQC,KAAK,8BAA8BI,EAASxC,cAAekC,GAAOG,SAAWH,EACvF,CAEJ,CFVUO,CAAcvB,GAGlBC,EAAQC,SAAS,oBGlBhBH,eAA8BC,GACnC,MAAMI,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,wBACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKS,GAAYA,EAAGvC,OAEhE,IAAK,MAAMI,KAAaS,EACtB,IAAIc,EAAcI,IAAI3B,EAAUJ,MAIhC,UACQkB,EAAQc,OAAO,CACnBR,WAAY,wBACZS,KAAM,IACD7B,IAGT,CAAE,MAAO8B,GACPC,QAAQC,KAAK,8BAA8BhC,EAAUJ,cAAekC,GAAOG,SAAWH,EACxF,CAEJ,CHNUQ,CAAexB,EAEzB"}
@@ -1,2 +1,2 @@
1
1
  export * from './UIMSSeeder';
2
- export * from './generateTailwindStyles';
2
+ export * from './listStyles';
@@ -1,2 +1,2 @@
1
- import{tailwindSelectorVariants as e,tailwindFieldsSelectors as t}from"../tailwind/index.esm.js";function o(){const o=[];for(const n of e)for(const e of Object.values(t))for(const t of e){const e=`${n.value}${t}`,s=`t:${e}`;o.push({name:s,css:e})}return o}const n=[{name:"Container",component:"Container",styles:[{slot:"root",style:"container mx-auto"}]},{name:"Card",component:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}},styles:[{slot:"root",style:"bg-white rounded-md shadow-md"}]}];const s=[{name:"Card",componentName:"Card",propsSchema:{titleProps:{text:"string",className:"string"},descriptionProps:{text:"string",className:"string"},imageProps:{src:"string",className:"string"}}}];async function a({payload:e,include:t}){t.includes("styles")&&await async function(e){const t=o(),n=await e.find({collection:"styles",limit:1e6,depth:0}),s=new Set(n.docs.map(e=>e.name));for(const o of t)if(!s.has(o.name))try{await e.create({collection:"styles",data:{name:o.name,css:{className:o.css}}})}catch(e){console.warn(`[SEED STYLES] Errore su "${o.name}", skip`,e?.message??e)}}(e),t.includes("viewMode")&&await async function(e){const t=await e.find({collection:"view-modes",limit:1e6,depth:0}),o=new Set(t.docs.map(e=>e.name));for(const t of n)if(!o.has(t.name))try{await e.create({collection:"view-modes",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e),t.includes("component")&&await async function(e){const t=await e.find({collection:"component-definitions",limit:1e6,depth:0}),o=new Set(t.docs.map(e=>e.name));for(const t of s)if(!o.has(t.name))try{await e.create({collection:"component-definitions",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e)}export{a as UIMSSeeder,o as generateTailwindStyles};
1
+ import{tailwindSelectorVariants as e,tailwindFieldsSelectors as t}from"../tailwind/index.esm.js";function o(){const o=[];for(const n of e)for(const e of Object.values(t))for(const t of e){const e=`${n.value}${t}`,s=`t:${e}`;o.push({name:s,css:e})}return o}const n=[{name:"Container",component:"Container",styles:[{slot:"root",style:"container mx-auto"}]},{name:"Card",component:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}},styles:[{slot:"root",style:"bg-white rounded-md shadow-md"}]}];const s=[{name:"Card",componentName:"Card",propsSchema:{titleProps:{text:"string",className:"string"},descriptionProps:{text:"string",className:"string"},imageProps:{src:"string",className:"string"}}}];async function a({payload:e,include:t}){t.includes("styles")&&await async function(e){const t=o(),n=await e.find({collection:"styles",limit:1e6,depth:0}),s=new Set(n.docs.map(e=>e.name));for(const o of t)if(!s.has(o.name))try{await e.create({collection:"styles",data:{name:o.name,css:{className:o.css}}})}catch(e){console.warn(`[SEED STYLES] Errore su "${o.name}", skip`,e?.message??e)}}(e),t.includes("viewMode")&&await async function(e){const t=await e.find({collection:"view-modes",limit:1e6,depth:0}),o=new Set(t.docs.map(e=>e.name));for(const t of n)if(!o.has(t.name))try{await e.create({collection:"view-modes",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e),t.includes("component")&&await async function(e){const t=await e.find({collection:"component-definitions",limit:1e6,depth:0}),o=new Set(t.docs.map(e=>e.name));for(const t of s)if(!o.has(t.name))try{await e.create({collection:"component-definitions",data:{...t}})}catch(e){console.warn(`[SEED VIEWMODE] Errore su "${t.name}", skip`,e?.message??e)}}(e)}export{a as UIMSSeeder,o as listStyles};
2
2
  //# sourceMappingURL=index.esm.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.esm.js","sources":["../../src/seeders/generateTailwindStyles.ts","../../src/seeders/ViewModeList.ts","../../src/seeders/ComponentList.ts","../../src/seeders/UIMSSeeder.ts","../../src/seeders/styles.ts","../../src/seeders/viewModes.ts","../../src/seeders/components.ts"],"sourcesContent":["import { tailwindSelectorVariants } from '../tailwind/tailwindSelectorVariants'\nimport { tailwindFieldsSelectors } from '../tailwind/tailwindFieldSelectors'\n\ntype StyleSeed = {\n name: string\n css: string\n}\n\nexport function generateTailwindStyles(): StyleSeed[] {\n const styles: StyleSeed[] = []\n\n for (const variant of tailwindSelectorVariants) {\n for (const selectors of Object.values(tailwindFieldsSelectors)) {\n for (const selector of selectors) {\n const value = `${variant.value}${selector}` // es. md:mx-auto\n const name = `t:${value}`\n styles.push({\n name,\n css: value,\n })\n }\n }\n }\n\n return styles\n}\n","export const ViewModeList = [\n {\n name: 'Container',\n component: 'Container',\n styles: [\n {\n slot: 'root',\n style: 'container mx-auto',\n },\n ],\n },\n {\n name: 'Card',\n component: 'Card',\n blockPropsMapping: {\n titleProps: {\n text: 'titleProps.text',\n },\n descriptionProps: {\n text: 'descriptionProps.text',\n },\n imageProps: {\n src: 'imageProps.image.value.url',\n },\n },\n styles: [\n {\n slot: 'root',\n style: 'bg-white rounded-md shadow-md',\n },\n ],\n },\n]\n","export const ComponentList = [\n {\n name: 'Card',\n componentName: 'Card',\n propsSchema: {\n titleProps: {\n text: 'string',\n className: 'string',\n },\n descriptionProps: {\n text: 'string',\n className: 'string',\n },\n imageProps: {\n src: 'string',\n className: 'string',\n },\n },\n },\n]\n","import { seedStyles } from './styles'\nimport { seedViewModes } from './viewModes'\nimport { seedComponents } from './components'\n\ntype SeederTarget = 'styles' | 'viewMode' | 'component'\n\ninterface SeederOptions {\n payload: any\n include: SeederTarget[]\n}\n\nexport async function UIMSSeeder({ payload, include }: SeederOptions): Promise<void> {\n if (include.includes('styles')) {\n await seedStyles(payload)\n }\n\n if (include.includes('viewMode')) {\n await seedViewModes(payload)\n }\n\n if (include.includes('component')) {\n await seedComponents(payload)\n }\n}\n","import { generateTailwindStyles } from './generateTailwindStyles'\n\nexport async function seedStyles(payload: any): Promise<void> {\n const generatedStyles = generateTailwindStyles()\n\n const existing = await payload.find({\n collection: 'styles',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((style: any) => style.name))\n\n for (const style of generatedStyles) {\n if (existingNames.has(style.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'styles',\n data: {\n name: style.name,\n css: { className: style.css },\n },\n })\n } catch (error: any) {\n console.warn(`[SEED STYLES] Errore su \"${style.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ViewModeList } from './ViewModeList'\n\nexport async function seedViewModes(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'view-modes',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const viewMode of ViewModeList) {\n if (existingNames.has(viewMode.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'view-modes',\n data: {\n ...viewMode,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${viewMode.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ComponentList } from './ComponentList'\n\nexport async function seedComponents(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'component-definitions',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const component of ComponentList) {\n if (existingNames.has(component.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'component-definitions',\n data: {\n ...component,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${component.name}\", skip`, error?.message ?? error)\n }\n }\n}\n"],"names":["generateTailwindStyles","styles","variant","tailwindSelectorVariants","selectors","Object","values","tailwindFieldsSelectors","selector","value","name","push","css","ViewModeList","component","slot","style","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ComponentList","componentName","propsSchema","className","async","UIMSSeeder","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","seedComponents"],"mappings":"0GAQgBA,IACd,MAAMC,EAAsB,GAE5B,IAAK,MAAMC,KAAWC,EACpB,IAAK,MAAMC,KAAaC,OAAOC,OAAOC,GACpC,IAAK,MAAMC,KAAYJ,EAAW,CAChC,MAAMK,EAAQ,GAAGP,EAAQO,QAAQD,IAC3BE,EAAO,KAAKD,IAClBR,EAAOU,KAAK,CACVD,OACAE,IAAKH,GAET,CAIJ,OAAOR,CACT,CCzBO,MAAMY,EAAe,CAC1B,CACEH,KAAM,YACNI,UAAW,YACXb,OAAQ,CACN,CACEc,KAAM,OACNC,MAAO,uBAIb,CACEN,KAAM,OACNI,UAAW,OACXG,kBAAmB,CACjBC,WAAY,CACVC,KAAM,mBAERC,iBAAkB,CAChBD,KAAM,yBAERE,WAAY,CACVC,IAAK,+BA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,CAClCC,WAAY,wBACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKS,GAAYA,EAAGxC,OAEhE,IAAK,MAAMI,KAAaS,EACtB,IAAIe,EAAcI,IAAI5B,EAAUJ,MAIhC,UACQmB,EAAQc,OAAO,CACnBR,WAAY,wBACZS,KAAM,IACD9B,IAGT,CAAE,MAAO+B,GACPC,QAAQC,KAAK,8BAA8BjC,EAAUJ,cAAemC,GAAOG,SAAWH,EACxF,CAEJ,CHNUQ,CAAexB,EAEzB"}
1
+ {"version":3,"file":"index.esm.js","sources":["../../src/seeders/listStyles.ts","../../src/seeders/listViewMode.ts","../../src/seeders/listComponent.ts","../../src/seeders/UIMSSeeder.ts","../../src/seeders/seedStyles.ts","../../src/seeders/seedViewMode.ts","../../src/seeders/seedComponent.ts"],"sourcesContent":["import { tailwindSelectorVariants } from '../tailwind/tailwindSelectorVariants'\nimport { tailwindFieldsSelectors } from '../tailwind/tailwindFieldSelectors'\n\ntype StyleSeed = {\n name: string\n css: string\n}\n\nexport function listStyles(): StyleSeed[] {\n const styles: StyleSeed[] = []\n\n for (const variant of tailwindSelectorVariants) {\n for (const selectors of Object.values(tailwindFieldsSelectors)) {\n for (const selector of selectors) {\n const value = `${variant.value}${selector}` // es. md:mx-auto\n const name = `t:${value}`\n styles.push({\n name,\n css: value,\n })\n }\n }\n }\n\n return styles\n}\n","export const ListViewMode = [\n {\n name: 'Container',\n component: 'Container',\n styles: [\n {\n slot: 'root',\n style: 'container mx-auto',\n },\n ],\n },\n {\n name: 'Card',\n component: 'Card',\n blockPropsMapping: {\n titleProps: {\n text: 'titleProps.text',\n },\n descriptionProps: {\n text: 'descriptionProps.text',\n },\n imageProps: {\n src: 'imageProps.image.value.url',\n },\n },\n styles: [\n {\n slot: 'root',\n style: 'bg-white rounded-md shadow-md',\n },\n ],\n },\n]\n","export const ListComponent = [\n {\n name: 'Card',\n componentName: 'Card',\n propsSchema: {\n titleProps: {\n text: 'string',\n className: 'string',\n },\n descriptionProps: {\n text: 'string',\n className: 'string',\n },\n imageProps: {\n src: 'string',\n className: 'string',\n },\n },\n },\n]\n","import { seedStyles } from './seedStyles'\nimport { seedViewModes } from './seedViewMode'\nimport { seedComponents } from './seedComponent'\n\ntype SeederTarget = 'styles' | 'viewMode' | 'component'\n\ninterface SeederOptions {\n payload: any\n include: SeederTarget[]\n}\n\nexport async function UIMSSeeder({ payload, include }: SeederOptions): Promise<void> {\n if (include.includes('styles')) {\n await seedStyles(payload)\n }\n\n if (include.includes('viewMode')) {\n await seedViewModes(payload)\n }\n\n if (include.includes('component')) {\n await seedComponents(payload)\n }\n}\n","import { listStyles } from './listStyles'\n\nexport async function seedStyles(payload: any): Promise<void> {\n const generatedStyles = listStyles()\n\n const existing = await payload.find({\n collection: 'styles',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((style: any) => style.name))\n\n for (const style of generatedStyles) {\n if (existingNames.has(style.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'styles',\n data: {\n name: style.name,\n css: { className: style.css },\n },\n })\n } catch (error: any) {\n console.warn(`[SEED STYLES] Errore su \"${style.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ListViewMode } from './listViewMode'\n\nexport async function seedViewModes(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'view-modes',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const viewMode of ListViewMode) {\n if (existingNames.has(viewMode.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'view-modes',\n data: {\n ...viewMode,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${viewMode.name}\", skip`, error?.message ?? error)\n }\n }\n}\n","import { ListComponent } from './listComponent'\n\nexport async function seedComponents(payload: any): Promise<void> {\n const existing = await payload.find({\n collection: 'component-definitions',\n limit: 1000000,\n depth: 0,\n })\n\n const existingNames = new Set(existing.docs.map((vm: any) => vm.name))\n\n for (const component of ListComponent) {\n if (existingNames.has(component.name)) {\n continue\n }\n\n try {\n await payload.create({\n collection: 'component-definitions',\n data: {\n ...component,\n },\n })\n } catch (error: any) {\n console.warn(`[SEED VIEWMODE] Errore su \"${component.name}\", skip`, error?.message ?? error)\n }\n }\n}\n"],"names":["listStyles","styles","variant","tailwindSelectorVariants","selectors","Object","values","tailwindFieldsSelectors","selector","value","name","push","css","ListViewMode","component","slot","style","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ListComponent","componentName","propsSchema","className","async","UIMSSeeder","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","seedComponents"],"mappings":"0GAQgBA,IACd,MAAMC,EAAsB,GAE5B,IAAK,MAAMC,KAAWC,EACpB,IAAK,MAAMC,KAAaC,OAAOC,OAAOC,GACpC,IAAK,MAAMC,KAAYJ,EAAW,CAChC,MAAMK,EAAQ,GAAGP,EAAQO,QAAQD,IAC3BE,EAAO,KAAKD,IAClBR,EAAOU,KAAK,CACVD,OACAE,IAAKH,GAET,CAIJ,OAAOR,CACT,CCzBO,MAAMY,EAAe,CAC1B,CACEH,KAAM,YACNI,UAAW,YACXb,OAAQ,CACN,CACEc,KAAM,OACNC,MAAO,uBAIb,CACEN,KAAM,OACNI,UAAW,OACXG,kBAAmB,CACjBC,WAAY,CACVC,KAAM,mBAERC,iBAAkB,CAChBD,KAAM,yBAERE,WAAY,CACVC,IAAK,+BAGTrB,OAAQ,CACN,CACEc,KAAM,OACNC,MAAO,oCC5BR,MAAMO,EAAgB,CAC3B,CACEb,KAAM,OACNc,cAAe,OACfC,YAAa,CACXP,WAAY,CACVC,KAAM,SACNO,UAAW,UAEbN,iBAAkB,CAChBD,KAAM,SACNO,UAAW,UAEbL,WAAY,CACVC,IAAK,SACLI,UAAW,aCJZC,eAAeC,GAAWC,QAAEA,EAAOC,QAAEA,IACtCA,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AA8BjC,EAAUJ,cAAemC,GAAOG,SAAWH,EACxF,CAEJ,CHNUQ,CAAexB,EAEzB"}
@@ -1,2 +1,2 @@
1
1
  export * from './UIMSSeeder';
2
- export * from './generateTailwindStyles';
2
+ export * from './listStyles';
@@ -1,4 +1,4 @@
1
- export declare const ComponentList: {
1
+ export declare const ListComponent: {
2
2
  name: string;
3
3
  componentName: string;
4
4
  propsSchema: {
@@ -1,4 +1,4 @@
1
- export const ComponentList = [
1
+ export const ListComponent = [
2
2
  {
3
3
  name: 'Card',
4
4
  componentName: 'Card',
@@ -2,5 +2,5 @@ type StyleSeed = {
2
2
  name: string;
3
3
  css: string;
4
4
  };
5
- export declare function generateTailwindStyles(): StyleSeed[];
5
+ export declare function listStyles(): StyleSeed[];
6
6
  export {};
@@ -1,6 +1,6 @@
1
1
  import { tailwindSelectorVariants } from '../tailwind/tailwindSelectorVariants';
2
2
  import { tailwindFieldsSelectors } from '../tailwind/tailwindFieldSelectors';
3
- export function generateTailwindStyles() {
3
+ export function listStyles() {
4
4
  const styles = [];
5
5
  for (const variant of tailwindSelectorVariants) {
6
6
  for (const selectors of Object.values(tailwindFieldsSelectors)) {
@@ -1,4 +1,4 @@
1
- export declare const ViewModeList: ({
1
+ export declare const ListViewMode: ({
2
2
  name: string;
3
3
  component: string;
4
4
  styles: {
@@ -1,4 +1,4 @@
1
- export const ViewModeList = [
1
+ export const ListViewMode = [
2
2
  {
3
3
  name: 'Container',
4
4
  component: 'Container',
@@ -1,4 +1,4 @@
1
- import { ComponentList } from './ComponentList';
1
+ import { ListComponent } from './listComponent';
2
2
  export async function seedComponents(payload) {
3
3
  const existing = await payload.find({
4
4
  collection: 'component-definitions',
@@ -6,7 +6,7 @@ export async function seedComponents(payload) {
6
6
  depth: 0,
7
7
  });
8
8
  const existingNames = new Set(existing.docs.map((vm) => vm.name));
9
- for (const component of ComponentList) {
9
+ for (const component of ListComponent) {
10
10
  if (existingNames.has(component.name)) {
11
11
  continue;
12
12
  }
@@ -1,6 +1,6 @@
1
- import { generateTailwindStyles } from './generateTailwindStyles';
1
+ import { listStyles } from './listStyles';
2
2
  export async function seedStyles(payload) {
3
- const generatedStyles = generateTailwindStyles();
3
+ const generatedStyles = listStyles();
4
4
  const existing = await payload.find({
5
5
  collection: 'styles',
6
6
  limit: 1000000,
@@ -1,4 +1,4 @@
1
- import { ViewModeList } from './ViewModeList';
1
+ import { ListViewMode } from './listViewMode';
2
2
  export async function seedViewModes(payload) {
3
3
  const existing = await payload.find({
4
4
  collection: 'view-modes',
@@ -6,7 +6,7 @@ export async function seedViewModes(payload) {
6
6
  depth: 0,
7
7
  });
8
8
  const existingNames = new Set(existing.docs.map((vm) => vm.name));
9
- for (const viewMode of ViewModeList) {
9
+ for (const viewMode of ListViewMode) {
10
10
  if (existingNames.has(viewMode.name)) {
11
11
  continue;
12
12
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woodylab/payload",
3
- "version": "0.0.142",
3
+ "version": "0.0.143",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",
File without changes