@cratis/scene.blueprint.components 4.24.0 → 4.26.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 (34) hide show
  1. package/dist/cjs/templates/commandTemplates.js +3 -0
  2. package/dist/cjs/templates/commandTemplates.js.map +1 -1
  3. package/dist/cjs/templates/dialogTemplates.js +6 -3
  4. package/dist/cjs/templates/dialogTemplates.js.map +1 -1
  5. package/dist/cjs/templates/editorTemplates.js +4 -2
  6. package/dist/cjs/templates/editorTemplates.js.map +1 -1
  7. package/dist/cjs/templates/listTemplates.js +9 -0
  8. package/dist/cjs/templates/listTemplates.js.map +1 -1
  9. package/dist/cjs/templates/nesting.js +6 -3
  10. package/dist/cjs/templates/nesting.js.map +1 -1
  11. package/dist/cjs/templates/workspaceTemplates.js +4 -2
  12. package/dist/cjs/templates/workspaceTemplates.js.map +1 -1
  13. package/dist/esm/templates/commandTemplates.d.ts.map +1 -1
  14. package/dist/esm/templates/commandTemplates.js +4 -1
  15. package/dist/esm/templates/commandTemplates.js.map +1 -1
  16. package/dist/esm/templates/dialogTemplates.js +6 -3
  17. package/dist/esm/templates/dialogTemplates.js.map +1 -1
  18. package/dist/esm/templates/editorTemplates.js +4 -2
  19. package/dist/esm/templates/editorTemplates.js.map +1 -1
  20. package/dist/esm/templates/listTemplates.d.ts.map +1 -1
  21. package/dist/esm/templates/listTemplates.js +10 -1
  22. package/dist/esm/templates/listTemplates.js.map +1 -1
  23. package/dist/esm/templates/nesting.js +6 -3
  24. package/dist/esm/templates/nesting.js.map +1 -1
  25. package/dist/esm/templates/workspaceTemplates.js +4 -2
  26. package/dist/esm/templates/workspaceTemplates.js.map +1 -1
  27. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  28. package/package.json +11 -11
  29. package/templates/commandTemplates.ts +2 -2
  30. package/templates/dialogTemplates.ts +3 -3
  31. package/templates/editorTemplates.ts +2 -2
  32. package/templates/listTemplates.ts +4 -4
  33. package/templates/nesting.ts +3 -3
  34. package/templates/workspaceTemplates.ts +2 -2
@@ -78,6 +78,9 @@ var templateProvenance = require('../templateProvenance.js');
78
78
  category: 'Business / Command',
79
79
  scopes: [
80
80
  scene_model.TemplateScope.Slice
81
+ ],
82
+ sliceKinds: [
83
+ scene_model.SliceKind.StateChange
81
84
  ]
82
85
  },
83
86
  displayName: 'Command form page',
