@cratis/scene.blueprint.components 4.11.0 → 4.13.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 (52) hide show
  1. package/dist/cjs/index.js +2 -0
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/cjs/templateProvenance.js +35 -0
  4. package/dist/cjs/templateProvenance.js.map +1 -0
  5. package/dist/cjs/templates/commandTemplates.js +2 -0
  6. package/dist/cjs/templates/commandTemplates.js.map +1 -1
  7. package/dist/cjs/templates/dialogTemplates.js +13 -3
  8. package/dist/cjs/templates/dialogTemplates.js.map +1 -1
  9. package/dist/cjs/templates/editorTemplates.js +9 -2
  10. package/dist/cjs/templates/editorTemplates.js.map +1 -1
  11. package/dist/cjs/templates/listTemplates.js +4 -0
  12. package/dist/cjs/templates/listTemplates.js.map +1 -1
  13. package/dist/cjs/templates/nesting.js +13 -3
  14. package/dist/cjs/templates/nesting.js.map +1 -1
  15. package/dist/cjs/templates/workspaceTemplates.js +9 -2
  16. package/dist/cjs/templates/workspaceTemplates.js.map +1 -1
  17. package/dist/esm/index.d.ts +1 -0
  18. package/dist/esm/index.d.ts.map +1 -1
  19. package/dist/esm/index.js +1 -0
  20. package/dist/esm/index.js.map +1 -1
  21. package/dist/esm/templateProvenance.d.ts +3 -0
  22. package/dist/esm/templateProvenance.d.ts.map +1 -0
  23. package/dist/esm/templateProvenance.js +33 -0
  24. package/dist/esm/templateProvenance.js.map +1 -0
  25. package/dist/esm/templates/commandTemplates.d.ts.map +1 -1
  26. package/dist/esm/templates/commandTemplates.js +2 -0
  27. package/dist/esm/templates/commandTemplates.js.map +1 -1
  28. package/dist/esm/templates/dialogTemplates.d.ts.map +1 -1
  29. package/dist/esm/templates/dialogTemplates.js +13 -3
  30. package/dist/esm/templates/dialogTemplates.js.map +1 -1
  31. package/dist/esm/templates/editorTemplates.d.ts.map +1 -1
  32. package/dist/esm/templates/editorTemplates.js +9 -2
  33. package/dist/esm/templates/editorTemplates.js.map +1 -1
  34. package/dist/esm/templates/listTemplates.d.ts.map +1 -1
  35. package/dist/esm/templates/listTemplates.js +4 -0
  36. package/dist/esm/templates/listTemplates.js.map +1 -1
  37. package/dist/esm/templates/nesting.d.ts.map +1 -1
  38. package/dist/esm/templates/nesting.js +13 -3
  39. package/dist/esm/templates/nesting.js.map +1 -1
  40. package/dist/esm/templates/workspaceTemplates.d.ts.map +1 -1
  41. package/dist/esm/templates/workspaceTemplates.js +9 -2
  42. package/dist/esm/templates/workspaceTemplates.js.map +1 -1
  43. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  44. package/index.ts +1 -0
  45. package/package.json +11 -11
  46. package/templateProvenance.ts +25 -0
  47. package/templates/commandTemplates.ts +2 -1
  48. package/templates/dialogTemplates.ts +4 -0
  49. package/templates/editorTemplates.ts +3 -0
  50. package/templates/listTemplates.ts +4 -3
  51. package/templates/nesting.ts +4 -0
  52. package/templates/workspaceTemplates.ts +3 -0
package/dist/cjs/index.js CHANGED
@@ -30,6 +30,7 @@ var GalleryScreenPreview = require('./gallery/GalleryScreenPreview.js');
30
30
  var DialogTemplatePreview = require('./gallery/DialogTemplatePreview.js');
31
31
  var componentsBlueprintComponents = require('./componentsBlueprintComponents.js');
32
32
  var componentsBlueprint = require('./componentsBlueprint.js');
33
+ var templateProvenance = require('./templateProvenance.js');
33
34
 
34
35
 
35
36
 
@@ -119,4 +120,5 @@ exports.DialogTemplatePreview = DialogTemplatePreview.DialogTemplatePreview;
119
120
  exports.componentsBlueprintComponents = componentsBlueprintComponents.componentsBlueprintComponents;
120
121
  exports.componentsBlueprint = componentsBlueprint.componentsBlueprint;
121
122
  exports.componentsBlueprintManifest = componentsBlueprint.componentsBlueprintManifest;
