@cratis/scene.blueprint.components 4.12.0 → 4.14.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/index.ts CHANGED
@@ -10,3 +10,4 @@ export * from './templates';
10
10
  export * from './gallery';
11
11
  export * from './componentsBlueprintComponents';
12
12
  export * from './componentsBlueprint';
13
+ export * from './templateProvenance';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cratis/scene.blueprint.components",
3
- "version": "4.12.0",
3
+ "version": "4.14.0",
4
4
  "description": "A blueprint of Arc-bound screen and dialog templates: full pages built from Cratis Components composites, so a data list, a command form or a master-detail screen is a template rather than something you assemble.",
5
5
  "keywords": [
6
6
  "cratis",
@@ -52,19 +52,19 @@
52
52
  },
53
53
  "dependencies": {
54
54
  "@cratis/components": "^4.25.0",
55
- "@cratis/scene.blueprint.default": "4.12.0",
56
- "@cratis/scene.components": "4.12.0",
57
- "@cratis/scene.engine": "4.12.0",
58
- "@cratis/scene.model": "4.12.0",
59
- "@cratis/scene.react": "4.12.0"
55
+ "@cratis/scene.blueprint.default": "4.14.0",
56
+ "@cratis/scene.components": "4.14.0",
57
+ "@cratis/scene.engine": "4.14.0",
58
+ "@cratis/scene.model": "4.14.0",
59
+ "@cratis/scene.react": "4.14.0"
60
60
  },