@@ -1 +1 @@
1
- {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/**\n * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a\n * module behaves rather than one that records something. The header says what the settings govern, the\n * form follows the settings command, and the bar saves or discards.\n *\n * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog\n * would hide the module the reader is configuring.\n */\nexport const settingsPageTemplate: ScreenTemplate = {\n name: 'SettingsPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('settings-header', {\n title: 'Billing settings',\n subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',\n section: 'Billing',\n command: SampleBindingName.ChangeBillingSettings,\n }),\n ],\n [TemplateSlotName.Body]: [page('settings-body', '', [commandForm('settings-form', SampleBindingName.ChangeBillingSettings, ['billingId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('settings-actions', [\n toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),\n toolbarSeparator('settings-separator'),\n toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Settings', scopes: [TemplateScope.Module] },\n displayName: 'Settings page',\n description: \"A module's settings as a generated command form, with save and discard.\",\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate, settingsPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","displayName","description","settingsPageTemplate","ChangeBillingSettings","Module","commandTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAQ;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAAAA,gCAAAA,CAASP,yCAAiBC,MAAM,CAAA;YAAGM,gCAAAA,CAASP,wCAAAA,CAAiBE,IAAI,EAAE;gBAAEM,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,gCAAAA,CAASP,yCAAiBG,OAAO;SAAE,EA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A,yBAAAA,CAAcM;AAAO;AAAC,KAAA;IACpIJ,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMI,gBAAAA,GAAqC;AAACxC,IAAAA,uBAAAA;AAAyBqC,IAAAA;;;;;"}
1
+ {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope, SliceKind } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice], sliceKinds: [SliceKind.StateChange] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/**\n * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a\n * module behaves rather than one that records something. The header says what the settings govern, the\n * form follows the settings command, and the bar saves or discards.\n *\n * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog\n * would hide the module the reader is configuring.\n */\nexport const settingsPageTemplate: ScreenTemplate = {\n name: 'SettingsPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('settings-header', {\n title: 'Billing settings',\n subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',\n section: 'Billing',\n command: SampleBindingName.ChangeBillingSettings,\n }),\n ],\n [TemplateSlotName.Body]: [page('settings-body', '', [commandForm('settings-form', SampleBindingName.ChangeBillingSettings, ['billingId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('settings-actions', [\n toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),\n toolbarSeparator('settings-separator'),\n toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Settings', scopes: [TemplateScope.Module] },\n displayName: 'Settings page',\n description: \"A module's settings as a generated command form, with save and discard.\",\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate, settingsPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","sliceKinds","SliceKind","StateChange","displayName","description","settingsPageTemplate","ChangeBillingSettings","Module","commandTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAQ;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAAAA,gCAAAA,CAASP,yCAAiBC,MAAM,CAAA;YAAGM,gCAAAA,CAASP,wCAAAA,CAAiBE,IAAI,EAAE;gBAAEM,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,gCAAAA,CAASP,yCAAiBG,OAAO;SAAE,EAAE,EAAA;AACxI,KAAA;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BAAA;QAAuBC,MAAAA,EAAQ;AAACC,YAAAA,yBAAAA,CAAcS;AAAO;AAAC,KAAA;IACpIJ,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMI,gBAAAA,GAAqC;AAAC3C,IAAAA,uBAAAA;AAAyBwC,IAAAA;;;;;"}
@@ -56,7 +56,8 @@ var templateProvenance = require('../templateProvenance.js');
56
56
  displayName: 'Command dialog',
57
57
  description: 'A short capture whose confirm button submits the command and only closes when it succeeded.',
58
58
  metadata: {
59
- ...templateProvenance.componentsBlueprintTemplateProvenance
59
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
60
+ category: 'Business / Dialog'
60
61
  }
61
62
  };
62
63
  /**
@@ -87,7 +88,8 @@ var templateProvenance = require('../templateProvenance.js');
87
88
  displayName: 'Confirmation dialog',
88
89
  description: 'One question with the consequence spelled out, answered through Arc dialog context.',
89
90
  metadata: {
90
- ...templateProvenance.componentsBlueprintTemplateProvenance
91
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
92
+ category: 'Business / Dialog'
91
93
  }
92
94
  };
93
95
  /**
@@ -112,7 +114,8 @@ var templateProvenance = require('../templateProvenance.js');
112
114
  displayName: 'Busy dialog',
113
115
  description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.',
114
116
  metadata: {
115
- ...templateProvenance.componentsBlueprintTemplateProvenance
117
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
118
+ category: 'Business / Dialog'
116
119
  }
117
120
  };
118
121
  /** The dialog templates this blueprint provides. */ const componentsDialogTemplates = [
@@ -1 +1 @@
1
- {"version":3,"file":"dialogTemplates.js","sources":["../../../templates/dialogTemplates.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 { DialogTemplate } from '@cratis/scene.model';\nimport { TemplateSlotName } from '@cratis/scene.blueprint.default';\nimport { busyIndicatorDialog, commandDialog, dialog } from './dialogElements';\nimport { icon } from './elements';\nimport { calendarField, inputTextField, numberField, textAreaField } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The three dialog shapes an Arc application repeats: submit a command, confirm something destructive, and\n * say that something long-running is in flight.\n *\n * A dialog template has no `fitsSlot`, and that absence is the whole distinction from a screen template. A\n * screen template is *placed* - it fills a slot on whatever contains it, and the containment chain decides\n * where it appears. A dialog is *summoned*: it opens over the application from wherever the code that\n * opened it happens to be, so there is no parent slot for it to name.\n *\n * Every one of these declares exactly one slot, which is a real departure from how the default blueprint\n * builds its dialogs, and the reason is worth stating. The default blueprint composes a dialog out of\n * primitives - a title, a message, a row of buttons - because primitives are all it has. Here the library\n * ships whole dialogs that resolve their result through Arc's dialog context, so the frame, the title bar\n * and the buttons all belong to the composite. A template that declared `header` and `actions` slots would\n * be offering regions that render *outside* the modal, which is worse than not offering them: a screen\n * would fill them, and the content would appear somewhere nobody expected.\n */\n\n/**\n * A command dialog: a short capture whose confirm button is the command's execution.\n *\n * Worth reaching for instead of composing `dialog` with `commandForm`, because a hand-composed pair has no\n * way to keep the dialog open on a rejected command without reimplementing the protocol. This one submits,\n * feeds the backend's validation results back onto the fields, and only closes when the command succeeded.\n *\n * The fields are placed by hand rather than generated, which is the opposite choice from `CommandFormPage`\n * and deliberate. A dialog is a *short* capture: three or four properties chosen because they are the ones\n * a person can answer in an overlay. Generating every property of the command would turn an overlay into a\n * page, which is precisely the decision a dialog is supposed to have already made.\n */\nexport const commandDialogTemplate: DialogTemplate = {\n name: 'CommandDialog',\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n commandDialog('command-dialog', SampleBindingName.RecordAdjustment, 'Record an adjustment', 'Record', [\n numberField('command-dialog-amount', 'amount', 'Amount'),\n inputTextField('command-dialog-reason', 'reason', 'Reason', 'Damaged goods'),\n calendarField('command-dialog-effective', 'effective', 'Effective from'),\n textAreaField('command-dialog-note', 'note', 'Note', 3),\n ]),\n ],\n },\n displayName: 'Command dialog',\n description: 'A short capture whose confirm button submits the command and only closes when it succeeded.',\n metadata: { ...componentsBlueprintTemplateProvenance },\n};\n\n/**\n * A confirmation dialog: one question, the consequence spelled out, and a way back.\n *\n * The Arc-aware `dialog` rather than PrimeReact's, because a caller `await`s a `DialogResult` from it\n * instead of threading `visible` state and callbacks by hand - which is the difference between a\n * confirmation you can call from a handler and one you have to wire into a component's state.\n *\n * The confirm label says what will happen rather than `OK`. A confirmation whose buttons are `OK` and\n * `Cancel` makes the reader map the question onto the answer under time pressure, which is exactly when\n * they will get it wrong.\n */\nexport const confirmDialogTemplate: DialogTemplate = {\n name: 'ConfirmDialog',\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n dialog('confirm-dialog', 'Void this invoice?', 'Void it', 'Keep it', [\n icon('confirm-dialog-icon', 'pi pi-exclamation-triangle'),\n inputTextField('confirm-dialog-reason', 'reason', 'Why is it being voided?', 'Duplicate of INV-2041'),\n ]),\n ],\n },\n displayName: 'Confirmation dialog',\n description: 'One question with the consequence spelled out, answered through Arc dialog context.',\n metadata: { ...componentsBlueprintTemplateProvenance },\n};\n\n/**\n * A busy dialog: the blocking spinner shown while a long-running command is in flight.\n *\n * In a running application the Arc dialog host renders this, threading its own title and message through.\n * Shipping it as a template is what lets its wording be *designed* rather than discovered the first time an\n * operation takes a while - which is the only moment anyone ever sees it, and the worst possible moment to\n * be reading a sentence nobody wrote on purpose.\n */\nexport const busyDialogTemplate: DialogTemplate = {\n name: 'BusyDialog',\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n busyIndicatorDialog('busy-dialog', 'Recording the adjustment', 'The invoice will reappear as soon as the read model catches up.'),\n ],\n },\n displayName: 'Busy dialog',\n description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.',\n metadata: { ...componentsBlueprintTemplateProvenance },\n};\n\n/** The dialog templates this blueprint provides. */\nexport const componentsDialogTemplates: DialogTemplate[] = [commandDialogTemplate, confirmDialogTemplate, busyDialogTemplate];\n"],"names":["commandDialogTemplate","name","slots","TemplateSlotName","Body","content","commandDialog","SampleBindingName","RecordAdjustment","numberField","inputTextField","calendarField","textAreaField","displayName","description","metadata","componentsBlueprintTemplateProvenance","confirmDialogTemplate","dialog","icon","busyDialogTemplate","busyIndicatorDialog","componentsDialogTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BaA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,yCAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,wCAAAA,CAAiBC,IAAI,GAAG;AACrBE,YAAAA,4BAAAA,CAAc,gBAAA,EAAkBC,mCAAAA,CAAkBC,gBAAgB,EAAE,wBAAwB,QAAA,EAAU;AAClGC,gBAAAA,wBAAAA,CAAY,yBAAyB,QAAA,EAAU,QAAA,CAAA;gBAC/CC,2BAAAA,CAAe,uBAAA,EAAyB,UAAU,QAAA,EAAU,eAAA,CAAA;AAC5DC,gBAAAA,0BAAAA,CAAc,4BAA4B,WAAA,EAAa,gBAAA,CAAA;gBACvDC,0BAAAA,CAAc,qBAAA,EAAuB,QAAQ,MAAA,EAAQ,CAAA;AACxD,aAAA;AACJ;AACL,KAAA;IACAC,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa,6FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA;;;;;;;;;;UAWaC,qBAAAA,GAAwC;IACjDhB,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,yCAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,wCAAAA,CAAiBC,IAAI,GAAG;YACrBc,qBAAAA,CAAO,gBAAA,EAAkB,oBAAA,EAAsB,SAAA,EAAW,SAAA,EAAW;AACjEC,gBAAAA,aAAAA,CAAK,qBAAA,EAAuB,4BAAA,CAAA;gBAC5BT,2BAAAA,CAAe,uBAAA,EAAyB,UAAU,yBAAA,EAA2B,uBAAA;AAChF,aAAA;AACJ;AACL,KAAA;IACAG,WAAAA,EAAa,qBAAA;IACbC,WAAAA,EAAa,qFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA;;;;;;;UAQaI,kBAAAA,GAAqC;IAC9CnB,IAAAA,EAAM,YAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,yCAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,wCAAAA,CAAiBC,IAAI,GAAG;AACrBiB,YAAAA,kCAAAA,CAAoB,eAAe,0BAAA,EAA4B,iEAAA;AAClE;AACL,KAAA;IACAR,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,qGAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA,qDACO,MAAMM,yBAAAA,GAA8C;AAACtB,IAAAA,qBAAAA;AAAuBiB,IAAAA,qBAAAA;AAAuBG,IAAAA;;;;;;"}
1
+ {"version":3,"file":"dialogTemplates.js","sources":["../../../templates/dialogTemplates.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 { DialogTemplate } from '@cratis/scene.model';\nimport { TemplateSlotName } from '@cratis/scene.blueprint.default';\nimport { busyIndicatorDialog, commandDialog, dialog } from './dialogElements';\nimport { icon } from './elements';\nimport { calendarField, inputTextField, numberField, textAreaField } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The three dialog shapes an Arc application repeats: submit a command, confirm something destructive, and\n * say that something long-running is in flight.\n *\n * A dialog template has no `fitsSlot`, and that absence is the whole distinction from a screen template. A\n * screen template is *placed* - it fills a slot on whatever contains it, and the containment chain decides\n * where it appears. A dialog is *summoned*: it opens over the application from wherever the code that\n * opened it happens to be, so there is no parent slot for it to name.\n *\n * Every one of these declares exactly one slot, which is a real departure from how the default blueprint\n * builds its dialogs, and the reason is worth stating. The default blueprint composes a dialog out of\n * primitives - a title, a message, a row of buttons - because primitives are all it has. Here the library\n * ships whole dialogs that resolve their result through Arc's dialog context, so the frame, the title bar\n * and the buttons all belong to the composite. A template that declared `header` and `actions` slots would\n * be offering regions that render *outside* the modal, which is worse than not offering them: a screen\n * would fill them, and the content would appear somewhere nobody expected.\n */\n\n/**\n * A command dialog: a short capture whose confirm button is the command's execution.\n *\n * Worth reaching for instead of composing `dialog` with `commandForm`, because a hand-composed pair has no\n * way to keep the dialog open on a rejected command without reimplementing the protocol. This one submits,\n * feeds the backend's validation results back onto the fields, and only closes when the command succeeded.\n *\n * The fields are placed by hand rather than generated, which is the opposite choice from `CommandFormPage`\n * and deliberate. A dialog is a *short* capture: three or four properties chosen because they are the ones\n * a person can answer in an overlay. Generating every property of the command would turn an overlay into a\n * page, which is precisely the decision a dialog is supposed to have already made.\n */\nexport const commandDialogTemplate: DialogTemplate = {\n name: 'CommandDialog',\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n commandDialog('command-dialog', SampleBindingName.RecordAdjustment, 'Record an adjustment', 'Record', [\n numberField('command-dialog-amount', 'amount', 'Amount'),\n inputTextField('command-dialog-reason', 'reason', 'Reason', 'Damaged goods'),\n calendarField('command-dialog-effective', 'effective', 'Effective from'),\n textAreaField('command-dialog-note', 'note', 'Note', 3),\n ]),\n ],\n },\n displayName: 'Command dialog',\n description: 'A short capture whose confirm button submits the command and only closes when it succeeded.',\n metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Dialog' },\n};\n\n/**\n * A confirmation dialog: one question, the consequence spelled out, and a way back.\n *\n * The Arc-aware `dialog` rather than PrimeReact's, because a caller `await`s a `DialogResult` from it\n * instead of threading `visible` state and callbacks by hand - which is the difference between a\n * confirmation you can call from a handler and one you have to wire into a component's state.\n *\n * The confirm label says what will happen rather than `OK`. A confirmation whose buttons are `OK` and\n * `Cancel` makes the reader map the question onto the answer under time pressure, which is exactly when\n * they will get it wrong.\n */\nexport const confirmDialogTemplate: DialogTemplate = {\n name: 'ConfirmDialog',\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n dialog('confirm-dialog', 'Void this invoice?', 'Void it', 'Keep it', [\n icon('confirm-dialog-icon', 'pi pi-exclamation-triangle'),\n inputTextField('confirm-dialog-reason', 'reason', 'Why is it being voided?', 'Duplicate of INV-2041'),\n ]),\n ],\n },\n displayName: 'Confirmation dialog',\n description: 'One question with the consequence spelled out, answered through Arc dialog context.',\n metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Dialog' },\n};\n\n/**\n * A busy dialog: the blocking spinner shown while a long-running command is in flight.\n *\n * In a running application the Arc dialog host renders this, threading its own title and message through.\n * Shipping it as a template is what lets its wording be *designed* rather than discovered the first time an\n * operation takes a while - which is the only moment anyone ever sees it, and the worst possible moment to\n * be reading a sentence nobody wrote on purpose.\n */\nexport const busyDialogTemplate: DialogTemplate = {\n name: 'BusyDialog',\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n busyIndicatorDialog('busy-dialog', 'Recording the adjustment', 'The invoice will reappear as soon as the read model catches up.'),\n ],\n },\n displayName: 'Busy dialog',\n description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.',\n metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Dialog' },\n};\n\n/** The dialog templates this blueprint provides. */\nexport const componentsDialogTemplates: DialogTemplate[] = [commandDialogTemplate, confirmDialogTemplate, busyDialogTemplate];\n"],"names":["commandDialogTemplate","name","slots","TemplateSlotName","Body","content","commandDialog","SampleBindingName","RecordAdjustment","numberField","inputTextField","calendarField","textAreaField","displayName","description","metadata","componentsBlueprintTemplateProvenance","category","confirmDialogTemplate","dialog","icon","busyDialogTemplate","busyIndicatorDialog","componentsDialogTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;;;;;;;;;;;;UA8BaA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,yCAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,wCAAAA,CAAiBC,IAAI,GAAG;AACrBE,YAAAA,4BAAAA,CAAc,gBAAA,EAAkBC,mCAAAA,CAAkBC,gBAAgB,EAAE,wBAAwB,QAAA,EAAU;AAClGC,gBAAAA,wBAAAA,CAAY,yBAAyB,QAAA,EAAU,QAAA,CAAA;gBAC/CC,2BAAAA,CAAe,uBAAA,EAAyB,UAAU,QAAA,EAAU,eAAA,CAAA;AAC5DC,gBAAAA,0BAAAA,CAAc,4BAA4B,WAAA,EAAa,gBAAA,CAAA;gBACvDC,0BAAAA,CAAc,qBAAA,EAAuB,QAAQ,MAAA,EAAQ,CAAA;AACxD,aAAA;AACJ;AACL,KAAA;IACAC,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa,6FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,QAAAA,EAAU;AAAoB;AACxF;AAEA;;;;;;;;;;UAWaC,qBAAAA,GAAwC;IACjDjB,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,yCAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,wCAAAA,CAAiBC,IAAI,GAAG;YACrBe,qBAAAA,CAAO,gBAAA,EAAkB,oBAAA,EAAsB,SAAA,EAAW,SAAA,EAAW;AACjEC,gBAAAA,aAAAA,CAAK,qBAAA,EAAuB,4BAAA,CAAA;gBAC5BV,2BAAAA,CAAe,uBAAA,EAAyB,UAAU,yBAAA,EAA2B,uBAAA;AAChF,aAAA;AACJ;AACL,KAAA;IACAG,WAAAA,EAAa,qBAAA;IACbC,WAAAA,EAAa,qFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,QAAAA,EAAU;AAAoB;AACxF;AAEA;;;;;;;UAQaI,kBAAAA,GAAqC;IAC9CpB,IAAAA,EAAM,YAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,yCAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,wCAAAA,CAAiBC,IAAI,GAAG;AACrBkB,YAAAA,kCAAAA,CAAoB,eAAe,0BAAA,EAA4B,iEAAA;AAClE;AACL,KAAA;IACAT,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,qGAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,QAAAA,EAAU;AAAoB;AACxF;AAEA,qDACO,MAAMM,yBAAAA,GAA8C;AAACvB,IAAAA,qBAAAA;AAAuBkB,IAAAA,qBAAAA;AAAuBG,IAAAA;;;;;;"}
@@ -79,7 +79,8 @@ var templateProvenance = require('../templateProvenance.js');
79
79
  displayName: 'Schema editor page',
80
80
  description: "An event type's schema edited as a typed property tree, with the actions that evolve it.",
81
81
  metadata: {
82
- ...templateProvenance.componentsBlueprintTemplateProvenance
82
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
83
+ category: 'Business / Editor'
83
84
  }
84
85
  };
85
86
  /**
@@ -165,7 +166,8 @@ var templateProvenance = require('../templateProvenance.js');
165
166
  displayName: 'Object editor page',
166
167
  description: 'One document edited against its schema, with its navigation trail and its version history.',
167
168
  metadata: {
168
- ...templateProvenance.componentsBlueprintTemplateProvenance
169
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
170
+ category: 'Business / Editor'
169
171
  }
170
172
  };
171
173
  /** The two editor-shaped templates. */ const editorTemplates = [
@@ -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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance },\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 metadata: { ...componentsBlueprintTemplateProvenance },\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","metadata","componentsBlueprintTemplateProvenance","objectEditorPageTemplate","SidePanel","row","overrides","width","WidthSizeClass","Compact","query","SampleBindingName","InvoiceById","objectNavigationalBar","filterPanel","errorBoundary","objectContentEditor","timeMachine","editorTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;;;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,YA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A,EAAiB;gBAC3BC,KAAAA,EAAO,UAAA;gBACPC,QAAAA,EAAU,0DAAA;gBACVC,OAAAA,EAAS,SAAA;AACTiB,gBAAAA,KAAAA,EAAOC,oCAAkBC;AAC7B,aAAA;AACH,SAAA;QACD,CAAChC,wCAAAA,CAAiBE,OAAO,GAAG;YAAC+B,oCAAAA,CAAsB,cAAA,CAAA;AAAiBC,YAAAA,0BAAAA,CAAY,gBAAA,EAAkB,SAAA;AAAW,SAAA;QAC7G,CAAClC,wCAAAA,CAAiBG,IAAI,GAAG;AACrBgC,YAAAA,sBAAAA,CAAc,cAAA,EAAgB;AAAClB,gBAAAA,aAAAA,CAAK,eAAe,UAAA,EAAY;AAACmB,oBAAAA,kCAAAA,CAAoB,eAAA,EAAiB,IAAA;AAAM,iBAAA;AAAE,aAAA;AAChH,SAAA;QACD,CAACpC,wCAAAA,CAAiBwB,SAAS,GAAG;AAACP,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;gBAACoB,0BAAAA,CAAY,qBAAA;AAAuB,aAAA;AAAE;AAC3G,KAAA;IACAlB,WAAAA,EAAa,oBAAA;IACbC,WAAAA,EAAa,4FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA,wCACO,MAAMgB,eAAAA,GAAoC;AAAC5C,IAAAA,wBAAAA;AAA0B6B,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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Editor' },\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Editor' },\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","metadata","componentsBlueprintTemplateProvenance","category","objectEditorPageTemplate","SidePanel","row","overrides","width","WidthSizeClass","Compact","query","SampleBindingName","InvoiceById","objectNavigationalBar","filterPanel","errorBoundary","objectContentEditor","timeMachine","editorTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;;;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,EAAA;AACxI,KAAA;IACAC,OAAAA,EAA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B;AAACnB,gBAAAA,aAAAA,CAAK,eAAe,UAAA,EAAY;AAACoB,oBAAAA,kCAAAA,CAAoB,eAAA,EAAiB,IAAA;AAAM,iBAAA;AAAE,aAAA;AAChH,SAAA;QACD,CAACrC,wCAAAA,CAAiByB,SAAS,GAAG;AAACR,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;gBAACqB,0BAAAA,CAAY,qBAAA;AAAuB,aAAA;AAAE;AAC3G,KAAA;IACAnB,WAAAA,EAAa,oBAAA;IACbC,WAAAA,EAAa,4FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,QAAAA,EAAU;AAAoB;AACxF;AAEA,wCACO,MAAMgB,eAAAA,GAAoC;AAAC7C,IAAAA,wBAAAA;AAA0B8B,IAAAA;;;;;"}
@@ -70,6 +70,9 @@ var templateProvenance = require('../templateProvenance.js');
70
70
  category: 'Business / List',
71
71
  scopes: [
72
72
  scene_model.TemplateScope.Slice
73
+ ],
74
+ sliceKinds: [
75
+ scene_model.SliceKind.StateView
73
76
  ]
74
77
  },
75
78
  displayName: 'Data list page',
@@ -115,6 +118,9 @@ var templateProvenance = require('../templateProvenance.js');
115
118
  category: 'Business / Live operations',
116
119
  scopes: [
117
120
  scene_model.TemplateScope.Slice
121
+ ],
122
+ sliceKinds: [
123
+ scene_model.SliceKind.StateView
118
124
  ]
119
125
  },
120
126
  displayName: 'Observable data list page',
@@ -194,6 +200,9 @@ var templateProvenance = require('../templateProvenance.js');
194
200
  category: 'Business / Master detail',
195
201
  scopes: [
196
202
  scene_model.TemplateScope.Slice
203
+ ],
204
+ sliceKinds: [
205
+ scene_model.SliceKind.StateView
197
206
  ]
198
207
  },
