@cratis/scene.blueprint.components 4.16.0 → 4.17.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 (40) hide show
  1. package/dist/cjs/gallery/navigation.js +7 -0
  2. package/dist/cjs/gallery/navigation.js.map +1 -1
  3. package/dist/cjs/gallery/screens.js +1 -1
  4. package/dist/cjs/gallery/screens.js.map +1 -1
  5. package/dist/cjs/index.js +1 -0
  6. package/dist/cjs/index.js.map +1 -1
  7. package/dist/cjs/templates/SampleBindingName.js +1 -0
  8. package/dist/cjs/templates/SampleBindingName.js.map +1 -1
  9. package/dist/cjs/templates/commandTemplates.js +68 -1
  10. package/dist/cjs/templates/commandTemplates.js.map +1 -1
  11. package/dist/cjs/templates/screenTemplates.js +2 -2
  12. package/dist/cjs/templates/screenTemplates.js.map +1 -1
  13. package/dist/esm/gallery/ArcPages.stories.d.ts +1 -0
  14. package/dist/esm/gallery/ArcPages.stories.d.ts.map +1 -1
  15. package/dist/esm/gallery/ArcPages.stories.js +2 -1
  16. package/dist/esm/gallery/ArcPages.stories.js.map +1 -1
  17. package/dist/esm/gallery/navigation.d.ts.map +1 -1
  18. package/dist/esm/gallery/navigation.js +7 -0
  19. package/dist/esm/gallery/navigation.js.map +1 -1
  20. package/dist/esm/gallery/screens.js +1 -1
  21. package/dist/esm/gallery/screens.js.map +1 -1
  22. package/dist/esm/index.js +1 -1
  23. package/dist/esm/templates/SampleBindingName.d.ts +2 -1
  24. package/dist/esm/templates/SampleBindingName.d.ts.map +1 -1
  25. package/dist/esm/templates/SampleBindingName.js +1 -0
  26. package/dist/esm/templates/SampleBindingName.js.map +1 -1
  27. package/dist/esm/templates/commandTemplates.d.ts +1 -0
  28. package/dist/esm/templates/commandTemplates.d.ts.map +1 -1
  29. package/dist/esm/templates/commandTemplates.js +68 -2
  30. package/dist/esm/templates/commandTemplates.js.map +1 -1
  31. package/dist/esm/templates/screenTemplates.js +2 -2
  32. package/dist/esm/templates/screenTemplates.js.map +1 -1
  33. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  34. package/gallery/ArcPages.stories.tsx +4 -1
  35. package/gallery/navigation.ts +1 -0
  36. package/gallery/screens.ts +1 -1
  37. package/package.json +11 -11
  38. package/templates/SampleBindingName.ts +3 -0
  39. package/templates/commandTemplates.ts +39 -1
  40. package/templates/screenTemplates.ts +2 -2
@@ -59,6 +59,13 @@ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
59
59
  group: 'Billing',
60
60
  order: 60
61
61
  },
