@cratis/scene.blueprint.default 4.23.0 → 4.25.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/defaultBlueprint.ts +3 -1
- package/defaultBlueprintComponentMetadata.ts +25 -0
- package/dist/cjs/defaultBlueprint.js +4 -2
- package/dist/cjs/defaultBlueprint.js.map +1 -1
- package/dist/cjs/defaultBlueprintComponentMetadata.js +93 -0
- package/dist/cjs/defaultBlueprintComponentMetadata.js.map +1 -0
- package/dist/cjs/gallery/authTemplates.js +12 -6
- package/dist/cjs/gallery/authTemplates.js.map +1 -1
- package/dist/cjs/gallery/dialogTemplates.js +6 -3
- package/dist/cjs/gallery/dialogTemplates.js.map +1 -1
- package/dist/cjs/gallery/nesting.js +6 -3
- package/dist/cjs/gallery/nesting.js.map +1 -1
- package/dist/cjs/gallery/statusTemplates.js +8 -4
- package/dist/cjs/gallery/statusTemplates.js.map +1 -1
- package/dist/cjs/gallery/supportTemplates.js +10 -5
- package/dist/cjs/gallery/supportTemplates.js.map +1 -1
- package/dist/cjs/gallery/workspaceTemplates.js +12 -6
- package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
- package/dist/cjs/layouts/appShell.js +2 -1
- package/dist/cjs/layouts/appShell.js.map +1 -1
- package/dist/cjs/layouts/fullPage.js +2 -1
- package/dist/cjs/layouts/fullPage.js.map +1 -1
- package/dist/esm/defaultBlueprint.d.ts.map +1 -1
- package/dist/esm/defaultBlueprint.js +4 -2
- package/dist/esm/defaultBlueprint.js.map +1 -1
- package/dist/esm/defaultBlueprintComponentMetadata.d.ts +3 -0
- package/dist/esm/defaultBlueprintComponentMetadata.d.ts.map +1 -0
- package/dist/esm/defaultBlueprintComponentMetadata.js +91 -0
- package/dist/esm/defaultBlueprintComponentMetadata.js.map +1 -0
- package/dist/esm/gallery/authTemplates.js +12 -6
- package/dist/esm/gallery/authTemplates.js.map +1 -1
- package/dist/esm/gallery/dialogTemplates.js +6 -3
- package/dist/esm/gallery/dialogTemplates.js.map +1 -1
- package/dist/esm/gallery/nesting.js +6 -3
- package/dist/esm/gallery/nesting.js.map +1 -1
- package/dist/esm/gallery/statusTemplates.js +8 -4
- package/dist/esm/gallery/statusTemplates.js.map +1 -1
- package/dist/esm/gallery/supportTemplates.js +10 -5
- package/dist/esm/gallery/supportTemplates.js.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.js +12 -6
- package/dist/esm/gallery/workspaceTemplates.js.map +1 -1
- package/dist/esm/layouts/appShell.js +2 -1
- package/dist/esm/layouts/appShell.js.map +1 -1
- package/dist/esm/layouts/fullPage.js +2 -1
- package/dist/esm/layouts/fullPage.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/gallery/authTemplates.ts +6 -6
- package/gallery/dialogTemplates.ts +3 -3
- package/gallery/nesting.ts +3 -3
- package/gallery/statusTemplates.ts +4 -4
- package/gallery/supportTemplates.ts +5 -5
- package/gallery/workspaceTemplates.ts +6 -6
- package/layouts/appShell.ts +1 -1
- package/layouts/fullPage.ts +1 -1
- package/package.json +8 -8
|
@@ -63,7 +63,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
63
63
|
displayName: 'Sign in',
|
|
64
64
|
description: 'Email and password beside the branding panel.',
|
|
65
65
|
metadata: {
|
|
66
|
-
...defaultBlueprintTemplateProvenance
|
|
66
|
+
...defaultBlueprintTemplateProvenance,
|
|
67
|
+
category: 'Foundation / Auth'
|
|
67
68
|
}
|
|
68
69
|
};
|
|
69
70
|
/** Register. */ const registerTemplate = {
|
|
@@ -97,7 +98,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
97
98
|
displayName: 'Register',
|
|
98
99
|
description: 'Account creation with a password strength meter and the terms checkbox.',
|
|
99
100
|
metadata: {
|
|
100
|
-
...defaultBlueprintTemplateProvenance
|
|
101
|
+
...defaultBlueprintTemplateProvenance,
|
|
102
|
+
category: 'Foundation / Auth'
|
|
101
103
|
}
|
|
102
104
|
};
|
|
103
105
|
/** Forgotten password: ask for the address. */ const forgotPasswordTemplate = {
|
|
@@ -126,7 +128,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
126
128
|
displayName: 'Forgotten password',
|
|
127
129
|
description: 'One field and one button - the whole point is that it asks for nothing else.',
|
|
128
130
|
metadata: {
|
|
129
|
-
...defaultBlueprintTemplateProvenance
|
|
131
|
+
...defaultBlueprintTemplateProvenance,
|
|
132
|
+
category: 'Foundation / Auth'
|
|
130
133
|
}
|
|
131
134
|
};
|
|
132
135
|
/** New password: the other end of the link. */ const newPasswordTemplate = {
|
|
@@ -158,7 +161,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
158
161
|
displayName: 'New password',
|
|
159
162
|
description: 'Where a reset link lands: choose it, confirm it, done.',
|
|
160
163
|
metadata: {
|
|
161
|
-
...defaultBlueprintTemplateProvenance
|
|
164
|
+
...defaultBlueprintTemplateProvenance,
|
|
165
|
+
category: 'Foundation / Auth'
|
|
162
166
|
}
|
|
163
167
|
};
|
|
164
168
|
/** Verification: the code from the email. */ const verificationTemplate = {
|
|
@@ -195,7 +199,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
195
199
|
displayName: 'Verification',
|
|
196
200
|
description: 'The code step, with the progress indicator that tells you how much is left.',
|
|
197
201
|
metadata: {
|
|
198
|
-
...defaultBlueprintTemplateProvenance
|
|
202
|
+
...defaultBlueprintTemplateProvenance,
|
|
203
|
+
category: 'Foundation / Auth'
|
|
199
204
|
}
|
|
200
205
|
};
|
|
201
206
|
/** Lock screen: the session is still there, the person has to prove they are. */ const lockScreenTemplate = {
|
|
@@ -229,7 +234,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
229
234
|
displayName: 'Lock screen',
|
|
230
235
|
description: 'One person, one password, and no way to lose what was open.',
|
|
231
236
|
metadata: {
|
|
232
|
-
...defaultBlueprintTemplateProvenance
|
|
237
|
+
...defaultBlueprintTemplateProvenance,
|
|
238
|
+
category: 'Foundation / Auth'
|
|
233
239
|
}
|
|
234
240
|
};
|
|
235
241
|
/** The six authentication templates. */ const authTemplates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authTemplates.js","sources":["../../../gallery/authTemplates.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, text } from './elements';\nimport { field, formActions } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The six screens that stand between someone and the application: sign in, register, forgotten password,\n * new password, verification and the lock screen.\n *\n * All six fit the full-page layout's `content` slot and fill its `aside` with the branding half. That\n * split - a colored panel of brand next to a narrow column of form - is the shape the premium PrimeTek\n * templates use for every one of them, and the reason it works is that it gives the form somewhere to be\n * *small*, which is what a sign-in form should be.\n */\n\n/** The branding half every authentication screen shares. */\nfunction brandingAside(id: string, headline: string, supporting: string) {\n return [\n externalComponent(`${id}-logo`, ComponentName.Logo, { label: 'Contoso', initials: 'C' }),\n text(`${id}-headline`, headline),\n text(`${id}-supporting`, supporting),\n ];\n}\n\n/** Sign in. */\nexport const loginTemplate: ScreenTemplate = {\n name: 'Login',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('login', 'Welcome back', 'Everything your team shipped since you were last here is waiting.'),\n [TemplateSlotName.Body]: [\n card('login-card', [\n text('login-title', 'Sign in'),\n field('login-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('login-password', 'Password', 'password', { feedback: false }),\n field('login-remember', 'Keep me signed in', 'checkbox', {}),\n formActions('login-actions', 'Sign in', 'Use a different account'),\n button('login-forgot', 'I forgot my password', { link: true, targetScreen: 'ForgotPassword' }),\n ]),\n ],\n },\n displayName: 'Sign in',\n description: 'Email and password beside the branding panel.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Register. */\nexport const registerTemplate: ScreenTemplate = {\n name: 'Register',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('register', 'Start in two minutes', 'No card, no call, no sales engineer. Just an account.'),\n [TemplateSlotName.Body]: [\n card('register-card', [\n text('register-title', 'Create your account'),\n field('register-name', 'Full name', 'inputText', {}),\n field('register-email', 'Work email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('register-password', 'Password', 'password', { feedback: true }),\n field('register-terms', 'I accept the terms of service', 'checkbox', {}),\n formActions('register-actions', 'Create account', 'I already have one'),\n ]),\n ],\n },\n displayName: 'Register',\n description: 'Account creation with a password strength meter and the terms checkbox.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Forgotten password: ask for the address. */\nexport const forgotPasswordTemplate: ScreenTemplate = {\n name: 'ForgotPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('forgot', 'It happens', 'Tell us the address you signed up with and we will send a link.'),\n [TemplateSlotName.Body]: [\n card('forgot-card', [\n text('forgot-title', 'Reset your password'),\n field('forgot-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n formActions('forgot-actions', 'Send the link', 'Back to sign in'),\n ]),\n ],\n },\n displayName: 'Forgotten password',\n description: 'One field and one button - the whole point is that it asks for nothing else.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** New password: the other end of the link. */\nexport const newPasswordTemplate: ScreenTemplate = {\n name: 'NewPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('new-password', 'Almost there', 'Choose something you have not used anywhere else.'),\n [TemplateSlotName.Body]: [\n card('new-password-card', [\n text('new-password-title', 'Choose a new password'),\n field('new-password-value', 'New password', 'password', { feedback: true }),\n field('new-password-confirm', 'Confirm it', 'password', { feedback: false }),\n formActions('new-password-actions', 'Set the password', 'Cancel'),\n ]),\n ],\n },\n displayName: 'New password',\n description: 'Where a reset link lands: choose it, confirm it, done.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Verification: the code from the email. */\nexport const verificationTemplate: ScreenTemplate = {\n name: 'Verification',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('verification', 'Check your email', 'We sent a six-digit code. It expires in ten minutes.'),\n [TemplateSlotName.Body]: [\n card('verification-card', [\n text('verification-title', 'Enter the code'),\n externalComponent('verification-steps', 'steps', { model: ['Account', 'Verify', 'Done'], activeIndex: 1 }),\n field('verification-code', 'Six-digit code', 'inputText', { maxLength: 6 }),\n formActions('verification-actions', 'Verify', 'Send it again'),\n ]),\n ],\n },\n displayName: 'Verification',\n description: 'The code step, with the progress indicator that tells you how much is left.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Lock screen: the session is still there, the person has to prove they are. */\nexport const lockScreenTemplate: ScreenTemplate = {\n name: 'LockScreen',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('lock', 'Locked', 'Your work is exactly where you left it.'),\n [TemplateSlotName.Body]: [\n card('lock-card', [\n externalComponent('lock-avatar', 'avatar', { label: 'AN', size: 'xlarge', shape: 'circle' }),\n text('lock-name', 'Amelia Nyquist'),\n field('lock-password', 'Password', 'password', { feedback: false }),\n formActions('lock-actions', 'Unlock', 'Sign in as someone else'),\n ]),\n ],\n },\n displayName: 'Lock screen',\n description: 'One person, one password, and no way to lose what was open.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The six authentication templates. */\nexport const authTemplates: ScreenTemplate[] = [\n loginTemplate,\n registerTemplate,\n forgotPasswordTemplate,\n newPasswordTemplate,\n verificationTemplate,\n lockScreenTemplate,\n];\n"],"names":["brandingAside","id","headline","supporting","externalComponent","ComponentName","Logo","label","initials","text","loginTemplate","name","fitsSlot","SlotName","Content","slots","Aside","TemplateSlotName","Body","content","card","field","placeholder","feedback","formActions","button","link","targetScreen","displayName","description","metadata","defaultBlueprintTemplateProvenance","registerTemplate","forgotPasswordTemplate","newPasswordTemplate","verificationTemplate","model","activeIndex","maxLength","lockScreenTemplate","size","shape","authTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;iEAWA,SAASA,aAAAA,CAAcC,EAAU,EAAEC,QAAgB,EAAEC,UAAkB,EAAA;IACnE,OAAO;AACHC,QAAAA,iBAAAA,CAAkB,GAAGH,EAAAA,CAAG,KAAK,CAAC,EAAEI,aAAAA,CAAcC,IAAI,EAAE;YAAEC,KAAAA,EAAO,SAAA;YAAWC,QAAAA,EAAU;AAAI,SAAA,CAAA;AACtFC,QAAAA,IAAAA,CAAK,CAAA,EAAGR,EAAAA,CAAG,SAAS,CAAC,EAAEC,QAAAA,CAAAA;AACvBO,QAAAA,IAAAA,CAAK,CAAA,EAAGR,EAAAA,CAAG,WAAW,CAAC,EAAEE,UAAAA;AAC5B,KAAA;AACL;AAEA,gBACO,MAAMO,aAAAA,GAAgC;IACzCC,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAME,SAASG;AAAM,SAAA;AAAG,QAAA;AAAEL,YAAAA,IAAAA,EAAMM,iBAAiBC;AAAK;AAAE,KAAA;IAClEC,OAAAA,EAAS;AACL,QAAA,CAACN,SAASG,KAAK,GAAGhB,aAAAA,CAAc,SAAS,cAAA,EAAgB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oBAAUC,KAAAA,EAAO;AAAS,iBAAA,CAAA;AAC1FhC,gBAAAA,IAAAA,CAAK,WAAA,EAAa,gBAAA,CAAA;gBAClBY,KAAAA,CAAM,eAAA,EAAiB,YAAY,UAAA,EAAY;oBAAEE,QAAAA,EAAU;AAAM,iBAAA,CAAA;AACjEC,gBAAAA,WAAAA,CAAY,gBAAgB,QAAA,EAAU,yBAAA;AACzC,aAAA;AACJ;AACL,KAAA;IACAI,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,6DAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,yCACO,MAAMW,aAAAA,GAAkC;AAC3ChC,IAAAA,aAAAA;AACAsB,IAAAA,gBAAAA;AACAC,IAAAA,sBAAAA;AACAC,IAAAA,mBAAAA;AACAC,IAAAA,oBAAAA;AACAI,IAAAA;;;"}
|
|
1
|
+
{"version":3,"file":"authTemplates.js","sources":["../../../gallery/authTemplates.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, text } from './elements';\nimport { field, formActions } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The six screens that stand between someone and the application: sign in, register, forgotten password,\n * new password, verification and the lock screen.\n *\n * All six fit the full-page layout's `content` slot and fill its `aside` with the branding half. That\n * split - a colored panel of brand next to a narrow column of form - is the shape the premium PrimeTek\n * templates use for every one of them, and the reason it works is that it gives the form somewhere to be\n * *small*, which is what a sign-in form should be.\n */\n\n/** The branding half every authentication screen shares. */\nfunction brandingAside(id: string, headline: string, supporting: string) {\n return [\n externalComponent(`${id}-logo`, ComponentName.Logo, { label: 'Contoso', initials: 'C' }),\n text(`${id}-headline`, headline),\n text(`${id}-supporting`, supporting),\n ];\n}\n\n/** Sign in. */\nexport const loginTemplate: ScreenTemplate = {\n name: 'Login',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('login', 'Welcome back', 'Everything your team shipped since you were last here is waiting.'),\n [TemplateSlotName.Body]: [\n card('login-card', [\n text('login-title', 'Sign in'),\n field('login-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('login-password', 'Password', 'password', { feedback: false }),\n field('login-remember', 'Keep me signed in', 'checkbox', {}),\n formActions('login-actions', 'Sign in', 'Use a different account'),\n button('login-forgot', 'I forgot my password', { link: true, targetScreen: 'ForgotPassword' }),\n ]),\n ],\n },\n displayName: 'Sign in',\n description: 'Email and password beside the branding panel.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Register. */\nexport const registerTemplate: ScreenTemplate = {\n name: 'Register',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('register', 'Start in two minutes', 'No card, no call, no sales engineer. Just an account.'),\n [TemplateSlotName.Body]: [\n card('register-card', [\n text('register-title', 'Create your account'),\n field('register-name', 'Full name', 'inputText', {}),\n field('register-email', 'Work email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('register-password', 'Password', 'password', { feedback: true }),\n field('register-terms', 'I accept the terms of service', 'checkbox', {}),\n formActions('register-actions', 'Create account', 'I already have one'),\n ]),\n ],\n },\n displayName: 'Register',\n description: 'Account creation with a password strength meter and the terms checkbox.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Forgotten password: ask for the address. */\nexport const forgotPasswordTemplate: ScreenTemplate = {\n name: 'ForgotPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('forgot', 'It happens', 'Tell us the address you signed up with and we will send a link.'),\n [TemplateSlotName.Body]: [\n card('forgot-card', [\n text('forgot-title', 'Reset your password'),\n field('forgot-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n formActions('forgot-actions', 'Send the link', 'Back to sign in'),\n ]),\n ],\n },\n displayName: 'Forgotten password',\n description: 'One field and one button - the whole point is that it asks for nothing else.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** New password: the other end of the link. */\nexport const newPasswordTemplate: ScreenTemplate = {\n name: 'NewPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('new-password', 'Almost there', 'Choose something you have not used anywhere else.'),\n [TemplateSlotName.Body]: [\n card('new-password-card', [\n text('new-password-title', 'Choose a new password'),\n field('new-password-value', 'New password', 'password', { feedback: true }),\n field('new-password-confirm', 'Confirm it', 'password', { feedback: false }),\n formActions('new-password-actions', 'Set the password', 'Cancel'),\n ]),\n ],\n },\n displayName: 'New password',\n description: 'Where a reset link lands: choose it, confirm it, done.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Verification: the code from the email. */\nexport const verificationTemplate: ScreenTemplate = {\n name: 'Verification',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('verification', 'Check your email', 'We sent a six-digit code. It expires in ten minutes.'),\n [TemplateSlotName.Body]: [\n card('verification-card', [\n text('verification-title', 'Enter the code'),\n externalComponent('verification-steps', 'steps', { model: ['Account', 'Verify', 'Done'], activeIndex: 1 }),\n field('verification-code', 'Six-digit code', 'inputText', { maxLength: 6 }),\n formActions('verification-actions', 'Verify', 'Send it again'),\n ]),\n ],\n },\n displayName: 'Verification',\n description: 'The code step, with the progress indicator that tells you how much is left.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Lock screen: the session is still there, the person has to prove they are. */\nexport const lockScreenTemplate: ScreenTemplate = {\n name: 'LockScreen',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('lock', 'Locked', 'Your work is exactly where you left it.'),\n [TemplateSlotName.Body]: [\n card('lock-card', [\n externalComponent('lock-avatar', 'avatar', { label: 'AN', size: 'xlarge', shape: 'circle' }),\n text('lock-name', 'Amelia Nyquist'),\n field('lock-password', 'Password', 'password', { feedback: false }),\n formActions('lock-actions', 'Unlock', 'Sign in as someone else'),\n ]),\n ],\n },\n displayName: 'Lock screen',\n description: 'One person, one password, and no way to lose what was open.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** The six authentication templates. */\nexport const authTemplates: ScreenTemplate[] = [\n loginTemplate,\n registerTemplate,\n forgotPasswordTemplate,\n newPasswordTemplate,\n verificationTemplate,\n lockScreenTemplate,\n];\n"],"names":["brandingAside","id","headline","supporting","externalComponent","ComponentName","Logo","label","initials","text","loginTemplate","name","fitsSlot","SlotName","Content","slots","Aside","TemplateSlotName","Body","content","card","field","placeholder","feedback","formActions","button","link","targetScreen","displayName","description","metadata","defaultBlueprintTemplateProvenance","category","registerTemplate","forgotPasswordTemplate","newPasswordTemplate","verificationTemplate","model","activeIndex","maxLength","lockScreenTemplate","size","shape","authTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;iEAWA,SAASA,aAAAA,CAAcC,EAAU,EAAEC,QAAgB,EAAEC,UAAkB,EAAA;IACnE,OAAO;AACHC,QAAAA,iBAAAA,CAAkB,GAAGH,EAAAA,CAAG,KAAK,CAAC,EAAEI,aAAAA,CAAcC,IAAI,EAAE;YAAEC,KAAAA,EAAO,SAAA;YAAWC,QAAAA,EAAU;AAAI,SAAA,CAAA;AACtFC,QAAAA,IAAAA,CAAK,CAAA,EAAG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aultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
51
51
|
displayName: 'Confirmation dialog',
|
|
52
52
|
description: 'One question with the consequence spelled out, and a way back.',
|
|
53
53
|
metadata: {
|
|
54
|
-
...defaultBlueprintTemplateProvenance
|
|
54
|
+
...defaultBlueprintTemplateProvenance,
|
|
55
|
+
category: 'Foundation / Dialog'
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
/** Form: a short capture that does not deserve a page of its own. */ const formDialogTemplate = {
|
|
@@ -100,7 +101,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
100
101
|
displayName: 'Form dialog',
|
|
101
102
|
description: 'A handful of fields captured without leaving the page underneath.',
|
|
102
103
|
metadata: {
|
|
103
|
-
...defaultBlueprintTemplateProvenance
|
|
104
|
+
...defaultBlueprintTemplateProvenance,
|
|
105
|
+
category: 'Foundation / Dialog'
|
|
104
106
|
}
|
|
105
107
|
};
|
|
106
108
|
/** Detail: a record shown over the list it came from. */ const detailDialogTemplate = {
|
|
@@ -153,7 +155,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
153
155
|
displayName: 'Detail dialog',
|
|
154
156
|
description: 'A record over the list it came from, with a route to the full page.',
|
|
155
157
|
metadata: {
|
|
156
|
-
...defaultBlueprintTemplateProvenance
|
|
158
|
+
...defaultBlueprintTemplateProvenance,
|
|
159
|
+
category: 'Foundation / Dialog'
|
|
157
160
|
}
|
|
158
161
|
};
|
|
159
162
|
/** The dialog templates this blueprint provides. */ const galleryDialogTemplates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogTemplates.js","sources":["../../../gallery/dialogTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogTemplate } from '@cratis/scene.model';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { field } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The three dialog shapes an application repeats: confirm something destructive, capture a short form, and\n * show a record without leaving the list behind it.\n *\n * A dialog template has no `fitsSlot`, and that absence is the whole distinction. A screen template is\n * *placed* - it fills a slot on whatever contains it, and the containment chain is what decides where it\n * appears. A dialog is *summoned*: it opens over the application from wherever the code that opened it\n * happens to be, so there is no parent slot for it to name.\n */\n\n/** Confirm: one question, two answers, and enough context to answer it. */\nexport const confirmDialogTemplate: DialogTemplate = {\n name: 'ConfirmDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('confirm-title', 'Archive this product?')],\n [TemplateSlotName.Body]: [\n text('confirm-message', 'Bamboo Watch will stop appearing in the catalog. Existing orders keep it.'),\n externalComponent('confirm-note', 'message', { severity: 'warn', text: 'This can be undone from the archive.' }),\n ],\n [TemplateSlotName.Actions]: [\n panel('confirm-actions', [button('confirm-yes', 'Archive', { severity: 'danger' }), button('confirm-no', 'Keep it', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Confirmation dialog',\n description: 'One question with the consequence spelled out, and a way back.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Form: a short capture that does not deserve a page of its own. */\nexport const formDialogTemplate: DialogTemplate = {\n name: 'FormDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('form-dialog-title', 'Invite someone')],\n [TemplateSlotName.Body]: [\n field('form-dialog-email', 'Email', 'inputText', { placeholder: 'them@contoso.com' }),\n field('form-dialog-role', 'Role', 'dropdown', { options: ['Viewer', 'Editor', 'Administrator'] }),\n field('form-dialog-message', 'Message', 'inputTextarea', { rows: 3 }),\n ],\n [TemplateSlotName.Actions]: [\n panel('form-dialog-actions', [button('form-dialog-send', 'Send invitation', { severity: 'primary' }), button('form-dialog-cancel', 'Cancel', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Form dialog',\n description: 'A handful of fields captured without leaving the page underneath.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Detail: a record shown over the list it came from. */\nexport const detailDialogTemplate: DialogTemplate = {\n name: 'DetailDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('detail-dialog-title', 'ORD-4192')],\n [TemplateSlotName.Body]: [\n card('detail-dialog-summary', [\n text('detail-dialog-customer', 'Northwind Traders'),\n text('detail-dialog-total', '$1,240.00'),\n externalComponent('detail-dialog-status', 'tag', { value: 'Shipped', severity: 'success' }),\n ]),\n ],\n [TemplateSlotName.SidePanel]: [externalComponent('detail-dialog-timeline', 'timeline', { align: 'left' })],\n [TemplateSlotName.Actions]: [\n panel('detail-dialog-actions', [button('detail-dialog-open', 'Open full record', { severity: 'primary', targetScreen: 'DetailView' }), button('detail-dialog-close', 'Close', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Detail dialog',\n description: 'A record over the list it came from, with a route to the full page.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The dialog templates this blueprint provides. */\nexport const galleryDialogTemplates: DialogTemplate[] = [confirmDialogTemplate, formDialogTemplate, detailDialogTemplate];\n"],"names":["confirmDialogTemplate","name","slots","TemplateSlotName","Header","Body","Actions","content","text","externalComponent","severity","panel","button","displayName","description","metadata","defaultBlueprintTemplateProvenance","formDialogTemplate","field","placeholder","options","rows","detailDialogTemplate","SidePanel","card","value","align","targetScreen","galleryDialogTemplates"],"mappings":";;;;;AAAA;AACA;AAQA;;;;;;;;AAQC,gFAGM,MAAMA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEH,YAAAA,IAAAA,EAAME,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEJ,YAAAA,IAAAA,EAAME,iBAAiBG;AAAQ;AAAE,KAAA;IAC/GC,OAAAA,EAAS;QACL,CAACJ,gBAAAA,CAAiBC,MAAM,GAAG;AAACI,YAAAA,IAAAA,CAAK,eAAA,EAAiB,uBAAA;AAAyB,SAAA;QAC3E,CAACL,gBAAAA,CAAiBE,IAAI,GAAG;AACrBG,YAAAA,IAAAA,CAAK,iBAAA,EAAmB,2EAAA,CAAA;AACxBC,YAAAA,iBAAAA,CAAkB,gBAAgB,SAAA,EAAW;gBAAEC,QAAAA,EAAU,MAAA;gBAAQF,IAAAA,EAAM;AAAuC,aAAA;AACjH,SAAA;QACD,CAACL,gBAAAA,CAAiBG,OAAO,GAAG;AACxBK,YAAAA,KAAAA,CAAM,iBAAA,EAAmB;AAACC,gBAAAA,MAAAA,CAAO,eAAe,SAAA,EAAW;oBAAEF,QAAAA,EAAU;AAAS,iBAAA,CAAA;AAAIE,gBAAAA,MAAAA,CAAO,cAAc,SAAA,EAAW;oBAAEF,QAAAA,EAAU;AAAY,iBAAA;AAAG,aAAA;AAClJ;AACL,KAAA;IACAG,WAAAA,EAAa,qBAAA;IACbC,WAAAA,EAAa,gEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;
|
|
1
|
+
{"version":3,"file":"dialogTemplates.js","sources":["../../../gallery/dialogTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogTemplate } from '@cratis/scene.model';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { field } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The three dialog shapes an application repeats: confirm something destructive, capture a short form, and\n * show a record without leaving the list behind it.\n *\n * A dialog template has no `fitsSlot`, and that absence is the whole distinction. A screen template is\n * *placed* - it fills a slot on whatever contains it, and the containment chain is what decides where it\n * appears. A dialog is *summoned*: it opens over the application from wherever the code that opened it\n * happens to be, so there is no parent slot for it to name.\n */\n\n/** Confirm: one question, two answers, and enough context to answer it. */\nexport const confirmDialogTemplate: DialogTemplate = {\n name: 'ConfirmDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('confirm-title', 'Archive this product?')],\n [TemplateSlotName.Body]: [\n text('confirm-message', 'Bamboo Watch will stop appearing in the catalog. Existing orders keep it.'),\n externalComponent('confirm-note', 'message', { severity: 'warn', text: 'This can be undone from the archive.' }),\n ],\n [TemplateSlotName.Actions]: [\n panel('confirm-actions', [button('confirm-yes', 'Archive', { severity: 'danger' }), button('confirm-no', 'Keep it', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Confirmation dialog',\n description: 'One question with the consequence spelled out, and a way back.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Dialog' },\n};\n\n/** Form: a short capture that does not deserve a page of its own. */\nexport const formDialogTemplate: DialogTemplate = {\n name: 'FormDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('form-dialog-title', 'Invite someone')],\n [TemplateSlotName.Body]: [\n field('form-dialog-email', 'Email', 'inputText', { placeholder: 'them@contoso.com' }),\n field('form-dialog-role', 'Role', 'dropdown', { options: ['Viewer', 'Editor', 'Administrator'] }),\n field('form-dialog-message', 'Message', 'inputTextarea', { rows: 3 }),\n ],\n [TemplateSlotName.Actions]: [\n panel('form-dialog-actions', [button('form-dialog-send', 'Send invitation', { severity: 'primary' }), button('form-dialog-cancel', 'Cancel', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Form dialog',\n description: 'A handful of fields captured without leaving the page underneath.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Dialog' },\n};\n\n/** Detail: a record shown over the list it came from. */\nexport const detailDialogTemplate: DialogTemplate = {\n name: 'DetailDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('detail-dialog-title', 'ORD-4192')],\n [TemplateSlotName.Body]: [\n card('detail-dialog-summary', [\n text('detail-dialog-customer', 'Northwind Traders'),\n text('detail-dialog-total', '$1,240.00'),\n externalComponent('detail-dialog-status', 'tag', { value: 'Shipped', severity: 'success' }),\n ]),\n ],\n [TemplateSlotName.SidePanel]: [externalComponent('detail-dialog-timeline', 'timeline', { align: 'left' })],\n [TemplateSlotName.Actions]: [\n panel('detail-dialog-actions', [button('detail-dialog-open', 'Open full record', { severity: 'primary', targetScreen: 'DetailView' }), button('detail-dialog-close', 'Close', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Detail dialog',\n description: 'A record over the list it came from, with a route to the full page.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Dialog' },\n};\n\n/** The dialog templates this blueprint provides. */\nexport const galleryDialogTemplates: DialogTemplate[] = [confirmDialogTemplate, formDialogTemplate, detailDialogTemplate];\n"],"names":["confirmDialogTemplate","name","slots","TemplateSlotName","Header","Body","Actions","content","text","externalComponent","severity","panel","button","displayName","description","metadata","defaultBlueprintTemplateProvenance","category","formDialogTemplate","field","placeholder","options","rows","detailDialogTemplate","SidePanel","card","value","align","targetScreen","galleryDialogTemplates"],"mappings":";;;;;AAAA;AACA;AAQA;;;;;;;;AAQC,gFAGM,MAAMA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEH,YAAAA,IAAAA,EAAME,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEJ,YAAAA,IAAAA,EAAME,i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gBAAAA,CAAiBE,IAAI,GAAG;AACrBoB,YAAAA,IAAAA,CAAK,uBAAA,EAAyB;AAC1BjB,gBAAAA,IAAAA,CAAK,wBAAA,EAA0B,mBAAA,CAAA;AAC/BA,gBAAAA,IAAAA,CAAK,qBAAA,EAAuB,WAAA,CAAA;AAC5BC,gBAAAA,iBAAAA,CAAkB,wBAAwB,KAAA,EAAO;oBAAEiB,KAAAA,EAAO,SAAA;oBAAWhB,QAAAA,EAAU;AAAU,iBAAA;AAC5F,aAAA;AACJ,SAAA;QACD,CAACP,gBAAAA,CAAiBqB,SAAS,GAAG;AAACf,YAAAA,iBAAAA,CAAkB,0BAA0B,UAAA,EAAY;gBAAEkB,KAAAA,EAAO;AAAO,aAAA;AAAG,SAAA;QAC1G,CAACxB,gBAAAA,CAAiBG,OAAO,GAAG;AACxBK,YAAAA,KAAAA,CAAM,uBAAA,EAAyB;AAACC,gBAAAA,MAAAA,CAAO,sBAAsB,kBAAA,EAAoB;oBAAEF,QAAAA,EAAU,SAAA;oBAAWkB,YAAAA,EAAc;AAAa,iBAAA,CAAA;AAAIhB,gBAAAA,MAAAA,CAAO,uBAAuB,OAAA,EAAS;oBAAEF,QAAAA,EAAU;AAAY,iBAAA;AAAG,aAAA;AAC5M;AACL,KAAA;IACAG,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa,qEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,kCAAkC;QAAEC,QAAAA,EAAU;AAAsB;AACvF;AAEA,qDACO,MAAMY,sBAAAA,GAA2C;AAAC7B,IAAAA,qBAAAA;AAAuBkB,IAAAA,kBAAAA;AAAoBK,IAAAA;;;"}
|
|
@@ -49,7 +49,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
49
49
|
displayName: 'Module workspace',
|
|
50
50
|
description: 'Module level: fits the application layout content slot and offers a body for one feature.',
|
|
51
51
|
metadata: {
|
|
52
|
-
...defaultBlueprintTemplateProvenance
|
|
52
|
+
...defaultBlueprintTemplateProvenance,
|
|
53
|
+
category: 'Foundation / Workspace'
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
@@ -83,7 +84,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
83
84
|
displayName: 'Feature section',
|
|
84
85
|
description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',
|
|
85
86
|
metadata: {
|
|
86
|
-
...defaultBlueprintTemplateProvenance
|
|
87
|
+
...defaultBlueprintTemplateProvenance,
|
|
88
|
+
category: 'Foundation / Section'
|
|
87
89
|
}
|
|
88
90
|
};
|
|
89
91
|
/**
|
|
@@ -121,7 +123,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
121
123
|
displayName: 'Slice section',
|
|
122
124
|
description: 'Slice level: fits a feature section body slot and hosts one behavior.',
|
|
123
125
|
metadata: {
|
|
124
|
-
...defaultBlueprintTemplateProvenance
|
|
126
|
+
...defaultBlueprintTemplateProvenance,
|
|
127
|
+
category: 'Foundation / Section'
|
|
125
128
|
}
|
|
126
129
|
};
|
|
127
130
|
/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */ const nestingChainTemplates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nesting.js","sources":["../../../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;
|
|
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, category: 'Foundation / Workspace' },\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, category: 'Foundation / Section' },\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, category: 'Foundation / Section' },\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","category","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,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AAAA,GAAuC;IAChDrB,IAAAA,EAAM,cAAA;AACNC,IAAAA,QAAAA,EAAUI,iBAAiBE,IAAI;IAC/BH,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBiB;AAAQ;AAAE,KAAA;IAC5EC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;YAACC,QAAAA,CAASrB,gBAAAA,CAAiBE,IAAI,EAAE;gBAAEoB,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,QAAAA,CAASrB,iBAAiBiB,OAAO;AAAE,SAAA;AACnG,KAAA;IACAb,OAAAA,EAAS;QACL,CAACJ,gBAAAA,CAAiBE,IAAI,GAAG;YAACqB,iBAAAA,CAAkB,YAAA,EAAcC,aAAAA,CAAcC,UAAU,EAAE;gBAAEC,KAAAA,EAAO,YAAA;gBAAcC,QAAAA,EAAU;AAA4B,aAAA;AAAG;AACxJ,KAAA;IACArB,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa,uEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,kCAAkC;QAAEC,QAAAA,EAAU;AAAuB;AACxF;AAEA,mGACO,MAAMkB,qBAAAA,GAA0C;AAAClC,IAAAA,uBAAAA;AAAyBiB,IAAAA,sBAAAA;AAAwBK,IAAAA;;;"}
|
|
@@ -50,7 +50,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
50
50
|
displayName: 'Error',
|
|
51
51
|
description: 'A server-side failure, said plainly, with a way onward.',
|
|
52
52
|
metadata: {
|
|
53
|
-
...defaultBlueprintTemplateProvenance
|
|
53
|
+
...defaultBlueprintTemplateProvenance,
|
|
54
|
+
category: 'Foundation / State'
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
/** Signed in, and still not allowed. */ const accessDeniedTemplate = {
|
|
@@ -85,7 +86,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
85
86
|
displayName: 'Access denied',
|
|
86
87
|
description: 'A refusal that distinguishes "not signed in" from "not allowed".',
|
|
87
88
|
metadata: {
|
|
88
|
-
...defaultBlueprintTemplateProvenance
|
|
89
|
+
...defaultBlueprintTemplateProvenance,
|
|
90
|
+
category: 'Foundation / State'
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
93
|
/** No such address. */ const notFoundTemplate = {
|
|
@@ -119,7 +121,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
119
121
|
displayName: 'Not found',
|
|
120
122
|
description: 'A wrong address, with a search box rather than a dead end.',
|
|
121
123
|
metadata: {
|
|
122
|
-
...defaultBlueprintTemplateProvenance
|
|
124
|
+
...defaultBlueprintTemplateProvenance,
|
|
125
|
+
category: 'Foundation / State'
|
|
123
126
|
}
|
|
124
127
|
};
|
|
125
128
|
/** The page that has to do the selling. */ const landingTemplate = {
|
|
@@ -184,7 +187,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
184
187
|
displayName: 'Landing',
|
|
185
188
|
description: 'The marketing front door, with its own navigation because it has no application chrome.',
|
|
186
189
|
metadata: {
|
|
187
|
-
...defaultBlueprintTemplateProvenance
|
|
190
|
+
...defaultBlueprintTemplateProvenance,
|
|
191
|
+
category: 'Foundation / Landing'
|
|
188
192
|
}
|
|
189
193
|
};
|
|
190
194
|
/** The four status and marketing templates. */ const statusTemplates = [
|
|
@@ -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';\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', ariaLabel: 'Search' }),\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","ariaLabel","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;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,WAAA;wBAAaI,YAAAA,EAAc;AAAY,qBAA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AAA;AAAG,aAAA;AACvI;AACL,KAAA;IACAK,WAAAA,EAAa,SAAA;IACbC,WAAAA,EAAa,yFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,gDACO,MAAMa,eAAAA,GAAoC;AAACjC,IAAAA,aAAAA;AAAeqB,IAAAA,oBAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBG,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, category: 'Foundation / State' },\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, category: 'Foundation / State' },\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', ariaLabel: 'Search' }),\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, category: 'Foundation / State' },\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, category: 'Foundation / Landing' },\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","category","accessDeniedTemplate","notFoundTemplate","placeholder","ariaLabel","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,iBAAiB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Ac;oBAAEH,QAAAA,EAAU,SAAA;oBAAWI,YAAAA,EAAc;AAAW,iBAAA;AACvF,aAAA,CAAA;AACDiB,YAAAA,MAAAA,CAAO,yBAAyB,0BAAA,EAA4B;AAACpB,gBAAAA,IAAAA,CAAK,oBAAA,EAAsB,uEAAA;AAAyE,aAAA,CAAA;AACjKoB,YAAAA,MAAAA,CAAO,0BAA0B,wBAAA,EAA0B;AAACpB,gBAAAA,IAAAA,CAAK,qBAAA,EAAuB,+EAAA;AAAiF,aAAA,CAAA;AACzKoB,YAAAA,MAAAA,CAAO,6BAA6B,0CAAA,EAA4C;AAC5EpB,gBAAAA,IAAAA,CAAK,wBAAA,EAA0B,8FAAA;AAClC,aAAA;AACJ,SAAA;QACD,CAACP,gBAAAA,CAAiBsB,OAAO,GAAG;AACxBd,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,kCAAkC;QAAEC,QAAAA,EAAU;AAAuB;AACxF;AAEA,gDACO,MAAMa,eAAAA,GAAoC;AAAClC,IAAAA,aAAAA;AAAesB,IAAAA,oBAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBG,IAAAA;;;"}
|
|
@@ -51,7 +51,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
51
51
|
displayName: 'Documentation',
|
|
52
52
|
description: 'Prose with a table of contents beside it.',
|
|
53
53
|
metadata: {
|
|
54
|
-
...defaultBlueprintTemplateProvenance
|
|
54
|
+
...defaultBlueprintTemplateProvenance,
|
|
55
|
+
category: 'Foundation / Detail'
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
/** Profile settings: the signed-in user editing their own account. */ const profileSettingsTemplate = {
|
|
@@ -109,7 +110,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
109
110
|
displayName: 'Profile settings',
|
|
110
111
|
description: 'The signed-in user editing their own name, photo, password and notifications.',
|
|
111
112
|
metadata: {
|
|
112
|
-
...defaultBlueprintTemplateProvenance
|
|
113
|
+
...defaultBlueprintTemplateProvenance,
|
|
114
|
+
category: 'Foundation / Form'
|
|
113
115
|
}
|
|
114
116
|
};
|
|
115
117
|
/** User management: administering everybody else. */ const userManagementTemplate = {
|
|
@@ -189,7 +191,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
189
191
|
displayName: 'User management',
|
|
190
192
|
description: 'The people table, with roles, status and an invitation action.',
|
|
191
193
|
metadata: {
|
|
192
|
-
...defaultBlueprintTemplateProvenance
|
|
194
|
+
...defaultBlueprintTemplateProvenance,
|
|
195
|
+
category: 'Foundation / List'
|
|
193
196
|
}
|
|
194
197
|
};
|
|
195
198
|
/** Invoice: a printable document, which is a different shape from a screen. */ const invoiceTemplate = {
|
|
@@ -270,7 +273,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
270
273
|
displayName: 'Invoice',
|
|
271
274
|
description: 'A printable document: parties, line items and totals.',
|
|
272
275
|
metadata: {
|
|
273
|
-
...defaultBlueprintTemplateProvenance
|
|
276
|
+
...defaultBlueprintTemplateProvenance,
|
|
277
|
+
category: 'Foundation / Detail'
|
|
274
278
|
}
|
|
275
279
|
};
|
|
276
280
|
/** Help: the answers, and a way to ask when they are not there. */ const helpTemplate = {
|
|
@@ -314,7 +318,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
314
318
|
displayName: 'Help',
|
|
315
319
|
description: 'Searchable answers with a route to a human.',
|
|
316
320
|
metadata: {
|
|
317
|
-
...defaultBlueprintTemplateProvenance
|
|
321
|
+
...defaultBlueprintTemplateProvenance,
|
|
322
|
+
category: 'Foundation / Detail'
|
|
318
323
|
}
|
|
319
324
|
};
|
|
320
325
|
/** The five support templates. */ const supportTemplates = [
|
|
@@ -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';\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', ariaLabel: '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","ariaLabel","supportTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AASA;;;;;;;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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a,6CAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,mCACO,MAAM8B,gBAAAA,GAAqC;AAACjD,IAAAA,qBAAAA;AAAuBoB,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, category: 'Foundation / Detail' },\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, category: 'Foundation / Form' },\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, category: 'Foundation / List' },\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, category: 'Foundation / Detail' },\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', ariaLabel: '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, category: 'Foundation / Detail' },\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","category","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","ariaLabel","supportTemplates"],"mappings":";;;;;;;;;;AAAA;AACA;AASA;;;;;;;AAOC,4DAGM,MAAMA,qBA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AA,CAAiBC,SAAS,GAAG;AAC1BG,YAAAA,MAAAA,CAAO,gBAAgB,cAAA,EAAgB;AAACC,gBAAAA,IAAAA,CAAK,mBAAA,EAAqB,mCAAA,CAAA;AAAsCmB,gBAAAA,MAAAA,CAAO,uBAAuB,iBAAA,EAAmB;oBAAEf,QAAAA,EAAU;AAAU,iBAAA;AAAG,aAAA;AACrL;AACL,KAAA;IACAC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,6CAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,kCAAkC;QAAEC,QAAAA,EAAU;AAAsB;AACvF;AAEA,mCACO,MAAM8B,gBAAAA,GAAqC;AAAClD,IAAAA,qBAAAA;AAAuBqB,IAAAA,uBAAAA;AAAyBa,IAAAA,sBAAAA;AAAwBS,IAAAA,eAAAA;AAAiBI,IAAAA;;;"}
|
|
@@ -170,7 +170,8 @@ import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '
|
|
|
170
170
|
displayName: 'Dashboard',
|
|
171
171
|
description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',
|
|
172
172
|
metadata: {
|
|
173
|
-
...sakaiCompositionProvenance
|
|
173
|
+
...sakaiCompositionProvenance,
|
|
174
|
+
category: 'Foundation / Dashboard'
|
|
174
175
|
}
|
|
175
176
|
};
|
|
176
177
|
/** The list: a filter toolbar, a real table, and the row actions a list needs. */ const crudListTemplate = {
|
|
@@ -265,7 +266,8 @@ import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '
|
|
|
265
266
|
displayName: 'List',
|
|
266
267
|
description: 'A searchable table with a header, primary action and row data.',
|
|
267
268
|
metadata: {
|
|
268
|
-
...defaultBlueprintTemplateProvenance
|
|
269
|
+
...defaultBlueprintTemplateProvenance,
|
|
270
|
+
category: 'Foundation / List'
|
|
269
271
|
}
|
|
270
272
|
};
|
|
271
273
|
/** The detail: a summary panel beside the record's own sections. */ const detailViewTemplate = {
|
|
@@ -319,7 +321,8 @@ import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '
|
|
|
319
321
|
displayName: 'Detail',
|
|
320
322
|
description: 'One record: a header with actions, its sections, and a summary panel.',
|
|
321
323
|
metadata: {
|
|
322
|
-
...defaultBlueprintTemplateProvenance
|
|
324
|
+
...defaultBlueprintTemplateProvenance,
|
|
325
|
+
category: 'Foundation / Detail'
|
|
323
326
|
}
|
|
324
327
|
};
|
|
325
328
|
/**
|
|
@@ -429,7 +432,8 @@ import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '
|
|
|
429
432
|
description: 'A list beside the selected record, stacking on narrow screens.',
|
|
430
433
|
metadata: {
|
|
431
434
|
...defaultBlueprintTemplateProvenance,
|
|
432
|
-
type: 'Workspace'
|
|
435
|
+
type: 'Workspace',
|
|
436
|
+
category: 'Foundation / Workspace'
|
|
433
437
|
}
|
|
434
438
|
};
|
|
435
439
|
/** The form: fields, grouped, with the actions that close them. */ const formPageTemplate = {
|
|
@@ -482,7 +486,8 @@ import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '
|
|
|
482
486
|
displayName: 'Form',
|
|
483
487
|
description: 'A grouped form with the field types an application actually uses.',
|
|
484
488
|
metadata: {
|
|
485
|
-
...defaultBlueprintTemplateProvenance
|
|
489
|
+
...defaultBlueprintTemplateProvenance,
|
|
490
|
+
category: 'Foundation / Form'
|
|
486
491
|
}
|
|
487
492
|
};
|
|
488
493
|
/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */ const emptyTemplate = {
|
|
@@ -501,7 +506,8 @@ import { sakaiCompositionProvenance, defaultBlueprintTemplateProvenance } from '
|
|
|
501
506
|
displayName: 'Empty state',
|
|
502
507
|
description: 'The designed empty state for a list that has nothing in it yet.',
|
|
503
508
|
metadata: {
|
|
504
|
-
...defaultBlueprintTemplateProvenance
|
|
509
|
+
...defaultBlueprintTemplateProvenance,
|
|
510
|
+
category: 'Foundation / State'
|
|
505
511
|
}
|
|
506
512
|
};
|
|
507
513
|
/** The five workspace templates. */ const workspaceTemplates = [
|