@cratis/scene.blueprint.components 3.1.0 → 3.3.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 (60) hide show
  1. package/dist/cjs/BorrowedComponentName.js.map +1 -1
  2. package/dist/cjs/ComponentName.js.map +1 -1
  3. package/dist/cjs/CompositeName.js.map +1 -1
  4. package/dist/cjs/componentsBlueprint.js.map +1 -1
  5. package/dist/cjs/componentsBlueprintComponents.js.map +1 -1
  6. package/dist/cjs/gallery/DialogTemplatePreview.js.map +1 -1
  7. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
  8. package/dist/cjs/gallery/applicationChrome.js.map +1 -1
  9. package/dist/cjs/gallery/navigation.js.map +1 -1
  10. package/dist/cjs/gallery/previewProfile.js.map +1 -1
  11. package/dist/cjs/gallery/screens.js.map +1 -1
  12. package/dist/cjs/header/ArcPageHeader.js.map +1 -1
  13. package/dist/cjs/header/deriveArcHeading.js.map +1 -1
  14. package/dist/cjs/header/humanizeBindingName.js.map +1 -1
  15. package/dist/cjs/packageName.js.map +1 -1
  16. package/dist/cjs/templates/SampleBindingName.js.map +1 -1
  17. package/dist/cjs/templates/commandTemplates.js.map +1 -1
  18. package/dist/cjs/templates/dataElements.js.map +1 -1
  19. package/dist/cjs/templates/dialogElements.js.map +1 -1
  20. package/dist/cjs/templates/dialogTemplates.js.map +1 -1
  21. package/dist/cjs/templates/editorElements.js.map +1 -1
  22. package/dist/cjs/templates/editorTemplates.js.map +1 -1
  23. package/dist/cjs/templates/elements.js.map +1 -1
  24. package/dist/cjs/templates/formElements.js.map +1 -1
  25. package/dist/cjs/templates/listTemplates.js.map +1 -1
  26. package/dist/cjs/templates/nesting.js.map +1 -1
  27. package/dist/cjs/templates/sampleData.js.map +1 -1
  28. package/dist/cjs/templates/screenTemplates.js.map +1 -1
  29. package/dist/cjs/templates/workspaceTemplates.js.map +1 -1
  30. package/dist/esm/BorrowedComponentName.js.map +1 -1
  31. package/dist/esm/ComponentName.js.map +1 -1
  32. package/dist/esm/CompositeName.js.map +1 -1
  33. package/dist/esm/componentsBlueprint.js.map +1 -1
  34. package/dist/esm/componentsBlueprintComponents.js.map +1 -1
  35. package/dist/esm/gallery/DialogTemplatePreview.js.map +1 -1
  36. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
  37. package/dist/esm/gallery/applicationChrome.js.map +1 -1
  38. package/dist/esm/gallery/navigation.js.map +1 -1
  39. package/dist/esm/gallery/previewProfile.js.map +1 -1
  40. package/dist/esm/gallery/screens.js.map +1 -1
  41. package/dist/esm/header/ArcPageHeader.js.map +1 -1
  42. package/dist/esm/header/deriveArcHeading.js.map +1 -1
  43. package/dist/esm/header/humanizeBindingName.js.map +1 -1
  44. package/dist/esm/packageName.js.map +1 -1
  45. package/dist/esm/templates/SampleBindingName.js.map +1 -1
  46. package/dist/esm/templates/commandTemplates.js.map +1 -1
  47. package/dist/esm/templates/dataElements.js.map +1 -1
  48. package/dist/esm/templates/dialogElements.js.map +1 -1
  49. package/dist/esm/templates/dialogTemplates.js.map +1 -1
  50. package/dist/esm/templates/editorElements.js.map +1 -1
  51. package/dist/esm/templates/editorTemplates.js.map +1 -1
  52. package/dist/esm/templates/elements.js.map +1 -1
  53. package/dist/esm/templates/formElements.js.map +1 -1
  54. package/dist/esm/templates/listTemplates.js.map +1 -1
  55. package/dist/esm/templates/nesting.js.map +1 -1
  56. package/dist/esm/templates/sampleData.js.map +1 -1
  57. package/dist/esm/templates/screenTemplates.js.map +1 -1
  58. package/dist/esm/templates/workspaceTemplates.js.map +1 -1
  59. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  60. package/package.json +20 -20
