@cratis/scene.blueprint.default 4.12.0 → 4.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (121) hide show
  1. package/README.md +2 -2
  2. package/dist/cjs/gallery/GalleryScreenPreview.js +6 -3
  3. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
  4. package/dist/cjs/gallery/TemplatePreviewState.js +17 -0
  5. package/dist/cjs/gallery/TemplatePreviewState.js.map +1 -0
  6. package/dist/cjs/gallery/applyTemplatePreviewState.js +91 -0
  7. package/dist/cjs/gallery/applyTemplatePreviewState.js.map +1 -0
  8. package/dist/cjs/gallery/authTemplates.js +25 -6
  9. package/dist/cjs/gallery/authTemplates.js.map +1 -1
  10. package/dist/cjs/gallery/dialogTemplates.js +13 -3
  11. package/dist/cjs/gallery/dialogTemplates.js.map +1 -1
  12. package/dist/cjs/gallery/navigation.js +7 -0
  13. package/dist/cjs/gallery/navigation.js.map +1 -1
  14. package/dist/cjs/gallery/nesting.js +13 -3
  15. package/dist/cjs/gallery/nesting.js.map +1 -1
  16. package/dist/cjs/gallery/screens.js +10 -1
  17. package/dist/cjs/gallery/screens.js.map +1 -1
  18. package/dist/cjs/gallery/statusTemplates.js +19 -5
  19. package/dist/cjs/gallery/statusTemplates.js.map +1 -1
  20. package/dist/cjs/gallery/supportTemplates.js +23 -6
  21. package/dist/cjs/gallery/supportTemplates.js.map +1 -1
  22. package/dist/cjs/gallery/widgets.js +20 -6
  23. package/dist/cjs/gallery/widgets.js.map +1 -1
  24. package/dist/cjs/gallery/workspaceTemplates.js +137 -8
  25. package/dist/cjs/gallery/workspaceTemplates.js.map +1 -1
  26. package/dist/cjs/index.js +10 -0
  27. package/dist/cjs/index.js.map +1 -1
  28. package/dist/cjs/layouts/appShell.js +5 -1
  29. package/dist/cjs/layouts/appShell.js.map +1 -1
  30. package/dist/cjs/layouts/fullPage.js +5 -1
  31. package/dist/cjs/layouts/fullPage.js.map +1 -1
  32. package/dist/cjs/templateProvenance.js +46 -0
  33. package/dist/cjs/templateProvenance.js.map +1 -0
  34. package/dist/esm/gallery/ApplicationScreens.stories.d.ts +1 -0
  35. package/dist/esm/gallery/ApplicationScreens.stories.d.ts.map +1 -1
  36. package/dist/esm/gallery/ApplicationScreens.stories.js +2 -1
  37. package/dist/esm/gallery/ApplicationScreens.stories.js.map +1 -1
  38. package/dist/esm/gallery/GalleryScreenPreview.d.ts +3 -1
  39. package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -1
  40. package/dist/esm/gallery/GalleryScreenPreview.js +6 -3
  41. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
  42. package/dist/esm/gallery/PreviewStates.stories.d.ts +36 -0
  43. package/dist/esm/gallery/PreviewStates.stories.d.ts.map +1 -0
  44. package/dist/esm/gallery/PreviewStates.stories.js +27 -0
  45. package/dist/esm/gallery/PreviewStates.stories.js.map +1 -0
  46. package/dist/esm/gallery/TemplatePreviewState.d.ts +7 -0
  47. package/dist/esm/gallery/TemplatePreviewState.d.ts.map +1 -0
  48. package/dist/esm/gallery/TemplatePreviewState.js +15 -0
  49. package/dist/esm/gallery/TemplatePreviewState.js.map +1 -0
  50. package/dist/esm/gallery/applyTemplatePreviewState.d.ts +6 -0
  51. package/dist/esm/gallery/applyTemplatePreviewState.d.ts.map +1 -0
  52. package/dist/esm/gallery/applyTemplatePreviewState.js +87 -0
  53. package/dist/esm/gallery/applyTemplatePreviewState.js.map +1 -0
  54. package/dist/esm/gallery/authTemplates.d.ts.map +1 -1
  55. package/dist/esm/gallery/authTemplates.js +25 -6
  56. package/dist/esm/gallery/authTemplates.js.map +1 -1
  57. package/dist/esm/gallery/dialogTemplates.d.ts.map +1 -1
  58. package/dist/esm/gallery/dialogTemplates.js +13 -3
  59. package/dist/esm/gallery/dialogTemplates.js.map +1 -1
  60. package/dist/esm/gallery/index.d.ts +2 -0
  61. package/dist/esm/gallery/index.d.ts.map +1 -1
  62. package/dist/esm/gallery/index.js +2 -0
  63. package/dist/esm/gallery/index.js.map +1 -1
  64. package/dist/esm/gallery/navigation.d.ts.map +1 -1
  65. package/dist/esm/gallery/navigation.js +7 -0
  66. package/dist/esm/gallery/navigation.js.map +1 -1
  67. package/dist/esm/gallery/nesting.d.ts.map +1 -1
  68. package/dist/esm/gallery/nesting.js +13 -3
  69. package/dist/esm/gallery/nesting.js.map +1 -1
  70. package/dist/esm/gallery/screens.d.ts.map +1 -1
  71. package/dist/esm/gallery/screens.js +10 -1
  72. package/dist/esm/gallery/screens.js.map +1 -1
  73. package/dist/esm/gallery/statusTemplates.d.ts.map +1 -1
  74. package/dist/esm/gallery/statusTemplates.js +19 -5
  75. package/dist/esm/gallery/statusTemplates.js.map +1 -1
  76. package/dist/esm/gallery/supportTemplates.d.ts.map +1 -1
  77. package/dist/esm/gallery/supportTemplates.js +23 -6
  78. package/dist/esm/gallery/supportTemplates.js.map +1 -1
  79. package/dist/esm/gallery/widgets.d.ts +1 -1
  80. package/dist/esm/gallery/widgets.d.ts.map +1 -1
  81. package/dist/esm/gallery/widgets.js +20 -6
  82. package/dist/esm/gallery/widgets.js.map +1 -1
  83. package/dist/esm/gallery/workspaceTemplates.d.ts +1 -0
  84. package/dist/esm/gallery/workspaceTemplates.d.ts.map +1 -1
  85. package/dist/esm/gallery/workspaceTemplates.js +139 -11
  86. package/dist/esm/gallery/workspaceTemplates.js.map +1 -1
  87. package/dist/esm/index.d.ts +1 -0
  88. package/dist/esm/index.d.ts.map +1 -1
  89. package/dist/esm/index.js +4 -1
  90. package/dist/esm/index.js.map +1 -1
  91. package/dist/esm/layouts/appShell.d.ts.map +1 -1
  92. package/dist/esm/layouts/appShell.js +5 -1
  93. package/dist/esm/layouts/appShell.js.map +1 -1
  94. package/dist/esm/layouts/fullPage.d.ts.map +1 -1
  95. package/dist/esm/layouts/fullPage.js +5 -1
  96. package/dist/esm/layouts/fullPage.js.map +1 -1
  97. package/dist/esm/templateProvenance.d.ts +4 -0
  98. package/dist/esm/templateProvenance.d.ts.map +1 -0
  99. package/dist/esm/templateProvenance.js +43 -0
  100. package/dist/esm/templateProvenance.js.map +1 -0
  101. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  102. package/gallery/ApplicationScreens.stories.tsx +4 -1
  103. package/gallery/GalleryScreenPreview.tsx +8 -3
  104. package/gallery/PreviewStates.stories.tsx +56 -0
  105. package/gallery/TemplatePreviewState.ts +20 -0
  106. package/gallery/applyTemplatePreviewState.ts +69 -0
  107. package/gallery/authTemplates.ts +7 -0
  108. package/gallery/dialogTemplates.ts +4 -0
  109. package/gallery/index.ts +2 -0
  110. package/gallery/navigation.ts +1 -0
  111. package/gallery/nesting.ts +4 -0
  112. package/gallery/screens.ts +2 -1
  113. package/gallery/statusTemplates.ts +6 -1
  114. package/gallery/supportTemplates.ts +7 -1
  115. package/gallery/widgets.ts +14 -5
  116. package/gallery/workspaceTemplates.ts +64 -4
  117. package/index.ts +1 -0
  118. package/layouts/appShell.ts +2 -0
  119. package/layouts/fullPage.ts +2 -0
  120. package/package.json +8 -7
  121. package/templateProvenance.ts +37 -0