199
208
  displayName: 'Data list with detail page',
@@ -1 +1 @@
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, TemplateScope, 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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance, type: 'List', category: 'Business / List', scopes: [TemplateScope.Slice] },\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 metadata: { ...componentsBlueprintTemplateProvenance, type: 'List', category: 'Business / Live operations', scopes: [TemplateScope.Slice] },\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 metadata: { ...componentsBlueprintTemplateProvenance, type: 'Detail', category: 'Business / Master detail', scopes: [TemplateScope.Slice] },\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","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","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;AAUA;;;;;;;;;;;;;;;;;;;;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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U,+CAAA;gBACVC,OAAAA,EAAS,SAAA;AACTC,gBAAAA,KAAAA,EAAOC,oCAAkBC;AAC7B,aAAA;AACH,SAAA;QACD,CAACV,wCAAAA,CAAiBE,IAAI,GAAG;AAACa,YAAAA,qBAAAA,CAAS,kBAAA,EAAoBN,mCAAAA,CAAkBC,WAAW,EAAEM,gCAAAA,EAAqBC,2BAAAA;AAAgB,SAAA;QAC3H,CAACjB,wCAAAA,CAAiBgC,SAAS,GAAG;AAC1BH,YAAAA,aAAAA,CAAK,qBAAqB,kBAAA,EAAoB;gBAC1Cc,oCAAAA,CAAsB,mBAAA,CAAA;AACtBC,gBAAAA,kCAAAA,CAAoB,sBAAA,EAAwB,KAAA,CAAA;gBAC5CC,0BAAAA,CAAY,qBAAA;AACf,aAAA;AACJ;AACL,KAAA;IACA3B,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,IAAAA,EAAM,QAAA;QAAUC,QAAAA,EAAU,0BAAA;QAA4BC,MAAAA,EAAQ;AAACC,YAAAA,yBAAAA,CAAcC;AAAM;AAAC,KAAA;IAC1IC,WAAAA,EAAa,4BAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMoB,aAAAA,GAAkC;AAACpD,IAAAA,oBAAAA;AAAsBiC,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, TemplateScope, SliceKind, 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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance, type: 'List', category: 'Business / List', scopes: [TemplateScope.Slice], sliceKinds: [SliceKind.StateView] },\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 metadata: { ...componentsBlueprintTemplateProvenance, type: 'List', category: 'Business / Live operations', scopes: [TemplateScope.Slice], sliceKinds: [SliceKind.StateView] },\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 metadata: { ...componentsBlueprintTemplateProvenance, type: 'Detail', category: 'Business / Master detail', scopes: [TemplateScope.Slice], sliceKinds: [SliceKind.StateView] },\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","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","sliceKinds","SliceKind","StateView","displayName","description","observableDataListPageTemplate","InvoicesInFlight","page","observableDataTable","dataListWithDetailPageTemplate","SidePanel","arrangement","root","column","slotLeaf","row","grow","overrides","width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gBAAAA,KAAAA,EAAOC,oCAAkBC;AAC7B,aAAA;AACH,SAAA;QACD,CAACV,wCAAAA,CAAiBE,IAAI,GAAG;AAACa,YAAAA,qBAAAA,CAAS,kBAAA,EAAoBN,mCAAAA,CAAkBC,WAAW,EAAEM,gCAAAA,EAAqBC,2BAAAA;AAAgB,SAAA;QAC3H,CAACjB,wCAAAA,CAAiBmC,SAAS,GAAG;AAC1BH,YAAAA,aAAAA,CAAK,qBAAqB,kBAAA,EAAoB;gBAC1Cc,oCAAAA,CAAsB,mBAAA,CAAA;AACtBC,gBAAAA,kCAAAA,CAAoB,sBAAA,EAAwB,KAAA,CAAA;gBAC5CC,0BAAAA,CAAY,qBAAA;AACf,aAAA;AACJ;AACL,KAAA;IACA9B,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,IAAAA,EAAM,QAAA;QAAUC,QAAAA,EAAU,0BAAA;QAA4BC,MAAAA,EAAQ;AAACC,YAAAA,yBAAAA,CAAcC;AAAM,SAAA;QAAEC,UAAAA,EAAY;AAACC,YAAAA,qBAAAA,CAAUC;AAAU;AAAC,KAAA;IAC7KC,WAAAA,EAAa,4BAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMoB,aAAAA,GAAkC;AAACvD,IAAAA,oBAAAA;AAAsBoC,IAAAA,8BAAAA;AAAgCI,IAAAA;;;;;;"}
@@ -63,7 +63,8 @@ var templateProvenance = require('../templateProvenance.js');
63
63
  displayName: 'Data module page',