123
+ exports.componentsBlueprintTemplateProvenance = templateProvenance.componentsBlueprintTemplateProvenance;
122
124
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,35 @@
1
+ 'use strict';
2
+
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * The compatibility, attribution and license metadata every template this blueprint ships carries.
7
+ *
8
+ * Templates are written against the Scene model that introduced template provenance, against the default
9
+ * blueprint whose shell and slots they fill, and against the Cratis Components composites they are built from -
10
+ * the same dependencies the manifest declares. `describeTemplateCatalog` checks every template against them,
11
+ * and this package's specs prove each one comes out compatible.
12
+ */ const componentsBlueprintTemplateProvenance = {
13
+ compatibility: {
14
+ scene: '^4.13.0',
15
+ packages: [
16
+ {
17
+ name: 'Cratis.Blueprint.Default',
18
+ versionRange: '^1.0.0'
19
+ },
20
+ {
21
+ name: 'Cratis.Components',
22
+ versionRange: '^3.0.0'
23
+ }
24
+ ]
25
+ },
26
+ attribution: {
27
+ author: 'Cratis',
28
+ url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.components'
29
+ },
30
+ license: 'MIT',
31
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
32
+ };
33
+
34
+ exports.componentsBlueprintTemplateProvenance = componentsBlueprintTemplateProvenance;
35
+ //# sourceMappingURL=templateProvenance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateProvenance.js","sources":["../../templateProvenance.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 { TemplateMetadata } from '@cratis/scene.model';\n\n/**\n * The compatibility, attribution and license metadata every template this blueprint ships carries.\n *\n * Templates are written against the Scene model that introduced template provenance, against the default\n * blueprint whose shell and slots they fill, and against the Cratis Components composites they are built from -\n * the same dependencies the manifest declares. `describeTemplateCatalog` checks every template against them,\n * and this package's specs prove each one comes out compatible.\n */\nexport const componentsBlueprintTemplateProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'> = {\n compatibility: {\n scene: '^4.13.0',\n packages: [\n { name: 'Cratis.Blueprint.Default', versionRange: '^1.0.0' },\n { name: 'Cratis.Components', versionRange: '^3.0.0' },\n ],\n },\n attribution: { author: 'Cratis', url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.components' },\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n"],"names":["componentsBlueprintTemplateProvenance","compatibility","scene","packages","name","versionRange","attribution","author","url","license","licenseUrl"],"mappings":";;AAAA;AACA;AAIA;;;;;;;UAQaA,qCAAAA,GAA4H;IACrIC,aAAAA,EAAe;QACXC,KAAAA,EAAO,SAAA;QACPC,QAAAA,EAAU;AACN,YAAA;gBAAEC,IAAAA,EAAM,0BAAA;gBAA4BC,YAAAA,EAAc;AAAS,aAAA;AAC3D,YAAA;gBAAED,IAAAA,EAAM,mBAAA;gBAAqBC,YAAAA,EAAc;AAAS;AACvD;AACL,KAAA;IACAC,WAAAA,EAAa;QAAEC,MAAAA,EAAQ,QAAA;QAAUC,GAAAA,EAAK;AAAmF,KAAA;IACzHC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;;"}
@@ -5,6 +5,7 @@ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
5
  var elements = require('./elements.js');
6
6
  var formElements = require('./formElements.js');
7
7
  var SampleBindingName = require('./SampleBindingName.js');
8
+ var templateProvenance = require('../templateProvenance.js');
8
9
 
9
10
  // Copyright (c) Cratis. All rights reserved.
10
11
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -72,6 +73,7 @@ var SampleBindingName = require('./SampleBindingName.js');
72
73
  ]
73
74
  },