@@ -1 +1 @@
1
- {"version":3,"file":"workspaceTemplates.js","sources":["../../../gallery/workspaceTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, WidthSizeClass } from '@cratis/scene.model';\nimport { SlotName, column, grid, slotLeaf } from '../layouts';\nimport { TemplateSlotName } from './TemplateSlotName';\nimport { button, card, externalComponent, text } from './elements';\nimport { emptyState, field, formActions, pageHeader, statCard, table, widget } from './widgets';\n\n/**\n * The five workhorse shapes inside an application shell: a dashboard, a list, a detail, a form and the\n * designed empty state.\n *\n * Every one fits the layout's `content` slot, and every one carries realistic seeded content rather than\n * placeholder text. A gallery whose dashboard shows four boxes labeled \"Card\" proves the renderer runs; a\n * gallery whose dashboard shows revenue, orders, customers and a real table proves the blueprint is worth\n * starting an application from.\n */\n\n/**\n * The dashboard: four figures across the top, then two columns of larger widgets.\n *\n * This is Sakai's composition, and the reason to copy it is that it is the arrangement people already read\n * fluently - the eye takes the row of numbers first and then settles into the detail.\n *\n * Its own arrangement collapses the two columns into one at a compact width, because a two-column widget\n * grid on a phone is two columns of unreadable slivers.\n */\nexport const dashboardTemplate: ScreenTemplate = {\n name: 'Dashboard',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Stats }, { name: TemplateSlotName.Primary }, { name: TemplateSlotName.Secondary }],\n arrangement: {\n root: column([slotLeaf(TemplateSlotName.Stats), grid([slotLeaf(TemplateSlotName.Primary, { span: 2 }), slotLeaf(TemplateSlotName.Secondary)], 3, 16)]),\n overrides: [\n {\n width: WidthSizeClass.Compact,\n root: column([slotLeaf(TemplateSlotName.Stats), slotLeaf(TemplateSlotName.Primary), slotLeaf(TemplateSlotName.Secondary)], 16),\n },\n ],\n },\n content: {\n [TemplateSlotName.Stats]: [\n statCard('stat-revenue', 'Revenue', '$284,120', '+12.4% this month', 'pi pi-dollar'),\n statCard('stat-orders', 'Orders', '1,842', '+3.1% this month', 'pi pi-shopping-cart'),\n statCard('stat-customers', 'Customers', '9,410', '+128 new', 'pi pi-users'),\n statCard('stat-open', 'Open tickets', '17', '-4 since Monday', 'pi pi-inbox'),\n ],\n [TemplateSlotName.Primary]: [\n widget('widget-revenue', 'Revenue over time', [\n table(\n 'revenue-table',\n [\n { field: 'month', header: 'Month' },\n { field: 'revenue', header: 'Revenue' },\n { field: 'change', header: 'Change' },\n ],\n [\n { month: 'March', revenue: '$284,120', change: '+12.4%' },\n { month: 'February', revenue: '$252,780', change: '+4.1%' },\n { month: 'January', revenue: '$242,830', change: '-1.8%' },\n { month: 'December', revenue: '$247,290', change: '+9.6%' },\n ],\n ),\n ]),\n widget('widget-orders', 'Recent orders', [\n table(\n 'orders-table',\n [\n { field: 'reference', header: 'Reference' },\n { field: 'customer', header: 'Customer' },\n { field: 'total', header: 'Total' },\n { field: 'status', header: 'Status' },\n ],\n [\n { reference: 'ORD-4192', customer: 'Northwind Traders', total: '$1,240.00', status: 'Shipped' },\n { reference: 'ORD-4191', customer: 'Contoso Ltd', total: '$318.50', status: 'Packing' },\n { reference: 'ORD-4188', customer: 'Fabrikam', total: '$2,980.00', status: 'Awaiting payment' },\n { reference: 'ORD-4184', customer: 'Adventure Works', total: '$76.20', status: 'Shipped' },\n ],\n ),\n ]),\n ],\n [TemplateSlotName.Secondary]: [\n widget('widget-activity', 'Activity', [externalComponent('activity-timeline', 'timeline', { align: 'left' })]),\n widget('widget-capacity', 'Warehouse capacity', [externalComponent('capacity-bar', 'progressBar', { value: 68 })]),\n ],\n },\n displayName: 'Dashboard',\n description: 'Four stat cards over two columns of widgets - the composition every template line opens with.',\n};\n\n/** The list: a filter toolbar, a real table, and the row actions a list needs. */\nexport const crudListTemplate: ScreenTemplate = {\n name: 'CrudList',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Toolbar }, { name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Toolbar]: [\n pageHeader('crud-header', 'Products', '412 products across 9 categories', [\n button('crud-new', 'New product', { severity: 'primary', icon: 'pi pi-plus' }),\n button('crud-import', 'Import', { severity: 'secondary', icon: 'pi pi-upload' }),\n ]),\n externalComponent('crud-search', 'inputText', { placeholder: 'Search products' }),\n ],\n [TemplateSlotName.Body]: [\n table(\n 'products-table',\n [\n { field: 'code', header: 'Code' },\n { field: 'name', header: 'Name' },\n { field: 'category', header: 'Category' },\n { field: 'price', header: 'Price' },\n { field: 'stock', header: 'In stock' },\n ],\n [\n { code: 'P-1001', name: 'Bamboo Watch', category: 'Accessories', price: '$65.00', stock: 24 },\n { code: 'P-1002', name: 'Black Watch', category: 'Accessories', price: '$72.00', stock: 61 },\n { code: 'P-1003', name: 'Blue Band', category: 'Fitness', price: '$79.00', stock: 2 },\n { code: 'P-1004', name: 'Blue T-Shirt', category: 'Clothing', price: '$29.00', stock: 25 },\n { code: 'P-1005', name: 'Bracelet', category: 'Accessories', price: '$15.00', stock: 73 },\n ],\n ),\n ],\n },\n displayName: 'List',\n description: 'A searchable table with a header, primary action and row data.',\n};\n\n/** The detail: a summary panel beside the record's own sections. */\nexport const detailViewTemplate: ScreenTemplate = {\n name: 'DetailView',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.SidePanel }],\n content: {\n [TemplateSlotName.Header]: [\n pageHeader('detail-header', 'Bamboo Watch', 'P-1001 · Accessories', [\n button('detail-edit', 'Edit', { severity: 'primary', icon: 'pi pi-pencil' }),\n button('detail-archive', 'Archive', { severity: 'secondary', icon: 'pi pi-inbox' }),\n ]),\n ],\n [TemplateSlotName.Body]: [\n widget('detail-description', 'Description', [\n text('detail-description-text', 'A bamboo-cased watch with a sapphire face and a recycled steel strap.'),\n ]),\n widget('detail-history', 'Price history', [externalComponent('detail-history-timeline', 'timeline', { align: 'left' })]),\n ],\n [TemplateSlotName.SidePanel]: [\n widget('detail-summary', 'Summary', [\n text('detail-stock', 'In stock: 24'),\n text('detail-reserved', 'Reserved: 3'),\n externalComponent('detail-status', 'tag', { value: 'Active', severity: 'success' }),\n ]),\n ],\n },\n displayName: 'Detail',\n description: 'One record: a header with actions, its sections, and a summary panel.',\n};\n\n/** The form: fields, grouped, with the actions that close them. */\nexport const formPageTemplate: ScreenTemplate = {\n name: 'FormPage',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Header }, { name: TemplateSlotName.Body }, { name: TemplateSlotName.Actions }],\n content: {\n [TemplateSlotName.Header]: [pageHeader('form-header', 'New product', 'Everything marked with an asterisk is required')],\n [TemplateSlotName.Body]: [\n card('form-card', [\n field('form-name', 'Name', 'inputText', { placeholder: 'Bamboo Watch' }),\n field('form-code', 'Code', 'inputText', { placeholder: 'P-1001' }),\n field('form-category', 'Category', 'dropdown', { options: ['Accessories', 'Clothing', 'Fitness'] }),\n field('form-price', 'Price', 'inputNumber', { mode: 'currency', currency: 'USD' }),\n field('form-available', 'Available from', 'calendar', {}),\n field('form-notes', 'Notes', 'inputTextarea', { rows: 4 }),\n ]),\n ],\n [TemplateSlotName.Actions]: [formActions('form-actions', 'Create product')],\n },\n displayName: 'Form',\n description: 'A grouped form with the field types an application actually uses.',\n};\n\n/** The empty state: what a list looks like before anything exists, designed rather than apologized for. */\nexport const emptyTemplate: ScreenTemplate = {\n name: 'Empty',\n fitsSlot: SlotName.Content,\n slots: [{ name: TemplateSlotName.Body }],\n content: {\n [TemplateSlotName.Body]: [\n emptyState('empty-state', 'No products yet', 'Products you create will show up here, with their stock and pricing.', 'Create the first product'),\n ],\n },\n displayName: 'Empty state',\n description: 'The designed empty state for a list that has nothing in it yet.',\n};\n\n/** The five workspace templates. */\nexport const workspaceTemplates: ScreenTemplate[] = [dashboardTemplate, crudListTemplate, detailViewTemplate, formPageTemplate, emptyTemplate];\n"],"names":["dashboardTemplate","name","fitsSlot","SlotName","Content","slots","TemplateSlotName","Stats","Primary","Secondary","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","statCard","widget","table","field","header","month","revenue","change","reference","customer","total","status","externalComponent","align","value","displayName","description","crudListTemplate","Toolbar","Body","pageHeader","button","severity","icon","placeholder","code","category","price","stock","detailViewTemplate","Header","SidePanel","text","formPageTemplate","Actions","card","options","mode","currency","rows","formActions","emptyTemplate","emptyState","workspaceTemplates"],"mappings":";;;;;;;;;;;;AAAA;AACA;AAQA;;;;;;;;;;;;;;;;UAmBaA,iBAAAA,GAAoC;IAC7CC,IAAAA,EAAM,WAAA;AACNC,IAAAA,QAAAA,EAAUC,kBAASC,OAAO;IAC1BC,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,KAA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;;;"}
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 })]),\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","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,kCAAiBC,KAAK,CAAA;YAAGO,iBAAAA,CAAK;gBAACD,qBAAAA,CAASP,iCAAAA,CAAiBE,OAAO,EAAE;oBAAEO,IAAAA,EAAM;AAAE,iBAAA,CAAA;AAAIF,gBAAAA,qBAAAA,CAASP,kCAAiBG,SAAS;AAAE,aAAA,EAAE,CAAA,EAAG,EAAA;AAAI,SAAA,CAAA;QACrJO,SAAAA,EA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AAA;AAAsBJ,IAAAA,kBAAAA;AAAoBU,IAAAA,gBAAAA;AAAkBQ,IAAAA;;;;;;;;;"}
package/dist/cjs/index.js CHANGED
@@ -34,6 +34,8 @@ var componentNames = require('./gallery/componentNames.js');
34
34
  var previewProfile = require('./gallery/previewProfile.js');