64
64
  description: 'Module level: fits the application layout content slot and offers a body for one feature.',
65
65
  metadata: {
66
- ...templateProvenance.componentsBlueprintTemplateProvenance
66
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
67
+ category: 'Business / Workspace'
67
68
  }
68
69
  };
69
70
  /**
@@ -104,7 +105,8 @@ var templateProvenance = require('../templateProvenance.js');
104
105
  displayName: 'Data feature section',
105
106
  description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.',
106
107
  metadata: {
107
- ...templateProvenance.componentsBlueprintTemplateProvenance
108
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
109
+ category: 'Business / Section'
108
110
  }
109
111
  };
110
112
  /**
@@ -144,7 +146,8 @@ var templateProvenance = require('../templateProvenance.js');
144
146
  displayName: 'Command slice section',
145
147
  description: 'Slice level: fits a feature section primary slot and hosts one command behavior.',
146
148
  metadata: {
147
- ...templateProvenance.componentsBlueprintTemplateProvenance
149
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
150
+ category: 'Business / Section'
148
151
  }
149
152
  };
150
153
  /** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */ const nestingChainTemplates = [
@@ -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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance },\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 metadata: { ...componentsBlueprintTemplateProvenance },\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 metadata: { ...componentsBlueprintTemplateProvenance },\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","metadata","componentsBlueprintTemplateProvenance","dataFeatureSectionTemplate","Toolbar","Primary","Secondary","toolbar","toolbarButton","toolbarSeparator","observableDataTable","SampleBindingName","InvoicesInFlight","invoiceTableOptions","invoiceColumns","commandSliceSectionTemplate","Actions","command","RecordAdjustment","nestingChainTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAUA;;;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c,cAAA,EAAgB,wBAAwB,aAAA,EAAe,QAAA,CAAA;gBACrEA,sBAAAA,CAAc,cAAA,EAAgB,8BAA8B,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAT,WAAAA,EAAa,uBAAA;IACbC,WAAAA,EAAa,kFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA,mGACO,MAAMiB,qBAAAA,GAA0C;AAACrC,IAAAA,sBAAAA;AAAwBqB,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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Workspace' },\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Section' },\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Section' },\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","metadata","componentsBlueprintTemplateProvenance","category","dataFeatureSectionTemplate","Toolbar","Primary","Secondary","toolbar","toolbarButton","toolbarSeparator","observableDataTable","SampleBindingName","InvoicesInFlight","invoiceTableOptions","invoiceColumns","commandSliceSectionTemplate","Actions","command","RecordAdjustment","nestingChainTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;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BAAAA,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;IACAV,WAAAA,EAAa,uBAAA;IACbC,WAAAA,EAAa,kFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,QAAAA,EAAU;AAAqB;AACzF;AAEA,mGACO,MAAMiB,qBAAAA,GAA0C;AAACtC,IAAAA,sBAAAA;AAAwBsB,IAAAA,0BAAAA;AAA4BY,IAAAA;;;;;;"}
@@ -119,7 +119,8 @@ var templateProvenance = require('../templateProvenance.js');
119
119
  displayName: 'Master-detail page',