62
+ {
63
+ label: 'Settings',
64
+ targetScreen: 'SettingsPage',
65
+ icon: 'pi pi-cog',
66
+ group: 'Billing',
67
+ order: 70
68
+ },
62
69
  {
63
70
  label: 'Event type schema',
64
71
  targetScreen: 'SchemaEditorPage',
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","sources":["../../../gallery/navigation.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 { Contribution } from '@cratis/scene.model';\nimport { NavigationEntry, navigationContributionPoint, navigationElement } from '@cratis/scene.blueprint.default';\n\n/**\n * The navigation for this blueprint's gallery, declared once.\n *\n * One list, two consumers: the sidebar menu renders it as `menuItem` elements, and the same elements go to\n * the `Navigation` contribution point where the default blueprint's aggregation turns them back into\n * navigation items. Maintaining a menu *and* a separate navigation declaration would mean two lists that\n * agree right up until someone adds a screen to one of them.\n *\n * `navigationElement` and the contribution point name are the default blueprint's, not this package's.\n * Reimplementing them here would produce a menu that looked identical and contributed to a contribution\n * point nothing reads - which is the exact failure mode a blueprint-on-blueprint dependency exists to\n * avoid.\n */\nexport const componentsNavigationEntries: NavigationEntry[] = [\n { label: 'Dashboard', targetScreen: 'DashboardPage', icon: 'pi pi-chart-bar', group: 'Billing', order: 10 },\n { label: 'Invoices', targetScreen: 'DataListPage', icon: 'pi pi-list', group: 'Billing', order: 20 },\n { label: 'In flight', targetScreen: 'ObservableDataListPage', icon: 'pi pi-bolt', group: 'Billing', order: 30 },\n { label: 'Invoices and detail', targetScreen: 'DataListWithDetailPage', icon: 'pi pi-window-maximize', group: 'Billing', order: 40 },\n { label: 'Master and detail', targetScreen: 'MasterDetailPage', icon: 'pi pi-table', group: 'Billing', order: 50 },\n { label: 'Register an invoice', targetScreen: 'CommandFormPage', icon: 'pi pi-plus-circle', group: 'Billing', order: 60 },\n { label: 'Event type schema', targetScreen: 'SchemaEditorPage', icon: 'pi pi-sitemap', group: 'Inspect', order: 10 },\n { label: 'Invoice document', targetScreen: 'ObjectEditorPage', icon: 'pi pi-file-edit', group: 'Inspect', order: 20 },\n { label: 'Billing module', targetScreen: 'DataModulePage', icon: 'pi pi-th-large', group: 'Nesting', order: 10 },\n { label: 'Adjustments feature', targetScreen: 'DataFeatureSection', icon: 'pi pi-folder', group: 'Nesting', order: 20 },\n { label: 'Record an adjustment', targetScreen: 'CommandSliceSection', icon: 'pi pi-pencil', group: 'Nesting', order: 30 },\n];\n\n/**\n * The navigation as contributions to the `Navigation` contribution point.\n *\n * A screen carries these in its `contributions`, and anything bound to the contribution point recomputes\n * from whatever is currently in scope - so a screen that contributes an extra entry gets it into the\n * navigation without the navigation knowing that screen exists.\n */\nexport const componentsNavigationContributions: Contribution[] = componentsNavigationEntries.map(entry => ({\n contributionPointName: navigationContributionPoint,\n content: navigationElement(entry),\n order: entry.order,\n}));\n\n/** The navigation entries of one group, in order. */\nexport function entriesInGroup(group: string): NavigationEntry[] {\n return componentsNavigationEntries.filter(entry => entry.group === group).sort((first, second) => first.order - second.order);\n}\n\n/** Every group named by the navigation, in first-declared order. */\nexport const componentsNavigationGroups: string[] = [...new Set(componentsNavigationEntries.map(entry => entry.group))];\n\n/** The section a screen belongs to, for the first entry of its breadcrumb trail. */\nexport function groupOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.group;\n}\n\n/** The navigation label of a screen, for the last entry of its breadcrumb trail. */\nexport function labelOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.label;\n}\n"],"names":["componentsNavigationEntries","label","targetScreen","icon","group","order","componentsNavigationContributions","map","entry","contributionPointName","navigationContributionPoint","content","navigationElement","entriesInGroup","filter","sort","first","second","componentsNavigationGroups","Set","groupOfScreen","screenName","find","labelOfScreen"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;;;UAaaA,2BAAAA,GAAiD;AAC1D,IAAA;QAAEC,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,eAAA;QAAiBC,IAAAA,EAAM,iBAAA;QAAmBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC1G,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,cAAA;QAAgBC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC9G,IAAA;QAAEJ,KAAAA,EAAO,qBAAA;QAAuBC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,uBAAA;QAAyBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnI,IAAA;QAAEJ,KAAAA,EAAO,mBAAA;QAAqBC,YAAAA,EAAc,kBAAA;QAAoBC,IAAAA,EAAM,aAAA;QAAeC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACjH,IAAA;QAAEJ,KAAAA,EAAO,qBAAA;QAAuBC,YAAAA,EAAc,iBAAA;QAAmBC,IAAAA,EAAM,mBAAA;QAAqBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACxH,IAAA;QAA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,KAAK,CAAA;AAChI;AAEA,qEACO,MAAMa,0BAAAA,GAAuC;AAAI,IAAA,GAAA,IAAIC,IAAInB,2BAAAA,CAA4BO,GAAG,CAACC,CAAAA,KAAAA,GAASA,MAAMJ,KAAK,CAAA;;AAEpH,qFACO,SAASgB,aAAAA,CAAcC,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAajB,KAAAA;AACzF;AAEA,qFACO,SAASmB,aAAAA,CAAcF,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAapB,KAAAA;AACzF;;;;;;;"}
1
+ {"version":3,"file":"navigation.js","sources":["../../../gallery/navigation.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 { Contribution } from '@cratis/scene.model';\nimport { NavigationEntry, navigationContributionPoint, navigationElement } from '@cratis/scene.blueprint.default';\n\n/**\n * The navigation for this blueprint's gallery, declared once.\n *\n * One list, two consumers: the sidebar menu renders it as `menuItem` elements, and the same elements go to\n * the `Navigation` contribution point where the default blueprint's aggregation turns them back into\n * navigation items. Maintaining a menu *and* a separate navigation declaration would mean two lists that\n * agree right up until someone adds a screen to one of them.\n *\n * `navigationElement` and the contribution point name are the default blueprint's, not this package's.\n * Reimplementing them here would produce a menu that looked identical and contributed to a contribution\n * point nothing reads - which is the exact failure mode a blueprint-on-blueprint dependency exists to\n * avoid.\n */\nexport const componentsNavigationEntries: NavigationEntry[] = [\n { label: 'Dashboard', targetScreen: 'DashboardPage', icon: 'pi pi-chart-bar', group: 'Billing', order: 10 },\n { label: 'Invoices', targetScreen: 'DataListPage', icon: 'pi pi-list', group: 'Billing', order: 20 },\n { label: 'In flight', targetScreen: 'ObservableDataListPage', icon: 'pi pi-bolt', group: 'Billing', order: 30 },\n { label: 'Invoices and detail', targetScreen: 'DataListWithDetailPage', icon: 'pi pi-window-maximize', group: 'Billing', order: 40 },\n { label: 'Master and detail', targetScreen: 'MasterDetailPage', icon: 'pi pi-table', group: 'Billing', order: 50 },\n { label: 'Register an invoice', targetScreen: 'CommandFormPage', icon: 'pi pi-plus-circle', group: 'Billing', order: 60 },\n { label: 'Settings', targetScreen: 'SettingsPage', icon: 'pi pi-cog', group: 'Billing', order: 70 },\n { label: 'Event type schema', targetScreen: 'SchemaEditorPage', icon: 'pi pi-sitemap', group: 'Inspect', order: 10 },\n { label: 'Invoice document', targetScreen: 'ObjectEditorPage', icon: 'pi pi-file-edit', group: 'Inspect', order: 20 },\n { label: 'Billing module', targetScreen: 'DataModulePage', icon: 'pi pi-th-large', group: 'Nesting', order: 10 },\n { label: 'Adjustments feature', targetScreen: 'DataFeatureSection', icon: 'pi pi-folder', group: 'Nesting', order: 20 },\n { label: 'Record an adjustment', targetScreen: 'CommandSliceSection', icon: 'pi pi-pencil', group: 'Nesting', order: 30 },\n];\n\n/**\n * The navigation as contributions to the `Navigation` contribution point.\n *\n * A screen carries these in its `contributions`, and anything bound to the contribution point recomputes\n * from whatever is currently in scope - so a screen that contributes an extra entry gets it into the\n * navigation without the navigation knowing that screen exists.\n */\nexport const componentsNavigationContributions: Contribution[] = componentsNavigationEntries.map(entry => ({\n contributionPointName: navigationContributionPoint,\n content: navigationElement(entry),\n order: entry.order,\n}));\n\n/** The navigation entries of one group, in order. */\nexport function entriesInGroup(group: string): NavigationEntry[] {\n return componentsNavigationEntries.filter(entry => entry.group === group).sort((first, second) => first.order - second.order);\n}\n\n/** Every group named by the navigation, in first-declared order. */\nexport const componentsNavigationGroups: string[] = [...new Set(componentsNavigationEntries.map(entry => entry.group))];\n\n/** The section a screen belongs to, for the first entry of its breadcrumb trail. */\nexport function groupOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.group;\n}\n\n/** The navigation label of a screen, for the last entry of its breadcrumb trail. */\nexport function labelOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.label;\n}\n"],"names":["componentsNavigationEntries","label","targetScreen","icon","group","order","componentsNavigationContributions","map","entry","contributionPointName","navigationContributionPoint","content","navigationElement","entriesInGroup","filter","sort","first","second","componentsNavigationGroups","Set","groupOfScreen","screenName","find","labelOfScreen"],"mappings":";;;;AAAA;AACA;AAKA;;;;;;;;;;;;UAaaA,2BAAAA,GAAiD;AAC1D,IAAA;QAAEC,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,eAAA;QAAiBC,IAAAA,EAAM,iBAAA;QAAmBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC1G,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,cAAA;QAAgBC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC9G,IAAA;QAAEJ,KAAAA,EAAO,qBAAA;QAAuBC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,uBAAA;QAAyBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnI,IAAA;QAAEJ,KAAAA,EAAO,mBAAA;QAAqBC,YAAAA,EAAc,kBAAA;QAAoBC,IAAAA,EAAM,aAAA;QAAeC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACjH,IAAA;QAAEJ,KAAAA,EAAO,qBAAA;QAAuBC,YAAAA,EAAc,iBAAA;QAAmBC,IAAAA,EAAM,mBAAA;QAAqBC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SAASQ,cAAAA,CAAeT,KAAa,EAAA;AACxC,IAAA,OAAOJ,4BAA4Bc,MAAM,CAACN,CAAAA,KAAAA,GAASA,KAAAA,CAAMJ,KAAK,KAAKA,KAAAA,CAAAA,CAAOW,IAAI,CAAC,CAACC,KAAAA,EAAOC,MAAAA,GAAWD,MAAMX,KAAK,GAAGY,OAAOZ,KAAK,CAAA;AAChI;AAEA,qEACO,MAAMa,0BAAAA,GAAuC;AAAI,IAAA,GAAA,IAAIC,IAAInB,2BAAAA,CAA4BO,GAAG,CAACC,CAAAA,KAAAA,GAASA,MAAMJ,KAAK,CAAA;;AAEpH,qFACO,SAASgB,aAAAA,CAAcC,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAajB,KAAAA;AACzF;AAEA,qFACO,SAASmB,aAAAA,CAAcF,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAapB,KAAAA;AACzF;;;;;;;"}
@@ -48,7 +48,7 @@ var navigation = require('./navigation.js');
48
48
  /**
49
49
  * The chain of templates a screen renders through, outermost first.
50
50
  *
51
- * The eight page templates fit the layout's own `content` slot, so each one's chain is just itself. The
51
+ * The nine page templates fit the layout's own `content` slot, so each one's chain is just itself. The
52
52
  * three nesting-chain templates are the exception and the only ones that need the walk - which is the
53
53
  * honest version of the story: nesting exists for the applications that need it, and costs nothing for the
54
54
  * ones that do not.
@@ -1 +1 @@
1
- {"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, nestScreenTemplates, templateContentInLayout } from '@cratis/scene.blueprint.default';\nimport { componentsScreenTemplates, nestingChainTemplates } from '../templates';\nimport { componentsApplicationChrome } from './applicationChrome';\nimport { componentsNavigationContributions } from './navigation';\n\n/**\n * The gallery: one {@link Screen} per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n *\n * They will render with unregistered bindings, and that is the normal design-time state rather than a\n * shortcoming of the gallery. A host owns the generated Arc proxies; a gallery is not a host. What a\n * preview therefore shows is every Arc-bound region as a placeholder naming the binding it wanted, every\n * Arc-free region rendered for real, and a header on each page saying which of the two you are looking at.\n *\n * Every screen renders in the default blueprint's `AppShell`. There is no full-page variant here because\n * there is no Arc-bound page that belongs outside the application shell - a sign-in screen queries nothing\n * and submits no command, so it stays where it already is, in the default blueprint.\n */\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(componentsApplicationChrome(template.name), templateContentInLayout(placeable, appShellLayout)),\n forms: [],\n contributions: componentsNavigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * The eight page templates fit the layout's own `content` slot, so each one's chain is just itself. The\n * three nesting-chain templates are the exception and the only ones that need the walk - which is the\n * honest version of the story: nesting exists for the applications that need it, and costs nothing for the\n * ones that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/** One screen per screen template this blueprint provides. */\nexport const componentsGalleryScreens: Screen[] = componentsScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function componentsGalleryScreen(name: string): Screen | undefined {\n return componentsGalleryScreens.find(screen => screen.name === name);\n}\n"],"names":["screenFor","template","placeable","nestScreenTemplates","containmentChainFor","name","layout","LayoutName","AppShell","screenTemplate","slotContent","mergeSlotContent","componentsApplicationChrome","templateContentInLayout","appShellLayout","forms","contributions","componentsNavigationContributions","depth","nestingChainTemplates","findIndex","candidate","slice","chrome","content","merged","slotName","elements","Object","entries","componentsGalleryScreens","componentsScreenTemplates","map","componentsGalleryScreen","find","screen"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;IAwBA,SAASA,UAAUC,QAAwB,EAAA;IACvC,MAAMC,SAAAA,GAAYC,4CAAoBC,mBAAAA,CAAoBH,QAAAA,CAAAA,CAAAA;IAE1D,OAAO;AACHI,QAAAA,IAAAA,EAAMJ,SAASI,IAAI;AACnBC,QAAAA,MAAAA,EAAQC,mCAAWC,QAAQ;AAC3BC,QAAAA,cAAAA,EAAgBR,SAASI,IAAI;AAC7BK,QAAAA,WAAAA,EAAaC,iBAAiBC,6CAAAA,CAA4BX,QAAAA,CAASI,IAAI,CAAA,EAAGQ,gDAAwBX,SAAAA,EAAWY,sCAAAA,CAAAA,CAAAA;AAC7GC,QAAAA,KAAAA,EAAO,EAAE;QACTC,aAAAA,EAAeC;AACnB,KAAA;AACJ;AAEA;;;;;;;IAQA,SAASb,oBAAoBH,QAAwB,EAAA;IACjD,MAAMiB,KAAAA,GAAQC,6BAAAA,CAAsBC,SAAS,CAACC,CAAAA,YAAaA,SAAAA,CAAUhB,IAAI,KAAKJ,QAAAA,CAASI,IAAI,CAAA;AAC3F,IAAA,OAAOa,QAAQ,CAAA,GAAI;AAACjB,QAAAA;AAAS,KAAA,GAAGkB,6BAAAA,CAAsBG,KAAK,CAAC,CAAA,EAAGJ,KAAAA,GAAQ,CAAA,CAAA;AAC3E;AAEA,SAASP,gBAAAA,CAAiBY,MAAqD,EAAEC,OAAsD,EAAA;AACnI,IAAA,MAAMC,MAAAA,GAAgC;AAAE,QAAA,GAAGF;AAAO,KAAA;IAClD,KAAK,MAAM,CAACG,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA,+DACO,MAAMK,2BAAqCC,yCAAAA,CAA0BC,GAAG,CAAChC,SAAAA;AAEhF,oFACO,SAASiC,uBAAAA,CAAwB5B,IAAY,EAAA;AAChD,IAAA,OAAOyB,yBAAyBI,IAAI,CAACC,CAAAA,MAAAA,GAAUA,MAAAA,CAAO9B,IAAI,KAAKA,IAAAA,CAAAA;AACnE;;;"}
1
+ {"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, nestScreenTemplates, templateContentInLayout } from '@cratis/scene.blueprint.default';\nimport { componentsScreenTemplates, nestingChainTemplates } from '../templates';\nimport { componentsApplicationChrome } from './applicationChrome';\nimport { componentsNavigationContributions } from './navigation';\n\n/**\n * The gallery: one {@link Screen} per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n *\n * They will render with unregistered bindings, and that is the normal design-time state rather than a\n * shortcoming of the gallery. A host owns the generated Arc proxies; a gallery is not a host. What a\n * preview therefore shows is every Arc-bound region as a placeholder naming the binding it wanted, every\n * Arc-free region rendered for real, and a header on each page saying which of the two you are looking at.\n *\n * Every screen renders in the default blueprint's `AppShell`. There is no full-page variant here because\n * there is no Arc-bound page that belongs outside the application shell - a sign-in screen queries nothing\n * and submits no command, so it stays where it already is, in the default blueprint.\n */\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(componentsApplicationChrome(template.name), templateContentInLayout(placeable, appShellLayout)),\n forms: [],\n contributions: componentsNavigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * The nine page templates fit the layout's own `content` slot, so each one's chain is just itself. The\n * three nesting-chain templates are the exception and the only ones that need the walk - which is the\n * honest version of the story: nesting exists for the applications that need it, and costs nothing for the\n * ones that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/** One screen per screen template this blueprint provides. */\nexport const componentsGalleryScreens: Screen[] = componentsScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function componentsGalleryScreen(name: string): Screen | undefined {\n return componentsGalleryScreens.find(screen => screen.name === name);\n}\n"],"names":["screenFor","template","placeable","nestScreenTemplates","containmentChainFor","name","layout","LayoutName","AppShell","screenTemplate","slotContent","mergeSlotContent","componentsApplicationChrome","templateContentInLayout","appShellLayout","forms","contributions","componentsNavigationContributions","depth","nestingChainTemplates","findIndex","candidate","slice","chrome","content","merged","slotName","elements","Object","entries","componentsGalleryScreens","componentsScreenTemplates","map","componentsGalleryScreen","find","screen"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;IAwBA,SAASA,UAAUC,QAAwB,EAAA;IACvC,MAAMC,SAAAA,GAAYC,4CAAoBC,mBAAAA,CAAoBH,QAAAA,CAAAA,CAAAA;IAE1D,OAAO;AACHI,QAAAA,IAAAA,EAAMJ,SAASI,IAAI;AACnBC,QAAAA,MAAAA,EAAQC,mCAAWC,QAAQ;AAC3BC,QAAAA,cAAAA,EAAgBR,SAASI,IAAI;AAC7BK,QAAAA,WAAAA,EAAaC,iBAAiBC,6CAAAA,CAA4BX,QAAAA,CAASI,IAAI,CAAA,EAAGQ,gDAAwBX,SAAAA,EAAWY,sCAAAA,CAAAA,CAAAA;AAC7GC,QAAAA,KAAAA,EAAO,EAAE;QACTC,aAAAA,EAAeC;AACnB,KAAA;AACJ;AAEA;;;;;;;IAQA,SAASb,oBAAoBH,QAAwB,EAAA;IACjD,MAAMiB,KAAAA,GAAQC,6BAAAA,CAAsBC,SAAS,CAACC,CAAAA,YAAaA,SAAAA,CAAUhB,IAAI,KAAKJ,QAAAA,CAASI,IAAI,CAAA;AAC3F,IAAA,OAAOa,QAAQ,CAAA,GAAI;AAACjB,QAAAA;AAAS,KAAA,GAAGkB,6BAAAA,CAAsBG,KAAK,CAAC,CAAA,EAAGJ,KAAAA,GAAQ,CAAA,CAAA;AAC3E;AAEA,SAASP,gBAAAA,CAAiBY,MAAqD,EAAEC,OAAsD,EAAA;AACnI,IAAA,MAAMC,MAAAA,GAAgC;AAAE,QAAA,GAAGF;AAAO,KAAA;IAClD,KAAK,MAAM,CAACG,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA,+DACO,MAAMK,2BAAqCC,yCAAAA,CAA0BC,GAAG,CAAChC,SAAAA;AAEhF,oFACO,SAASiC,uBAAAA,CAAwB5B,IAAY,EAAA;AAChD,IAAA,OAAOyB,yBAAyBI,IAAI,CAACC,CAAAA,MAAAA,GAAUA,MAAAA,CAAO9B,IAAI,KAAKA,IAAAA,CAAAA;AACnE;;;"}
package/dist/cjs/index.js CHANGED
@@ -87,6 +87,7 @@ exports.masterDetailPageTemplate = workspaceTemplates.masterDetailPageTemplate;
87
87
  exports.workspaceTemplates = workspaceTemplates.workspaceTemplates;
88
88
  exports.commandFormPageTemplate = commandTemplates.commandFormPageTemplate;
89
89
  exports.commandTemplates = commandTemplates.commandTemplates;
90
+ exports.settingsPageTemplate = commandTemplates.settingsPageTemplate;
90
91
  exports.editorTemplates = editorTemplates.editorTemplates;
91
92
  exports.objectEditorPageTemplate = editorTemplates.objectEditorPageTemplate;
92
93
  exports.schemaEditorPageTemplate = editorTemplates.schemaEditorPageTemplate;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -32,6 +32,7 @@
32
32
  /** Every adjustment recorded against an invoice. */ SampleBindingName["AllAdjustments"] = "AllAdjustments";
33
33
  /** Registers a new invoice - the command a form page submits. */ SampleBindingName["RegisterInvoice"] = "RegisterInvoice";
34
34
  /** Records an adjustment against an invoice - the command a dialog submits. */ SampleBindingName["RecordAdjustment"] = "RecordAdjustment";
35
+ /** Changes how the billing module behaves - the command a settings page submits. */ SampleBindingName["ChangeBillingSettings"] = "ChangeBillingSettings";
35
36
  return SampleBindingName;
36
37
  }({});