35
35
  var resolveElementNames = require('./gallery/resolveElementNames.js');
36
36
  var GalleryScreenPreview = require('./gallery/GalleryScreenPreview.js');
37
+ var TemplatePreviewState = require('./gallery/TemplatePreviewState.js');
38
+ var applyTemplatePreviewState = require('./gallery/applyTemplatePreviewState.js');
37
39
  var elementProperties = require('./shell/elementProperties.js');
38
40
  var ThemeOption = require('./shell/ThemeOption.js');
39
41
  var AppShell = require('./shell/AppShell.js');
@@ -59,6 +61,7 @@ var defaultBlueprintThemes = require('./themes/defaultBlueprintThemes.js');
59
61
  var LayoutThemeProvider = require('./themes/LayoutThemeProvider.js');
60
62
  var defaultBlueprintComponents = require('./defaultBlueprintComponents.js');
61
63
  var defaultBlueprint = require('./defaultBlueprint.js');
64
+ var templateProvenance = require('./templateProvenance.js');
62
65
 
63
66
 
64
67
 
@@ -146,6 +149,7 @@ exports.dashboardTemplate = workspaceTemplates.dashboardTemplate;
146
149
  exports.detailViewTemplate = workspaceTemplates.detailViewTemplate;
147
150
  exports.emptyTemplate = workspaceTemplates.emptyTemplate;
148
151
  exports.formPageTemplate = workspaceTemplates.formPageTemplate;
152
+ exports.masterDetailTemplate = workspaceTemplates.masterDetailTemplate;
149
153
  exports.workspaceTemplates = workspaceTemplates.workspaceTemplates;
150
154
  exports.documentationTemplate = supportTemplates.documentationTemplate;
151
155
  exports.helpTemplate = supportTemplates.helpTemplate;
@@ -183,6 +187,10 @@ exports.galleryProfile = previewProfile.galleryProfile;
183
187
  exports.resolveElementComponentNames = resolveElementNames.resolveElementComponentNames;
184
188
  exports.GalleryScreenPreview = GalleryScreenPreview.GalleryScreenPreview;
185
189
  exports.galleryPreviewRegistry = GalleryScreenPreview.galleryPreviewRegistry;
190
+ exports.TemplatePreviewState = TemplatePreviewState.TemplatePreviewState;
191
+ exports.applyTemplatePreviewState = applyTemplatePreviewState.applyTemplatePreviewState;
192
+ exports.hasPreviewData = applyTemplatePreviewState.hasPreviewData;
193
+ exports.previewErrorMessage = applyTemplatePreviewState.previewErrorMessage;
186
194
  exports.readBoolean = elementProperties.readBoolean;
187
195
  exports.readNumber = elementProperties.readNumber;
188
196
  exports.readOptionalString = elementProperties.readOptionalString;
@@ -217,4 +225,6 @@ exports.LayoutThemeProvider = LayoutThemeProvider.LayoutThemeProvider;
217
225
  exports.defaultBlueprintComponents = defaultBlueprintComponents.defaultBlueprintComponents;
218
226
  exports.defaultBlueprint = defaultBlueprint.defaultBlueprint;
219
227
  exports.defaultBlueprintManifest = defaultBlueprint.defaultBlueprintManifest;
228
+ exports.defaultBlueprintTemplateProvenance = templateProvenance.defaultBlueprintTemplateProvenance;
229
+ exports.sakaiCompositionProvenance = templateProvenance.sakaiCompositionProvenance;
220
230
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
@@ -4,6 +4,7 @@ var scene_model = require('@cratis/scene.model');
4
4
  var LayoutName = require('./LayoutName.js');
5
5
  var SlotName = require('./SlotName.js');
6
6
  var flowBuilders = require('./flowBuilders.js');
7
+ var templateProvenance = require('../templateProvenance.js');
7
8
 
8
9
  // Copyright (c) Cratis. All rights reserved.
9
10
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -148,7 +149,10 @@ var flowBuilders = require('./flowBuilders.js');
148
149
  name: SlotName.SlotName.ConfigPanel
149
150
  }
150
151
  ],
151
- arrangement: appShellArrangement
152
+ arrangement: appShellArrangement,
153
+ metadata: {
154
+ ...templateProvenance.sakaiCompositionProvenance
155
+ }
152
156
  };
153
157
 
154
158
  exports.appShellArrangement = appShellArrangement;
