@woodylab/payload 0.0.136 → 0.0.138

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 +1 @@
1
- {"version":3,"file":"LayoutRenderer-B9mdu_LN.js","sources":["../src/uims/registry/styleRegistry.ts","../src/uims/registry/viewModeRegistry.ts","../src/uims/registry/componentRegistry.ts","../src/react/LayoutRenderer.tsx","../src/uims/resolver/createUIMSContext.ts"],"sourcesContent":["import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getStyleRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'styles',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getViewModeRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'view-modes',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getComponentRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'component-definitions',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\nimport { resolveLayout } from '../uims'\nimport { createUIMSContext } from '../uims/resolver/createUIMSContext'\n\n//#TODO Ricordarsi di introdurre il concetto di PageRenderer, sarebbe carino se riuscissimo a delegarle la stampa anche dei meta dati e info accessorie oltre al layout.\nexport async function LayoutRenderer({ layout, payload }: { layout: any[]; payload: BasePayload }) {\n const uims = await createUIMSContext(payload)\n const resolvedLayout = await resolveLayout({ layout, context: uims })\n return (\n <>\n {resolvedLayout.map((block: any, i: any) => {\n if (!block) return null\n const { section, container, content } = block\n const { SectionComponent, SectionStylesBySlot } = section\n const { ContainerComponent, ContainerStylesBySlot } = container\n const { ContentComponent } = content\n // #TODO sarebbe carino rimuovere la stampa condizionale e includere invece un blocco View come componente per la stampa generica\n\n return (\n <SectionComponent key={i} className={SectionStylesBySlot.root}>\n <ContainerComponent className={ContainerStylesBySlot.root}>\n <ContentComponent {...content} />\n </ContainerComponent>\n </SectionComponent>\n )\n })}\n </>\n )\n}\n","import { BasePayload } from 'payload'\nimport { UIMSContext } from '../types/UIMSContext'\nimport { getStyleRegistry } from '../registry/styleRegistry'\nimport { getViewModeRegistry } from '../registry/viewModeRegistry'\nimport { getComponentRegistry } from '../registry/componentRegistry'\n\nexport async function createUIMSContext(payload: BasePayload): Promise<UIMSContext> {\n return {\n payload,\n registries: {\n styles: await getStyleRegistry(payload),\n viewMode: await getViewModeRegistry(payload),\n component: await getComponentRegistry(payload),\n },\n }\n}\n"],"names":["cache","async","getStyleRegistry","payload","result","find","collection","depth","pagination","byName","vm","docs","name","getViewModeRegistry","getComponentRegistry","layout","uims","registries","styles","viewMode","component","createUIMSContext","resolvedLayout","resolveLayout","context","_jsx","_Fragment","children","map","block","i","section","container","content","SectionComponent","SectionStylesBySlot","ContainerComponent","ContainerStylesBySlot","ContentComponent","className","root"],"mappings":"yFAEA,IAAIA,EAEO,KAGJC,eAAeC,EA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,iBAAEA,EAAgBC,oBAAEA,GAAwBJ,GAC5CK,mBAAEA,EAAkBC,sBAAEA,GAA0BL,GAChDM,iBAAEA,GAAqBL,EAG7B,OACER,EAAAA,IAACS,EAAgB,CAASK,UAAWJ,EAAoBK,KAAIb,SAC3DF,MAACW,EAAkB,CAACG,UAAWF,EAAsBG,KAAIb,SACvDF,EAAAA,IAACa,EAAgB,IAAKL,OAFHH,MASjC"}
1
+ {"version":3,"file":"LayoutRenderer-B9mdu_LN.js","sources":["../src/uims/registry/styleRegistry.ts","../src/uims/registry/viewModeRegistry.ts","../src/uims/registry/componentRegistry.ts","../src/react/LayoutRenderer.tsx","../src/uims/resolver/createUIMSContext.ts"],"sourcesContent":["import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getStyleRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'styles',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getViewModeRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'view-modes',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getComponentRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'component-definitions',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\nimport { resolveLayout } from '../uims'\nimport { createUIMSContext } from '../uims/resolver/createUIMSContext'\n\n//#TODO Ricordarsi di introdurre il concetto di PageRenderer, sarebbe carino se riuscissimo a delegarle la stampa anche dei meta dati e info accessorie oltre al layout.\nexport async function LayoutRenderer({ layout, payload }: { layout: any[]; payload: BasePayload }) {\n const uims = await createUIMSContext(payload)\n const resolvedLayout = await resolveLayout({ layout, context: uims })\n return (\n <>\n {resolvedLayout.map((block: any, i: any) => {\n if (!block) return null\n const { section, container, content } = block\n const { SectionComponent, SectionStylesBySlot } = section\n const { ContainerComponent, ContainerStylesBySlot } = container\n const { ContentComponent } = content\n\n return (\n <SectionComponent key={i} className={SectionStylesBySlot.root}>\n <ContainerComponent className={ContainerStylesBySlot.root}>\n <ContentComponent {...content} />\n </ContainerComponent>\n </SectionComponent>\n )\n })}\n </>\n )\n}\n","import { BasePayload } from 'payload'\nimport { UIMSContext } from '../types/UIMSContext'\nimport { getStyleRegistry } from '../registry/styleRegistry'\nimport { getViewModeRegistry } from '../registry/viewModeRegistry'\nimport { getComponentRegistry } from '../registry/componentRegistry'\n\nexport async function createUIMSContext(payload: BasePayload): Promise<UIMSContext> {\n return {\n payload,\n registries: {\n styles: await getStyleRegistry(payload),\n viewMode: await getViewModeRegistry(payload),\n component: await getComponentRegistry(payload),\n },\n }\n}\n"],"names":["cache","async","getStyleRegistry","payload","result","find","collection","depth","pagination","byName","vm","docs","name","getViewModeRegistry","getComponentRegistry","layout","uims","registries","styles","viewMode","component","createUIMSContext","resolvedLayout","resolveLayout","context","_jsx","_Fragment","children","map","block","i","section","container","content","SectionComponent","SectionStylesBySl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C/B,IAAKD,EAAO,OAAO,KACnB,MAAME,QAAEA,EAAOC,UAAEA,EAASC,QAAEA,GAAYJ,GAClCK,iBAAEA,EAAgBC,oBAAEA,GAAwBJ,GAC5CK,mBAAEA,EAAkBC,sBAAEA,GAA0BL,GAChDM,iBAAEA,GAAqBL,EAE7B,OACER,EAAAA,IAACS,EAAgB,CAASK,UAAWJ,EAAoBK,KAAIb,SAC3DF,MAACW,EAAkB,CAACG,UAAWF,EAAsBG,KAAIb,SACvDF,EAAAA,IAACa,EAAgB,IAAKL,OAFHH,MASjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"LayoutRenderer-DHEQyk3K.js","sources":["../src/uims/registry/styleRegistry.ts","../src/uims/registry/viewModeRegistry.ts","../src/uims/registry/componentRegistry.ts","../src/react/LayoutRenderer.tsx","../src/uims/resolver/createUIMSContext.ts"],"sourcesContent":["import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getStyleRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'styles',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getViewModeRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'view-modes',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getComponentRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'component-definitions',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\nimport { resolveLayout } from '../uims'\nimport { createUIMSContext } from '../uims/resolver/createUIMSContext'\n\n//#TODO Ricordarsi di introdurre il concetto di PageRenderer, sarebbe carino se riuscissimo a delegarle la stampa anche dei meta dati e info accessorie oltre al layout.\nexport async function LayoutRenderer({ layout, payload }: { layout: any[]; payload: BasePayload }) {\n const uims = await createUIMSContext(payload)\n const resolvedLayout = await resolveLayout({ layout, context: uims })\n return (\n <>\n {resolvedLayout.map((block: any, i: any) => {\n if (!block) return null\n const { section, container, content } = block\n const { SectionComponent, SectionStylesBySlot } = section\n const { ContainerComponent, ContainerStylesBySlot } = container\n const { ContentComponent } = content\n // #TODO sarebbe carino rimuovere la stampa condizionale e includere invece un blocco View come componente per la stampa generica\n\n return (\n <SectionComponent key={i} className={SectionStylesBySlot.root}>\n <ContainerComponent className={ContainerStylesBySlot.root}>\n <ContentComponent {...content} />\n </ContainerComponent>\n </SectionComponent>\n )\n })}\n </>\n )\n}\n","import { BasePayload } from 'payload'\nimport { UIMSContext } from '../types/UIMSContext'\nimport { getStyleRegistry } from '../registry/styleRegistry'\nimport { getViewModeRegistry } from '../registry/viewModeRegistry'\nimport { getComponentRegistry } from '../registry/componentRegistry'\n\nexport async function createUIMSContext(payload: BasePayload): Promise<UIMSContext> {\n return {\n payload,\n registries: {\n styles: await getStyleRegistry(payload),\n viewMode: await getViewModeRegistry(payload),\n component: await getComponentRegistry(payload),\n },\n }\n}\n"],"names":["cache","async","getStyleRegistry","payload","result","find","collection","depth","pagination","byName","vm","docs","name","getViewModeRegistry","getComponentRegistry","LayoutRenderer","layout","uims","registries","styles","viewMode","component","createUIMSContext","resolvedLayout","resolveLayout","context","_jsx","_Fragment","children","map","block","i","section","container","content","SectionComponent","SectionStylesBySlot","ContainerComponent","ContainerStylesBySlot","ContentComponent","className","root"],"mappings":"sGAEA,IAAIA,EAEO,KAGJC,eAAeC,EAAiBC,GACrC,GAAIH,EACF,OAAOA,EAGT,MAAMI,QAAeD,EAAQE,KAAK,CAChCC,WAAY,SACZC,MAAO,EACPC,YAAY,IAGRC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAMN,EAAOO,MAAQ,GAC1BD,EAAGE,OACLH,EAAOC,EAAGE,MAAQF,GAKtB,OADAV,EAAQ,CAAES,UACHT,CACT,CC1BA,IAAIA,EAEO,KAGJC,eAAeY,EAAoBV,GACxC,GAAIH,EACF,OAAOA,EAGT,MAAMI,QAAeD,EAAQE,KAAK,CAChCC,WAAY,aACZC,MAAO,EACPC,YAAY,IAGRC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAMN,EAAOO,MAAQ,GAC1BD,EAAGE,OACLH,EAAOC,EAAGE,MAAQF,GAKtB,OADAV,EAAQ,CAAES,UACHT,CACT,CC1BA,IAAIA,EAEO,KAGJC,eAAea,EAAqBX,GACzC,GAAIH,EACF,OAAOA,EAGT,MAAMI,QAAeD,EAAQE,KAAK,CAChCC,WAAY,wBACZC,MAAO,EACPC,YAAY,IAGRC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAMN,EAAOO,MAAQ,GAC1BD,EAAGE,OACLH,EAAOC,EAAGE,MAAQF,GAKtB,OADAV,EAAQ,CAAES,UACHT,CACT,CCvBOC,eAAec,GAAeC,OAAEA,EAAMb,QAAEA,IAC7C,MAAMc,QCADhB,eAAiCE,GACtC,MAAO,CACLA,UACAe,WAAY,CACVC,aAAcjB,EAAiBC,GAC/BiB,eAAgBP,EAAoBV,GACpCkB,gBAAiBP,EAAqBX,IAG5C,CDTqBmB,CAAkBnB,GAC/BoB,QAAuBC,EAAc,CAAER,SAAQS,QAASR,IAC9D,OACES,EAAAC,EAAA,CAAAC,SACGL,EAAeM,IAAI,CAACC,EAAYC,KAC/B,IAAKD,EAAO,OAAO,KACnB,MAAME,QAAEA,EAAOC,UAAEA,EAASC,QAAEA,GAAYJ,GAClCK,iBAAEA,EAAgBC,oBAAEA,GAAwBJ,GAC5CK,mBAAEA,EAAkBC,sBAAEA,GAA0BL,GAChDM,iBAAEA,GAAqBL,EAG7B,OACER,EAACS,EAAgB,CAASK,UAAWJ,EAAoBK,KAAIb,SAC3DF,EAACW,EAAkB,CAACG,UAAWF,EAAsBG,KAAIb,SACvDF,EAACa,EAAgB,IAAKL,OAFHH,MASjC"}
1
+ {"version":3,"file":"LayoutRenderer-DHEQyk3K.js","sources":["../src/uims/registry/styleRegistry.ts","../src/uims/registry/viewModeRegistry.ts","../src/uims/registry/componentRegistry.ts","../src/react/LayoutRenderer.tsx","../src/uims/resolver/createUIMSContext.ts"],"sourcesContent":["import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getStyleRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'styles',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getViewModeRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'view-modes',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\n\nlet cache: {\n byName: Record<string, any>\n} | null = null\n\n//# TODO sarebbe sensato cancellare la cache o forzare un nuovo caricamento quando viene fatta una modifica a uno degli elementi della collection\nexport async function getComponentRegistry(payload: BasePayload) {\n if (cache) {\n return cache\n }\n\n const result = await payload.find({\n collection: 'component-definitions',\n depth: 4,\n pagination: false,\n })\n\n const byName: Record<string, any> = {}\n\n for (const vm of result.docs ?? []) {\n if (vm.name) {\n byName[vm.name] = vm\n }\n }\n\n cache = { byName }\n return cache\n}\n","import { BasePayload } from 'payload'\nimport { resolveLayout } from '../uims'\nimport { createUIMSContext } from '../uims/resolver/createUIMSContext'\n\n//#TODO Ricordarsi di introdurre il concetto di PageRenderer, sarebbe carino se riuscissimo a delegarle la stampa anche dei meta dati e info accessorie oltre al layout.\nexport async function LayoutRenderer({ layout, payload }: { layout: any[]; payload: BasePayload }) {\n const uims = await createUIMSContext(payload)\n const resolvedLayout = await resolveLayout({ layout, context: uims })\n return (\n <>\n {resolvedLayout.map((block: any, i: any) => {\n if (!block) return null\n const { section, container, content } = block\n const { SectionComponent, SectionStylesBySlot } = section\n const { ContainerComponent, ContainerStylesBySlot } = container\n const { ContentComponent } = content\n\n return (\n <SectionComponent key={i} className={SectionStylesBySlot.root}>\n <ContainerComponent className={ContainerStylesBySlot.root}>\n <ContentComponent {...content} />\n </ContainerComponent>\n </SectionComponent>\n )\n })}\n </>\n )\n}\n","import { BasePayload } from 'payload'\nimport { UIMSContext } from '../types/UIMSContext'\nimport { getStyleRegistry } from '../registry/styleRegistry'\nimport { getViewModeRegistry } from '../registry/viewModeRegistry'\nimport { getComponentRegistry } from '../registry/componentRegistry'\n\nexport async function createUIMSContext(payload: BasePayload): Promise<UIMSContext> {\n return {\n payload,\n registries: {\n styles: await getStyleRegistry(payload),\n viewMode: await getViewModeRegistry(payload),\n component: await getComponentRegistry(payload),\n },\n }\n}\n"],"names":["cache","async","getStyleRegistry","payload","result","find","collection","depth","pagination","byName","vm","docs","name","getViewModeRegistry","getComponentRegistry","LayoutRenderer","layout","uims","registries","styles","viewMode","component","createUIMSContext","resolvedLayout","resolveLayout","context","_jsx","_Fragment","children","map","block","i","section","container","content","SectionComponent","SectionStylesBySlot","ContainerComponent","ContainerStylesBySlot","ContentComponent","className","root"],"mappings":"sGAEA,IAAIA,EAEO,KAGJC,eAAeC,EAAiBC,GACrC,GAAIH,EACF,OAAOA,EAGT,MAAMI,QAAeD,EAAQE,KAAK,CAChCC,WAAY,SACZC,MAAO,EACPC,YAAY,IAGRC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAMN,EAAOO,MAAQ,GAC1BD,EAAGE,OACLH,EAAOC,EAAGE,MAAQF,GAKtB,OADAV,EAAQ,CAAES,UACHT,CACT,CC1BA,IAAIA,EAEO,KAGJC,eAAeY,EAAoBV,GACxC,GAAIH,EACF,OAAOA,EAGT,MAAMI,QAAeD,EAAQE,KAAK,CAChCC,WAAY,aACZC,MAAO,EACPC,YAAY,IAGRC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAMN,EAAOO,MAAQ,GAC1BD,EAAGE,OACLH,EAAOC,EAAGE,MAAQF,GAKtB,OADAV,EAAQ,CAAES,UACHT,CACT,CC1BA,IAAIA,EAEO,KAGJC,eAAea,EAAqBX,GACzC,GAAIH,EACF,OAAOA,EAGT,MAAMI,QAAeD,EAAQE,KAAK,CAChCC,WAAY,wBACZC,MAAO,EACPC,YAAY,IAGRC,EAA8B,CAAA,EAEpC,IAAK,MAAMC,KAAMN,EAAOO,MAAQ,GAC1BD,EAAGE,OACLH,EAAOC,EAAGE,MAAQF,GAKtB,OADAV,EAAQ,CAAES,UACHT,CACT,CCvBOC,eAAec,GAAeC,OAAEA,EAAMb,QAAEA,IAC7C,MAAMc,QCADhB,eAAiCE,GACtC,MAAO,CACLA,UACAe,WAAY,CACVC,aAAcjB,EAAiBC,GAC/BiB,eAAgBP,EAAoBV,GACpCkB,gBAAiBP,EAAqBX,IAG5C,CDTqBmB,CAAkBnB,GAC/BoB,QAAuBC,EAAc,CAAER,SAAQS,QAASR,IAC9D,OACES,EAAAC,EAAA,CAAAC,SACGL,EAAeM,IAAI,CAACC,EAAYC,KAC/B,IAAKD,EAAO,OAAO,KACnB,MAAME,QAAEA,EAAOC,UAAEA,EAASC,QAAEA,GAAYJ,GAClCK,iBAAEA,EAAgBC,oBAAEA,GAAwBJ,GAC5CK,mBAAEA,EAAkBC,sBAAEA,GAA0BL,GAChDM,iBAAEA,GAAqBL,EAE7B,OACER,EAACS,EAAgB,CAASK,UAAWJ,EAAoBK,KAAIb,SAC3DF,EAACW,EAAkB,CAACG,UAAWF,EAAsBG,KAAIb,SACvDF,EAACa,EAAgB,IAAKL,OAFHH,MASjC"}
@@ -12,7 +12,6 @@ export async function LayoutRenderer({ layout, payload }) {
12
12
  const { SectionComponent, SectionStylesBySlot } = section;
13
13
  const { ContainerComponent, ContainerStylesBySlot } = container;
14
14
  const { ContentComponent } = content;
15
- // #TODO sarebbe carino rimuovere la stampa condizionale e includere invece un blocco View come componente per la stampa generica
16
15
  return (_jsx(SectionComponent, { className: SectionStylesBySlot.root, children: _jsx(ContainerComponent, { className: ContainerStylesBySlot.root, children: _jsx(ContentComponent, { ...content }) }) }, i));
17
16
  }) }));