37
38
 
@@ -1 +1 @@
1
- {"version":3,"file":"SampleBindingName.js","sources":["../../../templates/SampleBindingName.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\n/**\n * The Arc query and command names this blueprint's templates ship bound to.\n *\n * A template carries a binding *name*, never a class - the binding registry in `@cratis/scene.components`\n * is what turns a name into the generated proxy at render time, and only a host owns those proxies. So a\n * template has to write some name, and these are the ones it writes.\n *\n * They are defaults, not fixtures. An application picking `DataListPage` replaces `AllInvoices` with its\n * own query and the page is done; nothing else about the template changes. Shipping a template with no\n * name at all would have been the alternative, and it is a worse one - it renders as a diagram of a page\n * rather than a page, and the thing a template most needs to prove is that it composes into something\n * real.\n *\n * The names are deliberately in the shape Arc generates: a `[ReadModel]`'s static query method\n * (`AllInvoices`), and a `[Command]` record (`RegisterInvoice`). A designer reading a preview should\n * recognize them as the artifacts they would really be wiring.\n *\n * This is an enum of *this package's defaults*, not of every name a binding may take. The element builders\n * therefore take a plain `string`, so an application can point the same builders at `AllPurchaseOrders`\n * without having to widen anything - the set of Arc proxies in an application is open, and a closed type\n * over it would make these builders usable only for the invoices they ship bound to.\n */\nexport enum SampleBindingName {\n /** Every invoice - the snapshot query a list page reads. */\n AllInvoices = 'AllInvoices',\n\n /** Invoices still being processed - an observable query, so the page is live. */\n InvoicesInFlight = 'InvoicesInFlight',\n\n /** One invoice by its id - what a detail region reads. */\n InvoiceById = 'InvoiceById',\n\n /** Revenue aggregated by month - a dashboard widget's query. */\n RevenueByMonth = 'RevenueByMonth',\n\n /** Open support tickets - a second dashboard widget's query. */\n OpenTickets = 'OpenTickets',\n\n /** Every adjustment recorded against an invoice. */\n AllAdjustments = 'AllAdjustments',\n\n /** Registers a new invoice - the command a form page submits. */\n RegisterInvoice = 'RegisterInvoice',\n\n /** Records an adjustment against an invoice - the command a dialog submits. */\n RecordAdjustment = 'RecordAdjustment',\n}\n"],"names":["SampleBindingName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;IAsBO,IAAKA,iBAAAA,iBAAAA,SAAAA,iBAAAA,EAAAA;iEACkD,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sFAGqB,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;+DAGvB,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;qEAGM,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;qEAGA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;yDAGZ,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;sEAGa,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAA;oFAGc,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAtBrEA,IAAAA,OAAAA,iBAAAA;AAwBX,CAAA,CAAA,EAAA;;"}
1
+ {"version":3,"file":"SampleBindingName.js","sources":["../../../templates/SampleBindingName.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\n/**\n * The Arc query and command names this blueprint's templates ship bound to.\n *\n * A template carries a binding *name*, never a class - the binding registry in `@cratis/scene.components`\n * is what turns a name into the generated proxy at render time, and only a host owns those proxies. So a\n * template has to write some name, and these are the ones it writes.\n *\n * They are defaults, not fixtures. An application picking `DataListPage` replaces `AllInvoices` with its\n * own query and the page is done; nothing else about the template changes. Shipping a template with no\n * name at all would have been the alternative, and it is a worse one - it renders as a diagram of a page\n * rather than a page, and the thing a template most needs to prove is that it composes into something\n * real.\n *\n * The names are deliberately in the shape Arc generates: a `[ReadModel]`'s static query method\n * (`AllInvoices`), and a `[Command]` record (`RegisterInvoice`). A designer reading a preview should\n * recognize them as the artifacts they would really be wiring.\n *\n * This is an enum of *this package's defaults*, not of every name a binding may take. The element builders\n * therefore take a plain `string`, so an application can point the same builders at `AllPurchaseOrders`\n * without having to widen anything - the set of Arc proxies in an application is open, and a closed type\n * over it would make these builders usable only for the invoices they ship bound to.\n */\nexport enum SampleBindingName {\n /** Every invoice - the snapshot query a list page reads. */\n AllInvoices = 'AllInvoices',\n\n /** Invoices still being processed - an observable query, so the page is live. */\n InvoicesInFlight = 'InvoicesInFlight',\n\n /** One invoice by its id - what a detail region reads. */\n InvoiceById = 'InvoiceById',\n\n /** Revenue aggregated by month - a dashboard widget's query. */\n RevenueByMonth = 'RevenueByMonth',\n\n /** Open support tickets - a second dashboard widget's query. */\n OpenTickets = 'OpenTickets',\n\n /** Every adjustment recorded against an invoice. */\n AllAdjustments = 'AllAdjustments',\n\n /** Registers a new invoice - the command a form page submits. */\n RegisterInvoice = 'RegisterInvoice',\n\n /** Records an adjustment against an invoice - the command a dialog submits. */\n RecordAdjustment = 'RecordAdjustment',\n\n /** Changes how the billing module behaves - the command a settings page submits. */\n ChangeBillingSettings = 'ChangeBillingSettings',\n}\n"],"names":["SampleBindingName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;IAsBO,IAAKA,iBAAAA,iBAAAA,SAAAA,iBAAAA,EAAAA;iEACkD,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sFAGqB,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;+DAGvB,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;qEAGM,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;qEAGA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;yDAGZ,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;sEAGa,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAA;oFAGc,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;yFAGK,iBAAA,CAAA,uBAAA,CAAA,GAAA,uBAAA;AAzB1EA,IAAAA,OAAAA,iBAAAA;AA2BX,CAAA,CAAA,EAAA;;"}
@@ -83,10 +83,77 @@ var templateProvenance = require('../templateProvenance.js');
83
83
  displayName: 'Command form page',
84
84
  description: 'A generated command form under a header that states the command, with its own action bar.'
85
85
  };
86
+ /**
87
+ * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a
88
+ * module behaves rather than one that records something. The header says what the settings govern, the
89
+ * form follows the settings command, and the bar saves or discards.
90
+ *
91
+ * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog
92
+ * would hide the module the reader is configuring.
93
+ */ const settingsPageTemplate = {
94
+ name: 'SettingsPage',
95
+ fitsSlot: scene_blueprint_default.SlotName.Content,
96
+ slots: [
97
+ {
98
+ name: scene_blueprint_default.TemplateSlotName.Header
99
+ },
100
+ {
101
+ name: scene_blueprint_default.TemplateSlotName.Body
102
+ },
103
+ {
104
+ name: scene_blueprint_default.TemplateSlotName.Actions
105
+ }
106
+ ],
107
+ arrangement: {
108
+ root: scene_blueprint_default.column([
109
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Header),
110
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Body, {
111
+ grow: 1
112
+ }),
113
+ scene_blueprint_default.slotLeaf(scene_blueprint_default.TemplateSlotName.Actions)
114
+ ], 16)
115
+ },
116
+ content: {
117
+ [scene_blueprint_default.TemplateSlotName.Header]: [
118
+ elements.arcPageHeader('settings-header', {
119
+ title: 'Billing settings',
120
+ subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',
121
+ section: 'Billing',
122
+ command: SampleBindingName.SampleBindingName.ChangeBillingSettings
123
+ })
124
+ ],
125
+ [scene_blueprint_default.TemplateSlotName.Body]: [
126
+ elements.page('settings-body', '', [
127
+ formElements.commandForm('settings-form', SampleBindingName.SampleBindingName.ChangeBillingSettings, [
128
+ 'billingId'
129
+ ])
130
+ ])
131
+ ],
132
+ [scene_blueprint_default.TemplateSlotName.Actions]: [
133
+ elements.toolbar('settings-actions', [
134
+ elements.toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),
135
+ elements.toolbarSeparator('settings-separator'),
136
+ elements.toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard')
137
+ ])
138
+ ]
139
+ },
140
+ metadata: {
141
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
142
+ type: 'Form',
143
+ category: 'Business / Settings',
144
+ scopes: [
145
+ scene_model.TemplateScope.Module
146
+ ]
147
+ },
148
+ displayName: 'Settings page',
149
+ description: "A module's settings as a generated command form, with save and discard."
150
+ };
86
151
  /** The command-shaped templates. */ const commandTemplates = [
87
- commandFormPageTemplate
152
+ commandFormPageTemplate,
153
+ settingsPageTemplate
88
154
  ];