@@ -1 +1 @@
1
- {"version":3,"file":"appShell.js","sources":["../../../layouts/appShell.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { FlowArrangement, HeightSizeClass, Layout, WidthSizeClass } from '@cratis/scene.model';\nimport { LayoutName } from './LayoutName';\nimport { SlotName } from './SlotName';\nimport { column, row, slotLeaf } from './flowBuilders';\n\n/**\n * The tree at a regular width and height: a topbar across the top, the sidebar column beside the main\n * column, an optional right panel down the edge, and the configurator floating over all of it.\n */\nexport const appShellRegularRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [\n column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.RightPanel),\n ],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact width: the sidebar and the right panel leave the flow entirely.\n *\n * They leave rather than shrink because there is no width at which an 18rem panel and a 20rem panel both\n * fit beside content on a phone. The sidebar is still rendered - off-canvas, over the content, behind the\n * mask - but it no longer *occupies* anything, and that is a fact about the arrangement, not about CSS.\n */\nexport const appShellCompactWidthRoot = column([\n slotLeaf(SlotName.Topbar),\n column([slotLeaf(SlotName.Breadcrumb), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.Footer)], 0, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree at a compact height: the breadcrumb and the footer go.\n *\n * A landscape phone has room across but almost none down, and two horizontal strips of chrome eat most of\n * what is left. Dropping them is the height axis earning its place in the size-class matrix - width alone\n * cannot express it.\n */\nexport const appShellCompactHeightRoot = column([\n slotLeaf(SlotName.Topbar),\n row(\n [column([slotLeaf(SlotName.Sidebar), slotLeaf(SlotName.Menu, { grow: 1 })]), slotLeaf(SlotName.Content, { grow: 1 }), slotLeaf(SlotName.RightPanel)],\n 0,\n { grow: 1 },\n ),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/**\n * The tree when both axes are compact - a phone in landscape: nothing but the topbar, the content and the\n * configurator.\n *\n * This override exists to be *more specific* than the two single-axis ones. `evaluateFlowArrangement`\n * scores an override by how many axes it targets, so without this one a landscape phone would pick\n * whichever single-axis override was declared last and keep a footer it has no room for.\n */\nexport const appShellCompactRoot = column([\n slotLeaf(SlotName.Topbar),\n slotLeaf(SlotName.Content, { grow: 1 }),\n slotLeaf(SlotName.ConfigPanel),\n]);\n\n/** The arrangement of the {@link appShellLayout}'s own slots, with one override per size-class combination that changes it. */\nexport const appShellArrangement: FlowArrangement = {\n root: appShellRegularRoot,\n overrides: [\n { width: WidthSizeClass.Compact, root: appShellCompactWidthRoot },\n { height: HeightSizeClass.Compact, root: appShellCompactHeightRoot },\n { width: WidthSizeClass.Compact, height: HeightSizeClass.Compact, root: appShellCompactRoot },\n ],\n};\n\n/**\n * The application shell layout.\n *\n * This is the *application-level* structure - the base navigational look an application picks once and\n * every page then lives inside. The regions are the ones PrimeTek's template line settled on: Sakai\n * establishes topbar, sidebar, menu, content and footer, and the premium templates add the breadcrumb and\n * the right panel. Both sets are here, because a layout package covering only the free template's regions\n * forces a fork on anyone who wants the others.\n *\n * The slots carry no arrangement of their own: how a screen's content is arranged *inside* a slot is that\n * page template's business, and a layout that dictated it would stop being a shell.\n */\nexport const appShellLayout: Layout = {\n name: LayoutName.AppShell,\n slots: [\n { name: SlotName.Topbar },\n { name: SlotName.Sidebar },\n { name: SlotName.Menu },\n { name: SlotName.Breadcrumb },\n { name: SlotName.Content },\n { name: SlotName.Footer },\n { name: SlotName.RightPanel },\n { name: SlotName.ConfigPanel },\n ],\n arrangement: appShellArrangement,\n};\n"],"names":["appShellRegularRoot","column","slotLeaf","SlotName","Topbar","row","Sidebar","Menu","grow","Breadcrumb","Content","Footer","RightPanel","ConfigPanel","appShellCompactWidthRoot","appShellCompactHeightRoot","appShellCompactRoot","appShellArrangement","root","overrides","width","WidthSizeClass","Compact","height","HeightSizeClass","appShellLayout","name","LayoutName","AppShell","slots","arrangement"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;IAIO,MAAMA,mBAAAA,GAAsBC,mBAAAA,CAAO;AACtCC,IAAAA,qBAAAA,CAASC,kBAASC,MAAM,CAAA;IACxBC,gBAAAA,CACI;QACIJ,mBAAAA,CAAO;AAACC,YAAAA,qBAAAA,CAASC,kBAASG,OAAO,CAAA;YAAGJ,qBAAAA,CAASC,iBAAAA,CAASI,IAAI,EAAE;gBAAEC,IAAAA,EAAM;AAAE,aAAA;AAAG,SAAA,CAAA;QACzEP,mBAAAA,CAAO;AAACC,YAAAA,qBAAAA,CAASC,kBAASM,UAAU,CAAA;YAAGP,qBAAAA,CAASC,iBAAAA,CAASO,OAAO,EAAE;gBAAEF,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAIN,YAAAA,qBAAAA,CAASC,kBAASQ,MAAM;AAAE,SAAA,EAAE,CAAA,EAAG;YAAEH,IAAAA,EAAM;AAAE,S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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","sakaiCompositionProvenance"],"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,EAAE;gBAAEF,IAAAA,EAAM;AAAE,aAAA,CAAA;AAAIN,YAAAA,qBAAAA,CAASC,kBAASQ,MAAM;AAAE,SAAA,EAAE,CAAA,EAAG;YAAEH,IAAAA,EAAM;AAAE,SAAA,CAAA;AACzHN,QAAAA,qBAAAA,CAASC,kBAASS,UAAU;AAC/B,KAAA,EACD,CAAA,EACA;QAAEJ,IAAAA,EAAM;AAAE,KAAA,CAAA;AAEdN,IAAAA,qBAAAA,CAASC,kBAASU,WAAW;CAChC;AAED;;;;;;IAOO,MAAMC,wBAAAA,GAA2Bb,mBAAAA,CAAO;AAC3CC,IAAAA,qBAAAA,CAASC,kBAASC,MAAM,CAAA;IACxBH,mBAAAA,CAAO;AAACC,QAAAA,qBAAAA,CAASC,kBAASM,UAAU,CAAA;QAAGP,qBAAAA,CAASC,iBAAAA,CAASO,OAAO,EAAE;YAAEF,IAAAA,EAAM;AAAE,SAAA,CAAA;AAAIN,QAAAA,qBAAAA,CAASC,kBAASQ,MAAM;AAAE,KAAA,EAAE,C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BAAgBF,OAAO;YAAEJ,IAAAA,EAAMF;AAAoB;AAC/F;AACL;AAEA;;;;;;;;;;;UAYaS,cAAAA,GAAyB;AAClCC,IAAAA,IAAAA,EAAMC,sBAAWC,QAAQ;IACzBC,KAAAA,EAAO;AACH,QAAA;AAAEH,YAAAA,IAAAA,EAAMvB,kBAASC;AAAO,SAAA;AACxB,QAAA;AAAEsB,YAAAA,IAAAA,EAAMvB,kBAASG;AAAQ,SAAA;AACzB,QAAA;AAAEoB,YAAAA,IAAAA,EAAMvB,kBAASI;AAAK,SAAA;AACtB,QAAA;AAAEmB,YAAAA,IAAAA,EAAMvB,kBAASM;AAAW,SAAA;AAC5B,QAAA;AAAEiB,YAAAA,IAAAA,EAAMvB,kBAASO;AAAQ,SAAA;AACzB,QAAA;AAAEgB,YAAAA,IAAAA,EAAMvB,kBAASQ;AAAO,SAAA;AACxB,QAAA;AAAEe,YAAAA,IAAAA,EAAMvB,kBAASS;AAAW,SAAA;AAC5B,QAAA;AAAEc,YAAAA,IAAAA,EAAMvB,kBAASU;AAAY;AAChC,KAAA;IACDiB,WAAAA,EAAab,mBAAAA;IACbc,QAAAA,EAAU;AAAE,QAAA,GAAGC;AAA2B;AAC9C;;;;;;;"}
@@ -4,6 +4,7 @@ var scene_model = require('@cratis/scene.model');
4
4
  var LayoutName = require('./LayoutName.js');
5
5
  var SlotName = require('./SlotName.js');
6
6
  var flowBuilders = require('./flowBuilders.js');
7
+ var templateProvenance = require('../templateProvenance.js');
7
8
 
8
9
  // Copyright (c) Cratis. All rights reserved.
9
10
  // Licensed under the MIT license. See LICENSE file in the project root for full license information.
@@ -68,7 +69,10 @@ var flowBuilders = require('./flowBuilders.js');
68
69
  name: SlotName.SlotName.ConfigPanel
69
70
  }
70
71
  ],
71
- arrangement: fullPageArrangement
72
+ arrangement: fullPageArrangement,
73
+ metadata: {
74
+ ...templateProvenance.defaultBlueprintTemplateProvenance
75
+ }
72
76
  };
73
77
 
74
78
  exports.fullPageArrangement = fullPageArrangement;