74
75
  metadata: {
76
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
75
77
  type: 'Form',
76
78
  category: 'Business / Command',
77
79
  scopes: [
@@ -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';\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: { type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","type","category","scopes","TemplateScope","Slice","displayName","description","commandTemplates"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;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,YAA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../templates/commandTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { commandForm } from './formElements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { componentsBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The write side: a page whose body is one command, and whose action bar submits it.\n */\n\n/**\n * A command form page - a header, the generated form, and the bar that closes it.\n *\n * The form is `commandForm`, which is `AutoCommandForm`: it reads the command's own property descriptors\n * and picks a field component per property type. That is the whole reason a *template* can ship a form at\n * all. A template that listed fields by hand would be a snapshot of a command as it looked the day the\n * template was written, and would go quietly wrong the first time a property was added on the backend.\n * This one follows the command, which is the same guarantee Arc's generated proxies give everywhere else.\n *\n * `exclude` names the properties the form should not generate. `invoiceId` is excluded because it is the\n * event-source identity - Arc resolves it, and a form offering to type it in is offering to break it.\n *\n * The action bar is the template's rather than the form's, and it declares its own slot for that reason: a\n * screen replacing \"Register\" with \"Register and approve\" should not have to replace the form.\n */\nexport const commandFormPageTemplate: ScreenTemplate = {\n name: 'CommandFormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('command-form-header', {\n title: 'Register an invoice',\n subtitle: 'The form follows the command, so a property added on the backend shows up here',\n section: 'Billing',\n command: SampleBindingName.RegisterInvoice,\n }),\n ],\n [TemplateSlotName.Body]: [page('command-form-body', '', [commandForm('command-form', SampleBindingName.RegisterInvoice, ['invoiceId'])])],\n [TemplateSlotName.Actions]: [\n toolbar('command-form-actions', [\n toolbarButton('command-form-submit', 'Register the invoice', 'pi pi-check', 'Register'),\n toolbarSeparator('command-form-separator'),\n toolbarButton('command-form-cancel', 'Discard and go back', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },\n displayName: 'Command form page',\n description: 'A generated command form under a header that states the command, with its own action bar.',\n};\n\n/** The command-shaped templates. */\nexport const commandTemplates: ScreenTemplate[] = [commandFormPageTemplate];\n"],"names":["commandFormPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","Actions","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","command","SampleBindingName","RegisterInvoice","page","commandForm","toolbar","toolbarButton","toolbarSeparator","metadata","componentsBlueprintTemplateProvenance","type","category","scopes","TemplateScope","Slice","displayName","description","commandTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAQ;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAAAA,gCAAAA,CAASP,yCAAiBC,MAAM,CAAA;YAAGM,gCAAAA,CAASP,wCAAAA,CAAiBE,IAAI,EAAE;gBAAEM,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,gCAAAA,CAASP,yCAAiBG,OAAO;SAAE,EAAE,EAAA;AACxI,KAAA;IACAM,OAAAA,EAAS;QACL,CAACT,wCAAAA,CAAiBC,MAAM,GAAG;AACvBS,YAAAA,sBAAAA,CAAc,qBAAA,EAAuB;gBACjCC,KAAAA,EAAO,qBAAA;gBACPC,QAAAA,EAAU,gFAAA;gBACVC,OAAAA,EAAS,SAAA;AACTC,gBAAAA,OAAAA,EAASC,oCAAkBC;AAC/B,aAAA;AACH,SAAA;QACD,CAAChB,wCAAAA,CAAiBE,IAAI,GAAG;AAACe,YAAAA,aAAAA,CAAK,qBAAqB,EAAA,EAAI;gBAACC,wBAAAA,CAAY,cAAA,EAAgBH,mCAAAA,CAAkBC,eAAe,EAAE;AAAC,oBAAA;AAAY,iBAAA;AAAE,aAAA;AAAE,SAAA;QACzI,CAAChB,wCAAAA,CAAiBG,OAAO,GAAG;AACxBgB,YAAAA,gBAAAA,CAAQ,sBAAA,EAAwB;gBAC5BC,sBAAAA,CAAc,qBAAA,EAAuB,wBAAwB,aAAA,EAAe,UAAA,CAAA;gBAC5EC,yBAAAA,CAAiB,wBAAA,CAAA;gBACjBD,sBAAAA,CAAc,qBAAA,EAAuB,uBAAuB,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAE,QAAAA,EAAU;AAAE,QAAA,GAAGC,wDAAqC;QAAEC,IAAAA,EAAM,MAAA;QAAQC,QAAAA,EAAU,oBAAA;QAAsBC,MAAAA,EAAQ;AAACC,YAAAA,yBAAAA,CAAcC;AAAM;AAAC,KAAA;IAClIC,WAAAA,EAAa,mBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAMC,gBAAAA,GAAqC;AAACrC,IAAAA;;;;"}
@@ -5,6 +5,7 @@ var dialogElements = require('./dialogElements.js');
5
5
  var elements = require('./elements.js');
6
6
  var formElements = require('./formElements.js');
7
7
  var SampleBindingName = require('./SampleBindingName.js');
8
+ var templateProvenance = require('../templateProvenance.js');
8
9
 
9
10
  // Copyright (c) Cratis. All rights reserved.
10
11
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -53,7 +54,10 @@ var SampleBindingName = require('./SampleBindingName.js');
53
54
  ]
54
55
  },
55
56
  displayName: 'Command dialog',
56
- description: 'A short capture whose confirm button submits the command and only closes when it succeeded.'
57
+ description: 'A short capture whose confirm button submits the command and only closes when it succeeded.',
58
+ metadata: {
59
+ ...templateProvenance.componentsBlueprintTemplateProvenance
60
+ }
57
61
  };
58
62
  /**
59
63
  * A confirmation dialog: one question, the consequence spelled out, and a way back.
@@ -81,7 +85,10 @@ var SampleBindingName = require('./SampleBindingName.js');
81
85
  ]
82
86
  },
83
87
  displayName: 'Confirmation dialog',
84
- description: 'One question with the consequence spelled out, answered through Arc dialog context.'
88
+ description: 'One question with the consequence spelled out, answered through Arc dialog context.',
89
+ metadata: {
90
+ ...templateProvenance.componentsBlueprintTemplateProvenance
91
+ }
85
92
  };
86
93
  /**
87
94
  * A busy dialog: the blocking spinner shown while a long-running command is in flight.
@@ -103,7 +110,10 @@ var SampleBindingName = require('./SampleBindingName.js');
103
110
  ]
104
111
  },
105
112
  displayName: 'Busy dialog',
106
- description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.'
113
+ description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.',
114
+ metadata: {
115
+ ...templateProvenance.componentsBlueprintTemplateProvenance
116
+ }
107
117
  };
108
118
  /** The dialog templates this blueprint provides. */ const componentsDialogTemplates = [
109
119
  commandDialogTemplate,
@@ -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';\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};\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};\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};\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","confirmDialogTemplate","dialog","icon","busyDialogTemplate","busyIndicatorD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GAAqC;IAC9CjB,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;AACrBe,YAAAA,kCAAAA,CAAoB,eAAe,0BAAA,EAA4B,iEAAA;AAClE;AACL,KAAA;IACAN,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qDACO,MAAMM,yBAAAA,GAA8C;AAACpB,IAAAA,qBAAAA;AAAuBe,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 },\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,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B,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;;;;;;"}
@@ -5,6 +5,7 @@ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
5
  var editorElements = require('./editorElements.js');
6
6
  var elements = require('./elements.js');
7
7
  var SampleBindingName = require('./SampleBindingName.js');
8
+ var templateProvenance = require('../templateProvenance.js');
8
9
 
9
10
  // Copyright (c) Cratis. All rights reserved.
10
11
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -76,7 +77,10 @@ var SampleBindingName = require('./SampleBindingName.js');
76
77
  ]
77
78
  },
78
79
  displayName: 'Schema editor page',
79
- description: "An event type's schema edited as a typed property tree, with the actions that evolve it."
80
+ description: "An event type's schema edited as a typed property tree, with the actions that evolve it.",
81
+ metadata: {
82
+ ...templateProvenance.componentsBlueprintTemplateProvenance
83
+ }
80
84
  };