89
155
 
90
156
  exports.commandFormPageTemplate = commandFormPageTemplate;
91
157
  exports.commandTemplates = commandTemplates;
158
+ exports.settingsPageTemplate = settingsPageTemplate;
92
159
  //# sourceMappingURL=commandTemplates.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.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 { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","displayName","description","commandTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAQ;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAAAA,gCAAAA,CAASP,yCAAiBC,MAAM,CAAA;YAAGM,gCAAAA,CAASP,wCAAAA,CAAiBE,IAAI,EAAE;gBAAEM,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,gCAAAA,CAASP,yCAAiBG,OAAO;SAAE,EAAE,EAAA;AACxI,KAAA;IACAM,OAAAA,EAAS;QACL,CAACT,wCAAAA,CAAiBC,MAAM,GAAG;AACvBS,YAAAA,sBAAAA,CAAc,qBAAA,EAAuB;gBACjCC,KAAAA,EAAO,qBAAA;gBACPC,QAAAA,EAAU,gFAAA;gBACVC,OAAAA,EAAS,SAAA;AACTC,gBAAAA,OAAAA,EAASC,oCAAkBC;AAC/B,aAAA;AACH,SAAA;QACD,CAAChB,wCAAAA,CAAiBE,IAAI,GAAG;AAACe,YAAAA,aAAAA,CAAK,qBAAqB,EAAA,EAAI;gBAACC,wBAAAA,CAAY,cAAA,EAAgBH,mCAAAA,CAAkBC,eAAe,EAAE;AAAC,oBAAA;AAAY,iBAAA;AAAE,aAAA;AAAE,SAAA;QACzI,CAAChB,wCAAAA,CAAiBG,OAAO,GAAG;AACxBgB,YAAAA,gBAAAA,CAAQ,sBAAA,EAAwB;gBAC5BC,sBAAAA,CAAc,qBAAA,EAAuB,wBAAwB,aAAA,EAAe,UAAA,CAAA;gBAC5EC,yBAAAA,CAAiB,wBAAA,CAAA;gBACjBD,sBAAAA,CAAc,qBAAA,EAAuB,uBAAuB,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAE,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,IAAAA,EAAM,MAAA;QAAQC,QAAAA,EAAU,oBAAA;QAAsBC,MAAAA,EAAQ;AAACC,YAAAA,yBAAAA,CAAcC;AAAM;AAAC,KAAA;IAClIC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMC,gBAAAA,GAAqC;AAACrC,IAAAA;;;;"}
