@cratis/scene.blueprint.default 4.12.0 → 4.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/cjs/gallery/GalleryScreenPreview.js +6 -3
- package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
- package/dist/cjs/gallery/TemplatePreviewState.js +17 -0
- package/dist/cjs/gallery/TemplatePreviewState.js.map +1 -0
- package/dist/cjs/gallery/applyTemplatePreviewState.js +91 -0
- package/dist/cjs/gallery/applyTemplatePreviewState.js.map +1 -0
- 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/navigation.js +7 -0
- package/dist/cjs/gallery/navigation.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/screens.js +10 -1
- package/dist/cjs/gallery/screens.js.map +1 -1
- package/dist/cjs/gallery/statusTemplates.js +19 -5
- package/dist/cjs/gallery/statusTemplates.js.map +1 -1
- package/dist/cjs/gallery/supportTemplates.js +23 -6
- package/dist/cjs/gallery/supportTemplates.js.map +1 -1
- package/dist/cjs/gallery/widgets.js +20 -6
- package/dist/cjs/gallery/widgets.js.map +1 -1
- package/dist/cjs/gallery/workspaceTemplates.js +137 -8
- package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
- package/dist/cjs/index.js +10 -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/ApplicationScreens.stories.d.ts +1 -0
- package/dist/esm/gallery/ApplicationScreens.stories.d.ts.map +1 -1
- package/dist/esm/gallery/ApplicationScreens.stories.js +2 -1
- package/dist/esm/gallery/ApplicationScreens.stories.js.map +1 -1
- package/dist/esm/gallery/GalleryScreenPreview.d.ts +3 -1
- package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -1
- package/dist/esm/gallery/GalleryScreenPreview.js +6 -3
- package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
- package/dist/esm/gallery/PreviewStates.stories.d.ts +36 -0
- package/dist/esm/gallery/PreviewStates.stories.d.ts.map +1 -0
- package/dist/esm/gallery/PreviewStates.stories.js +27 -0
- package/dist/esm/gallery/PreviewStates.stories.js.map +1 -0
- package/dist/esm/gallery/TemplatePreviewState.d.ts +7 -0
- package/dist/esm/gallery/TemplatePreviewState.d.ts.map +1 -0
- package/dist/esm/gallery/TemplatePreviewState.js +15 -0
- package/dist/esm/gallery/TemplatePreviewState.js.map +1 -0
- package/dist/esm/gallery/applyTemplatePreviewState.d.ts +6 -0
- package/dist/esm/gallery/applyTemplatePreviewState.d.ts.map +1 -0
- package/dist/esm/gallery/applyTemplatePreviewState.js +87 -0
- package/dist/esm/gallery/applyTemplatePreviewState.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/index.d.ts +2 -0
- package/dist/esm/gallery/index.d.ts.map +1 -1
- package/dist/esm/gallery/index.js +2 -0
- package/dist/esm/gallery/index.js.map +1 -1
- package/dist/esm/gallery/navigation.d.ts.map +1 -1
- package/dist/esm/gallery/navigation.js +7 -0
- package/dist/esm/gallery/navigation.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/screens.d.ts.map +1 -1
- package/dist/esm/gallery/screens.js +10 -1
- package/dist/esm/gallery/screens.js.map +1 -1
- package/dist/esm/gallery/statusTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/statusTemplates.js +19 -5
- 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 +23 -6
- package/dist/esm/gallery/supportTemplates.js.map +1 -1
- package/dist/esm/gallery/widgets.d.ts +1 -1
- package/dist/esm/gallery/widgets.d.ts.map +1 -1
- package/dist/esm/gallery/widgets.js +20 -6
- package/dist/esm/gallery/widgets.js.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.d.ts +1 -0
- package/dist/esm/gallery/workspaceTemplates.d.ts.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.js +139 -11
- 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 +4 -1
- 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/ApplicationScreens.stories.tsx +4 -1
- package/gallery/GalleryScreenPreview.tsx +8 -3
- package/gallery/PreviewStates.stories.tsx +56 -0
- package/gallery/TemplatePreviewState.ts +20 -0
- package/gallery/applyTemplatePreviewState.ts +69 -0
- package/gallery/authTemplates.ts +7 -0
- package/gallery/dialogTemplates.ts +4 -0
- package/gallery/index.ts +2 -0
- package/gallery/navigation.ts +1 -0
- package/gallery/nesting.ts +4 -0
- package/gallery/screens.ts +2 -1
- package/gallery/statusTemplates.ts +6 -1
- package/gallery/supportTemplates.ts +7 -1
- package/gallery/widgets.ts +14 -5
- package/gallery/workspaceTemplates.ts +64 -4
- package/index.ts +1 -0
- package/layouts/appShell.ts +2 -0
- package/layouts/fullPage.ts +2 -0
- package/package.json +8 -7
- package/templateProvenance.ts +37 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Layout, Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, fullPageLayout } from '../layouts';\nimport { BreadcrumbEntry, applicationChrome, fullPageChrome } from './applicationChrome';\nimport { nestScreenTemplates, templateContentInLayout } from './composeScreen';\nimport { authTemplates } from './authTemplates';\nimport { navigationContributions } from './navigation';\nimport { nestingChainTemplates } from './nesting';\nimport { statusTemplates } from './statusTemplates';\nimport { supportTemplates } from './supportTemplates';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Ten shapes for inside the application shell, ten for the full-page shell, and the three-level nesting\n * chain that demonstrates how `fitsSlot` composes. The list is what the manifest's `screenTemplates` names\n * and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const galleryScreenTemplates: ScreenTemplate[] = [\n ...workspaceTemplates,\n ...supportTemplates,\n ...authTemplates,\n ...statusTemplates,\n ...nestingChainTemplates,\n];\n\n/** Which layout each template renders inside - the application shell unless it is one of the chrome-less screens. */\nconst fullPageTemplateNames = new Set([...authTemplates, ...statusTemplates].map(template => template.name));\n\n/** The trail shown above each application-shell screen. */\nconst breadcrumbs: Record<string, BreadcrumbEntry[]> = {\n Dashboard: [{ label: 'Dashboard' }],\n CrudList: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n DetailView: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'Bamboo Watch' }],\n FormPage: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'New product' }],\n Empty: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n Documentation: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Documentation' }],\n ProfileSettings: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Your profile' }],\n UserManagement: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Users' }],\n Invoice: [{ label: 'Billing', targetScreen: 'Dashboard' }, { label: 'INV-2043' }],\n Help: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Help' }],\n ModuleWorkspace: [{ label: 'Operations' }],\n FeatureSection: [{ label: 'Operations', targetScreen: 'ModuleWorkspace' }, { label: 'Adjustments' }],\n SliceSection: [\n { label: 'Operations', targetScreen: 'ModuleWorkspace' },\n { label: 'Adjustments', targetScreen: 'FeatureSection' },\n { label: 'Record an adjustment' },\n ],\n};\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const isFullPage = fullPageTemplateNames.has(template.name);\n const layout: Layout = isFullPage ? fullPageLayout : appShellLayout;\n const chrome = isFullPage ? fullPageChrome() : applicationChrome(template.name, breadcrumbs[template.name] ?? [{ label: template.displayName ?? template.name }]);\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: isFullPage ? LayoutName.FullPage : LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(chrome, templateContentInLayout(placeable, layout)),\n forms: [],\n contributions: isFullPage ? [] : navigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * Almost every template fits the layout's own `content` slot, so its chain is just itself. The three\n * nesting-chain templates are the exception, and the only ones that need the walk - which is the honest\n * version of the story: nesting exists for the applications that need it, and costs nothing for the ones\n * that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/**\n * The gallery: one screen per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n */\nexport const galleryScreens: Screen[] = galleryScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function galleryScreen(name: string): Screen | undefined {\n return galleryScreens.find(screen => screen.name === name);\n}\n"],"names":["galleryScreenTemplates","workspaceTemplates","supportTemplates","authTemplates","statusTemplates","nestingChainTemplates","fullPageTemplateNames","Set","map","template","name","breadcrumbs","Dashboard","label","CrudList","targetScreen","DetailView","FormPage","Empty","Documentation","ProfileSettings","UserManagement","Invoice","Help","ModuleWorkspace","FeatureSection","SliceSection","screenFor","isFullPage","has","layout","fullPageLayout","appShellLayout","chrome","fullPageChrome","applicationChrome","displayName","placeable","nestScreenTemplates","containmentChainFor","LayoutName","FullPage","AppShell","screenTemplate","slotContent","mergeSlotContent","templateContentInLayout","forms","contributions","navigationContributions","depth","findIndex","candidate","slice","content","merged","slotName","elements","Object","entries","galleryScreens","galleryScreen","find","screen"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AAaA;;;;;;UAOaA,sBAAAA,GAA2C;AACjDC,IAAAA,GAAAA,kBAAAA;AACAC,IAAAA,GAAAA,gBAAAA;AACAC,IAAAA,GAAAA,aAAAA;AACAC,IAAAA,GAAAA,eAAAA;AACAC,IAAAA,GAAAA;;AAGP,sHACA,MAAMC,qBAAAA,GAAwB,IAAIC,GAAAA,CAAI;AAAIJ,IAAAA,GAAAA,aAAAA;AAAkBC,IAAAA,GAAAA;AAAgB,CAAA,CAACI,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASC,IAAI,CAAA,CAAA;AAE1G,4DACA,MAAMC,WAAAA,GAAiD;IACnDC,SAAAA,EAAW;AAAC,QAAA;YAAEC,KAAAA,EAAO;AAAY;AAAE,KAAA;IACnCC,QAAAA,EAAU;AAAC,QAAA;YAAED,KAAAA,EAAO,SAAA;YAAWE,YAAAA,EAAc;AAAY,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO;AAAW;AAAE,KAAA;IAClFG,UAAAA,EAAY;AAAC,QAAA;YAAEH,KAAAA,EAAO,SAAA;YAAWE,YAAAA,EAAc;AAAY,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO,UAAA;YAAYE,YAAAA,EAAc;AAAW,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO;AAAe;AAAE,KAAA;IACzII,QAAAA,EAAU;AAAC,QAAA;YAAEJ,KAAAA,EAAO,SAAA;YAAWE,YAAAA,EAAc;AAAY,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO,UAAA;YAAYE,YAAAA,EAAc;AAAW,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO;AAAc;AAAE,KAAA;IACtIK,KAAAA,EAAO;AAAC,QAAA;YAAEL,KAAAA,EAAO,SAAA;YAAWE,YAAAA,EAAc;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AAQ,CAAA,CAAA;AAC3E;AAEA,SAASL,gBAAAA,CAAiBZ,MAAqD,EAAEqB,OAAsD,EAAA;AACnI,IAAA,MAAMC,MAAAA,GAAgC;AAAE,QAAA,GAAGtB;AAAO,KAAA;IAClD,KAAK,MAAM,CAACuB,QAAAA,EAAUC,QAAAA,CAAS,IAAIC,MAAAA,CAAOC,OAAO,CAACL,OAAAA,CAAAA,CAAU;QACxDC,MAAM,CAACC,SAAS,GAAG;eAAKD,MAAM,CAACC,QAAAA,CAAS,IAAI,EAAE;AAAMC,YAAAA,GAAAA;AAAS,SAAA;AACjE,IAAA;IAEA,OAAOF,MAAAA;AACX;AAEA;;;;;;AAMC,IACM,MAAMK,cAAAA,GAA2B5D,sBAAAA,CAAuBQ,GAAG,CAACmB,SAAAA;AAEnE,oFACO,SAASkC,aAAAA,CAAcnD,IAAY,EAAA;AACtC,IAAA,OAAOkD,eAAeE,IAAI,CAACC,CAAAA,MAAAA,GAAUA,MAAAA,CAAOrD,IAAI,KAAKA,IAAAA,CAAAA;AACzD;;"}
|
|
1
|
+
{"version":3,"file":"screens.js","sources":["../../../gallery/screens.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 { Layout, Screen, ScreenTemplate } from '@cratis/scene.model';\nimport { LayoutName, appShellLayout, fullPageLayout } from '../layouts';\nimport { BreadcrumbEntry, applicationChrome, fullPageChrome } from './applicationChrome';\nimport { nestScreenTemplates, templateContentInLayout } from './composeScreen';\nimport { authTemplates } from './authTemplates';\nimport { navigationContributions } from './navigation';\nimport { nestingChainTemplates } from './nesting';\nimport { statusTemplates } from './statusTemplates';\nimport { supportTemplates } from './supportTemplates';\nimport { workspaceTemplates } from './workspaceTemplates';\n\n/**\n * The screen templates this blueprint provides.\n *\n * Eleven shapes for inside the application shell, ten for the full-page shell, and the three-level nesting\n * chain that demonstrates how `fitsSlot` composes. The list is what the manifest's `screenTemplates` names\n * and what the bundle provides; `validatePackageBundle` proves the two agree.\n */\nexport const galleryScreenTemplates: ScreenTemplate[] = [\n ...workspaceTemplates,\n ...supportTemplates,\n ...authTemplates,\n ...statusTemplates,\n ...nestingChainTemplates,\n];\n\n/** Which layout each template renders inside - the application shell unless it is one of the chrome-less screens. */\nconst fullPageTemplateNames = new Set([...authTemplates, ...statusTemplates].map(template => template.name));\n\n/** The trail shown above each application-shell screen. */\nconst breadcrumbs: Record<string, BreadcrumbEntry[]> = {\n Dashboard: [{ label: 'Dashboard' }],\n CrudList: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n MasterDetail: [{ label: 'Sales', targetScreen: 'Dashboard' }, { label: 'Customers' }],\n DetailView: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'Bamboo Watch' }],\n FormPage: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products', targetScreen: 'CrudList' }, { label: 'New product' }],\n Empty: [{ label: 'Catalog', targetScreen: 'Dashboard' }, { label: 'Products' }],\n Documentation: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Documentation' }],\n ProfileSettings: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Your profile' }],\n UserManagement: [{ label: 'Administration', targetScreen: 'Dashboard' }, { label: 'Users' }],\n Invoice: [{ label: 'Billing', targetScreen: 'Dashboard' }, { label: 'INV-2043' }],\n Help: [{ label: 'Support', targetScreen: 'Dashboard' }, { label: 'Help' }],\n ModuleWorkspace: [{ label: 'Operations' }],\n FeatureSection: [{ label: 'Operations', targetScreen: 'ModuleWorkspace' }, { label: 'Adjustments' }],\n SliceSection: [\n { label: 'Operations', targetScreen: 'ModuleWorkspace' },\n { label: 'Adjustments', targetScreen: 'FeatureSection' },\n { label: 'Record an adjustment' },\n ],\n};\n\n/**\n * Builds the {@link Screen} that instantiates one template.\n *\n * A screen is an instance, not a shape: it names the layout it renders in, the template it fills, the\n * content that fills it, and what it contributes elsewhere. Everything structural comes from the template,\n * which is why adding a screen is a handful of lines rather than another copy of the chrome.\n */\nfunction screenFor(template: ScreenTemplate): Screen {\n const isFullPage = fullPageTemplateNames.has(template.name);\n const layout: Layout = isFullPage ? fullPageLayout : appShellLayout;\n const chrome = isFullPage ? fullPageChrome() : applicationChrome(template.name, breadcrumbs[template.name] ?? [{ label: template.displayName ?? template.name }]);\n const placeable = nestScreenTemplates(containmentChainFor(template));\n\n return {\n name: template.name,\n layout: isFullPage ? LayoutName.FullPage : LayoutName.AppShell,\n screenTemplate: template.name,\n slotContent: mergeSlotContent(chrome, templateContentInLayout(placeable, layout)),\n forms: [],\n contributions: isFullPage ? [] : navigationContributions,\n };\n}\n\n/**\n * The chain of templates a screen renders through, outermost first.\n *\n * Almost every template fits the layout's own `content` slot, so its chain is just itself. The three\n * nesting-chain templates are the exception, and the only ones that need the walk - which is the honest\n * version of the story: nesting exists for the applications that need it, and costs nothing for the ones\n * that do not.\n */\nfunction containmentChainFor(template: ScreenTemplate): ScreenTemplate[] {\n const depth = nestingChainTemplates.findIndex(candidate => candidate.name === template.name);\n return depth < 0 ? [template] : nestingChainTemplates.slice(0, depth + 1);\n}\n\nfunction mergeSlotContent(chrome: Record<string, Screen['slotContent'][string]>, content: Record<string, Screen['slotContent'][string]>): Screen['slotContent'] {\n const merged: Screen['slotContent'] = { ...chrome };\n for (const [slotName, elements] of Object.entries(content)) {\n merged[slotName] = [...(merged[slotName] ?? []), ...elements];\n }\n\n return merged;\n}\n\n/**\n * The gallery: one screen per template, ready to boot through the real engine.\n *\n * These exist so a preview is a working miniature application rather than a set of pictures - the same\n * `Screen` shape Stage produces, put through the same `Scene.Engine` and `Scene.React`, with no separate\n * preview pipeline and nothing mocked.\n */\nexport const galleryScreens: Screen[] = galleryScreenTemplates.map(screenFor);\n\n/** One gallery screen by name, for a story or a host that boots a specific one. */\nexport function galleryScreen(name: string): Screen | undefined {\n return galleryScreens.find(screen => screen.name === name);\n}\n"],"names":["galleryScreenTemplates","workspaceTemplates","supportTemplates","authTemplates","statusTemplates","nestingChainTemplates","fullPageTemplateNames","Set","map","template","name","breadcrumbs","Dashboard","label","CrudList","targetScreen","MasterDetail","DetailView","FormPage","Empty","Documentation","ProfileSettings","UserManagement","Invoice","Help","ModuleWorkspace","FeatureSection","SliceSection","screenFor","isFullPage","has","layout","fullPageLayout","appShellLayout","chrome","fullPageChrome","applicationChrome","displayName","placeable","nestScreenTemplates","containmentChainFor","LayoutName","FullPage","AppShell","screenTemplate","slotContent","mergeSlotContent","templateContentInLayout","forms","contributions","navigationContributions","depth","findIndex","candidate","slice","content","merged","slotName","elements","Object","entries","galleryScreens","galleryScreen","find","screen"],"mappings":";;;;;;;;;;;;;;AAAA;AACA;AAaA;;;;;;UAOaA,sBAAAA,GAA2C;AACjDC,IAAAA,GAAAA,kBAAAA;AACAC,IAAAA,GAAAA,gBAAAA;AACAC,IAAAA,GAAAA,aAAAA;AACAC,IAAAA,GAAAA,eAAAA;AACAC,IAAAA,GAAAA;;AAGP,sHACA,MAAMC,qBAAAA,GAAwB,IAAIC,GAAAA,CAAI;AAAIJ,IAAAA,GAAAA,aAAAA;AAAkBC,IAAAA,GAAAA;AAAgB,CAAA,CAACI,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASC,IAAI,CAAA,CAAA;AAE1G,4DACA,MAAMC,WAAAA,GAAiD;IACnDC,SAAAA,EAAW;AAAC,QAAA;YAAEC,KAAAA,EAAO;AAAY;AAAE,KAAA;IACnCC,QAAAA,EAAU;AAAC,QAAA;YAAED,KAAAA,EAAO,SAAA;YAAWE,YAAAA,EAAc;AAAY,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO;AAAW;AAAE,KAAA;IAClFG,YAAAA,EAAc;AAAC,QAAA;YAAEH,KAAAA,EAAO,OAAA;YAASE,YAAAA,EAAc;AAAY,SAAA;AAAG,QAAA;YAAEF,KAAAA,EAAO;AAAY;AAAE,KAAA;IACrFI,UAAAA,EAAY;AAAC,QAAA;YAAEJ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":"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',
|
|
@@ -99,7 +106,8 @@ import { widget } from './widgets.js';
|
|
|
99
106
|
text('not-found-title', 'That page is not here'),
|
|
100
107
|
text('not-found-message', 'The link may be old, or the thing it pointed at may have been removed.'),
|
|
101
108
|
externalComponent('not-found-search', 'inputText', {
|
|
102
|
-
placeholder: 'Search instead'
|
|
109
|
+
placeholder: 'Search instead',
|
|
110
|
+
ariaLabel: 'Search'
|
|
103
111
|
}),
|
|
104
112
|
button('not-found-home', 'Back to the dashboard', {
|
|
105
113
|
severity: 'secondary',
|
|
@@ -109,7 +117,10 @@ import { widget } from './widgets.js';
|
|
|
109
117
|
]
|
|
110
118
|
},
|
|
111
119
|
displayName: 'Not found',
|
|
112
|
-
description: 'A wrong address, with a search box rather than a dead end.'
|
|
120
|
+
description: 'A wrong address, with a search box rather than a dead end.',
|
|
121
|
+
metadata: {
|
|
122
|
+
...defaultBlueprintTemplateProvenance
|
|
123
|
+
}
|
|
113
124
|
};
|
|
114
125
|
/** The page that has to do the selling. */ const landingTemplate = {
|
|
115
126
|
name: 'Landing',
|
|
@@ -171,7 +182,10 @@ import { widget } from './widgets.js';
|
|
|
171
182
|
]
|
|
172
183
|
},
|
|
173
184
|
displayName: 'Landing',
|
|
174
|
-
description: 'The marketing front door, with its own navigation because it has no application chrome.'
|
|
185
|
+
description: 'The marketing front door, with its own navigation because it has no application chrome.',
|
|
186
|
+
metadata: {
|
|
187
|
+
...defaultBlueprintTemplateProvenance
|
|
188
|
+
}
|
|
175
189
|
};
|
|
176
190
|
/** The four status and marketing templates. */ const statusTemplates = [
|
|
177
191
|
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,WAAA;wBAAaI,YAAAA,EAAc;AAAY,qBAAA;AACpG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AA;;;"}
|
|
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,C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A,CAAK,wBAAA,EAA0B,8FAAA;AAClC,aAAA;AACJ,SAAA;QACD,CAACP,gBAAAA,CAAiBqB,OAAO,GAAG;AACxBb,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,MAAMa,eAAAA,GAAoC;AAACjC,IAAAA,aAAAA;AAAeqB,IAAAA,oBAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBG,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',
|
|
@@ -280,7 +293,8 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
280
293
|
],
|
|
281
294
|
[TemplateSlotName.Body]: [
|
|
282
295
|
externalComponent('help-search', 'inputText', {
|
|
283
|
-
placeholder: 'Search help'
|
|
296
|
+
placeholder: 'Search help',
|
|
297
|
+
ariaLabel: 'Search help'
|
|
284
298
|
}),
|
|
285
299
|
widget('help-popular', 'Popular answers', [
|
|
286
300
|
text('help-1', 'How do I invite someone to the workspace?'),
|
|
@@ -298,7 +312,10 @@ import { pageHeader, widget, formActions, field, table } from './widgets.js';
|
|
|
298
312
|
]
|
|
299
313
|
},
|
|
300
314
|
displayName: 'Help',
|
|
301
|
-
description: 'Searchable answers with a route to a human.'
|
|
315
|
+
description: 'Searchable answers with a route to a human.',
|
|
316
|
+
metadata: {
|
|
317
|
+
...defaultBlueprintTemplateProvenance
|
|
318
|
+
}
|
|
302
319
|
};
|
|
303
320
|
/** The five support templates. */ const supportTemplates = [
|
|
304
321
|
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,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A,CAAK,QAAA,EAAU,4CAAA,CAAA;AACfA,gBAAAA,IAAAA,CAAK,QAAA,EAAU,4BAAA;AAClB,aAAA;AACJ,SAAA;QACD,CAACL,gBAAAA,CAAiBC,SAAS,GAAG;AAC1BG,YAAAA,MAAAA,CAAO,gBAAgB,cAAA,EAAgB;AAACC,gBAAAA,IAAAA,CAAK,mBAAA,EAAqB,mCAAA,CAAA;AAAsCgB,gBAAAA,MAAAA,CAAO,uBAAuB,iBAAA,EAAmB;oBAAEZ,QAAAA,EAAU;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', 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,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,EA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U,2CAAA,CAAA;AACfA,gBAAAA,IAAAA,CAAK,QAAA,EAAU,4CAAA,CAAA;AACfA,gBAAAA,IAAAA,CAAK,QAAA,EAAU,4BAAA;AAClB,aAAA;AACJ,SAAA;QACD,CAACL,gBAAAA,CAAiBC,SAAS,GAAG;AAC1BG,YAAAA,MAAAA,CAAO,gBAAgB,cAAA,EAAgB;AAACC,gBAAAA,IAAAA,CAAK,mBAAA,EAAqB,mCAAA,CAAA;AAAsCkB,gBAAAA,MAAAA,CAAO,uBAAuB,iBAAA,EAAmB;oBAAEd,QAAAA,EAAU;AAAU,iBAAA;AAAG,aAAA;AACrL;AACL,KAAA;IACAC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,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;;;"}
|
|
@@ -5,7 +5,7 @@ export declare function widget(id: string, title: string, content: SceneElement[
|
|
|
5
5
|
export declare function table(id: string, columns: {
|
|
6
6
|
field: string;
|
|
7
7
|
header: string;
|
|
8
|
-
}[], rows: Record<string, unknown>[]): SceneElement;
|
|
8
|
+
}[], rows: Record<string, unknown>[], emptyMessage?: string): SceneElement;
|
|
9
9
|
export declare function field(id: string, label: string, componentName: string, properties?: Record<string, unknown>): SceneElement;
|
|
10
10
|
export declare function formActions(id: string, confirmLabel: string, cancelLabel?: string): SceneElement;
|
|
11
11
|
export declare function emptyState(id: string, title: string, message: string, actionLabel: string): SceneElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.d.ts","sourceRoot":"","sources":["../../../gallery/widgets.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAcnD,wBAAgB,UAAU,CAAC,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,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,EAAE,UAAU,GAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAM,GAAG,YAAY,CAE9H;AAGD,wBAAgB,WAAW,CAAC,EAAE,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,WAAW,SAAW,GAAG,YAAY,CAElG;AAGD,wBAAgB,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,GAAG,YAAY,CAOxG"}
|
|
@@ -39,12 +39,20 @@ import { card, text, externalComponent, panel, button } from './elements.js';
|
|
|
39
39
|
title
|
|
40
40
|
});
|
|
41
41
|
}
|
|
42
|
-
/**
|
|
42
|
+
/**
|
|
43
|
+
* A table with real columns and real rows, so a list template looks like a list.
|
|
44
|
+
*
|
|
45
|
+
* The properties are the table's own vocabulary - `rows` for the records and `pageSize` to page them - so
|
|
46
|
+
* a host with the real table loaded shows the rows rather than an empty grid. `emptyMessage` is what the
|
|
47
|
+
* same table says once the rows are gone, which is how a preview shows a template's empty state.
|
|
48
|
+
*/ function table(id, columns, rows, emptyMessage = 'Nothing to show yet') {
|
|
43
49
|
return externalComponent(id, 'dataTable', {
|
|
44
|
-
|
|
50
|
+
rows,
|
|
45
51
|
dataKey: columns[0]?.field ?? 'id',
|
|
46
|
-
|
|
47
|
-
rows
|
|
52
|
+
emptyMessage,
|
|
53
|
+
...rows.length > 8 ? {
|
|
54
|
+
pageSize: 8
|
|
55
|
+
} : {}
|
|
48
56
|
}, {
|
|
49
57
|
columns: columns.map((column)=>externalComponent(`${id}-${column.field}`, 'column', {
|
|
50
58
|
field: column.field,
|
|
@@ -53,10 +61,16 @@ import { card, text, externalComponent, panel, button } from './elements.js';
|
|
|
53
61
|
}))
|
|
54
62
|
});
|
|
55
63
|
}
|
|
56
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* One labeled input in a form template. The visible label is a separate text element, so the input carries
|
|
66
|
+
* the same words as its accessible name - otherwise a screen reader announces an unnamed field.
|
|
67
|
+
*/ function field(id, label, componentName, properties = {}) {
|
|
57
68
|
return panel(id, [
|
|
58
69
|
text(`${id}-label`, label),
|
|
59
|
-
externalComponent(`${id}-input`, componentName,
|
|
70
|
+
externalComponent(`${id}-input`, componentName, {
|
|
71
|
+
ariaLabel: label,
|
|
72
|
+
...properties
|
|
73
|
+
})
|
|
60
74
|
]);
|
|
61
75
|
}
|
|
62
76
|
/** A row of buttons closing a form. */ function formActions(id, confirmLabel, cancelLabel = 'Cancel') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"widgets.js","sources":["../../../gallery/widgets.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 { SceneElement } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { button, card, externalComponent, panel, text } from './elements';\n\n/**\n * The repeated pieces the gallery's screen templates are built from.\n *\n * The gallery only earns its place if a preview shows something that looks like an application - a\n * dashboard with four stat cards over two columns of larger widgets, a list with real columns and real\n * rows. Seeded content that says \"Lorem ipsum\" proves the renderer runs and nothing else. These builders\n * are what keep twenty templates' worth of realistic content from becoming twenty pages of literals.\n */\n\n/** A screen's title, subtitle and actions - the furniture every template starts with. */\nexport function pageHeader(id: string, title: string, subtitle: string, actions: SceneElement[] = []): SceneElement {\n return externalComponent(id, ComponentName.PageHeader, { title, subtitle }, { actions });\n}\n\n/**\n * One of the four figures across the top of a dashboard - the composition Sakai's dashboard opens with,\n * and the one every template in the line has copied since.\n */\nexport function statCard(id: string, label: string, value: string, delta: string, icon: string): SceneElement {\n return card(id, [text(`${id}-label`, label), text(`${id}-value`, value), text(`${id}-delta`, delta)], { icon, variant: 'stat' });\n}\n\n/** A titled surface holding a widget's content. */\nexport function widget(id: string, title: string, content: SceneElement[]): SceneElement {\n return card(id, [text(`${id}-title`, title), ...content], { title });\n}\n\n
|
|
1
|
+
{"version":3,"file":"widgets.js","sources":["../../../gallery/widgets.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 { SceneElement } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { button, card, externalComponent, panel, text } from './elements';\n\n/**\n * The repeated pieces the gallery's screen templates are built from.\n *\n * The gallery only earns its place if a preview shows something that looks like an application - a\n * dashboard with four stat cards over two columns of larger widgets, a list with real columns and real\n * rows. Seeded content that says \"Lorem ipsum\" proves the renderer runs and nothing else. These builders\n * are what keep twenty templates' worth of realistic content from becoming twenty pages of literals.\n */\n\n/** A screen's title, subtitle and actions - the furniture every template starts with. */\nexport function pageHeader(id: string, title: string, subtitle: string, actions: SceneElement[] = []): SceneElement {\n return externalComponent(id, ComponentName.PageHeader, { title, subtitle }, { actions });\n}\n\n/**\n * One of the four figures across the top of a dashboard - the composition Sakai's dashboard opens with,\n * and the one every template in the line has copied since.\n */\nexport function statCard(id: string, label: string, value: string, delta: string, icon: string): SceneElement {\n return card(id, [text(`${id}-label`, label), text(`${id}-value`, value), text(`${id}-delta`, delta)], { icon, variant: 'stat' });\n}\n\n/** A titled surface holding a widget's content. */\nexport function widget(id: string, title: string, content: SceneElement[]): SceneElement {\n return card(id, [text(`${id}-title`, title), ...content], { title });\n}\n\n/**\n * A table with real columns and real rows, so a list template looks like a list.\n *\n * The properties are the table's own vocabulary - `rows` for the records and `pageSize` to page them - so\n * a host with the real table loaded shows the rows rather than an empty grid. `emptyMessage` is what the\n * same table says once the rows are gone, which is how a preview shows a template's empty state.\n */\nexport function table(id: string, columns: { field: string; header: string }[], rows: Record<string, unknown>[], emptyMessage = 'Nothing to show yet'): SceneElement {\n return externalComponent(\n id,\n 'dataTable',\n { rows, dataKey: columns[0]?.field ?? 'id', emptyMessage, ...(rows.length > 8 ? { pageSize: 8 } : {}) },\n { columns: columns.map(column => externalComponent(`${id}-${column.field}`, 'column', { field: column.field, header: column.header, sortable: true })) },\n );\n}\n\n/**\n * One labeled input in a form template. The visible label is a separate text element, so the input carries\n * the same words as its accessible name - otherwise a screen reader announces an unnamed field.\n */\nexport function field(id: string, label: string, componentName: string, properties: Record<string, unknown> = {}): SceneElement {\n return panel(id, [text(`${id}-label`, label), externalComponent(`${id}-input`, componentName, { ariaLabel: label, ...properties })]);\n}\n\n/** A row of buttons closing a form. */\nexport function formActions(id: string, confirmLabel: string, cancelLabel = 'Cancel'): SceneElement {\n return panel(id, [button(`${id}-confirm`, confirmLabel, { severity: 'primary' }), button(`${id}-cancel`, cancelLabel, { severity: 'secondary' })]);\n}\n\n/** The empty state a list shows before anything exists - the designed one, never a build-time apology. */\nexport function emptyState(id: string, title: string, message: string, actionLabel: string): SceneElement {\n return card(id, [\n externalComponent(`${id}-icon`, 'image', { alt: title }),\n text(`${id}-title`, title),\n text(`${id}-message`, message),\n button(`${id}-action`, actionLabel, { severity: 'primary' }),\n ]);\n}\n"],"names":["pageHeader","id","title","subtitle","actions","externalComponent","ComponentName","PageHeader","statCard","label","value","delta","icon","card","text","variant","widget","content","table","columns","rows","emptyMessage","dataKey","field","length","pageSize","map","column","header","sortable","componentName","properties","panel","ariaLabel","formActions","confirmLabel","cancelLabel","button","severity","emptyState","message","actionLabel","alt"],"mappings":";;;AAAA;AACA;AAMA;;;;;;;AAOC,8FAGM,SAASA,UAAAA,CAAWC,EAAU,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,OAAAA,GAA0B,EAAE,EAAA;AAChG,IAAA,OAAOC,iBAAAA,CAAkBJ,EAAAA,EAAIK,aAAAA,CAAcC,UAAU,EAAE;AAAEL,QAAAA,KAAAA;AAAOC,QAAAA;KAAS,EAAG;AAAEC,QAAAA;AAAQ,KAAA,CAAA;AAC1F;AAEA;;;IAIO,SAASI,QAAAA,CAASP,EAAU,EAAEQ,KAAa,EAAEC,KAAa,EAAEC,KAAa,EAAEC,IAAY,EAAA;AAC1F,IAAA,OAAOC,KAA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A,CAAG,MAAM,CAAC,EAAEC,KAAAA,CAAAA;AACpBY,QAAAA,IAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,QAAQ,CAAC,EAAEuC,OAAAA,CAAAA;AACtBH,QAAAA,MAAAA,CAAO,CAAA,EAAGpC,EAAAA,CAAG,OAAO,CAAC,EAAEwC,WAAAA,EAAa;YAAEH,QAAAA,EAAU;AAAU,SAAA;AAC7D,KAAA,CAAA;AACL;;"}
|
|
@@ -2,6 +2,7 @@ import { ScreenTemplate } from '@cratis/scene.model';
|
|
|
2
2
|
export declare const dashboardTemplate: ScreenTemplate;
|
|
3
3
|
export declare const crudListTemplate: ScreenTemplate;
|
|
4
4
|
export declare const detailViewTemplate: ScreenTemplate;
|
|
5
|
+
export declare const masterDetailTemplate: ScreenTemplate;
|
|
5
6
|
export declare const formPageTemplate: ScreenTemplate;
|
|
6
7
|
export declare const emptyTemplate: ScreenTemplate;
|
|
7
8
|
export declare const workspaceTemplates: ScreenTemplate[];
|
|
@@ -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;AASF,eAAO,MAAM,oBAAoB,EAAE,cA6ClC,CAAC;AAGF,eAAO,MAAM,gBAAgB,EAAE,cAqB9B,CAAC;AAGF,eAAO,MAAM,aAAa,EAAE,cAY3B,CAAC;AAGF,eAAO,MAAM,kBAAkB,EAAE,cAAc,EAAqH,CAAC"}
|