@cratis/scene.blueprint.default 4.12.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.
- package/dist/cjs/gallery/authTemplates.js +25 -6
- package/dist/cjs/gallery/authTemplates.js.map +1 -1
- package/dist/cjs/gallery/dialogTemplates.js +13 -3
- package/dist/cjs/gallery/dialogTemplates.js.map +1 -1
- package/dist/cjs/gallery/nesting.js +13 -3
- package/dist/cjs/gallery/nesting.js.map +1 -1
- package/dist/cjs/gallery/statusTemplates.js +17 -4
- package/dist/cjs/gallery/statusTemplates.js.map +1 -1
- package/dist/cjs/gallery/supportTemplates.js +21 -5
- package/dist/cjs/gallery/supportTemplates.js.map +1 -1
- package/dist/cjs/gallery/workspaceTemplates.js +21 -5
- package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
- package/dist/cjs/index.js +3 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/layouts/appShell.js +5 -1
- package/dist/cjs/layouts/appShell.js.map +1 -1
- package/dist/cjs/layouts/fullPage.js +5 -1
- package/dist/cjs/layouts/fullPage.js.map +1 -1
- package/dist/cjs/templateProvenance.js +46 -0
- package/dist/cjs/templateProvenance.js.map +1 -0
- package/dist/esm/gallery/authTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/authTemplates.js +25 -6
- package/dist/esm/gallery/authTemplates.js.map +1 -1
- package/dist/esm/gallery/dialogTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/dialogTemplates.js +13 -3
- package/dist/esm/gallery/dialogTemplates.js.map +1 -1
- package/dist/esm/gallery/nesting.d.ts.map +1 -1
- package/dist/esm/gallery/nesting.js +13 -3
- package/dist/esm/gallery/nesting.js.map +1 -1
- package/dist/esm/gallery/statusTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/statusTemplates.js +17 -4
- package/dist/esm/gallery/statusTemplates.js.map +1 -1
- package/dist/esm/gallery/supportTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/supportTemplates.js +21 -5
- package/dist/esm/gallery/supportTemplates.js.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.js +21 -5
- package/dist/esm/gallery/workspaceTemplates.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/layouts/appShell.d.ts.map +1 -1
- package/dist/esm/layouts/appShell.js +5 -1
- package/dist/esm/layouts/appShell.js.map +1 -1
- package/dist/esm/layouts/fullPage.d.ts.map +1 -1
- package/dist/esm/layouts/fullPage.js +5 -1
- package/dist/esm/layouts/fullPage.js.map +1 -1
- package/dist/esm/templateProvenance.d.ts +4 -0
- package/dist/esm/templateProvenance.d.ts.map +1 -0
- package/dist/esm/templateProvenance.js +43 -0
- package/dist/esm/templateProvenance.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/gallery/authTemplates.ts +7 -0
- package/gallery/dialogTemplates.ts +4 -0
- package/gallery/nesting.ts +4 -0
- package/gallery/statusTemplates.ts +5 -0
- package/gallery/supportTemplates.ts +6 -0
- package/gallery/workspaceTemplates.ts +6 -0
- package/index.ts +1 -0
- package/layouts/appShell.ts +2 -0
- package/layouts/fullPage.ts +2 -0
- package/package.json +7 -7
- package/templateProvenance.ts +37 -0
|
@@ -7,6 +7,7 @@ import '../layouts/fullPage.js';
|
|
|
7
7
|
import { TemplateSlotName } from './TemplateSlotName.js';
|
|
8
8
|
import { button, externalComponent } from './elements.js';
|
|
9
9
|
import { pageHeader } from './widgets.js';
|
|
10
|
+
import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
10
11
|
|
|
11
12
|
// Copyright (c) Cratis. All rights reserved.
|
|
12
13
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
@@ -46,7 +47,10 @@ import { pageHeader } from './widgets.js';
|
|
|
46
47
|
]
|
|
47
48
|
},
|
|
48
49
|
displayName: 'Module workspace',
|
|
49
|
-
description: 'Module level: fits the application layout content slot and offers a body for one feature.'
|
|
50
|
+
description: 'Module level: fits the application layout content slot and offers a body for one feature.',
|
|
51
|
+
metadata: {
|
|
52
|
+
...defaultBlueprintTemplateProvenance
|
|
53
|
+
}
|
|
50
54
|
};
|
|
51
55
|
/**
|
|
52
56
|
* Feature level: fits the module workspace's `body` slot.
|
|
@@ -77,7 +81,10 @@ import { pageHeader } from './widgets.js';
|
|
|
77
81
|
]
|
|
78
82
|
},
|
|
79
83
|
displayName: 'Feature section',
|
|
80
|
-
description: 'Feature level: fits a module workspace body slot and brings the action toolbar.'
|
|
84
|
+
description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',
|
|
85
|
+
metadata: {
|
|
86
|
+
...defaultBlueprintTemplateProvenance
|
|
87
|
+
}
|
|
81
88
|
};
|
|
82
89
|
/**
|
|
83
90
|
* Slice level: fits the feature section's `body` slot.
|
|
@@ -112,7 +119,10 @@ import { pageHeader } from './widgets.js';
|
|
|
112
119
|
]
|
|
113
120
|
},
|
|
114
121
|
displayName: 'Slice section',
|
|
115
|
-
description: 'Slice level: fits a feature section body slot and hosts one behavior.'
|
|
122
|
+
description: 'Slice level: fits a feature section body slot and hosts one behavior.',
|
|
123
|
+
metadata: {
|
|
124
|
+
...defaultBlueprintTemplateProvenance
|
|
125
|
+
}
|
|
116
126
|
};
|
|
117
127
|
/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */ const nestingChainTemplates = [
|
|
118
128
|
moduleWorkspaceTemplate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nesting.js","sources":["../../../gallery/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 { ComponentName } from '../ComponentName';\nimport { SlotName, column, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, externalComponent } from './elements';\nimport { pageHeader } from './widgets';\n\n/**\n * A worked three-level chain, from the application layout down to a slice.\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 template\n * fits a slot the module's template declares; a slice's fits one the feature's declares. Nothing here is a\n * special case for a particular level - which is exactly why the hierarchy can be arbitrarily deep without\n * a second mechanism.\n *\n * These three exist to make that concrete and to be asserted by a spec, because \"it composes recursively\"\n * is the kind of claim that is true in a design document and wrong in the code.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * It brings its own header - a module always has a name and a description - and offers a body for the\n * feature inside it plus an optional side panel.\n */\nexport const moduleWorkspaceTemplate: ScreenTemplate = {\n name: 'ModuleWorkspace',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('module-header', 'Operations', 'Everything the operations module owns')],\n },\n displayName: 'Module workspace',\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 workspace's `body` slot.\n *\n * It brings a toolbar, because a feature is where actions belong - a module is a grouping, a slice is one\n * behavior, and the feature in between is what a user thinks of as a screen with buttons on it.\n */\nexport const featureSectionTemplate: ScreenTemplate = {\n name: 'FeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n button('feature-new', 'New', { severity: 'primary', icon: 'pi pi-plus' }),\n button('feature-export', 'Export', { severity: 'secondary', icon: 'pi pi-download' }),\n ],\n },\n displayName: 'Feature section',\n description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',\n};\n\n/**\n * Slice level: fits the feature section's `body` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it - one behavior's surface, with somewhere\n * to put it and somewhere to put its actions.\n */\nexport const sliceSectionTemplate: ScreenTemplate = {\n name: 'SliceSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)]),\n },\n content: {\n [TemplateSlotName.Body]: [externalComponent('slice-body', ComponentName.PageHeader, { title: 'Adjustment', subtitle: 'One behavior, one surface' })],\n },\n displayName: 'Slice section',\n description: 'Slice level: fits a feature section body slot and hosts one behavior.',\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [moduleWorkspaceTemplate, featureSectionTemplate, sliceSectionTemplate];\n"],"names":["moduleWorkspaceTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","pageHeader","displayName","description","featureSectionTemplate","Toolbar","button","severity","icon","sliceSectionTemplate","Actions","arrangement","root","column","slotLeaf","grow","externalComponent","ComponentName","PageHeader","title","subtitle","nestingChainTemplates"],"mappings":"
|
|
1
|
+
{"version":3,"file":"nesting.js","sources":["../../../gallery/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 { ComponentName } from '../ComponentName';\nimport { SlotName, column, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, externalComponent } from './elements';\nimport { pageHeader } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * A worked three-level chain, from the application layout down to a slice.\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 template\n * fits a slot the module's template declares; a slice's fits one the feature's declares. Nothing here is a\n * special case for a particular level - which is exactly why the hierarchy can be arbitrarily deep without\n * a second mechanism.\n *\n * These three exist to make that concrete and to be asserted by a spec, because \"it composes recursively\"\n * is the kind of claim that is true in a design document and wrong in the code.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * It brings its own header - a module always has a name and a description - and offers a body for the\n * feature inside it plus an optional side panel.\n */\nexport const moduleWorkspaceTemplate: ScreenTemplate = {\n name: 'ModuleWorkspace',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('module-header', 'Operations', 'Everything the operations module owns')],\n },\n displayName: 'Module workspace',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/**\n * Feature level: fits the module workspace's `body` slot.\n *\n * It brings a toolbar, because a feature is where actions belong - a module is a grouping, a slice is one\n * behavior, and the feature in between is what a user thinks of as a screen with buttons on it.\n */\nexport const featureSectionTemplate: ScreenTemplate = {\n name: 'FeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n button('feature-new', 'New', { severity: 'primary', icon: 'pi pi-plus' }),\n button('feature-export', 'Export', { severity: 'secondary', icon: 'pi pi-download' }),\n ],\n },\n displayName: 'Feature section',\n description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/**\n * Slice level: fits the feature section's `body` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it - one behavior's surface, with somewhere\n * to put it and somewhere to put its actions.\n */\nexport const sliceSectionTemplate: ScreenTemplate = {\n name: 'SliceSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)]),\n },\n content: {\n [TemplateSlotName.Body]: [externalComponent('slice-body', ComponentName.PageHeader, { title: 'Adjustment', subtitle: 'One behavior, one surface' })],\n },\n displayName: 'Slice section',\n description: 'Slice level: fits a feature section body slot and hosts one behavior.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [moduleWorkspaceTemplate, featureSectionTemplate, sliceSectionTemplate];\n"],"names":["moduleWorkspaceTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","pageHeader","displayName","description","metadata","defaultBlueprintTemplateProvenance","featureSectionTemplate","Toolbar","button","severity","icon","sliceSectionTemplate","Actions","arrangement","root","column","slotLeaf","grow","externalComponent","ComponentName","PageHeader","title","subtitle","nestingChainTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBG;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,gBAAAA,CAAiBC,MAAM,GAAG;AAACI,YAAAA,UAAAA,CAAW,iBAAiB,YAAA,EAAc,uCAAA;AAAyC;AACnH,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa,2FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA;;;;;UAMaC,sBAAAA,GAAyC;IAClDf,IAAAA,EAAM,gBAAA;AACNC,IAAAA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AAcC,QAAAA,EAAU;AAA4B,aAAA;AAAG;AACxJ,KAAA;IACApB,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa,uEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,mGACO,MAAMkB,qBAAAA,GAA0C;AAACjC,IAAAA,uBAAAA;AAAyBgB,IAAAA,sBAAAA;AAAwBK,IAAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusTemplates.d.ts","sourceRoot":"","sources":["../../../gallery/statusTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"statusTemplates.d.ts","sourceRoot":"","sources":["../../../gallery/statusTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAkBrD,eAAO,MAAM,aAAa,EAAE,cAoB3B,CAAC;AAGF,eAAO,MAAM,oBAAoB,EAAE,cAoBlC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAkB9B,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,cA+B7B,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,cAAc,EAA6E,CAAC"}
|
|
@@ -7,6 +7,7 @@ import '../layouts/fullPage.js';
|
|
|
7
7
|
import { TemplateSlotName } from './TemplateSlotName.js';
|
|
8
8
|
import { card, externalComponent, text, panel, button } from './elements.js';
|
|
9
9
|
import { widget } from './widgets.js';
|
|
10
|
+
import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
10
11
|
|
|
11
12
|
// Copyright (c) Cratis. All rights reserved.
|
|
12
13
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
@@ -47,7 +48,10 @@ import { widget } from './widgets.js';
|
|
|
47
48
|
]
|
|
48
49
|
},
|
|
49
50
|
displayName: 'Error',
|
|
50
|
-
description: 'A server-side failure, said plainly, with a way onward.'
|
|
51
|
+
description: 'A server-side failure, said plainly, with a way onward.',
|
|
52
|
+
metadata: {
|
|
53
|
+
...defaultBlueprintTemplateProvenance
|
|
54
|
+
}
|
|
51
55
|
};
|
|
52
56
|
/** Signed in, and still not allowed. */ const accessDeniedTemplate = {
|
|
53
57
|
name: 'AccessDenied',
|
|
@@ -79,7 +83,10 @@ import { widget } from './widgets.js';
|
|
|
79
83
|
]
|
|
80
84
|
},
|
|
81
85
|
displayName: 'Access denied',
|
|
82
|
-
description: 'A refusal that distinguishes "not signed in" from "not allowed".'
|
|
86
|
+
description: 'A refusal that distinguishes "not signed in" from "not allowed".',
|
|
87
|
+
metadata: {
|
|
88
|
+
...defaultBlueprintTemplateProvenance
|
|
89
|
+
}
|
|
83
90
|
};
|
|
84
91
|
/** No such address. */ const notFoundTemplate = {
|
|
85
92
|
name: 'NotFound',
|
|
@@ -109,7 +116,10 @@ import { widget } from './widgets.js';
|
|
|
109
116
|
]
|
|
110
117
|
},
|
|
111
118
|
displayName: 'Not found',
|
|
112
|
-
description: 'A wrong address, with a search box rather than a dead end.'
|
|
119
|
+
description: 'A wrong address, with a search box rather than a dead end.',
|
|
120
|
+
metadata: {
|
|
121
|
+
...defaultBlueprintTemplateProvenance
|
|
122
|
+
}
|
|
113
123
|
};
|
|
114
124
|
/** The page that has to do the selling. */ const landingTemplate = {
|
|
115
125
|
name: 'Landing',
|
|
@@ -171,7 +181,10 @@ import { widget } from './widgets.js';
|
|
|
171
181
|
]
|
|
172
182
|
},
|
|
173
183
|
displayName: 'Landing',
|
|
174
|
-
description: 'The marketing front door, with its own navigation because it has no application chrome.'
|
|
184
|
+
description: 'The marketing front door, with its own navigation because it has no application chrome.',
|
|
185
|
+
metadata: {
|
|
186
|
+
...defaultBlueprintTemplateProvenance
|
|
187
|
+
}
|
|
175
188
|
};
|
|
176
189
|
/** The four status and marketing templates. */ const statusTemplates = [
|
|
177
190
|
errorTemplate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"statusTemplates.js","sources":["../../../gallery/statusTemplates.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 { ComponentName } from '../ComponentName';\nimport { SlotName } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { widget } from './widgets';\n\n/**\n * The four screens that are not part of anyone's plan: a server error, a refusal, a wrong address, and the\n * page that has to sell the product before any of the others exist.\n *\n * They use the full-page layout for the same reason the sign-in screens do - none of them has navigation\n * to render - and they matter more than their frequency suggests. An error page is the screen most likely\n * to be someone's first impression of how carefully an application was built.\n */\n\n/** Something broke on our side. */\nexport const errorTemplate: ScreenTemplate = {\n name: 'Error',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n card('error-card', [\n externalComponent('error-tag', 'tag', { value: '500', severity: 'danger' }),\n text('error-title', 'Something went wrong on our side'),\n text('error-message', 'The team has been told. Try again in a moment - nothing you were working on was lost.'),\n panel('error-actions', [\n button('error-retry', 'Try again', { severity: 'primary' }),\n button('error-home', 'Back to the dashboard', { severity: 'secondary', targetScreen: 'Dashboard' }),\n ]),\n ]),\n ],\n },\n displayName: 'Error',\n description: 'A server-side failure, said plainly, with a way onward.',\n};\n\n/** Signed in, and still not allowed. */\nexport const accessDeniedTemplate: ScreenTemplate = {\n name: 'AccessDenied',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n card('denied-card', [\n externalComponent('denied-tag', 'tag', { value: '403', severity: 'warning' }),\n text('denied-title', 'You do not have access to this'),\n text('denied-message', 'Your account is signed in, but it is not allowed here. An administrator can change that.'),\n panel('denied-actions', [\n button('denied-request', 'Request access', { severity: 'primary' }),\n button('denied-home', 'Back to the dashboard', { severity: 'secondary', targetScreen: 'Dashboard' }),\n ]),\n ]),\n ],\n },\n displayName: 'Access denied',\n description: 'A refusal that distinguishes \"not signed in\" from \"not allowed\".',\n};\n\n/** No such address. */\nexport const notFoundTemplate: ScreenTemplate = {\n name: 'NotFound',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n card('not-found-card', [\n externalComponent('not-found-tag', 'tag', { value: '404', severity: 'info' }),\n text('not-found-title', 'That page is not here'),\n text('not-found-message', 'The link may be old, or the thing it pointed at may have been removed.'),\n externalComponent('not-found-search', 'inputText', { placeholder: 'Search instead' }),\n button('not-found-home', 'Back to the dashboard', { severity: 'secondary', targetScreen: 'Dashboard' }),\n ]),\n ],\n },\n displayName: 'Not found',\n description: 'A wrong address, with a search box rather than a dead end.',\n};\n\n/** The page that has to do the selling. */\nexport const landingTemplate: ScreenTemplate = {\n name: 'Landing',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n panel('landing-nav', [\n externalComponent('landing-logo', ComponentName.Logo, { label: 'Contoso', initials: 'C' }),\n button('landing-signin', 'Sign in', { severity: 'secondary', targetScreen: 'Login' }),\n button('landing-start', 'Start free', { severity: 'primary', targetScreen: 'Register' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n card('landing-hero', [\n text('landing-headline', 'Ship the shell on day one'),\n text('landing-subhead', 'Eight menu modes, twenty screen templates and two themes, in one blueprint an application picks once.'),\n button('landing-cta', 'Start free', { severity: 'primary', targetScreen: 'Register' }),\n ]),\n widget('landing-feature-modes', 'Every mode people expect', [text('landing-modes-text', 'Static, overlay, slim, slim+, compact, horizontal, reveal and drawer.')]),\n widget('landing-feature-themes', 'Themeable to the token', [text('landing-themes-text', 'Ten semantic tokens define the whole shell. Swap them and everything follows.')]),\n widget('landing-feature-templates', 'The pages you were going to build anyway', [\n text('landing-templates-text', 'Dashboard, list, detail, form, invoice, settings, help - and every screen around signing in.'),\n ]),\n ],\n [TemplateSlotName.Actions]: [\n panel('landing-footer', [text('landing-copyright', '© Contoso'), button('landing-contact', 'Talk to us', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Landing',\n description: 'The marketing front door, with its own navigation because it has no application chrome.',\n};\n\n/** The four status and marketing templates. */\nexport const statusTemplates: ScreenTemplate[] = [errorTemplate, accessDeniedTemplate, notFoundTemplate, landingTemplate];\n"],"names":["errorTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Body","content","card","externalComponent","value","severity","text","panel","button","targetScreen","displayName","description","accessDeniedTemplate","notFoundTemplate","placeholder","landingTemplate","Header","Actions","ComponentName","Logo","label","initials","widget","statusTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AASA;;;;;;;AAOC,wCAGM,MAAMA,aAAAA,GAAgC;IACzCC,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,gBAAAA,CAAiBC,IAAI,GAAG;AACrBE,YAAAA,IAAAA,CAAK,YAAA,EAAc;AACfC,gBAAAA,iBAAAA,CAAkB,aAAa,KAAA,EAAO;oBAAEC,KAAAA,EAAO,KAAA;oBAAOC,QAAAA,EAAU;AAAS,iBAAA,CAAA;AACzEC,gBAAAA,IAAAA,CAAK,aAAA,EAAe,kCAAA,CAAA;AACpBA,gBAAAA,IAAAA,CAAK,eAAA,EAAiB,uFAAA,CAAA;AACtBC,gBAAAA,KAAAA,CAAM,eAAA,EAAiB;AACnBC,oBAAAA,MAAAA,CAAO,eAAe,WAAA,EAAa;wBAAEH,QAAAA,EAAU;AAAU,qBAAA,CAAA;AACzDG,oBAAAA,MAAAA,CAAO,cAAc,uBAAA,EAAyB;wBAAEH,QAAAA,EAAU,WA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BAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBE,IAAAA;;;"}
|
|
1
|
+
{"version":3,"file":"statusTemplates.js","sources":["../../../gallery/statusTemplates.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 { ComponentName } from '../ComponentName';\nimport { SlotName } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { widget } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The four screens that are not part of anyone's plan: a server error, a refusal, a wrong address, and the\n * page that has to sell the product before any of the others exist.\n *\n * They use the full-page layout for the same reason the sign-in screens do - none of them has navigation\n * to render - and they matter more than their frequency suggests. An error page is the screen most likely\n * to be someone's first impression of how carefully an application was built.\n */\n\n/** Something broke on our side. */\nexport const errorTemplate: ScreenTemplate = {\n name: 'Error',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n card('error-card', [\n externalComponent('error-tag', 'tag', { value: '500', severity: 'danger' }),\n text('error-title', 'Something went wrong on our side'),\n text('error-message', 'The team has been told. Try again in a moment - nothing you were working on was lost.'),\n panel('error-actions', [\n button('error-retry', 'Try again', { severity: 'primary' }),\n button('error-home', 'Back to the dashboard', { severity: 'secondary', targetScreen: 'Dashboard' }),\n ]),\n ]),\n ],\n },\n displayName: 'Error',\n description: 'A server-side failure, said plainly, with a way onward.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Signed in, and still not allowed. */\nexport const accessDeniedTemplate: ScreenTemplate = {\n name: 'AccessDenied',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n card('denied-card', [\n externalComponent('denied-tag', 'tag', { value: '403', severity: 'warning' }),\n text('denied-title', 'You do not have access to this'),\n text('denied-message', 'Your account is signed in, but it is not allowed here. An administrator can change that.'),\n panel('denied-actions', [\n button('denied-request', 'Request access', { severity: 'primary' }),\n button('denied-home', 'Back to the dashboard', { severity: 'secondary', targetScreen: 'Dashboard' }),\n ]),\n ]),\n ],\n },\n displayName: 'Access denied',\n description: 'A refusal that distinguishes \"not signed in\" from \"not allowed\".',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** No such address. */\nexport const notFoundTemplate: ScreenTemplate = {\n name: 'NotFound',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n card('not-found-card', [\n externalComponent('not-found-tag', 'tag', { value: '404', severity: 'info' }),\n text('not-found-title', 'That page is not here'),\n text('not-found-message', 'The link may be old, or the thing it pointed at may have been removed.'),\n externalComponent('not-found-search', 'inputText', { placeholder: 'Search instead' }),\n button('not-found-home', 'Back to the dashboard', { severity: 'secondary', targetScreen: 'Dashboard' }),\n ]),\n ],\n },\n displayName: 'Not found',\n description: 'A wrong address, with a search box rather than a dead end.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The page that has to do the selling. */\nexport const landingTemplate: ScreenTemplate = {\n name: 'Landing',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n panel('landing-nav', [\n externalComponent('landing-logo', ComponentName.Logo, { label: 'Contoso', initials: 'C' }),\n button('landing-signin', 'Sign in', { severity: 'secondary', targetScreen: 'Login' }),\n button('landing-start', 'Start free', { severity: 'primary', targetScreen: 'Register' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n card('landing-hero', [\n text('landing-headline', 'Ship the shell on day one'),\n text('landing-subhead', 'Eight menu modes, twenty screen templates and two themes, in one blueprint an application picks once.'),\n button('landing-cta', 'Start free', { severity: 'primary', targetScreen: 'Register' }),\n ]),\n widget('landing-feature-modes', 'Every mode people expect', [text('landing-modes-text', 'Static, overlay, slim, slim+, compact, horizontal, reveal and drawer.')]),\n widget('landing-feature-themes', 'Themeable to the token', [text('landing-themes-text', 'Ten semantic tokens define the whole shell. Swap them and everything follows.')]),\n widget('landing-feature-templates', 'The pages you were going to build anyway', [\n text('landing-templates-text', 'Dashboard, list, detail, form, invoice, settings, help - and every screen around signing in.'),\n ]),\n ],\n [TemplateSlotName.Actions]: [\n panel('landing-footer', [text('landing-copyright', '© Contoso'), button('landing-contact', 'Talk to us', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Landing',\n description: 'The marketing front door, with its own navigation because it has no application chrome.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The four status and marketing templates. */\nexport const statusTemplates: ScreenTemplate[] = [errorTemplate, accessDeniedTemplate, notFoundTemplate, landingTemplate];\n"],"names":["errorTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Body","content","card","externalComponent","value","severity","text","panel","button","targetScreen","displayName","description","metadata","defaultBlueprintTemplateProvenance","accessDeniedTemplate","notFoundTemplate","placeholder","landingTemplate","Header","Actions","ComponentName","Logo","label","initials","widget","statusTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;AAOC,wCAGM,MAAMA,aAAAA,GAAgC;IACzCC,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAK;AAAE,KAAA;IACxCC,OAAAA,EAAS;QACL,CAACF,gBAAAA,CAAiBC,IAAI,GAAG;AACrBE,YAAAA,IAAAA,CAAK,YAAA,EAAc;AACfC,gBAAAA,iBAAAA,CAAkB,aAAa,KAAA,EAAO;oBAAEC,KAAAA,EAAO,KAAA;oBAAOC,QAAAA,EAAU;AAAS,iBAAA,CAAA;AACzEC,gBAAAA,IAAAA,CAAK,aAAA,EAAe,kCAAA,CAAA;AACp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A,EAA0B,8FAAA;AAClC,aAAA;AACJ,SAAA;QACD,CAACP,gBAAAA,CAAiBoB,OAAO,GAAG;AACxBZ,YAAAA,KAAAA,CAAM,gBAAA,EAAkB;AAACD,gBAAAA,IAAAA,CAAK,mBAAA,EAAqB,WAAA,CAAA;AAAcE,gBAAAA,MAAAA,CAAO,mBAAmB,YAAA,EAAc;oBAAEH,QAAAA,EAAU;AAAY,iBAAA;AAAG,aAAA;AACvI;AACL,KAAA;IACAK,WAAAA,EAAa,SAAA;IACbC,WAAAA,EAAa,yFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,gDACO,MAAMY,eAAAA,GAAoC;AAAChC,IAAAA,aAAAA;AAAeqB,IAAAA,oBAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBE,IAAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportTemplates.d.ts","sourceRoot":"","sources":["../../../gallery/supportTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"supportTemplates.d.ts","sourceRoot":"","sources":["../../../gallery/supportTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAiBrD,eAAO,MAAM,qBAAqB,EAAE,cAwBnC,CAAC;AAGF,eAAO,MAAM,uBAAuB,EAAE,cAyBrC,CAAC;AAGF,eAAO,MAAM,sBAAsB,EAAE,cA8BpC,CAAC;AAGF,eAAO,MAAM,eAAe,EAAE,cAkC7B,CAAC;AAGF,eAAO,MAAM,YAAY,EAAE,cAqB1B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAAc,EAA4G,CAAC"}
|
|
@@ -6,6 +6,7 @@ import '../layouts/fullPage.js';
|
|
|
6
6
|
import { TemplateSlotName } from './TemplateSlotName.js';
|
|
7
7
|
import { card, text, externalComponent, button } from './elements.js';
|
|
8
8
|
import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
9
|
+
import { defaultBlueprintTemplateProvenance } from '../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.
|
|
@@ -48,7 +49,10 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
48
49
|
]
|
|
49
50
|
},
|
|
50
51
|
displayName: 'Documentation',
|
|
51
|
-
description: 'Prose with a table of contents beside it.'
|
|
52
|
+
description: 'Prose with a table of contents beside it.',
|
|
53
|
+
metadata: {
|
|
54
|
+
...defaultBlueprintTemplateProvenance
|
|
55
|
+
}
|
|
52
56
|
};
|
|
53
57
|
/** Profile settings: the signed-in user editing their own account. */ const profileSettingsTemplate = {
|
|
54
58
|
name: 'ProfileSettings',
|
|
@@ -103,7 +107,10 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
103
107
|
]
|
|
104
108
|
},
|
|
105
109
|
displayName: 'Profile settings',
|
|
106
|
-
description: 'The signed-in user editing their own name, photo, password and notifications.'
|
|
110
|
+
description: 'The signed-in user editing their own name, photo, password and notifications.',
|
|
111
|
+
metadata: {
|
|
112
|
+
...defaultBlueprintTemplateProvenance
|
|
113
|
+
}
|
|
107
114
|
};
|
|
108
115
|
/** User management: administering everybody else. */ const userManagementTemplate = {
|
|
109
116
|
name: 'UserManagement',
|
|
@@ -180,7 +187,10 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
180
187
|
]
|
|
181
188
|
},
|
|
182
189
|
displayName: 'User management',
|
|
183
|
-
description: 'The people table, with roles, status and an invitation action.'
|
|
190
|
+
description: 'The people table, with roles, status and an invitation action.',
|
|
191
|
+
metadata: {
|
|
192
|
+
...defaultBlueprintTemplateProvenance
|
|
193
|
+
}
|
|
184
194
|
};
|
|
185
195
|
/** Invoice: a printable document, which is a different shape from a screen. */ const invoiceTemplate = {
|
|
186
196
|
name: 'Invoice',
|
|
@@ -258,7 +268,10 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
258
268
|
]
|
|
259
269
|
},
|
|
260
270
|
displayName: 'Invoice',
|
|
261
|
-
description: 'A printable document: parties, line items and totals.'
|
|
271
|
+
description: 'A printable document: parties, line items and totals.',
|
|
272
|
+
metadata: {
|
|
273
|
+
...defaultBlueprintTemplateProvenance
|
|
274
|
+
}
|
|
262
275
|
};
|
|
263
276
|
/** Help: the answers, and a way to ask when they are not there. */ const helpTemplate = {
|
|
264
277
|
name: 'Help',
|
|
@@ -298,7 +311,10 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
298
311
|
]
|
|
299
312
|
},
|
|
300
313
|
displayName: 'Help',
|
|
301
|
-
description: 'Searchable answers with a route to a human.'
|
|
314
|
+
description: 'Searchable answers with a route to a human.',
|
|
315
|
+
metadata: {
|
|
316
|
+
...defaultBlueprintTemplateProvenance
|
|
317
|
+
}
|
|
302
318
|
};
|
|
303
319
|
/** The five support templates. */ const supportTemplates = [
|
|
304
320
|
documentationTemplate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"supportTemplates.js","sources":["../../../gallery/supportTemplates.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 } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { field, formActions, pageHeader, table, widget } from './widgets';\n\n/**\n * The five shapes an application needs that are not the CRUD loop: documentation, the signed-in user's own\n * settings, user administration, a printable document, and help.\n *\n * They are in the set because leaving them out is what makes a template line feel thin. Every real\n * application grows all five, and the ones that were never designed are the ones that end up looking like\n * a different product.\n */\n\n/** Documentation: a table of contents beside prose. */\nexport const documentationTemplate: ScreenTemplate = {\n name: 'Documentation',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.SidePanel }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.SidePanel]: [\n widget('docs-toc', 'On this page', [\n text('docs-toc-1', 'Getting started'),\n text('docs-toc-2', 'Configuring the shell'),\n text('docs-toc-3', 'Themes'),\n text('docs-toc-4', 'Publishing a blueprint'),\n ]),\n ],\n [TemplateSlotName.Body]: [\n pageHeader('docs-header', 'Getting started', 'Everything you need to run the blueprint locally'),\n card('docs-body', [\n text('docs-intro', 'Install the blueprint, add it to a ui profile, and pick a layout. The shell reads its mode from the configurator and remembers it.'),\n externalComponent('docs-note', 'message', { severity: 'info', text: 'The shell needs its stylesheet imported once, at the host.' }),\n ]),\n ],\n },\n displayName: 'Documentation',\n description: 'Prose with a table of contents beside it.',\n};\n\n/** Profile settings: the signed-in user editing their own account. */\nexport const profileSettingsTemplate: ScreenTemplate = {\n name: 'ProfileSettings',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('profile-header', 'Your profile', 'How you appear to everyone else in the workspace')],\n [TemplateSlotName.Body]: [\n card('profile-identity', [\n externalComponent('profile-avatar', 'avatar', { label: 'AN', size: 'large', shape: 'circle' }),\n field('profile-name', 'Display name', 'inputText', { value: 'Amelia Nyquist' }),\n field('profile-email', 'Email', 'inputText', { value: 'amelia@contoso.com' }),\n externalComponent('profile-photo', 'image', { alt: 'Your current photo' }),\n button('profile-photo-change', 'Change photo', { severity: 'secondary' }),\n ]),\n card('profile-security', [\n field('profile-current', 'Current password', 'password', {}),\n field('profile-new', 'New password', 'password', { feedback: true }),\n field('profile-notify', 'Email me about mentions', 'checkbox', { checked: true }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('profile-actions', 'Save changes')],\n },\n displayName: 'Profile settings',\n description: 'The signed-in user editing their own name, photo, password and notifications.',\n};\n\n/** User management: administering everybody else. */\nexport const userManagementTemplate: ScreenTemplate = {\n name: 'UserManagement',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('users-header', 'Users', '34 people, 3 pending invitations', [button('users-invite', 'Invite people', { severity: 'primary', icon: 'pi pi-user-plus' })]),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'users-table',\n [\n { field: 'name', header: 'Name' },\n { field: 'email', header: 'Email' },\n { field: 'role', header: 'Role' },\n { field: 'status', header: 'Status' },\n { field: 'lastSeen', header: 'Last seen' },\n ],\n [\n { name: 'Amelia Nyquist', email: 'amelia@contoso.com', role: 'Owner', status: 'Active', lastSeen: '2 minutes ago' },\n { name: 'Bjørn Holt', email: 'bjorn@contoso.com', role: 'Administrator', status: 'Active', lastSeen: 'Yesterday' },\n { name: 'Chidi Okafor', email: 'chidi@contoso.com', role: 'Editor', status: 'Active', lastSeen: '3 days ago' },\n { name: 'Dana Whitfield', email: 'dana@contoso.com', role: 'Viewer', status: 'Invited', lastSeen: 'Never' },\n ],\n ),\n ],\n },\n displayName: 'User management',\n description: 'The people table, with roles, status and an invitation action.',\n};\n\n/** Invoice: a printable document, which is a different shape from a screen. */\nexport const invoiceTemplate: ScreenTemplate = {\n name: 'Invoice',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('invoice-header', 'Invoice INV-2043', 'Issued 4 March · Due 3 April', [button('invoice-print', 'Print', { severity: 'secondary', icon: 'pi pi-print' })]),\n ],\n [TemplateSlotName.Body]: [\n card('invoice-parties', [\n text('invoice-from', 'From: Contoso Ltd, 4 Chandler Street, Dublin'),\n text('invoice-to', 'To: Northwind Traders, 18 Quay Road, Cork'),\n ]),\n table(\n 'invoice-lines',\n [\n { field: 'description', header: 'Description' },\n { field: 'quantity', header: 'Quantity' },\n { field: 'unitPrice', header: 'Unit price' },\n { field: 'amount', header: 'Amount' },\n ],\n [\n { description: 'Bamboo Watch', quantity: 12, unitPrice: '$65.00', amount: '$780.00' },\n { description: 'Blue Band', quantity: 4, unitPrice: '$79.00', amount: '$316.00' },\n { description: 'Expedited shipping', quantity: 1, unitPrice: '$144.00', amount: '$144.00' },\n ],\n ),\n card('invoice-total', [text('invoice-subtotal', 'Subtotal: $1,240.00'), text('invoice-vat', 'VAT (23%): $285.20'), text('invoice-due', 'Total due: $1,525.20')]),\n ],\n [TemplateSlotName.Actions]: [formActions('invoice-actions', 'Mark as paid', 'Send reminder')],\n },\n displayName: 'Invoice',\n description: 'A printable document: parties, line items and totals.',\n};\n\n/** Help: the answers, and a way to ask when they are not there. */\nexport const helpTemplate: ScreenTemplate = {\n name: 'Help',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('help-header', 'Help', 'Search the answers, or ask us directly')],\n [TemplateSlotName.Body]: [\n externalComponent('help-search', 'inputText', { placeholder: 'Search help' }),\n widget('help-popular', 'Popular answers', [\n text('help-1', 'How do I invite someone to the workspace?'),\n text('help-2', 'Why can I not see the sidebar on my phone?'),\n text('help-3', 'How do I change the theme?'),\n ]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('help-contact', 'Still stuck?', [text('help-contact-text', 'We answer within one working day.'), button('help-contact-button', 'Contact support', { severity: 'primary' })]),\n ],\n },\n displayName: 'Help',\n description: 'Searchable answers with a route to a human.',\n};\n\n/** The five support templates. */\nexport const supportTemplates: ScreenTemplate[] = [documentationTemplate, profileSettingsTemplate, userManagementTemplate, invoiceTemplate, helpTemplate];\n"],"names":["documentationTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","SidePanel","Body","content","widget","text","pageHeader","card","externalComponent","severity","displayName","description","profileSettingsTemplate","Header","Actions","label","size","shape","field","value","alt","button","feedback","checked","formActions","userManagementTemplate","Toolbar","icon","table","header","email","role","status","lastSeen","invoiceTemplate","quantity","unitPrice","amount","helpTemplate","placeholder","supportTemplates"],"mappings":";;;;;;;;;AAAA;AACA;AAQA;;;;;;;AAOC,4DAGM,MAAMA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAU,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK;AAAE,KAAA;IAC9EC,OAAAA,EAAS;QACL,CAACH,gBAAAA,CAAiBC,SAAS,GAAG;AAC1BG,YAAAA,MAAAA,CAAO,YAAY,cAAA,EAAgB;AAC/BC,gBAAAA,IAAAA,CAAK,YAAA,EAAc,iBAAA,CAAA;AACnBA,gBAAAA,IAAAA,CAAK,YAAA,EAAc,uBAAA,CAAA;AACnBA,gBAAAA,IAAAA,CAAK,YAAA,EAAc,QAAA,CAAA;AACnBA,gBAAAA,IAAAA,CAAK,YAAA,EAAc,wBAAA;AACtB,aAAA;AACJ,SAAA;QACD,CAACL,gBAAAA,CAAiBE,IAAI,GAAG;AACrBI,YAAAA,UAAAA,CAAW,eAAe,iBAAA,EAAmB,kDAAA,CAAA;AAC7CC,YAAAA,IAAAA,CAAK,WAAA,EAAa;AACdF,gBAAAA,IAAAA,CAAK,YAAA,EAAc,oIAAA,CAAA;AACnBG,gBAAAA,iBAAAA,CAAkB,aAAa,SAAA,EAAW;oBAAEC,QAAAA,EAAU,MAAA;oBAAQJ,IAAAA,EAAM;AAA6D,iBAAA;AACpI,aAAA;AACJ;AACL,KAAA;IACAK,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,uEACO,MAAMC,uBAAAA,GAA0C;IACnDjB,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,O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AU;AAAU,iBAAA;AAAG,aAAA;AACrL;AACL,KAAA;IACAC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,mCACO,MAAM6B,gBAAAA,GAAqC;AAAC9C,IAAAA,qBAAAA;AAAuBkB,IAAAA,uBAAAA;AAAyBa,IAAAA,sBAAAA;AAAwBS,IAAAA,eAAAA;AAAiBI,IAAAA;;;"}
|
|
1
|
+
{"version":3,"file":"supportTemplates.js","sources":["../../../gallery/supportTemplates.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 } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { field, formActions, pageHeader, table, widget } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The five shapes an application needs that are not the CRUD loop: documentation, the signed-in user's own\n * settings, user administration, a printable document, and help.\n *\n * They are in the set because leaving them out is what makes a template line feel thin. Every real\n * application grows all five, and the ones that were never designed are the ones that end up looking like\n * a different product.\n */\n\n/** Documentation: a table of contents beside prose. */\nexport const documentationTemplate: ScreenTemplate = {\n name: 'Documentation',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.SidePanel }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.SidePanel]: [\n widget('docs-toc', 'On this page', [\n text('docs-toc-1', 'Getting started'),\n text('docs-toc-2', 'Configuring the shell'),\n text('docs-toc-3', 'Themes'),\n text('docs-toc-4', 'Publishing a blueprint'),\n ]),\n ],\n [TemplateSlotName.Body]: [\n pageHeader('docs-header', 'Getting started', 'Everything you need to run the blueprint locally'),\n card('docs-body', [\n text('docs-intro', 'Install the blueprint, add it to a ui profile, and pick a layout. The shell reads its mode from the configurator and remembers it.'),\n externalComponent('docs-note', 'message', { severity: 'info', text: 'The shell needs its stylesheet imported once, at the host.' }),\n ]),\n ],\n },\n displayName: 'Documentation',\n description: 'Prose with a table of contents beside it.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Profile settings: the signed-in user editing their own account. */\nexport const profileSettingsTemplate: ScreenTemplate = {\n name: 'ProfileSettings',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('profile-header', 'Your profile', 'How you appear to everyone else in the workspace')],\n [TemplateSlotName.Body]: [\n card('profile-identity', [\n externalComponent('profile-avatar', 'avatar', { label: 'AN', size: 'large', shape: 'circle' }),\n field('profile-name', 'Display name', 'inputText', { value: 'Amelia Nyquist' }),\n field('profile-email', 'Email', 'inputText', { value: 'amelia@contoso.com' }),\n externalComponent('profile-photo', 'image', { alt: 'Your current photo' }),\n button('profile-photo-change', 'Change photo', { severity: 'secondary' }),\n ]),\n card('profile-security', [\n field('profile-current', 'Current password', 'password', {}),\n field('profile-new', 'New password', 'password', { feedback: true }),\n field('profile-notify', 'Email me about mentions', 'checkbox', { checked: true }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('profile-actions', 'Save changes')],\n },\n displayName: 'Profile settings',\n description: 'The signed-in user editing their own name, photo, password and notifications.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** User management: administering everybody else. */\nexport const userManagementTemplate: ScreenTemplate = {\n name: 'UserManagement',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('users-header', 'Users', '34 people, 3 pending invitations', [button('users-invite', 'Invite people', { severity: 'primary', icon: 'pi pi-user-plus' })]),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'users-table',\n [\n { field: 'name', header: 'Name' },\n { field: 'email', header: 'Email' },\n { field: 'role', header: 'Role' },\n { field: 'status', header: 'Status' },\n { field: 'lastSeen', header: 'Last seen' },\n ],\n [\n { name: 'Amelia Nyquist', email: 'amelia@contoso.com', role: 'Owner', status: 'Active', lastSeen: '2 minutes ago' },\n { name: 'Bjørn Holt', email: 'bjorn@contoso.com', role: 'Administrator', status: 'Active', lastSeen: 'Yesterday' },\n { name: 'Chidi Okafor', email: 'chidi@contoso.com', role: 'Editor', status: 'Active', lastSeen: '3 days ago' },\n { name: 'Dana Whitfield', email: 'dana@contoso.com', role: 'Viewer', status: 'Invited', lastSeen: 'Never' },\n ],\n ),\n ],\n },\n displayName: 'User management',\n description: 'The people table, with roles, status and an invitation action.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Invoice: a printable document, which is a different shape from a screen. */\nexport const invoiceTemplate: ScreenTemplate = {\n name: 'Invoice',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('invoice-header', 'Invoice INV-2043', 'Issued 4 March · Due 3 April', [button('invoice-print', 'Print', { severity: 'secondary', icon: 'pi pi-print' })]),\n ],\n [TemplateSlotName.Body]: [\n card('invoice-parties', [\n text('invoice-from', 'From: Contoso Ltd, 4 Chandler Street, Dublin'),\n text('invoice-to', 'To: Northwind Traders, 18 Quay Road, Cork'),\n ]),\n table(\n 'invoice-lines',\n [\n { field: 'description', header: 'Description' },\n { field: 'quantity', header: 'Quantity' },\n { field: 'unitPrice', header: 'Unit price' },\n { field: 'amount', header: 'Amount' },\n ],\n [\n { description: 'Bamboo Watch', quantity: 12, unitPrice: '$65.00', amount: '$780.00' },\n { description: 'Blue Band', quantity: 4, unitPrice: '$79.00', amount: '$316.00' },\n { description: 'Expedited shipping', quantity: 1, unitPrice: '$144.00', amount: '$144.00' },\n ],\n ),\n card('invoice-total', [text('invoice-subtotal', 'Subtotal: $1,240.00'), text('invoice-vat', 'VAT (23%): $285.20'), text('invoice-due', 'Total due: $1,525.20')]),\n ],\n [TemplateSlotName.Actions]: [formActions('invoice-actions', 'Mark as paid', 'Send reminder')],\n },\n displayName: 'Invoice',\n description: 'A printable document: parties, line items and totals.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Help: the answers, and a way to ask when they are not there. */\nexport const helpTemplate: ScreenTemplate = {\n name: 'Help',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('help-header', 'Help', 'Search the answers, or ask us directly')],\n [TemplateSlotName.Body]: [\n externalComponent('help-search', 'inputText', { placeholder: 'Search help' }),\n widget('help-popular', 'Popular answers', [\n text('help-1', 'How do I invite someone to the workspace?'),\n text('help-2', 'Why can I not see the sidebar on my phone?'),\n text('help-3', 'How do I change the theme?'),\n ]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('help-contact', 'Still stuck?', [text('help-contact-text', 'We answer within one working day.'), button('help-contact-button', 'Contact support', { severity: 'primary' })]),\n ],\n },\n displayName: 'Help',\n description: 'Searchable answers with a route to a human.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The five support templates. */\nexport const supportTemplates: ScreenTemplate[] = [documentationTemplate, profileSettingsTemplate, userManagementTemplate, invoiceTemplate, helpTemplate];\n"],"names":["documentationTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","SidePanel","Body","content","widget","text","pageHeader","card","externalComponent","severity","displayName","description","metadata","defaultBlueprintTemplateProvenance","profileSettingsTemplate","Header","Actions","label","size","shape","field","value","alt","button","feedback","checked","formActions","userManagementTemplate","Toolbar","icon","table","header","email","role","status","lastSeen","invoiceTemplate","quantity","unitPrice","amount","helpTemplate","placeholder","supportTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AASA;;;;;;;AAOC,4DAGM,MAAMA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC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AAAG,aAAA;AACrL;AACL,KAAA;IACAC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,6CAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,mCACO,MAAM6B,gBAAAA,GAAqC;AAAChD,IAAAA,qBAAAA;AAAuBoB,IAAAA,uBAAAA;AAAyBa,IAAAA,sBAAAA;AAAwBS,IAAAA,eAAAA;AAAiBI,IAAAA;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaceTemplates.d.ts","sourceRoot":"","sources":["../../../gallery/workspaceTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"workspaceTemplates.d.ts","sourceRoot":"","sources":["../../../gallery/workspaceTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AA0BrE,eAAO,MAAM,iBAAiB,EAAE,cA+D/B,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAmC9B,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,cA4BhC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAqB9B,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,cAY3B,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAA+F,CAAC"}
|
|
@@ -7,6 +7,7 @@ import '../layouts/fullPage.js';
|
|
|
7
7
|
import { TemplateSlotName } from './TemplateSlotName.js';
|
|
8
8
|
import { button, externalComponent, card, text } from './elements.js';
|
|
9
9
|
import { widget, table, statCard, pageHeader, formActions, emptyState, field } from './widgets.js';
|
|
10
|
+
import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
10
11
|
|
|
11
12
|
// Copyright (c) Cratis. All rights reserved.
|
|
12
13
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
@@ -166,7 +167,10 @@ import { widget, table, statCard, pageHeader, formActions, emptyState, field } f
|
|
|
166
167
|
]
|
|
167
168
|
},
|
|
168
169
|
displayName: 'Dashboard',
|
|
169
|
-
description: 'Four stat cards over two columns of widgets - the composition every template line opens with.'
|
|
170
|
+
description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',
|
|
171
|
+
metadata: {
|
|
172
|
+
...sakaiCompositionProvenance
|
|
173
|
+
}
|
|
170
174
|
};
|
|
171
175
|
/** The list: a filter toolbar, a real table, and the row actions a list needs. */ const crudListTemplate = {
|
|
172
176
|
name: 'CrudList',
|
|
@@ -257,7 +261,10 @@ import { widget, table, statCard, pageHeader, formActions, emptyState, field } f
|
|
|
257
261
|
]
|
|
258
262
|
},
|
|
259
263
|
displayName: 'List',
|
|
260
|
-
description: 'A searchable table with a header, primary action and row data.'
|
|
264
|
+
description: 'A searchable table with a header, primary action and row data.',
|
|
265
|
+
metadata: {
|
|
266
|
+
...defaultBlueprintTemplateProvenance
|
|
267
|
+
}
|
|
261
268
|
};
|
|
262
269
|
/** The detail: a summary panel beside the record's own sections. */ const detailViewTemplate = {
|
|
263
270
|
name: 'DetailView',
|
|
@@ -308,7 +315,10 @@ import { widget, table, statCard, pageHeader, formActions, emptyState, field } f
|
|
|
308
315
|
]
|
|
309
316
|
},
|
|
310
317
|
displayName: 'Detail',
|
|
311
|
-
description: 'One record: a header with actions, its sections, and a summary panel.'
|
|
318
|
+
description: 'One record: a header with actions, its sections, and a summary panel.',
|
|
319
|
+
metadata: {
|
|
320
|
+
...defaultBlueprintTemplateProvenance
|
|
321
|
+
}
|
|
312
322
|
};
|
|
313
323
|
/** The form: fields, grouped, with the actions that close them. */ const formPageTemplate = {
|
|
314
324
|
name: 'FormPage',
|
|
@@ -358,7 +368,10 @@ import { widget, table, statCard, pageHeader, formActions, emptyState, field } f
|
|
|
358
368
|
]
|
|
359
369
|
},
|
|
360
370
|
displayName: 'Form',
|
|
361
|
-
description: 'A grouped form with the field types an application actually uses.'
|
|
371
|
+
description: 'A grouped form with the field types an application actually uses.',
|
|
372
|
+
metadata: {
|
|
373
|
+
...defaultBlueprintTemplateProvenance
|
|
374
|
+
}
|
|
362
375
|
};
|
|
363
376
|
/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */ const emptyTemplate = {
|
|
364
377
|
name: 'Empty',
|
|
@@ -374,7 +387,10 @@ import { widget, table, statCard, pageHeader, formActions, emptyState, field } f
|
|
|
374
387
|
]
|
|
375
388
|
},
|
|
376
389
|
displayName: 'Empty state',
|
|
377
|
-
description: 'The designed empty state for a list that has nothing in it yet.'
|
|
390
|
+
description: 'The designed empty state for a list that has nothing in it yet.',
|
|
391
|
+
metadata: {
|
|
392
|
+
...defaultBlueprintTemplateProvenance
|
|
393
|
+
}
|
|
378
394
|
};
|
|
379
395
|
/** The five workspace templates. */ const workspaceTemplates = [
|
|
380
396
|
dashboardTemplate,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaceTemplates.js","sources":["../../../gallery/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, column, grid, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { emptyState, field, formActions, pageHeader, statCard, table, widget } from './widgets';\n\n/**\n * The five workhorse shapes inside an application shell: a dashboard, a list, a detail, a form and the\n * designed empty state.\n *\n * Every one fits the layout's `content` slot, and every one carries realistic seeded content rather than\n * placeholder text. A gallery whose dashboard shows four boxes labeled \"Card\" proves the renderer runs; a\n * gallery whose dashboard shows revenue, orders, customers and a real table proves the blueprint is worth\n * starting an application from.\n */\n\n/**\n * The dashboard: four figures across the top, then two columns of larger widgets.\n *\n * This is Sakai's composition, and the reason to copy it is that it is the arrangement people already read\n * fluently - the eye takes the row of numbers first and then settles into the detail.\n *\n * Its own arrangement collapses the two columns into one at a compact width, because a two-column widget\n * grid on a phone is two columns of unreadable slivers.\n */\nexport const dashboardTemplate: ScreenTemplate = {\n name: 'Dashboard',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Stats }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Stats), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Stats), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Stats]: [\n statCard('stat-revenue', 'Revenue', '$284,120', '+12.4% this month', 'pi pi-dollar'),\n statCard('stat-orders', 'Orders', '1,842', '+3.1% this month', 'pi pi-shopping-cart'),\n statCard('stat-customers', 'Customers', '9,410', '+128 new', 'pi pi-users'),\n statCard('stat-open', 'Open tickets', '17', '-4 since Monday', 'pi pi-inbox'),\n ],\n [TemplateSlotName.Primary]: [\n widget('widget-revenue', 'Revenue over time', [\n table(\n 'revenue-table',\n [\n { field: 'month', header: 'Month' },\n { field: 'revenue', header: 'Revenue' },\n { field: 'change', header: 'Change' },\n ],\n [\n { month: 'March', revenue: '$284,120', change: '+12.4%' },\n { month: 'February', revenue: '$252,780', change: '+4.1%' },\n { month: 'January', revenue: '$242,830', change: '-1.8%' },\n { month: 'December', revenue: '$247,290', change: '+9.6%' },\n ],\n ),\n ]),\n widget('widget-orders', 'Recent orders', [\n table(\n 'orders-table',\n [\n { field: 'reference', header: 'Reference' },\n { field: 'customer', header: 'Customer' },\n { field: 'total', header: 'Total' },\n { field: 'status', header: 'Status' },\n ],\n [\n { reference: 'ORD-4192', customer: 'Northwind Traders', total: '$1,240.00', status: 'Shipped' },\n { reference: 'ORD-4191', customer: 'Contoso Ltd', total: '$318.50', status: 'Packing' },\n { reference: 'ORD-4188', customer: 'Fabrikam', total: '$2,980.00', status: 'Awaiting payment' },\n { reference: 'ORD-4184', customer: 'Adventure Works', total: '$76.20', status: 'Shipped' },\n ],\n ),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n widget('widget-activity', 'Activity', [externalComponent('activity-timeline', 'timeline', { align: 'left' })]),\n widget('widget-capacity', 'Warehouse capacity', [externalComponent('capacity-bar', 'progressBar', { value: 68 })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n};\n\n/** The list: a filter toolbar, a real table, and the row actions a list needs. */\nexport const crudListTemplate: ScreenTemplate = {\n name: 'CrudList',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('crud-header', 'Products', '412 products across 9 categories', [\n button('crud-new', 'New product', { severity: 'primary', icon: 'pi pi-plus' }),\n button('crud-import', 'Import', { severity: 'secondary', icon: 'pi pi-upload' }),\n ]),\n externalComponent('crud-search', 'inputText', { placeholder: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, detailViewTemplate, formPageTemplate, emptyTemplate];\n"],"names":["dashboardTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Stats","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","statCard","widget","table","field","header","month","revenue","change","reference","customer","total","status","externalComponent","align","value","displayName","description","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","code","category","price","stock","detailViewTemplate","Header","SidePanel","text","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAM,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAQ,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBG;AAAU;AAAE,KAAA;IACnHC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;AAACC,YAAAA,QAAAA,CAASP,iBAAiBC,K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A,EAAS;AAAC,wBAAA,aAAA;AAAe,wBAAA,UAAA;AAAY,wBAAA;AAAU;AAAC,iBAAA,CAAA;gBACjGjC,KAAAA,CAAM,YAAA,EAAc,SAAS,aAAA,EAAe;oBAAEkC,IAAAA,EAAM,UAAA;oBAAYC,QAAAA,EAAU;AAAM,iBAAA,CAAA;gBAChFnC,KAAAA,CAAM,gBAAA,EAAkB,gBAAA,EAAkB,UAAA,EAAY,EAAC,CAAA;gBACvDA,KAAAA,CAAM,YAAA,EAAc,SAAS,eAAA,EAAiB;oBAAEoC,IAAAA,EAAM;AAAE,iBAAA;AAC3D,aAAA;AACJ,SAAA;QACD,CAACtD,gBAAAA,CAAiBiD,OAAO,GAAG;AAACM,YAAAA,WAAAA,CAAY,cAAA,EAAgB,gBAAA;AAAkB;AAC/E,KAAA;IACAzB,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,4GACO,MAAMyB,aAAAA,GAAgC;IACzC7D,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBkC;AAAK;AAAE,KAAA;IACxCpB,OAAAA,EAAS;QACL,CAACd,gBAAAA,CAAiBkC,IAAI,GAAG;YACrBuB,UAAAA,CAAW,aAAA,EAAe,mBAAmB,sEAAA,EAAwE,0BAAA;AACxH;AACL,KAAA;IACA3B,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAM2B,kBAAAA,GAAuC;AAAChE,IAAAA,iBAAAA;AAAmBsC,IAAAA,gBAAAA;AAAkBY,IAAAA,kBAAAA;AAAoBI,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;"}
|
|
1
|
+
{"version":3,"file":"workspaceTemplates.js","sources":["../../../gallery/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, column, grid, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { emptyState, field, formActions, pageHeader, statCard, table, widget } from './widgets';\nimport { defaultBlueprintTemplateProvenance, sakaiCompositionProvenance } from '../templateProvenance';\n\n/**\n * The five workhorse shapes inside an application shell: a dashboard, a list, a detail, a form and the\n * designed empty state.\n *\n * Every one fits the layout's `content` slot, and every one carries realistic seeded content rather than\n * placeholder text. A gallery whose dashboard shows four boxes labeled \"Card\" proves the renderer runs; a\n * gallery whose dashboard shows revenue, orders, customers and a real table proves the blueprint is worth\n * starting an application from.\n */\n\n/**\n * The dashboard: four figures across the top, then two columns of larger widgets.\n *\n * This is Sakai's composition, and the reason to copy it is that it is the arrangement people already read\n * fluently - the eye takes the row of numbers first and then settles into the detail.\n *\n * Its own arrangement collapses the two columns into one at a compact width, because a two-column widget\n * grid on a phone is two columns of unreadable slivers.\n */\nexport const dashboardTemplate: ScreenTemplate = {\n name: 'Dashboard',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Stats }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Stats), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Stats), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Stats]: [\n statCard('stat-revenue', 'Revenue', '$284,120', '+12.4% this month', 'pi pi-dollar'),\n statCard('stat-orders', 'Orders', '1,842', '+3.1% this month', 'pi pi-shopping-cart'),\n statCard('stat-customers', 'Customers', '9,410', '+128 new', 'pi pi-users'),\n statCard('stat-open', 'Open tickets', '17', '-4 since Monday', 'pi pi-inbox'),\n ],\n [TemplateSlotName.Primary]: [\n widget('widget-revenue', 'Revenue over time', [\n table(\n 'revenue-table',\n [\n { field: 'month', header: 'Month' },\n { field: 'revenue', header: 'Revenue' },\n { field: 'change', header: 'Change' },\n ],\n [\n { month: 'March', revenue: '$284,120', change: '+12.4%' },\n { month: 'February', revenue: '$252,780', change: '+4.1%' },\n { month: 'January', revenue: '$242,830', change: '-1.8%' },\n { month: 'December', revenue: '$247,290', change: '+9.6%' },\n ],\n ),\n ]),\n widget('widget-orders', 'Recent orders', [\n table(\n 'orders-table',\n [\n { field: 'reference', header: 'Reference' },\n { field: 'customer', header: 'Customer' },\n { field: 'total', header: 'Total' },\n { field: 'status', header: 'Status' },\n ],\n [\n { reference: 'ORD-4192', customer: 'Northwind Traders', total: '$1,240.00', status: 'Shipped' },\n { reference: 'ORD-4191', customer: 'Contoso Ltd', total: '$318.50', status: 'Packing' },\n { reference: 'ORD-4188', customer: 'Fabrikam', total: '$2,980.00', status: 'Awaiting payment' },\n { reference: 'ORD-4184', customer: 'Adventure Works', total: '$76.20', status: 'Shipped' },\n ],\n ),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n widget('widget-activity', 'Activity', [externalComponent('activity-timeline', 'timeline', { align: 'left' })]),\n widget('widget-capacity', 'Warehouse capacity', [externalComponent('capacity-bar', 'progressBar', { value: 68 })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n metadata: { ...sakaiCompositionProvenance },\n};\n\n/** The list: a filter toolbar, a real table, and the row actions a list needs. */\nexport const crudListTemplate: ScreenTemplate = {\n name: 'CrudList',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('crud-header', 'Products', '412 products across 9 categories', [\n button('crud-new', 'New product', { severity: 'primary', icon: 'pi pi-plus' }),\n button('crud-import', 'Import', { severity: 'secondary', icon: 'pi pi-upload' }),\n ]),\n externalComponent('crud-search', 'inputText', { placeholder: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, detailViewTemplate, formPageTemplate, emptyTemplate];\n"],"names":["dashboardTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Stats","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","statCard","widget","table","field","header","month","revenue","change","reference","customer","total","status","externalComponent","align","value","displayName","description","metadata","sakaiCompositionProvenance","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","code","category","price","stock","defaultBlueprintTemplateProvenance","detailViewTemplate","Header","SidePanel","text","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAM,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAQ,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBG;AAAU;AAAE,KAAA;IACnHC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;AAACC,YAAAA,QAAAA,CAASP,iBAAiBC,KAAK,CAAA;YAAGO,IAAAA,CAAK;gBAACD,QAAAA,CAASP,gBAAAA,CAAiBE,OAAO,EAAE;oBAAEO,IAAAA,EAAM;AAAE,iBAAA,CAAA;AAAIF,gBAAAA,QAAAA,CAASP,iBAAiBG,SAAS;AAAE,aAAA,EAAE,CAAA,EAAG,EAAA;AAAI,SAAA,CAAA;QACrJO,SAAAA,EAAW;AACP,YAAA;AACIC,gBAAAA,KAAAA,EAAOC,eAAeC,OAAO;AAC7BR,gBAAAA,IAAAA,EAAMC,MAAAA,CAAO;AAACC,oBAAAA,QAAAA,CAASP,iBAAiBC,KAAK,CAAA;AAAGM,oBAAAA,QAAAA,CAASP,iBAAiBE,OAAO,CAAA;AAAGK,oBAAAA,QAAAA,CAASP,i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EAAc,SAAS,eAAA,EAAiB;oBAAEuC,IAAAA,EAAM;AAAE,iBAAA;AAC3D,aAAA;AACJ,SAAA;QACD,CAACzD,gBAAAA,CAAiBoD,OAAO,GAAG;AAACM,YAAAA,WAAAA,CAAY,cAAA,EAAgB,gBAAA;AAAkB;AAC/E,KAAA;IACA5B,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,mEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGc;AAAmC;AACtD;AAEA,4GACO,MAAMa,aAAAA,GAAgC;IACzChE,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBoC;AAAK;AAAE,KAAA;IACxCtB,OAAAA,EAAS;QACL,CAACd,gBAAAA,CAAiBoC,IAAI,GAAG;YACrBwB,UAAAA,CAAW,aAAA,EAAe,mBAAmB,sEAAA,EAAwE,0BAAA;AACxH;AACL,KAAA;IACA9B,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,iEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGc;AAAmC;AACtD;AAEA,qCACO,MAAMe,kBAAAA,GAAuC;AAACnE,IAAAA,iBAAAA;AAAmBwC,IAAAA,gBAAAA;AAAkBa,IAAAA,kBAAAA;AAAoBI,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;"}
|
package/dist/esm/index.d.ts
CHANGED
package/dist/esm/index.d.ts.map
CHANGED
|
@@ -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,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,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,WAAW,CAAC;AAC1B,cAAc,WAAW,CAAC;AAC1B,cAAc,SAAS,CAAC;AACxB,cAAc,UAAU,CAAC;AACzB,cAAc,8BAA8B,CAAC;AAC7C,cAAc,oBAAoB,CAAC;AACnC,cAAc,sBAAsB,CAAC"}
|
package/dist/esm/index.js
CHANGED
|
@@ -57,4 +57,5 @@ export { defaultBlueprintThemes } from './themes/defaultBlueprintThemes.js';
|
|
|
57
57
|
export { LayoutThemeProvider } from './themes/LayoutThemeProvider.js';
|
|
58
58
|
export { defaultBlueprintComponents } from './defaultBlueprintComponents.js';
|
|
59
59
|
export { defaultBlueprint, defaultBlueprintManifest } from './defaultBlueprint.js';
|
|
60
|
+
export { defaultBlueprintTemplateProvenance, sakaiCompositionProvenance } from './templateProvenance.js';
|
|
60
61
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appShell.d.ts","sourceRoot":"","sources":["../../../layouts/appShell.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAmB,MAAM,EAAkB,MAAM,qBAAqB,CAAC;
|
|
1
|
+
{"version":3,"file":"appShell.d.ts","sourceRoot":"","sources":["../../../layouts/appShell.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAmB,MAAM,EAAkB,MAAM,qBAAqB,CAAC;AAU/F,eAAO,MAAM,mBAAmB,0CAY9B,CAAC;AASH,eAAO,MAAM,wBAAwB,0CAInC,CAAC;AASH,eAAO,MAAM,yBAAyB,0CAQpC,CAAC;AAUH,eAAO,MAAM,mBAAmB,0CAI9B,CAAC;AAGH,eAAO,MAAM,mBAAmB,EAAE,eAOjC,CAAC;AAcF,eAAO,MAAM,cAAc,EAAE,MAc5B,CAAC"}
|
|
@@ -2,6 +2,7 @@ import { WidthSizeClass, HeightSizeClass } from '@cratis/scene.model';
|
|
|
2
2
|
import { LayoutName } from './LayoutName.js';
|
|
3
3
|
import { SlotName } from './SlotName.js';
|
|
4
4
|
import { column, slotLeaf, row } from './flowBuilders.js';
|
|
5
|
+
import { sakaiCompositionProvenance } from '../templateProvenance.js';
|
|
5
6
|
|
|
6
7
|
// Copyright (c) Cratis. All rights reserved.
|
|
7
8
|
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
@@ -146,7 +147,10 @@ import { column, slotLeaf, row } from './flowBuilders.js';
|
|
|
146
147
|
name: SlotName.ConfigPanel
|
|
147
148
|
}
|
|
148
149
|
],
|
|
149
|
-
arrangement: appShellArrangement
|
|
150
|
+
arrangement: appShellArrangement,
|
|
151
|
+
metadata: {
|
|
152
|
+
...sakaiCompositionProvenance
|
|
153
|
+
}
|
|
150
154
|
};
|
|
151
155
|
|
|
152
156
|
export { appShellArrangement, appShellCompactHeightRoot, appShellCompactRoot, appShellCompactWidthRoot, appShellLayout, appShellRegularRoot };
|