1
+ {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.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 { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/**\n * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a\n * module behaves rather than one that records something. The header says what the settings govern, the\n * form follows the settings command, and the bar saves or discards.\n *\n * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog\n * would hide the module the reader is configuring.\n */\nexport const settingsPageTemplate: ScreenTemplate = {\n name: 'SettingsPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('settings-header', {\n title: 'Billing settings',\n subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',\n section: 'Billing',\n command: SampleBindingName.ChangeBillingSettings,\n }),\n ],\n [TemplateSlotName.Body]: [page('settings-body', '', [commandForm('settings-form', SampleBindingName.ChangeBillingSettings, ['billingId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('settings-actions', [\n toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),\n toolbarSeparator('settings-separator'),\n toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Settings', scopes: [TemplateScope.Module] },\n displayName: 'Settings page',\n description: \"A module's settings as a generated command form, with save and discard.\",\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate, settingsPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","displayName","description","settingsPageTemplate","ChangeBillingSettings","Module","commandTemplates"],"mappings":";;;;;;;;;A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AI,GAAG;AAACe,YAAAA,aAAAA,CAAK,iBAAiB,EAAA,EAAI;gBAACC,wBAAAA,CAAY,eAAA,EAAiBH,mCAAAA,CAAkBiB,qBAAqB,EAAE;AAAC,oBAAA;AAAY,iBAAA;AAAE,aAAA;AAAE,SAAA;QAC5I,CAAChC,wCAAAA,CAAiBG,OAAO,GAAG;AACxBgB,YAAAA,gBAAAA,CAAQ,kBAAA,EAAoB;gBACxBC,sBAAAA,CAAc,eAAA,EAAiB,qBAAqB,YAAA,EAAc,MAAA,CAAA;gBAClEC,yBAAAA,CAAiB,oBAAA,CAAA;gBACjBD,sBAAAA,CAAc,kBAAA,EAAoB,mBAAmB,YAAA,EAAc,SAAA;AACtE,aAAA;AACJ;AACL,KAAA;IACAE,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,IAAAA,EAAM,MAAA;QAAQC,QAAAA,EAAU,qBAAA;QAAuBC,MAAAA,EAAQ;AAACC,YAAAA,yBAAAA,CAAcM;AAAO;AAAC,KAAA;IACpIJ,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMI,gBAAAA,GAAqC;AAACxC,IAAAA,uBAAAA;AAAyBqC,IAAAA;;;;;"}
@@ -22,12 +22,12 @@ var workspaceTemplates = require('./workspaceTemplates.js');
22
22
  ...nesting.nestingChainTemplates
23
23
  ];
24
24
  /**
25
- * The eight templates that fill the application layout's own `content` slot directly.
25
+ * The nine templates that fill the application layout's own `content` slot directly.
26
26
  *
27
27
  * Kept apart from the nesting chain because `fitsSlot` is resolved against *the containers in scope*, and
28
28
  * these two groups are never in scope together. Each of these is a whole page an application places on its
29
29
  * own; the chain's three are one page assembled from three levels. Resolving them as one set would ask
30
- * `resolveScreenTemplates` which of eight `body`-declaring templates the feature section belongs to, and it
30
+ * `resolveScreenTemplates` which of nine `body`-declaring templates the feature section belongs to, and it
31
31
  * would rightly answer that it cannot tell.
32
32
  */ const componentsPageTemplates = [
33
33
  ...listTemplates.listTemplates,
@@ -1 +1 @@
1
- {"version":3,"file":"screenTemplates.js","sources":["../../../templates/screenTemplates.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 } from '@cratis/scene.model';\nimport { commandTemplates } from './commandTemplates';\nimport { editorTemplates } from './editorTemplates';\nimport { listTemplates } from './listTemplates';\nimport { nestingChainTemplates } from './nesting';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Eight whole pages that fill the application shell's `content` slot, plus the three-level chain that\n * demonstrates how `fitsSlot` composes at module, feature and slice level. The list is what the manifest's\n * `screenTemplates` names and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const componentsScreenTemplates: ScreenTemplate[] = [\n ...listTemplates,\n ...workspaceTemplates,\n ...commandTemplates,\n ...editorTemplates,\n ...nestingChainTemplates,\n];\n\n/**\n * The eight templates that fill the application layout's own `content` slot directly.\n *\n * Kept apart from the nesting chain because `fitsSlot` is resolved against *the containers in scope*, and\n * these two groups are never in scope together. Each of these is a whole page an application places on its\n * own; the chain's three are one page assembled from three levels. Resolving them as one set would ask\n * `resolveScreenTemplates` which of eight `body`-declaring templates the feature section belongs to, and it\n * would rightly answer that it cannot tell.\n */\nexport const componentsPageTemplates: ScreenTemplate[] = [...listTemplates, ...workspaceTemplates, ...commandTemplates, ...editorTemplates];\n"],"names":["componentsScreenTemplates","listTemplates","workspaceTemplates","commandTemplates","editorTemplates","nestingChainTemplates","componentsPageTemplates"],"mappings":";;;;;;;;AAAA;AACA;AASA;;;;;;UAOaA,yBAAAA,GAA8C;AACpDC,IAAAA,GAAAA,2BAAAA;AACAC,IAAAA,GAAAA,qCAAAA;AACAC,IAAAA,GAAAA,iCAAAA;AACAC,IAAAA,GAAAA,+BAAAA;AACAC,IAAAA,GAAAA;;AAGP;;;;;;;;UASaC,uBAAAA,GAA4C;AAAIL,IAAAA,GAAAA,2BAAAA;AAAkBC,IAAAA,GAAAA,qCAAAA;AAAuBC,IAAAA,GAAAA,iCAAAA;AAAqBC,IAAAA,GAAAA;;;;"}
1
+ {"version":3,"file":"screenTemplates.js","sources":["../../../templates/screenTemplates.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 } from '@cratis/scene.model';\nimport { commandTemplates } from './commandTemplates';\nimport { editorTemplates } from './editorTemplates';\nimport { listTemplates } from './listTemplates';\nimport { nestingChainTemplates } from './nesting';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Eight whole pages that fill the application shell's `content` slot, plus the three-level chain that\n * demonstrates how `fitsSlot` composes at module, feature and slice level. The list is what the manifest's\n * `screenTemplates` names and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const componentsScreenTemplates: ScreenTemplate[] = [\n ...listTemplates,\n ...workspaceTemplates,\n ...commandTemplates,\n ...editorTemplates,\n ...nestingChainTemplates,\n];\n\n/**\n * The nine templates that fill the application layout's own `content` slot directly.\n *\n * Kept apart from the nesting chain because `fitsSlot` is resolved against *the containers in scope*, and\n * these two groups are never in scope together. Each of these is a whole page an application places on its\n * own; the chain's three are one page assembled from three levels. Resolving them as one set would ask\n * `resolveScreenTemplates` which of nine `body`-declaring templates the feature section belongs to, and it\n * would rightly answer that it cannot tell.\n */\nexport const componentsPageTemplates: ScreenTemplate[] = [...listTemplates, ...workspaceTemplates, ...commandTemplates, ...editorTemplates];\n"],"names":["componentsScreenTemplates","listTemplates","workspaceTemplates","commandTemplates","editorTemplates","nestingChainTemplates","componentsPageTemplates"],"mappings":";;;;;;;;AAAA;AACA;AASA;;;;;;UAOaA,yBAAAA,GAA8C;AACpDC,IAAAA,GAAAA,2BAAAA;AACAC,IAAAA,GAAAA,qCAAAA;AACAC,IAAAA,GAAAA,iCAAAA;AACAC,IAAAA,GAAAA,+BAAAA;AACAC,IAAAA,GAAAA;;AAGP;;;;;;;;UASaC,uBAAAA,GAA4C;AAAIL,IAAAA,GAAAA,2BAAAA;AAAkBC,IAAAA,GAAAA,qCAAAA;AAAuBC,IAAAA,GAAAA,iCAAAA;AAAqBC,IAAAA,GAAAA;;;;"}
@@ -21,6 +21,7 @@ export declare const DataListWithDetailPage: Story;
21
21
  export declare const MasterDetailPage: Story;
22
22
  export declare const DashboardPage: Story;
23
23
  export declare const CommandFormPage: Story;
24
+ export declare const SettingsPage: Story;
24
25
  export declare const SchemaEditorPage: Story;
25
26
  export declare const ObjectEditorPage: Story;
26
27
  export declare const DataModulePage: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"ArcPages.stories.d.ts","sourceRoot":"","sources":["../../../gallery/ArcPages.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,QAAA,MAAM,IAAI;;;;QAIF,MAAM;QACN,IAAI;YACA,WAAW;gBACP,SAAS;;;;;CASoB,CAAC;eAE/B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,YAAY,EAAE,KAAgD,CAAC;AAG5E,eAAO,MAAM,sBAAsB,EAAE,KAA0D,CAAC;AAGhG,eAAO,MAAM,sBAAsB,EAAE,KAA0D,CAAC;AAGhG,eAAO,MAAM,gBAAgB,EAAE,KAAoD,CAAC;AAGpF,eAAO,MAAM,aAAa,EAAE,KAAiD,CAAC;AAG9E,eAAO,MAAM,eAAe,EAAE,KAAmD,CAAC;AAGlF,eAAO,MAAM,gBAAgB,EAAE,KAAoD,CAAC;AAGpF,eAAO,MAAM,gBAAgB,EAAE,KAAoD,CAAC;AAGpF,eAAO,MAAM,cAAc,EAAE,KAAkD,CAAC;AAGhF,eAAO,MAAM,kBAAkB,EAAE,KAAsD,CAAC;AAGxF,eAAO,MAAM,mBAAmB,EAAE,KAAuD,CAAC;AAS1F,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
1
+ {"version":3,"file":"ArcPages.stories.d.ts","sourceRoot":"","sources":["../../../gallery/ArcPages.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAEvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,QAAA,MAAM,IAAI;;;;QAIF,MAAM;QACN,IAAI;YACA,WAAW;gBACP,SAAS;;;;;CASoB,CAAC;eAE/B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,YAAY,EAAE,KAAgD,CAAC;AAG5E,eAAO,MAAM,sBAAsB,EAAE,KAA0D,CAAC;AAGhG,eAAO,MAAM,sBAAsB,EAAE,KAA0D,CAAC;AAGhG,eAAO,MAAM,gBAAgB,EAAE,KAAoD,CAAC;AAGpF,eAAO,MAAM,aAAa,EAAE,KAAiD,CAAC;AAG9E,eAAO,MAAM,eAAe,EAAE,KAAmD,CAAC;AAGlF,eAAO,MAAM,YAAY,EAAE,KAAgD,CAAC;AAG5E,eAAO,MAAM,gBAAgB,EAAE,KAAoD,CAAC;AAGpF,eAAO,MAAM,gBAAgB,EAAE,KAAoD,CAAC;AAGpF,eAAO,MAAM,cAAc,EAAE,KAAkD,CAAC;AAGhF,eAAO,MAAM,kBAAkB,EAAE,KAAsD,CAAC;AAGxF,eAAO,MAAM,mBAAmB,EAAE,KAAuD,CAAC;AAS1F,eAAO,MAAM,aAAa,EAAE,KAE3B,CAAC"}
@@ -7,7 +7,7 @@ const meta = {
7
7
  layout: 'fullscreen',
8
8
  docs: {
9
9
  description: {
10
- component: 'The eight Arc-bound page templates plus the three-level nesting chain, each booted as a screen inside the default ' +
10
+ component: 'The nine Arc-bound page templates plus the three-level nesting chain, each booted as a screen inside the default ' +
11
11
  "blueprint's application shell. Nothing is registered in the binding registry, so every Arc-bound region names the " +
12
12
  'binding it wanted and every page header says which query or command a host still has to wire. That is the normal ' +
13
13
  'design-time state - see the *Bindings* stories for what changes when a host registers one.',
@@ -23,6 +23,7 @@ export const DataListWithDetailPage = { args: { screenName: 'DataListWithDetailP
23
23
  export const MasterDetailPage = { args: { screenName: 'MasterDetailPage' } };
24
24
  export const DashboardPage = { args: { screenName: 'DashboardPage' } };
25
25
  export const CommandFormPage = { args: { screenName: 'CommandFormPage' } };
26
+ export const SettingsPage = { args: { screenName: 'SettingsPage' } };
26
27
  export const SchemaEditorPage = { args: { screenName: 'SchemaEditorPage' } };
27
28
  export const ObjectEditorPage = { args: { screenName: 'ObjectEditorPage' } };
28
29
  export const DataModulePage = { args: { screenName: 'DataModulePage' } };
@@ -1 +1 @@
1
- {"version":3,"file":"ArcPages.stories.js","sourceRoot":"","sources":["../../../gallery/ArcPages.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,UAAU,EAAE,MAAM,iCAAiC,CAAC;AAC7D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,qBAAqB;IAC5B,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE;QACR,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE;YACF,WAAW,EAAE;gBACT,SAAS,EACL,oHAAoH;oBACpH,oHAAoH;oBACpH,mHAAmH;oBACnH,4FAA4F;aACnG;SACJ;KACJ;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACuB,CAAC;AAE9C,eAAe,IAAI,CAAC;AAKpB,MAAM,CAAC,MAAM,YAAY,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC;AAG5E,MAAM,CAAC,MAAM,sBAAsB,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,wBAAwB,EAAE,EAAE,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AkB,EAAE,EAAE,CAAC;AAGpF,MAAM,CAAC,MAAM,cAAc,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;AAGhF,MAAM,CAAC,MAAM,kBAAkB,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,oBAAoB,EAAE,EAAE,CAAC;AAGxF,MAAM,CAAC,MAAM,mBAAmB,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,qBAAqB,EAAE,EAAE,CAAC;AAS1F,MAAM,CAAC,MAAM,aAAa,GAAU;IAChC,IAAI,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,EAAE,IAAI,EAAE,UAAU,CAAC,IAAI,EAAE,EAAE;CACjF,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../gallery/navigation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAkD,MAAM,iCAAiC,CAAC;AAelH,eAAO,MAAM,2BAA2B,EAAE,eAAe,EAYxD,CAAC;AASF,eAAO,MAAM,iCAAiC,EAAE,YAAY,EAIzD,CAAC;AAGJ,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,CAE/D;AAGD,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAAwE,CAAC;AAGxH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE;AAGD,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../gallery/navigation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,EAAE,eAAe,EAAkD,MAAM,iCAAiC,CAAC;AAelH,eAAO,MAAM,2BAA2B,EAAE,eAAe,EAaxD,CAAC;AASF,eAAO,MAAM,iCAAiC,EAAE,YAAY,EAIzD,CAAC;AAGJ,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,eAAe,EAAE,CAE/D;AAGD,eAAO,MAAM,0BAA0B,EAAE,MAAM,EAAwE,CAAC;AAGxH,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE;AAGD,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAEpE"}
@@ -57,6 +57,13 @@ import { navigationContributionPoint, navigationElement } from '@cratis/scene.bl
57
57
  group: 'Billing',
58
58
  order: 60
59
59
  },
60
+ {
61
+ label: 'Settings',
62
+ targetScreen: 'SettingsPage',
63
+ icon: 'pi pi-cog',
64
+ group: 'Billing',
65
+ order: 70
66
+ },
60
67
  {
61
68
  label: 'Event type schema',
62
69
  targetScreen: 'SchemaEditorPage',
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.js","sources":["../../../gallery/navigation.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 { Contribution } from '@cratis/scene.model';\nimport { NavigationEntry, navigationContributionPoint, navigationElement } from '@cratis/scene.blueprint.default';\n\n/**\n * The navigation for this blueprint's gallery, declared once.\n *\n * One list, two consumers: the sidebar menu renders it as `menuItem` elements, and the same elements go to\n * the `Navigation` contribution point where the default blueprint's aggregation turns them back into\n * navigation items. Maintaining a menu *and* a separate navigation declaration would mean two lists that\n * agree right up until someone adds a screen to one of them.\n *\n * `navigationElement` and the contribution point name are the default blueprint's, not this package's.\n * Reimplementing them here would produce a menu that looked identical and contributed to a contribution\n * point nothing reads - which is the exact failure mode a blueprint-on-blueprint dependency exists to\n * avoid.\n */\nexport const componentsNavigationEntries: NavigationEntry[] = [\n { label: 'Dashboard', targetScreen: 'DashboardPage', icon: 'pi pi-chart-bar', group: 'Billing', order: 10 },\n { label: 'Invoices', targetScreen: 'DataListPage', icon: 'pi pi-list', group: 'Billing', order: 20 },\n { label: 'In flight', targetScreen: 'ObservableDataListPage', icon: 'pi pi-bolt', group: 'Billing', order: 30 },\n { label: 'Invoices and detail', targetScreen: 'DataListWithDetailPage', icon: 'pi pi-window-maximize', group: 'Billing', order: 40 },\n { label: 'Master and detail', targetScreen: 'MasterDetailPage', icon: 'pi pi-table', group: 'Billing', order: 50 },\n { label: 'Register an invoice', targetScreen: 'CommandFormPage', icon: 'pi pi-plus-circle', group: 'Billing', order: 60 },\n { label: 'Event type schema', targetScreen: 'SchemaEditorPage', icon: 'pi pi-sitemap', group: 'Inspect', order: 10 },\n { label: 'Invoice document', targetScreen: 'ObjectEditorPage', icon: 'pi pi-file-edit', group: 'Inspect', order: 20 },\n { label: 'Billing module', targetScreen: 'DataModulePage', icon: 'pi pi-th-large', group: 'Nesting', order: 10 },\n { label: 'Adjustments feature', targetScreen: 'DataFeatureSection', icon: 'pi pi-folder', group: 'Nesting', order: 20 },\n { label: 'Record an adjustment', targetScreen: 'CommandSliceSection', icon: 'pi pi-pencil', group: 'Nesting', order: 30 },\n];\n\n/**\n * The navigation as contributions to the `Navigation` contribution point.\n *\n * A screen carries these in its `contributions`, and anything bound to the contribution point recomputes\n * from whatever is currently in scope - so a screen that contributes an extra entry gets it into the\n * navigation without the navigation knowing that screen exists.\n */\nexport const componentsNavigationContributions: Contribution[] = componentsNavigationEntries.map(entry => ({\n contributionPointName: navigationContributionPoint,\n content: navigationElement(entry),\n order: entry.order,\n}));\n\n/** The navigation entries of one group, in order. */\nexport function entriesInGroup(group: string): NavigationEntry[] {\n return componentsNavigationEntries.filter(entry => entry.group === group).sort((first, second) => first.order - second.order);\n}\n\n/** Every group named by the navigation, in first-declared order. */\nexport const componentsNavigationGroups: string[] = [...new Set(componentsNavigationEntries.map(entry => entry.group))];\n\n/** The section a screen belongs to, for the first entry of its breadcrumb trail. */\nexport function groupOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.group;\n}\n\n/** The navigation label of a screen, for the last entry of its breadcrumb trail. */\nexport function labelOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.label;\n}\n"],"names":["componentsNavigationEntries","label","targetScreen","icon","group","order","componentsNavigationContributions","map","entry","contributionPointName","navigationContributionPoint","content","navigationElement","entriesInGroup","filter","sort","first","second","componentsNavigationGroups","Set","groupOfScreen","screenName","find","labelOfScreen"],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;UAaaA,2BAAAA,GAAiD;AAC1D,IAAA;QAAEC,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,eAAA;QAAiBC,IAAAA,EAAM,iBAAA;QAAmBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC1G,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,cAAA;QAAgBC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC9G,IAAA;QAAEJ,KAAAA,EAAO,qBAAA;QAAuBC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,uBAAA;QAAyBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnI,IAAA;QAAEJ,KAAAA,EAAO,mBAAA;QAAqBC,YAAAA,EAAc,kBAAA;QAAoBC,IAAAA,EAAM,aAAA;QAAeC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACjH,IAAA;QAAEJ,KAAAA,EAAO,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AA,KAAAA,GAASA,KAAAA,CAAMJ,KAAK,KAAKA,KAAAA,CAAAA,CAAOW,IAAI,CAAC,CAACC,KAAAA,EAAOC,MAAAA,GAAWD,MAAMX,KAAK,GAAGY,OAAOZ,KAAK,CAAA;AAChI;AAEA,qEACO,MAAMa,0BAAAA,GAAuC;AAAI,IAAA,GAAA,IAAIC,IAAInB,2BAAAA,CAA4BO,GAAG,CAACC,CAAAA,KAAAA,GAASA,MAAMJ,KAAK,CAAA;;AAEpH,qFACO,SAASgB,aAAAA,CAAcC,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAajB,KAAAA;AACzF;AAEA,qFACO,SAASmB,aAAAA,CAAcF,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAapB,KAAAA;AACzF;;"}
1
+ {"version":3,"file":"navigation.js","sources":["../../../gallery/navigation.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 { Contribution } from '@cratis/scene.model';\nimport { NavigationEntry, navigationContributionPoint, navigationElement } from '@cratis/scene.blueprint.default';\n\n/**\n * The navigation for this blueprint's gallery, declared once.\n *\n * One list, two consumers: the sidebar menu renders it as `menuItem` elements, and the same elements go to\n * the `Navigation` contribution point where the default blueprint's aggregation turns them back into\n * navigation items. Maintaining a menu *and* a separate navigation declaration would mean two lists that\n * agree right up until someone adds a screen to one of them.\n *\n * `navigationElement` and the contribution point name are the default blueprint's, not this package's.\n * Reimplementing them here would produce a menu that looked identical and contributed to a contribution\n * point nothing reads - which is the exact failure mode a blueprint-on-blueprint dependency exists to\n * avoid.\n */\nexport const componentsNavigationEntries: NavigationEntry[] = [\n { label: 'Dashboard', targetScreen: 'DashboardPage', icon: 'pi pi-chart-bar', group: 'Billing', order: 10 },\n { label: 'Invoices', targetScreen: 'DataListPage', icon: 'pi pi-list', group: 'Billing', order: 20 },\n { label: 'In flight', targetScreen: 'ObservableDataListPage', icon: 'pi pi-bolt', group: 'Billing', order: 30 },\n { label: 'Invoices and detail', targetScreen: 'DataListWithDetailPage', icon: 'pi pi-window-maximize', group: 'Billing', order: 40 },\n { label: 'Master and detail', targetScreen: 'MasterDetailPage', icon: 'pi pi-table', group: 'Billing', order: 50 },\n { label: 'Register an invoice', targetScreen: 'CommandFormPage', icon: 'pi pi-plus-circle', group: 'Billing', order: 60 },\n { label: 'Settings', targetScreen: 'SettingsPage', icon: 'pi pi-cog', group: 'Billing', order: 70 },\n { label: 'Event type schema', targetScreen: 'SchemaEditorPage', icon: 'pi pi-sitemap', group: 'Inspect', order: 10 },\n { label: 'Invoice document', targetScreen: 'ObjectEditorPage', icon: 'pi pi-file-edit', group: 'Inspect', order: 20 },\n { label: 'Billing module', targetScreen: 'DataModulePage', icon: 'pi pi-th-large', group: 'Nesting', order: 10 },\n { label: 'Adjustments feature', targetScreen: 'DataFeatureSection', icon: 'pi pi-folder', group: 'Nesting', order: 20 },\n { label: 'Record an adjustment', targetScreen: 'CommandSliceSection', icon: 'pi pi-pencil', group: 'Nesting', order: 30 },\n];\n\n/**\n * The navigation as contributions to the `Navigation` contribution point.\n *\n * A screen carries these in its `contributions`, and anything bound to the contribution point recomputes\n * from whatever is currently in scope - so a screen that contributes an extra entry gets it into the\n * navigation without the navigation knowing that screen exists.\n */\nexport const componentsNavigationContributions: Contribution[] = componentsNavigationEntries.map(entry => ({\n contributionPointName: navigationContributionPoint,\n content: navigationElement(entry),\n order: entry.order,\n}));\n\n/** The navigation entries of one group, in order. */\nexport function entriesInGroup(group: string): NavigationEntry[] {\n return componentsNavigationEntries.filter(entry => entry.group === group).sort((first, second) => first.order - second.order);\n}\n\n/** Every group named by the navigation, in first-declared order. */\nexport const componentsNavigationGroups: string[] = [...new Set(componentsNavigationEntries.map(entry => entry.group))];\n\n/** The section a screen belongs to, for the first entry of its breadcrumb trail. */\nexport function groupOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.group;\n}\n\n/** The navigation label of a screen, for the last entry of its breadcrumb trail. */\nexport function labelOfScreen(screenName: string): string | undefined {\n return componentsNavigationEntries.find(entry => entry.targetScreen === screenName)?.label;\n}\n"],"names":["componentsNavigationEntries","label","targetScreen","icon","group","order","componentsNavigationContributions","map","entry","contributionPointName","navigationContributionPoint","content","navigationElement","entriesInGroup","filter","sort","first","second","componentsNavigationGroups","Set","groupOfScreen","screenName","find","labelOfScreen"],"mappings":";;AAAA;AACA;AAKA;;;;;;;;;;;;UAaaA,2BAAAA,GAAiD;AAC1D,IAAA;QAAEC,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,eAAA;QAAiBC,IAAAA,EAAM,iBAAA;QAAmBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC1G,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,cAAA;QAAgBC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AAC9G,IAAA;QAAEJ,KAAAA,EAAO,qBAAA;QAAuBC,YAAAA,EAAc,wBAAA;QAA0BC,IAAAA,EAAM,uBAAA;QAAyBC,KAAAA,EAAO,SAAA;QAAWC,KAAAA,EAAO;AAAG,KAAA;AACnI,IAAA;QAAEJ,KAAAA,EAAO,mBAAA;QAAqBC,YAAAA,EAAc,kBAAA;QAAoBC,IAAAA,EAAM,aAAA;QAAeC,KAAAA,EAAO,SAAA;QAAWC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AAA;AACvBC,QAAAA,OAAAA,EAASC,iBAAAA,CAAkBJ,KAAAA,CAAAA;AAC3BH,QAAAA,KAAAA,EAAOG,MAAMH;AACjB,KAAA,CAAA;AAEA,sDACO,SAASQ,cAAAA,CAAeT,KAAa,EAAA;AACxC,IAAA,OAAOJ,4BAA4Bc,MAAM,CAACN,CAAAA,KAAAA,GAASA,KAAAA,CAAMJ,KAAK,KAAKA,KAAAA,CAAAA,CAAOW,IAAI,CAAC,CAACC,KAAAA,EAAOC,MAAAA,GAAWD,MAAMX,KAAK,GAAGY,OAAOZ,KAAK,CAAA;AAChI;AAEA,qEACO,MAAMa,0BAAAA,GAAuC;AAAI,IAAA,GAAA,IAAIC,IAAInB,2BAAAA,CAA4BO,GAAG,CAACC,CAAAA,KAAAA,GAASA,MAAMJ,KAAK,CAAA;;AAEpH,qFACO,SAASgB,aAAAA,CAAcC,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAajB,KAAAA;AACzF;AAEA,qFACO,SAASmB,aAAAA,CAAcF,UAAkB,EAAA;IAC5C,OAAOrB,2BAAAA,CAA4BsB,IAAI,CAACd,CAAAA,QAASA,KAAAA,CAAMN,YAAY,KAAKmB,UAAAA,CAAAA,EAAapB,KAAAA;AACzF;;"}
@@ -46,7 +46,7 @@ import { componentsNavigationContributions } from './navigation.js';
46
46
  /**
47
47
  * The chain of templates a screen renders through, outermost first.
48
48
  *
49
- * The eight page templates fit the layout's own `content` slot, so each one's chain is just itself. The
49
+ * The nine page templates fit the layout's own `content` slot, so each one's chain is just itself. The
50
50
  * three nesting-chain templates are the exception and the only ones that need the walk - which is the
51
51
  * honest version of the story: nesting exists for the applications that need it, and costs nothing for the
52
52
  * ones that do not.
@@ -1 +1 @@
1
- {"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, nestScreenTemplates, templateContentInLayout } from '@cratis/scene.blueprint.default';\nimport { componentsScreenTemplates, nestingChainTemplates } from '../templates';\nimport { componentsApplicationChrome } from './applicationChrome';\nimport { componentsNavigationContributions } from './navigation';\n\n/**\n * The gallery: one {@link Screen} per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n *\n * They will render with unregistered bindings, and that is the normal design-time state rather than a\n * shortcoming of the gallery. A host owns the generated Arc proxies; a gallery is not a host. What a\n * preview therefore shows is every Arc-bound region as a placeholder naming the binding it wanted, every\n * Arc-free region rendered for real, and a header on each page saying which of the two you are looking at.\n *\n * Every screen renders in the default blueprint's `AppShell`. There is no full-page variant here because\n * there is no Arc-bound page that belongs outside the application shell - a sign-in screen queries nothing\n * and submits no command, so it stays where it already is, in the default blueprint.\n */\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(componentsApplicationChrome(template.name), templateContentInLayout(placeable, appShellLayout)),\n forms: [],\n contributions: componentsNavigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * The eight page templates fit the layout's own `content` slot, so each one's chain is just itself. The\n * three nesting-chain templates are the exception and the only ones that need the walk - which is the\n * honest version of the story: nesting exists for the applications that need it, and costs nothing for the\n * ones that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/** One screen per screen template this blueprint provides. */\nexport const componentsGalleryScreens: Screen[] = componentsScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function componentsGalleryScreen(name: string): Screen | undefined {\n return componentsGalleryScreens.find(screen => screen.name === name);\n}\n"],"names":["screenFor","template","placeable","nestScreenTemplates","containmentChainFor","name","layout","LayoutName","AppShell","screenTemplate","slotContent","mergeSlotContent","componentsApplicationChrome","templateContentInLayout","appShellLayout","forms","contributions","componentsNavigationContributions","depth","nestingChainTemplates","findIndex","candidate","slice","chrome","content","merged","slotName","elements","Object","entries","componentsGalleryScreens","componentsScreenTemplates","map","componentsGalleryScreen","find","screen"],"mappings":";;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;IAwBA,SAASA,UAAUC,QAAwB,EAAA;IACvC,MAAMC,SAAAA,GAAYC,oBAAoBC,mBAAAA,CAAoBH,QAAAA,CAAAA,CAAAA;IAE1D,OAAO;AACHI,QAAAA,IAAAA,EAAMJ,SAASI,IAAI;AACnBC,QAAAA,MAAAA,EAAQC,WAAWC,QAAQ;AAC3BC,QAAAA,cAAAA,EAAgBR,SAASI,IAAI;AAC7BK,QAAAA,WAAAA,EAAaC,iBAAiBC,2BAAAA,CAA4BX,QAAAA,CAASI,IAAI,CAAA,EAAGQ,wBAAwBX,SAAAA,EAAWY,cAAAA,CAAAA,CAAAA;AAC7GC,QAAAA,KAAAA,EAAO,EAAE;QACTC,aAAAA,EAAeC;AACnB,KAAA;AACJ;AAEA;;;;;;;IAQA,SAASb,oBAAoBH,QAAwB,EAAA;IACjD,MAAMiB,KAAAA,GAAQC,qBAAAA,CAAsBC,SAAS,CAACC,CAAAA,YAAaA,SAAAA,CAAUhB,IAAI,KAAKJ,QAAAA,CAASI,IAAI,CAAA;AAC3F,IAAA,OAAOa,QAAQ,CAAA,GAAI;AAACjB,QAAAA;AAAS,KAAA,GAAGkB,qBAAAA,CAAsBG,KAAK,CAAC,CAAA,EAAGJ,KAAAA,GAAQ,CAAA,CAAA;AAC3E;AAEA,SAASP,gBAAAA,CAAiBY,MAAqD,EAAEC,OAAsD,EAAA;AACnI,IAAA,MAAMC,MAAAA,GAAgC;AAAE,QAAA,GAAGF;AAAO,KAAA;IAClD,KAAK,MAAM,CAACG,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA,+DACO,MAAMK,2BAAqCC,yBAAAA,CAA0BC,GAAG,CAAChC,SAAAA;AAEhF,oFACO,SAASiC,uBAAAA,CAAwB5B,IAAY,EAAA;AAChD,IAAA,OAAOyB,yBAAyBI,IAAI,CAACC,CAAAA,MAAAA,GAAUA,MAAAA,CAAO9B,IAAI,KAAKA,IAAAA,CAAAA;AACnE;;"}
1
+ {"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, nestScreenTemplates, templateContentInLayout } from '@cratis/scene.blueprint.default';\nimport { componentsScreenTemplates, nestingChainTemplates } from '../templates';\nimport { componentsApplicationChrome } from './applicationChrome';\nimport { componentsNavigationContributions } from './navigation';\n\n/**\n * The gallery: one {@link Screen} per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n *\n * They will render with unregistered bindings, and that is the normal design-time state rather than a\n * shortcoming of the gallery. A host owns the generated Arc proxies; a gallery is not a host. What a\n * preview therefore shows is every Arc-bound region as a placeholder naming the binding it wanted, every\n * Arc-free region rendered for real, and a header on each page saying which of the two you are looking at.\n *\n * Every screen renders in the default blueprint's `AppShell`. There is no full-page variant here because\n * there is no Arc-bound page that belongs outside the application shell - a sign-in screen queries nothing\n * and submits no command, so it stays where it already is, in the default blueprint.\n */\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(componentsApplicationChrome(template.name), templateContentInLayout(placeable, appShellLayout)),\n forms: [],\n contributions: componentsNavigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * The nine page templates fit the layout's own `content` slot, so each one's chain is just itself. The\n * three nesting-chain templates are the exception and the only ones that need the walk - which is the\n * honest version of the story: nesting exists for the applications that need it, and costs nothing for the\n * ones that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/** One screen per screen template this blueprint provides. */\nexport const componentsGalleryScreens: Screen[] = componentsScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function componentsGalleryScreen(name: string): Screen | undefined {\n return componentsGalleryScreens.find(screen => screen.name === name);\n}\n"],"names":["screenFor","template","placeable","nestScreenTemplates","containmentChainFor","name","layout","LayoutName","AppShell","screenTemplate","slotContent","mergeSlotContent","componentsApplicationChrome","templateContentInLayout","appShellLayout","forms","contributions","componentsNavigationContributions","depth","nestingChainTemplates","findIndex","candidate","slice","chrome","content","merged","slotName","elements","Object","entries","componentsGalleryScreens","componentsScreenTemplates","map","componentsGalleryScreen","find","screen"],"mappings":";;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;IAwBA,SAASA,UAAUC,QAAwB,EAAA;IACvC,MAAMC,SAAAA,GAAYC,oBAAoBC,mBAAAA,CAAoBH,QAAAA,CAAAA,CAAAA;IAE1D,OAAO;AACHI,QAAAA,IAAAA,EAAMJ,SAASI,IAAI;AACnBC,QAAAA,MAAAA,EAAQC,WAAWC,QAAQ;AAC3BC,QAAAA,cAAAA,EAAgBR,SAASI,IAAI;AAC7BK,QAAAA,WAAAA,EAAaC,iBAAiBC,2BAAAA,CAA4BX,QAAAA,CAASI,IAAI,CAAA,EAAGQ,wBAAwBX,SAAAA,EAAWY,cAAAA,CAAAA,CAAAA;AAC7GC,QAAAA,KAAAA,EAAO,EAAE;QACTC,aAAAA,EAAeC;AACnB,KAAA;AACJ;AAEA;;;;;;;IAQA,SAASb,oBAAoBH,QAAwB,EAAA;IACjD,MAAMiB,KAAAA,GAAQC,qBAAAA,CAAsBC,SAAS,CAACC,CAAAA,YAAaA,SAAAA,CAAUhB,IAAI,KAAKJ,QAAAA,CAASI,IAAI,CAAA;AAC3F,IAAA,OAAOa,QAAQ,CAAA,GAAI;AAACjB,QAAAA;AAAS,KAAA,GAAGkB,qBAAAA,CAAsBG,KAAK,CAAC,CAAA,EAAGJ,KAAAA,GAAQ,CAAA,CAAA;AAC3E;AAEA,SAASP,gBAAAA,CAAiBY,MAAqD,EAAEC,OAAsD,EAAA;AACnI,IAAA,MAAMC,MAAAA,GAAgC;AAAE,QAAA,GAAGF;AAAO,KAAA;IAClD,KAAK,MAAM,CAACG,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA,+DACO,MAAMK,2BAAqCC,yBAAAA,CAA0BC,GAAG,CAAChC,SAAAA;AAEhF,oFACO,SAASiC,uBAAAA,CAAwB5B,IAAY,EAAA;AAChD,IAAA,OAAOyB,yBAAyBI,IAAI,CAACC,CAAAA,MAAAA,GAAUA,MAAAA,CAAO9B,IAAI,KAAKA,IAAAA,CAAAA;AACnE;;"}
package/dist/esm/index.js CHANGED
@@ -14,7 +14,7 @@ export { busyIndicatorDialog, commandDialog, dialog } from './templates/dialogEl
14
14
  export { dropdown, filterPanel, objectContentEditor, objectNavigationalBar, schemaEditor, timeMachine } from './templates/editorElements.js';
15
15
  export { dataListPageTemplate, dataListWithDetailPageTemplate, listTemplates, observableDataListPageTemplate } from './templates/listTemplates.js';
16
16
  export { dashboardPageTemplate, masterDetailPageTemplate, workspaceTemplates } from './templates/workspaceTemplates.js';
17
- export { commandFormPageTemplate, commandTemplates } from './templates/commandTemplates.js';
17
+ export { commandFormPageTemplate, commandTemplates, settingsPageTemplate } from './templates/commandTemplates.js';
18
18
  export { editorTemplates, objectEditorPageTemplate, schemaEditorPageTemplate } from './templates/editorTemplates.js';
19
19
  export { commandSliceSectionTemplate, dataFeatureSectionTemplate, dataModulePageTemplate, nestingChainTemplates } from './templates/nesting.js';
20
20
  export { busyDialogTemplate, commandDialogTemplate, componentsDialogTemplates, confirmDialogTemplate } from './templates/dialogTemplates.js';
@@ -6,6 +6,7 @@ export declare enum SampleBindingName {
6
6
  OpenTickets = "OpenTickets",
7
7
  AllAdjustments = "AllAdjustments",
8
8
  RegisterInvoice = "RegisterInvoice",
9
- RecordAdjustment = "RecordAdjustment"
9
+ RecordAdjustment = "RecordAdjustment",
10
+ ChangeBillingSettings = "ChangeBillingSettings"
10
11
  }
11
12
  //# sourceMappingURL=SampleBindingName.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SampleBindingName.d.ts","sourceRoot":"","sources":["../../../templates/SampleBindingName.ts"],"names":[],"mappings":"AAyBA,oBAAY,iBAAiB;IAEzB,WAAW,gBAAgB;IAG3B,gBAAgB,qBAAqB;IAGrC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,eAAe,oBAAoB;IAGnC,gBAAgB,qBAAqB;CACxC"}
1
+ {"version":3,"file":"SampleBindingName.d.ts","sourceRoot":"","sources":["../../../templates/SampleBindingName.ts"],"names":[],"mappings":"AAyBA,oBAAY,iBAAiB;IAEzB,WAAW,gBAAgB;IAG3B,gBAAgB,qBAAqB;IAGrC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IAGjC,eAAe,oBAAoB;IAGnC,gBAAgB,qBAAqB;IAGrC,qBAAqB,0BAA0B;CAClD"}
@@ -30,6 +30,7 @@
30
30
  /** Every adjustment recorded against an invoice. */ SampleBindingName["AllAdjustments"] = "AllAdjustments";
31
31
  /** Registers a new invoice - the command a form page submits. */ SampleBindingName["RegisterInvoice"] = "RegisterInvoice";
32
32
  /** Records an adjustment against an invoice - the command a dialog submits. */ SampleBindingName["RecordAdjustment"] = "RecordAdjustment";
33
+ /** Changes how the billing module behaves - the command a settings page submits. */ SampleBindingName["ChangeBillingSettings"] = "ChangeBillingSettings";
33
34
  return SampleBindingName;
34
35
  }({});
35
36
 
@@ -1 +1 @@
1
- {"version":3,"file":"SampleBindingName.js","sources":["../../../templates/SampleBindingName.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\n/**\n * The Arc query and command names this blueprint's templates ship bound to.\n *\n * A template carries a binding *name*, never a class - the binding registry in `@cratis/scene.components`\n * is what turns a name into the generated proxy at render time, and only a host owns those proxies. So a\n * template has to write some name, and these are the ones it writes.\n *\n * They are defaults, not fixtures. An application picking `DataListPage` replaces `AllInvoices` with its\n * own query and the page is done; nothing else about the template changes. Shipping a template with no\n * name at all would have been the alternative, and it is a worse one - it renders as a diagram of a page\n * rather than a page, and the thing a template most needs to prove is that it composes into something\n * real.\n *\n * The names are deliberately in the shape Arc generates: a `[ReadModel]`'s static query method\n * (`AllInvoices`), and a `[Command]` record (`RegisterInvoice`). A designer reading a preview should\n * recognize them as the artifacts they would really be wiring.\n *\n * This is an enum of *this package's defaults*, not of every name a binding may take. The element builders\n * therefore take a plain `string`, so an application can point the same builders at `AllPurchaseOrders`\n * without having to widen anything - the set of Arc proxies in an application is open, and a closed type\n * over it would make these builders usable only for the invoices they ship bound to.\n */\nexport enum SampleBindingName {\n /** Every invoice - the snapshot query a list page reads. */\n AllInvoices = 'AllInvoices',\n\n /** Invoices still being processed - an observable query, so the page is live. */\n InvoicesInFlight = 'InvoicesInFlight',\n\n /** One invoice by its id - what a detail region reads. */\n InvoiceById = 'InvoiceById',\n\n /** Revenue aggregated by month - a dashboard widget's query. */\n RevenueByMonth = 'RevenueByMonth',\n\n /** Open support tickets - a second dashboard widget's query. */\n OpenTickets = 'OpenTickets',\n\n /** Every adjustment recorded against an invoice. */\n AllAdjustments = 'AllAdjustments',\n\n /** Registers a new invoice - the command a form page submits. */\n RegisterInvoice = 'RegisterInvoice',\n\n /** Records an adjustment against an invoice - the command a dialog submits. */\n RecordAdjustment = 'RecordAdjustment',\n}\n"],"names":["SampleBindingName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;IAsBO,IAAKA,iBAAAA,iBAAAA,SAAAA,iBAAAA,EAAAA;iEACkD,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sFAGqB,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;+DAGvB,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;qEAGM,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;qEAGA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;yDAGZ,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;sEAGa,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAA;oFAGc,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAtBrEA,IAAAA,OAAAA,iBAAAA;AAwBX,CAAA,CAAA,EAAA;;"}
1
+ {"version":3,"file":"SampleBindingName.js","sources":["../../../templates/SampleBindingName.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\n/**\n * The Arc query and command names this blueprint's templates ship bound to.\n *\n * A template carries a binding *name*, never a class - the binding registry in `@cratis/scene.components`\n * is what turns a name into the generated proxy at render time, and only a host owns those proxies. So a\n * template has to write some name, and these are the ones it writes.\n *\n * They are defaults, not fixtures. An application picking `DataListPage` replaces `AllInvoices` with its\n * own query and the page is done; nothing else about the template changes. Shipping a template with no\n * name at all would have been the alternative, and it is a worse one - it renders as a diagram of a page\n * rather than a page, and the thing a template most needs to prove is that it composes into something\n * real.\n *\n * The names are deliberately in the shape Arc generates: a `[ReadModel]`'s static query method\n * (`AllInvoices`), and a `[Command]` record (`RegisterInvoice`). A designer reading a preview should\n * recognize them as the artifacts they would really be wiring.\n *\n * This is an enum of *this package's defaults*, not of every name a binding may take. The element builders\n * therefore take a plain `string`, so an application can point the same builders at `AllPurchaseOrders`\n * without having to widen anything - the set of Arc proxies in an application is open, and a closed type\n * over it would make these builders usable only for the invoices they ship bound to.\n */\nexport enum SampleBindingName {\n /** Every invoice - the snapshot query a list page reads. */\n AllInvoices = 'AllInvoices',\n\n /** Invoices still being processed - an observable query, so the page is live. */\n InvoicesInFlight = 'InvoicesInFlight',\n\n /** One invoice by its id - what a detail region reads. */\n InvoiceById = 'InvoiceById',\n\n /** Revenue aggregated by month - a dashboard widget's query. */\n RevenueByMonth = 'RevenueByMonth',\n\n /** Open support tickets - a second dashboard widget's query. */\n OpenTickets = 'OpenTickets',\n\n /** Every adjustment recorded against an invoice. */\n AllAdjustments = 'AllAdjustments',\n\n /** Registers a new invoice - the command a form page submits. */\n RegisterInvoice = 'RegisterInvoice',\n\n /** Records an adjustment against an invoice - the command a dialog submits. */\n RecordAdjustment = 'RecordAdjustment',\n\n /** Changes how the billing module behaves - the command a settings page submits. */\n ChangeBillingSettings = 'ChangeBillingSettings',\n}\n"],"names":["SampleBindingName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;;;;;IAsBO,IAAKA,iBAAAA,iBAAAA,SAAAA,iBAAAA,EAAAA;iEACkD,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;sFAGqB,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;+DAGvB,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;qEAGM,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;qEAGA,iBAAA,CAAA,aAAA,CAAA,GAAA,aAAA;yDAGZ,iBAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;sEAGa,iBAAA,CAAA,iBAAA,CAAA,GAAA,iBAAA;oFAGc,iBAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;yFAGK,iBAAA,CAAA,uBAAA,CAAA,GAAA,uBAAA;AAzB1EA,IAAAA,OAAAA,iBAAAA;AA2BX,CAAA,CAAA,EAAA;;"}
@@ -1,4 +1,5 @@
1
1
  import { ScreenTemplate } from '@cratis/scene.model';
2
2
  export declare const commandFormPageTemplate: ScreenTemplate;
3
+ export declare const settingsPageTemplate: ScreenTemplate;
3
4
  export declare const commandTemplates: ScreenTemplate[];
4
5
  //# sourceMappingURL=commandTemplates.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"commandTemplates.d.ts","sourceRoot":"","sources":["../../../templates/commandTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AA0BpE,eAAO,MAAM,uBAAuB,EAAE,cA4BrC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAA8B,CAAC"}
1
+ {"version":3,"file":"commandTemplates.d.ts","sourceRoot":"","sources":["../../../templates/commandTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AA0BpE,eAAO,MAAM,uBAAuB,EAAE,cA4BrC,CAAC;AAUF,eAAO,MAAM,oBAAoB,EAAE,cA4BlC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAAoD,CAAC"}
@@ -81,9 +81,75 @@ import { componentsBlueprintTemplateProvenance } from '../templateProvenance.js'
81
81
  displayName: 'Command form page',
82
82
  description: 'A generated command form under a header that states the command, with its own action bar.'
83
83
  };
84
+ /**
85
+ * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a
86
+ * module behaves rather than one that records something. The header says what the settings govern, the
87
+ * form follows the settings command, and the bar saves or discards.
88
+ *
89
+ * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog
90
+ * would hide the module the reader is configuring.
91
+ */ const settingsPageTemplate = {
92
+ name: 'SettingsPage',
93
+ fitsSlot: SlotName.Content,
94
+ slots: [
95
+ {
96
+ name: TemplateSlotName.Header
97
+ },
98
+ {
99
+ name: TemplateSlotName.Body
100
+ },
101
+ {
102
+ name: TemplateSlotName.Actions
103
+ }
104
+ ],
105
+ arrangement: {
106
+ root: column([
107
+ slotLeaf(TemplateSlotName.Header),
108
+ slotLeaf(TemplateSlotName.Body, {
109
+ grow: 1
110
+ }),
111
+ slotLeaf(TemplateSlotName.Actions)
112
+ ], 16)
113
+ },
114
+ content: {
115
+ [TemplateSlotName.Header]: [
116
+ arcPageHeader('settings-header', {
117
+ title: 'Billing settings',
118
+ subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',
119
+ section: 'Billing',
120
+ command: SampleBindingName.ChangeBillingSettings
121
+ })
122
+ ],
123
+ [TemplateSlotName.Body]: [
124
+ page('settings-body', '', [
125
+ commandForm('settings-form', SampleBindingName.ChangeBillingSettings, [
126
+ 'billingId'
127
+ ])
128
+ ])
129
+ ],
130
+ [TemplateSlotName.Actions]: [
131
+ toolbar('settings-actions', [
132
+ toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),
133
+ toolbarSeparator('settings-separator'),
134
+ toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard')
135
+ ])
136
+ ]
137
+ },
138
+ metadata: {
139
+ ...componentsBlueprintTemplateProvenance,
140
+ type: 'Form',
141
+ category: 'Business / Settings',
142
+ scopes: [
143
+ TemplateScope.Module
144
+ ]
145
+ },
146
+ displayName: 'Settings page',
147
+ description: "A module's settings as a generated command form, with save and discard."
148
+ };
84
149
  /** The command-shaped templates. */ const commandTemplates = [
85
- commandFormPageTemplate
150
+ commandFormPageTemplate,
151
+ settingsPageTemplate
86
152
  ];
87
153
 
88
- export { commandFormPageTemplate, commandTemplates };
154
+ export { commandFormPageTemplate, commandTemplates, settingsPageTemplate };
89
155
  //# sourceMappingURL=commandTemplates.js.map