18
17
  }
@@ -1,6 +1,6 @@
1
1
  export declare const ViewModeList: {
2
2
  name: string;
3
- componentName: string;
3
+ component: string;
4
4
  blockPropsMapping: {
5
5
  titleProps: {
6
6
  text: string;
@@ -1,7 +1,7 @@
1
1
  export const ViewModeList = [
2
2
  {
3
3
  name: 'Card',
4
- componentName: 'Card',
4
+ component: 'Card',
5
5
  blockPropsMapping: {
6
6
  titleProps: {
7
7
  text: 'titleProps.text',
@@ -5,7 +5,7 @@ export async function seedComponents(payload) {
5
5
  limit: 1000000,
6
6
  depth: 0,
7
7
  });
8
- const existingNames = new Set(existing.docs.map((c) => c.name));
8
+ const existingNames = new Set(existing.docs.map((vm) => vm.name));
9
9
  for (const component of ComponentList) {
10
10
  if (existingNames.has(component.name)) {
11
11
  continue;
@@ -1,2 +1,2 @@
1
- "use strict";var e=require("../tailwind/index.cjs.js");const 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}`,a=`t:${n}`;t.push({name:a,css:n})}return t};const s=[{name:"Card",componentName:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}}}];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:a}){a.includes("styles")&&await async function(e){const s=t(),n=await e.find({collection:"styles",limit:1e6,depth:0}),a=new Set(n.docs.map(e=>e.name));for(const t of s)if(!a.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),a.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),a.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");const 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}`,a=`t:${n}`;t.push({name:a,css:n})}return t};const s=[{name:"Card",component:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}}}];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:a}){a.includes("styles")&&await async function(e){const s=t(),n=await e.find({collection:"styles",limit:1e6,depth:0}),a=new Set(n.docs.map(e=>e.name));for(const t of s)if(!a.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),a.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),a.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;
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}\nexport const 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: 'Card',\n componentName: '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 },\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((c: any) => c.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","componentName","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ComponentList","propsSchema","className","async","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","style","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","c","component","seedComponents"],"mappings":"uDAOO,MAAMA,EAAyB,KACpC,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,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EACvF,CAEJ,CFVUO,CAAcxB,GAGlBC,EAAQC,SAAS,oBGlBhBH,eAA8BC,GACnC,MAAMI,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,wBACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKa,GAAWA,EAAExC,OAE9D,IAAK,MAAMyC,KAAa9B,EACtB,IAAIa,EAAcK,IAAIY,EAAUzC,MAIhC,UACQe,EAAQe,OAAO,CACnBT,WAAY,wBACZU,KAAM,IACDU,IAGT,CAAE,MAAOT,GACPC,QAAQC,KAAK,8BAA8BO,EAAUzC,cAAegC,GAAOG,SAAWH,EACxF,CAEJ,CHNUU,CAAe3B,EAEzB"}
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}\nexport const 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: '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 },\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","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ComponentList","componentName","propsSchema","className","async","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","style","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","seedComponents"],"mappings":"uDAOO,MAAMA,EAAyB,KACpC,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,GCvBF,MAAMY,EAAe,CAC1B,CACEH,KAAM,OACNI,UAAW,OACXC,kBAAmB,CACjBC,WAAY,CACVC,KAAM,mBAERC,iBAAkB,CAChBD,KAAM,yBAERE,WAAY,CACVC,IAAK,iCCZN,MAAMC,EAAgB,CAC3B,CACEX,KAAM,OACNY,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,EAAkB7B,IAElB8B,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,SACZC,MAAO,IACPC,MAAO,IAGHC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Selectors as t}from"../tailwind/index.esm.js";const s=()=>{const s=[];for(const n of e)for(const e of Object.values(t))for(const t of e){const e=`${n.value}${t}`,o=`t:${e}`;s.push({name:o,css:e})}return s};const n=[{name:"Card",componentName:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}}}];const o=[{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=s(),n=await e.find({collection:"styles",limit:1e6,depth:0}),o=new Set(n.docs.map(e=>e.name));for(const s of t)if(!o.has(s.name))try{await e.create({collection:"styles",data:{name:s.name,css:{className:s.css}}})}catch(e){console.warn(`[SEED STYLES] Errore su "${s.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}),s=new Set(t.docs.map(e=>e.name));for(const t of n)if(!s.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}),s=new Set(t.docs.map(e=>e.name));for(const t of o)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)}export{a as UIMSSeeder,s as generateTailwindStyles};
1
+ import{tailwindSelectorVariants as e,tailwindFieldsSelectors as t}from"../tailwind/index.esm.js";const s=()=>{const s=[];for(const n of e)for(const e of Object.values(t))for(const t of e){const e=`${n.value}${t}`,o=`t:${e}`;s.push({name:o,css:e})}return s};const n=[{name:"Card",component:"Card",blockPropsMapping:{titleProps:{text:"titleProps.text"},descriptionProps:{text:"descriptionProps.text"},imageProps:{src:"imageProps.image.value.url"}}}];const o=[{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=s(),n=await e.find({collection:"styles",limit:1e6,depth:0}),o=new Set(n.docs.map(e=>e.name));for(const s of t)if(!o.has(s.name))try{await e.create({collection:"styles",data:{name:s.name,css:{className:s.css}}})}catch(e){console.warn(`[SEED STYLES] Errore su "${s.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}),s=new Set(t.docs.map(e=>e.name));for(const t of n)if(!s.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}),s=new Set(t.docs.map(e=>e.name));for(const t of o)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)}export{a as UIMSSeeder,s as generateTailwindStyles};
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}\nexport const 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: 'Card',\n componentName: '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 },\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((c: any) => c.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","componentName","blockPropsMapping","titleProps","text","descriptionProps","imageProps","src","ComponentList","propsSchema","className","async","UIMSSeeder","payload","include","includes","generatedStyles","existing","find","collection","limit","depth","existingNames","Set","docs","map","style","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","c","component","seedComponents"],"mappings":"iGAOO,MAAMA,EAAyB,KACpC,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,GCvBF,MAAMY,EAAe,CAC1B,CACEH,KAAM,OACNI,cAAe,OACfC,kBAAmB,CACjBC,WAAY,CACVC,KAAM,mBAERC,iBAAkB,CAChBD,KAAM,yBAERE,WAAY,CACVC,IAAK,iCCZN,MAAMC,EAAgB,CAC3B,CAC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,EAASO,KAAKC,IAAKa,GAAWA,EAAEzC,OAE9D,IAAK,MAAM0C,KAAa/B,EACtB,IAAIc,EAAcK,IAAIY,EAAU1C,MAIhC,UACQgB,EAAQe,OAAO,CACnBT,WAAY,wBACZU,KAAM,IACDU,IAGT,CAAE,MAAOT,GACPC,QAAQC,KAAK,8BAA8BO,EAAU1C,cAAeiC,GAAOG,SAAWH,EACxF,CAEJ,CHNUU,CAAe3B,EAEzB"}
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}\nexport const 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: '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 },\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","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","style","has","create","data","error","console","warn","message","seedStyles","vm","viewMode","seedViewModes","seedComponents"],"mappings":"iGAOO,MAAMA,EAAyB,KACpC,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,GCvBF,MAAMY,EAAe,CAC1B,CACEH,KAAM,OACNI,UAAW,OACXC,kBAAmB,CACjBC,WAAY,CACVC,KAAM,mBAERC,iBAAkB,CAChBD,KAAM,yBAERE,WAAY,CACVC,IAAK,iCCZN,MAAMC,EAAgB,CAC3B,CACEX,KAAM,OACNY,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,EAAQC,SAAS,iBCVhBJ,eAA0BE,GAC/B,MAAMG,EAAkB9B,IAElB+B,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,SACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKC,GAAeA,EAAM9B,OAEtE,IAAK,MAAM8B,KAASV,EAClB,IAAIM,EAAcK,IAAID,EAAM9B,MAI5B,UACQiB,EAAQe,OAAO,CACnBT,WAAY,SACZU,KAAM,CACJjC,KAAM8B,EAAM9B,KACZE,IAAK,CAAEY,UAAWgB,EAAM5B,OAG9B,CAAE,MAAOgC,GACPC,QAAQC,KAAK,4BAA4BN,EAAM9B,cAAekC,GAAOG,SAAWH,EAClF,CAEJ,CDjBUI,CAAWrB,GAGfC,EAAQC,SAAS,mBEdhBJ,eAA6BE,GAClC,MAAMI,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,aACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKU,GAAYA,EAAGvC,OAEhE,IAAK,MAAMwC,KAAYrC,EACrB,IAAIuB,EAAcK,IAAIS,EAASxC,MAI/B,UACQiB,EAAQe,OAAO,CACnBT,WAAY,aACZU,KAAM,IACDO,IAGT,CAAE,MAAON,GACPC,QAAQC,KAAK,8BAA8BI,EAASxC,cAAekC,GAAOG,SAAWH,EACvF,CAEJ,CFVUO,CAAcxB,GAGlBC,EAAQC,SAAS,oBGlBhBJ,eAA8BE,GACnC,MAAMI,QAAiBJ,EAAQK,KAAK,CAClCC,WAAY,wBACZC,MAAO,IACPC,MAAO,IAGHC,EAAgB,IAAIC,IAAIN,EAASO,KAAKC,IAAKU,GAAYA,EAAGvC,OAEhE,IAAK,MAAMI,KAAaO,EACtB,IAAIe,EAAcK,IAAI3B,EAAUJ,MAIhC,UACQiB,EAAQe,OAAO,CACnBT,WAAY,wBACZU,KAAM,IACD7B,IAGT,CAAE,MAAO8B,GACPC,QAAQC,KAAK,8BAA8BhC,EAAUJ,cAAekC,GAAOG,SAAWH,EACxF,CAEJ,CHNUQ,CAAezB,EAEzB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@woodylab/payload",
3
- "version": "0.0.136",
3
+ "version": "0.0.138",
4
4
  "type": "module",
5
5
  "main": "./dist/index.cjs.js",
6
6
  "module": "./dist/index.esm.js",