@@ -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';\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};\n"],"names":["fullPageRegularRoot","column","row","slotLeaf","SlotName","Aside","Content","grow","ConfigPanel","fullPageCompactWidthRoot","fullPageArrangement","root","overrides","width","WidthSizeClass","Compact","fullPageLayout","name","LayoutName","FullPage","slots","arrangement"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;;;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;AACjB;;;;;"}
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;AAAmC;AACtD;;;;;"}
@@ -0,0 +1,46 @@
1
+ 'use strict';
2
+
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * The compatibility, attribution and license metadata every template this blueprint ships carries.
7
+ *
8
+ * Templates are written against the Scene model that introduced template provenance, and against the
9
+ * PrimeReact and Cratis Components packages this blueprint depends on - the same dependencies its manifest
10
+ * declares, with the ranges the templates were verified against. `describeTemplateCatalog` checks every
11
+ * template against them, and this package's specs prove each one comes out compatible.
12
+ */ const defaultBlueprintTemplateProvenance = {
13
+ compatibility: {
14
+ scene: '^4.13.0',
15
+ packages: [
16
+ {
17
+ name: 'PrimeReact',
18
+ versionRange: '^11.0.0'
19
+ },
20
+ {
21
+ name: 'Cratis.Components',
22
+ versionRange: '^3.0.0'
23
+ }
24
+ ]
25
+ },
26
+ attribution: {
27
+ author: 'Cratis',
28
+ url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.default'
29
+ },
30
+ license: 'MIT',
31
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
32
+ };
33
+ /**
34
+ * The provenance of the shell and the dashboard, whose arrangement follows PrimeTek's free Sakai template.
35
+ * The arrangement is followed; no Sakai source or asset is part of this package.
36
+ */ const sakaiCompositionProvenance = {
37
+ ...defaultBlueprintTemplateProvenance,
38
+ attribution: {
39
+ ...defaultBlueprintTemplateProvenance.attribution,
40
+ notice: "Arrangement follows PrimeTek's Sakai React template (https://github.com/primefaces/sakai-react, MIT)."
41
+ }
42
+ };
43
+
44
+ exports.defaultBlueprintTemplateProvenance = defaultBlueprintTemplateProvenance;
45
+ exports.sakaiCompositionProvenance = sakaiCompositionProvenance;
46
+ //# sourceMappingURL=templateProvenance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateProvenance.js","sources":["../../templateProvenance.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 { TemplateMetadata } from '@cratis/scene.model';\n\n/**\n * The compatibility, attribution and license metadata every template this blueprint ships carries.\n *\n * Templates are written against the Scene model that introduced template provenance, and against the\n * PrimeReact and Cratis Components packages this blueprint depends on - the same dependencies its manifest\n * declares, with the ranges the templates were verified against. `describeTemplateCatalog` checks every\n * template against them, and this package's specs prove each one comes out compatible.\n */\nexport const defaultBlueprintTemplateProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'> = {\n compatibility: {\n scene: '^4.13.0',\n packages: [\n { name: 'PrimeReact', versionRange: '^11.0.0' },\n { name: 'Cratis.Components', versionRange: '^3.0.0' },\n ],\n },\n attribution: { author: 'Cratis', url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.default' },\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n\n/**\n * The provenance of the shell and the dashboard, whose arrangement follows PrimeTek's free Sakai template.\n * The arrangement is followed; no Sakai source or asset is part of this package.\n */\nexport const sakaiCompositionProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'> = {\n ...defaultBlueprintTemplateProvenance,\n attribution: {\n ...defaultBlueprintTemplateProvenance.attribution!,\n notice: \"Arrangement follows PrimeTek's Sakai React template (https://github.com/primefaces/sakai-react, MIT).\",\n },\n};\n"],"names":["defaultBlueprintTemplateProvenance","compatibility","scene","packages","name","versionRange","attribution","author","url","license","licenseUrl","sakaiCompositionProvenance","notice"],"mappings":";;AAAA;AACA;AAIA;;;;;;;UAQaA,kCAAAA,GAAyH;IAClIC,aAAAA,EAAe;QACXC,KAAAA,EAAO,SAAA;QACPC,QAAAA,EAAU;AACN,YAAA;gBAAEC,IAAAA,EAAM,YAAA;gBAAcC,YAAAA,EAAc;AAAU,aAAA;AAC9C,YAAA;gBAAED,IAAAA,EAAM,mBAAA;gBAAqBC,YAAAA,EAAc;AAAS;AACvD;AACL,KAAA;IACAC,WAAAA,EAAa;QAAEC,MAAAA,EAAQ,QAAA;QAAUC,GAAAA,EAAK;AAAgF,KAAA;IACtHC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA;;;UAIaC,0BAAAA,GAAiH;AAC1H,IAAA,GAAGX,kCAAkC;IACrCM,WAAAA,EAAa;AACT,QAAA,GAAGN,mCAAmCM,WAAW;QACjDM,MAAAA,EAAQ;AACZ;AACJ;;;"}
@@ -17,6 +17,7 @@ export default meta;
17
17
  type Story = StoryObj<typeof meta>;
18
18
  export declare const Dashboard: Story;
19
19
  export declare const List: Story;
20
+ export declare const MasterDetail: Story;
20
21
  export declare const Detail: Story;
21
22
  export declare const Form: Story;
22
23
  export declare const Empty: Story;
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationScreens.stories.d.ts","sourceRoot":"","sources":["../../../gallery/ApplicationScreens.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,QAAA,MAAM,IAAI;;;;QAIF,MAAM;QACN,IAAI;YACA,WAAW;gBACP,SAAS;;;;;CAKoB,CAAC;eAE/B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,SAAS,EAAE,KAA6C,CAAC;AAGtE,eAAO,MAAM,IAAI,EAAE,KAA4C,CAAC;AAGhE,eAAO,MAAM,MAAM,EAAE,KAA8C,CAAC;AAGpE,eAAO,MAAM,IAAI,EAAE,KAA4C,CAAC;AAGhE,eAAO,MAAM,KAAK,EAAE,KAAyC,CAAC;AAG9D,eAAO,MAAM,aAAa,EAAE,KA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C;AAGlF,eAAO,MAAM,cAAc,EAAE,KAAkD,CAAC;AAGhF,eAAO,MAAM,YAAY,EAAE,KAAgD,CAAC"}
@@ -6,7 +6,7 @@ const meta = {
6
6
  layout: 'fullscreen',
7
7
  docs: {
8
8
  description: {
9
- component: 'The ten in-application screen templates plus the three-level nesting chain, each booted through the real engine as a screen.',
9
+ component: 'The eleven in-application screen templates plus the three-level nesting chain, each booted through the real engine as a screen.',
10
10
  },
11
11
  },
12
12
  },