81
85
  /**
82
86
  * The object editor page: one document, its trail, and its history beside it.
@@ -159,7 +163,10 @@ var SampleBindingName = require('./SampleBindingName.js');
159
163
  ]
160
164
  },
161
165
  displayName: 'Object editor page',
162
- description: 'One document edited against its schema, with its navigation trail and its version history.'
166
+ description: 'One document edited against its schema, with its navigation trail and its version history.',
167
+ metadata: {
168
+ ...templateProvenance.componentsBlueprintTemplateProvenance
169
+ }
163
170
  };
164
171
  /** The two editor-shaped templates. */ const editorTemplates = [
165
172
  schemaEditorPageTemplate,
@@ -1 +1 @@
1
- {"version":3,"file":"editorTemplates.js","sources":["../../../templates/editorTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, row, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { filterPanel, objectContentEditor, objectNavigationalBar, schemaEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, errorBoundary, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * The two inspection pages: one for a type's shape, one for an instance's content.\n *\n * These are the templates to open first when looking at this blueprint, because they are the two that\n * render completely with nothing registered. The schema editor, the document editor, the navigational bar\n * and the time machine all read their content out of the property bag rather than from a query, so a\n * preview of either page is a working page rather than a page of placeholders.\n *\n * That is not a trick to make a demo look better. It is the honest shape of the library: most of\n * `@cratis/components` is Arc-bound and needs a host, and a meaningful part of it is not. A blueprint built\n * on it should make both halves visible.\n */\n\n/**\n * The schema editor page: an event type's shape, edited as a typed property tree.\n *\n * Its header names no binding, and that is correct rather than an omission. A schema is design-time\n * metadata about an event type, not a read model anyone queries, so there is nothing for the header to be\n * bound to - and the header says `No binding` instead of implying a wiring step that does not exist. It is\n * the one page in this package where the unbound state is the finished state.\n *\n * `canEdit` is paired with `canNotEditReason` deliberately: in an event-sourced application a stored event\n * type's schema is very often deliberately locked, and saying why in the same place is what stops that\n * from reading as a bug.\n */\nexport const schemaEditorPageTemplate: ScreenTemplate = {\n name: 'SchemaEditorPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Toolbar), slotLeaf(TemplateSlotName.Body, { grow: 1 })], 16),\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('schema-header', {\n title: 'InvoiceRegistered',\n subtitle: 'The shape of the event, and what a new generation would be allowed to change',\n section: 'Event types',\n }),\n ],\n [TemplateSlotName.Toolbar]: [\n toolbar('schema-toolbar', [\n toolbarButton('schema-edit', 'Edit the schema', 'pi pi-pencil', 'Edit'),\n toolbarButton('schema-generation', 'Start a new generation', 'pi pi-clone', 'New generation'),\n toolbarSeparator('schema-separator'),\n toolbarButton('schema-download', 'Download as JSON Schema', 'pi pi-download'),\n ]),\n ],\n [TemplateSlotName.Body]: [\n page('schema-body', 'InvoiceRegistered', [schemaEditor('schema-editor', 'InvoiceRegistered', true)]),\n ],\n },\n displayName: 'Schema editor page',\n description: \"An event type's schema edited as a typed property tree, with the actions that evolve it.\",\n};\n\n/**\n * The object editor page: one document, its trail, and its history beside it.\n *\n * Bound to `InvoiceById`, because that is what a real page like this is: you arrive with an id, the query\n * fetches the record, and the editor renders it against its schema. The editors themselves take their\n * content from the property bag, so the page is fully legible before the query is wired - and the header\n * still says which query it is waiting for.\n *\n * The document is wrapped in an `errorBoundary` and the history is not, which is the decision this element\n * exists to let a template make. A malformed document should cost the document region; it should not take\n * the trail and the timeline down with it, and the timeline is the thing you would reach for to find out\n * *when* the document became malformed.\n */\nexport const objectEditorPageTemplate: ScreenTemplate = {\n name: 'ObjectEditorPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Toolbar },\n { name: TemplateSlotName.Body },\n { name: TemplateSlotName.SidePanel },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Toolbar),\n row([slotLeaf(TemplateSlotName.Body, { grow: 2 }), slotLeaf(TemplateSlotName.SidePanel, { grow: 1 })], 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Toolbar),\n slotLeaf(TemplateSlotName.Body),\n slotLeaf(TemplateSlotName.SidePanel),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('object-header', {\n title: 'INV-2043',\n subtitle: 'The document as it stands, and every version it has been',\n section: 'Billing',\n query: SampleBindingName.InvoiceById,\n }),\n ],\n [TemplateSlotName.Toolbar]: [objectNavigationalBar('object-trail'), filterPanel('object-filters', 'Filters')],\n [TemplateSlotName.Body]: [\n errorBoundary('object-guard', [page('object-body', 'Document', [objectContentEditor('object-editor', true)])]),\n ],\n [TemplateSlotName.SidePanel]: [page('object-history', 'History', [timeMachine('object-time-machine')])],\n },\n displayName: 'Object editor page',\n description: 'One document edited against its schema, with its navigation trail and its version history.',\n};\n\n/** The two editor-shaped templates. */\nexport const editorTemplates: ScreenTemplate[] = [schemaEditorPageTemplate, objectEditorPageTemplate];\n"],"names":["schemaEditorPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Toolbar","Body","arrangement","root","column","slotLeaf","grow","content","arcPageHeader","title","subtitle","section","toolbar","toolbarButton","toolbarSeparator","page","schemaEditor","displayName","description","objectEditorPageTemplate","SidePanel","row","overrides","width","WidthSizeClass","Compact","query","SampleBindingName","InvoiceById","objectNavigationalBar","filterPanel","errorBoundary","objectContentEditor","timeMachine","editorTemplates"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;;;;;;;UAyBaA,wBAAAA,GAA2C;IACpDC,IAAAA,EAAM,kBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAQ,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAK;AAAE,KAAA;IAC/GC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;AAACC,YAAAA,gCAAAA,CAASP,yCAAiBC,MAAM,CAAA;AAAGM,YAAAA,gCAAAA,CAASP,yCAAiBE,OAAO,CAAA;YAAGK,gCAAAA,CAASP,wCAAAA,CAAiBG,IAAI,EAAE;gBAAEK,IAAAA,EAAM;AAAE,aAAA;SAAG,EA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A,EAAY;AAACiB,oBAAAA,kCAAAA,CAAoB,eAAA,EAAiB,IAAA;AAAM,iBAAA;AAAE,aAAA;AAChH,SAAA;QACD,CAAClC,wCAAAA,CAAiBsB,SAAS,GAAG;AAACL,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;gBAACkB,0BAAAA,CAAY,qBAAA;AAAuB,aAAA;AAAE;AAC3G,KAAA;IACAhB,WAAAA,EAAa,oBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMgB,eAAAA,GAAoC;AAAC1C,IAAAA,wBAAAA;AAA0B2B,IAAAA;;;;;"}
1
+ {"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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= require('./editorElements.js');
7
7
  var elements = require('./elements.js');
8
8
  var SampleBindingName = require('./SampleBindingName.js');
9
+ var templateProvenance = require('../templateProvenance.js');
9
10
 
10
11
  // Copyright (c) Cratis. All rights reserved.
11
12
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -64,6 +65,7 @@ var SampleBindingName = require('./SampleBindingName.js');
64
65
  ]
65
66
  },
66
67
  metadata: {
68
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
67
69
  type: 'List',
68
70
  category: 'Business / List',
69
71
  scopes: [
@@ -108,6 +110,7 @@ var SampleBindingName = require('./SampleBindingName.js');
108
110
  ]
109
111
  },
110
112
  metadata: {
113
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
111
114
  type: 'List',
112
115
  category: 'Business / Live operations',
113
116
  scopes: [
@@ -186,6 +189,7 @@ var SampleBindingName = require('./SampleBindingName.js');
186
189
  ]
187
190
  },
188
191
  metadata: {
192
+ ...templateProvenance.componentsBlueprintTemplateProvenance,
189
193
  type: 'Detail',
190
194
  category: 'Business / Master detail',
191
195
  scopes: [
@@ -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';\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: { 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: { 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: { 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","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;AASA;;;;;;;;;;;;;;;;;;;;UAuBaA,oBAAAA,GAAuC;IAChDC,IAAAA,EAAM,cAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK;AAAE,KAAA;IAC3EC,OAAAA,E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AQ;AAACC,YAAAA,yBAAAA,CAAcC;AAAM;AAAC,KAAA;IAChGC,WAAAA,EAAa,4BAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,wCACO,MAAMoB,aAAAA,GAAkC;AAACnD,IAAAA,oBAAAA;AAAsBgC,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, 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,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5
  var editorElements = require('./editorElements.js');
6
6
  var elements = require('./elements.js');
7
7
  var SampleBindingName = require('./SampleBindingName.js');
8
+ var templateProvenance = require('../templateProvenance.js');
8
9
 
9
10
  // Copyright (c) Cratis. All rights reserved.
10
11
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -60,7 +61,10 @@ var SampleBindingName = require('./SampleBindingName.js');
60
61
  ]
61
62
  },
62
63
  displayName: 'Data module page',
63
- description: 'Module level: fits the application layout content slot and offers a body for one feature.'
64
+ description: 'Module level: fits the application layout content slot and offers a body for one feature.',
65
+ metadata: {
66
+ ...templateProvenance.componentsBlueprintTemplateProvenance
67
+ }
64
68
  };
65
69
  /**
66
70
  * Feature level: fits the module page's `body` slot.
@@ -98,7 +102,10 @@ var SampleBindingName = require('./SampleBindingName.js');
98
102
  ]
99
103
  },
100
104
  displayName: 'Data feature section',
101
- description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.'
105
+ description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.',
106
+ metadata: {
107
+ ...templateProvenance.componentsBlueprintTemplateProvenance
108
+ }
102
109
  };
103
110
  /**
104
111
  * Slice level: fits the feature section's `primary` slot.
@@ -135,7 +142,10 @@ var SampleBindingName = require('./SampleBindingName.js');
135
142
  ]
136
143
  },
137
144
  displayName: 'Command slice section',
138
- description: 'Slice level: fits a feature section primary slot and hosts one command behavior.'
145
+ description: 'Slice level: fits a feature section primary slot and hosts one command behavior.',
146
+ metadata: {
147
+ ...templateProvenance.componentsBlueprintTemplateProvenance
148
+ }
139
149
  };
140
150
  /** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */ const nestingChainTemplates = [
141
151
  dataModulePageTemplate,
@@ -1 +1 @@
1
- {"version":3,"file":"nesting.js","sources":["../../../templates/nesting.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName } from '@cratis/scene.blueprint.default';\nimport { invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { filterPanel } from './editorElements';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\n\n/**\n * A worked three-level chain, from the application layout down to one behavior.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's fits a\n * slot the module's declares; a slice's fits one the feature's declares. Nothing here is a special case\n * for a particular level, which is exactly why the hierarchy can be arbitrarily deep with no second\n * mechanism.\n *\n * The slot names are chosen so that each fitted name is declared by exactly one container in the chain -\n * `body` only by the module, `primary` only by the feature. That is not decoration: `resolveScreenTemplates`\n * places a template only when the containers in scope agree on exactly one home for it, and reports it as\n * unplaced rather than guessing when two of them declare the same name. A chain that reused `body` at\n * three levels would read fine and resolve to nothing.\n *\n * The whole chain is Arc-bound, which is the point of it living in *this* blueprint rather than being a\n * second copy of the default one's. It ends where a Cratis slice really ends: a button that summons the\n * command dialog.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * A module always has a name and a description, so it brings its own header, and it offers a body for the\n * feature inside it plus a side panel for the filters that apply across the whole module.\n */\nexport const dataModulePageTemplate: ScreenTemplate = {\n name: 'DataModulePage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('module-header', {\n title: 'Billing',\n subtitle: 'Everything the billing module owns',\n section: 'Operations',\n }),\n ],\n [TemplateSlotName.SidePanel]: [page('module-filters', 'Filters', [filterPanel('module-filter-panel', 'Filter the module')])],\n },\n displayName: 'Data module page',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n};\n\n/**\n * Feature level: fits the module page's `body` slot.\n *\n * A feature is where actions belong - a module is a grouping and a slice is one behavior, and the feature\n * in between is what a user thinks of as \"the screen with the buttons on it\". It offers a primary region\n * for the slice and a secondary one for the live view of what that slice is doing.\n */\nexport const dataFeatureSectionTemplate: ScreenTemplate = {\n name: 'DataFeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n content: {\n [TemplateSlotName.Toolbar]: [\n toolbar('feature-toolbar', [\n toolbarButton('feature-new', 'Register an invoice', 'pi pi-plus', 'New'),\n toolbarButton('feature-adjust', 'Record an adjustment', 'pi pi-pencil', 'Adjust'),\n toolbarSeparator('feature-separator'),\n toolbarButton('feature-export', 'Export the feature data', 'pi pi-download'),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('feature-live', 'In flight', [\n observableDataTable('feature-live-table', SampleBindingName.InvoicesInFlight, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n },\n displayName: 'Data feature section',\n description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.',\n};\n\n/**\n * Slice level: fits the feature section's `primary` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it. A slice is one behavior, and in a\n * Cratis application that behavior is one command - so its surface is a header saying what the command is\n * and whether it is wired, and the action that summons it. The capture itself happens in the `CommandDialog`\n * dialog template, which is why this template has no form on it and does not need one.\n */\nexport const commandSliceSectionTemplate: ScreenTemplate = {\n name: 'CommandSliceSection',\n fitsSlot: TemplateSlotName.Primary,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('slice-header', {\n title: 'Record an adjustment',\n subtitle: 'One behavior, one command, one button',\n section: 'Adjustments',\n command: SampleBindingName.RecordAdjustment,\n }),\n ],\n [TemplateSlotName.Actions]: [\n toolbar('slice-actions', [\n toolbarButton('slice-record', 'Record an adjustment', 'pi pi-check', 'Record'),\n toolbarButton('slice-cancel', 'Leave the invoice as it is', 'pi pi-times', 'Cancel'),\n ]),\n ],\n },\n displayName: 'Command slice section',\n description: 'Slice level: fits a feature section primary slot and hosts one command behavior.',\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [dataModulePageTemplate, dataFeatureSectionTemplate, commandSliceSectionTemplate];\n"],"names":["dataModulePageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","arcPageHeader","title","subtitle","section","page","filterPanel","displayName","description","dataFeatureSectionTemplate","Toolbar","Primary","Secondary","toolbar","toolbarButton","toolbarSeparator","observableDataTable","SampleBindingName","InvoicesInFlight","invoiceTableOptions","invoiceColumns","commandSliceSectionTemplate","Actions","command","RecordAdjustment","nestingChainTemplates"],"mappings":";;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;;;;;;;;UA0BaA,sBAAAA,GAAyC;IAClDC,IAAAA,EAAM,gBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,wCAAAA,CAAiBC,MAAM,GAAG;AACvBI,YAAAA,sBAAAA,CAAc,eAAA,EAAiB;gBAC3BC,KAAAA,EAAO,SAAA;gBACPC,QAAAA,EAAU,oCAAA;gBACVC,OAAAA,EAAS;AACb,aAAA;AACH,SAAA;QACD,CAACR,wCAAAA,CAAiBG,SAAS,GAAG;AAACM,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;AAACC,gBAAAA,0BAAAA,CAAY,qBAAA,EAAuB,mBAAA;AAAqB,aAAA;AAAE;AAChI,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WA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B0B;AAAQ;AAAE,KAAA;IAC9EtB,OAAAA,EAAS;QACL,CAACJ,wCAAAA,CAAiBC,MAAM,GAAG;AACvBI,YAAAA,sBAAAA,CAAc,cAAA,EAAgB;gBAC1BC,KAAAA,EAAO,sBAAA;gBACPC,QAAAA,EAAU,uCAAA;gBACVC,OAAAA,EAAS,aAAA;AACTmB,gBAAAA,OAAAA,EAASN,oCAAkBO;AAC/B,aAAA;AACH,SAAA;QACD,CAAC5B,wCAAAA,CAAiB0B,OAAO,GAAG;AACxBT,YAAAA,gBAAAA,CAAQ,eAAA,EAAiB;gBACrBC,sBAAAA,CAAc,cAAA,EAAgB,wBAAwB,aAAA,EAAe,QAAA,CAAA;gBACrEA,sBAAAA,CAAc,cAAA,EAAgB,8BAA8B,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;IACAP,WAAAA,EAAa,uBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,mGACO,MAAMiB,qBAAAA,GAA0C;AAACnC,IAAAA,sBAAAA;AAAwBmB,IAAAA,0BAAAA;AAA4BY,IAAAA;;;;;;"}
1
+ {"version":3,"file":"nesting.js","sources":["../../../templates/nesting.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName } from '@cratis/scene.blueprint.default';\nimport { invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { filterPanel } from './editorElements';\nimport { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\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;;;;;;;;;;;;;;;;;;;;;;;UA0BaA,sBAAAA,GAAyC;IAClDC,IAAAA,EAAM,gBAAA;AACNC,IAAAA,QAAAA,EAAUC,iCAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,yCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,yCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,yCAAiBG;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,wCAAAA,CAAiBC,MAAM,GAAG;AACvBI,YAAAA,sBAAAA,CAAc,eAAA,EAAiB;gBAC3BC,KAAAA,EAAO,SAAA;gBACPC,QAAAA,EAAU,oCAAA;gBACVC,OAAAA,EAAS;AACb,aAAA;AACH,SAAA;QACD,CAACR,wCAAAA,CAAiBG,SAAS,GAAG;AAACM,YAAAA,aAAAA,CAAK,kBAAkB,SAAA,EAAW;AAACC,gBAAAA,0BAAAA,CAAY,qBAAA,EAAuB,mBAAA;AAAqB,aAAA;AAAE;AAChI,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa,2FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAsC;AACzD;AAEA;;;;;;UAOaC,0BAAAA,GAA6C;IACtDpB,IAAAA,EAAM,oBAAA;AACNC,IAAAA,QAAAA,EAAUI,yCAAiBE,IAAI;IAC/BH,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YA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AAc,cAAA,EAAgB;gBAC1BC,KAAAA,EAAO,sBAAA;gBACPC,QAAAA,EAAU,uCAAA;gBACVC,OAAAA,EAAS,aAAA;AACTqB,gBAAAA,OAAAA,EAASN,oCAAkBO;AAC/B,aAAA;AACH,SAAA;QACD,CAAC9B,wCAAAA,CAAiB4B,OAAO,GAAG;AACxBT,YAAAA,gBAAAA,CAAQ,eAAA,EAAiB;gBACrBC,sBAAAA,CAAc,cAAA,EAAgB,wBAAwB,aAAA,EAAe,QAAA,CAAA;gBACrEA,sBAAAA,CAAc,cAAA,EAAgB,8BAA8B,aAAA,EAAe,QAAA;AAC9E,aAAA;AACJ;AACL,KAAA;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;;;;;;"}
@@ -6,6 +6,7 @@ var dataElements = require('./dataElements.js');
6
6
  var editorElements = require('./editorElements.js');
7
7
  var elements = require('./elements.js');
8
8
  var SampleBindingName = require('./SampleBindingName.js');
9
+ var templateProvenance = require('../templateProvenance.js');
9
10
 
10
11
  // Copyright (c) Cratis. All rights reserved.
11
12
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -116,7 +117,10 @@ var SampleBindingName = require('./SampleBindingName.js');
116
117
  ]
117
118
  },
118
119
  displayName: 'Master-detail page',
119
- description: 'A queried list in the larger column with the selected record and its history in the narrower one.'
120
+ description: 'A queried list in the larger column with the selected record and its history in the narrower one.',
121
+ metadata: {
122
+ ...templateProvenance.componentsBlueprintTemplateProvenance
123
+ }
120
124
  };
