@cratis/scene.blueprint.components 4.10.0 → 4.11.0

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 (32) hide show
  1. package/dist/cjs/componentsBlueprint.js +7 -7
  2. package/dist/cjs/gallery/GalleryScreenPreview.js +109 -16
  3. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
  4. package/dist/cjs/gallery/businessGallery.js +34 -0
  5. package/dist/cjs/gallery/businessGallery.js.map +1 -0
  6. package/dist/cjs/index.js +3 -0
  7. package/dist/cjs/index.js.map +1 -1
  8. package/dist/esm/componentsBlueprint.js +7 -7
  9. package/dist/esm/gallery/BusinessGalleryCategory.d.ts +6 -0
  10. package/dist/esm/gallery/BusinessGalleryCategory.d.ts.map +1 -0
  11. package/dist/esm/gallery/BusinessGalleryCategory.js +2 -0
  12. package/dist/esm/gallery/BusinessGalleryCategory.js.map +1 -0
  13. package/dist/esm/gallery/GalleryScreenPreview.d.ts +4 -3
  14. package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -1
  15. package/dist/esm/gallery/GalleryScreenPreview.js +114 -22
  16. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
  17. package/dist/esm/gallery/businessGallery.d.ts +4 -0
  18. package/dist/esm/gallery/businessGallery.d.ts.map +1 -0
  19. package/dist/esm/gallery/businessGallery.js +32 -0
  20. package/dist/esm/gallery/businessGallery.js.map +1 -0
  21. package/dist/esm/gallery/index.d.ts +2 -0
  22. package/dist/esm/gallery/index.d.ts.map +1 -1
  23. package/dist/esm/gallery/index.js +2 -0
  24. package/dist/esm/gallery/index.js.map +1 -1
  25. package/dist/esm/index.js +2 -1
  26. package/dist/esm/index.js.map +1 -1
  27. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  28. package/gallery/BusinessGalleryCategory.ts +12 -0
  29. package/gallery/GalleryScreenPreview.tsx +85 -19
  30. package/gallery/businessGallery.ts +19 -0
  31. package/gallery/index.ts +2 -0
  32. package/package.json +11 -11
@@ -0,0 +1 @@
1
+ {"version":3,"file":"businessGallery.js","sources":["../../../gallery/businessGallery.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { BusinessGalleryCategory } from './BusinessGalleryCategory';\nimport { componentsPageTemplates } from '../templates';\n\n/**\n * Returns templates grouped by visible gallery category and filtered by scope metadata.\n */\nexport function businessGallery(scope: TemplateScope, templates: ScreenTemplate[] = componentsPageTemplates): BusinessGalleryCategory[] {\n const categories = new Map<string, ScreenTemplate[]>();\n for (const template of templates.filter(template => template.metadata?.scopes?.includes(scope))) {\n const category = template.metadata?.category ?? 'Business / Other';\n categories.set(category, [...(categories.get(category) ?? []), template]);\n }\n\n return [...categories.entries()].map(([category, categoryTemplates]) => ({ category, templates: categoryTemplates }));\n}\n"],"names":["businessGallery","scope","templates","componentsPageTemplates","categories","Map","template","filter","metadata","scopes","includes","category","set","get","entries","map","categoryTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAMA;;AAEC,IACM,SAASA,eAAAA,CAAgBC,KAAoB,EAAEC,YAA8BC,uBAAuB,EAAA;AACvG,IAAA,MAAMC,aAAa,IAAIC,GAAAA,EAAAA;AACvB,IAAA,KAAK,MAAMC,QAAAA,IAAYJ,SAAAA,CAAUK,MAAM,CAACD,CAAAA,QAAAA,GAAYA,QAAAA,CAASE,QAAQ,EAAEC,MAAAA,EAAQC,QAAAA,CAAST,KAAAA,CAAAA,CAAAA,CAAS;AAC7F,QAAA,MAAMU,QAAAA,GAAWL,QAAAA,CAASE,QAAQ,EAAEG,QAAAA,IAAY,kBAAA;QAChDP,UAAAA,CAAWQ,GAAG,CAACD,QAAAA,EAAU;eAAKP,UAAAA,CAAWS,GAAG,CAACF,QAAAA,CAAAA,IAAa,EAAE;AAAGL,YAAAA;AAAS,SAAA,CAAA;AAC5E,IAAA;IAEA,OAAO;AAAIF,QAAAA,GAAAA,UAAAA,CAAWU,OAAO;AAAG,KAAA,CAACC,GAAG,CAAC,CAAC,CAACJ,QAAAA,EAAUK,iBAAAA,CAAkB,IAAM;AAAEL,YAAAA,QAAAA;YAAUT,SAAAA,EAAWc;SAAkB,CAAA,CAAA;AACtH;;"}
@@ -1,3 +1,5 @@
1
+ export * from './BusinessGalleryCategory';
2
+ export * from './businessGallery';
1
3
  export * from './navigation';
2
4
  export * from './applicationChrome';
3
5
  export * from './screens';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../gallery/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../gallery/index.ts"],"names":[],"mappings":"AAGA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
@@ -1,3 +1,5 @@
1
+ export * from './BusinessGalleryCategory';
2
+ export * from './businessGallery';
1
3
  export * from './navigation';
2
4
  export * from './applicationChrome';
3
5
  export * from './screens';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../gallery/index.ts"],"names":[],"mappings":"AAGA,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../gallery/index.ts"],"names":[],"mappings":"AAGA,cAAc,2BAA2B,CAAC;AAC1C,cAAc,mBAAmB,CAAC;AAClC,cAAc,cAAc,CAAC;AAC7B,cAAc,qBAAqB,CAAC;AACpC,cAAc,WAAW,CAAC;AAC1B,cAAc,kBAAkB,CAAC;AACjC,cAAc,wBAAwB,CAAC;AACvC,cAAc,yBAAyB,CAAC"}
package/dist/esm/index.js CHANGED
@@ -19,11 +19,12 @@ export { editorTemplates, objectEditorPageTemplate, schemaEditorPageTemplate } f
19
19
  export { commandSliceSectionTemplate, dataFeatureSectionTemplate, dataModulePageTemplate, nestingChainTemplates } from './templates/nesting.js';
20
20
  export { busyDialogTemplate, commandDialogTemplate, componentsDialogTemplates, confirmDialogTemplate } from './templates/dialogTemplates.js';
21
21
  export { componentsPageTemplates, componentsScreenTemplates } from './templates/screenTemplates.js';
22
+ export { businessGallery } from './gallery/businessGallery.js';
22
23
  export { componentsNavigationContributions, componentsNavigationEntries, componentsNavigationGroups, entriesInGroup, groupOfScreen, labelOfScreen } from './gallery/navigation.js';
23
24
  export { componentsApplicationChrome } from './gallery/applicationChrome.js';
24
25
  export { componentsGalleryScreen, componentsGalleryScreens } from './gallery/screens.js';
25
26
  export { componentsBlueprintCatalog, componentsBlueprintProfile, primeReactComponentNames } from './gallery/previewProfile.js';
26
- export { GalleryScreenPreview, componentsPreviewRegistry } from './gallery/GalleryScreenPreview.js';
27
+ export { GalleryScreenPreview, componentsPreviewBundles, componentsPreviewRegistry } from './gallery/GalleryScreenPreview.js';
27
28
  export { DialogTemplatePreview } from './gallery/DialogTemplatePreview.js';
28
29
  export { componentsBlueprintComponents } from './componentsBlueprintComponents.js';
29
30
  export { componentsBlueprint, componentsBlueprintManifest } from './componentsBlueprint.js';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}