120
120
  description: 'A queried list in the larger column with the selected record and its history in the narrower one.',
121
121
  metadata: {
122
- ...templateProvenance.componentsBlueprintTemplateProvenance
122
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
123
+ category: 'Business / Master detail'
123
124
  }
124
125
  };
125
126
  /**
@@ -205,7 +206,8 @@ var templateProvenance = require('../templateProvenance.js');
205
206
  displayName: 'Dashboard page',
206
207
  description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',
207
208
  metadata: {
208
- ...templateProvenance.componentsBlueprintTemplateProvenance
209
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
210
+ category: 'Business / Dashboard'
209
211
  }
210
212
  };
211
213
  /** The two workspace-shaped templates. */ const workspaceTemplates = [
@@ -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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance },\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 metadata: { ...componentsBlueprintTemplateProvenance },\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","metadata","componentsBlueprintTemplateProvenance","dashboardPageTemplate","Stats","RevenueByMonth","observableDataTable","InvoicesInFlight","OpenTickets","AllAdjustments","adjustmentColumns","workspaceTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AAYA;;;;;;;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;AAED,uDACA,MAAMC,aAAAA,GAAoC;AACtC,IAAA;QAAEF,KAAAA,EAAO,WAAA;QAAaC,MAAAA,EAAQ;AAAY,KAAA;AAC1C,IAAA;QAAED,KAAAA,EAAO,SAAA;QAAWC,MAAAA,EAAQ;AAAU,KAAA;AACtC,IAAA;QAAED,KAAAA,EAAO,KAAA;QAAOC,MAAAA,EAAQ;AAAM;AACjC,CAAA;AAED,8FACA,MAAME,kBAAAA,GAAmC;IAAEC,YAAAA,EAAc,qBAAA;IAAuBC,OAAAA,EAAS;AAAK,CAAA;AAE9F;;;;;;;;;;;UAYaC,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;AAAU;AAAE,KAAA;IACpHC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAA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A;AAClG,aAAA;AACJ;AACL,KAAA;IACAX,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa,6FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA,2CACO,MAAMS,kBAAAA,GAAuC;AAAC9C,IAAAA,wBAAAA;AAA0BsC,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';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Master detail' },\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 metadata: { ...componentsBlueprintTemplateProvenance, category: 'Business / Dashboard' },\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","metadata","componentsBlueprintTemplateProvenance","category","dashboardPageTemplate","Stats","RevenueByMonth","observableDataTable","InvoicesInFlight","OpenTickets","AllAdjustments","adjustmentColumns","workspaceTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AAYA;;;;;;;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;AAED,uDACA,MAAMC,aAAAA,GAAoC;AACtC,IAAA;QAAEF,KAAAA,EAAO,WAAA;QAAaC,MAAAA,EAAQ;AAAY,KAAA;AAC1C,IAAA;QAAED,KAAAA,EAAO,SAAA;QAAWC,MAAAA,EAAQ;AAAU,KAAA;AACtC,IAAA;QAAED,KAAAA,EAAO,KAAA;QAAOC,MAAAA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AAA,EAAgB;AAC3CC,gBAAAA,sBAAAA,CAAU,8BAAA,EAAgCH,mCAAAA,CAAkBkB,WAAW,EAAE/C,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,CAAkBmB,cAAc,EAAEhD,kBAAAA,EAAoBiD,8BAAAA;AAClG,aAAA;AACJ;AACL,KAAA;IACAZ,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa,6FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,QAAAA,EAAU;AAAuB;AAC3F;AAEA,2CACO,MAAMS,kBAAAA,GAAuC;AAAC/C,IAAAA,wBAAAA;AAA0BuC,IAAAA;;;;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"commandTemplates.d.ts","sourceRoot":"","sources":["../../../templates/commandTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AA0BpE,eAAO,MAAM,uBAAuB,EAAE,cA4BrC,CAAC;AAUF,eAAO,MAAM,oBAAoB,EAAE,cA4BlC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAAoD,CAAC"}
1
+ {"version":3,"file":"commandTemplates.d.ts","sourceRoot":"","sources":["../../../templates/commandTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAA4B,MAAM,qBAAqB,CAAC;AA0B/E,eAAO,MAAM,uBAAuB,EAAE,cA4BrC,CAAC;AAUF,eAAO,MAAM,oBAAoB,EAAE,cA4BlC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAAoD,CAAC"}
@@ -1,4 +1,4 @@
1
- import { TemplateScope } from '@cratis/scene.model';
1
+ import { SliceKind, TemplateScope } from '@cratis/scene.model';
2
2
  import { TemplateSlotName, column, slotLeaf, SlotName } from '@cratis/scene.blueprint.default';
3
3
  import { toolbar, toolbarButton, toolbarSeparator, page, arcPageHeader } from './elements.js';
4
4
  import { commandForm } from './formElements.js';
@@ -76,6 +76,9 @@ import { componentsBlueprintTemplateProvenance } from '../templateProvenance.js'
76
76
  category: 'Business / Command',
77
77
  scopes: [
78
78
  TemplateScope.Slice
79
+ ],
80
+ sliceKinds: [
81
+ SliceKind.StateChange
79
82
  ]
80
83
  },