121
125
  /**
122
126
  * A dashboard of data widgets - four queries arranged so the page reads in the order people already read it.
@@ -199,7 +203,10 @@ var SampleBindingName = require('./SampleBindingName.js');
199
203
  ]
200
204
  },
201
205
  displayName: 'Dashboard page',
202
- description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.'
206
+ description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',
207
+ metadata: {
208
+ ...templateProvenance.componentsBlueprintTemplateProvenance
209
+ }
203
210
  };
204
211
  /** The two workspace-shaped templates. */ const workspaceTemplates = [
205
212
  masterDetailPageTemplate,
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceTemplates.js","sources":["../../../templates/workspaceTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, grid, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { ColumnDefinition } from './ColumnDefinition';\nimport { adjustmentColumns, dataTable, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, page } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { TableOptions } from './TableOptions';\n\n/**\n * The two whole-workspace shapes: a master-detail arrangement, and a dashboard of data widgets.\n *\n * Both are arrangements of *several* bindings rather than one, which is what separates them from the list\n * templates. That is also what makes them the templates most worth shipping: an application can wire one\n * query without help, and gets a page that looks like every other page in the product only if something\n * has already decided how four of them sit together.\n */\n\n/** The columns of the revenue widget's query. */\nconst revenueColumns: ColumnDefinition[] = [\n { field: 'month', header: 'Month' },\n { field: 'invoiced', header: 'Invoiced' },\n { field: 'collected', header: 'Collected' },\n];\n\n/** The columns of the open-tickets widget's query. */\nconst ticketColumns: ColumnDefinition[] = [\n { field: 'reference', header: 'Reference' },\n { field: 'subject', header: 'Subject' },\n { field: 'age', header: 'Age' },\n];\n\n/** Table options for a widget-sized table, where there is no search box to filter across. */\nconst widgetTableOptions: TableOptions = { emptyMessage: 'Nothing to show yet', dataKey: 'id' };\n\n/**\n * Master and detail: the list in the larger column, the selected record in the narrower one.\n *\n * The difference from `DataListWithDetailPage` is real and worth having both. That template is a whole\n * `dataPage` - its own title bar, menubar and filtering - with a detail region added beside it. This one is\n * a plain `dataTable` next to a detail region, which is the right shape when the page's chrome comes from\n * the *feature* around it rather than from the list itself. Reaching for the wrong one shows up as a page\n * with two toolbars.\n *\n * The grid collapses to a single column at a compact width, because a master and a detail side by side on a\n * phone is the arrangement that made \"master-detail does not work on mobile\" a truism.\n */\nexport const masterDetailPageTemplate: ScreenTemplate = {\n name: 'MasterDetailPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('master-detail-header', {\n title: 'Invoices',\n subtitle: 'Pick an invoice on the left to inspect it on the right',\n section: 'Billing',\n query: SampleBindingName.AllInvoices,\n }),\n ],\n [TemplateSlotName.Primary]: [\n page('master-detail-master', 'Invoices', [dataTable('master-detail-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)]),\n ],\n [TemplateSlotName.Secondary]: [\n page('master-detail-detail', 'Selected invoice', [\n objectContentEditor('master-detail-document', false),\n timeMachine('master-detail-history'),\n ]),\n ],\n },\n displayName: 'Master-detail page',\n description: 'A queried list in the larger column with the selected record and its history in the narrower one.',\n};\n\n/**\n * A dashboard of data widgets - four queries arranged so the page reads in the order people already read it.\n *\n * The composition is the one every template line settles on: a row of figures across the top, then a wide\n * column and a narrow one. Copying it is the point rather than a shortcut - it is the arrangement the eye\n * already knows how to scan, and a dashboard that invents its own costs the reader a moment on every visit.\n *\n * What this blueprint adds is that every widget is a *query*, not a picture. Each one names a proxy a host\n * registers, so the dashboard is live the moment the application wires it, with nothing to replace.\n */\nexport const dashboardPageTemplate: ScreenTemplate = {\n name: 'DashboardPage',\n fitsSlot: SlotName.Content,\n slots: [\n { name: TemplateSlotName.Header },\n { name: TemplateSlotName.Stats },\n { name: TemplateSlotName.Primary },\n { name: TemplateSlotName.Secondary },\n ],\n arrangement: {\n root: column([\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16),\n ]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column(\n [\n slotLeaf(TemplateSlotName.Header),\n slotLeaf(TemplateSlotName.Stats),\n slotLeaf(TemplateSlotName.Primary),\n slotLeaf(TemplateSlotName.Secondary),\n ],\n 16,\n ),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [\n arcPageHeader('dashboard-header', {\n title: 'Billing',\n subtitle: 'Four queries, arranged the way people already read a dashboard',\n section: 'Operations',\n query: SampleBindingName.RevenueByMonth,\n }),\n ],\n [TemplateSlotName.Stats]: [\n page('dashboard-stat-revenue', 'Revenue by month', [\n dataTable('dashboard-stat-revenue-table', SampleBindingName.RevenueByMonth, widgetTableOptions, revenueColumns),\n ]),\n page('dashboard-stat-flight', 'In flight', [\n observableDataTable('dashboard-stat-flight-table', SampleBindingName.InvoicesInFlight, widgetTableOptions, invoiceColumns),\n ]),\n page('dashboard-stat-tickets', 'Open tickets', [\n dataTable('dashboard-stat-tickets-table', SampleBindingName.OpenTickets, widgetTableOptions, ticketColumns),\n ]),\n ],\n [TemplateSlotName.Primary]: [\n page('dashboard-invoices', 'Recent invoices', [\n dataTable('dashboard-invoices-table', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n page('dashboard-adjustments', 'Adjustments', [\n dataTable('dashboard-adjustments-table', SampleBindingName.AllAdjustments, widgetTableOptions, adjustmentColumns),\n ]),\n ],\n },\n displayName: 'Dashboard page',\n description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',\n};\n\n/** The two workspace-shaped templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [masterDetailPageTemplate, dashboardPageTemplate];\n"],"names":["revenueColumns","field","header","ticketColumns","widgetTableOptions","emptyMessage","dataKey","masterDetailPageTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","arcPageHeader","title","subtitle","section","query","SampleBindingName","AllInvoices","page","dataTable","invoiceTableOptions","invoiceColumns","objectContentEditor","timeMachine","displayName","description","dashboardPageTemplate","Stats","RevenueByMonth","observableDataTable","InvoicesInFlight","OpenTickets","AllAdjustments","adjustmentColumns","workspaceTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAWA;;;;;;;sDAUA,MAAMA,cAAAA,GAAqC;AACvC,IAAA;QAAEC,KAAAA,EAAO,OAAA;QAASC,MAAAA,EAAQ;AAAQ,KAAA;AAClC,IAAA;QAAED,KAAAA,EAAO,UAAA;QAAYC,MAAAA,EAAQ;AAAW,KAAA;AACxC,IAAA;QAAED,KAAAA,EAAO,WAAA;QAAaC,MAAAA,EAAQ;AAAY;AAC7C,CAAA;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,wBAA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,gBAAAA,sBAAAA,CAAU,0BAAA,EAA4BH,mCAAAA,CAAkBC,WAAW,EAAEG,gCAAAA,EAAqBC,2BAAAA;AAC7F,aAAA;AACJ,SAAA;QACD,CAACzB,wCAAAA,CAAiBG,SAAS,GAAG;AAC1BmB,YAAAA,aAAAA,CAAK,yBAAyB,aAAA,EAAe;AACzCC,gBAAAA,sBAAAA,CAAU,6BAAA,EAA+BH,mCAAAA,CAAkBgB,cAAc,EAAE7C,kBAAAA,EAAoB8C,8BAAAA;AAClG,aAAA;AACJ;AACL,KAAA;IACAT,WAAAA,EAAa,gBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,2CACO,MAAMS,kBAAAA,GAAuC;AAAC5C,IAAAA,wBAAAA;AAA0BoC,IAAAA;;;;;"}
1
+ {"version":3,"file":"workspaceTemplates.js","sources":["../../../templates/workspaceTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, TemplateSlotName, column, grid, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { ColumnDefinition } from './ColumnDefinition';\nimport { adjustmentColumns, dataTable, invoiceColumns, invoiceTableOptions, observableDataTable } from './dataElements';\nimport { objectContentEditor, timeMachine } from './editorElements';\nimport { arcPageHeader, page } from './elements';\nimport { SampleBindingName } from './SampleBindingName';\nimport { TableOptions } from './TableOptions';\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;A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AA,CAAK,yBAAyB,WAAA,EAAa;AACvCa,gBAAAA,gCAAAA,CAAoB,6BAAA,EAA+Bf,mCAAAA,CAAkBgB,gBAAgB,EAAE7C,kBAAAA,EAAoBkC,2BAAAA;AAC9G,aAAA,CAAA;AACDH,YAAAA,aAAAA,CAAK,0BAA0B,cAAA,EAAgB;AAC3CC,gBAAAA,sBAAAA,CAAU,8BAAA,EAAgCH,mCAAAA,CAAkBiB,WAAW,EAAE9C,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,CAAkBkB,cAAc,EAAE/C,kBAAAA,EAAoBgD,8BAAAA;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;;;;;"}
@@ -7,4 +7,5 @@ export * from './templates';
7
7
  export * from './gallery';
8
8
  export * from './componentsBlueprintComponents';
9
9
  export * from './componentsBlueprint';
10
+ export * from './templateProvenance';
10
11
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC;AAC9B,cAAc,iBAAiB,CAAC;AAChC,cAAc,iBAAiB,CAAC;AAChC,cAAc,yBAAyB,CAAC;AACxC,cAAc,UAAU,CAAC;AACzB,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,iCAAiC,CAAC;AAChD,cAAc,uBAAuB,CAAC;AACtC,cAAc,sBAAsB,CAAC"}
package/dist/esm/index.js CHANGED
@@ -28,4 +28,5 @@ export { GalleryScreenPreview, componentsPreviewBundles, componentsPreviewRegist
28
28
  export { DialogTemplatePreview } from './gallery/DialogTemplatePreview.js';
29
29
  export { componentsBlueprintComponents } from './componentsBlueprintComponents.js';
30
30
  export { componentsBlueprint, componentsBlueprintManifest } from './componentsBlueprint.js';
31
+ export { componentsBlueprintTemplateProvenance } from './templateProvenance.js';
31
32
  //# sourceMappingURL=index.js.map