61
61
  "devDependencies": {
62
62
  "@cratis/components": "^4.25.0",
63
- "@cratis/scene.blueprint.default": "4.12.0",
64
- "@cratis/scene.components": "4.12.0",
65
- "@cratis/scene.engine": "4.12.0",
66
- "@cratis/scene.model": "4.12.0",
67
- "@cratis/scene.react": "4.12.0",
63
+ "@cratis/scene.blueprint.default": "4.14.0",
64
+ "@cratis/scene.components": "4.14.0",
65
+ "@cratis/scene.engine": "4.14.0",
66
+ "@cratis/scene.model": "4.14.0",
67
+ "@cratis/scene.react": "4.14.0",
68
68
  "@primereact/core": "11.2.0",
69
69
  "@primereact/headless": "11.2.0",
70
70
  "@storybook/addon-links": "^10.6.1",
@@ -0,0 +1,25 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+
4
+ import { TemplateMetadata } from '@cratis/scene.model';
5
+
6
+ /**
7
+ * The compatibility, attribution and license metadata every template this blueprint ships carries.
8
+ *
9
+ * Templates are written against the Scene model that introduced template provenance, against the default
10
+ * blueprint whose shell and slots they fill, and against the Cratis Components composites they are built from -
11
+ * the same dependencies the manifest declares. `describeTemplateCatalog` checks every template against them,
12
+ * and this package's specs prove each one comes out compatible.
13
+ */
14
+ export const componentsBlueprintTemplateProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'> = {
15
+ compatibility: {
16
+ scene: '^4.13.0',
17
+ packages: [
18
+ { name: 'Cratis.Blueprint.Default', versionRange: '^1.0.0' },
19
+ { name: 'Cratis.Components', versionRange: '^3.0.0' },
20
+ ],
21
+ },
22
+ attribution: { author: 'Cratis', url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.components' },
23
+ license: 'MIT',
24
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
25
+ };
@@ -6,6 +6,7 @@ import { SlotName, TemplateSlotName, column, slotLeaf } from '@cratis/scene.blue
6
6
  import { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';
7
7
  import { commandForm } from './formElements';
8
8
  import { SampleBindingName } from './SampleBindingName';
9
+ import { componentsBlueprintTemplateProvenance } from '../templateProvenance';
9
10
 
10
11
  /**
11
12
  * The write side: a page whose body is one command, and whose action bar submits it.
@@ -51,7 +52,7 @@ export const commandFormPageTemplate: ScreenTemplate = {
51
52
  ]),
52
53
  ],
53
54
  },
54
- metadata: { type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },
55
+ metadata: { ...componentsBlueprintTemplateProvenance, type: 'Form', category: 'Business / Command', scopes: [TemplateScope.Slice] },
55
56
  displayName: 'Command form page',
56
57
  description: 'A generated command form under a header that states the command, with its own action bar.',
57
58
  };
@@ -7,6 +7,7 @@ import { busyIndicatorDialog, commandDialog, dialog } from './dialogElements';
7
7
  import { icon } from './elements';
8
8
  import { calendarField, inputTextField, numberField, textAreaField } from './formElements';
9
9
  import { SampleBindingName } from './SampleBindingName';
10
+ import { componentsBlueprintTemplateProvenance } from '../templateProvenance';
10
11
 
11
12
  /**
12
13
  * The three dialog shapes an Arc application repeats: submit a command, confirm something destructive, and
@@ -53,6 +54,7 @@ export const commandDialogTemplate: DialogTemplate = {
53
54
  },
54
55
  displayName: 'Command dialog',
55
56
  description: 'A short capture whose confirm button submits the command and only closes when it succeeded.',
57
+ metadata: { ...componentsBlueprintTemplateProvenance },
56
58
  };
57
59
 
58
60
  /**
@@ -79,6 +81,7 @@ export const confirmDialogTemplate: DialogTemplate = {
79
81
  },
80
82
  displayName: 'Confirmation dialog',
81
83
  description: 'One question with the consequence spelled out, answered through Arc dialog context.',
84
+ metadata: { ...componentsBlueprintTemplateProvenance },
82
85
  };
83
86
 
84
87
  /**
@@ -99,6 +102,7 @@ export const busyDialogTemplate: DialogTemplate = {
99
102
  },
100
103
  displayName: 'Busy dialog',
101
104
  description: 'The blocking spinner shown while a long-running command is in flight, with wording chosen up front.',
105
+ metadata: { ...componentsBlueprintTemplateProvenance },
102
106
  };
103
107
 
104
108
  /** The dialog templates this blueprint provides. */
@@ -6,6 +6,7 @@ import { SlotName, TemplateSlotName, column, row, slotLeaf } from '@cratis/scene
6
6
  import { filterPanel, objectContentEditor, objectNavigationalBar, schemaEditor, timeMachine } from './editorElements';
7
7
  import { arcPageHeader, errorBoundary, page, toolbar, toolbarButton, toolbarSeparator } from './elements';
8
8
  import { SampleBindingName } from './SampleBindingName';
9
+ import { componentsBlueprintTemplateProvenance } from '../templateProvenance';
9
10
 
10
11
  /**
11
12
  * The two inspection pages: one for a type's shape, one for an instance's content.
@@ -61,6 +62,7 @@ export const schemaEditorPageTemplate: ScreenTemplate = {
61
62
  },
62
63
  displayName: 'Schema editor page',
63
64
  description: "An event type's schema edited as a typed property tree, with the actions that evolve it.",
65
+ metadata: { ...componentsBlueprintTemplateProvenance },
64
66
  };
65
67
 
66
68
  /**
@@ -123,6 +125,7 @@ export const objectEditorPageTemplate: ScreenTemplate = {
123
125
  },
124
126
  displayName: 'Object editor page',
125
127
  description: 'One document edited against its schema, with its navigation trail and its version history.',
128
+ metadata: { ...componentsBlueprintTemplateProvenance },
126
129
  };
127
130
 
128
131
  /** The two editor-shaped templates. */
@@ -7,6 +7,7 @@ import { dataPage, invoiceColumns, invoiceTableOptions, observableDataTable } fr
7
7
  import { objectContentEditor, objectNavigationalBar, timeMachine } from './editorElements';
8
8
  import { arcPageHeader, page, toolbar, toolbarButton, toolbarGroup, toolbarSeparator } from './elements';
9
9
  import { SampleBindingName } from './SampleBindingName';
10
+ import { componentsBlueprintTemplateProvenance } from '../templateProvenance';
10
11
 
11
12
  /**
12
13
  * The three list shapes an Arc application repeats: a list, a live list, and a list with the selected
@@ -55,7 +56,7 @@ export const dataListPageTemplate: ScreenTemplate = {
55
56
  ],
56
57
  [TemplateSlotName.Body]: [dataPage('data-list-body', SampleBindingName.AllInvoices, invoiceTableOptions, invoiceColumns)],
57
58
  },
58
- metadata: { type: 'List', category: 'Business / List', scopes: [TemplateScope.Slice] },
59
+ metadata: { ...componentsBlueprintTemplateProvenance, type: 'List', category: 'Business / List', scopes: [TemplateScope.Slice] },
59
60
  displayName: 'Data list page',
60
61
  description: 'A dataPage bound to one query, under a header that states the binding - the whole list screen in two elements.',
61
62
  };
@@ -88,7 +89,7 @@ export const observableDataListPageTemplate: ScreenTemplate = {
88
89
  ]),
89
90
  ],
90
91
  },
91
- metadata: { type: 'List', category: 'Business / Live operations', scopes: [TemplateScope.Slice] },
92
+ metadata: { ...componentsBlueprintTemplateProvenance, type: 'List', category: 'Business / Live operations', scopes: [TemplateScope.Slice] },
92
93
  displayName: 'Observable data list page',
93
94
  description: 'A live list over an observable query, which re-renders when the read model changes on the server.',
94
95
  };
@@ -136,7 +137,7 @@ export const dataListWithDetailPageTemplate: ScreenTemplate = {
136
137
  ]),
137
138
  ],
138
139
  },
139
- metadata: { type: 'Detail', category: 'Business / Master detail', scopes: [TemplateScope.Slice] },
140
+ metadata: { ...componentsBlueprintTemplateProvenance, type: 'Detail', category: 'Business / Master detail', scopes: [TemplateScope.Slice] },
140
141
  displayName: 'Data list with detail page',
141
142
  description: 'A dataPage beside a detail region showing the selected record document and its history.',
142
143
  };
@@ -7,6 +7,7 @@ import { invoiceColumns, invoiceTableOptions, observableDataTable } from './data
7
7
  import { filterPanel } from './editorElements';
8
8
  import { arcPageHeader, page, toolbar, toolbarButton, toolbarSeparator } from './elements';
9
9
  import { SampleBindingName } from './SampleBindingName';
10
+ import { componentsBlueprintTemplateProvenance } from '../templateProvenance';
10
11
 
11
12
  /**
12
13
  * A worked three-level chain, from the application layout down to one behavior.
@@ -50,6 +51,7 @@ export const dataModulePageTemplate: ScreenTemplate = {
50
51
  },
51
52
  displayName: 'Data module page',
52
53
  description: 'Module level: fits the application layout content slot and offers a body for one feature.',
54
+ metadata: { ...componentsBlueprintTemplateProvenance },
53
55
  };
54
56
 
55
57
  /**
@@ -80,6 +82,7 @@ export const dataFeatureSectionTemplate: ScreenTemplate = {
80
82
  },
81
83
  displayName: 'Data feature section',
82
84
  description: 'Feature level: fits a module page body slot, brings the action toolbar and a live view.',
85
+ metadata: { ...componentsBlueprintTemplateProvenance },
83
86
  };
84
87
 
85
88
  /**
@@ -112,6 +115,7 @@ export const commandSliceSectionTemplate: ScreenTemplate = {
112
115
  },
113
116
  displayName: 'Command slice section',
114
117
  description: 'Slice level: fits a feature section primary slot and hosts one command behavior.',
118
+ metadata: { ...componentsBlueprintTemplateProvenance },
115
119
  };
116
120
 
117
121
  /** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */
@@ -9,6 +9,7 @@ import { objectContentEditor, timeMachine } from './editorElements';
9
9
  import { arcPageHeader, page } from './elements';
10
10
  import { SampleBindingName } from './SampleBindingName';
11
11
  import { TableOptions } from './TableOptions';
12
+ import { componentsBlueprintTemplateProvenance } from '../templateProvenance';
12
13
 
13
14
  /**
14
15
  * The two whole-workspace shapes: a master-detail arrangement, and a dashboard of data widgets.
@@ -82,6 +83,7 @@ export const masterDetailPageTemplate: ScreenTemplate = {
82
83
  },
83
84
  displayName: 'Master-detail page',
84
85
  description: 'A queried list in the larger column with the selected record and its history in the narrower one.',
86
+ metadata: { ...componentsBlueprintTemplateProvenance },
85
87
  };
86
88
 
87
89
  /**
@@ -157,6 +159,7 @@ export const dashboardPageTemplate: ScreenTemplate = {
157
159
  },
158
160
  displayName: 'Dashboard page',
159
161
  description: 'A row of query-backed widgets over a wide and a narrow column, each bound to its own query.',
162
+ metadata: { ...componentsBlueprintTemplateProvenance },
160
163
  };
161
164
 
162
165
  /** The two workspace-shaped templates. */