@cratis/scene.blueprint.default 3.2.0 → 3.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ComponentName.js.map +1 -1
- package/dist/cjs/configuration/ColorScheme.js.map +1 -1
- package/dist/cjs/configuration/LayoutConfigProvider.js.map +1 -1
- package/dist/cjs/configuration/LayoutMode.js.map +1 -1
- package/dist/cjs/configuration/MenuTheme.js.map +1 -1
- package/dist/cjs/configuration/layoutConfigStorage.js.map +1 -1
- package/dist/cjs/configuration/layoutConfigTransitions.js.map +1 -1
- package/dist/cjs/configuration/layoutWrapperClasses.js.map +1 -1
- package/dist/cjs/defaultBlueprint.js.map +1 -1
- package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
- package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
- package/dist/cjs/gallery/TemplateSlotName.js.map +1 -1
- package/dist/cjs/gallery/applicationChrome.js.map +1 -1
- package/dist/cjs/gallery/authTemplates.js.map +1 -1
- package/dist/cjs/gallery/componentNames.js.map +1 -1
- package/dist/cjs/gallery/composeScreen.js.map +1 -1
- package/dist/cjs/gallery/dependencyComponentNames.js.map +1 -1
- package/dist/cjs/gallery/dialogTemplates.js.map +1 -1
- package/dist/cjs/gallery/elements.js.map +1 -1
- package/dist/cjs/gallery/navigation.js.map +1 -1
- package/dist/cjs/gallery/nesting.js.map +1 -1
- package/dist/cjs/gallery/previewProfile.js.map +1 -1
- package/dist/cjs/gallery/resolveElementNames.js.map +1 -1
- package/dist/cjs/gallery/screens.js.map +1 -1
- package/dist/cjs/gallery/statusTemplates.js.map +1 -1
- package/dist/cjs/gallery/supportTemplates.js.map +1 -1
- package/dist/cjs/gallery/widgets.js.map +1 -1
- package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
- package/dist/cjs/layouts/LayoutName.js.map +1 -1
- package/dist/cjs/layouts/SlotName.js.map +1 -1
- package/dist/cjs/layouts/appShell.js.map +1 -1
- package/dist/cjs/layouts/defaultLayouts.js.map +1 -1
- package/dist/cjs/layouts/flowBuilders.js.map +1 -1
- package/dist/cjs/layouts/fullPage.js.map +1 -1
- package/dist/cjs/layouts/shellComponents.js.map +1 -1
- package/dist/cjs/packageName.js.map +1 -1
- package/dist/cjs/shell/AppShell.js.map +1 -1
- package/dist/cjs/shell/Breadcrumb.js.map +1 -1
- package/dist/cjs/shell/ConfigPanel.js.map +1 -1
- package/dist/cjs/shell/Footer.js.map +1 -1
- package/dist/cjs/shell/FullPageShell.js.map +1 -1
- package/dist/cjs/shell/LayoutModeSwitcher.js.map +1 -1
- package/dist/cjs/shell/Logo.js.map +1 -1
- package/dist/cjs/shell/Mask.js.map +1 -1
- package/dist/cjs/shell/Menu.js.map +1 -1
- package/dist/cjs/shell/MenuItem.js.map +1 -1
- package/dist/cjs/shell/PageHeader.js.map +1 -1
- package/dist/cjs/shell/RightPanel.js.map +1 -1
- package/dist/cjs/shell/Sidebar.js.map +1 -1
- package/dist/cjs/shell/ThemeOption.js.map +1 -1
- package/dist/cjs/shell/ThemeSwitcher.js.map +1 -1
- package/dist/cjs/shell/Topbar.js.map +1 -1
- package/dist/cjs/shell/UserMenu.js.map +1 -1
- package/dist/cjs/shell/elementProperties.js.map +1 -1
- package/dist/cjs/themes/LayoutThemeProvider.js.map +1 -1
- package/dist/cjs/themes/blueprintThemeCompatibility.js.map +1 -1
- package/dist/cjs/themes/dark.js.map +1 -1
- package/dist/cjs/themes/defaultBlueprintThemes.js.map +1 -1
- package/dist/cjs/themes/light.js.map +1 -1
- package/dist/esm/ComponentName.js.map +1 -1
- package/dist/esm/configuration/ColorScheme.js.map +1 -1
- package/dist/esm/configuration/LayoutConfigProvider.js.map +1 -1
- package/dist/esm/configuration/LayoutMode.js.map +1 -1
- package/dist/esm/configuration/MenuTheme.js.map +1 -1
- package/dist/esm/configuration/layoutConfigStorage.js.map +1 -1
- package/dist/esm/configuration/layoutConfigTransitions.js.map +1 -1
- package/dist/esm/configuration/layoutWrapperClasses.js.map +1 -1
- package/dist/esm/defaultBlueprint.js.map +1 -1
- package/dist/esm/defaultBlueprintComponents.js.map +1 -1
- package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
- package/dist/esm/gallery/TemplateSlotName.js.map +1 -1
- package/dist/esm/gallery/applicationChrome.js.map +1 -1
- package/dist/esm/gallery/authTemplates.js.map +1 -1
- package/dist/esm/gallery/componentNames.js.map +1 -1
- package/dist/esm/gallery/composeScreen.js.map +1 -1
- package/dist/esm/gallery/dependencyComponentNames.js.map +1 -1
- package/dist/esm/gallery/dialogTemplates.js.map +1 -1
- package/dist/esm/gallery/elements.js.map +1 -1
- package/dist/esm/gallery/navigation.js.map +1 -1
- package/dist/esm/gallery/nesting.js.map +1 -1
- package/dist/esm/gallery/previewProfile.js.map +1 -1
- package/dist/esm/gallery/resolveElementNames.js.map +1 -1
- package/dist/esm/gallery/screens.js.map +1 -1
- package/dist/esm/gallery/statusTemplates.js.map +1 -1
- package/dist/esm/gallery/supportTemplates.js.map +1 -1
- package/dist/esm/gallery/widgets.js.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.js.map +1 -1
- package/dist/esm/layouts/LayoutName.js.map +1 -1
- package/dist/esm/layouts/SlotName.js.map +1 -1
- package/dist/esm/layouts/appShell.js.map +1 -1
- package/dist/esm/layouts/defaultLayouts.js.map +1 -1
- package/dist/esm/layouts/flowBuilders.js.map +1 -1
- package/dist/esm/layouts/fullPage.js.map +1 -1
- package/dist/esm/layouts/shellComponents.js.map +1 -1
- package/dist/esm/packageName.js.map +1 -1
- package/dist/esm/shell/AppShell.js.map +1 -1
- package/dist/esm/shell/Breadcrumb.js.map +1 -1
- package/dist/esm/shell/ConfigPanel.js.map +1 -1
- package/dist/esm/shell/Footer.js.map +1 -1
- package/dist/esm/shell/FullPageShell.js.map +1 -1
- package/dist/esm/shell/LayoutModeSwitcher.js.map +1 -1
- package/dist/esm/shell/Logo.js.map +1 -1
- package/dist/esm/shell/Mask.js.map +1 -1
- package/dist/esm/shell/Menu.js.map +1 -1
- package/dist/esm/shell/MenuItem.js.map +1 -1
- package/dist/esm/shell/PageHeader.js.map +1 -1
- package/dist/esm/shell/RightPanel.js.map +1 -1
- package/dist/esm/shell/Sidebar.js.map +1 -1
- package/dist/esm/shell/ThemeOption.js.map +1 -1
- package/dist/esm/shell/ThemeSwitcher.js.map +1 -1
- package/dist/esm/shell/Topbar.js.map +1 -1
- package/dist/esm/shell/UserMenu.js.map +1 -1
- package/dist/esm/shell/elementProperties.js.map +1 -1
- package/dist/esm/themes/LayoutThemeProvider.js.map +1 -1
- package/dist/esm/themes/blueprintThemeCompatibility.js.map +1 -1
- package/dist/esm/themes/dark.js.map +1 -1
- package/dist/esm/themes/defaultBlueprintThemes.js.map +1 -1
- package/dist/esm/themes/light.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/package.json +14 -14
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"elements.js","sources":["../../../gallery/elements.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 { ExternalComponent, HorizontalAlignment, Panel, SceneElement, VerticalAlignment, Visibility } from '@cratis/scene.model';\n\n/**\n * Constructors for the element trees the gallery templates are built from.\n *\n * `ExternalComponent` inherits fifteen required members from `FrameworkElement` and `VisualElement` -\n * visibility, opacity, z-index, both size constraints, margin and both alignments - before it gets to the\n * two that matter to a template author. Written as object literals, a page of realistic content is\n * ninety percent boilerplate and unreadable. These put the defaults in one place so a template reads as\n * the tree it is.\n */\n\nconst elementDefaults = {\n properties: {},\n visibility: Visibility.Visible,\n isEnabled: true,\n opacity: 1,\n size: {},\n zIndex: 0,\n minimumSize: {},\n maximumSize: {},\n margin: { left: 0, top: 0, right: 0, bottom: 0 },\n horizontalAlignment: HorizontalAlignment.Stretch,\n verticalAlignment: VerticalAlignment.Stretch,\n};\n\n/**\n * An {@link ExternalComponent} naming a component by its **bare** name.\n *\n * Bare rather than package-qualified on purpose: `resolveComponentName` then decides which active package\n * wins the name against the profile's priority order, so the same template renders with PrimeReact's\n * widgets in one profile and somebody else's in another. A template that qualified its names would pin\n * itself to one library and stop being a template.\n */\nexport function externalComponent(\n id: string,\n componentName: string,\n properties: Record<string, unknown> = {},\n slots: Record<string, SceneElement[]> = {},\n): ExternalComponent {\n return { ...elementDefaults, id, name: id, properties, componentName, slots };\n}\n\n/** A {@link Panel} grouping children, for a row or column of content inside a slot. */\nexport function panel(id: string, children: SceneElement[]): Panel {\n return { ...elementDefaults, id, name: id, children };\n}\n\n/** A `core:text` run - the one component name guaranteed to resolve in every profile. */\nexport function text(id: string, value: string): ExternalComponent {\n return externalComponent(id, 'text', { text: value });\n}\n\n/** A `core:button`. */\nexport function button(id: string, label: string, properties: Record<string, unknown> = {}): ExternalComponent {\n return externalComponent(id, 'button', { label, ...properties });\n}\n\n/** A `core:card` wrapping content. */\nexport function card(id: string, content: SceneElement[], properties: Record<string, unknown> = {}): ExternalComponent {\n return externalComponent(id, 'card', properties, { content });\n}\n"],"names":["elementDefaults","properties","visibility","Visibility","Visible","isEnabled","opacity","size","zIndex","minimumSize","maximumSize","margin","left","top","right","bottom","horizontalAlignment","HorizontalAlignment","Stretch","verticalAlignment","VerticalAlignment","externalComponent","id","componentName","slots","name","panel","children","text","value","button","label","card","content"],"mappings":";;;;AAAA;AACA;AAIA;;;;;;;;AAQC,IAED,MAAMA,eAAAA,GAAkB;AACpBC,IAAAA,UAAAA,EAAY,EAAC;AACbC,IAAAA,UAAAA,EAAYC,uBAAWC,OAAO;IAC9BC,SAAAA,EAAW,IAAA;IACXC,OAAAA,EAAS,CAAA;AACTC,IAAAA,IAAAA,EAAM,EAAC;IACPC,MAAAA,EAAQ,CAAA;AACRC,IAAAA,WAAAA,EAAa,EAAC;AACdC,IAAAA,WAAAA,EAAa,EAAC;IACdC,MAAAA,EAAQ;QAAEC,IAAAA,EAAM,CAAA;QAAGC,GAAAA,EAAK,CAA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","sources":["../../../gallery/elements.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 { ExternalComponent, HorizontalAlignment, Panel, SceneElement, VerticalAlignment, Visibility } from '@cratis/scene.model';\n\n/**\n * Constructors for the element trees the gallery templates are built from.\n *\n * `ExternalComponent` inherits fifteen required members from `FrameworkElement` and `VisualElement` -\n * visibility, opacity, z-index, both size constraints, margin and both alignments - before it gets to the\n * two that matter to a template author. Written as object literals, a page of realistic content is\n * ninety percent boilerplate and unreadable. These put the defaults in one place so a template reads as\n * the tree it is.\n */\n\nconst elementDefaults = {\n properties: {},\n visibility: Visibility.Visible,\n isEnabled: true,\n opacity: 1,\n size: {},\n zIndex: 0,\n minimumSize: {},\n maximumSize: {},\n margin: { left: 0, top: 0, right: 0, bottom: 0 },\n horizontalAlignment: HorizontalAlignment.Stretch,\n verticalAlignment: VerticalAlignment.Stretch,\n};\n\n/**\n * An {@link ExternalComponent} naming a component by its **bare** name.\n *\n * Bare rather than package-qualified on purpose: `resolveComponentName` then decides which active package\n * wins the name against the profile's priority order, so the same template renders with PrimeReact's\n * widgets in one profile and somebody else's in another. A template that qualified its names would pin\n * itself to one library and stop being a template.\n */\nexport function externalComponent(\n id: string,\n componentName: string,\n properties: Record<string, unknown> = {},\n slots: Record<string, SceneElement[]> = {},\n): ExternalComponent {\n return { ...elementDefaults, id, name: id, properties, componentName, slots };\n}\n\n/** A {@link Panel} grouping children, for a row or column of content inside a slot. */\nexport function panel(id: string, children: SceneElement[]): Panel {\n return { ...elementDefaults, id, name: id, children };\n}\n\n/** A `core:text` run - the one component name guaranteed to resolve in every profile. */\nexport function text(id: string, value: string): ExternalComponent {\n return externalComponent(id, 'text', { text: value });\n}\n\n/** A `core:button`. */\nexport function button(id: string, label: string, properties: Record<string, unknown> = {}): ExternalComponent {\n return externalComponent(id, 'button', { label, ...properties });\n}\n\n/** A `core:card` wrapping content. */\nexport function card(id: string, content: SceneElement[], properties: Record<string, unknown> = {}): ExternalComponent {\n return externalComponent(id, 'card', properties, { content });\n}\n"],"names":["elementDefaults","properties","visibility","Visibility","Visible","isEnabled","opacity","size","zIndex","minimumSize","maximumSize","margin","left","top","right","bottom","horizontalAlignment","HorizontalAlignment","Stretch","verticalAlignment","VerticalAlignment","externalComponent","id","componentName","slots","name","panel","children","text","value","button","label","card","content"],"mappings":";;;;AAAA;AACA;AAIA;;;;;;;;AAQC,IAED,MAAMA,eAAAA,GAAkB;AACpBC,IAAAA,UAAAA,EAAY,EAAC;AACbC,IAAAA,UAAAA,EAAYC,uBAAWC,OAAO;IAC9BC,SAAAA,EAAW,IAAA;IACXC,OAAAA,EAAS,CAAA;AACTC,IAAAA,IAAAA,EAAM,EAAC;IACPC,MAAAA,EAAQ,CAAA;AACRC,IAAAA,WAAAA,EAAa,EAAC;AACdC,IAAAA,WAAAA,EAAa,EAAC;IACdC,MAAAA,EAAQ;QAAEC,IAAAA,EAAM,CAAA;QAAGC,GAAAA,EAAK,CAAA;QAAGC,KAAAA,EAAO,CAAA;QAAGC,MAAAA,EAAQ;AAAE,KAAA;AAC/CC,IAAAA,mBAAAA,EAAqBC,gCAAoBC,OAAO;AAChDC,IAAAA,iBAAAA,EAAmBC,8BAAkBF;AACzC,CAAA;AAEA;;;;;;;AAOC,IACM,SAASG,iBAAAA,CACZC,EAAU,EACVC,aAAqB,EACrBtB,UAAAA,GAAsC,EAAE,EACxCuB,KAAAA,GAAwC,EAAE,EAAA;IAE1C,OAAO;AAAE,QAAA,GAAGxB,eAAe;AAAEsB,QAAAA,EAAAA;QAAIG,IAAAA,EAAMH,EAAAA;AAAIrB,QAAAA,UAAAA;AAAYsB,QAAAA,aAAAA;AAAeC,QAAAA;AAAM,KAAA;AAChF;AAEA,wFACO,SAASE,KAAAA,CAAMJ,EAAU,EAAEK,QAAwB,EAAA;IACtD,OAAO;AAAE,QAAA,GAAG3B,eAAe;AAAEsB,QAAAA,EAAAA;QAAIG,IAAAA,EAAMH,EAAAA;AAAIK,QAAAA;AAAS,KAAA;AACxD;AAEA,0FACO,SAASC,IAAAA,CAAKN,EAAU,EAAEO,KAAa,EAAA;IAC1C,OAAOR,iBAAAA,CAAkBC,IAAI,MAAA,EAAQ;QAAEM,IAAAA,EAAMC;AAAM,KAAA,CAAA;AACvD;AAEA,wBACO,SAASC,MAAAA,CAAOR,EAAU,EAAES,KAAa,EAAE9B,UAAAA,GAAsC,EAAE,EAAA;IACtF,OAAOoB,iBAAAA,CAAkBC,IAAI,QAAA,EAAU;AAAES,QAAAA,KAAAA;AAAO,QAAA,GAAG9B;AAAW,KAAA,CAAA;AAClE;AAEA,uCACO,SAAS+B,IAAAA,CAAKV,EAAU,EAAEW,OAAuB,EAAEhC,UAAAA,GAAsC,EAAE,EAAA;IAC9F,OAAOoB,iBAAAA,CAAkBC,EAAAA,EAAI,MAAA,EAAQrB,UAAAA,EAAY;AAAEgC,QAAAA;AAAQ,KAAA,CAAA;AAC/D;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.js","sources":["../../../gallery/navigation.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 { Contribution, SceneElement } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { NavigationEntry } from './NavigationEntry';\nimport { externalComponent } from './elements';\n\n/** The contribution point the built-in navigation aggregation reads. */\nexport const navigationContributionPoint = 'Navigation';\n\n/**\n * The gallery's navigation, declared once.\n *\n * One list, two consumers: the sidebar menu renders it as `menuItem` elements, and the same elements go to\n * the `Navigation` contribution point where `aggregateContributions` + `extractNavigationItem` turn them\n * back into navigation items. A blueprint that maintained a menu *and* a separate navigation declaration\n * would have two lists that agree right up until someone adds a screen to one of them.\n */\nexport const navigationEntries: NavigationEntry[] = [\n { label: 'Dashboard', targetScreen: 'Dashboard', icon: 'pi pi-home', group: 'Workspace', order: 10 },\n { label: 'Products', targetScreen: 'CrudList', icon: 'pi pi-box', group: 'Workspace', order: 20 },\n { label: 'Product detail', targetScreen: 'DetailView', icon: 'pi pi-file', group: 'Workspace', order: 30 },\n { label: 'New product', targetScreen: 'FormPage', icon: 'pi pi-plus-circle', group: 'Workspace', order: 40 },\n { label: 'Invoices', targetScreen: 'Invoice', icon: 'pi pi-receipt', group: 'Workspace', order: 50 },\n { label: 'Nothing yet', targetScreen: 'Empty', icon: 'pi pi-inbox', group: 'Workspace', order: 60 },\n { label: 'Users', targetScreen: 'UserManagement', icon: 'pi pi-users', group: 'Administration', order: 10 },\n { label: 'Your profile', targetScreen: 'ProfileSettings', icon: 'pi pi-user', group: 'Administration', order: 20 },\n { label: 'Documentation', targetScreen: 'Documentation', icon: 'pi pi-book', group: 'Support', order: 10 },\n { label: 'Help', targetScreen: 'Help', icon: 'pi pi-question-circle', group: 'Support', order: 20 },\n];\n\n/**\n * The element one navigation entry becomes.\n *\n * `routeParameterBindings` is present and empty rather than omitted, because that is what\n * `extractNavigationItem` expects to read - and an omitted bag and an empty one are the same thing right\n * up until something iterates it.\n */\nexport function navigationElement(entry: NavigationEntry, activeScreen?: string): SceneElement {\n return externalComponent(`nav-${entry.targetScreen}`, ComponentName.MenuItem, {\n label: entry.label,\n targetScreen: entry.targetScreen,\n routeParameterBindings: {},\n order: entry.order,\n group: entry.group,\n icon: entry.icon,\n isActive: entry.targetScreen === activeScreen,\n });\n}\n\n/**\n * The navigation as contributions to the `Navigation` contribution point.\n *\n * A screen carries these in its `contributions`, and anything bound to the contribution point recomputes\n * from whatever is currently in scope - so a screen that contributes an extra entry gets it in the\n * navigation without the navigation knowing that screen exists.\n */\nexport const navigationContributions: Contribution[] = navigationEntries.map(entry => ({\n contributionPointName: navigationContributionPoint,\n content: navigationElement(entry),\n order: entry.order,\n}));\n\n/** The navigation entries of one group, in order. */\nexport function entriesInGroup(group: string): NavigationEntry[] {\n return navigationEntries.filter(entry => entry.group === group).sort((first, second) => first.order - second.order);\n}\n\n/** Every group named by the navigation, in first-declared order. */\nexport const navigationGroups: string[] = [...new Set(navigationEntries.map(entry => entry.group))];\n"],"names":["navigationContributionPoint","navigationEntries","label","targetScreen","icon","group","order","navigationElement","entry","activeScreen","externalComponent","ComponentName","MenuItem","routeParameterBindings","isActive","navigationContributions","map","contributionPointName","content","entriesInGroup","filter","sort","first","second","navigationGroups","Set"],"mappings":";;;;;AAAA;AACA;AAOA,yEACO,MAAMA,2BAAAA,GAA8B;AAE3C;;;;;;;UAQaC,iBAAAA,GAAuC;AAChD,IAAA;QAAEC,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,WAAA;QAAaC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,UAAA;QAAYC,IAAAA,EAAM,WAAA;QAAaC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AAChG,IAAA;QAAEJ,KAAAA,EAAO,gBAAA;QAAkBC,YAAAA,EAAc,YAAA;QAAcC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AACzG,IAAA;QAAEJ,KAAAA,EAAO,aAAA;QAAeC,YAAAA,EAAc,UAAA;QAAYC,IAAAA,EAAM,mBAAA;QAAqBC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AAC3G,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,SAAA;QAAWC,IAAAA,EAAM,eAAA;QAAiBC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,aAAA;QAAeC,YAAAA,EAAc,OAAA;QAASC,IAAAA,EAAM,aAAA;QAAeC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KA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uBjB,2BAAAA;AACvBkB,QAAAA,OAAAA,EAASX,iBAAAA,CAAkBC,KAAAA,CAAAA;AAC3BF,QAAAA,KAAAA,EAAOE,MAAMF;AACjB,KAAA,CAAA;AAEA,sDACO,SAASa,cAAAA,CAAed,KAAa,EAAA;AACxC,IAAA,OAAOJ,kBAAkBmB,MAAM,CAACZ,CAAAA,KAAAA,GAASA,KAAAA,CAAMH,KAAK,KAAKA,KAAAA,CAAAA,CAAOgB,IAAI,CAAC,CAACC,KAAAA,EAAOC,MAAAA,GAAWD,MAAMhB,KAAK,GAAGiB,OAAOjB,KAAK,CAAA;AACtH;AAEA,qEACO,MAAMkB,gBAAAA,GAA6B;AAAI,IAAA,GAAA,IAAIC,IAAIxB,iBAAAA,CAAkBe,GAAG,CAACR,CAAAA,KAAAA,GAASA,MAAMH,KAAK,CAAA
|
|
1
|
+
{"version":3,"file":"navigation.js","sources":["../../../gallery/navigation.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 { Contribution, SceneElement } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { NavigationEntry } from './NavigationEntry';\nimport { externalComponent } from './elements';\n\n/** The contribution point the built-in navigation aggregation reads. */\nexport const navigationContributionPoint = 'Navigation';\n\n/**\n * The gallery's navigation, declared once.\n *\n * One list, two consumers: the sidebar menu renders it as `menuItem` elements, and the same elements go to\n * the `Navigation` contribution point where `aggregateContributions` + `extractNavigationItem` turn them\n * back into navigation items. A blueprint that maintained a menu *and* a separate navigation declaration\n * would have two lists that agree right up until someone adds a screen to one of them.\n */\nexport const navigationEntries: NavigationEntry[] = [\n { label: 'Dashboard', targetScreen: 'Dashboard', icon: 'pi pi-home', group: 'Workspace', order: 10 },\n { label: 'Products', targetScreen: 'CrudList', icon: 'pi pi-box', group: 'Workspace', order: 20 },\n { label: 'Product detail', targetScreen: 'DetailView', icon: 'pi pi-file', group: 'Workspace', order: 30 },\n { label: 'New product', targetScreen: 'FormPage', icon: 'pi pi-plus-circle', group: 'Workspace', order: 40 },\n { label: 'Invoices', targetScreen: 'Invoice', icon: 'pi pi-receipt', group: 'Workspace', order: 50 },\n { label: 'Nothing yet', targetScreen: 'Empty', icon: 'pi pi-inbox', group: 'Workspace', order: 60 },\n { label: 'Users', targetScreen: 'UserManagement', icon: 'pi pi-users', group: 'Administration', order: 10 },\n { label: 'Your profile', targetScreen: 'ProfileSettings', icon: 'pi pi-user', group: 'Administration', order: 20 },\n { label: 'Documentation', targetScreen: 'Documentation', icon: 'pi pi-book', group: 'Support', order: 10 },\n { label: 'Help', targetScreen: 'Help', icon: 'pi pi-question-circle', group: 'Support', order: 20 },\n];\n\n/**\n * The element one navigation entry becomes.\n *\n * `routeParameterBindings` is present and empty rather than omitted, because that is what\n * `extractNavigationItem` expects to read - and an omitted bag and an empty one are the same thing right\n * up until something iterates it.\n */\nexport function navigationElement(entry: NavigationEntry, activeScreen?: string): SceneElement {\n return externalComponent(`nav-${entry.targetScreen}`, ComponentName.MenuItem, {\n label: entry.label,\n targetScreen: entry.targetScreen,\n routeParameterBindings: {},\n order: entry.order,\n group: entry.group,\n icon: entry.icon,\n isActive: entry.targetScreen === activeScreen,\n });\n}\n\n/**\n * The navigation as contributions to the `Navigation` contribution point.\n *\n * A screen carries these in its `contributions`, and anything bound to the contribution point recomputes\n * from whatever is currently in scope - so a screen that contributes an extra entry gets it in the\n * navigation without the navigation knowing that screen exists.\n */\nexport const navigationContributions: Contribution[] = navigationEntries.map(entry => ({\n contributionPointName: navigationContributionPoint,\n content: navigationElement(entry),\n order: entry.order,\n}));\n\n/** The navigation entries of one group, in order. */\nexport function entriesInGroup(group: string): NavigationEntry[] {\n return navigationEntries.filter(entry => entry.group === group).sort((first, second) => first.order - second.order);\n}\n\n/** Every group named by the navigation, in first-declared order. */\nexport const navigationGroups: string[] = [...new Set(navigationEntries.map(entry => entry.group))];\n"],"names":["navigationContributionPoint","navigationEntries","label","targetScreen","icon","group","order","navigationElement","entry","activeScreen","externalComponent","ComponentName","MenuItem","routeParameterBindings","isActive","navigationContributions","map","contributionPointName","content","entriesInGroup","filter","sort","first","second","navigationGroups","Set"],"mappings":";;;;;AAAA;AACA;AAOA,yEACO,MAAMA,2BAAAA,GAA8B;AAE3C;;;;;;;UAQaC,iBAAAA,GAAuC;AAChD,IAAA;QAAEC,KAAAA,EAAO,WAAA;QAAaC,YAAAA,EAAc,WAAA;QAAaC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,UAAA;QAAYC,IAAAA,EAAM,WAAA;QAAaC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AAChG,IAAA;QAAEJ,KAAAA,EAAO,gBAAA;QAAkBC,YAAAA,EAAc,YAAA;QAAcC,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AACzG,IAAA;QAAEJ,KAAAA,EAAO,aAAA;QAAeC,YAAAA,EAAc,UAAA;QAAYC,IAAAA,EAAM,mBAAA;QAAqBC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AAC3G,IAAA;QAAEJ,KAAAA,EAAO,UAAA;QAAYC,YAAAA,EAAc,SAAA;QAAWC,IAAAA,EAAM,eAAA;QAAiBC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AACnG,IAAA;QAAEJ,KAAAA,EAAO,aAAA;QAAeC,YAAAA,EAAc,OAAA;QAASC,IAAAA,EAAM,aAAA;QAAeC,KAAAA,EAAO,WAAA;QAAaC,KAAAA,EAAO;AAAG,KAAA;AAClG,IAAA;QAAEJ,KAAAA,EAAO,OAAA;QAASC,YAAAA,EAAc,gBAAA;QAAkBC,IAAAA,EAAM,aAAA;QAAeC,KAAA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F;AACjB,KAAA,CAAA;AAEA,sDACO,SAASa,cAAAA,CAAed,KAAa,EAAA;AACxC,IAAA,OAAOJ,kBAAkBmB,MAAM,CAACZ,CAAAA,KAAAA,GAASA,KAAAA,CAAMH,KAAK,KAAKA,KAAAA,CAAAA,CAAOgB,IAAI,CAAC,CAACC,KAAAA,EAAOC,MAAAA,GAAWD,MAAMhB,KAAK,GAAGiB,OAAOjB,KAAK,CAAA;AACtH;AAEA,qEACO,MAAMkB,gBAAAA,GAA6B;AAAI,IAAA,GAAA,IAAIC,IAAIxB,iBAAAA,CAAkBe,GAAG,CAACR,CAAAA,KAAAA,GAASA,MAAMH,KAAK,CAAA;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nesting.js","sources":["../../../gallery/nesting.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName, column, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, externalComponent } from './elements';\nimport { pageHeader } from './widgets';\n\n/**\n * A worked three-level chain, from the application layout down to a slice.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's template\n * fits a slot the module's template declares; a slice's fits one the feature's declares. Nothing here is a\n * special case for a particular level - which is exactly why the hierarchy can be arbitrarily deep without\n * a second mechanism.\n *\n * These three exist to make that concrete and to be asserted by a spec, because \"it composes recursively\"\n * is the kind of claim that is true in a design document and wrong in the code.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * It brings its own header - a module always has a name and a description - and offers a body for the\n * feature inside it plus an optional side panel.\n */\nexport const moduleWorkspaceTemplate: ScreenTemplate = {\n name: 'ModuleWorkspace',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('module-header', 'Operations', 'Everything the operations module owns')],\n },\n displayName: 'Module workspace',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n};\n\n/**\n * Feature level: fits the module workspace's `body` slot.\n *\n * It brings a toolbar, because a feature is where actions belong - a module is a grouping, a slice is one\n * behavior, and the feature in between is what a user thinks of as a screen with buttons on it.\n */\nexport const featureSectionTemplate: ScreenTemplate = {\n name: 'FeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n button('feature-new', 'New', { severity: 'primary', icon: 'pi pi-plus' }),\n button('feature-export', 'Export', { severity: 'secondary', icon: 'pi pi-download' }),\n ],\n },\n displayName: 'Feature section',\n description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',\n};\n\n/**\n * Slice level: fits the feature section's `body` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it - one behavior's surface, with somewhere\n * to put it and somewhere to put its actions.\n */\nexport const sliceSectionTemplate: ScreenTemplate = {\n name: 'SliceSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)]),\n },\n content: {\n [TemplateSlotName.Body]: [externalComponent('slice-body', ComponentName.PageHeader, { title: 'Adjustment', subtitle: 'One behavior, one surface' })],\n },\n displayName: 'Slice section',\n description: 'Slice level: fits a feature section body slot and hosts one behavior.',\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [moduleWorkspaceTemplate, featureSectionTemplate, sliceSectionTemplate];\n"],"names":["moduleWorkspaceTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","pageHeader","displayName","description","featureSectionTemplate","Toolbar","button","severity","icon","sliceSectionTemplate","Actions","arrangement","root","column","slotLeaf","grow","externalComponent","ComponentName","PageHeader","title","subtitle","nestingChainTemplates"],"mappings":";;;;;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,kCAAiBG;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,iCAAAA,CAAiBC,MAAM,GAAG;AAACI,YAAAA,kBAAAA,CAAW,iBAAiB,YAAA,EAAc,uCAAA;AAAyC;AACnH,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA;;;;;UAMaC,sBAAAA,GAAyC;IAClDb,IAAAA,EAAM,gBAAA;AACNC,IAAAA,QAAAA,EAAUI,kCAAiBE,IAAI;IAC/BH,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBS;AAAQ,SAAA;AAAG,QAAA;AAAEd,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAK;AAAE,KAAA;IAC5EE,OAAAA,EAAS;QACL,CAACJ,iCAAAA,CAAiBS,OAAO,GAAG;AACxBC,YAAAA,eAAAA,CAAO,eAAe,KAAA,EAAO;gBAAEC,QAAAA,EAAU,SAAA;gBAAWC,IAAAA,EAAM;AAAa,aAAA,CAAA;AACvEF,YAAAA,eAAAA,CAAO,kBAAkB,QAAA,EAAU;gBAAEC,QAAAA,EAAU,WAAA;gBAAaC,IAAAA,EAAM;AAAiB,aAAA;AACtF;AACL,KAAA;IACAN,WAAAA,EAAa,iBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA;;;;;UAMaM,oBAAAA,GAAuC;IAChDlB,IAAAA,EAAM,cAAA;AACNC,IAAAA,QAAAA,EAAUI,kCAAiBE,IAAI;IAC/BH,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,kCAAiBc;AAAQ;AAAE,KAAA;IAC5EC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,mBAAAA,CAAO;YAACC,qBAAAA,CAASlB,iCAAAA,CAAiBE,IAAI,EAAE;gBAAEiB,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,qBAAAA,CAASlB,kCAAiBc,OAAO;AAAE,SAAA;AACnG,KAAA;IACAV,OAAAA,EAAS;QACL,CAACJ,iCAAAA,CAAiBE,IAAI,GAAG;YAACkB,0BAAAA,CAAkB,YAAA,EAAcC,2BAAAA,CAAcC,UAAU,EAAE;gBAAEC,KAAAA,EAAO,YAAA;gBAAcC,QAAAA,EAAU;AAA4B,aAAA;AAAG;AACxJ,KAAA;IACAlB,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,mGACO,MAAMkB,qBAAAA,GAA0C;AAAC/B,IAAAA,uBAAAA;AAAyBc,IAAAA,sBAAAA;AAAwBK,IAAAA
|
|
1
|
+
{"version":3,"file":"nesting.js","sources":["../../../gallery/nesting.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName, column, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, externalComponent } from './elements';\nimport { pageHeader } from './widgets';\n\n/**\n * A worked three-level chain, from the application layout down to a slice.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's template\n * fits a slot the module's template declares; a slice's fits one the feature's declares. Nothing here is a\n * special case for a particular level - which is exactly why the hierarchy can be arbitrarily deep without\n * a second mechanism.\n *\n * These three exist to make that concrete and to be asserted by a spec, because \"it composes recursively\"\n * is the kind of claim that is true in a design document and wrong in the code.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * It brings its own header - a module always has a name and a description - and offers a body for the\n * feature inside it plus an optional side panel.\n */\nexport const moduleWorkspaceTemplate: ScreenTemplate = {\n name: 'ModuleWorkspace',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('module-header', 'Operations', 'Everything the operations module owns')],\n },\n displayName: 'Module workspace',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n};\n\n/**\n * Feature level: fits the module workspace's `body` slot.\n *\n * It brings a toolbar, because a feature is where actions belong - a module is a grouping, a slice is one\n * behavior, and the feature in between is what a user thinks of as a screen with buttons on it.\n */\nexport const featureSectionTemplate: ScreenTemplate = {\n name: 'FeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n button('feature-new', 'New', { severity: 'primary', icon: 'pi pi-plus' }),\n button('feature-export', 'Export', { severity: 'secondary', icon: 'pi pi-download' }),\n ],\n },\n displayName: 'Feature section',\n description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',\n};\n\n/**\n * Slice level: fits the feature section's `body` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it - one behavior's surface, with somewhere\n * to put it and somewhere to put its actions.\n */\nexport const sliceSectionTemplate: ScreenTemplate = {\n name: 'SliceSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)]),\n },\n content: {\n [TemplateSlotName.Body]: [externalComponent('slice-body', ComponentName.PageHeader, { title: 'Adjustment', subtitle: 'One behavior, one surface' })],\n },\n displayName: 'Slice section',\n description: 'Slice level: fits a feature section body slot and hosts one behavior.',\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [moduleWorkspaceTemplate, featureSectionTemplate, sliceSectionTemplate];\n"],"names":["moduleWorkspaceTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","pageHeader","displayName","description","featureSectionTemplate","Toolbar","button","severity","icon","sliceSectionTemplate","Actions","arrangement","root","column","slotLeaf","grow","externalComponent","ComponentName","PageHeader","title","subtitle","nestingChainTemplates"],"mappings":";;;;;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,kCAAiBG;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,iCAAAA,CAAiBC,MAAM,GAAG;AAACI,YAAAA,kBAAAA,CAAW,iBAAiB,YAAA,EAAc,uCAAA;AAAyC;AACnH,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa;AACjB;AAEA;;;;;UAMaC,sBAAAA,GAAyC;IAClDb,IAAAA,EAAM,gBAAA;AACNC,IAAAA,QA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B,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,mGACO,MAAMkB,qBAAAA,GAA0C;AAAC/B,IAAAA,uBAAAA;AAAyBc,IAAAA,sBAAAA;AAAwBK,IAAAA;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"previewProfile.js","sources":["../../../gallery/previewProfile.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 { UiProfile } from '@cratis/scene.model';\nimport { PackageCatalog } from '@cratis/scene.engine';\nimport { ComponentName } from '../ComponentName';\nimport { defaultBlueprintName } from '../packageName';\nimport { coreComponentNames, cratisComponentsNames, primeReactComponentNames } from './dependencyComponentNames';\n\n/**\n * The profile the gallery is previewed against.\n *\n * `core` is listed explicitly rather than left to `effectivePackages` to prepend, because a theme's\n * compatibility is checked against exactly what the profile declares - and a profile that leans on the\n * implicit fallback would make a theme look incompatible with a package the profile never admitted to\n * using. Declaration order is ascending priority, so this blueprint's own names win over the component\n * libraries', which is what lets it provide a `breadcrumb` of its own without hiding PrimeReact's.\n */\nexport const galleryProfile: UiProfile = {\n name: 'Gallery',\n targetPlatform: 'web',\n packages: ['core', 'PrimeReact', 'Cratis.Components', defaultBlueprintName],\n};\n\n/**\n * The profile a *preview* resolves against, when only some of those packages are actually loaded.\n *\n * Same four packages, different order, and the difference is deliberate. This blueprint takes no npm\n * dependency on PrimeReact's or Cratis Components' bundles - a blueprint declares its dependencies in its\n * manifest, not in its bundler graph - so a preview run from this package has `core` and this blueprint\n * implemented and nothing else. Ranking `core` above the two libraries means `text`, `button` and `card`\n * resolve to something that exists, and the preview shows real content instead of a wall of placeholders.\n *\n * Names only the libraries declare - `dataTable`, `timeline`, `tag` - still resolve to them, find no\n * implementation, and render as `UnresolvedComponent`'s dashed box naming what is missing. That is the\n * right outcome rather than a papered-over one: previewing a blueprint against half a profile *should*\n * look visibly incomplete. A host with all four bundles loaded uses {@link galleryProfile} and sees the\n * real widgets.\n */\nexport const galleryPreviewProfile: UiProfile = {\n name: 'Gallery preview',\n targetPlatform: 'web',\n packages: ['PrimeReact', 'Cratis.Components', 'core', defaultBlueprintName],\n};\n\n/**\n * The component catalog the gallery resolves against.\n *\n * This blueprint's own entry is its real declared component list; the other three are the subsets it\n * borrows, each name checked against the owning package's own manifest (see `dependencyComponentNames.ts`).\n * A host that has all four packages loaded should build this from their manifests instead - the shape is\n * the same, and anything that has drifted then fails this blueprint's specs rather than a preview.\n */\nexport const galleryComponentCatalog: PackageCatalog = {\n core: coreComponentNames,\n PrimeReact: primeReactComponentNames,\n 'Cratis.Components': cratisComponentsNames,\n [defaultBlueprintName]: Object.values(ComponentName),\n};\n"],"names":["galleryProfile","name","targetPlatform","packages","defaultBlueprintName","galleryPreviewProfile","galleryComponentCatalog","core","coreComponentNames","PrimeReact","primeReactComponentNames","cratisComponentsNames","Object","values","ComponentName"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;;;;;UASaA,cAAAA,GAA4B;IACrCC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB,KAAA;IAChBC,QAAAA,EAAU;AAAC,QAAA,MAAA;AAAQ,QAAA,YAAA;AAAc,QAAA,mBAAA;AAAqBC,QAAAA;AAAqB;AAC/E;AAEA;;;;;;;;;;;;;;UAeaC,qBAAAA,GAAmC;IAC5CJ,IAAAA,EAAM,iBAAA;IACNC,cAAAA,EAAgB,KAAA;IAChBC,QAAAA,EAAU;AAAC,QAAA,YAAA;AAAc,QAAA,mBAAA;AAAqB,QAAA,MAAA;AAAQC,QAAAA;AAAqB;AAC/E;AAEA;;;;;;;UAQaE,uBAAAA,GAA0C;IACnDC,IAAAA,EAAMC,2CAAAA;IACNC,UAAAA,EAAYC,iDAAAA;IACZ,mBAAA,EAAqBC,8CAAAA;AACrB,IAAA,CAACP,gCAAAA,GAAuBQ,MAAAA,CAAOC,MAAM,CAACC,2BAAAA;AAC1C
|
|
1
|
+
{"version":3,"file":"previewProfile.js","sources":["../../../gallery/previewProfile.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 { UiProfile } from '@cratis/scene.model';\nimport { PackageCatalog } from '@cratis/scene.engine';\nimport { ComponentName } from '../ComponentName';\nimport { defaultBlueprintName } from '../packageName';\nimport { coreComponentNames, cratisComponentsNames, primeReactComponentNames } from './dependencyComponentNames';\n\n/**\n * The profile the gallery is previewed against.\n *\n * `core` is listed explicitly rather than left to `effectivePackages` to prepend, because a theme's\n * compatibility is checked against exactly what the profile declares - and a profile that leans on the\n * implicit fallback would make a theme look incompatible with a package the profile never admitted to\n * using. Declaration order is ascending priority, so this blueprint's own names win over the component\n * libraries', which is what lets it provide a `breadcrumb` of its own without hiding PrimeReact's.\n */\nexport const galleryProfile: UiProfile = {\n name: 'Gallery',\n targetPlatform: 'web',\n packages: ['core', 'PrimeReact', 'Cratis.Components', defaultBlueprintName],\n};\n\n/**\n * The profile a *preview* resolves against, when only some of those packages are actually loaded.\n *\n * Same four packages, different order, and the difference is deliberate. This blueprint takes no npm\n * dependency on PrimeReact's or Cratis Components' bundles - a blueprint declares its dependencies in its\n * manifest, not in its bundler graph - so a preview run from this package has `core` and this blueprint\n * implemented and nothing else. Ranking `core` above the two libraries means `text`, `button` and `card`\n * resolve to something that exists, and the preview shows real content instead of a wall of placeholders.\n *\n * Names only the libraries declare - `dataTable`, `timeline`, `tag` - still resolve to them, find no\n * implementation, and render as `UnresolvedComponent`'s dashed box naming what is missing. That is the\n * right outcome rather than a papered-over one: previewing a blueprint against half a profile *should*\n * look visibly incomplete. A host with all four bundles loaded uses {@link galleryProfile} and sees the\n * real widgets.\n */\nexport const galleryPreviewProfile: UiProfile = {\n name: 'Gallery preview',\n targetPlatform: 'web',\n packages: ['PrimeReact', 'Cratis.Components', 'core', defaultBlueprintName],\n};\n\n/**\n * The component catalog the gallery resolves against.\n *\n * This blueprint's own entry is its real declared component list; the other three are the subsets it\n * borrows, each name checked against the owning package's own manifest (see `dependencyComponentNames.ts`).\n * A host that has all four packages loaded should build this from their manifests instead - the shape is\n * the same, and anything that has drifted then fails this blueprint's specs rather than a preview.\n */\nexport const galleryComponentCatalog: PackageCatalog = {\n core: coreComponentNames,\n PrimeReact: primeReactComponentNames,\n 'Cratis.Components': cratisComponentsNames,\n [defaultBlueprintName]: Object.values(ComponentName),\n};\n"],"names":["galleryProfile","name","targetPlatform","packages","defaultBlueprintName","galleryPreviewProfile","galleryComponentCatalog","core","coreComponentNames","PrimeReact","primeReactComponentNames","cratisComponentsNames","Object","values","ComponentName"],"mappings":";;;;;;AAAA;AACA;AAQA;;;;;;;;UASaA,cAAAA,GAA4B;IACrCC,IAAAA,EAAM,SAAA;IACNC,cAAAA,EAAgB,KAAA;IAChBC,QAAAA,EAAU;AAAC,QAAA,MAAA;AAAQ,QAAA,YAAA;AAAc,QAAA,mBAAA;AAAqBC,QAAAA;AAAqB;AAC/E;AAEA;;;;;;;;;;;;;;UAeaC,qBAAAA,GAAmC;IAC5CJ,IAAAA,EAAM,iBAAA;IACNC,cAAAA,EAAgB,KAAA;IAChBC,QAAAA,EAAU;AAAC,QAAA,YAAA;AAAc,QAAA,mBAAA;AAAqB,QAAA,MAAA;AAAQC,QAAAA;AAAqB;AAC/E;AAEA;;;;;;;UAQaE,uBAAAA,GAA0C;IACnDC,IAAAA,EAAMC,2CAAAA;IACNC,UAAAA,EAAYC,iDAAAA;IACZ,mBAAA,EAAqBC,8CAAAA;AACrB,IAAA,CAACP,gCAAAA,GAAuBQ,MAAAA,CAAOC,MAAM,CAACC,2BAAAA;AAC1C;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resolveElementNames.js","sources":["../../../gallery/resolveElementNames.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 { ContentControl, ExternalComponent, ItemsControl, Panel, SceneElement, UiProfile } from '@cratis/scene.model';\nimport { PackageCatalog, isContentControl, isExternalComponent, isItemsControl, isPanel, resolveComponentName } from '@cratis/scene.engine';\nimport { componentRegistryKey } from '@cratis/scene.react';\n\n/**\n * Rewrites an element tree's bare component names into the keys the React registry is keyed by.\n *\n * The renderer looks a component up by `element.componentName` against a registry keyed by\n * `componentRegistryKey(package, name)`, so something has to resolve bare names against the active profile\n * first. Wiring that into the renderer proper is Stage's job and does not exist yet; this is the small\n * local version that lets the gallery boot through the *real* engine and the *real* registry today rather\n * than waiting for it.\n *\n * A name nothing declares is left exactly as written. That is deliberate: the renderer then falls back to\n * `UnresolvedComponent` and shows a dashed red box naming the component, which is far more useful than a\n * throw from inside a tree walk.\n *\n * @param element The tree to rewrite.\n * @param profile The profile whose package priority decides which package wins a bare name.\n * @param catalog Each active package's declared component names.\n * @returns A new tree; the original is untouched.\n */\nexport function resolveElementComponentNames(element: SceneElement, profile: UiProfile, catalog: PackageCatalog): SceneElement {\n if (isExternalComponent(element)) {\n const resolution = resolveComponentName(element.componentName, profile, catalog);\n const resolved: ExternalComponent = {\n ...element,\n componentName: resolution ? componentRegistryKey(resolution.package, resolution.name) : element.componentName,\n slots: Object.fromEntries(\n Object.entries(element.slots).map(([name, children]) => [name, children.map(child => resolveElementComponentNames(child, profile, catalog))]),\n ),\n };\n return resolved;\n }\n\n if (isContentControl(element)) {\n const contentControl: ContentControl = { ...element, content: resolveElementComponentNames(element.content, profile, catalog) };\n return contentControl;\n }\n\n if (isItemsControl(element)) {\n const itemsControl: ItemsControl = { ...element, itemTemplate: resolveElementComponentNames(element.itemTemplate, profile, catalog) };\n return itemsControl;\n }\n\n if (isPanel(element)) {\n const panel: Panel = { ...element, children: element.children.map(child => resolveElementComponentNames(child, profile, catalog)) };\n return panel;\n }\n\n return element;\n}\n"],"names":["resolveElementComponentNames","element","profile","catalog","isExternalComponent","resolution","resolveComponentName","componentName","resolved","componentRegistryKey","package","name","slots","Object","fromEntries","entries","map","children","child","isContentControl","contentControl","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GtB,OAAO;AAAEuB,YAAAA,YAAAA,EAAcxB,4BAAAA,CAA6BC,OAAAA,CAAQuB,YAAY,EAAEtB,OAAAA,EAASC,OAAAA;AAAS,SAAA;QACpI,OAAOoB,YAAAA;AACX,IAAA;AAEA,IAAA,IAAIE,qBAAQxB,OAAAA,CAAAA,EAAU;AAClB,QAAA,MAAMyB,KAAAA,GAAe;AAAE,YAAA,GAAGzB,OAAO;YAAEgB,QAAAA,EAAUhB,OAAAA,CAAQgB,QAAQ,CAACD,GAAG,CAACE,CAAAA,KAAAA,GAASlB,4BAAAA,CAA6BkB,KAAAA,EAAOhB,OAAAA,EAASC,OAAAA,CAAAA;AAAU,SAAA;QAClI,OAAOuB,KAAAA;AACX,IAAA;IAEA,OAAOzB,OAAAA;AACX
|
|
1
|
+
{"version":3,"file":"resolveElementNames.js","sources":["../../../gallery/resolveElementNames.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 { ContentControl, ExternalComponent, ItemsControl, Panel, SceneElement, UiProfile } from '@cratis/scene.model';\nimport { PackageCatalog, isContentControl, isExternalComponent, isItemsControl, isPanel, resolveComponentName } from '@cratis/scene.engine';\nimport { componentRegistryKey } from '@cratis/scene.react';\n\n/**\n * Rewrites an element tree's bare component names into the keys the React registry is keyed by.\n *\n * The renderer looks a component up by `element.componentName` against a registry keyed by\n * `componentRegistryKey(package, name)`, so something has to resolve bare names against the active profile\n * first. Wiring that into the renderer proper is Stage's job and does not exist yet; this is the small\n * local version that lets the gallery boot through the *real* engine and the *real* registry today rather\n * than waiting for it.\n *\n * A name nothing declares is left exactly as written. That is deliberate: the renderer then falls back to\n * `UnresolvedComponent` and shows a dashed red box naming the component, which is far more useful than a\n * throw from inside a tree walk.\n *\n * @param element The tree to rewrite.\n * @param profile The profile whose package priority decides which package wins a bare name.\n * @param catalog Each active package's declared component names.\n * @returns A new tree; the original is untouched.\n */\nexport function resolveElementComponentNames(element: SceneElement, profile: UiProfile, catalog: PackageCatalog): SceneElement {\n if (isExternalComponent(element)) {\n const resolution = resolveComponentName(element.componentName, profile, catalog);\n const resolved: ExternalComponent = {\n ...element,\n componentName: resolution ? componentRegistryKey(resolution.package, resolution.name) : element.componentName,\n slots: Object.fromEntries(\n Object.entries(element.slots).map(([name, children]) => [name, children.map(child => resolveElementComponentNames(child, profile, catalog))]),\n ),\n };\n return resolved;\n }\n\n if (isContentControl(element)) {\n const contentControl: ContentControl = { ...element, content: resolveElementComponentNames(element.content, profile, catalog) };\n return contentControl;\n }\n\n if (isItemsControl(element)) {\n const itemsControl: ItemsControl = { ...element, itemTemplate: resolveElementComponentNames(element.itemTemplate, profile, catalog) };\n return itemsControl;\n }\n\n if (isPanel(element)) {\n const panel: Panel = { ...element, children: element.children.map(child => resolveElementComponentNames(child, profile, catalog)) };\n return panel;\n }\n\n return element;\n}\n"],"names":["resolveElementComponentNames","element","profile","catalog","isExternalComponent","resolution","resolveComponentName","componentName","resolved","componentRegistryKey","package","name","slots","Object","fromEntries","entries","map","children","child","isContentControl","contentControl","content","isItemsControl","itemsControl","itemTemplate","isPanel","panel"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;;;;;;;;;;;;AAiBC,IACM,SAASA,4BAAAA,CAA6BC,OAAqB,EAAEC,OAAkB,EAAEC,OAAuB,EAAA;AAC3G,IAAA,IAAIC,iCAAoBH,OAAAA,CAAAA,EAAU;AAC9B,QAAA,MAAMI,UAAAA,GAAaC,iCAAAA,CAAqBL,OAAAA,CAAQM,aAAa,EAAEL,OAAAA,EAASC,OAAAA,CAAAA;AACxE,QAAA,MAAMK,QAAAA,GAA8B;AAChC,YAAA,GAAGP,OAAO;YACVM,aAAAA,EAAeF,UAAAA,GAAaI,iCAAqBJ,UAAAA,CAAWK,OAAO,EAAEL,UAAAA,CAAWM,IAAI,CAAA,GAAIV,OAAAA,CAAQM,aAAa;AAC7GK,YAAAA,KAAAA,EAAOC,MAAAA,CAAOC,WAAW,CACrB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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,qCAAAA;AACAC,IAAAA,GAAAA,iCAAAA;AACAC,IAAAA,GAAAA,2BAAAA;AACAC,IAAAA,GAAAA,+BAAAA;AACAC,IAAAA,GAAAA;;AAGP,sHACA,MAAMC,qBAAAA,GAAwB,IAAIC,GAAAA,CAAI;AAAIJ,IAAAA,GAAAA,2BAAAA;AAAkBC,IAAAA,GAAAA;AAAgB,CAAA,CAACI,GAAG,CAACC,CAAAA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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 * 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,I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AAK,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 +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,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAK;AAAE,K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AA,EAAuB,+EAAA;AAAiF,aAAA,CAAA;AACzKgB,YAAAA,cAAAA,CAAO,6BAA6B,0CAAA,EAA4C;AAC5EhB,gBAAAA,aAAAA,CAAK,wBAAA,EAA0B,8FAAA;AAClC,aAAA;AACJ,SAAA;QACD,CAACP,iCAAAA,CAAiBkB,OAAO,GAAG;AACxBV,YAAAA,cAAAA,CAAM,gBAAA,EAAkB;AAACD,gBAAAA,aAAAA,CAAK,mBAAA,EAAqB,WAAA,CAAA;AAAcE,gBAAAA,eAAAA,CAAO,mBAAmB,YAAA,EAAc;oBAAEH,QAAAA,EAAU;AAAY,iBAAA;AAAG,aAAA;AACvI;AACL,KAAA;IACAK,WAAAA,EAAa,SAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,gDACO,MAAMY,eAAAA,GAAoC;AAAC9B,IAAAA,aAAAA;AAAemB,IAAAA,oBAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBE,IAAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"statusTemplates.js","sources":["../../../gallery/statusTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { widget } from './widgets';\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,kBAASC,OAAO;IAC1BC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gB,YAAAA,cAAAA,CAAO,0BAA0B,wBAAA,EAA0B;AAAChB,gBAAAA,aAAAA,CAAK,qBAAA,EAAuB,+EAAA;AAAiF,aAAA,CAAA;AACzKgB,YAAAA,cAAAA,CAAO,6BAA6B,0CAAA,EAA4C;AAC5EhB,gBAAAA,aAAAA,CAAK,wBAAA,EAA0B,8FAAA;AAClC,aAAA;AACJ,SAAA;QACD,CAACP,iCAAAA,CAAiBkB,OAAO,GAAG;AACxBV,YAAAA,cAAAA,CAAM,gBAAA,EAAkB;AAACD,gBAAAA,aAAAA,CAAK,mBAAA,EAAqB,WAAA,CAAA;AAAcE,gBAAAA,eAAAA,CAAO,mBAAmB,YAAA,EAAc;oBAAEH,QAAAA,EAAU;AAAY,iBAAA;AAAG,aAAA;AACvI;AACL,KAAA;IACAK,WAAAA,EAAa,SAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,gDACO,MAAMY,eAAAA,GAAoC;AAAC9B,IAAAA,aAAAA;AAAemB,IAAAA,oBAAAA;AAAsBC,IAAAA,gBAAAA;AAAkBE,IAAAA;;;;;;;"}
|
|
@@ -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,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAU,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAK;AAAE,KAAA;IAC9EC,OAAAA,EAAS;QACL,CAACH,iCAAAA,CAAiBC,SAAS,GAAG;AAC1BG,YAAAA,cAAAA,CAAO,YAAY,cAAA,EAAgB;AAC/BC,gBAAAA,aAAAA,CAAK,YAAA,EAAc,iBAAA,CAAA;AACnBA,gBAAAA,aAAAA,CAAK,YAAA,EAAc,uBAAA,CAAA;AACnBA,gBAAAA,aAAAA,CAAK,YAAA,EAAc,QAAA,CAAA;AACnBA,gBAAAA,aAAAA,CAAK,YAAA,EAAc,wBAAA;AACtB,aAAA;AACJ,SAAA;QACD,CAACL,iCAAAA,CAAiBE,IAAI,GAAG;AACrBI,YAAAA,kBAAAA,CAAW,eAAe,iBAAA,EAAmB,kDAAA,CAAA;AAC7CC,YAAAA,aAAAA,CAAK,WAAA,EAAa;AACdF,gBAAAA,aAAAA,CAAK,YAAA,EAAc,oIAAA,CAAA;AACnBG,gBAAAA,0BAAAA,CAAkB,aAAa,SAAA,EAAW;oBAAEC,QAAAA,EAAU,MAAA;oBAAQJ,IAAAA,EAAM;AAA6D,iBAAA;AACpI,aAAA;AACJ;AACL,KAAA;IACAK,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,uEACO,MAAMC,uBAAAA,GAA0C;IACnDjB,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;I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A,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';\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,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAU,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAK;AAAE,KAAA;IAC9EC,OAAAA,EAAS;QACL,CAACH,iCAAAA,C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AMK,kCAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAU;AAAE,KAAA;IACjHE,OAAAA,EAAS;QACL,CAACH,iCAAAA,CAAiBa,MAAM,GAAG;AAACP,YAAAA,kBAAAA,CAAW,eAAe,MAAA,EAAQ,wCAAA;AAA0C,SAAA;QACxG,CAACN,iCAAAA,CAAiBE,IAAI,GAAG;AACrBM,YAAAA,0BAAAA,CAAkB,eAAe,WAAA,EAAa;gBAAE+B,WAAAA,EAAa;AAAc,aAAA,CAAA;AAC3EnC,YAAAA,cAAAA,CAAO,gBAAgB,iBAAA,EAAmB;AACtCC,gBAAAA,aAAAA,CAAK,QAAA,EAAU,2CAAA,CAAA;AACfA,gBAAAA,aAAAA,CAAK,QAAA,EAAU,4CAAA,CAAA;AACfA,gBAAAA,aAAAA,CAAK,QAAA,EAAU,4BAAA;AAClB,aAAA;AACJ,SAAA;QACD,CAACL,iCAAAA,CAAiBC,SAAS,GAAG;AAC1BG,YAAAA,cAAAA,CAAO,gBAAgB,cAAA,EAAgB;AAACC,gBAAAA,aAAAA,CAAK,mBAAA,EAAqB,mCAAA,CAAA;AAAsCgB,gBAAAA,eAAAA,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 +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/** A table with real columns and real rows, so a list template looks like a list. */\nexport function table(id: string, columns: { field: string; header: string }[], rows: Record<string, unknown>[]): SceneElement {\n return externalComponent(\n id,\n 'dataTable',\n { value: rows, dataKey: columns[0]?.field ?? 'id', paginator: rows.length > 8, rows: 8 },\n { columns: columns.map(column => externalComponent(`${id}-${column.field}`, 'column', { field: column.field, header: column.header, sortable: true })) },\n );\n}\n\n/** One labeled input in a form template. */\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, 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","dataKey","field","paginator","length","map","column","header","sortable","componentName","properties","panel","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,0BAAAA,CAAkBJ,EAAAA,EAAIK,2BAAAA,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,cAAKZ,EAAAA,EAAI;AAACa,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAEQ,KAAAA,CAAAA;AAAQK,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAES,KAAAA,CAAAA;AAAQI,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAEU,KAAAA;KAAO,EAAE;AAAEC,QAAAA,IAAAA;QAAMG,OAAAA,EAAS;AAAO,KAAA,CAAA;AAClI;AAEA,oDACO,SAASC,MAAAA,CAAOf,EAAU,EAAEC,KAAa,EAAEe,OAAuB,E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WAAAA,CAAY/B,EAAU,EAAEgC,YAAoB,EAAEC,WAAAA,GAAc,QAAQ,EAAA;AAChF,IAAA,OAAOH,eAAM9B,EAAAA,EAAI;AAACkC,QAAAA,eAAAA,CAAO,CAAA,EAAGlC,EAAAA,CAAG,QAAQ,CAAC,EAAEgC,YAAAA,EAAc;YAAEG,QAAAA,EAAU;AAAU,SAAA,CAAA;AAAID,QAAAA,eAAAA,CAAO,CAAA,EAAGlC,EAAAA,CAAG,OAAO,CAAC,EAAEiC,WAAAA,EAAa;YAAEE,QAAAA,EAAU;AAAY,SAAA;AAAG,KAAA,CAAA;AACrJ;AAEA,2GACO,SAASC,UAAAA,CAAWpC,EAAU,EAAEC,KAAa,EAAEoC,OAAe,EAAEC,WAAmB,EAAA;AACtF,IAAA,OAAO1B,cAAKZ,EAAAA,EAAI;AACZI,QAAAA,0BAAAA,CAAkB,CAAA,EAAGJ,EAAAA,CAAG,KAAK,CAAC,EAAE,OAAA,EAAS;YAAEuC,GAAAA,EAAKtC;AAAM,SAAA,CAAA;AACtDY,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAEC,KAAAA,CAAAA;AACpBY,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,QAAQ,CAAC,EAAEqC,OAAAA,CAAAA;AACtBH,QAAAA,eAAAA,CAAO,CAAA,EAAGlC,EAAAA,CAAG,OAAO,CAAC,EAAEsC,WAAAA,EAAa;YAAEH,QAAAA,EAAU;AAAU,SAAA;AAC7D,KAAA,CAAA;AACL
|
|
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/** A table with real columns and real rows, so a list template looks like a list. */\nexport function table(id: string, columns: { field: string; header: string }[], rows: Record<string, unknown>[]): SceneElement {\n return externalComponent(\n id,\n 'dataTable',\n { value: rows, dataKey: columns[0]?.field ?? 'id', paginator: rows.length > 8, rows: 8 },\n { columns: columns.map(column => externalComponent(`${id}-${column.field}`, 'column', { field: column.field, header: column.header, sortable: true })) },\n );\n}\n\n/** One labeled input in a form template. */\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, 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","dataKey","field","paginator","length","map","column","header","sortable","componentName","properties","panel","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,0BAAAA,CAAkBJ,EAAAA,EAAIK,2BAAAA,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,cAAKZ,EAAAA,EAAI;AAACa,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAEQ,KAAAA,CAAAA;AAAQK,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAES,KAAAA,CAAAA;AAAQI,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAEU,KAAAA;KAAO,EAAE;AAAEC,QAAAA,IAAAA;QAAMG,OAAAA,EAAS;AAAO,KAAA,CAAA;AAClI;AAEA,oDACO,SAASC,MAAAA,CAAOf,EAAU,EAAEC,KAAa,EAAEe,OAAuB,EAAA;AACrE,IAAA,OAAOJ,cAAKZ,EAAAA,EAAI;AAACa,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,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AAACkC,QAAAA,eAAAA,CAAO,CAAA,EAAGlC,EAAAA,CAAG,QAAQ,CAAC,EAAEgC,YAAAA,EAAc;YAAEG,QAAAA,EAAU;AAAU,SAAA,CAAA;AAAID,QAAAA,eAAAA,CAAO,CAAA,EAAGlC,EAAAA,CAAG,OAAO,CAAC,EAAEiC,WAAAA,EAAa;YAAEE,QAAAA,EAAU;AAAY,SAAA;AAAG,KAAA,CAAA;AACrJ;AAEA,2GACO,SAASC,UAAAA,CAAWpC,EAAU,EAAEC,KAAa,EAAEoC,OAAe,EAAEC,WAAmB,EAAA;AACtF,IAAA,OAAO1B,cAAKZ,EAAAA,EAAI;AACZI,QAAAA,0BAAAA,CAAkB,CAAA,EAAGJ,EAAAA,CAAG,KAAK,CAAC,EAAE,OAAA,EAAS;YAAEuC,GAAAA,EAAKtC;AAAM,SAAA,CAAA;AACtDY,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,MAAM,CAAC,EAAEC,KAAAA,CAAAA;AACpBY,QAAAA,aAAAA,CAAK,CAAA,EAAGb,EAAAA,CAAG,QAAQ,CAAC,EAAEqC,OAAAA,CAAAA;AACtBH,QAAAA,eAAAA,CAAO,CAAA,EAAGlC,EAAAA,CAAG,OAAO,CAAC,EAAEsC,WAAAA,EAAa;YAAEH,QAAAA,EAAU;AAAU,SAAA;AAC7D,KAAA,CAAA;AACL;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workspaceTemplates.js","sources":["../../../gallery/workspaceTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, column, grid, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { emptyState, field, formActions, pageHeader, statCard, table, widget } from './widgets';\n\n/**\n * The five workhorse shapes inside an application shell: a dashboard, a list, a detail, a form and the\n * designed empty state.\n *\n * Every one fits the layout's `content` slot, and every one carries realistic seeded content rather than\n * placeholder text. A gallery whose dashboard shows four boxes labeled \"Card\" proves the renderer runs; a\n * gallery whose dashboard shows revenue, orders, customers and a real table proves the blueprint is worth\n * starting an application from.\n */\n\n/**\n * The dashboard: four figures across the top, then two columns of larger widgets.\n *\n * This is Sakai's composition, and the reason to copy it is that it is the arrangement people already read\n * fluently - the eye takes the row of numbers first and then settles into the detail.\n *\n * Its own arrangement collapses the two columns into one at a compact width, because a two-column widget\n * grid on a phone is two columns of unreadable slivers.\n */\nexport const dashboardTemplate: ScreenTemplate = {\n name: 'Dashboard',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Stats }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Stats), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Stats), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Stats]: [\n statCard('stat-revenue', 'Revenue', '$284,120', '+12.4% this month', 'pi pi-dollar'),\n statCard('stat-orders', 'Orders', '1,842', '+3.1% this month', 'pi pi-shopping-cart'),\n statCard('stat-customers', 'Customers', '9,410', '+128 new', 'pi pi-users'),\n statCard('stat-open', 'Open tickets', '17', '-4 since Monday', 'pi pi-inbox'),\n ],\n [TemplateSlotName.Primary]: [\n widget('widget-revenue', 'Revenue over time', [\n table(\n 'revenue-table',\n [\n { field: 'month', header: 'Month' },\n { field: 'revenue', header: 'Revenue' },\n { field: 'change', header: 'Change' },\n ],\n [\n { month: 'March', revenue: '$284,120', change: '+12.4%' },\n { month: 'February', revenue: '$252,780', change: '+4.1%' },\n { month: 'January', revenue: '$242,830', change: '-1.8%' },\n { month: 'December', revenue: '$247,290', change: '+9.6%' },\n ],\n ),\n ]),\n widget('widget-orders', 'Recent orders', [\n table(\n 'orders-table',\n [\n { field: 'reference', header: 'Reference' },\n { field: 'customer', header: 'Customer' },\n { field: 'total', header: 'Total' },\n { field: 'status', header: 'Status' },\n ],\n [\n { reference: 'ORD-4192', customer: 'Northwind Traders', total: '$1,240.00', status: 'Shipped' },\n { reference: 'ORD-4191', customer: 'Contoso Ltd', total: '$318.50', status: 'Packing' },\n { reference: 'ORD-4188', customer: 'Fabrikam', total: '$2,980.00', status: 'Awaiting payment' },\n { reference: 'ORD-4184', customer: 'Adventure Works', total: '$76.20', status: 'Shipped' },\n ],\n ),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n widget('widget-activity', 'Activity', [externalComponent('activity-timeline', 'timeline', { align: 'left' })]),\n widget('widget-capacity', 'Warehouse capacity', [externalComponent('capacity-bar', 'progressBar', { value: 68 })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n};\n\n/** The list: a filter toolbar, a real table, and the row actions a list needs. */\nexport const crudListTemplate: ScreenTemplate = {\n name: 'CrudList',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('crud-header', 'Products', '412 products across 9 categories', [\n button('crud-new', 'New product', { severity: 'primary', icon: 'pi pi-plus' }),\n button('crud-import', 'Import', { severity: 'secondary', icon: 'pi pi-upload' }),\n ]),\n externalComponent('crud-search', 'inputText', { placeholder: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, detailViewTemplate, formPageTemplate, emptyTemplate];\n"],"names":["dashboardTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Stats","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","statCard","widget","table","field","header","month","revenue","change","reference","customer","total","status","externalComponent","align","value","displayName","description","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","code","category","price","stock","detailViewTemplate","Header","SidePanel","text","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,K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IACA3B,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAM2B,kBAAAA,GAAuC;AAAChE,IAAAA,iBAAAA;AAAmBsC,IAAAA,gBAAAA;AAAkBY,IAAAA,kBAAAA;AAAoBI,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"workspaceTemplates.js","sources":["../../../gallery/workspaceTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, column, grid, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { emptyState, field, formActions, pageHeader, statCard, table, widget } from './widgets';\n\n/**\n * The five workhorse shapes inside an application shell: a dashboard, a list, a detail, a form and the\n * designed empty state.\n *\n * Every one fits the layout's `content` slot, and every one carries realistic seeded content rather than\n * placeholder text. A gallery whose dashboard shows four boxes labeled \"Card\" proves the renderer runs; a\n * gallery whose dashboard shows revenue, orders, customers and a real table proves the blueprint is worth\n * starting an application from.\n */\n\n/**\n * The dashboard: four figures across the top, then two columns of larger widgets.\n *\n * This is Sakai's composition, and the reason to copy it is that it is the arrangement people already read\n * fluently - the eye takes the row of numbers first and then settles into the detail.\n *\n * Its own arrangement collapses the two columns into one at a compact width, because a two-column widget\n * grid on a phone is two columns of unreadable slivers.\n */\nexport const dashboardTemplate: ScreenTemplate = {\n name: 'Dashboard',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Stats }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Stats), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Stats), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Stats]: [\n statCard('stat-revenue', 'Revenue', '$284,120', '+12.4% this month', 'pi pi-dollar'),\n statCard('stat-orders', 'Orders', '1,842', '+3.1% this month', 'pi pi-shopping-cart'),\n statCard('stat-customers', 'Customers', '9,410', '+128 new', 'pi pi-users'),\n statCard('stat-open', 'Open tickets', '17', '-4 since Monday', 'pi pi-inbox'),\n ],\n [TemplateSlotName.Primary]: [\n widget('widget-revenue', 'Revenue over time', [\n table(\n 'revenue-table',\n [\n { field: 'month', header: 'Month' },\n { field: 'revenue', header: 'Revenue' },\n { field: 'change', header: 'Change' },\n ],\n [\n { month: 'March', revenue: '$284,120', change: '+12.4%' },\n { month: 'February', revenue: '$252,780', change: '+4.1%' },\n { month: 'January', revenue: '$242,830', change: '-1.8%' },\n { month: 'December', revenue: '$247,290', change: '+9.6%' },\n ],\n ),\n ]),\n widget('widget-orders', 'Recent orders', [\n table(\n 'orders-table',\n [\n { field: 'reference', header: 'Reference' },\n { field: 'customer', header: 'Customer' },\n { field: 'total', header: 'Total' },\n { field: 'status', header: 'Status' },\n ],\n [\n { reference: 'ORD-4192', customer: 'Northwind Traders', total: '$1,240.00', status: 'Shipped' },\n { reference: 'ORD-4191', customer: 'Contoso Ltd', total: '$318.50', status: 'Packing' },\n { reference: 'ORD-4188', customer: 'Fabrikam', total: '$2,980.00', status: 'Awaiting payment' },\n { reference: 'ORD-4184', customer: 'Adventure Works', total: '$76.20', status: 'Shipped' },\n ],\n ),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n widget('widget-activity', 'Activity', [externalComponent('activity-timeline', 'timeline', { align: 'left' })]),\n widget('widget-capacity', 'Warehouse capacity', [externalComponent('capacity-bar', 'progressBar', { value: 68 })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n};\n\n/** The list: a filter toolbar, a real table, and the row actions a list needs. */\nexport const crudListTemplate: ScreenTemplate = {\n name: 'CrudList',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('crud-header', 'Products', '412 products across 9 categories', [\n button('crud-new', 'New product', { severity: 'primary', icon: 'pi pi-plus' }),\n button('crud-import', 'Import', { severity: 'secondary', icon: 'pi pi-upload' }),\n ]),\n externalComponent('crud-search', 'inputText', { placeholder: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, detailViewTemplate, formPageTemplate, emptyTemplate];\n"],"names":["dashboardTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Stats","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","statCard","widget","table","field","header","month","revenue","change","reference","customer","total","status","externalComponent","align","value","displayName","description","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","code","category","price","stock","detailViewTemplate","Header","SidePanel","text","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAM,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,kCAAiBE;AAAQ,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,kCAAiBG;AAAU;AAAE,KAAA;IACnHC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,mBAAAA,CAAO;AAACC,YAAAA,qBAAAA,CAASP,kCAAiBC,KAAK,CAAA;YAAGO,iBAAAA,CAAK;gBAACD,qBAAAA,CAASP,iCAAAA,CAAiBE,OAAO,EAAE;oBAAEO,IAAAA,EAAM;AAAE,iBAAA,CAAA;AAAIF,gBAAAA,qBAAAA,CAASP,kCAAiBG,SAAS;AAAE,aAAA,EAAE,CAAA,EAAG,EAAA;AAAI,SAAA,CAAA;QACrJO,SAAAA,EAAW;AACP,YAAA;AACIC,gBAAAA,KAAAA,EAAOC,2BAAeC,OAAO;AAC7BR,gBAAAA,IAAAA,EAAMC,mBAAAA,CAAO;AAACC,oBAAAA,qBAAAA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C,IAAAA,EAAM;AAAE,iBAAA;AAC3D,aAAA;AACJ,SAAA;QACD,CAACtD,iCAAAA,CAAiBiD,OAAO,GAAG;AAACM,YAAAA,mBAAAA,CAAY,cAAA,EAAgB,gBAAA;AAAkB;AAC/E,KAAA;IACAzB,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,4GACO,MAAMyB,aAAAA,GAAgC;IACzC7D,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBkC;AAAK;AAAE,KAAA;IACxCpB,OAAAA,EAAS;QACL,CAACd,iCAAAA,CAAiBkC,IAAI,GAAG;YACrBuB,kBAAAA,CAAW,aAAA,EAAe,mBAAmB,sEAAA,EAAwE,0BAAA;AACxH;AACL,KAAA;IACA3B,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa;AACjB;AAEA,qCACO,MAAM2B,kBAAAA,GAAuC;AAAChE,IAAAA,iBAAAA;AAAmBsC,IAAAA,gBAAAA;AAAkBY,IAAAA,kBAAAA;AAAoBI,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LayoutName.js","sources":["../../../layouts/LayoutName.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\n/**\n * The application shells this package provides.\n *\n * Only true application-level shells are layouts. Everything else this package ships - dashboards, CRUD\n * lists, sign-in screens - is a page or dialog template that *fits into* one of these, not a layout of its\n * own. Keeping the distinction in the type means the manifest's `layouts` list cannot quietly grow into a\n * catalog of pages.\n */\nexport enum LayoutName {\n /** Topbar, sidebar, breadcrumb, content, footer and an optional right panel - the shell an application signs in to. */\n AppShell = 'AppShell',\n\n /** No chrome at all: content, an optional branding aside, and the configurator. */\n FullPage = 'FullPage',\n}\n"],"names":["LayoutName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,UAAAA,iBAAAA,SAAAA,UAAAA,EAAAA;4HAC6G,UAAA,CAAA,UAAA,CAAA,GAAA,UAAA;wFAGpC,UAAA,CAAA,UAAA,CAAA,GAAA,UAAA;AAJzEA,IAAAA,OAAAA,UAAAA;AAMX,CAAA,CAAA,EAAA
|
|
1
|
+
{"version":3,"file":"LayoutName.js","sources":["../../../layouts/LayoutName.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\n/**\n * The application shells this package provides.\n *\n * Only true application-level shells are layouts. Everything else this package ships - dashboards, CRUD\n * lists, sign-in screens - is a page or dialog template that *fits into* one of these, not a layout of its\n * own. Keeping the distinction in the type means the manifest's `layouts` list cannot quietly grow into a\n * catalog of pages.\n */\nexport enum LayoutName {\n /** Topbar, sidebar, breadcrumb, content, footer and an optional right panel - the shell an application signs in to. */\n AppShell = 'AppShell',\n\n /** No chrome at all: content, an optional branding aside, and the configurator. */\n FullPage = 'FullPage',\n}\n"],"names":["LayoutName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;IAQO,IAAKA,UAAAA,iBAAAA,SAAAA,UAAAA,EAAAA;4HAC6G,UAAA,CAAA,UAAA,CAAA,GAAA,UAAA;wFAGpC,UAAA,CAAA,UAAA,CAAA,GAAA,UAAA;AAJzEA,IAAAA,OAAAA,UAAAA;AAMX,CAAA,CAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SlotName.js","sources":["../../../layouts/SlotName.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\n/**\n * The regions this package's layouts expose.\n *\n * These are the names a {@link Layout}'s {@link Slot}s carry, the keys a page template's content is\n * filed under, and the keys the shell components read out of their `slots` prop - one enum for all three,\n * because a slot filled under a name the shell never reads renders nothing at all and reports nothing\n * either. That silent failure is exactly what a shared vocabulary prevents.\n *\n * The set follows PrimeTek's template line: Sakai establishes topbar/sidebar/menu/content/footer, and the\n * premium templates (Diamond, Atlantis, Freya, Apollo, Ultima, Avalon, Verona) add breadcrumb and a right\n * panel. Both are exposed here, because a layout package that only covers the free template's regions\n * forces anyone wanting the others to fork it.\n */\nexport enum SlotName {\n /** The fixed strip across the top: brand, the sidebar toggle, and per-screen actions. */\n Topbar = 'topbar',\n\n /** The sidebar's own chrome - its header, brand and pin button. */\n Sidebar = 'sidebar',\n\n /** The navigation itself, so a screen can replace the menu without replacing the sidebar around it. */\n Menu = 'menu',\n\n /** The trail above the content. */\n Breadcrumb = 'breadcrumb',\n\n /** The screen itself. The only slot every layout declares. */\n Content = 'content',\n\n /** The strip below the content. */\n Footer = 'footer',\n\n /** The optional inspector panel down the right-hand edge. */\n RightPanel = 'rightPanel',\n\n /** The floating configurator. Present in both shells, because a full-page screen still has to be themeable. */\n ConfigPanel = 'configPanel',\n\n /** The branding half of a full-page screen's split - the panel a login form sits beside. */\n Aside = 'aside',\n}\n"],"names":["SlotName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;IAaO,IAAKA,QAAAA,iBAAAA,SAAAA,QAAAA,EAAAA;8FAC+E,QAAA,CAAA,QAAA,CAAA,GAAA,QAAA;wEAGtB,QAAA,CAAA,SAAA,CAAA,GAAA,SAAA;4GAGoC,QAAA,CAAA,MAAA,CAAA,GAAA,MAAA;wCAGpE,QAAA,CAAA,YAAA,CAAA,GAAA,YAAA;mEAG2B,QAAA,CAAA,SAAA,CAAA,GAAA,SAAA;wCAG3B,QAAA,CAAA,QAAA,CAAA,GAAA,QAAA;kEAG0B,QAAA,CAAA,YAAA,CAAA,GAAA,YAAA;oHAGkD,QAAA,CAAA,aAAA,CAAA,GAAA,aAAA;iGAGnB,QAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAzBlFA,IAAAA,OAAAA,QAAAA;AA2BX,CAAA,CAAA,EAAA
|
|
1
|
+
{"version":3,"file":"SlotName.js","sources":["../../../layouts/SlotName.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\n/**\n * The regions this package's layouts expose.\n *\n * These are the names a {@link Layout}'s {@link Slot}s carry, the keys a page template's content is\n * filed under, and the keys the shell components read out of their `slots` prop - one enum for all three,\n * because a slot filled under a name the shell never reads renders nothing at all and reports nothing\n * either. That silent failure is exactly what a shared vocabulary prevents.\n *\n * The set follows PrimeTek's template line: Sakai establishes topbar/sidebar/menu/content/footer, and the\n * premium templates (Diamond, Atlantis, Freya, Apollo, Ultima, Avalon, Verona) add breadcrumb and a right\n * panel. Both are exposed here, because a layout package that only covers the free template's regions\n * forces anyone wanting the others to fork it.\n */\nexport enum SlotName {\n /** The fixed strip across the top: brand, the sidebar toggle, and per-screen actions. */\n Topbar = 'topbar',\n\n /** The sidebar's own chrome - its header, brand and pin button. */\n Sidebar = 'sidebar',\n\n /** The navigation itself, so a screen can replace the menu without replacing the sidebar around it. */\n Menu = 'menu',\n\n /** The trail above the content. */\n Breadcrumb = 'breadcrumb',\n\n /** The screen itself. The only slot every layout declares. */\n Content = 'content',\n\n /** The strip below the content. */\n Footer = 'footer',\n\n /** The optional inspector panel down the right-hand edge. */\n RightPanel = 'rightPanel',\n\n /** The floating configurator. Present in both shells, because a full-page screen still has to be themeable. */\n ConfigPanel = 'configPanel',\n\n /** The branding half of a full-page screen's split - the panel a login form sits beside. */\n Aside = 'aside',\n}\n"],"names":["SlotName"],"mappings":";;AAAA;AACA;AAEA;;;;;;;;;;;;IAaO,IAAKA,QAAAA,iBAAAA,SAAAA,QAAAA,EAAAA;8FAC+E,QAAA,CAAA,QAAA,CAAA,GAAA,QAAA;wEAGtB,QAAA,CAAA,SAAA,CAAA,GAAA,SAAA;4GAGoC,QAAA,CAAA,MAAA,CAAA,GAAA,MAAA;wCAGpE,QAAA,CAAA,YAAA,CAAA,GAAA,YAAA;mEAG2B,QAAA,CAAA,SAAA,CAAA,GAAA,SAAA;wCAG3B,QAAA,CAAA,QAAA,CAAA,GAAA,QAAA;kEAG0B,QAAA,CAAA,YAAA,CAAA,GAAA,YAAA;oHAGkD,QAAA,CAAA,aAAA,CAAA,GAAA,aAAA;iGAGnB,QAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAzBlFA,IAAAA,OAAAA,QAAAA;AA2BX,CAAA,CAAA,EAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"appShell.js","sources":["../../../layouts/appShell.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 { FlowArrangement, HeightSizeClass, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width and height: a topbar across the top, the sidebar column beside the main\n * column, an optional right panel down the edge, and the configurator floating over all of it.\n */\nexport const appShellRegularRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [\n column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.RightPanel),\n ],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact width: the sidebar and the right panel leave the flow entirely.\n *\n * They leave rather than shrink because there is no width at which an 18rem panel and a 20rem panel both\n * fit beside content on a phone. The sidebar is still rendered - off-canvas, over the content, behind the\n * mask - but it no longer *occupies* anything, and that is a fact about the arrangement, not about CSS.\n */\nexport const appShellCompactWidthRoot = column([\n slotLeaf(SlotName.Topbar),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact height: the breadcrumb and the footer go.\n *\n * A landscape phone has room across but almost none down, and two horizontal strips of chrome eat most of\n * what is left. Dropping them is the height axis earning its place in the size-class matrix - width alone\n * cannot express it.\n */\nexport const appShellCompactHeightRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.RightPanel)],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree when both axes are compact - a phone in landscape: nothing but the topbar, the content and the\n * configurator.\n *\n * This override exists to be *more specific* than the two single-axis ones. `evaluateFlowArrangement`\n * scores an override by how many axes it targets, so without this one a landscape phone would pick\n * whichever single-axis override was declared last and keep a footer it has no room for.\n */\nexport const appShellCompactRoot = column([\n slotLeaf(SlotName.Topbar),\n slotLeaf(SlotName.Content, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/** The arrangement of the {@link appShellLayout}'s own slots, with one override per size-class combination that changes it. */\nexport const appShellArrangement: FlowArrangement = {\n root: appShellRegularRoot,\n overrides: [\n { width: WidthSizeClass.Compact, root: appShellCompactWidthRoot },\n { height: HeightSizeClass.Compact, root: appShellCompactHeightRoot },\n { width: WidthSizeClass.Compact, height: HeightSizeClass.Compact, root: appShellCompactRoot },\n ],\n};\n\n/**\n * The application shell layout.\n *\n * This is the *application-level* structure - the base navigational look an application picks once and\n * every page then lives inside. The regions are the ones PrimeTek's template line settled on: Sakai\n * establishes topbar, sidebar, menu, content and footer, and the premium templates add the breadcrumb and\n * the right panel. Both sets are here, because a layout package covering only the free template's regions\n * forces a fork on anyone who wants the others.\n *\n * The slots carry no arrangement of their own: how a screen's content is arranged *inside* a slot is that\n * page template's business, and a layout that dictated it would stop being a shell.\n */\nexport const appShellLayout: Layout = {\n name: LayoutName.AppShell,\n slots: [\n { name: SlotName.Topbar },\n { name: SlotName.Sidebar },\n { name: SlotName.Menu },\n { name: SlotName.Breadcrumb },\n { name: SlotName.Content },\n { name: SlotName.Footer },\n { name: SlotName.RightPanel },\n { name: SlotName.ConfigPanel },\n ],\n arrangement: appShellArrangement,\n};\n"],"names":["appShellRegularRoot","column","slotLeaf","SlotName","Topbar","row","Sidebar","Menu","grow","Breadcrumb","Content","Footer","RightPanel","ConfigPanel","appShellCompactWidthRoot","appShellCompactHeightRoot","appShellCompactRoot","appShellArrangement","root","overrides","width","WidthSizeClass","Compact","height","HeightSizeClass","appShellLayout","name","LayoutName","AppShell","slots","arrangement"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;IAIO,MAAMA,mBAAAA,GAAsBC,mBAAAA,CAAO;AACtCC,IAAAA,qBAAAA,CAASC,kBAASC,MAAM,CAAA;IACxBC,gBAAAA,CACI;QACIJ,mBAAAA,CAAO;AAACC,YAAAA,qBAAAA,CAASC,kBAASG,OAAO,CAAA;YAAGJ,qBAAAA,CAASC,iBAAAA,CAASI,IAAI,EAAE;gBAAEC,IAAAA,EAAM;AAAE,aAAA;AAAG,SAAA,CAAA;QACzEP,mBAAAA,CAAO;AAACC,YAAAA,qBAAAA,CAASC,kBAASM,UAAU,CAAA;YAAGP,qBAAAA,CAASC,iBAAAA,CAASO,OAAO,EAAE;gBAAEF,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAIN,YAAAA,qBAAAA,CAASC,kBAASQ,MAAM;AAAE,SAAA,EAAE,CAAA,EAAG;YAAEH,IAAAA,EAAM;AAAE,SAAA,CAAA;AACzHN,QAAAA,qBAAAA,CAASC,kBAASS,UAAU;AAC/B,KAAA,EACD,CAAA,EACA;QAAEJ,IAAAA,EAAM;AAAE,KAAA,CAAA;AAEdN,IAAAA,qBAAAA,CAASC,kBAASU,WAAW;CAChC;AAED;;;;;;IAOO,MAAMC,wBAAAA,GAA2Bb,mBAAAA,CAAO;AAC3C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AA;AAAEC,YAAAA,KAAAA,EAAOC,2BAAeC,OAAO;YAAEJ,IAAAA,EAAMJ;AAAyB,SAAA;AAChE,QAAA;AAAES,YAAAA,MAAAA,EAAQC,4BAAgBF,OAAO;YAAEJ,IAAAA,EAAMH;AAA0B,SAAA;AACnE,QAAA;AAAEK,YAAAA,KAAAA,EAAOC,2BAAeC,OAAO;AAAEC,YAAAA,MAAAA,EAAQC,4BAAgBF,OAAO;YAAEJ,IAAAA,EAAMF;AAAoB;AAC/F;AACL;AAEA;;;;;;;;;;;UAYaS,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,sBAAWC,QAAQ;IACzBC,KAAAA,EAAO;AACH,QAAA;AAAEH,YAAAA,IAAAA,EAAMvB,kBAASC;AAAO,SAAA;AACxB,QAAA;AAAEsB,YAAAA,IAAAA,EAAMvB,kBAASG;AAAQ,SAAA;AACzB,QAAA;AAAEoB,YAAAA,IAAAA,EAAMvB,kBAASI;AAAK,SAAA;AACtB,QAAA;AAAEmB,YAAAA,IAAAA,EAAMvB,kBAASM;AAAW,SAAA;AAC5B,QAAA;AAAEiB,YAAAA,IAAAA,EAAMvB,kBAASO;AAAQ,SAAA;AACzB,QAAA;AAAEgB,YAAAA,IAAAA,EAAMvB,kBAASQ;AAAO,SAAA;AACxB,QAAA;AAAEe,YAAAA,IAAAA,EAAMvB,kBAASS;AAAW,SAAA;AAC5B,QAAA;AAAEc,YAAAA,IAAAA,EAAMvB,kBAASU;AAAY;AAChC,KAAA;IACDiB,WAAAA,EAAab;AACjB
|
|
1
|
+
{"version":3,"file":"appShell.js","sources":["../../../layouts/appShell.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 { FlowArrangement, HeightSizeClass, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width and height: a topbar across the top, the sidebar column beside the main\n * column, an optional right panel down the edge, and the configurator floating over all of it.\n */\nexport const appShellRegularRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [\n column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.RightPanel),\n ],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact width: the sidebar and the right panel leave the flow entirely.\n *\n * They leave rather than shrink because there is no width at which an 18rem panel and a 20rem panel both\n * fit beside content on a phone. The sidebar is still rendered - off-canvas, over the content, behind the\n * mask - but it no longer *occupies* anything, and that is a fact about the arrangement, not about CSS.\n */\nexport const appShellCompactWidthRoot = column([\n slotLeaf(SlotName.Topbar),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact height: the breadcrumb and the footer go.\n *\n * A landscape phone has room across but almost none down, and two horizontal strips of chrome eat most of\n * what is left. Dropping them is the height axis earning its place in the size-class matrix - width alone\n * cannot express it.\n */\nexport const appShellCompactHeightRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.RightPanel)],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree when both axes are compact - a phone in landscape: nothing but the topbar, the content and the\n * configurator.\n *\n * This override exists to be *more specific* than the two single-axis ones. `evaluateFlowArrangement`\n * scores an override by how many axes it targets, so without this one a landscape phone would pick\n * whichever single-axis override was declared last and keep a footer it has no room for.\n */\nexport const appShellCompactRoot = column([\n slotLeaf(SlotName.Topbar),\n slotLeaf(SlotName.Content, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/** The arrangement of the {@link appShellLayout}'s own slots, with one override per size-class combination that changes it. */\nexport const appShellArrangement: FlowArrangement = {\n root: appShellRegularRoot,\n overrides: [\n { width: WidthSizeClass.Compact, root: appShellCompactWidthRoot },\n { height: HeightSizeClass.Compact, root: appShellCompactHeightRoot },\n { width: WidthSizeClass.Compact, height: HeightSizeClass.Compact, root: appShellCompactRoot },\n ],\n};\n\n/**\n * The application shell layout.\n *\n * This is the *application-level* structure - the base navigational look an application picks once and\n * every page then lives inside. The regions are the ones PrimeTek's template line settled on: Sakai\n * establishes topbar, sidebar, menu, content and footer, and the premium templates add the breadcrumb and\n * the right panel. Both sets are here, because a layout package covering only the free template's regions\n * forces a fork on anyone who wants the others.\n *\n * The slots carry no arrangement of their own: how a screen's content is arranged *inside* a slot is that\n * page template's business, and a layout that dictated it would stop being a shell.\n */\nexport const appShellLayout: Layout = {\n name: LayoutName.AppShell,\n slots: [\n { name: SlotName.Topbar },\n { name: SlotName.Sidebar },\n { name: SlotName.Menu },\n { name: SlotName.Breadcrumb },\n { name: SlotName.Content },\n { name: SlotName.Footer },\n { name: SlotName.RightPanel },\n { name: SlotName.ConfigPanel },\n ],\n arrangement: appShellArrangement,\n};\n"],"names":["appShellRegularRoot","column","slotLeaf","SlotName","Topbar","row","Sidebar","Menu","grow","Breadcrumb","Content","Footer","RightPanel","ConfigPanel","appShellCompactWidthRoot","appShellCompactHeightRoot","appShellCompactRoot","appShellArrangement","root","overrides","width","WidthSizeClass","Compact","height","HeightSizeClass","appShellLayout","name","LayoutName","AppShell","slots","arrangement"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;IAIO,MAAMA,mBAAAA,GAAsBC,mBAAAA,CAAO;AACtCC,IAAAA,qBAAAA,CAASC,kBAASC,MAAM,CAAA;IACxBC,gBAAAA,CACI;QACIJ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A,EAAMvB,kBAASI;AAAK,SAAA;AACtB,QAAA;AAAEmB,YAAAA,IAAAA,EAAMvB,kBAASM;AAAW,SAAA;AAC5B,QAAA;AAAEiB,YAAAA,IAAAA,EAAMvB,kBAASO;AAAQ,SAAA;AACzB,QAAA;AAAEgB,YAAAA,IAAAA,EAAMvB,kBAASQ;AAAO,SAAA;AACxB,QAAA;AAAEe,YAAAA,IAAAA,EAAMvB,kBAASS;AAAW,SAAA;AAC5B,QAAA;AAAEc,YAAAA,IAAAA,EAAMvB,kBAASU;AAAY;AAChC,KAAA;IACDiB,WAAAA,EAAab;AACjB;;;;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"defaultLayouts.js","sources":["../../../layouts/defaultLayouts.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 } from '@cratis/scene.model';\nimport { appShellLayout } from './appShell';\nimport { fullPageLayout } from './fullPage';\n\n/**\n * The layouts this package provides.\n *\n * Two, and deliberately only two - every application shell worth having is one of these, and everything\n * else this package ships is a page or dialog template that fits *into* one of them. The list is what the\n * manifest's `layouts` names and what the bundle provides, which is what `validatePackageBundle` proves.\n */\nexport const defaultLayouts: Layout[] = [appShellLayout, fullPageLayout];\n"],"names":["defaultLayouts","appShellLayout","fullPageLayout"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;UAOaA,cAAAA,GAA2B;AAACC,IAAAA,uBAAAA;AAAgBC,IAAAA
|
|
1
|
+
{"version":3,"file":"defaultLayouts.js","sources":["../../../layouts/defaultLayouts.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 } from '@cratis/scene.model';\nimport { appShellLayout } from './appShell';\nimport { fullPageLayout } from './fullPage';\n\n/**\n * The layouts this package provides.\n *\n * Two, and deliberately only two - every application shell worth having is one of these, and everything\n * else this package ships is a page or dialog template that fits *into* one of them. The list is what the\n * manifest's `layouts` names and what the bundle provides, which is what `validatePackageBundle` proves.\n */\nexport const defaultLayouts: Layout[] = [appShellLayout, fullPageLayout];\n"],"names":["defaultLayouts","appShellLayout","fullPageLayout"],"mappings":";;;;;AAAA;AACA;AAMA;;;;;;UAOaA,cAAAA,GAA2B;AAACC,IAAAA,uBAAAA;AAAgBC,IAAAA;;;"}
|