@@ -15,6 +15,7 @@ const meta = {
15
15
  export default meta;
16
16
  export const Dashboard = { args: { screenName: 'Dashboard' } };
17
17
  export const List = { args: { screenName: 'CrudList' } };
18
+ export const MasterDetail = { args: { screenName: 'MasterDetail' } };
18
19
  export const Detail = { args: { screenName: 'DetailView' } };
19
20
  export const Form = { args: { screenName: 'FormPage' } };
20
21
  export const Empty = { args: { screenName: 'Empty' } };
@@ -1 +1 @@
1
- {"version":3,"file":"ApplicationScreens.stories.js","sourceRoot":"","sources":["../../../gallery/ApplicationScreens.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,+BAA+B;IACtC,SAAS,EAAE,oBAAoB;IAC/B,UAAU,EAAE;QACR,MAAM,EAAE,YAAY;QACpB,IAAI,EAAE;YACF,WAAW,EAAE;gBACT,SAAS,EAAE,8HAA8H;aAC5I;SACJ;KACJ;IACD,IAAI,EAAE,CAAC,UAAU,CAAC;CACuB,CAAC;AAE9C,eAAe,IAAI,CAAC;AAKpB,MAAM,CAAC,MAAM,SAAS,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,EAAE,CAAC;AAGtE,MAAM,CAAC,MAAM,IAAI,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE,CAAC;AAGhE,MAAM,CAAC,MAAM,MAAM,GAAU,EAAE,IAAI,EAAE,EA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,IAAI,EAAE,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,CAAC;AAG5D,MAAM,CAAC,MAAM,eAAe,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,iBAAiB,EAAE,EAAE,CAAC;AAGlF,MAAM,CAAC,MAAM,cAAc,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,EAAE,CAAC;AAGhF,MAAM,CAAC,MAAM,YAAY,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,cAAc,EAAE,EAAE,CAAC"}
@@ -1,12 +1,14 @@
1
1
  import { Theme } from '@cratis/scene.model';
2
2
  import { ComponentRegistry } from '@cratis/scene.react';
3
3
  import { LayoutConfigState } from '../configuration';
4
+ import { TemplatePreviewState } from './TemplatePreviewState';
4
5
  export declare const galleryPreviewRegistry: ComponentRegistry;
5
6
  export interface GalleryScreenPreviewProps {
6
7
  screenName: string;
7
8
  initialConfig?: Partial<LayoutConfigState>;
8
9
  themes?: Theme[];
9
10
  registry?: ComponentRegistry;
11
+ state?: TemplatePreviewState;
10
12
  }
11
- export declare function GalleryScreenPreview({ screenName, initialConfig, themes, registry }: GalleryScreenPreviewProps): import("react").JSX.Element;
13
+ export declare function GalleryScreenPreview({ screenName, initialConfig, themes, registry, state }: GalleryScreenPreviewProps): import("react").JSX.Element;
12
14
  //# sourceMappingURL=GalleryScreenPreview.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"GalleryScreenPreview.d.ts","sourceRoot":"","sources":["../../../gallery/GalleryScreenPreview.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAoC,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAwB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAe3E,eAAO,MAAM,sBAAsB,EAAE,iBAAwE,CAAC;AAE9G,MAAM,WAAW,yBAAyB;IAEtC,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAG3C,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IAGjB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;CAChC;AAeD,wBAAgB,oBAAoB,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,MAA+B,EAAE,QAAiC,EAAE,EAAE,yBAAyB,+BAiBhK"}
1
+ {"version":3,"file":"GalleryScreenPreview.d.ts","sourceRoot":"","sources":["../../../gallery/GalleryScreenPreview.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAC5C,OAAO,EAAE,iBAAiB,EAAoC,MAAM,qBAAqB,CAAC;AAC1F,OAAO,EAAwB,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAO3E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAU9D,eAAO,MAAM,sBAAsB,EAAE,iBAAwE,CAAC;AAE9G,MAAM,WAAW,yBAAyB;IAEtC,UAAU,EAAE,MAAM,CAAC;IAGnB,aAAa,CAAC,EAAE,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAG3C,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IAGjB,QAAQ,CAAC,EAAE,iBAAiB,CAAC;IAG7B,KAAK,CAAC,EAAE,oBAAoB,CAAC;CAChC;AAeD,wBAAgB,oBAAoB,CAAC,EAAE,UAAU,EAAE,aAAa,EAAE,MAA+B,EAAE,QAAiC,EAAE,KAAsC,EAAE,EAAE,yBAAyB,+BAiBxM"}
@@ -9,6 +9,8 @@ import { composeScreenElement } from './composeScreen.js';
9
9
  import { galleryComponentCatalog, galleryPreviewProfile } from './previewProfile.js';
10
10
  import { resolveElementComponentNames } from './resolveElementNames.js';
11
11
  import { galleryScreen } from './screens.js';
12
+ import { TemplatePreviewState } from './TemplatePreviewState.js';
13
+ import { applyTemplatePreviewState } from './applyTemplatePreviewState.js';
12
14
 
13
15
  /**
14
16
  * The registry a preview resolves against when a host does not supply one: `core` plus this blueprint.
@@ -32,15 +34,16 @@ import { galleryScreen } from './screens.js';
32
34
  * come out as `UnresolvedComponent`'s dashed red box naming what is missing. That is the designed outcome:
33
35
  * a preview of a blueprint against half a profile should look visibly incomplete rather than quietly
34
36
  * wrong.
35
- */ function GalleryScreenPreview({ screenName, initialConfig, themes = defaultBlueprintThemes, registry = galleryPreviewRegistry }) {
37
+ */ function GalleryScreenPreview({ screenName, initialConfig, themes = defaultBlueprintThemes, registry = galleryPreviewRegistry, state = TemplatePreviewState.Populated }) {
36
38
  const element = useMemo(()=>{
37
39
  const screen = galleryScreen(screenName);
38
40
  if (!screen) {
39
41
  throw new Error(`The gallery has no screen named '${screenName}'.`);
40
42
  }
41
- return resolveElementComponentNames(composeScreenElement(screen), galleryPreviewProfile, galleryComponentCatalog);
43
+ return applyTemplatePreviewState(resolveElementComponentNames(composeScreenElement(screen), galleryPreviewProfile, galleryComponentCatalog), state);
42
44
  }, [
43
- screenName
45
+ screenName,
46
+ state
44
47
  ]);
45
48
  return /*#__PURE__*/ jsx(LayoutConfigProvider, {
46
49
  initialConfig: initialConfig,
@@ -1 +1 @@
1
- {"version":3,"file":"GalleryScreenPreview.js","sources":["../../../gallery/GalleryScreenPreview.tsx"],"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 { useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { ComponentRegistry, SceneElementView, coreComponents } from '@cratis/scene.react';\nimport { LayoutConfigProvider, LayoutConfigState } from '../configuration';\nimport { defaultBlueprintComponents } from '../defaultBlueprintComponents';\nimport { LayoutThemeProvider, defaultBlueprintThemes } from '../themes';\nimport { composeScreenElement } from './composeScreen';\nimport { galleryComponentCatalog, galleryPreviewProfile } from './previewProfile';\nimport { resolveElementComponentNames } from './resolveElementNames';\nimport { galleryScreen } from './screens';\n\n/**\n * The registry a preview resolves against when a host does not supply one: `core` plus this blueprint.\n *\n * Merged by hand rather than through `mergePackageRegistries`, because reaching for this blueprint's\n * *bundle* here would be circular - the bundle is assembled from the gallery this file belongs to. Registry\n * keys carry their package name, so merge order cannot cause a collision either way.\n */\nexport const galleryPreviewRegistry: ComponentRegistry = { ...coreComponents, ...defaultBlueprintComponents };\n\nexport interface GalleryScreenPreviewProps {\n /** The name of the gallery screen to boot. */\n screenName: string;\n\n /** Configuration to start from - a story pinning a mode, or a host restoring a session. */\n initialConfig?: Partial<LayoutConfigState>;\n\n /** The themes the configurator may switch between. Defaults to the two this blueprint ships. */\n themes?: Theme[];\n\n /** The component registry to render against. Defaults to `core` plus this blueprint's own components. */\n registry?: ComponentRegistry;\n}\n\n/**\n * Boots one gallery screen through the real engine.\n *\n * Nothing here is a preview-only path: the screen is a real {@link Screen}, its element tree is resolved by\n * the real `resolveComponentName`, and it is rendered by the real `SceneElementView` against the real\n * registry. That is the point of shipping a gallery at all - a mockup proves that someone can draw a\n * dashboard, and this proves the blueprint renders one.\n *\n * Component names belonging to packages the host has not loaded resolve but find no implementation, and\n * come out as `UnresolvedComponent`'s dashed red box naming what is missing. That is the designed outcome:\n * a preview of a blueprint against half a profile should look visibly incomplete rather than quietly\n * wrong.\n */\nexport function GalleryScreenPreview({ screenName, initialConfig, themes = defaultBlueprintThemes, registry = galleryPreviewRegistry }: GalleryScreenPreviewProps) {\n const element = useMemo(() => {\n const screen = galleryScreen(screenName);\n if (!screen) {\n throw new Error(`The gallery has no screen named '${screenName}'.`);\n }\n\n return resolveElementComponentNames(composeScreenElement(screen), galleryPreviewProfile, galleryComponentCatalog);\n }, [screenName]);\n\n return (\n <LayoutConfigProvider initialConfig={initialConfig} storage={null}>\n <LayoutThemeProvider themes={themes}>\n <SceneElementView element={element} registry={registry} resolveBinding={() => undefined} />\n </LayoutThemeProvider>\n </LayoutConfigProvider>\n );\n}\n"],"names":["galleryPreviewRegistry","coreComponents","defaultBlueprintComponents","GalleryScreenPreview","screenName","initialConfig","themes","defaultBlueprintThemes","registry","element","useMemo","screen","galleryScreen","Error","resolveElementComponentNames","composeScreenElement","galleryPreviewProfile","galleryComponentCatalog","_jsx","LayoutConfigProvider","storage","LayoutThemeProvider","SceneElementView","resolveBinding","undefined"],"mappings":";;;;;;;;;;;;AAcA;;;;;;UAOaA,sBAAAA,GAA4C;AAAE,IAAA,GAAGC,cAAc;AAAE,IAAA,GAAGC;AAA2B;AAgB5G;;;;;;;;;;;;AAYC,IACM,SAASC,oBAAAA,CAAqB,EAAEC,UAAU,EAAEC,aAAa,EAAEC,MAAAA,GAASC,sBAAsB,EAAEC,QAAAA,GAAWR,sBAAsB,EAA6B,EAAA;AAC7J,IAAA,MAAMS,UAAUC,OAAAA,CAAQ,IAAA;AACpB,QAAA,MAAMC,SAASC,aAAAA,CAAcR,UAAAA,CAAAA;AAC7B,QAAA,IAAI,CAACO,MAAAA,EAAQ;AACT,YAAA,MAAM,IAAIE,KAAAA,CAAM,CAAC,iCAAiC,EAAET,UAAAA,CAAW,EAAE,CAAC,CAAA;AACtE,QAAA;QAEA,OAAOU,4BAAAA,CAA6BC,oBAAAA,CAAqBJ,MAAAA,CAAAA,EAASK,qBAAAA,EAAuBC,uBAAAA,CAAAA;IAC7F,CAAA,EAAG;AAACb,QAAAA;AAAW,KAAA,CAAA;AAEf,IAAA,qBACIc,GAAA,CAACC,oBAAAA,EAAAA;QAAqBd,aAAAA,EAAeA,aAAAA;QAAee,OAAAA,EAAS,IAAA;AACzD,QAAA,QAAA,gBAAAF,GAAA,CAACG,mBAAAA,EAAAA;YAAoBf,MAAAA,EAAQA,MAAAA;AACzB,YAAA,QAAA,gBAAAY,GAAA,CAACI,gBAAAA,EAAAA;gBAAiBb,OAAAA,EAASA,OAAAA;gBAASD,QAAAA,EAAUA,QAAAA;AAAUe,gBAAAA,cAAAA,EAAgB,IAAMC;;;;AAI9F;;"}
1
+ {"version":3,"file":"GalleryScreenPreview.js","sources":["../../../gallery/GalleryScreenPreview.tsx"],"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 { useMemo } from 'react';\nimport { Theme } from '@cratis/scene.model';\nimport { ComponentRegistry, SceneElementView, coreComponents } from '@cratis/scene.react';\nimport { LayoutConfigProvider, LayoutConfigState } from '../configuration';\nimport { defaultBlueprintComponents } from '../defaultBlueprintComponents';\nimport { LayoutThemeProvider, defaultBlueprintThemes } from '../themes';\nimport { composeScreenElement } from './composeScreen';\nimport { galleryComponentCatalog, galleryPreviewProfile } from './previewProfile';\nimport { resolveElementComponentNames } from './resolveElementNames';\nimport { galleryScreen } from './screens';\nimport { TemplatePreviewState } from './TemplatePreviewState';\nimport { applyTemplatePreviewState } from './applyTemplatePreviewState';\n\n/**\n * The registry a preview resolves against when a host does not supply one: `core` plus this blueprint.\n *\n * Merged by hand rather than through `mergePackageRegistries`, because reaching for this blueprint's\n * *bundle* here would be circular - the bundle is assembled from the gallery this file belongs to. Registry\n * keys carry their package name, so merge order cannot cause a collision either way.\n */\nexport const galleryPreviewRegistry: ComponentRegistry = { ...coreComponents, ...defaultBlueprintComponents };\n\nexport interface GalleryScreenPreviewProps {\n /** The name of the gallery screen to boot. */\n screenName: string;\n\n /** Configuration to start from - a story pinning a mode, or a host restoring a session. */\n initialConfig?: Partial<LayoutConfigState>;\n\n /** The themes the configurator may switch between. Defaults to the two this blueprint ships. */\n themes?: Theme[];\n\n /** The component registry to render against. Defaults to `core` plus this blueprint's own components. */\n registry?: ComponentRegistry;\n\n /** The data state to show. Defaults to the seeded, populated records. */\n state?: TemplatePreviewState;\n}\n\n/**\n * Boots one gallery screen through the real engine.\n *\n * Nothing here is a preview-only path: the screen is a real {@link Screen}, its element tree is resolved by\n * the real `resolveComponentName`, and it is rendered by the real `SceneElementView` against the real\n * registry. That is the point of shipping a gallery at all - a mockup proves that someone can draw a\n * dashboard, and this proves the blueprint renders one.\n *\n * Component names belonging to packages the host has not loaded resolve but find no implementation, and\n * come out as `UnresolvedComponent`'s dashed red box naming what is missing. That is the designed outcome:\n * a preview of a blueprint against half a profile should look visibly incomplete rather than quietly\n * wrong.\n */\nexport function GalleryScreenPreview({ screenName, initialConfig, themes = defaultBlueprintThemes, registry = galleryPreviewRegistry, state = TemplatePreviewState.Populated }: GalleryScreenPreviewProps) {\n const element = useMemo(() => {\n const screen = galleryScreen(screenName);\n if (!screen) {\n throw new Error(`The gallery has no screen named '${screenName}'.`);\n }\n\n return applyTemplatePreviewState(resolveElementComponentNames(composeScreenElement(screen), galleryPreviewProfile, galleryComponentCatalog), state);\n }, [screenName, state]);\n\n return (\n <LayoutConfigProvider initialConfig={initialConfig} storage={null}>\n <LayoutThemeProvider themes={themes}>\n <SceneElementView element={element} registry={registry} resolveBinding={() => undefined} />\n </LayoutThemeProvider>\n </LayoutConfigProvider>\n );\n}\n"],"names":["galleryPreviewRegistry","coreComponents","defaultBlueprintComponents","GalleryScreenPreview","screenName","initialConfig","themes","defaultBlueprintThemes","registry","state","TemplatePreviewState","Populated","element","useMemo","screen","galleryScreen","Error","applyTemplatePreviewState","resolveElementComponentNames","composeScreenElement","galleryPreviewProfile","galleryComponentCatalog","_jsx","LayoutConfigProvider","storage","LayoutThemeProvider","SceneElementView","resolveBinding","undefined"],"mappings":";;;;;;;;;;;;;;AAgBA;;;;;;UAOaA,sBAAAA,GAA4C;AAAE,IAAA,GAAGC,cAAc;AAAE,IAAA,GAAGC;AAA2B;AAmB5G;;;;;;;;;;;;AAYC,IACM,SAASC,oBAAAA,CAAqB,EAAEC,UAAU,EAAEC,aAAa,EAAEC,MAAAA,GAASC,sBAAsB,EAAEC,QAAAA,GAAWR,sBAAsB,EAAES,KAAAA,GAAQC,oBAAAA,CAAqBC,SAAS,EAA6B,EAAA;AACrM,IAAA,MAAMC,UAAUC,OAAAA,CAAQ,IAAA;AACpB,QAAA,MAAMC,SAASC,aAAAA,CAAcX,UAAAA,CAAAA;AAC7B,QAAA,IAAI,CAACU,MAAAA,EAAQ;AACT,YAAA,MAAM,IAAIE,KAAAA,CAAM,CAAC,iCAAiC,EAAEZ,UAAAA,CAAW,EAAE,CAAC,CAAA;AACtE,QAAA;AAEA,QAAA,OAAOa,yBAAAA,CAA0BC,4BAAAA,CAA6BC,oBAAAA,CAAqBL,MAAAA,CAAAA,EAASM,uBAAuBC,uBAAAA,CAAAA,EAA0BZ,KAAAA,CAAAA;IACjJ,CAAA,EAAG;AAACL,QAAAA,UAAAA;AAAYK,QAAAA;AAAM,KAAA,CAAA;AAEtB,IAAA,qBACIa,GAAA,CAACC,oBAAAA,EAAAA;QAAqBlB,aAAAA,EAAeA,aAAAA;QAAemB,OAAAA,EAAS,IAAA;AACzD,QAAA,QAAA,gBAAAF,GAAA,CAACG,mBAAAA,EAAAA;YAAoBnB,MAAAA,EAAQA,MAAAA;AACzB,YAAA,QAAA,gBAAAgB,GAAA,CAACI,gBAAAA,EAAAA;gBAAiBd,OAAAA,EAASA,OAAAA;gBAASJ,QAAAA,EAAUA,QAAAA;AAAUmB,gBAAAA,cAAAA,EAAgB,IAAMC;;;;AAI9F;;"}
@@ -0,0 +1,36 @@
1
+ import type { StoryObj } from '@storybook/react';
2
+ import { GalleryScreenPreview } from './GalleryScreenPreview';
3
+ import { TemplatePreviewState } from './TemplatePreviewState';
4
+ declare const meta: {
5
+ title: string;
6
+ component: typeof GalleryScreenPreview;
7
+ parameters: {
8
+ layout: string;
9
+ docs: {
10
+ description: {
11
+ component: string;
12
+ };
13
+ };
14
+ };
15
+ args: {
16
+ registry: import("@cratis/scene.react").ComponentRegistry;
17
+ };
18
+ argTypes: {
19
+ state: {
20
+ control: "select";
21
+ options: TemplatePreviewState[];
22
+ };
23
+ };
24
+ tags: string[];
25
+ };
26
+ export default meta;
27
+ type Story = StoryObj<typeof meta>;
28
+ export declare const ListPopulated: Story;
29
+ export declare const ListEmpty: Story;
30
+ export declare const ListLoading: Story;
31
+ export declare const ListError: Story;
32
+ export declare const MasterDetailPopulated: Story;
33
+ export declare const MasterDetailLoading: Story;
34
+ export declare const DashboardError: Story;
35
+ export declare const UsersEmpty: Story;
36
+ //# sourceMappingURL=PreviewStates.stories.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviewStates.stories.d.ts","sourceRoot":"","sources":["../../../gallery/PreviewStates.stories.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAQ,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAIvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAS9D,QAAA,MAAM,IAAI;;;;QAIF,MAAM;QACN,IAAI;YAAI,WAAW;gBAAI,SAAS;;;;;;;;;;;;;;CAKK,CAAC;eAE/B,IAAI;AAEnB,KAAK,KAAK,GAAG,QAAQ,CAAC,OAAO,IAAI,CAAC,CAAC;AAGnC,eAAO,MAAM,aAAa,EAAE,KAAmF,CAAC;AAGhH,eAAO,MAAM,SAAS,EAAE,KAA+E,CAAC;AAGxG,eAAO,MAAM,WAAW,EAAE,KAAiF,CAAC;AAG5G,eAAO,MAAM,SAAS,EAAE,KAA+E,CAAC;AAGxG,eAAO,MAAM,qBAAqB,EAAE,KAAuF,CAAC;AAG5H,eAAO,MAAM,mBAAmB,EAAE,KAAqF,CAAC;AAGxH,eAAO,MAAM,cAAc,EAAE,KAAgF,CAAC;AAG9G,eAAO,MAAM,UAAU,EAAE,KAAqF,CAAC"}
@@ -0,0 +1,27 @@
1
+ import { corePackage, mergePackageRegistries } from '@cratis/scene.react';
2
+ import { primeReactPackage } from '@cratis/scene.primereact';
3
+ import { defaultBlueprint } from '../defaultBlueprint';
4
+ import { GalleryScreenPreview } from './GalleryScreenPreview';
5
+ import { TemplatePreviewState } from './TemplatePreviewState';
6
+ const registry = mergePackageRegistries([corePackage, primeReactPackage, defaultBlueprint]);
7
+ const meta = {
8
+ title: 'Blueprint/Preview states',
9
+ component: GalleryScreenPreview,
10
+ parameters: {
11
+ layout: 'fullscreen',
12
+ docs: { description: { component: 'Populated, empty, loading and error states of the data templates, through the real packages.' } },
13
+ },
14
+ args: { registry },
15
+ argTypes: { state: { control: 'select', options: Object.values(TemplatePreviewState) } },
16
+ tags: ['autodocs'],
17
+ };
18
+ export default meta;
19
+ export const ListPopulated = { args: { screenName: 'CrudList', state: TemplatePreviewState.Populated } };
20
+ export const ListEmpty = { args: { screenName: 'CrudList', state: TemplatePreviewState.Empty } };
21
+ export const ListLoading = { args: { screenName: 'CrudList', state: TemplatePreviewState.Loading } };
22
+ export const ListError = { args: { screenName: 'CrudList', state: TemplatePreviewState.Error } };
23
+ export const MasterDetailPopulated = { args: { screenName: 'MasterDetail', state: TemplatePreviewState.Populated } };
24
+ export const MasterDetailLoading = { args: { screenName: 'MasterDetail', state: TemplatePreviewState.Loading } };
25
+ export const DashboardError = { args: { screenName: 'Dashboard', state: TemplatePreviewState.Error } };
26
+ export const UsersEmpty = { args: { screenName: 'UserManagement', state: TemplatePreviewState.Empty } };
27
+ //# sourceMappingURL=PreviewStates.stories.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviewStates.stories.js","sourceRoot":"","sources":["../../../gallery/PreviewStates.stories.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAC1E,OAAO,EAAE,iBAAiB,EAAE,MAAM,0BAA0B,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAO9D,MAAM,QAAQ,GAAG,sBAAsB,CAAC,CAAC,WAAW,EAAE,iBAAiB,EAAE,gBAAgB,CAAC,CAAC,CAAC;AAE5F,MAAM,IAAI,GAAG;IACT,KAAK,EAAE,0BAA0B;IACjC,SAAS,EAAE,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AE,IAAI,EAAE,EAAE,UAAU,EAAE,WAAW,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,EAAE,CAAC;AAG9G,MAAM,CAAC,MAAM,UAAU,GAAU,EAAE,IAAI,EAAE,EAAE,UAAU,EAAE,gBAAgB,EAAE,KAAK,EAAE,oBAAoB,CAAC,KAAK,EAAE,EAAE,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare enum TemplatePreviewState {
2
+ Populated = "populated",
3
+ Empty = "empty",
4
+ Loading = "loading",
5
+ Error = "error"
6
+ }
7
+ //# sourceMappingURL=TemplatePreviewState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplatePreviewState.d.ts","sourceRoot":"","sources":["../../../gallery/TemplatePreviewState.ts"],"names":[],"mappings":"AAOA,oBAAY,oBAAoB;IAE5B,SAAS,cAAc;IAGvB,KAAK,UAAU;IAGf,OAAO,YAAY;IAGnB,KAAK,UAAU;CAClB"}
@@ -0,0 +1,15 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * The data states a template preview can show. A template is only worth choosing if it looks right in all
5
+ * four, because an application spends real time in each of them.
6
+ */ var TemplatePreviewState = /*#__PURE__*/ function(TemplatePreviewState) {
7
+ /** The seeded, realistic records. */ TemplatePreviewState["Populated"] = "populated";
8
+ /** The query returned nothing; each table shows its empty message. */ TemplatePreviewState["Empty"] = "empty";
9
+ /** The query has not answered yet; each table announces that it is loading. */ TemplatePreviewState["Loading"] = "loading";
10
+ /** The query failed; each table announces the error in place of its rows. */ TemplatePreviewState["Error"] = "error";
11
+ return TemplatePreviewState;
12
+ }({});
13
+
14
+ export { TemplatePreviewState };
15
+ //# sourceMappingURL=TemplatePreviewState.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TemplatePreviewState.js","sources":["../../../gallery/TemplatePreviewState.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/**\n * The data states a template preview can show. A template is only worth choosing if it looks right in all\n * four, because an application spends real time in each of them.\n */\nexport enum TemplatePreviewState {\n /** The seeded, realistic records. */\n Populated = 'populated',\n\n /** The query returned nothing; each table shows its empty message. */\n Empty = 'empty',\n\n /** The query has not answered yet; each table announces that it is loading. */\n Loading = 'loading',\n\n /** The query failed; each table announces the error in place of its rows. */\n Error = 'error',\n}\n"],"names":["TemplatePreviewState"],"mappings":"AAAA;AACA;AAEA;;;IAIO,IAAKA,oBAAAA,iBAAAA,SAAAA,oBAAAA,EAAAA;0CAC2B,oBAAA,CAAA,WAAA,CAAA,GAAA,WAAA;2EAGiC,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAA;oFAGS,oBAAA,CAAA,SAAA,CAAA,GAAA,SAAA;kFAGF,oBAAA,CAAA,OAAA,CAAA,GAAA,OAAA;AAVnEA,IAAAA,OAAAA,oBAAAA;AAYX,CAAA,CAAA,EAAA;;"}
@@ -0,0 +1,6 @@
1
+ import { SceneElement } from '@cratis/scene.model';
2
+ import { TemplatePreviewState } from './TemplatePreviewState';
3
+ export declare const previewErrorMessage = "The data could not be loaded. Try again in a moment.";
4
+ export declare function applyTemplatePreviewState<T extends SceneElement>(element: T, state: TemplatePreviewState): T;
5
+ export declare function hasPreviewData(element: SceneElement): boolean;
6
+ //# sourceMappingURL=applyTemplatePreviewState.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"applyTemplatePreviewState.d.ts","sourceRoot":"","sources":["../../../gallery/applyTemplatePreviewState.ts"],"names":[],"mappings":"AAGA,OAAO,EAA4B,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAC7E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG9D,eAAO,MAAM,mBAAmB,yDAAyD,CAAC;AAU1F,wBAAgB,yBAAyB,CAAC,CAAC,SAAS,YAAY,EAAE,OAAO,EAAE,CAAC,EAAE,KAAK,EAAE,oBAAoB,GAAG,CAAC,CAG5G;AAGD,wBAAgB,cAAc,CAAC,OAAO,EAAE,YAAY,GAAG,OAAO,CAI7D"}