@cratis/scene.blueprint.default 4.24.0 → 4.25.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/gallery/authTemplates.js +12 -6
- package/dist/cjs/gallery/authTemplates.js.map +1 -1
- package/dist/cjs/gallery/dialogTemplates.js +6 -3
- package/dist/cjs/gallery/dialogTemplates.js.map +1 -1
- package/dist/cjs/gallery/nesting.js +6 -3
- package/dist/cjs/gallery/nesting.js.map +1 -1
- package/dist/cjs/gallery/statusTemplates.js +8 -4
- package/dist/cjs/gallery/statusTemplates.js.map +1 -1
- package/dist/cjs/gallery/supportTemplates.js +10 -5
- package/dist/cjs/gallery/supportTemplates.js.map +1 -1
- package/dist/cjs/gallery/workspaceTemplates.js +12 -6
- package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
- package/dist/cjs/layouts/appShell.js +2 -1
- package/dist/cjs/layouts/appShell.js.map +1 -1
- package/dist/cjs/layouts/fullPage.js +2 -1
- package/dist/cjs/layouts/fullPage.js.map +1 -1
- package/dist/esm/gallery/authTemplates.js +12 -6
- package/dist/esm/gallery/authTemplates.js.map +1 -1
- package/dist/esm/gallery/dialogTemplates.js +6 -3
- package/dist/esm/gallery/dialogTemplates.js.map +1 -1
- package/dist/esm/gallery/nesting.js +6 -3
- package/dist/esm/gallery/nesting.js.map +1 -1
- package/dist/esm/gallery/statusTemplates.js +8 -4
- package/dist/esm/gallery/statusTemplates.js.map +1 -1
- package/dist/esm/gallery/supportTemplates.js +10 -5
- package/dist/esm/gallery/supportTemplates.js.map +1 -1
- package/dist/esm/gallery/workspaceTemplates.js +12 -6
- package/dist/esm/gallery/workspaceTemplates.js.map +1 -1
- package/dist/esm/layouts/appShell.js +2 -1
- package/dist/esm/layouts/appShell.js.map +1 -1
- package/dist/esm/layouts/fullPage.js +2 -1
- package/dist/esm/layouts/fullPage.js.map +1 -1
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/gallery/authTemplates.ts +6 -6
- package/gallery/dialogTemplates.ts +3 -3
- package/gallery/nesting.ts +3 -3
- package/gallery/statusTemplates.ts +4 -4
- package/gallery/supportTemplates.ts +5 -5
- package/gallery/workspaceTemplates.ts +6 -6
- package/layouts/appShell.ts +1 -1
- package/layouts/fullPage.ts +1 -1
- package/package.json +8 -8
|
@@ -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';\nimport { defaultBlueprintTemplateProvenance, sakaiCompositionProvenance } from '../templateProvenance';\n\n/**\n * The six workhorse shapes inside an application shell: a dashboard, a list, master/detail, a detail, a\n * form and the 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, label: 'Warehouse capacity' })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n metadata: { ...sakaiCompositionProvenance },\n};\n\n/** The list: a filter toolbar, a real table, and the row actions a list needs. */\nexport const crudListTemplate: ScreenTemplate = {\n name: 'CrudList',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('crud-header', 'Products', '412 products across 9 categories', [\n button('crud-new', 'New product', { severity: 'primary', icon: 'pi pi-plus' }),\n button('crud-import', 'Import', { severity: 'secondary', icon: 'pi pi-upload' }),\n ]),\n externalComponent('crud-search', 'inputText', { placeholder: 'Search products', ariaLabel: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/**\n * Master/detail: the list and the selected record side by side, so working through records does not mean\n * leaving the list. The detail region is an outlet that accepts detail screens, which is what lets a row's\n * destination open a full detail screen in place.\n *\n * At a compact width the two stack, list first, because side-by-side on a phone is two unreadable halves.\n */\nexport const masterDetailTemplate: ScreenTemplate = {\n name: 'MasterDetail',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.SidePanel }],\n outlets: [{ name: 'master-detail.detail', description: 'The selected record.', accepts: ['Detail'] }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), grid([slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.SidePanel)], 2, 16)], 16),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.SidePanel)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [pageHeader('master-header', 'Customers', '1,204 customers, 38 with overdue invoices')],\n [TemplateSlotName.Primary]: [\n table(\n 'customers-table',\n [\n { field: 'name', header: 'Customer' },\n { field: 'city', header: 'City' },\n { field: 'balance', header: 'Balance' },\n ],\n [\n { name: 'Northwind Traders', city: 'Seattle', balance: '$4,200.00' },\n { name: 'Contoso Ltd', city: 'Oslo', balance: '$0.00' },\n { name: 'Fabrikam', city: 'Lyon', balance: '$12,940.50' },\n { name: 'Adventure Works', city: 'Denver', balance: '$318.20' },\n ],\n 'No customers match the search',\n ),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('customer-detail', 'Northwind Traders', [\n text('customer-contact', 'Contact: Amelia Nyquist'),\n text('customer-terms', 'Payment terms: 30 days'),\n externalComponent('customer-status', 'tag', { value: 'Overdue', severity: 'warning' }),\n button('customer-open', 'Open customer', { severity: 'primary' }),\n ]),\n ],\n },\n displayName: 'Master/detail',\n description: 'A list beside the selected record, stacking on narrow screens.',\n metadata: { ...defaultBlueprintTemplateProvenance, type: 'Workspace' },\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, masterDetailTemplate, 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","label","displayName","description","metadata","sakaiCompositionProvenance","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","ariaLabel","code","category","price","stock","defaultBlueprintTemplateProvenance","detailViewTemplate","Header","SidePanel","text","masterDetailTemplate","outlets","accepts","city","balance","type","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,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,kCAAi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AW,aAAA,EAAe,mBAAmB,sEAAA,EAAwE,0BAAA;AACxH;AACL,KAAA;IACArC,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,iEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGe;AAAmC;AACtD;AAEA,qCACO,MAAMqB,kBAAAA,GAAuC;AAAC3E,IAAAA,iBAAAA;AAAmByC,IAAAA,gBAAAA;AAAkBkB,IAAAA,oBAAAA;AAAsBJ,IAAAA,kBAAAA;AAAoBU,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"workspaceTemplates.js","sources":["../../../gallery/workspaceTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, column, grid, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { emptyState, field, formActions, pageHeader, statCard, table, widget } from './widgets';\nimport { defaultBlueprintTemplateProvenance, sakaiCompositionProvenance } from '../templateProvenance';\n\n/**\n * The six workhorse shapes inside an application shell: a dashboard, a list, master/detail, a detail, a\n * form and the 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, label: 'Warehouse capacity' })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n metadata: { ...sakaiCompositionProvenance, category: 'Foundation / Dashboard' },\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', ariaLabel: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / List' },\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Detail' },\n};\n\n/**\n * Master/detail: the list and the selected record side by side, so working through records does not mean\n * leaving the list. The detail region is an outlet that accepts detail screens, which is what lets a row's\n * destination open a full detail screen in place.\n *\n * At a compact width the two stack, list first, because side-by-side on a phone is two unreadable halves.\n */\nexport const masterDetailTemplate: ScreenTemplate = {\n name: 'MasterDetail',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.SidePanel }],\n outlets: [{ name: 'master-detail.detail', description: 'The selected record.', accepts: ['Detail'] }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Header), grid([slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.SidePanel)], 2, 16)], 16),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Header), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.SidePanel)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Header]: [pageHeader('master-header', 'Customers', '1,204 customers, 38 with overdue invoices')],\n [TemplateSlotName.Primary]: [\n table(\n 'customers-table',\n [\n { field: 'name', header: 'Customer' },\n { field: 'city', header: 'City' },\n { field: 'balance', header: 'Balance' },\n ],\n [\n { name: 'Northwind Traders', city: 'Seattle', balance: '$4,200.00' },\n { name: 'Contoso Ltd', city: 'Oslo', balance: '$0.00' },\n { name: 'Fabrikam', city: 'Lyon', balance: '$12,940.50' },\n { name: 'Adventure Works', city: 'Denver', balance: '$318.20' },\n ],\n 'No customers match the search',\n ),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('customer-detail', 'Northwind Traders', [\n text('customer-contact', 'Contact: Amelia Nyquist'),\n text('customer-terms', 'Payment terms: 30 days'),\n externalComponent('customer-status', 'tag', { value: 'Overdue', severity: 'warning' }),\n button('customer-open', 'Open customer', { severity: 'primary' }),\n ]),\n ],\n },\n displayName: 'Master/detail',\n description: 'A list beside the selected record, stacking on narrow screens.',\n metadata: { ...defaultBlueprintTemplateProvenance, type: 'Workspace', category: 'Foundation / Workspace' },\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Form' },\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / State' },\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, masterDetailTemplate, 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","label","displayName","description","metadata","sakaiCompositionProvenance","category","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","ariaLabel","code","price","stock","defaultBlueprintTemplateProvenance","detailViewTemplate","Header","SidePanel","text","masterDetailTemplate","outlets","accepts","city","balance","type","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;;;;AAAA;AACA;AASA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBC;AAAM,SAAA;AAA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AAa,mEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGe,qDAAkC;QAAEb,QAAAA,EAAU;AAAoB;AACrF;AAEA,4GACO,MAAMgC,aAAAA,GAAgC;IACzCxE,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,kCAAiBsC;AAAK;AAAE,KAAA;IACxCxB,OAAAA,EAAS;QACL,CAACd,iCAAAA,CAAiBsC,IAAI,GAAG;YACrB8B,kBAAAA,CAAW,aAAA,EAAe,mBAAmB,sEAAA,EAAwE,0BAAA;AACxH;AACL,KAAA;IACArC,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,iEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGe,qDAAkC;QAAEb,QAAAA,EAAU;AAAqB;AACtF;AAEA,qCACO,MAAMkC,kBAAAA,GAAuC;AAAC3E,IAAAA,iBAAAA;AAAmB0C,IAAAA,gBAAAA;AAAkBiB,IAAAA,oBAAAA;AAAsBJ,IAAAA,kBAAAA;AAAoBU,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;;;;;;;"}
|
|
@@ -151,7 +151,8 @@ var templateProvenance = require('../templateProvenance.js');
|
|
|
151
151
|
],
|
|
152
152
|
arrangement: appShellArrangement,
|
|
153
153
|
metadata: {
|
|
154
|
-
...templateProvenance.sakaiCompositionProvenance
|
|
154
|
+
...templateProvenance.sakaiCompositionProvenance,
|
|
155
|
+
category: 'Foundation / Shell'
|
|
155
156
|
}
|
|
156
157
|
};
|
|
157
158
|
|
|
@@ -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';\nimport { sakaiCompositionProvenance } from '../templateProvenance';\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 metadata: { ...sakaiCompositionProvenance },\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","metadata","sakaiComposit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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,mBAAAA;IACbc,QAAAA,EAAU;AAAE,QAAA,GAAGC;
|
|
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';\nimport { sakaiCompositionProvenance } from '../templateProvenance';\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 metadata: { ...sakaiCompositionProvenance, category: 'Foundation / Shell' },\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","metadata","sakaiCompositionProvenance","category"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;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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AW,SAAA;AAC5B,QAAA;AAAEc,YAAAA,IAAAA,EAAMvB,kBAASU;AAAY;AAChC,KAAA;IACDiB,WAAAA,EAAab,mBAAAA;IACbc,QAAAA,EAAU;AAAE,QAAA,GAAGC,6CAA0B;QAAEC,QAAAA,EAAU;AAAqB;AAC9E;;;;;;;"}
|
|
@@ -71,7 +71,8 @@ var templateProvenance = require('../templateProvenance.js');
|
|
|
71
71
|
],
|
|
72
72
|
arrangement: fullPageArrangement,
|
|
73
73
|
metadata: {
|
|
74
|
-
...templateProvenance.defaultBlueprintTemplateProvenance
|
|
74
|
+
...templateProvenance.defaultBlueprintTemplateProvenance,
|
|
75
|
+
category: 'Foundation / Shell'
|
|
75
76
|
}
|
|
76
77
|
};
|
|
77
78
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fullPage.js","sources":["../../../layouts/fullPage.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, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The tree at a regular width: the branding aside beside the content, with the configurator over both.\n *\n * The split is the shape every premium PrimeTek sign-in page uses - a colored branding half and a form\n * half - and it is the reason `aside` is a slot rather than something a screen paints inside `content`.\n */\nexport const fullPageRegularRoot = column([row([slotLeaf(SlotName.Aside), slotLeaf(SlotName.Content, { grow: 1 })], 0, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/**\n * The tree at a compact width: the branding aside leaves the flow.\n *\n * On a phone the aside would take 40% of the width from the only thing that matters on a sign-in screen,\n * which is the form. It drops out rather than stacking above it, because a sign-in form pushed below the\n * fold by decoration is the worst possible first screen.\n */\nexport const fullPageCompactWidthRoot = column([slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/** The arrangement of the {@link fullPageLayout}'s own slots. */\nexport const fullPageArrangement: FlowArrangement = {\n root: fullPageRegularRoot,\n overrides: [{ width: WidthSizeClass.Compact, root: fullPageCompactWidthRoot }],\n};\n\n/**\n * The chrome-less layout.\n *\n * Sign-in, register, forgotten password, verification, lock, error, access-denied, not-found and landing\n * screens all use this rather than a stripped-down application shell, and that split is structural in\n * every PrimeTek template for a reason worth repeating: none of those screens has navigation state, a\n * sidebar to remember or a breadcrumb to place, so hanging them off the application shell would mean every\n * one of the eight modes needs an answer for a page with no menu.\n *\n * The configurator stays, because the sign-in page is very often the first page anyone sees and it still\n * has to honor the chosen theme.\n */\nexport const fullPageLayout: Layout = {\n name: LayoutName.FullPage,\n slots: [{ name: SlotName.Aside }, { name: SlotName.Content }, { name: SlotName.ConfigPanel }],\n arrangement: fullPageArrangement,\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n"],"names":["fullPageRegularRoot","column","row","slotLeaf","SlotName","Aside","Content","grow","ConfigPanel","fullPageCompactWidthRoot","fullPageArrangement","root","overrides","width","WidthSizeClass","Compact","fullPageLayout","name","LayoutName","FullPage","slots","arrangement","metadata","defaultBlueprintTemplateProvenance"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;IAMO,MAAMA,mBAAAA,GAAsBC,mBAAAA,CAAO;IAACC,gBAAAA,CAAI;AAACC,QAAAA,qBAAAA,CAASC,kBAASC,KAAK,CAAA;QAAGF,qBAAAA,CAASC,iBAAAA,CAASE,OAAO,EAAE;YAAEC,IAAAA,EAAM;AAAE,SAAA;AAAG,KAAA,EAAE,CAAA,EAAG;QAAEA,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,qBAAAA,CAASC,kBAASI,WAAW;CAAE;AAEpK;;;;;;IAOO,MAAMC,wBAAAA,GAA2BR,mBAAAA,CAAO;IAACE,qBAAAA,CAASC,iBAAAA,CAASE,OAAO,EAAE;QAAEC,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,qBAAAA,CAASC,kBAASI,WAAW;CAAE;AAExH,kEACO,MAAME,mBAAAA,GAAuC;IAChDC,IAAAA,EAAMX,mBAAAA;IACNY,SAAAA,EAAW;AAAC,QAAA;AAAEC,YAAAA,KAAAA,EAAOC,2BAAeC,OAAO;YAAEJ,IAAAA,EAAMF;AAAyB;AAAE;AAClF;AAEA;;;;;;;;;;;UAYaO,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,sBAAWC,QAAQ;IACzBC,KAAAA,EAAO;AAAC,QAAA;AAAEH,YAAAA,IAAAA,EAAMb,kBAASC;AAAM,SAAA;AAAG,QAAA;AAAEY,YAAAA,IAAAA,EAAMb,kBAASE;AAAQ,SAAA;AAAG,QAAA;AAAEW,YAAAA,IAAAA,EAAMb,kBAASI;AAAY;AAAE,KAAA;IAC7Fa,WAAAA,EAAaX,mBAAAA;IACbY,QAAAA,EAAU;AAAE,QAAA,GAAGC;
|
|
1
|
+
{"version":3,"file":"fullPage.js","sources":["../../../layouts/fullPage.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, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The tree at a regular width: the branding aside beside the content, with the configurator over both.\n *\n * The split is the shape every premium PrimeTek sign-in page uses - a colored branding half and a form\n * half - and it is the reason `aside` is a slot rather than something a screen paints inside `content`.\n */\nexport const fullPageRegularRoot = column([row([slotLeaf(SlotName.Aside), slotLeaf(SlotName.Content, { grow: 1 })], 0, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/**\n * The tree at a compact width: the branding aside leaves the flow.\n *\n * On a phone the aside would take 40% of the width from the only thing that matters on a sign-in screen,\n * which is the form. It drops out rather than stacking above it, because a sign-in form pushed below the\n * fold by decoration is the worst possible first screen.\n */\nexport const fullPageCompactWidthRoot = column([slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.ConfigPanel)]);\n\n/** The arrangement of the {@link fullPageLayout}'s own slots. */\nexport const fullPageArrangement: FlowArrangement = {\n root: fullPageRegularRoot,\n overrides: [{ width: WidthSizeClass.Compact, root: fullPageCompactWidthRoot }],\n};\n\n/**\n * The chrome-less layout.\n *\n * Sign-in, register, forgotten password, verification, lock, error, access-denied, not-found and landing\n * screens all use this rather than a stripped-down application shell, and that split is structural in\n * every PrimeTek template for a reason worth repeating: none of those screens has navigation state, a\n * sidebar to remember or a breadcrumb to place, so hanging them off the application shell would mean every\n * one of the eight modes needs an answer for a page with no menu.\n *\n * The configurator stays, because the sign-in page is very often the first page anyone sees and it still\n * has to honor the chosen theme.\n */\nexport const fullPageLayout: Layout = {\n name: LayoutName.FullPage,\n slots: [{ name: SlotName.Aside }, { name: SlotName.Content }, { name: SlotName.ConfigPanel }],\n arrangement: fullPageArrangement,\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Shell' },\n};\n"],"names":["fullPageRegularRoot","column","row","slotLeaf","SlotName","Aside","Content","grow","ConfigPanel","fullPageCompactWidthRoot","fullPageArrangement","root","overrides","width","WidthSizeClass","Compact","fullPageLayout","name","LayoutName","FullPage","slots","arrangement","metadata","defaultBlueprintTemplateProvenance","category"],"mappings":";;;;;;;;AAAA;AACA;AAQA;;;;;IAMO,MAAMA,mBAAAA,GAAsBC,mBAAAA,CAAO;IAACC,gBAAAA,CAAI;AAACC,QAAAA,qBAAAA,CAASC,kBAASC,KAAK,CAAA;QAAGF,qBAAAA,CAASC,iBAAAA,CAASE,OAAO,EAAE;YAAEC,IAAAA,EAAM;AAAE,SAAA;AAAG,KAAA,EAAE,CAAA,EAAG;QAAEA,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,qBAAAA,CAASC,kBAASI,WAAW;CAAE;AAEpK;;;;;;IAOO,MAAMC,wBAAAA,GAA2BR,mBAAAA,CAAO;IAACE,qBAAAA,CAASC,iBAAAA,CAASE,OAAO,EAAE;QAAEC,IAAAA,EAAM;AAAE,KAAA,CAAA;AAAIJ,IAAAA,qBAAAA,CAASC,kBAASI,WAAW;CAAE;AAExH,kEACO,MAAME,mBAAAA,GAAuC;IAChDC,IAAAA,EAAMX,mBAAAA;IACNY,SAAAA,EAAW;AAAC,QAAA;AAAEC,YAAAA,KAAAA,EAAOC,2BAAeC,OAAO;YAAEJ,IAAAA,EAAMF;AAAyB;AAAE;AAClF;AAEA;;;;;;;;;;;UAYaO,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,sBAAWC,QAAQ;IACzBC,KAAAA,EAAO;AAAC,QAAA;AAAEH,YAAAA,IAAAA,EAAMb,kBAASC;AAAM,SAAA;AAAG,QAAA;AAAEY,YAAAA,IAAAA,EAAMb,kBAASE;AAAQ,SAAA;AAAG,QAAA;AAAEW,YAAAA,IAAAA,EAAMb,kBAASI;AAAY;AAAE,KAAA;IAC7Fa,WAAAA,EAAaX,mBAAAA;IACbY,QAAAA,EAAU;AAAE,QAAA,GAAGC,qDAAkC;QAAEC,QAAAA,EAAU;AAAqB;AACtF;;;;;"}
|
|
@@ -63,7 +63,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
63
63
|
displayName: 'Sign in',
|
|
64
64
|
description: 'Email and password beside the branding panel.',
|
|
65
65
|
metadata: {
|
|
66
|
-
...defaultBlueprintTemplateProvenance
|
|
66
|
+
...defaultBlueprintTemplateProvenance,
|
|
67
|
+
category: 'Foundation / Auth'
|
|
67
68
|
}
|
|
68
69
|
};
|
|
69
70
|
/** Register. */ const registerTemplate = {
|
|
@@ -97,7 +98,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
97
98
|
displayName: 'Register',
|
|
98
99
|
description: 'Account creation with a password strength meter and the terms checkbox.',
|
|
99
100
|
metadata: {
|
|
100
|
-
...defaultBlueprintTemplateProvenance
|
|
101
|
+
...defaultBlueprintTemplateProvenance,
|
|
102
|
+
category: 'Foundation / Auth'
|
|
101
103
|
}
|
|
102
104
|
};
|
|
103
105
|
/** Forgotten password: ask for the address. */ const forgotPasswordTemplate = {
|
|
@@ -126,7 +128,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
126
128
|
displayName: 'Forgotten password',
|
|
127
129
|
description: 'One field and one button - the whole point is that it asks for nothing else.',
|
|
128
130
|
metadata: {
|
|
129
|
-
...defaultBlueprintTemplateProvenance
|
|
131
|
+
...defaultBlueprintTemplateProvenance,
|
|
132
|
+
category: 'Foundation / Auth'
|
|
130
133
|
}
|
|
131
134
|
};
|
|
132
135
|
/** New password: the other end of the link. */ const newPasswordTemplate = {
|
|
@@ -158,7 +161,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
158
161
|
displayName: 'New password',
|
|
159
162
|
description: 'Where a reset link lands: choose it, confirm it, done.',
|
|
160
163
|
metadata: {
|
|
161
|
-
...defaultBlueprintTemplateProvenance
|
|
164
|
+
...defaultBlueprintTemplateProvenance,
|
|
165
|
+
category: 'Foundation / Auth'
|
|
162
166
|
}
|
|
163
167
|
};
|
|
164
168
|
/** Verification: the code from the email. */ const verificationTemplate = {
|
|
@@ -195,7 +199,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
195
199
|
displayName: 'Verification',
|
|
196
200
|
description: 'The code step, with the progress indicator that tells you how much is left.',
|
|
197
201
|
metadata: {
|
|
198
|
-
...defaultBlueprintTemplateProvenance
|
|
202
|
+
...defaultBlueprintTemplateProvenance,
|
|
203
|
+
category: 'Foundation / Auth'
|
|
199
204
|
}
|
|
200
205
|
};
|
|
201
206
|
/** Lock screen: the session is still there, the person has to prove they are. */ const lockScreenTemplate = {
|
|
@@ -229,7 +234,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
229
234
|
displayName: 'Lock screen',
|
|
230
235
|
description: 'One person, one password, and no way to lose what was open.',
|
|
231
236
|
metadata: {
|
|
232
|
-
...defaultBlueprintTemplateProvenance
|
|
237
|
+
...defaultBlueprintTemplateProvenance,
|
|
238
|
+
category: 'Foundation / Auth'
|
|
233
239
|
}
|
|
234
240
|
};
|
|
235
241
|
/** The six authentication templates. */ const authTemplates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authTemplates.js","sources":["../../../gallery/authTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { field, formActions } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The six screens that stand between someone and the application: sign in, register, forgotten password,\n * new password, verification and the lock screen.\n *\n * All six fit the full-page layout's `content` slot and fill its `aside` with the branding half. That\n * split - a colored panel of brand next to a narrow column of form - is the shape the premium PrimeTek\n * templates use for every one of them, and the reason it works is that it gives the form somewhere to be\n * *small*, which is what a sign-in form should be.\n */\n\n/** The branding half every authentication screen shares. */\nfunction brandingAside(id: string, headline: string, supporting: string) {\n return [\n externalComponent(`${id}-logo`, ComponentName.Logo, { label: 'Contoso', initials: 'C' }),\n text(`${id}-headline`, headline),\n text(`${id}-supporting`, supporting),\n ];\n}\n\n/** Sign in. */\nexport const loginTemplate: ScreenTemplate = {\n name: 'Login',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('login', 'Welcome back', 'Everything your team shipped since you were last here is waiting.'),\n [TemplateSlotName.Body]: [\n card('login-card', [\n text('login-title', 'Sign in'),\n field('login-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('login-password', 'Password', 'password', { feedback: false }),\n field('login-remember', 'Keep me signed in', 'checkbox', {}),\n formActions('login-actions', 'Sign in', 'Use a different account'),\n button('login-forgot', 'I forgot my password', { link: true, targetScreen: 'ForgotPassword' }),\n ]),\n ],\n },\n displayName: 'Sign in',\n description: 'Email and password beside the branding panel.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Register. */\nexport const registerTemplate: ScreenTemplate = {\n name: 'Register',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('register', 'Start in two minutes', 'No card, no call, no sales engineer. Just an account.'),\n [TemplateSlotName.Body]: [\n card('register-card', [\n text('register-title', 'Create your account'),\n field('register-name', 'Full name', 'inputText', {}),\n field('register-email', 'Work email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('register-password', 'Password', 'password', { feedback: true }),\n field('register-terms', 'I accept the terms of service', 'checkbox', {}),\n formActions('register-actions', 'Create account', 'I already have one'),\n ]),\n ],\n },\n displayName: 'Register',\n description: 'Account creation with a password strength meter and the terms checkbox.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Forgotten password: ask for the address. */\nexport const forgotPasswordTemplate: ScreenTemplate = {\n name: 'ForgotPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('forgot', 'It happens', 'Tell us the address you signed up with and we will send a link.'),\n [TemplateSlotName.Body]: [\n card('forgot-card', [\n text('forgot-title', 'Reset your password'),\n field('forgot-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n formActions('forgot-actions', 'Send the link', 'Back to sign in'),\n ]),\n ],\n },\n displayName: 'Forgotten password',\n description: 'One field and one button - the whole point is that it asks for nothing else.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** New password: the other end of the link. */\nexport const newPasswordTemplate: ScreenTemplate = {\n name: 'NewPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('new-password', 'Almost there', 'Choose something you have not used anywhere else.'),\n [TemplateSlotName.Body]: [\n card('new-password-card', [\n text('new-password-title', 'Choose a new password'),\n field('new-password-value', 'New password', 'password', { feedback: true }),\n field('new-password-confirm', 'Confirm it', 'password', { feedback: false }),\n formActions('new-password-actions', 'Set the password', 'Cancel'),\n ]),\n ],\n },\n displayName: 'New password',\n description: 'Where a reset link lands: choose it, confirm it, done.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Verification: the code from the email. */\nexport const verificationTemplate: ScreenTemplate = {\n name: 'Verification',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('verification', 'Check your email', 'We sent a six-digit code. It expires in ten minutes.'),\n [TemplateSlotName.Body]: [\n card('verification-card', [\n text('verification-title', 'Enter the code'),\n externalComponent('verification-steps', 'steps', { model: ['Account', 'Verify', 'Done'], activeIndex: 1 }),\n field('verification-code', 'Six-digit code', 'inputText', { maxLength: 6 }),\n formActions('verification-actions', 'Verify', 'Send it again'),\n ]),\n ],\n },\n displayName: 'Verification',\n description: 'The code step, with the progress indicator that tells you how much is left.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Lock screen: the session is still there, the person has to prove they are. */\nexport const lockScreenTemplate: ScreenTemplate = {\n name: 'LockScreen',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('lock', 'Locked', 'Your work is exactly where you left it.'),\n [TemplateSlotName.Body]: [\n card('lock-card', [\n externalComponent('lock-avatar', 'avatar', { label: 'AN', size: 'xlarge', shape: 'circle' }),\n text('lock-name', 'Amelia Nyquist'),\n field('lock-password', 'Password', 'password', { feedback: false }),\n formActions('lock-actions', 'Unlock', 'Sign in as someone else'),\n ]),\n ],\n },\n displayName: 'Lock screen',\n description: 'One person, one password, and no way to lose what was open.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The six authentication templates. */\nexport const authTemplates: ScreenTemplate[] = [\n loginTemplate,\n registerTemplate,\n forgotPasswordTemplate,\n newPasswordTemplate,\n verificationTemplate,\n lockScreenTemplate,\n];\n"],"names":["brandingAside","id","headline","supporting","externalComponent","ComponentName","Logo","label","initials","text","loginTemplate","name","fitsSlot","SlotName","Content","slots","Aside","TemplateSlotName","Body","content","card","field","placeholder","feedback","formActions","button","link","targetScreen","displayName","description","metadata","defaultBlueprintTemplateProvenance","registerTemplate","forgotPasswordTemplate","newPasswordTemplate","verificationTemplate","model","activeIndex","maxLength","lockScreenTemplate","size","shape","authTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;iEAWA,SAASA,aAAAA,CAAcC,EAAU,EAAEC,QAAgB,EAAEC,UAAkB,EAAA;IACnE,OAAO;AACHC,QAAAA,iBAAAA,CAAkB,GAAGH,EAAAA,CAAG,KAAK,CAAC,EAAEI,aAAAA,CAAcC,IAAI,EAAE;YAAEC,KAAAA,EAAO,SAAA;YAAWC,QAAAA,EAAU;AAAI,SAAA,CAAA;AACtFC,QAAAA,IAAAA,CAAK,CAAA,EAAGR,EAAAA,CAAG,SAAS,CAAC,EAAEC,QAAAA,CAAAA;AACvBO,QAAAA,IAAAA,CAAK,CAAA,EAAGR,EAAAA,CAAG,WAAW,CAAC,EAAEE,UAAAA;AAC5B,KAAA;AACL;AAEA,gBACO,MAAMO,aAAAA,GAAgC;IACzCC,IAAAA,EAAM,OAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAME,SAASG;AAAM,SAAA;AAAG,QAAA;AAAEL,YAA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AA,IAAAA,CAAK,WAAA,EAAa;AACdhB,gBAAAA,iBAAAA,CAAkB,eAAe,QAAA,EAAU;oBAAEG,KAAAA,EAAO,IAAA;oBAAMiC,IAAAA,EAAM,QAAA;oBAAUC,KAAAA,EAAO;AAAS,iBAAA,CAAA;AAC1FhC,gBAAAA,IAAAA,CAAK,WAAA,EAAa,gBAAA,CAAA;gBAClBY,KAAAA,CAAM,eAAA,EAAiB,YAAY,UAAA,EAAY;oBAAEE,QAAAA,EAAU;AAAM,iBAAA,CAAA;AACjEC,gBAAAA,WAAAA,CAAY,gBAAgB,QAAA,EAAU,yBAAA;AACzC,aAAA;AACJ;AACL,KAAA;IACAI,WAAAA,EAAa,aAAA;IACbC,WAAAA,EAAa,6DAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAAmC;AACtD;AAEA,yCACO,MAAMW,aAAAA,GAAkC;AAC3ChC,IAAAA,aAAAA;AACAsB,IAAAA,gBAAAA;AACAC,IAAAA,sBAAAA;AACAC,IAAAA,mBAAAA;AACAC,IAAAA,oBAAAA;AACAI,IAAAA;;;"}
|
|
1
|
+
{"version":3,"file":"authTemplates.js","sources":["../../../gallery/authTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { field, formActions } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The six screens that stand between someone and the application: sign in, register, forgotten password,\n * new password, verification and the lock screen.\n *\n * All six fit the full-page layout's `content` slot and fill its `aside` with the branding half. That\n * split - a colored panel of brand next to a narrow column of form - is the shape the premium PrimeTek\n * templates use for every one of them, and the reason it works is that it gives the form somewhere to be\n * *small*, which is what a sign-in form should be.\n */\n\n/** The branding half every authentication screen shares. */\nfunction brandingAside(id: string, headline: string, supporting: string) {\n return [\n externalComponent(`${id}-logo`, ComponentName.Logo, { label: 'Contoso', initials: 'C' }),\n text(`${id}-headline`, headline),\n text(`${id}-supporting`, supporting),\n ];\n}\n\n/** Sign in. */\nexport const loginTemplate: ScreenTemplate = {\n name: 'Login',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('login', 'Welcome back', 'Everything your team shipped since you were last here is waiting.'),\n [TemplateSlotName.Body]: [\n card('login-card', [\n text('login-title', 'Sign in'),\n field('login-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('login-password', 'Password', 'password', { feedback: false }),\n field('login-remember', 'Keep me signed in', 'checkbox', {}),\n formActions('login-actions', 'Sign in', 'Use a different account'),\n button('login-forgot', 'I forgot my password', { link: true, targetScreen: 'ForgotPassword' }),\n ]),\n ],\n },\n displayName: 'Sign in',\n description: 'Email and password beside the branding panel.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Register. */\nexport const registerTemplate: ScreenTemplate = {\n name: 'Register',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('register', 'Start in two minutes', 'No card, no call, no sales engineer. Just an account.'),\n [TemplateSlotName.Body]: [\n card('register-card', [\n text('register-title', 'Create your account'),\n field('register-name', 'Full name', 'inputText', {}),\n field('register-email', 'Work email', 'inputText', { placeholder: 'you@contoso.com' }),\n field('register-password', 'Password', 'password', { feedback: true }),\n field('register-terms', 'I accept the terms of service', 'checkbox', {}),\n formActions('register-actions', 'Create account', 'I already have one'),\n ]),\n ],\n },\n displayName: 'Register',\n description: 'Account creation with a password strength meter and the terms checkbox.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Forgotten password: ask for the address. */\nexport const forgotPasswordTemplate: ScreenTemplate = {\n name: 'ForgotPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('forgot', 'It happens', 'Tell us the address you signed up with and we will send a link.'),\n [TemplateSlotName.Body]: [\n card('forgot-card', [\n text('forgot-title', 'Reset your password'),\n field('forgot-email', 'Email', 'inputText', { placeholder: 'you@contoso.com' }),\n formActions('forgot-actions', 'Send the link', 'Back to sign in'),\n ]),\n ],\n },\n displayName: 'Forgotten password',\n description: 'One field and one button - the whole point is that it asks for nothing else.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** New password: the other end of the link. */\nexport const newPasswordTemplate: ScreenTemplate = {\n name: 'NewPassword',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('new-password', 'Almost there', 'Choose something you have not used anywhere else.'),\n [TemplateSlotName.Body]: [\n card('new-password-card', [\n text('new-password-title', 'Choose a new password'),\n field('new-password-value', 'New password', 'password', { feedback: true }),\n field('new-password-confirm', 'Confirm it', 'password', { feedback: false }),\n formActions('new-password-actions', 'Set the password', 'Cancel'),\n ]),\n ],\n },\n displayName: 'New password',\n description: 'Where a reset link lands: choose it, confirm it, done.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Verification: the code from the email. */\nexport const verificationTemplate: ScreenTemplate = {\n name: 'Verification',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('verification', 'Check your email', 'We sent a six-digit code. It expires in ten minutes.'),\n [TemplateSlotName.Body]: [\n card('verification-card', [\n text('verification-title', 'Enter the code'),\n externalComponent('verification-steps', 'steps', { model: ['Account', 'Verify', 'Done'], activeIndex: 1 }),\n field('verification-code', 'Six-digit code', 'inputText', { maxLength: 6 }),\n formActions('verification-actions', 'Verify', 'Send it again'),\n ]),\n ],\n },\n displayName: 'Verification',\n description: 'The code step, with the progress indicator that tells you how much is left.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** Lock screen: the session is still there, the person has to prove they are. */\nexport const lockScreenTemplate: ScreenTemplate = {\n name: 'LockScreen',\n fitsSlot: SlotName.Content,\n slots: [{ name: SlotName.Aside }, { name: TemplateSlotName.Body }],\n content: {\n [SlotName.Aside]: brandingAside('lock', 'Locked', 'Your work is exactly where you left it.'),\n [TemplateSlotName.Body]: [\n card('lock-card', [\n externalComponent('lock-avatar', 'avatar', { label: 'AN', size: 'xlarge', shape: 'circle' }),\n text('lock-name', 'Amelia Nyquist'),\n field('lock-password', 'Password', 'password', { feedback: false }),\n formActions('lock-actions', 'Unlock', 'Sign in as someone else'),\n ]),\n ],\n },\n displayName: 'Lock screen',\n description: 'One person, one password, and no way to lose what was open.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Auth' },\n};\n\n/** The six authentication templates. */\nexport const authTemplates: ScreenTemplate[] = [\n loginTemplate,\n registerTemplate,\n forgotPasswordTemplate,\n newPasswordTemplate,\n verificationTemplate,\n lockScreenTemplate,\n];\n"],"names":["brandingAside","id","headline","supporting","externalComponent","ComponentName","Logo","label","initials","text","loginTemplate","name","fitsSlot","SlotName","Content","slots","Aside","TemplateSlotName","Body","content","card","field","placeholder","feedback","formActions","button","link","targetScreen","displayName","description","metadata","defaultBlueprintTemplateProvenance","category","registerTemplate","forgotPasswordTemplate","newPasswordTemplate","verificationTemplate","model","activeIndex","maxLength","lockScreenTemplate","size","shape","authTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;iEAWA,SAASA,aAAAA,CAAcC,EAAU,EAAEC,QAAgB,EAAEC,UAAkB,EAAA;IACnE,OAAO;AACHC,QAAAA,iBAAAA,CAAkB,GAAGH,EAAAA,CAAG,KAAK,CAAC,EA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AACAuB,IAAAA,gBAAAA;AACAC,IAAAA,sBAAAA;AACAC,IAAAA,mBAAAA;AACAC,IAAAA,oBAAAA;AACAI,IAAAA;;;"}
|
|
@@ -51,7 +51,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
51
51
|
displayName: 'Confirmation dialog',
|
|
52
52
|
description: 'One question with the consequence spelled out, and a way back.',
|
|
53
53
|
metadata: {
|
|
54
|
-
...defaultBlueprintTemplateProvenance
|
|
54
|
+
...defaultBlueprintTemplateProvenance,
|
|
55
|
+
category: 'Foundation / Dialog'
|
|
55
56
|
}
|
|
56
57
|
};
|
|
57
58
|
/** Form: a short capture that does not deserve a page of its own. */ const formDialogTemplate = {
|
|
@@ -100,7 +101,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
100
101
|
displayName: 'Form dialog',
|
|
101
102
|
description: 'A handful of fields captured without leaving the page underneath.',
|
|
102
103
|
metadata: {
|
|
103
|
-
...defaultBlueprintTemplateProvenance
|
|
104
|
+
...defaultBlueprintTemplateProvenance,
|
|
105
|
+
category: 'Foundation / Dialog'
|
|
104
106
|
}
|
|
105
107
|
};
|
|
106
108
|
/** Detail: a record shown over the list it came from. */ const detailDialogTemplate = {
|
|
@@ -153,7 +155,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
153
155
|
displayName: 'Detail dialog',
|
|
154
156
|
description: 'A record over the list it came from, with a route to the full page.',
|
|
155
157
|
metadata: {
|
|
156
|
-
...defaultBlueprintTemplateProvenance
|
|
158
|
+
...defaultBlueprintTemplateProvenance,
|
|
159
|
+
category: 'Foundation / Dialog'
|
|
157
160
|
}
|
|
158
161
|
};
|
|
159
162
|
/** The dialog templates this blueprint provides. */ const galleryDialogTemplates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dialogTemplates.js","sources":["../../../gallery/dialogTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogTemplate } from '@cratis/scene.model';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { field } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The three dialog shapes an application repeats: confirm something destructive, capture a short form, and\n * show a record without leaving the list behind it.\n *\n * A dialog template has no `fitsSlot`, and that absence is the whole distinction. A screen template is\n * *placed* - it fills a slot on whatever contains it, and the containment chain is what decides where it\n * appears. A dialog is *summoned*: it opens over the application from wherever the code that opened it\n * happens to be, so there is no parent slot for it to name.\n */\n\n/** Confirm: one question, two answers, and enough context to answer it. */\nexport const confirmDialogTemplate: DialogTemplate = {\n name: 'ConfirmDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('confirm-title', 'Archive this product?')],\n [TemplateSlotName.Body]: [\n text('confirm-message', 'Bamboo Watch will stop appearing in the catalog. Existing orders keep it.'),\n externalComponent('confirm-note', 'message', { severity: 'warn', text: 'This can be undone from the archive.' }),\n ],\n [TemplateSlotName.Actions]: [\n panel('confirm-actions', [button('confirm-yes', 'Archive', { severity: 'danger' }), button('confirm-no', 'Keep it', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Confirmation dialog',\n description: 'One question with the consequence spelled out, and a way back.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Form: a short capture that does not deserve a page of its own. */\nexport const formDialogTemplate: DialogTemplate = {\n name: 'FormDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('form-dialog-title', 'Invite someone')],\n [TemplateSlotName.Body]: [\n field('form-dialog-email', 'Email', 'inputText', { placeholder: 'them@contoso.com' }),\n field('form-dialog-role', 'Role', 'dropdown', { options: ['Viewer', 'Editor', 'Administrator'] }),\n field('form-dialog-message', 'Message', 'inputTextarea', { rows: 3 }),\n ],\n [TemplateSlotName.Actions]: [\n panel('form-dialog-actions', [button('form-dialog-send', 'Send invitation', { severity: 'primary' }), button('form-dialog-cancel', 'Cancel', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Form dialog',\n description: 'A handful of fields captured without leaving the page underneath.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** Detail: a record shown over the list it came from. */\nexport const detailDialogTemplate: DialogTemplate = {\n name: 'DetailDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('detail-dialog-title', 'ORD-4192')],\n [TemplateSlotName.Body]: [\n card('detail-dialog-summary', [\n text('detail-dialog-customer', 'Northwind Traders'),\n text('detail-dialog-total', '$1,240.00'),\n externalComponent('detail-dialog-status', 'tag', { value: 'Shipped', severity: 'success' }),\n ]),\n ],\n [TemplateSlotName.SidePanel]: [externalComponent('detail-dialog-timeline', 'timeline', { align: 'left' })],\n [TemplateSlotName.Actions]: [\n panel('detail-dialog-actions', [button('detail-dialog-open', 'Open full record', { severity: 'primary', targetScreen: 'DetailView' }), button('detail-dialog-close', 'Close', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Detail dialog',\n description: 'A record over the list it came from, with a route to the full page.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The dialog templates this blueprint provides. */\nexport const galleryDialogTemplates: DialogTemplate[] = [confirmDialogTemplate, formDialogTemplate, detailDialogTemplate];\n"],"names":["confirmDialogTemplate","name","slots","TemplateSlotName","Header","Body","Actions","content","text","externalComponent","severity","panel","button","displayName","description","metadata","defaultBlueprintTemplateProvenance","formDialogTemplate","field","placeholder","options","rows","detailDialogTemplate","SidePanel","card","value","align","targetScreen","galleryDialogTemplates"],"mappings":";;;;;AAAA;AACA;AAQA;;;;;;;;AAQC,gFAGM,MAAMA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAAAA,EAAME,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEH,YAAAA,IAAAA,EAAME,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEJ,YAAAA,IAAAA,EAAME,iBAAiBG;AAAQ;AAAE,KAAA;IAC/GC,OAAAA,EAAS;QACL,CAACJ,gBAAAA,CAAiBC,MAAM,GAAG;AAACI,YAAAA,IAAAA,CAAK,eAAA,EAAiB,uBAAA;AAAyB,SAAA;QAC3E,CAACL,gBAAAA,CAAiBE,IAAI,GAAG;AACrBG,YAAAA,IAAAA,CAAK,iBAAA,EAAmB,2EAAA,CAAA;AACxBC,YAAAA,iBAAAA,CAAkB,gBAAgB,SAAA,EAAW;gBAAEC,QAAAA,EAAU,MAAA;gBAAQF,IAAAA,EAAM;AAAuC,aAAA;AACjH,SAAA;QACD,CAACL,gBAAAA,CAAiBG,OAAO,GAAG;AACxBK,YAAAA,KAAAA,CAAM,iBAAA,EAAmB;AAACC,gBAAAA,MAAAA,CAAO,eAAe,SAAA,EAAW;oBAAEF,QAAAA,EAAU;AAAS,iBAAA,CAAA;AAAIE,gBAAAA,MAAAA,CAAO,cAAc,SAAA,EAAW;oBAAEF,QAAAA,EAAU;AAAY,iBAAA;AAAG,aAAA;AAClJ;AACL,KAAA;IACAG,WAAAA,EAAa,qBAAA;IACbC,WAAAA,EAAa,gEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;
|
|
1
|
+
{"version":3,"file":"dialogTemplates.js","sources":["../../../gallery/dialogTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogTemplate } from '@cratis/scene.model';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, panel, text } from './elements';\nimport { field } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * The three dialog shapes an application repeats: confirm something destructive, capture a short form, and\n * show a record without leaving the list behind it.\n *\n * A dialog template has no `fitsSlot`, and that absence is the whole distinction. A screen template is\n * *placed* - it fills a slot on whatever contains it, and the containment chain is what decides where it\n * appears. A dialog is *summoned*: it opens over the application from wherever the code that opened it\n * happens to be, so there is no parent slot for it to name.\n */\n\n/** Confirm: one question, two answers, and enough context to answer it. */\nexport const confirmDialogTemplate: DialogTemplate = {\n name: 'ConfirmDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('confirm-title', 'Archive this product?')],\n [TemplateSlotName.Body]: [\n text('confirm-message', 'Bamboo Watch will stop appearing in the catalog. Existing orders keep it.'),\n externalComponent('confirm-note', 'message', { severity: 'warn', text: 'This can be undone from the archive.' }),\n ],\n [TemplateSlotName.Actions]: [\n panel('confirm-actions', [button('confirm-yes', 'Archive', { severity: 'danger' }), button('confirm-no', 'Keep it', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Confirmation dialog',\n description: 'One question with the consequence spelled out, and a way back.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Dialog' },\n};\n\n/** Form: a short capture that does not deserve a page of its own. */\nexport const formDialogTemplate: DialogTemplate = {\n name: 'FormDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('form-dialog-title', 'Invite someone')],\n [TemplateSlotName.Body]: [\n field('form-dialog-email', 'Email', 'inputText', { placeholder: 'them@contoso.com' }),\n field('form-dialog-role', 'Role', 'dropdown', { options: ['Viewer', 'Editor', 'Administrator'] }),\n field('form-dialog-message', 'Message', 'inputTextarea', { rows: 3 }),\n ],\n [TemplateSlotName.Actions]: [\n panel('form-dialog-actions', [button('form-dialog-send', 'Send invitation', { severity: 'primary' }), button('form-dialog-cancel', 'Cancel', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Form dialog',\n description: 'A handful of fields captured without leaving the page underneath.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Dialog' },\n};\n\n/** Detail: a record shown over the list it came from. */\nexport const detailDialogTemplate: DialogTemplate = {\n name: 'DetailDialog',\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [text('detail-dialog-title', 'ORD-4192')],\n [TemplateSlotName.Body]: [\n card('detail-dialog-summary', [\n text('detail-dialog-customer', 'Northwind Traders'),\n text('detail-dialog-total', '$1,240.00'),\n externalComponent('detail-dialog-status', 'tag', { value: 'Shipped', severity: 'success' }),\n ]),\n ],\n [TemplateSlotName.SidePanel]: [externalComponent('detail-dialog-timeline', 'timeline', { align: 'left' })],\n [TemplateSlotName.Actions]: [\n panel('detail-dialog-actions', [button('detail-dialog-open', 'Open full record', { severity: 'primary', targetScreen: 'DetailView' }), button('detail-dialog-close', 'Close', { severity: 'secondary' })]),\n ],\n },\n displayName: 'Detail dialog',\n description: 'A record over the list it came from, with a route to the full page.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Dialog' },\n};\n\n/** The dialog templates this blueprint provides. */\nexport const galleryDialogTemplates: DialogTemplate[] = [confirmDialogTemplate, formDialogTemplate, detailDialogTemplate];\n"],"names":["confirmDialogTemplate","name","slots","TemplateSlotName","Header","Body","Actions","content","text","externalComponent","severity","panel","button","displayName","description","metadata","defaultBlueprintTemplateProvenance","category","formDialogTemplate","field","placeholder","options","rows","detailDialogTemplate","SidePanel","card","value","align","targetScreen","galleryDialogTemplates"],"mappings":";;;;;AAAA;AACA;AAQA;;;;;;;;AAQC,gFAGM,MAAMA,qBAAAA,GAAwC;IACjDC,IAAAA,EAAM,eAAA;IACNC,KAAAA,EAAO;AAAC,QAAA;AAAED,YAAAA,IAA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49
49
|
displayName: 'Module workspace',
|
|
50
50
|
description: 'Module level: fits the application layout content slot and offers a body for one feature.',
|
|
51
51
|
metadata: {
|
|
52
|
-
...defaultBlueprintTemplateProvenance
|
|
52
|
+
...defaultBlueprintTemplateProvenance,
|
|
53
|
+
category: 'Foundation / Workspace'
|
|
53
54
|
}
|
|
54
55
|
};
|
|
55
56
|
/**
|
|
@@ -83,7 +84,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
83
84
|
displayName: 'Feature section',
|
|
84
85
|
description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',
|
|
85
86
|
metadata: {
|
|
86
|
-
...defaultBlueprintTemplateProvenance
|
|
87
|
+
...defaultBlueprintTemplateProvenance,
|
|
88
|
+
category: 'Foundation / Section'
|
|
87
89
|
}
|
|
88
90
|
};
|
|
89
91
|
/**
|
|
@@ -121,7 +123,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
121
123
|
displayName: 'Slice section',
|
|
122
124
|
description: 'Slice level: fits a feature section body slot and hosts one behavior.',
|
|
123
125
|
metadata: {
|
|
124
|
-
...defaultBlueprintTemplateProvenance
|
|
126
|
+
...defaultBlueprintTemplateProvenance,
|
|
127
|
+
category: 'Foundation / Section'
|
|
125
128
|
}
|
|
126
129
|
};
|
|
127
130
|
/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */ const nestingChainTemplates = [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"nesting.js","sources":["../../../gallery/nesting.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName, column, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, externalComponent } from './elements';\nimport { pageHeader } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * A worked three-level chain, from the application layout down to a slice.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's template\n * fits a slot the module's template declares; a slice's fits one the feature's declares. Nothing here is a\n * special case for a particular level - which is exactly why the hierarchy can be arbitrarily deep without\n * a second mechanism.\n *\n * These three exist to make that concrete and to be asserted by a spec, because \"it composes recursively\"\n * is the kind of claim that is true in a design document and wrong in the code.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * It brings its own header - a module always has a name and a description - and offers a body for the\n * feature inside it plus an optional side panel.\n */\nexport const moduleWorkspaceTemplate: ScreenTemplate = {\n name: 'ModuleWorkspace',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('module-header', 'Operations', 'Everything the operations module owns')],\n },\n displayName: 'Module workspace',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/**\n * Feature level: fits the module workspace's `body` slot.\n *\n * It brings a toolbar, because a feature is where actions belong - a module is a grouping, a slice is one\n * behavior, and the feature in between is what a user thinks of as a screen with buttons on it.\n */\nexport const featureSectionTemplate: ScreenTemplate = {\n name: 'FeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n button('feature-new', 'New', { severity: 'primary', icon: 'pi pi-plus' }),\n button('feature-export', 'Export', { severity: 'secondary', icon: 'pi pi-download' }),\n ],\n },\n displayName: 'Feature section',\n description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/**\n * Slice level: fits the feature section's `body` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it - one behavior's surface, with somewhere\n * to put it and somewhere to put its actions.\n */\nexport const sliceSectionTemplate: ScreenTemplate = {\n name: 'SliceSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)]),\n },\n content: {\n [TemplateSlotName.Body]: [externalComponent('slice-body', ComponentName.PageHeader, { title: 'Adjustment', subtitle: 'One behavior, one surface' })],\n },\n displayName: 'Slice section',\n description: 'Slice level: fits a feature section body slot and hosts one behavior.',\n metadata: { ...defaultBlueprintTemplateProvenance },\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [moduleWorkspaceTemplate, featureSectionTemplate, sliceSectionTemplate];\n"],"names":["moduleWorkspaceTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","pageHeader","displayName","description","metadata","defaultBlueprintTemplateProvenance","featureSectionTemplate","Toolbar","button","severity","icon","sliceSectionTemplate","Actions","arrangement","root","column","slotLeaf","grow","externalComponent","ComponentName","PageHeader","title","subtitle","nestingChainTemplates"],"mappings":";;;;;;;;;;;AAAA;AACA;AAUA;;;;;;;;;;;;;;;;UAmBaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;AACNC,IAAAA,QAAAA,EAAUC,SAASC,OAAO;IAC1BC,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBC;AAAO,SAAA;AAAG,QAAA;AAAEN,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBG;AAAU;AAAE,KAAA;IACjHC,OAAAA,EAAS;QACL,CAACJ,gBAAAA,CAAiBC,MAAM,GAAG;AAACI,YAAAA,UAAAA,CAAW,iBAAiB,YAAA,EAAc,uCAAA;AAAyC;AACnH,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa,2FAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC;
|
|
1
|
+
{"version":3,"file":"nesting.js","sources":["../../../gallery/nesting.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate } from '@cratis/scene.model';\nimport { ComponentName } from '../ComponentName';\nimport { SlotName, column, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, externalComponent } from './elements';\nimport { pageHeader } from './widgets';\nimport { defaultBlueprintTemplateProvenance } from '../templateProvenance';\n\n/**\n * A worked three-level chain, from the application layout down to a slice.\n *\n * The nesting rule is one rule applied at every depth: a template names, in `fitsSlot`, a slot declared by\n * whatever contains it. A module's template fits the application layout's `content`; a feature's template\n * fits a slot the module's template declares; a slice's fits one the feature's declares. Nothing here is a\n * special case for a particular level - which is exactly why the hierarchy can be arbitrarily deep without\n * a second mechanism.\n *\n * These three exist to make that concrete and to be asserted by a spec, because \"it composes recursively\"\n * is the kind of claim that is true in a design document and wrong in the code.\n */\n\n/**\n * Module level: fits the application shell's `content` slot.\n *\n * It brings its own header - a module always has a name and a description - and offers a body for the\n * feature inside it plus an optional side panel.\n */\nexport const moduleWorkspaceTemplate: ScreenTemplate = {\n name: 'ModuleWorkspace',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('module-header', 'Operations', 'Everything the operations module owns')],\n },\n displayName: 'Module workspace',\n description: 'Module level: fits the application layout content slot and offers a body for one feature.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Workspace' },\n};\n\n/**\n * Feature level: fits the module workspace's `body` slot.\n *\n * It brings a toolbar, because a feature is where actions belong - a module is a grouping, a slice is one\n * behavior, and the feature in between is what a user thinks of as a screen with buttons on it.\n */\nexport const featureSectionTemplate: ScreenTemplate = {\n name: 'FeatureSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n button('feature-new', 'New', { severity: 'primary', icon: 'pi pi-plus' }),\n button('feature-export', 'Export', { severity: 'secondary', icon: 'pi pi-download' }),\n ],\n },\n displayName: 'Feature section',\n description: 'Feature level: fits a module workspace body slot and brings the action toolbar.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Section' },\n};\n\n/**\n * Slice level: fits the feature section's `body` slot.\n *\n * The end of the chain, and deliberately the thinnest thing in it - one behavior's surface, with somewhere\n * to put it and somewhere to put its actions.\n */\nexport const sliceSectionTemplate: ScreenTemplate = {\n name: 'SliceSection',\n fitsSlot: TemplateSlotName.Body,\n slots: [{ name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Body, { grow: 1 }), slotLeaf(TemplateSlotName.Actions)]),\n },\n content: {\n [TemplateSlotName.Body]: [externalComponent('slice-body', ComponentName.PageHeader, { title: 'Adjustment', subtitle: 'One behavior, one surface' })],\n },\n displayName: 'Slice section',\n description: 'Slice level: fits a feature section body slot and hosts one behavior.',\n metadata: { ...defaultBlueprintTemplateProvenance, category: 'Foundation / Section' },\n};\n\n/** The chain, outermost first - what a spec walks to prove `fitsSlot` resolves at every level. */\nexport const nestingChainTemplates: ScreenTemplate[] = [moduleWorkspaceTemplate, featureSectionTemplate, sliceSectionTemplate];\n"],"names":["moduleWorkspaceTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Header","Body","SidePanel","content","pageHeader","displayName","description","metadata","defaultBlueprintTemplateProvenance","category","featureSectionTemplate","Toolbar","button","severity","icon","sliceSectionTemplate","Actions","arrangement","root","column","slotLeaf","grow","externalComponent","ComponentName","PageHeader","title","subtit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iBAAA;IACbC,WAAAA,EAAa,iFAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,kCAAkC;QAAEC,QAAAA,EAAU;AAAuB;AACxF;AAEA;;;;;UAMaM,oBAAAA,GAAuC;IAChDrB,IAAAA,EAAM,cAAA;AACNC,IAAAA,QAAAA,EAAUI,iBAAiBE,IAAI;IAC/BH,KAAAA,EAAO;AAAC,QAAA;AAAEJ,YAAAA,IAAAA,EAAMK,iBAAiBE;AAAK,SAAA;AAAG,QAAA;AAAEP,YAAAA,IAAAA,EAAMK,iBAAiBiB;AAAQ;AAAE,KAAA;IAC5EC,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;YAACC,QAAAA,CAASrB,gBAAAA,CAAiBE,IAAI,EAAE;gBAAEoB,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAID,YAAAA,QAAAA,CAASrB,iBAAiBiB,OAAO;AAAE,SAAA;AACnG,KAAA;IACAb,OAAAA,EAAS;QACL,CAACJ,gBAAAA,CAAiBE,IAAI,GAAG;YAACqB,iBAAAA,CAAkB,YAAA,EAAcC,aAAAA,CAAcC,UAAU,EAAE;gBAAEC,KAAAA,EAAO,YAAA;gBAAcC,QAAAA,EAAU;AAA4B,aAAA;AAAG;AACxJ,KAAA;IACArB,WAAAA,EAAa,eAAA;IACbC,WAAAA,EAAa,uEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,kCAAkC;QAAEC,QAAAA,EAAU;AAAuB;AACxF;AAEA,mGACO,MAAMkB,qBAAAA,GAA0C;AAAClC,IAAAA,uBAAAA;AAAyBiB,IAAAA,sBAAAA;AAAwBK,IAAAA;;;"}
|
|
@@ -50,7 +50,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
50
50
|
displayName: 'Error',
|
|
51
51
|
description: 'A server-side failure, said plainly, with a way onward.',
|
|
52
52
|
metadata: {
|
|
53
|
-
...defaultBlueprintTemplateProvenance
|
|
53
|
+
...defaultBlueprintTemplateProvenance,
|
|
54
|
+
category: 'Foundation / State'
|
|
54
55
|
}
|
|
55
56
|
};
|
|
56
57
|
/** Signed in, and still not allowed. */ const accessDeniedTemplate = {
|
|
@@ -85,7 +86,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
85
86
|
displayName: 'Access denied',
|
|
86
87
|
description: 'A refusal that distinguishes "not signed in" from "not allowed".',
|
|
87
88
|
metadata: {
|
|
88
|
-
...defaultBlueprintTemplateProvenance
|
|
89
|
+
...defaultBlueprintTemplateProvenance,
|
|
90
|
+
category: 'Foundation / State'
|
|
89
91
|
}
|
|
90
92
|
};
|
|
91
93
|
/** No such address. */ const notFoundTemplate = {
|
|
@@ -119,7 +121,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
119
121
|
displayName: 'Not found',
|
|
120
122
|
description: 'A wrong address, with a search box rather than a dead end.',
|
|
121
123
|
metadata: {
|
|
122
|
-
...defaultBlueprintTemplateProvenance
|
|
124
|
+
...defaultBlueprintTemplateProvenance,
|
|
125
|
+
category: 'Foundation / State'
|
|
123
126
|
}
|
|
124
127
|
};
|
|
125
128
|
/** The page that has to do the selling. */ const landingTemplate = {
|
|
@@ -184,7 +187,8 @@ import { defaultBlueprintTemplateProvenance } from '../templateProvenance.js';
|
|
|
184
187
|
displayName: 'Landing',
|
|
185
188
|
description: 'The marketing front door, with its own navigation because it has no application chrome.',
|
|
186
189
|
metadata: {
|
|
187
|
-
...defaultBlueprintTemplateProvenance
|
|
190
|
+
...defaultBlueprintTemplateProvenance,
|
|
191
|
+
category: 'Foundation / Landing'
|
|
188
192
|
}
|
|
189
193
|
};
|
|
190
194
|
/** The four status and marketing templates. */ const statusTemplates = [
|