81
84
  displayName: 'Command form page',
@@ -1 +1 @@
1
- {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/**\n * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a\n * module behaves rather than one that records something. The header says what the settings govern, the\n * form follows the settings command, and the bar saves or discards.\n *\n * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog\n * would hide the module the reader is configuring.\n */\nexport const settingsPageTemplate: ScreenTemplate = {\n name: 'SettingsPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('settings-header', {\n title: 'Billing settings',\n subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',\n section: 'Billing',\n command: SampleBindingName.ChangeBillingSettings,\n }),\n ],\n [TemplateSlotName.Body]: [page('settings-body', '', [commandForm('settings-form', SampleBindingName.ChangeBillingSettings, ['billingId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('settings-actions', [\n toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),\n toolbarSeparator('settings-separator'),\n toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Settings', scopes: [TemplateScope.Module] },\n displayName: 'Settings page',\n description: \"A module's settings as a generated command form, with save and discard.\",\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate, settingsPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","displayName","description","settingsPageTemplate","ChangeBillingSettings","Module","commandTemplates"],"mappings":";;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,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AA,EAAiB,qBAAqB,YAAA,EAAc,MAAA,CAAA;gBAClEC,gBAAAA,CAAiB,oBAAA,CAAA;gBACjBD,aAAAA,CAAc,kBAAA,EAAoB,mBAAmB,YAAA,EAAc,SAAA;AACtE,aAAA;AACJ;AACL,KAAA;IACAE,QAAAA,EAAU;AAAE,QAAA,GAAGC,qCAAqC;QAAEC,IAAAA,EAAM,MAAA;QAAQC,QAAAA,EAAU,qBAAA;QAAuBC,MAAAA,EAAQ;AAACC,YAAAA,aAAAA,CAAcM;AAAO;AAAC,KAAA;IACpIJ,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMI,gBAAAA,GAAqC;AAACxC,IAAAA,uBAAAA;AAAyBqC,IAAAA;;;"}
1
+ {"version":3,"file":"commandTemplates.js","sources":["../../../templates/commandTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope, SliceKind } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice], sliceKinds: [SliceKind.StateChange] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/**\n * A settings page - the same generated-form shape as `CommandFormPage`, for the command that changes how a\n * module behaves rather than one that records something. The header says what the settings govern, the\n * form follows the settings command, and the bar saves or discards.\n *\n * Settings are a page of their own rather than a dialog because they are visited, read and left; a dialog\n * would hide the module the reader is configuring.\n */\nexport const settingsPageTemplate: ScreenTemplate = {\n name: 'SettingsPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('settings-header', {\n title: 'Billing settings',\n subtitle: 'Payment terms, reminders and numbering for every invoice the module registers',\n section: 'Billing',\n command: SampleBindingName.ChangeBillingSettings,\n }),\n ],\n [TemplateSlotName.Body]: [page('settings-body', '', [commandForm('settings-form', SampleBindingName.ChangeBillingSettings, ['billingId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('settings-actions', [\n toolbarButton('settings-save', 'Save the settings', 'pi pi-save', 'Save'),\n toolbarSeparator('settings-separator'),\n toolbarButton('settings-discard', 'Discard changes', 'pi pi-undo', 'Discard'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Settings', scopes: [TemplateScope.Module] },\n displayName: 'Settings page',\n description: \"A module's settings as a generated command form, with save and discard.\",\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate, settingsPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","sliceKinds","SliceKind","StateChange","displayName","description","settingsPageTemplate","ChangeBillingSettings","Module","commandTemplates"],"mappings":";;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAi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AAc,eAAA,EAAiB,qBAAqB,YAAA,EAAc,MAAA,CAAA;gBAClEC,gBAAAA,CAAiB,oBAAA,CAAA;gBACjBD,aAAAA,CAAc,kBAAA,EAAoB,mBAAmB,YAAA,EAAc,SAAA;AACtE,aAAA;AACJ;AACL,KAAA;IACAE,QAAAA,EAAU;AAAE,QAAA,GAAGC,qCAAqC;QAAEC,IAAAA,EAAM,MAAA;QAAQC,QAAAA,EAAU,qBAAA;QAAuBC,MAAAA,EAAQ;AAACC,YAAAA,aAAAA,CAAcS;AAAO;AAAC,KAAA;IACpIJ,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMI,gBAAAA,GAAqC;AAAC3C,IAAAA,uBAAAA;AAAyBwC,IAAAA;;;"}
@@ -54,7 +54,8 @@ import { componentsBlueprintTemplateProvenance } from '../templateProvenance.js'
54
54
  displayName: 'Command dialog',
55
55
  description: 'A short capture whose confirm button submits the command and only closes when it succeeded.',
56
56
  metadata: {
57
- ...componentsBlueprintTemplateProvenance
57
+ ...componentsBlueprintTemplateProvenance,
58
+ category: 'Business / Dialog'
58
59
  }
59
60
  };
60
61
  /**
@@ -85,7 +86,8 @@ import { componentsBlueprintTemplateProvenance } from '../templateProvenance.js'
85
86
  displayName: 'Confirmation dialog',
86
87
  description: 'One question with the consequence spelled out, answered through Arc dialog context.',
87
88
  metadata: {
88
- ...componentsBlueprintTemplateProvenance
89
+ ...componentsBlueprintTemplateProvenance,
90
+ category: 'Business / Dialog'
89
91
  }
90
92
  };
91
93
  /**
@@ -110,7 +112,8 @@ import { componentsBlueprintTemplateProvenance } from '../templateProvenance.js'
110
112
  displayName: 'Busy dialog',
111
113
  description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.',
112
114
  metadata: {
113
- ...componentsBlueprintTemplateProvenance
115
+ ...componentsBlueprintTemplateProvenance,
116
+ category: 'Business / Dialog'
114
117
  }
115
118
  };
116
119
  /** The dialog templates this blueprint provides. */ const componentsDialogTemplates = [