@@ -1 +1 @@
1
- {"version":3,"file":"editorTemplates.js","sources":["../../../templates/editorTemplates.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, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, row, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { filterPanel, objectContentEditor, objectNavigationalBar, schemaEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, errorBoundary, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * The two inspection pages: one for a type's shape, one for an instance's content.\n *\n * These are the templates to open first when looking at this blueprint, because they are the two that\n * render completely with nothing registered. The schema editor, the document editor, the navigational bar\n * and the time machine all read their content out of the property bag rather than from a query, so a\n * preview of either page is a working page rather than a page of placeholders.\n *\n * That is not a trick to make a demo look better. It is the honest shape of the library: most of\n * `@cratis/components` is Arc-bound and needs a host, and a meaningful part of it is not. A blueprint built\n * on it should make both halves visible.\n */\n\n/**\n * The schema editor page: an event type's shape, edited as a typed property tree.\n *\n * Its header names no binding, and that is correct rather than an omission. A schema is design-time\n * metadata about an event type, not a read model anyone queries, so there is nothing for the header to be\n * bound to - and the header says `No binding` instead of implying a wiring step that does not exist. It is\n * the one page in this package where the unbound state is the finished state.\n *\n * `canEdit` is paired with `canNotEditReason` deliberately: in an event-sourced application a stored event\n * type's schema is very often deliberately locked, and saying why in the same place is what stops that\n * from reading as a bug.\n */\nexport const schemaEditorPageTemplate: ScreenTemplate = {\n name: 'SchemaEditorPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Toolbar), slotLeaf(TemplateSlotName.Body, { grow: 1 })], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('schema-header', {\n title: 'InvoiceRegistered',\n subtitle: 'The shape of the event, and what a new generation would be allowed to change',\n section: 'Event types',\n }),\n ],\n [TemplateSlotName.Toolbar]: [\n toolbar('schema-toolbar', [\n toolbarButton('schema-edit', 'Edit the schema', 'pi pi-pencil', 'Edit'),\n toolbarButton('schema-generation', 'Start a new generation', 'pi pi-clone', 'New generation'),\n toolbarSeparator('schema-separator'),\n toolbarButton('schema-download', 'Download as JSON Schema', 'pi pi-download'),\n ]),\n ],\n [TemplateSlotName.Body]: [\n page('schema-body', 'InvoiceRegistered', [schemaEditor('schema-editor', 'InvoiceRegistered', true)]),\n ],\n },\n displayName: 'Schema editor page',\n description: \"An event type's schema edited as a typed property tree, with the actions that evolve it.\",\n};\n\n/**\n * The object editor page: one document, its trail, and its history beside it.\n *\n * Bound to `InvoiceById`, because that is what a real page like this is: you arrive with an id, the query\n * fetches the record, and the editor renders it against its schema. The editors themselves take their\n * content from the property bag, so the page is fully legible before the query is wired - and the header\n * still says which query it is waiting for.\n *\n * The document is wrapped in an `errorBoundary` and the history is not, which is the decision this element\n * exists to let a template make. A malformed document should cost the document region; it should not take\n * the trail and the timeline down with it, and the timeline is the thing you would reach for to find out\n * *when* the document became malformed.\n */\nexport const objectEditorPageTemplate: ScreenTemplate = {\n name: 'ObjectEditorPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Toolbar },\n { name: TemplateSlotName.Body },\n { name: TemplateSlotName.SidePanel },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Toolbar),\n row([slotLeaf(TemplateSlotName.Body, { grow: 2 }), slotLeaf(TemplateSlotName.SidePanel, { grow: 1 })], 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Toolbar),\n slotLeaf(TemplateSlotName.Body),\n slotLeaf(TemplateSlotName.SidePanel),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('object-header', {\n title: 'INV-2043',\n subtitle: 'The document as it stands, and every version it has been',\n section: 'Billing',\n query: SampleBindingName.InvoiceById,\n }),\n ],\n [TemplateSlotName.Toolbar]: [objectNavigationalBar('object-trail'), filterPanel('object-filters', 'Filters')],\n [TemplateSlotName.Body]: [\n errorBoundary('object-guard', [page('object-body', 'Document', [objectContentEditor('object-editor', true)])]),\n ],\n [TemplateSlotName.SidePanel]: [page('object-history', 'History', [timeMachine('object-time-machine')])],\n },\n displayName: 'Object editor page',\n description: 'One document edited against its schema, with its navigation trail and its version history.',\n};\n\n/** The two editor-shaped templates. */\nexport const editorTemplates: ScreenTemplate[] = [schemaEditorPageTemplate, objectEditorPageTemplate];\n"],"names":["schemaEditorPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Toolbar","Body","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","toolbar","toolbarButton","toolbarSeparator","page","schemaEditor","displayName","description","objectEditorPageTemplate","SidePanel","row","overrides","width","WidthSizeClass","Compact","query","SampleBindingName","InvoiceById","objectNavigationalBar","filterPanel","errorBoundary","objectContentEditor","timeMachine","editorTemplates"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;;UAyBaA,wBAAAA,GAA2C;IACpDC,IAAAA,EAAM,kBAAA;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;AAAQ,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAK;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAAAA,gCAAAA,CAASP,yCAAiBC,MAAM,CAAA;AAAGM,YAAAA,gCAAAA,CAASP,yCAAiBE,OAAO,CAAA;YAAGK,gCAAAA,CAASP,wCAAAA,CAAiBG,IAAI,EAAE;gBAAEK,IAAAA,EAAM;AAAE,aAAA;SAAG,EAAE,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AAY;AAACiB,oBAAAA,kCAAAA,CAAoB,eAAA,EAAiB,IAAA;AAAM,iBAAA;AAAE,aAAA;AAChH,SAAA;QACD,CAAClC,wCAAAA,CAAiBsB,SAAS,GAAG;AAACL,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;gBAACkB,0BAAAA,CAAY,qBAAA;AAAuB,aAAA;AAAE;AAC3G,KAAA;IACAhB,WAAAA,EAAa,oBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMgB,eAAAA,GAAoC;AAAC1C,IAAAA,wBAAAA;AAA0B2B,IAAAA;;;;;;;"}
1
+ {"version":3,"file":"editorTemplates.js","sources":["../../../templates/editorTemplates.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, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, row, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { filterPanel, objectContentEditor, objectNavigationalBar, schemaEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, errorBoundary, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * The two inspection pages: one for a type's shape, one for an instance's content.\n *\n * These are the templates to open first when looking at this blueprint, because they are the two that\n * render completely with nothing registered. The schema editor, the document editor, the navigational bar\n * and the time machine all read their content out of the property bag rather than from a query, so a\n * preview of either page is a working page rather than a page of placeholders.\n *\n * That is not a trick to make a demo look better. It is the honest shape of the library: most of\n * `@cratis/components` is Arc-bound and needs a host, and a meaningful part of it is not. A blueprint built\n * on it should make both halves visible.\n */\n\n/**\n * The schema editor page: an event type's shape, edited as a typed property tree.\n *\n * Its header names no binding, and that is correct rather than an omission. A schema is design-time\n * metadata about an event type, not a read model anyone queries, so there is nothing for the header to be\n * bound to - and the header says `No binding` instead of implying a wiring step that does not exist. It is\n * the one page in this package where the unbound state is the finished state.\n *\n * `canEdit` is paired with `canNotEditReason` deliberately: in an event-sourced application a stored event\n * type's schema is very often deliberately locked, and saying why in the same place is what stops that\n * from reading as a bug.\n */\nexport const schemaEditorPageTemplate: ScreenTemplate = {\n name: 'SchemaEditorPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Toolbar), slotLeaf(TemplateSlotName.Body, { grow: 1 })], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('schema-header', {\n title: 'InvoiceRegistered',\n subtitle: 'The shape of the event, and what a new generation would be allowed to change',\n section: 'Event types',\n }),\n ],\n [TemplateSlotName.Toolbar]: [\n toolbar('schema-toolbar', [\n toolbarButton('schema-edit', 'Edit the schema', 'pi pi-pencil', 'Edit'),\n toolbarButton('schema-generation', 'Start a new generation', 'pi pi-clone', 'New generation'),\n toolbarSeparator('schema-separator'),\n toolbarButton('schema-download', 'Download as JSON Schema', 'pi pi-download'),\n ]),\n ],\n [TemplateSlotName.Body]: [\n page('schema-body', 'InvoiceRegistered', [schemaEditor('schema-editor', 'InvoiceRegistered', true)]),\n ],\n },\n displayName: 'Schema editor page',\n description: \"An event type's schema edited as a typed property tree, with the actions that evolve it.\",\n};\n\n/**\n * The object editor page: one document, its trail, and its history beside it.\n *\n * Bound to `InvoiceById`, because that is what a real page like this is: you arrive with an id, the query\n * fetches the record, and the editor renders it against its schema. The editors themselves take their\n * content from the property bag, so the page is fully legible before the query is wired - and the header\n * still says which query it is waiting for.\n *\n * The document is wrapped in an `errorBoundary` and the history is not, which is the decision this element\n * exists to let a template make. A malformed document should cost the document region; it should not take\n * the trail and the timeline down with it, and the timeline is the thing you would reach for to find out\n * *when* the document became malformed.\n */\nexport const objectEditorPageTemplate: ScreenTemplate = {\n name: 'ObjectEditorPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Toolbar },\n { name: TemplateSlotName.Body },\n { name: TemplateSlotName.SidePanel },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Toolbar),\n row([slotLeaf(TemplateSlotName.Body, { grow: 2 }), slotLeaf(TemplateSlotName.SidePanel, { grow: 1 })], 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Toolbar),\n slotLeaf(TemplateSlotName.Body),\n slotLeaf(TemplateSlotName.SidePanel),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('object-header', {\n title: 'INV-2043',\n subtitle: 'The document as it stands, and every version it has been',\n section: 'Billing',\n query: SampleBindingName.InvoiceById,\n }),\n ],\n [TemplateSlotName.Toolbar]: [objectNavigationalBar('object-trail'), filterPanel('object-filters', 'Filters')],\n [TemplateSlotName.Body]: [\n errorBoundary('object-guard', [page('object-body', 'Document', [objectContentEditor('object-editor', true)])]),\n ],\n [TemplateSlotName.SidePanel]: [page('object-history', 'History', [timeMachine('object-time-machine')])],\n },\n displayName: 'Object editor page',\n description: 'One document edited against its schema, with its navigation trail and its version history.',\n};\n\n/** The two editor-shaped templates. */\nexport const editorTemplates: ScreenTemplate[] = [schemaEditorPageTemplate, objectEditorPageTemplate];\n"],"names":["schemaEditorPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Toolbar","Body","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","toolbar","toolbarButton","toolbarSeparator","page","schemaEditor","displayName","description","objectEditorPageTemplate","SidePanel","row","overrides","width","WidthSizeClass","Compact","query","SampleBindingName","InvoiceById","objectNavigationalBar","filterPanel","errorBoundary","objectContentEditor","timeMachine","editorTemplates"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;;UAyBa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sB,SAAS;iBACtC,EACD,EAAA;AAER;AACH;AACL,KAAA;IACAb,OAAAA,EAAS;QACL,CAACT,wCAAAA,CAAiBC,MAAM,GAAG;AACvBS,YAAAA,sBAAAA,CAAc,eAAA,EAAiB;gBAC3BC,KAAAA,EAAO,UAAA;gBACPC,QAAAA,EAAU,0DAAA;gBACVC,OAAAA,EAAS,SAAA;AACTe,gBAAAA,KAAAA,EAAOC,oCAAkBC;AAC7B,aAAA;AACH,SAAA;QACD,CAAC9B,wCAAAA,CAAiBE,OAAO,GAAG;YAAC6B,oCAAAA,CAAsB,cAAA,CAAA;AAAiBC,YAAAA,0BAAAA,CAAY,gBAAA,EAAkB,SAAA;AAAW,SAAA;QAC7G,CAAChC,wCAAAA,CAAiBG,IAAI,GAAG;AACrB8B,YAAAA,sBAAAA,CAAc,cAAA,EAAgB;AAAChB,gBAAAA,aAAAA,CAAK,eAAe,UAAA,EAAY;AAACiB,oBAAAA,kCAAAA,CAAoB,eAAA,EAAiB,IAAA;AAAM,iBAAA;AAAE,aAAA;AAChH,SAAA;QACD,CAAClC,wCAAAA,CAAiBsB,SAAS,GAAG;AAACL,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;gBAACkB,0BAAAA,CAAY,qBAAA;AAAuB,aAAA;AAAE;AAC3G,KAAA;IACAhB,WAAAA,EAAa,oBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMgB,eAAAA,GAAoC;AAAC1C,IAAAA,wBAAAA;AAA0B2B,IAAAA;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sources":["../../../templates/elements.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 { SceneElement } from '@cratis/scene.model';\nimport { externalComponent } from '@cratis/scene.blueprint.default';\nimport { ComponentName } from '../ComponentName';\nimport { CompositeName } from '../CompositeName';\nimport { ArcHeaderOptions } from './ArcHeaderOptions';\n\n/**\n * The page furniture every template in this package repeats.\n *\n * `externalComponent` is imported from the default blueprint rather than written again, and that is worth\n * pausing on: `ExternalComponent` inherits fifteen required members before it reaches the two a template\n * author cares about, so a package that redeclared those defaults would be maintaining a second copy of a\n * decision it does not own. Borrowing the builder is the same choice as depending on the shell - this\n * blueprint layers on the default one, so it uses its parts.\n */\n\n/**\n * This blueprint's page header, given its heading and the one binding the page is about.\n *\n * Every template opens with one. The header derives the trail and the design-time binding state itself, so\n * a template states the page's subject once instead of repeating it in a title, a trail and a table.\n */\nexport function arcPageHeader(id: string, options: ArcHeaderOptions, actions: SceneElement[] = []): SceneElement {\n return externalComponent(id, ComponentName.ArcPageHeader, { ...options }, { actions });\n}\n\n/**\n * The library's `page` primitive wrapping content.\n *\n * A `div` would have done structurally, and would have been wrong: `page` is the full-height flex column\n * every other component in `@cratis/components` is laid out inside, drawn from the same `--cratis-*`\n * tokens as the tables and dialogs it contains. Content wrapped in it gets that consistency for free, and\n * content wrapped in a `div` has to reinvent it and will drift.\n */\nexport function page(id: string, title: string, content: SceneElement[], panel = true): SceneElement {\n return externalComponent(id, CompositeName.Page, { title, showTitle: title.length > 0, panel }, { content });\n}\n\n/** One button in a tool palette. `title` is the accessible name as well as the tooltip, so it is never omitted. */\nexport function toolbarButton(id: string, title: string, icon: string, text?: string): SceneElement {\n return externalComponent(id, CompositeName.ToolbarButton, { title, icon, text });\n}\n\n/** Related buttons kept together inside a toolbar. */\nexport function toolbarGroup(id: string, buttons: SceneElement[]): SceneElement {\n return externalComponent(id, CompositeName.ToolbarGroup, { orientation: 'horizontal' }, { content: buttons });\n}\n\n/** The divider between groups of tools. */\nexport function toolbarSeparator(id: string): SceneElement {\n return externalComponent(id, CompositeName.ToolbarSeparator, { orientation: 'horizontal' });\n}\n\n/**\n * A horizontal tool palette.\n *\n * `draggable` is deliberately left off rather than set per button - it is a property of the palette, and\n * setting it per button is how you end up with a palette that is half draggable.\n */\nexport function toolbar(id: string, content: SceneElement[]): SceneElement {\n return externalComponent(id, CompositeName.Toolbar, { orientation: 'horizontal' }, { content });\n}\n\n/**\n * Scopes a failure to one region of a page.\n *\n * React's default is that a throw anywhere unmounts the whole tree, which on a composed screen means one\n * broken widget takes the navigation with it. Which regions deserve a boundary is a decision about the\n * page, which is exactly why it belongs in a template rather than in the renderer.\n */\nexport function errorBoundary(id: string, content: SceneElement[]): SceneElement {\n return externalComponent(id, CompositeName.ErrorBoundary, {}, { content });\n}\n\n/** An icon, given a PrimeIcons class name. */\nexport function icon(id: string, iconName: string): SceneElement {\n return externalComponent(id, CompositeName.Icon, { icon: iconName });\n}\n"],"names":["arcPageHeader","id","options","actions","externalComponent","ComponentName","ArcPageHeader","page","title","content","panel","CompositeName","Page","showTitle","length","toolbarButton","icon","text","ToolbarButton","toolbarGroup","buttons","ToolbarGroup","orientation","toolbarSeparator","ToolbarSeparator","toolbar","Toolbar","errorBoundary","ErrorBoundary","iconName","Icon"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;IAgBO,SAASA,aAAAA,CAAcC,EAAU,EAAEC,OAAyB,EAAEC,UAA0B,EAAE,EAAA;AAC7F,IAAA,OAAOC,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcC,aAAa,EAAE;AAAE,QAAA,GAAGJ;KAAQ,EAAG;AAAEC,QAAAA;AAAQ,KAAA,CAAA;AACxF;AAEA;;;;;;;IAQO,SAASI,IAAAA,CAAKN,EAAU,EAAEO,KAAa,EAAEC,OAAuB,EAAEC,KAAAA,GAAQ,IAAI,EAAA;AACjF,IAAA,OAAON,yCAAAA,CAAkBH,EAAAA,EAAIU,2BAAAA,CAAcC,IAAI,EAAE;AAAEJ,QAAAA,KAAAA;QAAOK,SAAAA,EAAWL,KAAAA,CAAMM,MAAM,GAAG,CAAA;AAAGJ,QAAAA;KAAM,EAAG;AAAED,QAAAA;AAAQ,KAAA,CAAA;AAC9G;AAEA,oHACO,SAASM,aAAAA,CAAcd,EAAU,EAAEO,KAAa,EAAEQ,IAAY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ates/elements.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 { SceneElement } from '@cratis/scene.model';\nimport { externalComponent } from '@cratis/scene.blueprint.default';\nimport { ComponentName } from '../ComponentName';\nimport { CompositeName } from '../CompositeName';\nimport { ArcHeaderOptions } from './ArcHeaderOptions';\n\n/**\n * The page furniture every template in this package repeats.\n *\n * `externalComponent` is imported from the default blueprint rather than written again, and that is worth\n * pausing on: `ExternalComponent` inherits fifteen required members before it reaches the two a template\n * author cares about, so a package that redeclared those defaults would be maintaining a second copy of a\n * decision it does not own. Borrowing the builder is the same choice as depending on the shell - this\n * blueprint layers on the default one, so it uses its parts.\n */\n\n/**\n * This blueprint's page header, given its heading and the one binding the page is about.\n *\n * Every template opens with one. The header derives the trail and the design-time binding state itself, so\n * a template states the page's subject once instead of repeating it in a title, a trail and a table.\n */\nexport function arcPageHeader(id: string, options: ArcHeaderOptions, actions: SceneElement[] = []): SceneElement {\n return externalComponent(id, ComponentName.ArcPageHeader, { ...options }, { actions });\n}\n\n/**\n * The library's `page` primitive wrapping content.\n *\n * A `div` would have done structurally, and would have been wrong: `page` is the full-height flex column\n * every other component in `@cratis/components` is laid out inside, drawn from the same `--cratis-*`\n * tokens as the tables and dialogs it contains. Content wrapped in it gets that consistency for free, and\n * content wrapped in a `div` has to reinvent it and will drift.\n */\nexport function page(id: string, title: string, content: SceneElement[], panel = true): SceneElement {\n return externalComponent(id, CompositeName.Page, { title, showTitle: title.length > 0, panel }, { content });\n}\n\n/** One button in a tool palette. `title` is the accessible name as well as the tooltip, so it is never omitted. */\nexport function toolbarButton(id: string, title: string, icon: string, text?: string): SceneElement {\n return externalComponent(id, CompositeName.ToolbarButton, { title, icon, text });\n}\n\n/** Related buttons kept together inside a toolbar. */\nexport function toolbarGroup(id: string, buttons: SceneElement[]): SceneElement {\n return externalComponent(id, CompositeName.ToolbarGroup, { orientation: 'horizontal' }, { content: buttons });\n}\n\n/** The divider between groups of tools. */\nexport function toolbarSeparator(id: string): SceneElement {\n return externalComponent(id, CompositeName.ToolbarSeparator, { orientation: 'horizontal' });\n}\n\n/**\n * A horizontal tool palette.\n *\n * `draggable` is deliberately left off rather than set per button - it is a property of the palette, and\n * setting it per button is how you end up with a palette that is half draggable.\n */\nexport function toolbar(id: string, content: SceneElement[]): SceneElement {\n return externalComponent(id, CompositeName.Toolbar, { orientation: 'horizontal' }, { content });\n}\n\n/**\n * Scopes a failure to one region of a page.\n *\n * React's default is that a throw anywhere unmounts the whole tree, which on a composed screen means one\n * broken widget takes the navigation with it. Which regions deserve a boundary is a decision about the\n * page, which is exactly why it belongs in a template rather than in the renderer.\n */\nexport function errorBoundary(id: string, content: SceneElement[]): SceneElement {\n return externalComponent(id, CompositeName.ErrorBoundary, {}, { content });\n}\n\n/** An icon, given a PrimeIcons class name. */\nexport function icon(id: string, iconName: string): SceneElement {\n return externalComponent(id, CompositeName.Icon, { icon: iconName });\n}\n"],"names":["arcPageHeader","id","options","actions","externalComponent","ComponentName","ArcPageHeader","page","title","content","panel","CompositeName","Page","showTitle","length","toolbarButton","icon","text","ToolbarButton","toolbarGroup","buttons","ToolbarGroup","orientation","toolbarSeparator","ToolbarSeparator","toolbar","Toolbar","errorBoundary","ErrorBoundary","iconName","Icon"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;IAgBO,SAASA,aAAAA,CAAcC,EAAU,EAAEC,OAAyB,EAAEC,UAA0B,EAAE,EAAA;AAC7F,IAAA,OAAOC,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcC,aAAa,EAAE;AAAE,QAAA,GAAGJ;KAAQ,EAAG;AAAEC,QAAAA;AAAQ,KAAA,CAAA;AACxF;AAEA;;;;;;;IAQO,SAASI,IAAAA,CAAKN,EAAU,EAAEO,KAAa,EAAEC,OAAuB,EAAEC,KAAAA,GAAQ,IAAI,EAAA;AACjF,IAAA,OAAON,yCAAAA,CAAkBH,EAAAA,EAA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C5E;AAEA,+CACO,SAASO,IAAAA,CAAKf,EAAU,EAAE4B,QAAgB,EAAA;AAC7C,IAAA,OAAOzB,yCAAAA,CAAkBH,EAAAA,EAAIU,2BAAAA,CAAcmB,IAAI,EAAE;QAAEd,IAAAA,EAAMa;AAAS,KAAA,CAAA;AACtE;;;;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"formElements.js","sources":["../../../templates/formElements.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 { SceneElement } from '@cratis/scene.model';\nimport { externalComponent } from '@cratis/scene.blueprint.default';\nimport { CompositeName } from '../CompositeName';\n\n/**\n * The Arc-bound form elements this blueprint's templates are built from.\n *\n * Every field carries a `property` name, which the library turns into an accessor onto the command\n * instance. That indirection is not incidental: a hand-written form binds a field with\n * `value={command => command.number}` and is typechecked against the generated proxy, and a template has\n * no types to check against because it is data. The name is what survives, so the name is what a field\n * carries.\n */\n\n/**\n * A whole form generated from the command's own property descriptors.\n *\n * `commandForm` is `AutoCommandForm`, not `CommandForm`, and that is what makes it worth shipping in a\n * template at all: a template that listed every field by hand would go stale the moment a property was\n * added to the command on the backend, and a stale template is worse than no template. This one follows\n * the command, which is the same guarantee Arc's generated proxies give the rest of the stack.\n *\n * @param exclude Properties the surrounding template places itself, so the generated form does not produce a second copy.\n */\nexport function commandForm(id: string, command: string, exclude?: string[]): SceneElement {\n return externalComponent(id, CompositeName.CommandForm, { command, exclude });\n}\n\n/** A single-line text field bound to one command property. */\nexport function inputTextField(id: string, property: string, title: string, placeholder?: string): SceneElement {\n return externalComponent(id, CompositeName.InputTextField, { property, title, placeholder });\n}\n\n/** A numeric field bound to one command property. */\nexport function numberField(id: string, property: string, title: string): SceneElement {\n return externalComponent(id, CompositeName.NumberField, { property, title });\n}\n\n/** A multi-line text field bound to one command property. */\nexport function textAreaField(id: string, property: string, title: string, rows = 3): SceneElement {\n return externalComponent(id, CompositeName.TextAreaField, { property, title, rows });\n}\n\n/** A date field bound to one command property. */\nexport function calendarField(id: string, property: string, title: string): SceneElement {\n return externalComponent(id, CompositeName.CalendarField, { property, title });\n}\n\n/**\n * A single-selection field over a list the template carries inline.\n *\n * Inline options only. A list that has to come from the backend is a different thing entirely - bind it to\n * a query - because a property bag is the wrong place for data, and a template that embedded a real\n * lookup table would be shipping someone else's reference data.\n */\nexport function dropdownField(id: string, property: string, title: string, options: { label: string; value: string }[]): SceneElement {\n return externalComponent(id, CompositeName.DropdownField, { property, title, options });\n}\n"],"names":["commandForm","id","command","exclude","externalComponent","CompositeName","CommandForm","inputTextField","property","title","placeholder","InputTextField","numberField","NumberField","textAreaField","rows","TextAreaField","calendarField","CalendarField","dropdownField","options","DropdownField"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASA,WAAAA,CAAYC,EAAU,EAAEC,OAAe,EAAEC,OAAkB,EAAA;AACvE,IAAA,OAAOC,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcC,WAAW,EAAE;AAAEJ,QAAAA,OAAAA;AAASC,QAAAA;AAAQ,KAAA,CAAA;AAC/E;AAEA,+DACO,SAASI,cAAAA,CAAeN,EAAU,EAAEO,QAAgB,EAAEC,KAAa,EAAEC,WAAoB,EAAA;AAC5F,IAAA,OAAON,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcM,cAAc,EAAE;AAAEH,QAAAA,QAAAA;AAAUC,QAAAA,KAAAA;AAAOC,QAAAA;AAAY,KAAA,CAAA;AAC9F;AAEA,sDACO,SAASE,WAAAA,CAAYX,EAAU,EAAEO,QAAgB,EAAEC,KAAa,EAAA;AACnE,IAAA,OAAOL,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcQ,WAAW,EAAE;AAAEL,QAAAA,QAAAA;AAAUC,QAAAA;AAAM,KAAA,CAAA;AAC9E;AAEA,8DACO,SAASK,aAAAA,CAAcb,EAAU,EAAEO,QAAgB,EAAEC,KAAa,EAAEM,IAAAA,GAAO,CAAC,EAAA;AAC/E,IAAA,OAAOX,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcW,aAAa,EAAE;AAAER,QAAAA,QAAAA;AAAUC,QAAAA,KAAAA;AAAOM,QAAAA;AAAK,KAAA,CAAA;AACtF;AAEA,mDACO,SAASE,aAAAA,CAAchB,EAAU,EAAEO,QAAgB,EAAEC,KAAa,EAAA;AACrE,IAAA,OAAOL,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAca,aAAa,EAAE;AAAEV,QAAAA,QAAAA;AAAUC,QAAAA;AAAM,KAAA,CAAA;AAChF;AAEA;;;;;;IAOO,SAASU,aAAAA,CAAclB,EAAU,EAAEO,QAAgB,EAAEC,KAAa,EAAEW,OAA2C,EAAA;AAClH,IAAA,OAAOhB,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcgB,aAAa,EAAE;AAAEb,QAAAA,QAAAA;AAAUC,QAAAA,KAAAA;AAAOW,QAAAA;AAAQ,KAAA,CAAA;AACzF;;;;;;;;;"}
1
+ {"version":3,"file":"formElements.js","sources":["../../../templates/formElements.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 { SceneElement } from '@cratis/scene.model';\nimport { externalComponent } from '@cratis/scene.blueprint.default';\nimport { CompositeName } from '../CompositeName';\n\n/**\n * The Arc-bound form elements this blueprint's templates are built from.\n *\n * Every field carries a `property` name, which the library turns into an accessor onto the command\n * instance. That indirection is not incidental: a hand-written form binds a field with\n * `value={command => command.number}` and is typechecked against the generated proxy, and a template has\n * no types to check against because it is data. The name is what survives, so the name is what a field\n * carries.\n */\n\n/**\n * A whole form generated from the command's own property descriptors.\n *\n * `commandForm` is `AutoCommandForm`, not `CommandForm`, and that is what makes it worth shipping in a\n * template at all: a template that listed every field by hand would go stale the moment a property was\n * added to the command on the backend, and a stale template is worse than no template. This one follows\n * the command, which is the same guarantee Arc's generated proxies give the rest of the stack.\n *\n * @param exclude Properties the surrounding template places itself, so the generated form does not produce a second copy.\n */\nexport function commandForm(id: string, command: string, exclude?: string[]): SceneElement {\n return externalComponent(id, CompositeName.CommandForm, { command, exclude });\n}\n\n/** A single-line text field bound to one command property. */\nexport function inputTextField(id: string, property: string, title: string, placeholder?: string): SceneElement {\n return externalComponent(id, CompositeName.InputTextField, { property, title, placeholder });\n}\n\n/** A numeric field bound to one command property. */\nexport function numberField(id: string, property: string, title: string): SceneElement {\n return externalComponent(id, CompositeName.NumberField, { property, title });\n}\n\n/** A multi-line text field bound to one command property. */\nexport function textAreaField(id: string, property: string, title: string, rows = 3): SceneElement {\n return externalComponent(id, CompositeName.TextAreaField, { property, title, rows });\n}\n\n/** A date field bound to one command property. */\nexport function calendarField(id: string, property: string, title: string): SceneElement {\n return externalComponent(id, CompositeName.CalendarField, { property, title });\n}\n\n/**\n * A single-selection field over a list the template carries inline.\n *\n * Inline options only. A list that has to come from the backend is a different thing entirely - bind it to\n * a query - because a property bag is the wrong place for data, and a template that embedded a real\n * lookup table would be shipping someone else's reference data.\n */\nexport function dropdownField(id: string, property: string, title: string, options: { label: string; value: string }[]): SceneElement {\n return externalComponent(id, CompositeName.DropdownField, { property, title, options });\n}\n"],"names":["commandForm","id","command","exclude","externalComponent","CompositeName","CommandForm","inputTextField","property","title","placeholder","InputTextField","numberField","NumberField","textAreaField","rows","TextAreaField","calendarField","CalendarField","dropdownField","options","DropdownField"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;AAmBC,IACM,SAASA,WAAAA,CAAYC,EAAU,EAAEC,OAAe,EAAEC,OAAkB,EAAA;AACvE,IAAA,OAAOC,yCAAAA,CAAkBH,EAAAA,EAAII,2BAAAA,CAAcC,WAAW,EAAE;AAAEJ,QAAAA,OAAAA;AAASC,QAAAA;AAAQ,KAAA,CAAA;AAC/E;AAEA,+DACO,SAASI,cAAAA,CAAeN,EAAU,EAA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Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, row, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { dataPage, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, objectNavigationalBar, timeMachine } from './editorElements';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarGroup, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * The three list shapes an Arc application repeats: a list, a live list, and a list with the selected\n * record beside it.\n *\n * All three fill the application shell's `content` slot, which is the only slot the default blueprint's\n * `AppShell` layout declares for a screen - so an application that has picked the default blueprint can\n * drop any of these in without arranging anything.\n *\n * What makes them worth shipping is what is *already wired*. A list page is not \"a table in a slot\"; it is\n * a query name, a set of columns, an empty message, a data key, a filter field list, a header that states\n * what the page is bound to, and an action bar. Every one of those is a decision, and repeating all seven\n * per screen is how a list page ends up subtly different on every screen of an application.\n */\n\n/**\n * The archetype: a `dataPage` filling the body, under a header that says what it is bound to.\n *\n * `dataPage` is the single highest-leverage name `Cratis.Components` exposes - the library's whole\n * list-screen composite, with its title bar, menubar, filterable table and optional details pane driven\n * from one query. Building the same thing out of a `table` and a `toolbar` in a screen is pages of\n * modeling for a worse result, and this template is the answer to that: an application supplies a query\n * name and has a working list page.\n */\nexport const dataListPageTemplate: ScreenTemplate = {\n name: 'DataListPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader(\n 'data-list-header',\n { title: 'Invoices', subtitle: 'Every invoice, filterable and paged against the server', section: 'Billing', query: SampleBindingName.AllInvoices },\n [\n toolbar('data-list-actions', [\n toolbarButton('data-list-new', 'Register an invoice', 'pi pi-plus', 'New'),\n toolbarButton('data-list-refresh', 'Refresh', 'pi pi-refresh'),\n toolbarSeparator('data-list-separator'),\n toolbarGroup('data-list-export', [\n toolbarButton('data-list-download', 'Download as CSV', 'pi pi-download'),\n toolbarButton('data-list-print', 'Print', 'pi pi-print'),\n ]),\n ]),\n ],\n ),\n ],\n [TemplateSlotName.Body]: [dataPage('data-list-body', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)],\n },\n displayName: 'Data list page',\n description: 'A dataPage bound to one query, under a header that states the binding - the whole list screen in two elements.',\n};\n\n/**\n * The live variant: the same page shape over an observable query.\n *\n * A separate template rather than a flag, for the same reason `observableDataTable` is a separate name\n * from `dataTable`: the difference lives in the *proxy* a host registers, not in how the page is\n * configured. An observable query opens a subscription and the page re-renders when the read model\n * changes on the server. Choosing this template is an application saying its data is live, and that is a\n * decision worth being able to read off the screen rather than infer from a property.\n */\nexport const observableDataListPageTemplate: ScreenTemplate = {\n name: 'ObservableDataListPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('observable-list-header', {\n title: 'Invoices in flight',\n subtitle: 'Updates as the read model changes - no refresh button, because there is nothing to refresh',\n section: 'Billing',\n query: SampleBindingName.InvoicesInFlight,\n }),\n ],\n [TemplateSlotName.Body]: [\n page('observable-list-body', 'In flight', [\n observableDataTable('observable-list-table', SampleBindingName.InvoicesInFlight, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n },\n displayName: 'Observable data list page',\n description: 'A live list over an observable query, which re-renders when the read model changes on the server.',\n};\n\n/**\n * List plus detail: the whole list screen, with the selected record's document and history beside it.\n *\n * The detail region is built from the library's Arc-free editors, which is the interesting part. They read\n * their content out of the property bag rather than from a query, so this half of the page renders fully\n * at design time while the list half is still a placeholder - and in an event-sourced application the\n * record's *history* is as natural a thing to show as its current values, which is why the time machine is\n * here rather than in some optional extra.\n *\n * Its arrangement drops the detail column below the list at a compact width, because a document editor and\n * a paged table side by side on a phone are two unreadable slivers.\n */\nexport const dataListWithDetailPageTemplate: ScreenTemplate = {\n name: 'DataListWithDetailPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), row([slotLeaf(TemplateSlotName.Body, { grow: 2 }), slotLeaf(TemplateSlotName.SidePanel, { grow: 1 })], 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body), slotLeaf(TemplateSlotName.SidePanel)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('list-detail-header', {\n title: 'Invoices',\n subtitle: 'The list, with the selected invoice beside it',\n section: 'Billing',\n query: SampleBindingName.AllInvoices,\n }),\n ],\n [TemplateSlotName.Body]: [dataPage('list-detail-body', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)],\n [TemplateSlotName.SidePanel]: [\n page('list-detail-panel', 'Selected invoice', [\n objectNavigationalBar('list-detail-trail'),\n objectContentEditor('list-detail-document', false),\n timeMachine('list-detail-history'),\n ]),\n ],\n },\n displayName: 'Data list with detail page',\n description: 'A dataPage beside a detail region showing the selected record document and its history.',\n};\n\n/** The three list-shaped templates. */\nexport const listTemplates: ScreenTemplate[] = [dataListPageTemplate, observableDataListPageTemplate, dataListWithDetailPageTemplate];\n"],"names":["dataListPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","content","arcPageHeader","title","subtitle","section","query","SampleBindingName","AllInvoices","toolbar","toolbarButton","toolbarSeparator","toolbarGroup","dataPage","invoiceTableOptions","invoiceColumns","displayName","description","observableDataListPageTemplate","InvoicesInFlight","page","observableDataTable","dataListWithDetailPageTemplate","SidePanel","arrangement","root","column","slotLeaf","row","grow","overrides","width","WidthSizeClass","Compact","objectNavigationalBar","objectContentEditor","timeMachine","listTemplates"],"mappings":";;;;;;;;;AAAA;AACA;A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IAAAA,oBAAAA;AAAsB0B,IAAAA,8BAAAA;AAAgCI,IAAAA;;;;;;;;"}
1
+ {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.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, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, row, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { dataPage, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, objectNavigationalBar, timeMachine } from './editorElements';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarGroup, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * The three list shapes an Arc application repeats: a list, a live list, and a list with the selected\n * record beside it.\n *\n * All three fill the application shell's `content` slot, which is the only slot the default blueprint's\n * `AppShell` layout declares for a screen - so an application that has picked the default blueprint can\n * drop any of these in without arranging anything.\n *\n * What makes them worth shipping is what is *already wired*. A list page is not \"a table in a slot\"; it is\n * a query name, a set of columns, an empty message, a data key, a filter field list, a header that states\n * what the page is bound to, and an action bar. Every one of those is a decision, and repeating all seven\n * per screen is how a list page ends up subtly different on every screen of an application.\n */\n\n/**\n * The archetype: a `dataPage` filling the body, under a header that says what it is bound to.\n *\n * `dataPage` is the single highest-leverage name `Cratis.Components` exposes - the library's whole\n * list-screen composite, with its title bar, menubar, filterable table and optional details pane driven\n * from one query. Building the same thing out of a `table` and a `toolbar` in a screen is pages of\n * modeling for a worse result, and this template is the answer to that: an application supplies a query\n * name and has a working list page.\n */\nexport const dataListPageTemplate: ScreenTemplate = {\n name: 'DataListPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader(\n 'data-list-header',\n { title: 'Invoices', subtitle: 'Every invoice, filterable and paged against the server', section: 'Billing', query: SampleBindingName.AllInvoices },\n [\n toolbar('data-list-actions', [\n toolbarButton('data-list-new', 'Register an invoice', 'pi pi-plus', 'New'),\n toolbarButton('data-list-refresh', 'Refresh', 'pi pi-refresh'),\n toolbarSeparator('data-list-separator'),\n toolbarGroup('data-list-export', [\n toolbarButton('data-list-download', 'Download as CSV', 'pi pi-download'),\n toolbarButton('data-list-print', 'Print', 'pi pi-print'),\n ]),\n ]),\n ],\n ),\n ],\n [TemplateSlotName.Body]: [dataPage('data-list-body', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)],\n },\n displayName: 'Data list page',\n description: 'A dataPage bound to one query, under a header that states the binding - the whole list screen in two elements.',\n};\n\n/**\n * The live variant: the same page shape over an observable query.\n *\n * A separate template rather than a flag, for the same reason `observableDataTable` is a separate name\n * from `dataTable`: the difference lives in the *proxy* a host registers, not in how the page is\n * configured. An observable query opens a subscription and the page re-renders when the read model\n * changes on the server. Choosing this template is an application saying its data is live, and that is a\n * decision worth being able to read off the screen rather than infer from a property.\n */\nexport const observableDataListPageTemplate: ScreenTemplate = {\n name: 'ObservableDataListPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('observable-list-header', {\n title: 'Invoices in flight',\n subtitle: 'Updates as the read model changes - no refresh button, because there is nothing to refresh',\n section: 'Billing',\n query: SampleBindingName.InvoicesInFlight,\n }),\n ],\n [TemplateSlotName.Body]: [\n page('observable-list-body', 'In flight', [\n observableDataTable('observable-list-table', SampleBindingName.InvoicesInFlight, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n },\n displayName: 'Observable data list page',\n description: 'A live list over an observable query, which re-renders when the read model changes on the server.',\n};\n\n/**\n * List plus detail: the whole list screen, with the selected record's document and history beside it.\n *\n * The detail region is built from the library's Arc-free editors, which is the interesting part. They read\n * their content out of the property bag rather than from a query, so this half of the page renders fully\n * at design time while the list half is still a placeholder - and in an event-sourced application the\n * record's *history* is as natural a thing to show as its current values, which is why the time machine is\n * here rather than in some optional extra.\n *\n * Its arrangement drops the detail column below the list at a compact width, because a document editor and\n * a paged table side by side on a phone are two unreadable slivers.\n */\nexport const dataListWithDetailPageTemplate: ScreenTemplate = {\n name: 'DataListWithDetailPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), row([slotLeaf(TemplateSlotName.Body, { grow: 2 }), slotLeaf(TemplateSlotName.SidePanel, { grow: 1 })], 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body), slotLeaf(TemplateSlotName.SidePanel)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('list-detail-header', {\n title: 'Invoices',\n subtitle: 'The list, with the selected invoice beside it',\n section: 'Billing',\n query: SampleBindingName.AllInvoices,\n }),\n ],\n [TemplateSlotName.Body]: [dataPage('list-detail-body', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)],\n [TemplateSlotName.SidePanel]: [\n page('list-detail-panel', 'Selected invoice', [\n objectNavigationalBar('list-detail-trail'),\n objectContentEditor('list-detail-document', false),\n timeMachine('list-detail-history'),\n ]),\n ],\n },\n displayName: 'Data list with detail page',\n description: 'A dataPage beside a detail region showing the selected record document and its history.',\n};\n\n/** The three list-shaped templates. */\nexport const listTemplates: ScreenTemplate[] = [dataListPageTemplate, observableDataListPageTemplate, dataListWithDetailPageTemplate];\n"],"names":["dataListPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","content","arcPageHeader","title","subtitle","section","query","SampleBindingName","AllInvoices","toolbar","toolbarButton","toolbarSeparator","toolbarGroup","dataPage","invoiceTableOptions","invoiceColumns","displayName","description","observableDataListPageTemplate","InvoicesInFlight","page","observableDataTable","dataListWithDetailPageTemplate","SidePanel","arrangement","root","column","slotLeaf","row","grow","overrides","width","WidthSizeClass","Compact","objectNavigationalBar","objectContentEditor","timeMachine","listTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;UAuBaA,oBAAAA,GAAuC;IAChDC,IAAAA,EAAM,cAAA;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;AAAE,KAAA;IAC3EC,OAAAA,EAAS;QACL,CAACH,wCAAAA,CAAiBC,MAAM,GAAG;AACvBG,YAAAA,sBAAAA,CACI,kBAAA,EACA;gBAAEC,KAAAA,EAAO,UAAA;gBAAYC,QAAAA,EAAU,wDAAA;gBAA0DC,OAAAA,EAAS,SAAA;AAAWC,gBAAAA,KAAAA,EAAOC,oCAAkBC;aAAY,EAClJ;AACIC,gBAAAA,gBAAAA,CAAQ,mBAAA,EAAqB;oBACzBC,sBAAAA,CAAc,eAAA,EAAiB,uBAAuB,YAAA,EAAc,KAAA,CAAA;AACpEA,oBAAAA,sBAAAA,CAAc,qBAAqB,SAAA,EAAW,eAAA,CAAA;oBAC9CC,yBAAAA,CAAiB,qBAAA,CAAA;AACjBC,oBAAAA,qBAAAA,CAAa,kBAAA,EAAoB;AAC7BF,wBAAAA,sBAAAA,CAAc,sBAAsB,iBAAA,EAAmB,gBAAA,CAAA;AACvDA,wBAAAA,sBAAAA,CAAc,mBAAmB,OAAA,EAAS,aAAA;AAC7C,qBAAA;AACJ,iBAAA;AACJ,aAAA;AAER,SAAA;QACD,CAACZ,wCAAAA,CAAiBE,IAAI,GAAG;AAACa,YAAAA,qBAAAA,CAAS,gBAAA,EAAkBN,mCAAAA,CAAkBC,WAAW,EAAEM,gCAAAA,EAAqBC,2BAAAA;AAAgB;A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AA,CAAY,qBAAA;AACf,aAAA;AACJ;AACL,KAAA;IACApB,WAAAA,EAAa,4BAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMoB,aAAAA,GAAkC;AAAC7C,IAAAA,oBAAAA;AAAsB0B,IAAAA,8BAAAA;AAAgCI,IAAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"nesting.js","sources":["../../../templates/nesting.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 { SlotName, TemplateSlotName } from '@cratis/scene.blueprint.default';\nimport { invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { filterPanel } from './editorElements';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * A worked three-level chain, from the application layout down to one behavior.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's fits a\n * slot the module's declares; a slice's fits one the feature's declares. Nothing here is a special case\n * for a particular level, which is exactly why the hierarchy can be arbitrarily deep with no second\n * mechanism.\n *\n * The slot names are chosen so that each fitted name is declared by exactly one container in the chain -\n * `body` only by the module, `primary` only by the feature. That is not decoration: `resolveScreenTemplates`\n * places a template only when the containers in scope agree on exactly one home for it, and reports it as\n * unplaced rather than guessing when two of them declare the same name. A chain that reused `body` at\n * three levels would read fine and resolve to nothing.\n *\n * The whole chain is Arc-bound, which is the point of it living in *this* blueprint rather than being a\n * second copy of the default one's. It ends where a Cratis slice really ends: a button that summons the\n * command dialog.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * A module always has a name and a description, so it brings its own header, and it offers a body for the\n * feature inside it plus a side panel for the filters that apply across the whole module.\n */\nexport const dataModulePageTemplate: ScreenTemplate = {\n name: 'DataModulePage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('module-header', {\n title: 'Billing',\n subtitle: 'Everything the billing module owns',\n section: 'Operations',\n }),\n ],\n [TemplateSlotName.SidePanel]: [page('module-filters', 'Filters', [filterPanel('module-filter-panel', 'Filter the module')])],\n },\n displayName: 'Data module page',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n};\n\n/**\n * Feature level: fits the module page's `body` slot.\n *\n * A feature is where actions belong - a module is a grouping and a slice is one behavior, and the feature\n * in between is what a user thinks of as \"the screen with the buttons on it\". It offers a primary region\n * for the slice and a secondary one for the live view of what that slice is doing.\n */\nexport const dataFeatureSectionTemplate: ScreenTemplate = {\n name: 'DataFeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n content: {\n [TemplateSlotName.Toolbar]: [\n toolbar('feature-toolbar', [\n toolbarButton('feature-new', 'Register an invoice', 'pi pi-plus', 'New'),\n toolbarButton('feature-adjust', 'Record an adjustment', 'pi pi-pencil', 'Adjust'),\n toolbarSeparator('feature-separator'),\n toolbarButton('feature-export', 'Export the feature data', 'pi pi-download'),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('feature-live', 'In flight', [\n observableDataTable('feature-live-table', SampleBindingName.InvoicesInFlight, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n },\n displayName: 'Data feature section',\n description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.',\n};\n\n/**\n * Slice level: fits the feature section's `primary` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it. A slice is one behavior, and in a\n * Cratis application that behavior is one command - so its surface is a header saying what the command is\n * and whether it is wired, and the action that summons it. The capture itself happens in the `CommandDialog`\n * dialog template, which is why this template has no form on it and does not need one.\n */\nexport const commandSliceSectionTemplate: ScreenTemplate = {\n name: 'CommandSliceSection',\n fitsSlot: TemplateSlotName.Primary,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('slice-header', {\n title: 'Record an adjustment',\n subtitle: 'One behavior, one command, one button',\n section: 'Adjustments',\n command: SampleBindingName.RecordAdjustment,\n }),\n ],\n [TemplateSlotName.Actions]: [\n toolbar('slice-actions', [\n toolbarButton('slice-record', 'Record an adjustment', 'pi pi-check', 'Record'),\n toolbarButton('slice-cancel', 'Leave the invoice as it is', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n displayName: 'Command slice section',\n description: 'Slice level: fits a feature section primary slot and hosts one command behavior.',\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [dataModulePageTemplate, dataFeatureSectionTemplate, commandSliceSectionTemplate];\n"],"names":["dataModulePageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","arcPageHeader","title","subtitle","section","page","filterPanel","displayName","description","dataFeatureSectionTemplate","Toolbar","Primary","Secondary","toolbar","toolbarButton","toolbarSeparator","observableDataTable","SampleBindingName","InvoicesInFlight","invoiceTableOptions","invoiceColumns","commandSliceSectionTemplate","Actions","command","RecordAdjustment","nestingChainTemplates"],"mappings":";;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;;;;UA0BaA,sBAAAA,GAAyC;IAClDC,IAAAA,EAAM,gBAAA;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;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;Q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AsBC,mCAAAA,CAAkBC,gBAAgB,EAAEC,gCAAAA,EAAqBC,2BAAAA;AACtG,aAAA;AACJ;AACL,KAAA;IACAb,WAAAA,EAAa,sBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA;;;;;;;UAQaa,2BAAAA,GAA8C;IACvD9B,IAAAA,EAAM,qBAAA;AACNC,IAAAA,QAAAA,EAAUI,yCAAiBe,OAAO;IAClChB,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiB0B;AAAQ;AAAE,KAAA;IAC9EtB,OAAAA,EAAS;QACL,CAACJ,wCAAAA,CAAiBC,MAAM,GAAG;AACvBI,YAAAA,sBAAAA,CAAc,cAAA,EAAgB;gBAC1BC,KAAAA,EAAO,sBAAA;gBACPC,QAAAA,EAAU,uCAAA;gBACVC,OAAAA,EAAS,aAAA;AACTmB,gBAAAA,OAAAA,EAASN,oCAAkBO;AAC/B,aAAA;AACH,SAAA;QACD,CAAC5B,wCAAAA,CAAiB0B,OAAO,GAAG;AACxBT,YAAAA,gBAAAA,CAAQ,eAAA,EAAiB;gBACrBC,sBAAAA,CAAc,cAAA,EAAgB,wBAAwB,aAAA,EAAe,QAAA,CAAA;gBACrEA,sBAAAA,CAAc,cAAA,EAAgB,8BAA8B,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAP,WAAAA,EAAa,uBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,mGACO,MAAMiB,qBAAAA,GAA0C;AAACnC,IAAAA,sBAAAA;AAAwBmB,IAAAA,0BAAAA;AAA4BY,IAAAA;;;;;;;;"}
1
+ {"version":3,"file":"nesting.js","sources":["../../../templates/nesting.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 { SlotName, TemplateSlotName } from '@cratis/scene.blueprint.default';\nimport { invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { filterPanel } from './editorElements';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * A worked three-level chain, from the application layout down to one behavior.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's fits a\n * slot the module's declares; a slice's fits one the feature's declares. Nothing here is a special case\n * for a particular level, which is exactly why the hierarchy can be arbitrarily deep with no second\n * mechanism.\n *\n * The slot names are chosen so that each fitted name is declared by exactly one container in the chain -\n * `body` only by the module, `primary` only by the feature. That is not decoration: `resolveScreenTemplates`\n * places a template only when the containers in scope agree on exactly one home for it, and reports it as\n * unplaced rather than guessing when two of them declare the same name. A chain that reused `body` at\n * three levels would read fine and resolve to nothing.\n *\n * The whole chain is Arc-bound, which is the point of it living in *this* blueprint rather than being a\n * second copy of the default one's. It ends where a Cratis slice really ends: a button that summons the\n * command dialog.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * A module always has a name and a description, so it brings its own header, and it offers a body for the\n * feature inside it plus a side panel for the filters that apply across the whole module.\n */\nexport const dataModulePageTemplate: ScreenTemplate = {\n name: 'DataModulePage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('module-header', {\n title: 'Billing',\n subtitle: 'Everything the billing module owns',\n section: 'Operations',\n }),\n ],\n [TemplateSlotName.SidePanel]: [page('module-filters', 'Filters', [filterPanel('module-filter-panel', 'Filter the module')])],\n },\n displayName: 'Data module page',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n};\n\n/**\n * Feature level: fits the module page's `body` slot.\n *\n * A feature is where actions belong - a module is a grouping and a slice is one behavior, and the feature\n * in between is what a user thinks of as \"the screen with the buttons on it\". It offers a primary region\n * for the slice and a secondary one for the live view of what that slice is doing.\n */\nexport const dataFeatureSectionTemplate: ScreenTemplate = {\n name: 'DataFeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n content: {\n [TemplateSlotName.Toolbar]: [\n toolbar('feature-toolbar', [\n toolbarButton('feature-new', 'Register an invoice', 'pi pi-plus', 'New'),\n toolbarButton('feature-adjust', 'Record an adjustment', 'pi pi-pencil', 'Adjust'),\n toolbarSeparator('feature-separator'),\n toolbarButton('feature-export', 'Export the feature data', 'pi pi-download'),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('feature-live', 'In flight', [\n observableDataTable('feature-live-table', SampleBindingName.InvoicesInFlight, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n },\n displayName: 'Data feature section',\n description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.',\n};\n\n/**\n * Slice level: fits the feature section's `primary` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it. A slice is one behavior, and in a\n * Cratis application that behavior is one command - so its surface is a header saying what the command is\n * and whether it is wired, and the action that summons it. The capture itself happens in the `CommandDialog`\n * dialog template, which is why this template has no form on it and does not need one.\n */\nexport const commandSliceSectionTemplate: ScreenTemplate = {\n name: 'CommandSliceSection',\n fitsSlot: TemplateSlotName.Primary,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('slice-header', {\n title: 'Record an adjustment',\n subtitle: 'One behavior, one command, one button',\n section: 'Adjustments',\n command: SampleBindingName.RecordAdjustment,\n }),\n ],\n [TemplateSlotName.Actions]: [\n toolbar('slice-actions', [\n toolbarButton('slice-record', 'Record an adjustment', 'pi pi-check', 'Record'),\n toolbarButton('slice-cancel', 'Leave the invoice as it is', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n displayName: 'Command slice section',\n description: 'Slice level: fits a feature section primary slot and hosts one command behavior.',\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [dataModulePageTemplate, dataFeatureSectionTemplate, commandSliceSectionTemplate];\n"],"names":["dataModulePageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","arcPageHeader","title","subtitle","section","page","filterPanel","displayName","description","dataFeatureSectionTemplate","Toolbar","Primary","Secondary","toolbar","toolbarButton","toolbarSeparator","observableDataTable","SampleBindingName","InvoicesInFlight","invoiceTableOptions","invoiceColumns","commandSliceSectionTemplate","Actions","command","RecordAdjustment","nestingChainTemplates"],"mappings":";;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;;;;UA0BaA,sBAAAA,GAAyC;IAClDC,IAAAA,EAAM,gBAAA;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;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,wCAAAA,CAAiBC,MAAM,GAAG;AACvBI,YAAAA,sBAAAA,CAAc,eAAA,EAAiB;gBAC3BC,KAAAA,EAAO,SAAA;gBACPC,QAAAA,EAAU,oCAAA;gBACVC,OAAAA,EAAS;AACb,aAAA;AACH,SAAA;QACD,CAACR,wCAAAA,CAAiBG,SAAS,GAAG;AAACM,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;AAACC,gBAAAA,0BAAAA,CAAY,qBAAA,EAAuB,mBAAA;AAAqB,aAAA;AAAE;AAChI,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACb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CAAiB0B;AAAQ;AAAE,KAAA;IAC9EtB,OAAAA,EAAS;QACL,CAACJ,wCAAAA,CAAiBC,MAAM,GAAG;AACvBI,YAAAA,sBAAAA,CAAc,cAAA,EAAgB;gBAC1BC,KAAAA,EAAO,sBAAA;gBACPC,QAAAA,EAAU,uCAAA;gBACVC,OAAAA,EAAS,aAAA;AACTmB,gBAAAA,OAAAA,EAASN,oCAAkBO;AAC/B,aAAA;AACH,SAAA;QACD,CAAC5B,wCAAAA,CAAiB0B,OAAO,GAAG;AACxBT,YAAAA,gBAAAA,CAAQ,eAAA,EAAiB;gBACrBC,sBAAAA,CAAc,cAAA,EAAgB,wBAAwB,aAAA,EAAe,QAAA,CAAA;gBACrEA,sBAAAA,CAAc,cAAA,EAAgB,8BAA8B,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAP,WAAAA,EAAa,uBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,mGACO,MAAMiB,qBAAAA,GAA0C;AAACnC,IAAAA,sBAAAA;AAAwBmB,IAAAA,0BAAAA;AAA4BY,IAAAA;;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"sampleData.js","sources":["../../../templates/sampleData.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 seeded content the Arc-free composites in this package's templates render.\n *\n * There is a real split running through this blueprint, and it is worth naming rather than hiding. Most of\n * `@cratis/components` is Arc-bound: a data page, a table, a command form and a command dialog all need a\n * registered proxy and a live backend before they show anything, so at design time they are placeholders,\n * and that is correct.\n *\n * The editors are not. A schema editor, a document editor, a navigational bar and a time machine all take\n * their content from the property bag, so a template that seeds them renders as a working page with no\n * backend at all. That is why the editor templates carry this data: it makes two of this package's pages\n * genuinely usable in a preview, rather than eight pages of dashed boxes.\n *\n * The shape is an invoice throughout, matching the query and command names the other templates bind to, so\n * the whole package reads as one small application rather than eight unrelated demonstrations.\n */\n\n/** A JSON schema in the shape Chronicle emits for an event type - what `schemaEditor` edits. */\nexport const invoiceSchema: Record<string, unknown> = {\n title: 'InvoiceRegistered',\n type: 'object',\n properties: {\n number: { type: 'string', description: 'The invoice number as printed on the document.' },\n customer: { type: 'string', description: 'The customer the invoice is addressed to.' },\n issued: { type: 'string', format: 'date-time', description: 'When the invoice was issued.' },\n amount: { type: 'number', description: 'The gross amount, in the invoice currency.' },\n currency: { type: 'string', description: 'The ISO currency code.' },\n },\n};\n\n/** One invoice as a plain document - what `objectContentEditor` renders against {@link invoiceSchema}. */\nexport const invoiceDocument: Record<string, unknown> = {\n number: 'INV-2043',\n customer: 'Northwind Traders',\n issued: '2026-01-05T09:30:00Z',\n amount: 4200,\n currency: 'USD',\n};\n\n/** Where in the document the navigational bar currently is. */\nexport const invoiceNavigationPath: string[] = ['lines', 'shipping'];\n\n/**\n * Successive versions of the invoice, for the time machine.\n *\n * Every entry has an id, a label and a parseable timestamp, because the adapter drops any that does not -\n * a version invented at the epoch would not be a slightly wrong entry, it would silently reorder every\n * real one around it.\n */\nexport const invoiceVersions: Record<string, unknown>[] = [\n { id: 'v3', label: 'Adjustment recorded', timestamp: '2026-01-12T14:05:00Z', content: 'Amount reduced by 120.00 - damaged goods' },\n { id: 'v2', label: 'Approved', timestamp: '2026-01-07T08:15:00Z', content: 'Approved by Amelia Nyquist' },\n { id: 'v1', label: 'Registered', timestamp: '2026-01-05T09:30:00Z', content: 'Registered from the supplier portal' },\n];\n\n/** The filters the list templates offer, in the shape `filterPanel` reads. */\nexport const invoiceFilters: Record<string, unknown>[] = [\n {\n key: 'status',\n label: 'Status',\n type: 'string',\n multi: true,\n options: [\n { key: 'draft', label: 'Draft', count: 12 },\n { key: 'approved', label: 'Approved', count: 44 },\n { key: 'paid', label: 'Paid', count: 108 },\n ],\n },\n { key: 'amount', label: 'Amount', type: 'number', buckets: 4 },\n { key: 'issued', label: 'Issued', type: 'date' },\n];\n\n/** The status choices a command form's dropdown offers. */\nexport const statusOptions: { label: string; value: string }[] = [\n { label: 'Draft', value: 'draft' },\n { label: 'Approved', value: 'approved' },\n { label: 'Paid', value: 'paid' },\n];\n"],"names":["invoiceSchema","title","type","properties","number","description","customer","issued","format","amount","currency","invoiceDocument","invoiceNavigationPath","invoiceVersions","id","label","timestamp","content","invoiceFilters","key","multi","options","count","buckets","statusOptions","value"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;;AAeC,qGAGM,MAAMA,aAAAA,GAAyC;IAClDC,KAAAA,EAAO,mBAAA;IACPC,IAAAA,EAAM,QAAA;IACNC,UAAAA,EAAY;QACRC,MAAAA,EAAQ;YAAEF,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAAiD,SAAA;QACxFC,QAAAA,EAAU;YAAEJ,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAA4C,SAAA;QACrFE,MAAAA,EAAQ;YAAEL,IAAAA,EAAM,QAAA;YAAUM,MAAAA,EAAQ,WAAA;YAAaH,WAAAA,EAAa;AAA+B,SAAA;QAC3FI,MAAAA,EAAQ;YAAEP,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAA6C,SAAA;QACpFK,QAAAA,EAAU;YAAER,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAAyB;AACtE;AACJ;AAEA,2GACO,MAAMM,eAAAA,GAA2C;IACpDP,MAAAA,EAAQ,UAAA;IACRE,QAAAA,EAAU,mBAAA;IACVC,MAAAA,EAAQ,sBAAA;IACRE,MAAAA,EAAQ,IAAA;IACRC,QAAAA,EAAU;AACd;AAEA,gEACO,MAAME,qBAAAA,GAAkC;AAAC,IAAA,OAAA;AAAS,IAAA;;AAEzD;;;;;;UAOaC,eAAAA,GAA6C;AACtD,IAAA;QAAEC,EAAAA,EAAI,IAAA;QAAMC,KAAAA,EAAO,qBAAA;QAAuBC,SAAAA,EAAW,sBAAA;QAAwBC,OAAAA,EAAS;AAA2C,KAAA;AACjI,IAAA;QAAEH,EAAAA,EAA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],"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 seeded content the Arc-free composites in this package's templates render.\n *\n * There is a real split running through this blueprint, and it is worth naming rather than hiding. Most of\n * `@cratis/components` is Arc-bound: a data page, a table, a command form and a command dialog all need a\n * registered proxy and a live backend before they show anything, so at design time they are placeholders,\n * and that is correct.\n *\n * The editors are not. A schema editor, a document editor, a navigational bar and a time machine all take\n * their content from the property bag, so a template that seeds them renders as a working page with no\n * backend at all. That is why the editor templates carry this data: it makes two of this package's pages\n * genuinely usable in a preview, rather than eight pages of dashed boxes.\n *\n * The shape is an invoice throughout, matching the query and command names the other templates bind to, so\n * the whole package reads as one small application rather than eight unrelated demonstrations.\n */\n\n/** A JSON schema in the shape Chronicle emits for an event type - what `schemaEditor` edits. */\nexport const invoiceSchema: Record<string, unknown> = {\n title: 'InvoiceRegistered',\n type: 'object',\n properties: {\n number: { type: 'string', description: 'The invoice number as printed on the document.' },\n customer: { type: 'string', description: 'The customer the invoice is addressed to.' },\n issued: { type: 'string', format: 'date-time', description: 'When the invoice was issued.' },\n amount: { type: 'number', description: 'The gross amount, in the invoice currency.' },\n currency: { type: 'string', description: 'The ISO currency code.' },\n },\n};\n\n/** One invoice as a plain document - what `objectContentEditor` renders against {@link invoiceSchema}. */\nexport const invoiceDocument: Record<string, unknown> = {\n number: 'INV-2043',\n customer: 'Northwind Traders',\n issued: '2026-01-05T09:30:00Z',\n amount: 4200,\n currency: 'USD',\n};\n\n/** Where in the document the navigational bar currently is. */\nexport const invoiceNavigationPath: string[] = ['lines', 'shipping'];\n\n/**\n * Successive versions of the invoice, for the time machine.\n *\n * Every entry has an id, a label and a parseable timestamp, because the adapter drops any that does not -\n * a version invented at the epoch would not be a slightly wrong entry, it would silently reorder every\n * real one around it.\n */\nexport const invoiceVersions: Record<string, unknown>[] = [\n { id: 'v3', label: 'Adjustment recorded', timestamp: '2026-01-12T14:05:00Z', content: 'Amount reduced by 120.00 - damaged goods' },\n { id: 'v2', label: 'Approved', timestamp: '2026-01-07T08:15:00Z', content: 'Approved by Amelia Nyquist' },\n { id: 'v1', label: 'Registered', timestamp: '2026-01-05T09:30:00Z', content: 'Registered from the supplier portal' },\n];\n\n/** The filters the list templates offer, in the shape `filterPanel` reads. */\nexport const invoiceFilters: Record<string, unknown>[] = [\n {\n key: 'status',\n label: 'Status',\n type: 'string',\n multi: true,\n options: [\n { key: 'draft', label: 'Draft', count: 12 },\n { key: 'approved', label: 'Approved', count: 44 },\n { key: 'paid', label: 'Paid', count: 108 },\n ],\n },\n { key: 'amount', label: 'Amount', type: 'number', buckets: 4 },\n { key: 'issued', label: 'Issued', type: 'date' },\n];\n\n/** The status choices a command form's dropdown offers. */\nexport const statusOptions: { label: string; value: string }[] = [\n { label: 'Draft', value: 'draft' },\n { label: 'Approved', value: 'approved' },\n { label: 'Paid', value: 'paid' },\n];\n"],"names":["invoiceSchema","title","type","properties","number","description","customer","issued","format","amount","currency","invoiceDocument","invoiceNavigationPath","invoiceVersions","id","label","timestamp","content","invoiceFilters","key","multi","options","count","buckets","statusOptions","value"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;;;;AAeC,qGAGM,MAAMA,aAAAA,GAAyC;IAClDC,KAAAA,EAAO,mBAAA;IACPC,IAAAA,EAAM,QAAA;IACNC,UAAAA,EAAY;QACRC,MAAAA,EAAQ;YAAEF,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAAiD,SAAA;QACxFC,QAAAA,EAAU;YAAEJ,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAA4C,SAAA;QACrFE,MAAAA,EAAQ;YAAEL,IAAAA,EAAM,QAAA;YAAUM,MAAAA,EAAQ,WAAA;YAAaH,WAAAA,EAAa;AAA+B,SAAA;QAC3FI,MAAAA,EAAQ;YAAEP,IAAAA,EAAM,QAAA;YAAUG,WAAAA,EAAa;AAA6C,SAAA;QACpFK,QAAAA,EAAU;YAAER,IAA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,KAAAA,EAAO,QAAA;QAAUb,IAAAA,EAAM,QAAA;QAAUqB,OAAAA,EAAS;AAAE,KAAA;AAC7D,IAAA;QAAEJ,GAAAA,EAAK,QAAA;QAAUJ,KAAAA,EAAO,QAAA;QAAUb,IAAAA,EAAM;AAAO;;AAGnD,4DACO,MAAMsB,aAAAA,GAAoD;AAC7D,IAAA;QAAET,KAAAA,EAAO,OAAA;QAASU,KAAAA,EAAO;AAAQ,KAAA;AACjC,IAAA;QAAEV,KAAAA,EAAO,UAAA;QAAYU,KAAAA,EAAO;AAAW,KAAA;AACvC,IAAA;QAAEV,KAAAA,EAAO,MAAA;QAAQU,KAAAA,EAAO;AAAO;;;;;;;;"}
@@ -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 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 +1 @@
1
- {"version":3,"file":"workspaceTemplates.js","sources":["../../../templates/workspaceTemplates.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, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, grid, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { ColumnDefinition } from './ColumnDefinition';\nimport { adjustmentColumns, dataTable, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, page } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { TableOptions } from './TableOptions';\n\n/**\n * The two whole-workspace shapes: a master-detail arrangement, and a dashboard of data widgets.\n *\n * Both are arrangements of *several* bindings rather than one, which is what separates them from the list\n * templates. That is also what makes them the templates most worth shipping: an application can wire one\n * query without help, and gets a page that looks like every other page in the product only if something\n * has already decided how four of them sit together.\n */\n\n/** The columns of the revenue widget's query. */\nconst revenueColumns: ColumnDefinition[] = [\n { field: 'month', header: 'Month' },\n { field: 'invoiced', header: 'Invoiced' },\n { field: 'collected', header: 'Collected' },\n];\n\n/** The columns of the open-tickets widget's query. */\nconst ticketColumns: ColumnDefinition[] = [\n { field: 'reference', header: 'Reference' },\n { field: 'subject', header: 'Subject' },\n { field: 'age', header: 'Age' },\n];\n\n/** Table options for a widget-sized table, where there is no search box to filter across. */\nconst widgetTableOptions: TableOptions = { emptyMessage: 'Nothing to show yet', dataKey: 'id' };\n\n/**\n * Master and detail: the list in the larger column, the selected record in the narrower one.\n *\n * The difference from `DataListWithDetailPage` is real and worth having both. That template is a whole\n * `dataPage` - its own title bar, menubar and filtering - with a detail region added beside it. This one is\n * a plain `dataTable` next to a detail region, which is the right shape when the page's chrome comes from\n * the *feature* around it rather than from the list itself. Reaching for the wrong one shows up as a page\n * with two toolbars.\n *\n * The grid collapses to a single column at a compact width, because a master and a detail side by side on a\n * phone is the arrangement that made \"master-detail does not work on mobile\" a truism.\n */\nexport const masterDetailPageTemplate: ScreenTemplate = {\n name: 'MasterDetailPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('master-detail-header', {\n title: 'Invoices',\n subtitle: 'Pick an invoice on the left to inspect it on the right',\n section: 'Billing',\n query: SampleBindingName.AllInvoices,\n }),\n ],\n [TemplateSlotName.Primary]: [\n page('master-detail-master', 'Invoices', [dataTable('master-detail-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)]),\n ],\n [TemplateSlotName.Secondary]: [\n page('master-detail-detail', 'Selected invoice', [\n objectContentEditor('master-detail-document', false),\n timeMachine('master-detail-history'),\n ]),\n ],\n },\n displayName: 'Master-detail page',\n description: 'A queried list in the larger column with the selected record and its history in the narrower one.',\n};\n\n/**\n * A dashboard of data widgets - four queries arranged so the page reads in the order people already read it.\n *\n * The composition is the one every template line settles on: a row of figures across the top, then a wide\n * column and a narrow one. Copying it is the point rather than a shortcut - it is the arrangement the eye\n * already knows how to scan, and a dashboard that invents its own costs the reader a moment on every visit.\n *\n * What this blueprint adds is that every widget is a *query*, not a picture. Each one names a proxy a host\n * registers, so the dashboard is live the moment the application wires it, with nothing to replace.\n */\nexport const dashboardPageTemplate: ScreenTemplate = {\n name: 'DashboardPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Stats },\n { name: TemplateSlotName.Primary },\n { name: TemplateSlotName.Secondary },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n slotLeaf(TemplateSlotName.Primary),\n slotLeaf(TemplateSlotName.Secondary),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('dashboard-header', {\n title: 'Billing',\n subtitle: 'Four queries, arranged the way people already read a dashboard',\n section: 'Operations',\n query: SampleBindingName.RevenueByMonth,\n }),\n ],\n [TemplateSlotName.Stats]: [\n page('dashboard-stat-revenue', 'Revenue by month', [\n dataTable('dashboard-stat-revenue-table', SampleBindingName.RevenueByMonth, widgetTableOptions, revenueColumns),\n ]),\n page('dashboard-stat-flight', 'In flight', [\n observableDataTable('dashboard-stat-flight-table', SampleBindingName.InvoicesInFlight, widgetTableOptions, invoiceColumns),\n ]),\n page('dashboard-stat-tickets', 'Open tickets', [\n dataTable('dashboard-stat-tickets-table', SampleBindingName.OpenTickets, widgetTableOptions, ticketColumns),\n ]),\n ],\n [TemplateSlotName.Primary]: [\n page('dashboard-invoices', 'Recent invoices', [\n dataTable('dashboard-invoices-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('dashboard-adjustments', 'Adjustments', [\n dataTable('dashboard-adjustments-table', SampleBindingName.AllAdjustments, widgetTableOptions, adjustmentColumns),\n ]),\n ],\n },\n displayName: 'Dashboard page',\n description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',\n};\n\n/** The two workspace-shaped templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [masterDetailPageTemplate, dashboardPageTemplate];\n"],"names":["revenueColumns","field","header","ticketColumns","widgetTableOptions","emptyMessage","dataKey","masterDetailPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","arcPageHeader","title","subtitle","section","query","SampleBindingName","AllInvoices","page","dataTable","invoiceTableOptions","invoiceColumns","objectContentEditor","timeMachine","displayName","description","dashboardPageTemplate","Stats","RevenueByMonth","observableDataTable","InvoicesInFlight","OpenTickets","AllAdjustments","adjustmentColumns","workspaceTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAWA;;;;;;;sDAUA,MAAMA,cAAAA,GAAqC;AACvC,IAAA;QAAEC,KAAAA,EAAO,OAAA;QAASC,MAAAA,EAAQ;AAAQ,KAAA;AAClC,IAAA;QAAED,KAAAA,EAAO,UAAA;QAAYC,MAAAA,EAAQ;AAAW,KAAA;AACxC,IAAA;QAAED,KAAAA,EAAO,WAAA;QAAaC,MAAAA,EAAQ;AAAY;AAC7C,CAAA;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A,CAAoB,6BAAA,EAA+Bb,mCAAAA,CAAkBc,gBAAgB,EAAE3C,kBAAAA,EAAoBkC,2BAAAA;AAC9G,aAAA,CAAA;AACDH,YAAAA,aAAAA,CAAK,0BAA0B,cAAA,EAAgB;AAC3CC,gBAAAA,sBAAAA,CAAU,8BAAA,EAAgCH,mCAAAA,CAAkBe,WAAW,EAAE5C,kBAAAA,EAAoBD,aAAAA;AAChG,aAAA;AACJ,SAAA;QACD,CAACU,wCAAAA,CAAiBE,OAAO,GAAG;AACxBoB,YAAAA,aAAAA,CAAK,sBAAsB,iBAAA,EAAmB;AAC1CC,gBAAAA,sBAAAA,CAAU,0BAAA,EAA4BH,mCAAAA,CAAkBC,WAAW,EAAEG,gCAAAA,EAAqBC,2BAAAA;AAC7F,aAAA;AACJ,SAAA;QACD,CAACzB,wCAAAA,CAAiBG,SAAS,GAAG;AAC1BmB,YAAAA,aAAAA,CAAK,yBAAyB,aAAA,EAAe;AACzCC,gBAAAA,sBAAAA,CAAU,6BAAA,EAA+BH,mCAAAA,CAAkBgB,cAAc,EAAE7C,kBAAAA,EAAoB8C,8BAAAA;AAClG,aAAA;AACJ;AACL,KAAA;IACAT,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,2CACO,MAAMS,kBAAAA,GAAuC;AAAC5C,IAAAA,wBAAAA;AAA0BoC,IAAAA;;;;;;;"}
1
+ {"version":3,"file":"workspaceTemplates.js","sources":["../../../templates/workspaceTemplates.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, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, grid, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { ColumnDefinition } from './ColumnDefinition';\nimport { adjustmentColumns, dataTable, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, page } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { TableOptions } from './TableOptions';\n\n/**\n * The two whole-workspace shapes: a master-detail arrangement, and a dashboard of data widgets.\n *\n * Both are arrangements of *several* bindings rather than one, which is what separates them from the list\n * templates. That is also what makes them the templates most worth shipping: an application can wire one\n * query without help, and gets a page that looks like every other page in the product only if something\n * has already decided how four of them sit together.\n */\n\n/** The columns of the revenue widget's query. */\nconst revenueColumns: ColumnDefinition[] = [\n { field: 'month', header: 'Month' },\n { field: 'invoiced', header: 'Invoiced' },\n { field: 'collected', header: 'Collected' },\n];\n\n/** The columns of the open-tickets widget's query. */\nconst ticketColumns: ColumnDefinition[] = [\n { field: 'reference', header: 'Reference' },\n { field: 'subject', header: 'Subject' },\n { field: 'age', header: 'Age' },\n];\n\n/** Table options for a widget-sized table, where there is no search box to filter across. */\nconst widgetTableOptions: TableOptions = { emptyMessage: 'Nothing to show yet', dataKey: 'id' };\n\n/**\n * Master and detail: the list in the larger column, the selected record in the narrower one.\n *\n * The difference from `DataListWithDetailPage` is real and worth having both. That template is a whole\n * `dataPage` - its own title bar, menubar and filtering - with a detail region added beside it. This one is\n * a plain `dataTable` next to a detail region, which is the right shape when the page's chrome comes from\n * the *feature* around it rather than from the list itself. Reaching for the wrong one shows up as a page\n * with two toolbars.\n *\n * The grid collapses to a single column at a compact width, because a master and a detail side by side on a\n * phone is the arrangement that made \"master-detail does not work on mobile\" a truism.\n */\nexport const masterDetailPageTemplate: ScreenTemplate = {\n name: 'MasterDetailPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('master-detail-header', {\n title: 'Invoices',\n subtitle: 'Pick an invoice on the left to inspect it on the right',\n section: 'Billing',\n query: SampleBindingName.AllInvoices,\n }),\n ],\n [TemplateSlotName.Primary]: [\n page('master-detail-master', 'Invoices', [dataTable('master-detail-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)]),\n ],\n [TemplateSlotName.Secondary]: [\n page('master-detail-detail', 'Selected invoice', [\n objectContentEditor('master-detail-document', false),\n timeMachine('master-detail-history'),\n ]),\n ],\n },\n displayName: 'Master-detail page',\n description: 'A queried list in the larger column with the selected record and its history in the narrower one.',\n};\n\n/**\n * A dashboard of data widgets - four queries arranged so the page reads in the order people already read it.\n *\n * The composition is the one every template line settles on: a row of figures across the top, then a wide\n * column and a narrow one. Copying it is the point rather than a shortcut - it is the arrangement the eye\n * already knows how to scan, and a dashboard that invents its own costs the reader a moment on every visit.\n *\n * What this blueprint adds is that every widget is a *query*, not a picture. Each one names a proxy a host\n * registers, so the dashboard is live the moment the application wires it, with nothing to replace.\n */\nexport const dashboardPageTemplate: ScreenTemplate = {\n name: 'DashboardPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Stats },\n { name: TemplateSlotName.Primary },\n { name: TemplateSlotName.Secondary },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n slotLeaf(TemplateSlotName.Primary),\n slotLeaf(TemplateSlotName.Secondary),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('dashboard-header', {\n title: 'Billing',\n subtitle: 'Four queries, arranged the way people already read a dashboard',\n section: 'Operations',\n query: SampleBindingName.RevenueByMonth,\n }),\n ],\n [TemplateSlotName.Stats]: [\n page('dashboard-stat-revenue', 'Revenue by month', [\n dataTable('dashboard-stat-revenue-table', SampleBindingName.RevenueByMonth, widgetTableOptions, revenueColumns),\n ]),\n page('dashboard-stat-flight', 'In flight', [\n observableDataTable('dashboard-stat-flight-table', SampleBindingName.InvoicesInFlight, widgetTableOptions, invoiceColumns),\n ]),\n page('dashboard-stat-tickets', 'Open tickets', [\n dataTable('dashboard-stat-tickets-table', SampleBindingName.OpenTickets, widgetTableOptions, ticketColumns),\n ]),\n ],\n [TemplateSlotName.Primary]: [\n page('dashboard-invoices', 'Recent invoices', [\n dataTable('dashboard-invoices-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('dashboard-adjustments', 'Adjustments', [\n dataTable('dashboard-adjustments-table', SampleBindingName.AllAdjustments, widgetTableOptions, adjustmentColumns),\n ]),\n ],\n },\n displayName: 'Dashboard page',\n description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',\n};\n\n/** The two workspace-shaped templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [masterDetailPageTemplate, dashboardPageTemplate];\n"],"names":["revenueColumns","field","header","ticketColumns","widgetTableOptions","emptyMessage","dataKey","masterDetailPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","arcPageHeader","title","subtitle","section","query","SampleBindingName","AllInvoices","page","dataTable","invoiceTableOptions","invoiceColumns","objectContentEditor","timeMachine","displayName","description","dashboardPageTemplate","Stats","RevenueByMonth","observableDataTable","InvoicesInFlight","OpenTickets","AllAdjustments","adjustmentColumns","workspaceTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAWA;;;;;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AAK,GAAG;AACtBT,YAAAA,aAAAA,CAAK,0BAA0B,kBAAA,EAAoB;AAC/CC,gBAAAA,sBAAAA,CAAU,8BAAA,EAAgCH,mCAAAA,CAAkBY,cAAc,EAAEzC,kBAAAA,EAAoBJ,cAAAA;AACnG,aAAA,CAAA;AACDmC,YAAAA,aAAAA,CAAK,yBAAyB,WAAA,EAAa;AACvCW,gBAAAA,gCAAAA,CAAoB,6BAAA,EAA+Bb,mCAAAA,CAAkBc,gBAAgB,EAAE3C,kBAAAA,EAAoBkC,2BAAAA;AAC9G,aAAA,CAAA;AACDH,YAAAA,aAAAA,CAAK,0BAA0B,cAAA,EAAgB;AAC3CC,gBAAAA,sBAAAA,CAAU,8BAAA,EAAgCH,mCAAAA,CAAkBe,WAAW,EAAE5C,kBAAAA,EAAoBD,aAAAA;AAChG,aAAA;AACJ,SAAA;QACD,CAACU,wCAAAA,CAAiBE,OAAO,GAAG;AACxBoB,YAAAA,aAAAA,CAAK,sBAAsB,iBAAA,EAAmB;AAC1CC,gBAAAA,sBAAAA,CAAU,0BAAA,EAA4BH,mCAAAA,CAAkBC,WAAW,EAAEG,gCAAAA,EAAqBC,2BAAAA;AAC7F,aAAA;AACJ,SAAA;QACD,CAACzB,wCAAAA,CAAiBG,SAAS,GAAG;AAC1BmB,YAAAA,aAAAA,CAAK,yBAAyB,aAAA,EAAe;AACzCC,gBAAAA,sBAAAA,CAAU,6BAAA,EAA+BH,mCAAAA,CAAkBgB,cAAc,EAAE7C,kBAAAA,EAAoB8C,8BAAAA;AAClG,aAAA;AACJ;AACL,KAAA;IACAT,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,2CACO,MAAMS,kBAAAA,GAAuC;AAAC5C,IAAAA,wBAAAA;AAA0BoC,IAAAA;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"BorrowedComponentName.js","sources":["../../BorrowedComponentName.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 * Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.\n *\n * There is one, and it is worth stating why rather than leaving it as a bare string in a builder.\n *\n * `Cratis.Components`' data table and data page take their columns as children - the library's own\n * documentation says the columns arrive in the `content` slot - but the library declares no `column` name\n * of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column\n * is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,\n * and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.\n *\n * It is checked the same way every other borrowed name in this repository is: against the owning\n * package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way\n * when it referenced `chart` and `fileUpload`, which neither library declares.\n */\nexport enum BorrowedComponentName {\n /** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */\n Column = 'column',\n}\n"],"names":["BorrowedComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;IAeO,IAAKA,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;+FACgF,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAA;AADhFA,IAAAA,OAAAA,qBAAAA;AAGX,CAAA,CAAA,EAAA;;;;"}
1
+ {"version":3,"file":"BorrowedComponentName.js","sources":["../../BorrowedComponentName.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 * Names this blueprint's templates reference that come from neither `Cratis.Components` nor itself.\n *\n * There is one, and it is worth stating why rather than leaving it as a bare string in a builder.\n *\n * `Cratis.Components`' data table and data page take their columns as children - the library's own\n * documentation says the columns arrive in the `content` slot - but the library declares no `column` name\n * of its own, because its tables are `DataTableForQuery` wrapping PrimeReact's `DataTable`, and a column\n * is PrimeReact's `Column`. So a template that wants a table with real columns has to name PrimeReact's,\n * and this blueprint's manifest declares PrimeReact as a dependency partly for that reason.\n *\n * It is checked the same way every other borrowed name in this repository is: against the owning\n * package's own manifest, by a spec, rather than assumed. The default blueprint learned that the hard way\n * when it referenced `chart` and `fileUpload`, which neither library declares.\n */\nexport enum BorrowedComponentName {\n /** PrimeReact's `Column` - one column of a data table, given a `field` and a `header`. */\n Column = 'column',\n}\n"],"names":["BorrowedComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;IAeO,IAAKA,qBAAAA,iBAAAA,SAAAA,qBAAAA,EAAAA;+FACgF,qBAAA,CAAA,QAAA,CAAA,GAAA,QAAA;AADhFA,IAAAA,OAAAA,qBAAAA;AAGX,CAAA,CAAA,EAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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 bare names this package declares components under.\n *\n * There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is\n * in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -\n * and a template is data a host can rearrange. A component is code it cannot. So the rule this package\n * holds itself to is: register a component only when a template's content tree genuinely cannot express\n * the composition, and reach for a template every other time. A blueprint whose value sat in its\n * components rather than its templates would have misunderstood its job.\n *\n * {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.\n */\nexport enum ComponentName {\n /**\n * A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding\n * name, and reports whether that binding is registered.\n *\n * A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but\n * it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that\n * name up in the binding registry to say whether a host has wired it. Both are behavior at render\n * time, not structure - which is exactly the line this package uses to decide what earns a component.\n */\n ArcPageHeader = 'arcPageHeader',\n}\n"],"names":["ComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;IAYO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;AACR;;;;;;;;AAQC,QAAA,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;AATOA,IAAAA,OAAAA,aAAAA;AAWX,CAAA,CAAA,EAAA;;;;"}
1
+ {"version":3,"file":"ComponentName.js","sources":["../../ComponentName.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 bare names this package declares components under.\n *\n * There is exactly one, and that is the design rather than an unfinished list. This blueprint's value is\n * in its **templates** - a `dataPage` already wired to a query, a `commandForm` page with its action bar -\n * and a template is data a host can rearrange. A component is code it cannot. So the rule this package\n * holds itself to is: register a component only when a template's content tree genuinely cannot express\n * the composition, and reach for a template every other time. A blueprint whose value sat in its\n * components rather than its templates would have misunderstood its job.\n *\n * {@link ArcPageHeader} is the one thing that clears that bar. Everything else in this package is a tree.\n */\nexport enum ComponentName {\n /**\n * A page header that derives its heading, its subtitle and its breadcrumb trail from **one** binding\n * name, and reports whether that binding is registered.\n *\n * A content tree cannot do this. It can hold a title, a subtitle and a trail as three literals, but\n * it cannot *derive* them from a single `query`/`command` property, and it certainly cannot look that\n * name up in the binding registry to say whether a host has wired it. Both are behavior at render\n * time, not structure - which is exactly the line this package uses to decide what earns a component.\n */\n ArcPageHeader = 'arcPageHeader',\n}\n"],"names":["ComponentName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;IAYO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;AACR;;;;;;;;AAQC,QAAA,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;AATOA,IAAAA,OAAAA,aAAAA;AAWX,CAAA,CAAA,EAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"CompositeName.js","sources":["../../CompositeName.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 `Cratis.Components` names this blueprint's templates are built from.\n *\n * These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint\n * only writes them into its templates. They are collected here anyway, for two reasons.\n *\n * The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as\n * a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.\n *\n * The second is what makes this worth an enum rather than a comment. A spec asserts that every member\n * below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that\n * this blueprint and the component library it is built from still agree. If a name is ever renamed\n * upstream, that spec fails here rather than a screen failing silently in someone's application.\n *\n * A screen template writes bare names on purpose: `resolveComponentName` decides which active package\n * wins each one against the profile's priority order, so a template that qualified its names would pin\n * itself to one library and stop being a template.\n */\nexport enum CompositeName {\n /** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */\n Page = 'page',\n\n /** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */\n DataPage = 'dataPage',\n\n /** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */\n DataTable = 'dataTable',\n\n /** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */\n ObservableDataTable = 'observableDataTable',\n\n /** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */\n CommandForm = 'commandForm',\n\n /** A single-line text field bound to one command property. */\n InputTextField = 'inputTextField',\n\n /** A numeric field bound to one command property. */\n NumberField = 'numberField',\n\n /** A multi-line text field bound to one command property. */\n TextAreaField = 'textAreaField',\n\n /** A single-selection field over a list the screen carries inline. */\n DropdownField = 'dropdownField',\n\n /** A date field bound to one command property. */\n CalendarField = 'calendarField',\n\n /** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */\n Dialog = 'dialog',\n\n /** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */\n CommandDialog = 'commandDialog',\n\n /** The blocking spinner shown while a long-running command is in flight. */\n BusyIndicatorDialog = 'busyIndicatorDialog',\n\n /** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */\n Icon = 'icon',\n\n /** A standalone selection control, not bound to a command property. */\n Dropdown = 'dropdown',\n\n /** Scopes a failure to a region, so one broken widget does not take the screen with it. */\n ErrorBoundary = 'errorBoundary',\n\n /** Renders an arbitrary JSON document against its schema, with a control per declared type. */\n ObjectContentEditor = 'objectContentEditor',\n\n /** The trail that says where you are inside a nested document, and lets you climb back out. */\n ObjectNavigationalBar = 'objectNavigationalBar',\n\n /** Edits a JSON schema as a typed property tree rather than as text. */\n SchemaEditor = 'schemaEditor',\n\n /** Scrubs through successive versions of something on a timeline. */\n TimeMachine = 'timeMachine',\n\n /** The filter toggle and the panel it anchors, as one placeable element. */\n FilterPanel = 'filterPanel',\n\n /** The container for a tool palette, which also establishes the drag context its buttons read. */\n Toolbar = 'toolbar',\n\n /** One button in a tool palette. */\n ToolbarButton = 'toolbarButton',\n\n /** Related buttons kept together inside a toolbar. */\n ToolbarGroup = 'toolbarGroup',\n\n /** The divider between groups of tools. */\n ToolbarSeparator = 'toolbarSeparator',\n}\n"],"names":["CompositeName"],"mappings":"AAAA;AACA;AAEA;;;;;;;;;;;;;;;;;IAkBO,IAAKA,aAAAA,iBAAAA,SAAAA,aAAAA,EAAAA;yHAC0G,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;gIAGO,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;kHAGd,aAAA,CAAA,WAAA,CAAA,GAAA,WAAA;0HAGQ,aAAA,CAAA,qBAAA,CAAA,GAAA,qBAAA;0HAGA,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;mEAGvD,aAAA,CAAA,gBAAA,CAAA,GAAA,gBAAA;0DAGT,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;kEAGQ,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;2EAGS,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;uDAGpB,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;yHAGkE,aAAA,CAAA,QAAA,CAAA,GAAA,QAAA;uIAGc,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;iFAGtD,aAAA,CAAA,qBAAA,CAAA,GAAA,qBAAA;iHAGgC,aAAA,CAAA,MAAA,CAAA,GAAA,MAAA;4EAGrC,aAAA,CAAA,UAAA,CAAA,GAAA,UAAA;gGAGoB,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;oGAGI,aAAA,CAAA,qBAAA,CAAA,GAAA,qBAAA;oGAGA,aAAA,CAAA,uBAAA,CAAA,GAAA,uBAAA;6EAGvB,aAAA,CAAA,cAAA,CAAA,GAAA,cAAA;0EAGH,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;iFAGO,aAAA,CAAA,aAAA,CAAA,GAAA,aAAA;uGAGsB,aAAA,CAAA,SAAA,CAAA,GAAA,SAAA;yCAG9D,aAAA,CAAA,eAAA,CAAA,GAAA,eAAA;2DAGkB,aAAA,CAAA,cAAA,CAAA,GAAA,cAAA;gDAGX,aAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAzEjCA,IAAAA,OAAAA,aAAAA;AA2EX,CAAA,CAAA,EAAA;;;;"}
1
+ {"version":3,"file":"CompositeName.js","sources":["../../CompositeName.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 `Cratis.Components` names this blueprint's templates are built from.\n *\n * These are not this package's names - `Cratis.Components` declares every one of them, and this blueprint\n * only writes them into its templates. They are collected here anyway, for two reasons.\n *\n * The first is the ordinary one: a bare name written inline is a magic string, and a typo in it renders as\n * a dashed red box in the middle of a screen with nothing pointing back at the template that caused it.\n *\n * The second is what makes this worth an enum rather than a comment. A spec asserts that every member\n * below appears in `cratisComponentsPackageManifest.components`, so this file is a standing check that\n * this blueprint and the component library it is built from still agree. If a name is ever renamed\n * upstream, that spec fails here rather than a screen failing silently in someone's application.\n *\n * A screen template writes bare names on purpose: `resolveComponentName` decides which active package\n * wins each one against the profile's priority order, so a template that qualified its names would pin\n * itself to one library and stop being a template.\n */\nexport enum CompositeName {\n /** The library's page primitive - a full-height column whose optional panel chrome matches everything inside it. */\n Page = 'page',\n\n /** The whole list-screen composite: title bar, menubar, filterable table and optional details pane, all from one query. */\n DataPage = 'dataPage',\n\n /** A table that performs a query, pages against the server, and wires filtering and sorting back into it. */\n DataTable = 'dataTable',\n\n /** The live variant - an observable query, a WebSocket subscription, and a re-render when the read model changes. */\n ObservableDataTable = 'observableDataTable',\n\n /** A form generated from a command's own property descriptors, so it follows the command rather than going stale. */\n CommandForm = 'commandForm',\n\n /** A single-line text field bound to one command property. */\n InputTextField = 'inputTextField',\n\n /** A numeric field bound to one command property. */\n NumberField = 'numberField',\n\n /** A multi-line text field bound to one command property. */\n TextAreaField = 'textAreaField',\n\n /** A single-selection field over a list the screen carries inline. */\n DropdownField = 'dropdownField',\n\n /** A date field bound to one command property. */\n CalendarField = 'calendarField',\n\n /** The Arc-aware dialog, whose result resolves through Arc's dialog context rather than through `visible` state. */\n Dialog = 'dialog',\n\n /** A dialog whose confirm button *is* the command's execution - it submits, feeds validation back, and only closes on success. */\n CommandDialog = 'commandDialog',\n\n /** The blocking spinner shown while a long-running command is in flight. */\n BusyIndicatorDialog = 'busyIndicatorDialog',\n\n /** An icon, with the shorthand forms people actually write normalized into the class PrimeIcons expects. */\n Icon = 'icon',\n\n /** A standalone selection control, not bound to a command property. */\n Dropdown = 'dropdown',\n\n /** Scopes a failure to a region, so one broken widget does not take the screen with it. */\n ErrorBoundary = 'errorBoundary',\n\n /** Renders an arbitrary JSON document against its schema, with a control per declared type. */\n ObjectContentEditor = 'objectContentEditor',\n\n /** The trail that says where you are inside a nested document, and lets you climb back out. */\n ObjectNavigationalBar = 'objectNavigationalBar',\n\n /** Edits a JSON schema as a typed property tree rather than as text. */\n SchemaEditor = 'schemaEditor',\n\n /** Scrubs through successive versions of something on a timeline. */\n TimeMachine = 'timeMachine',\n\n /** The filter toggle and the panel it anchors, as one placeable element. */\n FilterPanel = 'filterPanel',\n\n /** The container for a tool palette, which also establishes the drag context its buttons read. */\n Toolbar = 'toolbar',\n\n /** One button in a tool palette. */\n ToolbarButton = 'toolbarButton',\n\n /** Related buttons kept together inside a toolbar. */\n ToolbarGroup = 'toolbarGroup',\n\n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GX,aAAA,CAAA,kBAAA,CAAA,GAAA,kBAAA;AAzEjCA,IAAAA,OAAAA,aAAAA;AA2EX,CAAA,CAAA,EAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"componentsBlueprint.js","sources":["../../componentsBlueprint.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { componentsBlueprintComponents } from './componentsBlueprintComponents';\nimport { componentsGalleryScreens } from './gallery';\nimport { componentsBlueprintName } from './packageName';\nimport { componentsDialogTemplates, componentsScreenTemplates } from './templates';\n\n/**\n * This blueprint's declaration.\n *\n * Where the default blueprint answers \"what does an application look like\", this one answers \"what does a\n * *page* look like once it is bound to Arc\". Its templates are whole pages already wired to the composites\n * in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key\n * and filter fields all decided, under a header that says what it is bound to. An application picks the\n * template and supplies a query name.\n *\n * `layouts` is empty, and that is the most important line in this file.\n *\n * A layout is an application's base navigational shell, and an application has exactly one. This package\n * deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,\n * its slot vocabulary, its shell components and its themes. That is what the dependency on another\n * blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth\n * stating plainly rather than leaving to be inferred from an empty array.\n *\n * The alternative would have been to ship a second application shell. It would have looked like value and\n * been the opposite: an application can activate only one shell, so the two blueprints would have become\n * mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the\n * themes and the navigation that the default blueprint already does well. Layering means both can be\n * active at once, which is the only arrangement in which either is worth having.\n *\n * `themes` is empty for the same reason at a smaller scale: the shell being themed is the default\n * blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting\n * a look for a shell it does not own.\n */\nexport const componentsBlueprintManifest: ScenePackage = {\n name: componentsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: [],\n screenTemplates: componentsScreenTemplates.map(template => template.name),\n dialogTemplates: componentsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Cratis Components Blueprint',\n description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',\n module: '@cratis/scene.blueprint.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * This blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a template the bundle never provided is a failure that\n * only shows up when someone picks that template and gets nothing.\n *\n * The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its\n * chrome and one of these templates, so a preview boots them through the real engine as a working\n * miniature application rather than a set of pictures. They render with unregistered bindings, which is the\n * normal design-time state - the placeholders naming each wanted binding are exactly what should be there.\n */\nexport const componentsBlueprint: ScenePackageBundle = {\n manifest: componentsBlueprintManifest,\n components: componentsBlueprintComponents,\n screenTemplates: componentsScreenTemplates,\n dialogTemplates: componentsDialogTemplates,\n screens: componentsGalleryScreens,\n};\n"],"names":["componentsBlueprintManifest","name","componentsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","screenTemplates","componentsScreenTemplates","map","template","dialogTemplates","componentsDialogTemplates","themes","displayName","description","module","license","licenseUrl","componentsBlueprint","manifest","componentsBlueprintComponents","screens","componentsGalleryScreens"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BaA,2BAAAA,GAA4C;IACrDC,IAAAA,EAAMC,uBAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAA2B,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACnFO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,aAAAA,CAAAA;AAC1BC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,0BAA0BC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEgB,IAAAA,eAAAA,EAAiBC,0BAA0BH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEkB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,6BAAA;IACbC,WAAAA,EAAa,kIAAA;IACbC,MAAAA,EAAQ,oCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;;;;;;UAYaC,mBAAAA,GAA0C;IACnDC,QAAAA,EAAU1B,2BAAAA;IACVQ,UAAAA,EAAYmB,6BAAAA;IACZd,eAAAA,EAAiBC,yBAAAA;IACjBG,eAAAA,EAAiBC,yBAAAA;IACjBU,OAAAA,EAASC;AACb;;;;"}
1
+ {"version":3,"file":"componentsBlueprint.js","sources":["../../componentsBlueprint.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { componentsBlueprintComponents } from './componentsBlueprintComponents';\nimport { componentsGalleryScreens } from './gallery';\nimport { componentsBlueprintName } from './packageName';\nimport { componentsDialogTemplates, componentsScreenTemplates } from './templates';\n\n/**\n * This blueprint's declaration.\n *\n * Where the default blueprint answers \"what does an application look like\", this one answers \"what does a\n * *page* look like once it is bound to Arc\". Its templates are whole pages already wired to the composites\n * in `Cratis.Components`: a data list page is a `dataPage` with its query, columns, empty message, data key\n * and filter fields all decided, under a header that says what it is bound to. An application picks the\n * template and supplies a query name.\n *\n * `layouts` is empty, and that is the most important line in this file.\n *\n * A layout is an application's base navigational shell, and an application has exactly one. This package\n * deliberately ships none: it depends on `Cratis.Blueprint.Default` and reuses that blueprint's `AppShell`,\n * its slot vocabulary, its shell components and its themes. That is what the dependency on another\n * blueprint *means* - and this is the first blueprint-on-blueprint dependency in Scene, so it is worth\n * stating plainly rather than leaving to be inferred from an empty array.\n *\n * The alternative would have been to ship a second application shell. It would have looked like value and\n * been the opposite: an application can activate only one shell, so the two blueprints would have become\n * mutually exclusive, and picking Arc-bound pages would have meant giving up the eight layout modes, the\n * themes and the navigation that the default blueprint already does well. Layering means both can be\n * active at once, which is the only arrangement in which either is worth having.\n *\n * `themes` is empty for the same reason at a smaller scale: the shell being themed is the default\n * blueprint's, so its themes are the right ones, and a theme shipped here would be this package asserting\n * a look for a shell it does not own.\n */\nexport const componentsBlueprintManifest: ScenePackage = {\n name: componentsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default' }, { name: 'Cratis.Components' }],\n components: Object.values(ComponentName),\n layouts: [],\n screenTemplates: componentsScreenTemplates.map(template => template.name),\n dialogTemplates: componentsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Cratis Components Blueprint',\n description: 'Arc-bound screen and dialog templates: whole pages built from the Cratis Components composites, for the default blueprint shell.',\n module: '@cratis/scene.blueprint.components',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * This blueprint as a loadable bundle.\n *\n * The manifest names things; this provides them. `validatePackageBundle` is what proves the two agree, and\n * this package's specs run it - a manifest promising a template the bundle never provided is a failure that\n * only shows up when someone picks that template and gets nothing.\n *\n * The screens are the gallery: real `Screen` instances naming the default blueprint's `AppShell`, its\n * chrome and one of these templates, so a preview boots them through the real engine as a working\n * miniature application rather than a set of pictures. They render with unregistered bindings, which is the\n * normal design-time state - the placeholders naming each wanted binding are exactly what should be there.\n */\nexport const componentsBlueprint: ScenePackageBundle = {\n manifest: componentsBlueprintManifest,\n components: componentsBlueprintComponents,\n screenTemplates: componentsScreenTemplates,\n dialogTemplates: componentsDialogTemplates,\n screens: componentsGalleryScreens,\n};\n"],"names":["componentsBlueprintManifest","name","componentsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","components","Object","values","ComponentName","layouts","screenTemplates","componentsScreenTemplates","map","template","dialogTemplates","componentsDialogTemplates","themes","displayName","description","module","license","licenseUrl","componentsBlueprint","manifest","componentsBlueprintComponents","screens","componentsGalleryScreens"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;UA2BaA,2BAAAA,GAA4C;IACrDC,IAAAA,EAAMC,uBAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM;AAA2B,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAoB;AAAE,KAAA;IACnFO,UAAAA,EAAYC,MAAAA,CAAOC,MAAM,CAACC,aAAAA,CAAAA;AAC1BC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,0BAA0BC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEgB,IAAAA,eAAAA,EAAiBC,0BAA0BH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASf,IAAI,CAAA;AACxEkB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,6BAAA;IACbC,WAAAA,EAAa,kIAAA;IACbC,MAAAA,EAAQ,oCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;;;;;;;;;UAYaC,mBAAAA,GAA0C;IACnDC,QAAAA,EAAU1B,2BAAAA;IACVQ,UAAAA,EAAYmB,6BAAAA;IACZd,eAAAA,EAAiBC,yBAAAA;IACjBG,eAAAA,EAAiBC,yBAAAA;IACjBU,OAAAA,EAASC;AACb;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"componentsBlueprintComponents.js","sources":["../../componentsBlueprintComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { componentsBlueprintName } from './packageName';\nimport { ArcPageHeader } from './header';\n\n/**\n * The components this package registers, keyed the way the renderer looks them up.\n *\n * Every key is built with `componentRegistryKey` rather than written out, because the separator between\n * package and component name is the registry's own business - it is deliberately not the `.` a screen uses\n * to qualify a name, so that a package name containing dots stays unambiguous. Building a key by hand is\n * how a component ends up registered under something no lookup will ever produce.\n *\n * One entry, and a short registry is the healthy outcome here rather than a gap. What this blueprint\n * contributes is templates; a component only appears when a template genuinely could not express the\n * composition, and `validatePackageBundle` proves that whatever *is* here is also declared in the manifest.\n */\nexport const componentsBlueprintComponents: ComponentRegistry = {\n [componentRegistryKey(componentsBlueprintName, ComponentName.ArcPageHeader)]: ArcPageHeader,\n};\n"],"names":["componentsBlueprintComponents","componentRegistryKey","componentsBlueprintName","ComponentName","ArcPageHeader"],"mappings":";;;;;;AAAA;AACA;AAOA;;;;;;;;;;;UAYaA,6BAAAA,GAAmD;AAC5D,IAAA,CAACC,oBAAAA,CAAqBC,uBAAAA,EAAyBC,aAAAA,CAAcC,aAAa,IAAIA;AAClF;;;;"}
1
+ {"version":3,"file":"componentsBlueprintComponents.js","sources":["../../componentsBlueprintComponents.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 { ComponentRegistry, componentRegistryKey } from '@cratis/scene.react';\nimport { ComponentName } from './ComponentName';\nimport { componentsBlueprintName } from './packageName';\nimport { ArcPageHeader } from './header';\n\n/**\n * The components this package registers, keyed the way the renderer looks them up.\n *\n * Every key is built with `componentRegistryKey` rather than written out, because the separator between\n * package and component name is the registry's own business - it is deliberately not the `.` a screen uses\n * to qualify a name, so that a package name containing dots stays unambiguous. Building a key by hand is\n * how a component ends up registered under something no lookup will ever produce.\n *\n * One entry, and a short registry is the healthy outcome here rather than a gap. What this blueprint\n * contributes is templates; a component only appears when a template genuinely could not express the\n * composition, and `validatePackageBundle` proves that whatever *is* here is also declared in the manifest.\n */\nexport const componentsBlueprintComponents: ComponentRegistry = {\n [componentRegistryKey(componentsBlueprintName, ComponentName.ArcPageHeader)]: ArcPageHeader,\n};\n"],"names":["componentsBlueprintComponents","componentRegistryKey","componentsBlueprintName","ComponentName","ArcPageHeader"],"mappings":";;;;;;AAAA;AACA;AAOA;;;;;;;;;;;UAYaA,6BAAAA,GAAmD;AAC5D,IAAA,CAACC,oBAAAA,CAAqBC,uBAAAA,EAAyBC,aAAAA,CAAcC,aAAa,IAAIA;AAClF;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"DialogTemplatePreview.js","sources":["../../../gallery/DialogTemplatePreview.tsx"],"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 { useMemo } from 'react';\nimport { SceneElement } from '@cratis/scene.model';\nimport { ComponentRegistry, SceneElementView } from '@cratis/scene.react';\nimport { resolveElementComponentNames } from '@cratis/scene.blueprint.default';\nimport { componentsDialogTemplates } from '../templates';\nimport { componentsBlueprintCatalog, componentsBlueprintProfile } from './previewProfile';\nimport { componentsPreviewRegistry } from './GalleryScreenPreview';\n\nexport interface DialogTemplatePreviewProps {\n /** The name of the dialog template to boot. */\n templateName: string;\n\n /** The component registry to render against. Defaults to {@link componentsPreviewRegistry}. */\n registry?: ComponentRegistry;\n}\n\n/**\n * Boots one dialog template through the real engine.\n *\n * A dialog has no layout and no shell, because it occupies no slot - it opens *over* whatever is already\n * on screen. So there is nothing to compose it into: the template's own content is the whole tree, and it\n * goes straight through `resolveComponentName` and `SceneElementView` exactly as a screen's does.\n *\n * Each of these templates declares one slot, so flattening the content is the whole of \"assembling\" it.\n * That is a consequence of the composites owning their own frames rather than a simplification here.\n */\nexport function DialogTemplatePreview({ templateName, registry = componentsPreviewRegistry }: DialogTemplatePreviewProps) {\n const elements = useMemo(() => {\n const template = componentsDialogTemplates.find(candidate => candidate.name === templateName);\n if (!template) {\n throw new Error(`This blueprint has no dialog template named '${templateName}'.`);\n }\n\n return Object.values(template.content ?? {})\n .flat()\n .map((element: SceneElement) => resolveElementComponentNames(element, componentsBlueprintProfile, componentsBlueprintCatalog));\n }, [templateName]);\n\n return (\n <>\n {elements.map(element => (\n <SceneElementView key={element.id} element={element} registry={registry} resolveBinding={() => undefined} />\n ))}\n </>\n );\n}\n"],"names":["DialogTemplatePreview","templateName","registry","componentsPreviewRegistry","elements","useMemo","template","componentsDialogTemplates","find","candidate","name","Error","Object","values","content","flat","map","element","resolveElementComponentNames","componentsBlueprintProfile","componentsBlueprintCatalog","_jsx","_Fragment","SceneElementView","resolveBinding","undefined","id"],"mappings":";;;;;;;;;;;;;;AAmBA;;;;;;;;;IAUO,SAASA,qBAAAA,CAAsB,EAAEC,YAAY,EAAEC,QAAAA,GAAWC,yBAAyB,EAA8B,EAAA;AACpH,IAAA,MAAMC,WAAWC,OAAAA,CAAQ,IAAA;QACrB,MAAMC,QAAAA,GAAWC,0BAA0BC,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUC,IAAI,KAAKT,YAAAA,CAAAA;AAChF,QAAA,IAAI,CAACK,QAAAA,EAAU;AACX,YAAA,MAAM,IAAIK,KAAAA,CAAM,CAAC,6CAA6C,EAAEV,YAAAA,CAAa,EAAE,CAAC,CAAA;AACpF,QAAA;AAEA,QAAA,OAAOW,OAAOC,MAAM,CAACP,QAAAA,CAASQ,OAAO,IAAI,EAAC,CAAA,CACrCC,IAAI,EAAA,CACJC,GAAG,CAAC,CAACC,OAAAA,GAA0BC,4BAAAA,CAA6BD,SAASE,0BAAAA,EAA4BC,0BAAAA,CAAAA,CAAAA;IAC1G,CAAA,EAAG;AAACnB,QAAAA;AAAa,KAAA,CAAA;IAEjB,qBACIoB,GAAA,CAAAC,QAAA,EAAA;AACKlB,QAAAA,QAAAA,EAAAA,QAAAA,CAASY,GAAG,CAACC,CAAAA,OAAAA,iBACVI,GAAA,CAACE,gBAAAA,EAAAA;gBAAkCN,OAAAA,EAASA,OAAAA;gBAASf,QAAAA,EAAUA,QAAAA;AAAUsB,gBAAAA,cAAAA,EAAgB,IAAMC;AAAxER,aAAAA,EAAAA,OAAAA,CAAQS,EAAE,CAAA;;AAIjD;;;;"}
1
+ {"version":3,"file":"DialogTemplatePreview.js","sources":["../../../gallery/DialogTemplatePreview.tsx"],"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 { useMemo } from 'react';\nimport { SceneElement } from '@cratis/scene.model';\nimport { ComponentRegistry, SceneElementView } from '@cratis/scene.react';\nimport { resolveElementComponentNames } from '@cratis/scene.blueprint.default';\nimport { componentsDialogTemplates } from '../templates';\nimport { componentsBlueprintCatalog, componentsBlueprintProfile } from './previewProfile';\nimport { componentsPreviewRegistry } from './GalleryScreenPreview';\n\nexport interface DialogTemplatePreviewProps {\n /** The name of the dialog template to boot. */\n templateName: string;\n\n /** The component registry to render against. Defaults to {@link componentsPreviewRegistry}. */\n registry?: ComponentRegistry;\n}\n\n/**\n * Boots one dialog template through the real engine.\n *\n * A dialog has no layout and no shell, because it occupies no slot - it opens *over* whatever is already\n * on screen. So there is nothing to compose it into: the template's own content is the whole tree, and it\n * goes straight through `resolveComponentName` and `SceneElementView` exactly as a screen's does.\n *\n * Each of these templates declares one slot, so flattening the content is the whole of \"assembling\" it.\n * That is a consequence of the composites owning their own frames rather than a simplification here.\n */\nexport function DialogTemplatePreview({ templateName, registry = componentsPreviewRegistry }: DialogTemplatePreviewProps) {\n const elements = useMemo(() => {\n const template = componentsDialogTemplates.find(candidate => candidate.name === templateName);\n if (!template) {\n throw new Error(`This blueprint has no dialog template named '${templateName}'.`);\n }\n\n return Object.values(template.content ?? {})\n .flat()\n .map((element: SceneElement) => resolveElementComponentNames(element, componentsBlueprintProfile, componentsBlueprintCatalog));\n }, [templateName]);\n\n return (\n <>\n {elements.map(element => (\n <SceneElementView key={element.id} element={element} registry={registry} resolveBinding={() => undefined} />\n ))}\n </>\n );\n}\n"],"names":["DialogTemplatePreview","templateName","registry","componentsPreviewRegistry","elements","useMemo","template","componentsDialogTemplates","find","candidate","name","Error","Object","values","content","flat","map","element","resolveElementComponentNames","componentsBlueprintProfile","componentsBlueprintCatalog","_jsx","_Fragment","SceneElementView","resolveBinding","undefined","id"],"mappings":";;;;;;;;;;;;;;AAmBA;;;;;;;;;IAUO,SAASA,qBAAAA,CAAsB,EAAEC,YAAY,EAAEC,QAAAA,GAAWC,yBAAyB,EAA8B,EAAA;AACpH,IAAA,MAAMC,WAAWC,OAAAA,CAAQ,IAAA;QACrB,MAAMC,QAAAA,GAAWC,0BAA0BC,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUC,IAAI,KAAKT,YAAAA,CAAAA;AAChF,QAAA,IAAI,CAACK,QAAAA,EAAU;AACX,YAAA,MAAM,IAAIK,KAAAA,CAAM,CAAC,6CAA6C,EAAEV,YAAAA,CAAa,EAAE,CAAC,CAAA;AACpF,QAAA;AAEA,QAAA,OAAOW,OAAOC,MAAM,CAACP,QAAAA,CAASQ,OAAO,IAAI,EAAC,CAAA,CACrCC,IAAI,EAAA,CACJC,GAAG,CAAC,CAACC,OAAAA,GAA0BC,4BAAAA,CAA6BD,SAASE,0BAAAA,EAA4BC,0BAAAA,CAAAA,CAAAA;IAC1G,CAAA,EAAG;AAACnB,QAAAA;AAAa,KAAA,CAAA;IAEjB,qBACIoB,GAAA,CAAAC,QAAA,EAAA;AACKlB,QAAAA,QAAAA,EAAAA,QAAAA,CAASY,GAAG,CAACC,CAAAA,OAAAA,iBACVI,GAAA,CAACE,gBAAAA,EAAAA;gBAAkCN,OAAAA,EAASA,OAAAA;gBAASf,QAAAA,EAAUA,QAAAA;AAAUsB,gBAAAA,cAAAA,EAAgB,IAAMC;AAAxER,aAAAA,EAAAA,OAAAA,CAAQS,EAAE,CAAA;;AAIjD;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"GalleryScreenPreview.js","sources":["../../../gallery/GalleryScreenPreview.tsx"],"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 { useMemo } from 'react';\nimport { ComponentRegistry, SceneElementView, coreComponents } from '@cratis/scene.react';\nimport { cratisComponents } from '@cratis/scene.components';\nimport { LayoutConfigProvider, LayoutConfigState, LayoutThemeProvider, composeScreenElement, defaultBlueprintComponents, defaultBlueprintThemes, resolveElementComponentNames } from '@cratis/scene.blueprint.default';\nimport { componentsBlueprintComponents } from '../componentsBlueprintComponents';\nimport { componentsBlueprintCatalog, componentsBlueprintProfile } from './previewProfile';\nimport { componentsGalleryScreen } from './screens';\n\n/**\n * The registry a preview resolves against: `core`, `Cratis.Components`, the default blueprint, and this one.\n *\n * Merged by hand rather than through `mergePackageRegistries`, because reaching for this blueprint's own\n * *bundle* here would be circular - the bundle is assembled from the gallery this file belongs to. Registry\n * keys carry their package name, so merge order cannot cause a collision either way.\n *\n * Four of the profile's five packages are present. `PrimeReact` is not, which is why a `column` inside a\n * table comes out unresolved - and it never reaches the DOM, because the table it belongs to is a\n * placeholder until a host registers its query.\n */\nexport const componentsPreviewRegistry: ComponentRegistry = {\n ...coreComponents,\n ...cratisComponents,\n ...defaultBlueprintComponents,\n ...componentsBlueprintComponents,\n};\n\nexport interface GalleryScreenPreviewProps {\n /** The name of the gallery screen to boot. */\n screenName: string;\n\n /** Configuration to start from - a story pinning a layout mode, or a host restoring a session. */\n initialConfig?: Partial<LayoutConfigState>;\n\n /** The component registry to render against. Defaults to {@link componentsPreviewRegistry}. */\n registry?: ComponentRegistry;\n}\n\n/**\n * Boots one gallery screen through the real engine.\n *\n * Nothing here is a preview-only path: the screen is a real `Screen`, its element tree is resolved by the\n * real `resolveComponentName`, and it is rendered by the real `SceneElementView` against the real registry.\n * That is the point of shipping a gallery at all - a mockup proves someone can draw an invoice list, and\n * this proves the blueprint renders one.\n *\n * `LayoutConfigProvider` and `LayoutThemeProvider` are the default blueprint's, because the shell being\n * previewed is the default blueprint's shell. This package provides Arc-bound pages to put inside it, and\n * previewing them without the thing they were designed to sit in would prove the wrong thing.\n */\nexport function GalleryScreenPreview({ screenName, initialConfig, registry = componentsPreviewRegistry }: GalleryScreenPreviewProps) {\n const element = useMemo(() => {\n const screen = componentsGalleryScreen(screenName);\n if (!screen) {\n throw new Error(`The gallery has no screen named '${screenName}'.`);\n }\n\n return resolveElementComponentNames(composeScreenElement(screen), componentsBlueprintProfile, componentsBlueprintCatalog);\n }, [screenName]);\n\n return (\n <LayoutConfigProvider initialConfig={initialConfig} storage={null}>\n <LayoutThemeProvider themes={defaultBlueprintThemes}>\n <SceneElementView element={element} registry={registry} resolveBinding={() => undefined} />\n </LayoutThemeProvider>\n </LayoutConfigProvider>\n );\n}\n"],"names":["componentsPreviewRegistry","coreComponents","cratisComponents","defaultBlueprintComponents","componentsBlueprintComponents","GalleryScreenPreview","screenName","initialConfig","registry","element","useMemo","screen","componentsGalleryScreen","Error","resolveElementComponentNames","composeScreenElement","componentsBlueprintProfile","componentsBlueprintCatalog","_jsx","LayoutConfigProvider","storage","LayoutThemeProvider","themes","defaultBlueprintThemes","SceneElementView","resolveBinding","undefined"],"mappings":";;;;;;;;;AAWA;;;;;;;;;;UAWaA,yBAAAA,GAA+C;AACxD,IAAA,GAAGC,cAAc;AACjB,IAAA,GAAGC,gBAAgB;AACnB,IAAA,GAAGC,0BAA0B;AAC7B,IAAA,GAAGC;AACP;AAaA;;;;;;;;;;;IAYO,SAASC,oBAAAA,CAAqB,EAAEC,UAAU,EAAEC,aAAa,EAAEC,QAAAA,GAAWR,yBAAyB,EAA6B,EAAA;AAC/H,IAAA,MAAMS,UAAUC,OAAAA,CAAQ,IAAA;AACpB,QAAA,MAAMC,SAASC,uBAAAA,CAAwBN,UAAAA,CAAAA;AACvC,QAAA,IAAI,CAACK,MAAAA,EAAQ;AACT,YAAA,MAAM,IAAIE,KAAAA,CAAM,CAAC,iCAAiC,EAAEP,UAAAA,CAAW,EAAE,CAAC,CAAA;AACtE,QAAA;QAEA,OAAOQ,4BAAAA,CAA6BC,oBAAAA,CAAqBJ,MAAAA,CAAAA,EAASK,0BAAAA,EAA4BC,0BAAAA,CAAAA;IAClG,CAAA,EAAG;AAACX,QAAAA;AAAW,KAAA,CAAA;AAEf,IAAA,qBACIY,GAAA,CAACC,oBAAAA,EAAAA;QAAqBZ,aAAAA,EAAeA,aAAAA;QAAea,OAAAA,EAAS,IAAA;AACzD,QAAA,QAAA,gBAAAF,GAAA,CAACG,mBAAAA,EAAAA;YAAoBC,MAAAA,EAAQC,sBAAAA;AACzB,YAAA,QAAA,gBAAAL,GAAA,CAACM,gBAAAA,EAAAA;gBAAiBf,OAAAA,EAASA,OAAAA;gBAASD,QAAAA,EAAUA,QAAAA;AAAUiB,gBAAAA,cAAAA,EAAgB,IAAMC;;;;AAI9F;;;;"}
1
+ {"version":3,"file":"GalleryScreenPreview.js","sources":["../../../gallery/GalleryScreenPreview.tsx"],"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 { useMemo } from 'react';\nimport { ComponentRegistry, SceneElementView, coreComponents } from '@cratis/scene.react';\nimport { cratisComponents } from '@cratis/scene.components';\nimport { LayoutConfigProvider, LayoutConfigState, LayoutThemeProvider, composeScreenElement, defaultBlueprintComponents, defaultBlueprintThemes, resolveElementComponentNames } from '@cratis/scene.blueprint.default';\nimport { componentsBlueprintComponents } from '../componentsBlueprintComponents';\nimport { componentsBlueprintCatalog, componentsBlueprintProfile } from './previewProfile';\nimport { componentsGalleryScreen } from './screens';\n\n/**\n * The registry a preview resolves against: `core`, `Cratis.Components`, the default blueprint, and this one.\n *\n * Merged by hand rather than through `mergePackageRegistries`, because reaching for this blueprint's own\n * *bundle* here would be circular - the bundle is assembled from the gallery this file belongs to. Registry\n * keys carry their package name, so merge order cannot cause a collision either way.\n *\n * Four of the profile's five packages are present. `PrimeReact` is not, which is why a `column` inside a\n * table comes out unresolved - and it never reaches the DOM, because the table it belongs to is a\n * placeholder until a host registers its query.\n */\nexport const componentsPreviewRegistry: ComponentRegistry = {\n ...coreComponents,\n ...cratisComponents,\n ...defaultBlueprintComponents,\n ...componentsBlueprintComponents,\n};\n\nexport interface GalleryScreenPreviewProps {\n /** The name of the gallery screen to boot. */\n screenName: string;\n\n /** Configuration to start from - a story pinning a layout mode, or a host restoring a session. */\n initialConfig?: Partial<LayoutConfigState>;\n\n /** The component registry to render against. Defaults to {@link componentsPreviewRegistry}. */\n registry?: ComponentRegistry;\n}\n\n/**\n * Boots one gallery screen through the real engine.\n *\n * Nothing here is a preview-only path: the screen is a real `Screen`, its element tree is resolved by the\n * real `resolveComponentName`, and it is rendered by the real `SceneElementView` against the real registry.\n * That is the point of shipping a gallery at all - a mockup proves someone can draw an invoice list, and\n * this proves the blueprint renders one.\n *\n * `LayoutConfigProvider` and `LayoutThemeProvider` are the default blueprint's, because the shell being\n * previewed is the default blueprint's shell. This package provides Arc-bound pages to put inside it, and\n * previewing them without the thing they were designed to sit in would prove the wrong thing.\n */\nexport function GalleryScreenPreview({ screenName, initialConfig, registry = componentsPreviewRegistry }: GalleryScreenPreviewProps) {\n const element = useMemo(() => {\n const screen = componentsGalleryScreen(screenName);\n if (!screen) {\n throw new Error(`The gallery has no screen named '${screenName}'.`);\n }\n\n return resolveElementComponentNames(composeScreenElement(screen), componentsBlueprintProfile, componentsBlueprintCatalog);\n }, [screenName]);\n\n return (\n <LayoutConfigProvider initialConfig={initialConfig} storage={null}>\n <LayoutThemeProvider themes={defaultBlueprintThemes}>\n <SceneElementView element={element} registry={registry} resolveBinding={() => undefined} />\n </LayoutThemeProvider>\n </LayoutConfigProvider>\n );\n}\n"],"names":["componentsPreviewRegistry","coreComponents","cratisComponents","defaultBlueprintComponents","componentsBlueprintComponents","GalleryScreenPreview","screenName","initialConfig","registry","element","useMemo","screen","componentsGalleryScreen","Error","resolveElementComponentNames","composeScreenElement","componentsBlueprintProfile","componentsBlueprintCatalog","_jsx","LayoutConfigProvider","storage","LayoutThemeProvider","themes","defaultBlueprintThemes","SceneElementView","resolveBinding","undefined"],"mappings":";;;;;;;;;AAWA;;;;;;;;;;UAWaA,yBAAAA,GAA+C;AACxD,IAAA,GAAGC,cAAc;AACjB,IAAA,GAAGC,gBAAgB;AACnB,IAAA,GAAGC,0BAA0B;AAC7B,IAAA,GAAGC;AACP;AAaA;;;;;;;;;;;IAYO,SAASC,oBAAAA,CAAqB,EAAEC,UAAU,EAAEC,aAAa,EAAEC,QAAAA,GAAWR,yBAAyB,EAA6B,EAAA;AAC/H,IAAA,MAAMS,UAAUC,OAAAA,CAAQ,IAAA;AACpB,QAAA,MAAMC,SAASC,uBAAAA,CAAwBN,UAAAA,CAAAA;AACvC,QAAA,IAAI,CAACK,MAAAA,EAAQ;AACT,YAAA,MAAM,IAAIE,KAAAA,CAAM,CAAC,iCAAiC,EAAEP,UAAAA,CAAW,EAAE,CAAC,CAAA;AACtE,QAAA;QAEA,OAAOQ,4BAAAA,CAA6BC,oBAAAA,CAAqBJ,MAAAA,CAAAA,EAASK,0BAAAA,EAA4BC,0BAAAA,CAAAA;IAClG,CAAA,EAAG;AAACX,QAAAA;AAAW,KAAA,CAAA;AAEf,IAAA,qBACIY,GAAA,CAACC,oBAAAA,EAAAA;QAAqBZ,aAAAA,EAAeA,aAAAA;QAAea,OAAAA,EAAS,IAAA;AACzD,QAAA,QAAA,gBAAAF,GAAA,CAACG,mBAAAA,EAAAA;YAAoBC,MAAAA,EAAQC,sBAAAA;AACzB,YAAA,QAAA,gBAAAL,GAAA,CAACM,gBAAAA,EAAAA;gBAAiBf,OAAAA,EAASA,OAAAA;gBAASD,QAAAA,EAAUA,QAAAA;AAAUiB,gBAAAA,cAAAA,EAAgB,IAAMC;;;;AAI9F;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"applicationChrome.js","sources":["../../../gallery/applicationChrome.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 { SceneElement } from '@cratis/scene.model';\nimport { ComponentName as DefaultComponentName, SlotName, defaultBlueprintThemes, externalComponent } from '@cratis/scene.blueprint.default';\nimport { componentsNavigationGroups, entriesInGroup, groupOfScreen, labelOfScreen } from './navigation';\n\n/**\n * The application-shell chrome every gallery screen in this package shares.\n *\n * Every element here names a component the **default blueprint** declares - `topbar`, `sidebar`, `menu`,\n * `breadcrumb`, `footer`, `configPanel`, `logo`, `userMenu` - and every slot is one of that blueprint's\n * `SlotName`s. That is this package's dependency on it made concrete rather than merely declared: this\n * blueprint contributes Arc-bound *pages*, and borrows the shell those pages live in.\n *\n * A blueprint that shipped its own topbar and its own sidebar would be a rival to the default one rather\n * than a layer on it, and an application would have to choose. Since a profile activates one blueprint's\n * layouts and both blueprints' templates, layering is what makes the two usable together at all.\n */\n\n/** The brand mark, shared by the topbar and the sidebar header. */\nfunction logo(id: string): SceneElement {\n return externalComponent(id, DefaultComponentName.Logo, { label: 'Contoso Billing', initials: 'CB', targetScreen: 'DashboardPage' });\n}\n\n/** One menu section per navigation group, each holding that group's entries. */\nfunction menuSections(activeScreen: string): SceneElement[] {\n return componentsNavigationGroups.map(group =>\n externalComponent(\n `menu-${group.toLowerCase()}`,\n DefaultComponentName.Menu,\n { title: group, label: group },\n { items: entriesInGroup(group).map(entry => navigationItem(entry.targetScreen, entry.label, entry.icon, entry.order, group, activeScreen)) },\n ),\n );\n}\n\nfunction navigationItem(targetScreen: string, label: string, icon: string, order: number, group: string, activeScreen: string): SceneElement {\n return externalComponent(`nav-${targetScreen}`, DefaultComponentName.MenuItem, {\n label,\n targetScreen,\n routeParameterBindings: {},\n order,\n group,\n icon,\n isActive: targetScreen === activeScreen,\n });\n}\n\n/** The configurator, offering the themes the default blueprint ships - this package ships none of its own. */\nfunction configPanel(): SceneElement {\n return externalComponent(DefaultComponentName.ConfigPanel, DefaultComponentName.ConfigPanel, {\n title: 'Settings',\n themes: defaultBlueprintThemes.map(theme => ({ name: theme.name, label: theme.name, isDark: theme.isDark ?? false })),\n });\n}\n\n/**\n * The trail above a screen's content, derived from the navigation rather than declared a second time.\n *\n * A hand-written table of breadcrumbs per screen is a second statement of where each screen sits, and the\n * two drift the first time a screen is renamed. The navigation already knows the group and the label, so\n * the trail follows from it.\n */\nfunction breadcrumbEntries(activeScreen: string): { label: string; targetScreen?: string }[] {\n const group = groupOfScreen(activeScreen);\n const label = labelOfScreen(activeScreen) ?? activeScreen;\n return group === undefined ? [{ label }] : [{ label: group, targetScreen: 'DashboardPage' }, { label }];\n}\n\n/**\n * The application shell's slot content for one screen.\n *\n * Only the breadcrumb and which menu entry is marked active differ from screen to screen - everything else\n * is identical, which is what chrome is for.\n *\n * @param activeScreen The screen being rendered, so its menu entry is marked current and its trail is built.\n * @returns Slot content keyed by the {@link SlotName}s the default blueprint's `AppShell` layout declares.\n */\nexport function componentsApplicationChrome(activeScreen: string): Record<string, SceneElement[]> {\n return {\n [SlotName.Topbar]: [\n externalComponent(\n 'topbar',\n DefaultComponentName.Topbar,\n {},\n {\n logo: [logo('topbar-logo')],\n end: [\n externalComponent('topbar-user', DefaultComponentName.UserMenu, {\n name: 'Amelia Nyquist',\n role: 'Billing owner',\n initials: 'AN',\n items: [{ label: 'Invoice document', icon: 'pi pi-file-edit', targetScreen: 'ObjectEditorPage' }],\n }),\n ],\n },\n ),\n ],\n [SlotName.Sidebar]: [externalComponent('sidebar', DefaultComponentName.Sidebar, { title: 'Contoso Billing' }, { logo: [logo('sidebar-logo')] })],\n [SlotName.Menu]: menuSections(activeScreen),\n [SlotName.Breadcrumb]: [\n externalComponent('breadcrumb', DefaultComponentName.Breadcrumb, { homeTargetScreen: 'DashboardPage', items: breadcrumbEntries(activeScreen) }),\n ],\n [SlotName.Footer]: [externalComponent('footer', DefaultComponentName.Footer, { text: '© Contoso · Arc-bound pages from Cratis Scene' })],\n [SlotName.ConfigPanel]: [configPanel()],\n };\n}\n"],"names":["logo","id","externalComponent","DefaultComponentName","Logo","label","initials","targetScreen","menuSections","activeScreen","componentsNavigationGroups","map","group","toLowerCase","Menu","title","items","entriesInGroup","entry","navigationItem","icon","order","MenuItem","routeParameterBindings","isActive","configPanel","ConfigPanel","themes","defaultBlueprintThemes","theme","name","isDark","breadcrumbEntries","groupOfScreen","labelOfScreen","undefined","componentsApplicationChrome","SlotName","Topbar","end","UserMenu","role","Sidebar","Breadcrumb","homeTargetScreen","Footer","text"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,wEAGD,SAASA,IAAAA,CAAKC,EAAU,EAAA;AACpB,IAAA,OAAOC,iBAAAA,CAAkBD,EAAAA,EAAIE,aAAAA,CAAqBC,IAAI,EAAE;QAAEC,KAAAA,EAAO,iBAAA;QAAmBC,QAAAA,EAAU,IAAA;QAAMC,YAAAA,EAAc;AAAgB,KAAA,CAAA;AACtI;AAEA,iFACA,SAASC,YAAAA,CAAaC,YAAoB,EAAA;AACtC,IAAA,OAAOC,0BAAAA,CAA2BC,GAAG,CAACC,CAAAA,QAClCV,iBAAAA,CACI,CAAC,KAAK,EAAEU,MAAMC,WAAW,EAAA,CAAA,CAAI,EAC7BV,aAAAA,CAAqBW,IAAI,EACzB;YAAEC,KAAAA,EAAOH,KAAAA;YAAOP,KAAAA,EAAOO;SAAM,EAC7B;AAAEI,YAAAA,KAAAA,EAAOC,eAAeL,KAAAA,CAAAA,CAAOD,GAAG,CAACO,CAAAA,KAAAA,GAASC,eAAeD,KAAAA,CAAMX,YAAY,EAAEW,KAAAA,CAA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,CAASQ,MAAM,GAAG;YAAC3C,iBAAAA,CAAkB,QAAA,EAAUC,aAAAA,CAAqB0C,MAAM,EAAE;gBAAEC,IAAAA,EAAM;AAAgD,aAAA;AAAG,SAAA;QACxI,CAACT,QAAAA,CAASX,WAAW,GAAG;AAACD,YAAAA,WAAAA;AAAc;AAC3C,KAAA;AACJ;;;;"}
1
+ {"version":3,"file":"applicationChrome.js","sources":["../../../gallery/applicationChrome.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 { SceneElement } from '@cratis/scene.model';\nimport { ComponentName as DefaultComponentName, SlotName, defaultBlueprintThemes, externalComponent } from '@cratis/scene.blueprint.default';\nimport { componentsNavigationGroups, entriesInGroup, groupOfScreen, labelOfScreen } from './navigation';\n\n/**\n * The application-shell chrome every gallery screen in this package shares.\n *\n * Every element here names a component the **default blueprint** declares - `topbar`, `sidebar`, `menu`,\n * `breadcrumb`, `footer`, `configPanel`, `logo`, `userMenu` - and every slot is one of that blueprint's\n * `SlotName`s. That is this package's dependency on it made concrete rather than merely declared: this\n * blueprint contributes Arc-bound *pages*, and borrows the shell those pages live in.\n *\n * A blueprint that shipped its own topbar and its own sidebar would be a rival to the default one rather\n * than a layer on it, and an application would have to choose. Since a profile activates one blueprint's\n * layouts and both blueprints' templates, layering is what makes the two usable together at all.\n */\n\n/** The brand mark, shared by the topbar and the sidebar header. */\nfunction logo(id: string): SceneElement {\n return externalComponent(id, DefaultComponentName.Logo, { label: 'Contoso Billing', initials: 'CB', targetScreen: 'DashboardPage' });\n}\n\n/** One menu section per navigation group, each holding that group's entries. */\nfunction menuSections(activeScreen: string): SceneElement[] {\n return componentsNavigationGroups.map(group =>\n externalComponent(\n `menu-${group.toLowerCase()}`,\n DefaultComponentName.Menu,\n { title: group, label: group },\n { items: entriesInGroup(group).map(entry => navigationItem(entry.targetScreen, entry.label, entry.icon, entry.order, group, activeScreen)) },\n ),\n );\n}\n\nfunction navigationItem(targetScreen: string, label: string, icon: string, order: number, group: string, activeScreen: string): SceneElement {\n return externalComponent(`nav-${targetScreen}`, DefaultComponentName.MenuItem, {\n label,\n targetScreen,\n routeParameterBindings: {},\n order,\n group,\n icon,\n isActive: targetScreen === activeScreen,\n });\n}\n\n/** The configurator, offering the themes the default blueprint ships - this package ships none of its own. */\nfunction configPanel(): SceneElement {\n return externalComponent(DefaultComponentName.ConfigPanel, DefaultComponentName.ConfigPanel, {\n title: 'Settings',\n themes: defaultBlueprintThemes.map(theme => ({ name: theme.name, label: theme.name, isDark: theme.isDark ?? false })),\n });\n}\n\n/**\n * The trail above a screen's content, derived from the navigation rather than declared a second time.\n *\n * A hand-written table of breadcrumbs per screen is a second statement of where each screen sits, and the\n * two drift the first time a screen is renamed. The navigation already knows the group and the label, so\n * the trail follows from it.\n */\nfunction breadcrumbEntries(activeScreen: string): { label: string; targetScreen?: string }[] {\n const group = groupOfScreen(activeScreen);\n const label = labelOfScreen(activeScreen) ?? activeScreen;\n return group === undefined ? [{ label }] : [{ label: group, targetScreen: 'DashboardPage' }, { label }];\n}\n\n/**\n * The application shell's slot content for one screen.\n *\n * Only the breadcrumb and which menu entry is marked active differ from screen to screen - everything else\n * is identical, which is what chrome is for.\n *\n * @param activeScreen The screen being rendered, so its menu entry is marked current and its trail is built.\n * @returns Slot content keyed by the {@link SlotName}s the default blueprint's `AppShell` layout declares.\n */\nexport function componentsApplicationChrome(activeScreen: string): Record<string, SceneElement[]> {\n return {\n [SlotName.Topbar]: [\n externalComponent(\n 'topbar',\n DefaultComponentName.Topbar,\n {},\n {\n logo: [logo('topbar-logo')],\n end: [\n externalComponent('topbar-user', DefaultComponentName.UserMenu, {\n name: 'Amelia Nyquist',\n role: 'Billing owner',\n initials: 'AN',\n items: [{ label: 'Invoice document', icon: 'pi pi-file-edit', targetScreen: 'ObjectEditorPage' }],\n }),\n ],\n },\n ),\n ],\n [SlotName.Sidebar]: [externalComponent('sidebar', DefaultComponentName.Sidebar, { title: 'Contoso Billing' }, { logo: [logo('sidebar-logo')] })],\n [SlotName.Menu]: menuSections(activeScreen),\n [SlotName.Breadcrumb]: [\n externalComponent('breadcrumb', DefaultComponentName.Breadcrumb, { homeTargetScreen: 'DashboardPage', items: breadcrumbEntries(activeScreen) }),\n ],\n [SlotName.Footer]: [externalComponent('footer', DefaultComponentName.Footer, { text: '© Contoso · Arc-bound pages from Cratis Scene' })],\n [SlotName.ConfigPanel]: [configPanel()],\n };\n}\n"],"names":["logo","id","externalComponent","DefaultComponentName","Logo","label","initials","targetScreen","menuSections","activeScreen","componentsNavigationGroups","map","group","toLowerCase","Menu","title","items","entriesInGroup","entry","navigationItem","icon","order","MenuItem","routeParameterBindings","isActive","configPanel","ConfigPanel","themes","defaultBlueprintThemes","theme","name","isDark","breadcrumbEntries","groupOfScreen","labelOfScreen","undefined","componentsApplicationChrome","SlotName","Topbar","end","UserMenu","role","Sidebar","Breadcrumb","homeTargetScreen","Footer","text"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;;;;;AAWC,wEAGD,SAASA,IAAAA,CAAKC,EAAU,EAAA;AACpB,IAAA,OAAOC,iBAAAA,CAAkBD,EAAAA,EAAIE,aAAAA,CAAqBC,IAAI,EAAE;QAAEC,KAAAA,EAAO,iBAAA;QAAmBC,QAAAA,EAAU,IAAA;QAAMC,YAAAA,EAAc;AAAgB,KAAA,CAAA;AACtI;AAEA,iFACA,SAASC,YAAAA,CAAaC,YAAoB,EAAA;AACtC,IAAA,OAAOC,0BAAAA,CAA2BC,GAAG,CAACC,CAAAA,QAClCV,iBAAAA,CACI,CAAC,KAAK,EAAEU,MAAMC,WAAW,EAAA,CAAA,CAAI,EAC7BV,aAAAA,CAAqBW,IAAI,EACzB;YAAEC,KAAAA,EAAOH,KAAAA;YAAOP,KAAAA,EAAOO;SAAM,EAC7B;AAAEI,YAAAA,KAAAA,EAAOC,eAAeL,KAAAA,CAAAA,CAAOD,GAAG,CAACO,CAAAA,KAAAA,GAASC,eAAeD,K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