@cratis/scene.blueprint.default 4.40.0 → 4.41.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 (129) hide show
  1. package/defaultBlueprint.ts +1 -0
  2. package/dist/cjs/defaultBlueprint.js +18 -1
  3. package/dist/cjs/defaultBlueprint.js.map +1 -1
  4. package/dist/cjs/defaultBlueprintComponentMetadata.js +9 -0
  5. package/dist/cjs/defaultBlueprintComponentMetadata.js.map +1 -1
  6. package/dist/cjs/defaultBlueprintComponents.js +9 -0
  7. package/dist/cjs/defaultBlueprintComponents.js.map +1 -1
  8. package/dist/cjs/foundation/templates/boardScreenTemplate.js +76 -0
  9. package/dist/cjs/foundation/templates/boardScreenTemplate.js.map +1 -0
  10. package/dist/cjs/foundation/templates/dashboardScreenTemplate.js +128 -0
  11. package/dist/cjs/foundation/templates/dashboardScreenTemplate.js.map +1 -0
  12. package/dist/cjs/foundation/templates/formScreenTemplate.js +71 -0
  13. package/dist/cjs/foundation/templates/formScreenTemplate.js.map +1 -0
  14. package/dist/cjs/foundation/templates/index.js +39 -0
  15. package/dist/cjs/foundation/templates/index.js.map +1 -0
  16. package/dist/cjs/foundation/templates/listScreenTemplate.js +124 -0
  17. package/dist/cjs/foundation/templates/listScreenTemplate.js.map +1 -0
  18. package/dist/cjs/foundation/templates/masterDetailScreenTemplate.js +79 -0
  19. package/dist/cjs/foundation/templates/masterDetailScreenTemplate.js.map +1 -0
  20. package/dist/cjs/foundation/templates/recordPageTemplate.js +137 -0
  21. package/dist/cjs/foundation/templates/recordPageTemplate.js.map +1 -0
  22. package/dist/cjs/foundation/templates/templateParts.js +38 -0
  23. package/dist/cjs/foundation/templates/templateParts.js.map +1 -0
  24. package/dist/cjs/foundation/templates/wizardScreenTemplate.js +95 -0
  25. package/dist/cjs/foundation/templates/wizardScreenTemplate.js.map +1 -0
  26. package/dist/cjs/foundation/templates/workspaceScreenTemplate.js +62 -0
  27. package/dist/cjs/foundation/templates/workspaceScreenTemplate.js.map +1 -0
  28. package/dist/cjs/gallery/GalleryScreenPreview.js +76 -4
  29. package/dist/cjs/gallery/GalleryScreenPreview.js.map +1 -1
  30. package/dist/cjs/gallery/applicationChrome.js +18 -1
  31. package/dist/cjs/gallery/applicationChrome.js.map +1 -1
  32. package/dist/cjs/gallery/composeScreen.js +5 -3
  33. package/dist/cjs/gallery/composeScreen.js.map +1 -1
  34. package/dist/cjs/gallery/screens.js +83 -2
  35. package/dist/cjs/gallery/screens.js.map +1 -1
  36. package/dist/cjs/index.js +25 -0
  37. package/dist/cjs/index.js.map +1 -1
  38. package/dist/esm/defaultBlueprint.d.ts.map +1 -1
  39. package/dist/esm/defaultBlueprint.js +18 -1
  40. package/dist/esm/defaultBlueprint.js.map +1 -1
  41. package/dist/esm/defaultBlueprintComponentMetadata.js +9 -0
  42. package/dist/esm/defaultBlueprintComponentMetadata.js.map +1 -1
  43. package/dist/esm/defaultBlueprintComponents.js +9 -0
  44. package/dist/esm/defaultBlueprintComponents.js.map +1 -1
  45. package/dist/esm/foundation/index.d.ts +1 -0
  46. package/dist/esm/foundation/index.d.ts.map +1 -1
  47. package/dist/esm/foundation/index.js +1 -0
  48. package/dist/esm/foundation/index.js.map +1 -1
  49. package/dist/esm/foundation/templates/boardScreenTemplate.d.ts +3 -0
  50. package/dist/esm/foundation/templates/boardScreenTemplate.d.ts.map +1 -0
  51. package/dist/esm/foundation/templates/boardScreenTemplate.js +74 -0
  52. package/dist/esm/foundation/templates/boardScreenTemplate.js.map +1 -0
  53. package/dist/esm/foundation/templates/dashboardScreenTemplate.d.ts +3 -0
  54. package/dist/esm/foundation/templates/dashboardScreenTemplate.d.ts.map +1 -0
  55. package/dist/esm/foundation/templates/dashboardScreenTemplate.js +126 -0
  56. package/dist/esm/foundation/templates/dashboardScreenTemplate.js.map +1 -0
  57. package/dist/esm/foundation/templates/formScreenTemplate.d.ts +3 -0
  58. package/dist/esm/foundation/templates/formScreenTemplate.d.ts.map +1 -0
  59. package/dist/esm/foundation/templates/formScreenTemplate.js +69 -0
  60. package/dist/esm/foundation/templates/formScreenTemplate.js.map +1 -0
  61. package/dist/esm/foundation/templates/index.d.ts +11 -0
  62. package/dist/esm/foundation/templates/index.d.ts.map +1 -0
  63. package/dist/esm/foundation/templates/index.js +25 -0
  64. package/dist/esm/foundation/templates/index.js.map +1 -0
  65. package/dist/esm/foundation/templates/listScreenTemplate.d.ts +3 -0
  66. package/dist/esm/foundation/templates/listScreenTemplate.d.ts.map +1 -0
  67. package/dist/esm/foundation/templates/listScreenTemplate.js +122 -0
  68. package/dist/esm/foundation/templates/listScreenTemplate.js.map +1 -0
  69. package/dist/esm/foundation/templates/masterDetailScreenTemplate.d.ts +3 -0
  70. package/dist/esm/foundation/templates/masterDetailScreenTemplate.d.ts.map +1 -0
  71. package/dist/esm/foundation/templates/masterDetailScreenTemplate.js +77 -0
  72. package/dist/esm/foundation/templates/masterDetailScreenTemplate.js.map +1 -0
  73. package/dist/esm/foundation/templates/recordPageTemplate.d.ts +3 -0
  74. package/dist/esm/foundation/templates/recordPageTemplate.d.ts.map +1 -0
  75. package/dist/esm/foundation/templates/recordPageTemplate.js +135 -0
  76. package/dist/esm/foundation/templates/recordPageTemplate.js.map +1 -0
  77. package/dist/esm/foundation/templates/templateParts.d.ts +6 -0
  78. package/dist/esm/foundation/templates/templateParts.d.ts.map +1 -0
  79. package/dist/esm/foundation/templates/templateParts.js +33 -0
  80. package/dist/esm/foundation/templates/templateParts.js.map +1 -0
  81. package/dist/esm/foundation/templates/wizardScreenTemplate.d.ts +3 -0
  82. package/dist/esm/foundation/templates/wizardScreenTemplate.d.ts.map +1 -0
  83. package/dist/esm/foundation/templates/wizardScreenTemplate.js +93 -0
  84. package/dist/esm/foundation/templates/wizardScreenTemplate.js.map +1 -0
  85. package/dist/esm/foundation/templates/workspaceScreenTemplate.d.ts +3 -0
  86. package/dist/esm/foundation/templates/workspaceScreenTemplate.d.ts.map +1 -0
  87. package/dist/esm/foundation/templates/workspaceScreenTemplate.js +60 -0
  88. package/dist/esm/foundation/templates/workspaceScreenTemplate.js.map +1 -0
  89. package/dist/esm/gallery/GalleryScreenPreview.d.ts +13 -2
  90. package/dist/esm/gallery/GalleryScreenPreview.d.ts.map +1 -1
  91. package/dist/esm/gallery/GalleryScreenPreview.js +75 -5
  92. package/dist/esm/gallery/GalleryScreenPreview.js.map +1 -1
  93. package/dist/esm/gallery/applicationChrome.d.ts.map +1 -1
  94. package/dist/esm/gallery/applicationChrome.js +18 -1
  95. package/dist/esm/gallery/applicationChrome.js.map +1 -1
  96. package/dist/esm/gallery/composeScreen.d.ts.map +1 -1
  97. package/dist/esm/gallery/composeScreen.js +5 -3
  98. package/dist/esm/gallery/composeScreen.js.map +1 -1
  99. package/dist/esm/gallery/screens.d.ts.map +1 -1
  100. package/dist/esm/gallery/screens.js +83 -2
  101. package/dist/esm/gallery/screens.js.map +1 -1
  102. package/dist/esm/index.js +11 -1
  103. package/dist/esm/index.js.map +1 -1
  104. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  105. package/foundation/index.ts +1 -0
  106. package/foundation/templates/boardScreenTemplate.ts +28 -0
  107. package/foundation/templates/dashboardScreenTemplate.ts +37 -0
  108. package/foundation/templates/formScreenTemplate.ts +28 -0
  109. package/foundation/templates/index.ts +26 -0
  110. package/foundation/templates/listScreenTemplate.ts +37 -0
  111. package/foundation/templates/masterDetailScreenTemplate.ts +28 -0
  112. package/foundation/templates/recordPageTemplate.ts +36 -0
  113. package/foundation/templates/templateParts.ts +30 -0
  114. package/foundation/templates/wizardScreenTemplate.ts +33 -0
  115. package/foundation/templates/workspaceScreenTemplate.ts +27 -0
  116. package/gallery/GalleryScreenPreview.tsx +64 -5
  117. package/gallery/applicationChrome.ts +6 -1
  118. package/gallery/composeScreen.ts +4 -2
  119. package/gallery/screens.ts +16 -1
  120. package/package.json +10 -8
  121. package/sampleData/foundation-en.json +512 -0
  122. package/thumbnails/BoardScreen.svg +15 -0
  123. package/thumbnails/DashboardScreen.svg +18 -0
  124. package/thumbnails/FormScreen.svg +14 -0
  125. package/thumbnails/ListScreen.svg +16 -0
  126. package/thumbnails/MasterDetailScreen.svg +22 -0
  127. package/thumbnails/RecordPage.svg +17 -0
  128. package/thumbnails/WizardScreen.svg +16 -0
  129. package/thumbnails/WorkspaceScreen.svg +12 -0
@@ -0,0 +1,122 @@
1
+ import { WidthSizeClass } from '@cratis/scene.model';
2
+ import { column, slotLeaf, row } from '../../layouts/flowBuilders.js';
3
+ import { component, fromQuery, foundationTemplateProvenance, thumbnailOf } from './templateParts.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The collection screen: search, filters, a list that is a table, grouped, or cards, a bar that appears when rows are selected, and a footer for paging.
9
+ * Search, sort, page and selection live in the address, so a link shares the list as it is. On a phone the table becomes cards.
10
+ */ const listScreenTemplate = {
11
+ name: 'ListScreen',
12
+ fitsSlot: 'content',
13
+ slots: [
14
+ {
15
+ name: 'header'
16
+ },
17
+ {
18
+ name: 'toolbar'
19
+ },
20
+ {
21
+ name: 'filters'
22
+ },
23
+ {
24
+ name: 'list'
25
+ },
26
+ {
27
+ name: 'bulkBar'
28
+ },
29
+ {
30
+ name: 'footer'
31
+ }
32
+ ],
33
+ arrangement: {
34
+ root: column([
35
+ slotLeaf('header'),
36
+ row([
37
+ slotLeaf('toolbar')
38
+ ], 8),
39
+ slotLeaf('filters'),
40
+ slotLeaf('bulkBar'),
41
+ slotLeaf('list'),
42
+ slotLeaf('footer')
43
+ ], 12),
44
+ overrides: [
45
+ {
46
+ width: WidthSizeClass.Compact,
47
+ root: column([
48
+ slotLeaf('header'),
49
+ slotLeaf('toolbar'),
50
+ slotLeaf('filters'),
51
+ slotLeaf('bulkBar'),
52
+ slotLeaf('list'),
53
+ slotLeaf('footer')
54
+ ], 16)
55
+ }
56
+ ]
57
+ },
58
+ content: {
59
+ header: [
60
+ component('list-header', 'pageHeader', {
61
+ title: 'Deals',
62
+ subtitle: 'Every open and closed deal'
63
+ })
64
+ ],
65
+ toolbar: [
66
+ component('list-search', 'globalSearch', {
67
+ placeholder: 'Search deals',
68
+ label: 'Search deals',
69
+ urlKey: 'dealsq'
70
+ }),
71
+ component('list-views', 'savedViewsMenu', {
72
+ views: fromQuery('DealViews'),
73
+ savePermission: 'enabled',
74
+ managePermission: 'enabled'
75
+ }),
76
+ component('list-columns', 'columnChooser', {
77
+ columns: fromQuery('DealColumnChoices')
78
+ })
79
+ ],
80
+ filters: [
81
+ component('list-filter', 'filterBuilder', {
82
+ fields: fromQuery('DealFilterFields')
83
+ })
84
+ ],
85
+ list: [
86
+ component('list-records', 'dataList', {
87
+ label: 'Deals',
88
+ rows: fromQuery('Deals'),
89
+ columns: fromQuery('DealColumns'),
90
+ titleField: 'name',
91
+ selectionMode: 'multiple',
92
+ pageSize: 10,
93
+ rowActions: [
94
+ 'Open',
95
+ 'Archive'
96
+ ],
97
+ urlKey: 'deals'
98
+ })
99
+ ],
100
+ bulkBar: [
101
+ component('list-bulk', 'bulkBar', {
102
+ selection: fromQuery('DealSelection'),
103
+ actions: [
104
+ 'Assign',
105
+ 'Archive'
106
+ ]
107
+ })
108
+ ],
109
+ footer: []
110
+ },
111
+ displayName: 'List',
112
+ description: 'A searchable, filterable collection that is a table, grouped or cards, with a bulk bar for selected rows.',
113
+ metadata: {
114
+ ...foundationTemplateProvenance,
115
+ type: 'List',
116
+ category: 'Foundation / List',
117
+ thumbnail: thumbnailOf('ListScreen')
118
+ }
119
+ };
120
+
121
+ export { listScreenTemplate };
122
+ //# sourceMappingURL=listScreenTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listScreenTemplate.js","sources":["../../../../foundation/templates/listScreenTemplate.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 { column, grid, row, slotLeaf } from '../../layouts/flowBuilders';\nimport { component, foundationTemplateProvenance, fromQuery, thumbnailOf } from './templateParts';\n\n/**\n * The collection screen: search, filters, a list that is a table, grouped, or cards, a bar that appears when rows are selected, and a footer for paging.\n * Search, sort, page and selection live in the address, so a link shares the list as it is. On a phone the table becomes cards.\n */\nexport const listScreenTemplate: ScreenTemplate = {\n name: 'ListScreen',\n fitsSlot: 'content',\n slots: [{ name: 'header' }, { name: 'toolbar' }, { name: 'filters' }, { name: 'list' }, { name: 'bulkBar' }, { name: 'footer' }],\n arrangement: {\n root: column([slotLeaf('header'), row([slotLeaf('toolbar')], 8), slotLeaf('filters'), slotLeaf('bulkBar'), slotLeaf('list'), slotLeaf('footer')], 12),\n overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('header'), slotLeaf('toolbar'), slotLeaf('filters'), slotLeaf('bulkBar'), slotLeaf('list'), slotLeaf('footer')], 16) }],\n },\n content: {\n header: [component('list-header', 'pageHeader', { title: 'Deals', subtitle: 'Every open and closed deal' })],\n toolbar: [\n component('list-search', 'globalSearch', { placeholder: 'Search deals', label: 'Search deals', urlKey: 'dealsq' }),\n component('list-views', 'savedViewsMenu', { views: fromQuery('DealViews'), savePermission: 'enabled', managePermission: 'enabled' }),\n component('list-columns', 'columnChooser', { columns: fromQuery('DealColumnChoices') }),\n ],\n filters: [component('list-filter', 'filterBuilder', { fields: fromQuery('DealFilterFields') })],\n list: [component('list-records', 'dataList', {\n label: 'Deals', rows: fromQuery('Deals'), columns: fromQuery('DealColumns'), titleField: 'name', selectionMode: 'multiple', pageSize: 10, rowActions: ['Open', 'Archive'], urlKey: 'deals',\n })],\n bulkBar: [component('list-bulk', 'bulkBar', { selection: fromQuery('DealSelection'), actions: ['Assign', 'Archive'] })],\n footer: [],\n },\n displayName: 'List',\n description: 'A searchable, filterable collection that is a table, grouped or cards, with a bulk bar for selected rows.',\n metadata: { ...foundationTemplateProvenance, type: 'List', category: 'Foundation / List', thumbnail: thumbnailOf('ListScreen') },\n};\n"],"names":["listScreenTemplate","name","fitsSlot","slots","arrangement","root","column","slotLeaf","row","overrides","width","WidthSizeClass","Compact","content","header","component","title","subtitle","toolbar","placeholder","label","urlKey","views","fromQuery","savePermission","managePermission","columns","filters","fields","list","rows","titleField","selectionMode","pageSize","rowActions","bulkBar","selection","actions","footer","displayName","description","metadata","foundationTemplateProvenance","type","category","thumbnail","thumbnailOf"],"mappings":";;;;AAAA;AACA;AAMA;;;UAIaA,kBAAAA,GAAqC;IAC9CC,IAAAA,EAAM,YAAA;IACNC,QAAAA,EAAU,SAAA;IACVC,KAAAA,EAAO;AAAC,QAAA;YAAEF,IAAAA,EAAM;AAAS,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAO,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAS;AAAE,KAAA;IAChIG,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;YAACC,QAAAA,CAAS,QAAA,CAAA;YAAWC,GAAAA,CAAI;gBAACD,QAAAA,CAAS,SAAA;aAAW,EAAE,CAAA,CAAA;YAAIA,QAAAA,CAAS,SAAA,CAAA;YAAYA,QAAAA,CAAS,SAAA,CAAA;YAAYA,QAAAA,CAAS,MAAA,CAAA;YAASA,QAAAA,CAAS,QAAA;SAAU,EAAE,EAAA,CAAA;QAClJE,SAAAA,EAAW;AAAC,YAAA;AAAEC,gBAAAA,KAAAA,EAAOC,eAAeC,OAAO;AAAEP,gBAAAA,IAAAA,EAAMC,MAAAA,CAAO;oBAACC,QAAAA,CAAS,QAAA,CAAA;oBAAWA,QAAAA,CAAS,SAAA,CAAA;oBAAYA,QAAAA,CAAS,SAAA,CAAA;oBAAYA,QAAAA,CAAS,SAAA,CAAA;oBAAYA,QAAAA,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;AACvL,aAAA;AAAG,SAAA;QACHc,OAAAA,EAAS;AAACpB,YAAAA,SAAAA,CAAU,aAAa,SAAA,EAAW;AAAEqB,gBAAAA,SAAAA,EAAWb,SAAAA,CAAU,eAAA,CAAA;gBAAkBc,OAAAA,EAAS;AAAC,oBAAA,QAAA;AAAU,oBAAA;AAAU;AAAC,aAAA;AAAG,SAAA;AACvHC,QAAAA,MAAAA,EAAQ;AACZ,KAAA;IACAC,WAAAA,EAAa,MAAA;IACbC,WAAAA,EAAa,2GAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,4BAA4B;QAAEC,IAAAA,EAAM,MAAA;QAAQC,QAAAA,EAAU,mBAAA;AAAqBC,QAAAA,SAAAA,EAAWC,WAAAA,CAAY,YAAA;AAAc;AACnI;;"}
@@ -0,0 +1,3 @@
1
+ import { ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const masterDetailScreenTemplate: ScreenTemplate;
3
+ //# sourceMappingURL=masterDetailScreenTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masterDetailScreenTemplate.d.ts","sourceRoot":"","sources":["../../../../foundation/templates/masterDetailScreenTemplate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AAQrE,eAAO,MAAM,0BAA0B,EAAE,cAgBxC,CAAC"}
@@ -0,0 +1,77 @@
1
+ import { WidthSizeClass } from '@cratis/scene.model';
2
+ import { column, slotLeaf, grid } from '../../layouts/flowBuilders.js';
3
+ import { component, fromQuery, foundationTemplateProvenance, thumbnailOf } from './templateParts.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The master/detail: a list beside the selected record. The selection lives in the address, so a link opens a record and the back button returns to the
9
+ * list; on a phone the two become a navigation stack - the list, then the record with a way back. It lives in a module workspace's `moduleContent`.
10
+ */ const masterDetailScreenTemplate = {
11
+ name: 'MasterDetailScreen',
12
+ fitsSlot: 'WorkspaceScreen.moduleContent',
13
+ slots: [
14
+ {
15
+ name: 'list'
16
+ },
17
+ {
18
+ name: 'details'
19
+ }
20
+ ],
21
+ arrangement: {
22
+ root: grid([
23
+ slotLeaf('list'),
24
+ slotLeaf('details', {
25
+ span: 2
26
+ })
27
+ ], 3, 16),
28
+ overrides: [
29
+ {
30
+ width: WidthSizeClass.Compact,
31
+ root: column([
32
+ slotLeaf('list'),
33
+ slotLeaf('details')
34
+ ], 16)
35
+ }
36
+ ]
37
+ },
38
+ content: {
39
+ list: [
40
+ component('md-list', 'dataList', {
41
+ label: 'Accounts',
42
+ rows: fromQuery('Deals'),
43
+ columns: fromQuery('DealColumns'),
44
+ titleField: 'name',
45
+ selectionMode: 'single',
46
+ urlKey: 'md'
47
+ })
48
+ ],
49
+ details: [
50
+ component('md-detail', 'tabSet', {
51
+ tabs: fromQuery('RecordTabs'),
52
+ urlKey: 'mdtab',
53
+ label: 'Account'
54
+ })
55
+ ]
56
+ },
57
+ displayName: 'Master/detail with address selection',
58
+ description: 'A list beside the selected record that stacks into a navigation stack on a phone.',
59
+ outlets: [
60
+ {
61
+ name: 'master-detail.detail',
62
+ description: 'The selected record.',
63
+ accepts: [
64
+ 'Detail'
65
+ ]
66
+ }
67
+ ],
68
+ metadata: {
69
+ ...foundationTemplateProvenance,
70
+ type: 'Workspace',
71
+ category: 'Foundation / Workspace',
72
+ thumbnail: thumbnailOf('MasterDetailScreen')
73
+ }
74
+ };
75
+
76
+ export { masterDetailScreenTemplate };
77
+ //# sourceMappingURL=masterDetailScreenTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"masterDetailScreenTemplate.js","sources":["../../../../foundation/templates/masterDetailScreenTemplate.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 { column, grid, row, slotLeaf } from '../../layouts/flowBuilders';\nimport { component, foundationTemplateProvenance, fromQuery, thumbnailOf } from './templateParts';\n\n/**\n * The master/detail: a list beside the selected record. The selection lives in the address, so a link opens a record and the back button returns to the\n * list; on a phone the two become a navigation stack - the list, then the record with a way back. It lives in a module workspace's `moduleContent`.\n */\nexport const masterDetailScreenTemplate: ScreenTemplate = {\n name: 'MasterDetailScreen',\n fitsSlot: 'WorkspaceScreen.moduleContent',\n slots: [{ name: 'list' }, { name: 'details' }],\n arrangement: {\n root: grid([slotLeaf('list'), slotLeaf('details', { span: 2 })], 3, 16),\n overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('list'), slotLeaf('details')], 16) }],\n },\n content: {\n list: [component('md-list', 'dataList', { label: 'Accounts', rows: fromQuery('Deals'), columns: fromQuery('DealColumns'), titleField: 'name', selectionMode: 'single', urlKey: 'md' })],\n details: [component('md-detail', 'tabSet', { tabs: fromQuery('RecordTabs'), urlKey: 'mdtab', label: 'Account' })],\n },\n displayName: 'Master/detail with address selection',\n description: 'A list beside the selected record that stacks into a navigation stack on a phone.',\n outlets: [{ name: 'master-detail.detail', description: 'The selected record.', accepts: ['Detail'] }],\n metadata: { ...foundationTemplateProvenance, type: 'Workspace', category: 'Foundation / Workspace', thumbnail: thumbnailOf('MasterDetailScreen') },\n};\n"],"names":["masterDetailScreenTemplate","name","fitsSlot","slots","arrangement","root","grid","slotLeaf","span","overrides","width","WidthSizeClass","Compact","column","content","list","component","label","rows","fromQuery","columns","titleField","selectionMode","urlKey","details","tabs","displayName","description","outlets","accepts","metadata","foundationTemplateProvenance","type","category","thumbnail","thumbnailOf"],"mappings":";;;;AAAA;AACA;AAMA;;;UAIaA,0BAAAA,GAA6C;IACtDC,IAAAA,EAAM,oBAAA;IACNC,QAAAA,EAAU,+BAAA;IACVC,KAAAA,EAAO;AAAC,QAAA;YAAEF,IAAAA,EAAM;AAAO,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU;AAAE,KAAA;IAC9CG,WAAA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EAAU,wBAAA;AAA0BC,QAAAA,SAAAA,EAAWC,WAAAA,CAAY,oBAAA;AAAsB;AACrJ;;"}
@@ -0,0 +1,3 @@
1
+ import { ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const recordPageTemplate: ScreenTemplate;
3
+ //# sourceMappingURL=recordPageTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordPageTemplate.d.ts","sourceRoot":"","sources":["../../../../foundation/templates/recordPageTemplate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AAQrE,eAAO,MAAM,kBAAkB,EAAE,cAwBhC,CAAC"}
@@ -0,0 +1,135 @@
1
+ import { WidthSizeClass } from '@cratis/scene.model';
2
+ import { column, slotLeaf, grid } from '../../layouts/flowBuilders.js';
3
+ import { component, fromQuery, foundationTemplateProvenance, thumbnailOf } from './templateParts.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The record page: a header, the key facts, then tabs (overview, related, files, history) with the record's main content, its related records and its
9
+ * activity, and an aside. The tabs are configurable by changing one property.
10
+ */ const recordPageTemplate = {
11
+ name: 'RecordPage',
12
+ fitsSlot: 'content',
13
+ slots: [
14
+ {
15
+ name: 'header'
16
+ },
17
+ {
18
+ name: 'summary'
19
+ },
20
+ {
21
+ name: 'tabs'
22
+ },
23
+ {
24
+ name: 'main'
25
+ },
26
+ {
27
+ name: 'related'
28
+ },
29
+ {
30
+ name: 'activity'
31
+ },
32
+ {
33
+ name: 'aside'
34
+ }
35
+ ],
36
+ arrangement: {
37
+ root: column([
38
+ slotLeaf('header'),
39
+ slotLeaf('summary'),
40
+ grid([
41
+ column([
42
+ slotLeaf('tabs'),
43
+ slotLeaf('main'),
44
+ slotLeaf('related'),
45
+ slotLeaf('activity')
46
+ ], 16, {
47
+ span: 2
48
+ }),
49
+ slotLeaf('aside')
50
+ ], 3, 16)
51
+ ], 16),
52
+ overrides: [
53
+ {
54
+ width: WidthSizeClass.Compact,
55
+ root: column([
56
+ slotLeaf('header'),
57
+ slotLeaf('summary'),
58
+ slotLeaf('tabs'),
59
+ slotLeaf('main'),
60
+ slotLeaf('related'),
61
+ slotLeaf('activity'),
62
+ slotLeaf('aside')
63
+ ], 16)
64
+ }
65
+ ]
66
+ },
67
+ content: {
68
+ header: [
69
+ component('record-header', 'pageHeader', {
70
+ title: fromQuery('RecordValues', '0.name'),
71
+ subtitle: 'Account'
72
+ })
73
+ ],
74
+ summary: [
75
+ component('record-value', 'statCard', {
76
+ label: 'Lifetime value',
77
+ value: fromQuery('Kpis', '0.value'),
78
+ format: 'currency',
79
+ currency: 'USD'
80
+ }),
81
+ component('record-status', 'statusChip', {
82
+ status: fromQuery('Deals', '0.status'),
83
+ tone: 'info'
84
+ }),
85
+ component('record-people', 'avatarStack', {
86
+ people: fromQuery('People')
87
+ })
88
+ ],
89
+ tabs: [
90
+ component('record-tabs', 'tabSet', {
91
+ tabs: fromQuery('RecordTabs'),
92
+ urlKey: 'tab',
93
+ label: 'Record sections'
94
+ })
95
+ ],
96
+ main: [
97
+ component('record-form', 'formScreenBody', {
98
+ mode: 'readOnly',
99
+ sections: fromQuery('RecordSections'),
100
+ values: fromQuery('RecordValues', '0')
101
+ })
102
+ ],
103
+ related: [
104
+ component('record-related', 'dataList', {
105
+ label: 'Related deals',
106
+ rows: fromQuery('Deals'),
107
+ columns: fromQuery('DealColumns'),
108
+ titleField: 'name',
109
+ pageSize: 5
110
+ })
111
+ ],
112
+ activity: [
113
+ component('record-activity', 'activityFeed', {
114
+ label: 'History',
115
+ entries: fromQuery('Activity')
116
+ })
117
+ ],
118
+ aside: [
119
+ component('record-checklist', 'checklistSection', {
120
+ sections: fromQuery('Checklist')
121
+ })
122
+ ]
123
+ },
124
+ displayName: 'Record page',
125
+ description: 'One record: its key facts, tabbed sections, related records and history.',
126
+ metadata: {
127
+ ...foundationTemplateProvenance,
128
+ type: 'Detail',
129
+ category: 'Foundation / Detail',
130
+ thumbnail: thumbnailOf('RecordPage')
131
+ }
132
+ };
133
+
134
+ export { recordPageTemplate };
135
+ //# sourceMappingURL=recordPageTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordPageTemplate.js","sources":["../../../../foundation/templates/recordPageTemplate.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 { column, grid, row, slotLeaf } from '../../layouts/flowBuilders';\nimport { component, foundationTemplateProvenance, fromQuery, thumbnailOf } from './templateParts';\n\n/**\n * The record page: a header, the key facts, then tabs (overview, related, files, history) with the record's main content, its related records and its\n * activity, and an aside. The tabs are configurable by changing one property.\n */\nexport const recordPageTemplate: ScreenTemplate = {\n name: 'RecordPage',\n fitsSlot: 'content',\n slots: [{ name: 'header' }, { name: 'summary' }, { name: 'tabs' }, { name: 'main' }, { name: 'related' }, { name: 'activity' }, { name: 'aside' }],\n arrangement: {\n root: column([slotLeaf('header'), slotLeaf('summary'), grid([column([slotLeaf('tabs'), slotLeaf('main'), slotLeaf('related'), slotLeaf('activity')], 16, { span: 2 }), slotLeaf('aside')], 3, 16)], 16),\n overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('header'), slotLeaf('summary'), slotLeaf('tabs'), slotLeaf('main'), slotLeaf('related'), slotLeaf('activity'), slotLeaf('aside')], 16) }],\n },\n content: {\n header: [component('record-header', 'pageHeader', { title: fromQuery('RecordValues', '0.name'), subtitle: 'Account' })],\n summary: [\n component('record-value', 'statCard', { label: 'Lifetime value', value: fromQuery('Kpis', '0.value'), format: 'currency', currency: 'USD' }),\n component('record-status', 'statusChip', { status: fromQuery('Deals', '0.status'), tone: 'info' }),\n component('record-people', 'avatarStack', { people: fromQuery('People') }),\n ],\n tabs: [component('record-tabs', 'tabSet', { tabs: fromQuery('RecordTabs'), urlKey: 'tab', label: 'Record sections' })],\n main: [component('record-form', 'formScreenBody', { mode: 'readOnly', sections: fromQuery('RecordSections'), values: fromQuery('RecordValues', '0') })],\n related: [component('record-related', 'dataList', { label: 'Related deals', rows: fromQuery('Deals'), columns: fromQuery('DealColumns'), titleField: 'name', pageSize: 5 })],\n activity: [component('record-activity', 'activityFeed', { label: 'History', entries: fromQuery('Activity') })],\n aside: [component('record-checklist', 'checklistSection', { sections: fromQuery('Checklist') })],\n },\n displayName: 'Record page',\n description: 'One record: its key facts, tabbed sections, related records and history.',\n metadata: { ...foundationTemplateProvenance, type: 'Detail', category: 'Foundation / Detail', thumbnail: thumbnailOf('RecordPage') },\n};\n"],"names":["recordPageTemplate","name","fitsSlot","slots","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","header","component","title","fromQuery","subtitle","summary","label","value","format","currency","status","tone","people","tabs","urlKey","main","mode","sections","values","related","rows","columns","titleField","pageSize","activity","entries","aside","displayName","description","metadata","foundationTemplateProvenance","type","category","thumbnail","thumbnailOf"],"mappings":";;;;AAAA;AACA;AAMA;;;UAIaA,kBAAAA,GAAqC;IAC9CC,IAAAA,EAAM,YAAA;IACNC,QAAAA,EAAU,SAAA;IACVC,KAAAA,EAAO;AAAC,QAAA;YAAEF,IAAAA,EAAM;AAAS,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAO,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAO,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAW,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAQ;AAAE,KAAA;IAClJG,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,MAAAA,CAAO;YAACC,QAAAA,CAAS,QAAA,CAAA;YAAWA,QAAAA,CAAS,SAAA,CAAA;YAAYC,IAAAA,CA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bC,WAAAA,EAAa,0EAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,4BAA4B;QAAEC,IAAAA,EAAM,QAAA;QAAUC,QAAAA,EAAU,qBAAA;AAAuBC,QAAAA,SAAAA,EAAWC,WAAAA,CAAY,YAAA;AAAc;AACvI;;"}
@@ -0,0 +1,6 @@
1
+ import { BindingExpression, ExternalComponent, SceneElement, TemplateMetadata } from '@cratis/scene.model';
2
+ export declare const foundationTemplateProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'>;
3
+ export declare const thumbnailOf: (templateName: string) => string;
4
+ export declare const fromQuery: (query: string, path?: string) => BindingExpression;
5
+ export declare const component: (id: string, componentName: string, properties?: Record<string, unknown>, slots?: Record<string, SceneElement[]>) => ExternalComponent;
6
+ //# sourceMappingURL=templateParts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateParts.d.ts","sourceRoot":"","sources":["../../../../foundation/templates/templateParts.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAqB,iBAAiB,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAQ9H,eAAO,MAAM,4BAA4B,EAAE,IAAI,CAAC,gBAAgB,EAAE,eAAe,GAAG,aAAa,GAAG,SAAS,GAAG,YAAY,CAK3H,CAAC;AAGF,eAAO,MAAM,WAAW,iBAAkB,MAAM,KAAG,MAA0C,CAAC;AAM9F,eAAO,MAAM,SAAS,UAAW,MAAM,oBAAc,iBAA2E,CAAC;AAGjI,eAAO,MAAM,SAAS,OAAQ,MAAM,iBAAiB,MAAM,eAAc,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,UAAc,MAAM,CAAC,MAAM,EAAE,YAAY,EAAE,CAAC,KAAQ,iBACzF,CAAC"}
@@ -0,0 +1,33 @@
1
+ import { BindingSourceKind } from '@cratis/scene.model';
2
+ import { externalComponent } from '../../gallery/elements.js';
3
+ import { defaultBlueprintTemplateProvenance } from '../../templateProvenance.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The provenance every foundation template carries. The foundation components draw themselves with no component library, so unlike the earlier
9
+ * gallery templates these require no PrimeReact or Cratis.Components: a host with only this blueprint renders them.
10
+ */ const foundationTemplateProvenance = {
11
+ compatibility: {
12
+ scene: defaultBlueprintTemplateProvenance.compatibility.scene
13
+ },
14
+ attribution: {
15
+ author: 'Cratis',
16
+ url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.default'
17
+ },
18
+ license: 'MIT',
19
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
20
+ };
21
+ /** The package-relative thumbnail path of a foundation template. */ const thumbnailOf = (templateName)=>`thumbnails/${templateName}.svg`;
22
+ /**
23
+ * A property taken from a query result - never a value. A template declares *where* its data comes from and the sample-data pack, or the real
24
+ * query, supplies the rows (spec SD1); `path` reaches into the result (`0.value` is the first row's `value`, an empty path is the whole result).
25
+ */ const fromQuery = (query, path = '')=>({
26
+ kind: BindingSourceKind.QueryResult,
27
+ query,
28
+ path
29
+ });
30
+ /** A component of this blueprint, by its bare name, with its properties and slot content. */ const component = (id, componentName, properties = {}, slots = {})=>externalComponent(id, componentName, properties, slots);
31
+
32
+ export { component, foundationTemplateProvenance, fromQuery, thumbnailOf };
33
+ //# sourceMappingURL=templateParts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"templateParts.js","sources":["../../../../foundation/templates/templateParts.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 { BindingExpression, BindingSourceKind, ExternalComponent, SceneElement, TemplateMetadata } from '@cratis/scene.model';\nimport { externalComponent } from '../../gallery/elements';\nimport { defaultBlueprintTemplateProvenance } from '../../templateProvenance';\n\n/**\n * The provenance every foundation template carries. The foundation components draw themselves with no component library, so unlike the earlier\n * gallery templates these require no PrimeReact or Cratis.Components: a host with only this blueprint renders them.\n */\nexport const foundationTemplateProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'> = {\n compatibility: { scene: defaultBlueprintTemplateProvenance.compatibility!.scene },\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/** The package-relative thumbnail path of a foundation template. */\nexport const thumbnailOf = (templateName: string): string => `thumbnails/${templateName}.svg`;\n\n/**\n * A property taken from a query result - never a value. A template declares *where* its data comes from and the sample-data pack, or the real\n * query, supplies the rows (spec SD1); `path` reaches into the result (`0.value` is the first row's `value`, an empty path is the whole result).\n */\nexport const fromQuery = (query: string, path = ''): BindingExpression => ({ kind: BindingSourceKind.QueryResult, query, path });\n\n/** A component of this blueprint, by its bare name, with its properties and slot content. */\nexport const component = (id: string, componentName: string, properties: Record<string, unknown> = {}, slots: Record<string, SceneElement[]> = {}): ExternalComponent =>\n externalComponent(id, componentName, properties, slots);\n"],"names":["foundationTemplateProvenance","compatibility","scene","defaultBlueprintTemplateProvenance","attribution","author","url","license","licenseUrl","thumbnailOf","templateName","fromQuery","query","path","kind","BindingSourceKind","QueryResult","component","id","componentName","properties","slots","externalComponent"],"mappings":";;;;AAAA;AACA;AAMA;;;UAIaA,4BAAAA,GAAmH;IAC5HC,aAAAA,EAAe;QAAEC,KAAAA,EAAOC,kCAAAA,CAAmCF,aAAa,CAAEC;AAAM,KAAA;IAChFE,WAAAA,EAAa;QAAEC,MAAAA,EAAQ,QAAA;QAAUC,GAAAA,EAAK;AAAgF,KAAA;IACtHC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;AAEA,qEACO,MAAMC,WAAAA,GAAc,CAACC,YAAAA,GAAiC,CAAC,WAAW,EAAEA,YAAAA,CAAa,IAAI;AAE5F;;;UAIaC,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,kBAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,8FACO,MAAMI,YAAY,CAACC,EAAAA,EAAYC,eAAuBC,UAAAA,GAAsC,EAAE,EAAEC,KAAAA,GAAwC,EAAE,GAC7IC,kBAAkBJ,EAAAA,EAAIC,aAAAA,EAAeC,YAAYC,KAAAA;;"}
@@ -0,0 +1,3 @@
1
+ import { ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const wizardScreenTemplate: ScreenTemplate;
3
+ //# sourceMappingURL=wizardScreenTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizardScreenTemplate.d.ts","sourceRoot":"","sources":["../../../../foundation/templates/wizardScreenTemplate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AAQrE,eAAO,MAAM,oBAAoB,EAAE,cAqBlC,CAAC"}
@@ -0,0 +1,93 @@
1
+ import { WidthSizeClass } from '@cratis/scene.model';
2
+ import { column, slotLeaf } from '../../layouts/flowBuilders.js';
3
+ import { component, fromQuery, foundationTemplateProvenance, thumbnailOf } from './templateParts.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * The wizard: linear steps with a progress list, Back and Next, and a save-draft. The last step is the review. Where the person has got to survives a refresh,
9
+ * and a refresh can never land past a step that was not done. The content of each step is the slot named by its id.
10
+ */ const wizardScreenTemplate = {
11
+ name: 'WizardScreen',
12
+ fitsSlot: 'content',
13
+ slots: [
14
+ {
15
+ name: 'header'
16
+ },
17
+ {
18
+ name: 'progress'
19
+ },
20
+ {
21
+ name: 'step'
22
+ },
23
+ {
24
+ name: 'actions'
25
+ }
26
+ ],
27
+ arrangement: {
28
+ root: column([
29
+ slotLeaf('header'),
30
+ slotLeaf('progress'),
31
+ slotLeaf('step'),
32
+ slotLeaf('actions')
33
+ ], 16),
34
+ overrides: [
35
+ {
36
+ width: WidthSizeClass.Compact,
37
+ root: column([
38
+ slotLeaf('header'),
39
+ slotLeaf('progress'),
40
+ slotLeaf('step'),
41
+ slotLeaf('actions')
42
+ ], 16)
43
+ }
44
+ ]
45
+ },
46
+ content: {
47
+ header: [
48
+ component('wizard-header', 'pageHeader', {
49
+ title: 'New account',
50
+ subtitle: 'Three short steps'
51
+ })
52
+ ],
53
+ progress: [
54
+ component('wizard-progress', 'wizardProgress', {
55
+ steps: fromQuery('WizardSteps'),
56
+ urlKey: 'step'
57
+ }, {
58
+ details: [
59
+ component('wizard-details', 'formScreenBody', {
60
+ mode: 'create',
61
+ sections: fromQuery('RecordSections'),
62
+ values: fromQuery('RecordValues', '0')
63
+ })
64
+ ],
65
+ people: [
66
+ component('wizard-people', 'avatarStack', {
67
+ people: fromQuery('People')
68
+ })
69
+ ],
70
+ review: [
71
+ component('wizard-review', 'formScreenBody', {
72
+ mode: 'readOnly',
73
+ sections: fromQuery('RecordSections'),
74
+ values: fromQuery('RecordValues', '0')
75
+ })
76
+ ]
77
+ })
78
+ ],
79
+ step: [],
80
+ actions: []
81
+ },
82
+ displayName: 'Wizard',
83
+ description: 'Linear steps with progress, back and next, a saved draft and a review step.',
84
+ metadata: {
85
+ ...foundationTemplateProvenance,
86
+ type: 'Wizard',
87
+ category: 'Foundation / Wizard',
88
+ thumbnail: thumbnailOf('WizardScreen')
89
+ }
90
+ };
91
+
92
+ export { wizardScreenTemplate };
93
+ //# sourceMappingURL=wizardScreenTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"wizardScreenTemplate.js","sources":["../../../../foundation/templates/wizardScreenTemplate.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 { column, grid, row, slotLeaf } from '../../layouts/flowBuilders';\nimport { component, foundationTemplateProvenance, fromQuery, thumbnailOf } from './templateParts';\n\n/**\n * The wizard: linear steps with a progress list, Back and Next, and a save-draft. The last step is the review. Where the person has got to survives a refresh,\n * and a refresh can never land past a step that was not done. The content of each step is the slot named by its id.\n */\nexport const wizardScreenTemplate: ScreenTemplate = {\n name: 'WizardScreen',\n fitsSlot: 'content',\n slots: [{ name: 'header' }, { name: 'progress' }, { name: 'step' }, { name: 'actions' }],\n arrangement: {\n root: column([slotLeaf('header'), slotLeaf('progress'), slotLeaf('step'), slotLeaf('actions')], 16),\n overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('header'), slotLeaf('progress'), slotLeaf('step'), slotLeaf('actions')], 16) }],\n },\n content: {\n header: [component('wizard-header', 'pageHeader', { title: 'New account', subtitle: 'Three short steps' })],\n progress: [component('wizard-progress', 'wizardProgress', { steps: fromQuery('WizardSteps'), urlKey: 'step' }, {\n details: [component('wizard-details', 'formScreenBody', { mode: 'create', sections: fromQuery('RecordSections'), values: fromQuery('RecordValues', '0') })],\n people: [component('wizard-people', 'avatarStack', { people: fromQuery('People') })],\n review: [component('wizard-review', 'formScreenBody', { mode: 'readOnly', sections: fromQuery('RecordSections'), values: fromQuery('RecordValues', '0') })],\n })],\n step: [],\n actions: [],\n },\n displayName: 'Wizard',\n description: 'Linear steps with progress, back and next, a saved draft and a review step.',\n metadata: { ...foundationTemplateProvenance, type: 'Wizard', category: 'Foundation / Wizard', thumbnail: thumbnailOf('WizardScreen') },\n};\n"],"names":["wizardScreenTemplate","name","fitsSlot","slots","arrangement","root","column","slotLeaf","overrides","width","WidthSizeClass","Compact","content","header","component","title","subtitle","progress","steps","fromQuery","urlKey","details","mode","sections","values","people","review","step","actions","displayName","description","metadata","foundationTemplateProvenance","type","category","thumbnail","thumbnailOf"],"mappings":";;;;AAAA;AACA;AAMA;;;UAIaA,oBAAAA,GAAuC;IAChDC,IAAAA,EAAM,cAAA;IACNC,QAAAA,EAAU,SAAA;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B,GAAA;AAAK,qBAAA;AAAG,iBAAA;gBAC3JM,MAAAA,EAAQ;AAACX,oBAAAA,SAAAA,CAAU,iBAAiB,aAAA,EAAe;AAAEW,wBAAAA,MAAAA,EAAQN,SAAAA,CAAU,QAAA;AAAU,qBAAA;AAAG,iBAAA;gBACpFO,MAAAA,EAAQ;AAACZ,oBAAAA,SAAAA,CAAU,iBAAiB,gBAAA,EAAkB;wBAAEQ,IAAAA,EAAM,UAAA;AAAYC,wBAAAA,QAAAA,EAAUJ,SAAAA,CAAU,gBAAA,CAAA;AAAmBK,wBAAAA,MAAAA,EAAQL,UAAU,cAAA,EAAgB,GAAA;AAAK,qBAAA;AAAG;AAC/J,aAAA;AAAG,SAAA;AACHQ,QAAAA,IAAAA,EAAM,EAAE;AACRC,QAAAA,OAAAA,EAAS;AACb,KAAA;IACAC,WAAAA,EAAa,QAAA;IACbC,WAAAA,EAAa,6EAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,4BAA4B;QAAEC,IAAAA,EAAM,QAAA;QAAUC,QAAAA,EAAU,qBAAA;AAAuBC,QAAAA,SAAAA,EAAWC,WAAAA,CAAY,cAAA;AAAgB;AACzI;;"}
@@ -0,0 +1,3 @@
1
+ import { ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const workspaceScreenTemplate: ScreenTemplate;
3
+ //# sourceMappingURL=workspaceScreenTemplate.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspaceScreenTemplate.d.ts","sourceRoot":"","sources":["../../../../foundation/templates/workspaceScreenTemplate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAkB,MAAM,qBAAqB,CAAC;AAQrE,eAAO,MAAM,uBAAuB,EAAE,cAerC,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { WidthSizeClass } from '@cratis/scene.model';
2
+ import { column, slotLeaf, grid } from '../../layouts/flowBuilders.js';
3
+ import { component, fromQuery, foundationTemplateProvenance, thumbnailOf } from './templateParts.js';
4
+
5
+ // Copyright (c) Cratis. All rights reserved.
6
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
7
+ /**
8
+ * A module's own workspace: its sections beside the content of the section in force. The sections are the module's sub-navigation (a left rail that
9
+ * becomes tabs on a phone); the section in force is kept in the address, so a deep link or a refresh restores it. Feature screens go in `moduleContent`.
10
+ */ const workspaceScreenTemplate = {
11
+ name: 'WorkspaceScreen',
12
+ fitsSlot: 'content',
13
+ slots: [
14
+ {
15
+ name: 'moduleNav'
16
+ },
17
+ {
18
+ name: 'moduleContent'
19
+ }
20
+ ],
21
+ arrangement: {
22
+ root: grid([
23
+ slotLeaf('moduleNav'),
24
+ slotLeaf('moduleContent', {
25
+ span: 3
26
+ })
27
+ ], 4, 16),
28
+ overrides: [
29
+ {
30
+ width: WidthSizeClass.Compact,
31
+ root: column([
32
+ slotLeaf('moduleNav'),
33
+ slotLeaf('moduleContent')
34
+ ], 16)
35
+ }
36
+ ]
37
+ },
38
+ content: {
39
+ moduleNav: [
40
+ component('workspace-sections', 'subNavigation', {
41
+ items: fromQuery('ModuleSections'),
42
+ orientation: 'vertical',
43
+ urlKey: 'section',
44
+ label: 'Module sections'
45
+ })
46
+ ],
47
+ moduleContent: []
48
+ },
49
+ displayName: 'Module workspace',
50
+ description: 'A module\'s sections beside the content of the section that is open.',
51
+ metadata: {
52
+ ...foundationTemplateProvenance,
53
+ type: 'Workspace',
54
+ category: 'Foundation / Workspace',
55
+ thumbnail: thumbnailOf('WorkspaceScreen')
56
+ }
57
+ };
58
+
59
+ export { workspaceScreenTemplate };
60
+ //# sourceMappingURL=workspaceScreenTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspaceScreenTemplate.js","sources":["../../../../foundation/templates/workspaceScreenTemplate.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 { column, grid, row, slotLeaf } from '../../layouts/flowBuilders';\nimport { component, foundationTemplateProvenance, fromQuery, thumbnailOf } from './templateParts';\n\n/**\n * A module's own workspace: its sections beside the content of the section in force. The sections are the module's sub-navigation (a left rail that\n * becomes tabs on a phone); the section in force is kept in the address, so a deep link or a refresh restores it. Feature screens go in `moduleContent`.\n */\nexport const workspaceScreenTemplate: ScreenTemplate = {\n name: 'WorkspaceScreen',\n fitsSlot: 'content',\n slots: [{ name: 'moduleNav' }, { name: 'moduleContent' }],\n arrangement: {\n root: grid([slotLeaf('moduleNav'), slotLeaf('moduleContent', { span: 3 })], 4, 16),\n overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('moduleNav'), slotLeaf('moduleContent')], 16) }],\n },\n content: {\n moduleNav: [component('workspace-sections', 'subNavigation', { items: fromQuery('ModuleSections'), orientation: 'vertical', urlKey: 'section', label: 'Module sections' })],\n moduleContent: [],\n },\n displayName: 'Module workspace',\n description: 'A module\\'s sections beside the content of the section that is open.',\n metadata: { ...foundationTemplateProvenance, type: 'Workspace', category: 'Foundation / Workspace', thumbnail: thumbnailOf('WorkspaceScreen') },\n};\n"],"names":["workspaceScreenTemplate","name","fitsSlot","slots","arrangement","root","grid","slotLeaf","span","overrides","width","WidthSizeClass","Compact","column","content","moduleNav","component","items","fromQuery","orientation","urlKey","label","moduleContent","displayName","description","metadata","foundationTemplateProvenance","type","category","thumbnail","thumbnailOf"],"mappings":";;;;AAAA;AACA;AAMA;;;UAIaA,uBAAAA,GAA0C;IACnDC,IAAAA,EAAM,iBAAA;IACNC,QAAAA,EAAU,SAAA;IACVC,KAAAA,EAAO;AAAC,QAAA;YAAEF,IAAAA,EAAM;AAAY,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAgB;AAAE,KAAA;IACzDG,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,IAAAA,CAAK;YAACC,QAAAA,CAAS,WAAA,CAAA;AAAcA,YAAAA,QAAAA,CAAS,eAAA,EAAiB;gBAAEC,IAAAA,EAAM;AAAE,aAAA;AAAG,SAAA,EAAE,CAAA,EAAG,EAAA,CAAA;QAC/EC,SAAAA,EAAW;AAAC,YAAA;AAAEC,gBAAAA,KAAAA,EAAOC,eAAeC,OAAO;AAAEP,gBAAAA,IAAAA,EAAMQ,MAAAA,CAAO;oBAACN,QAAAA,CAAS,WAAA,CAAA;oBAAcA,QAAAA,CAAS,eAAA;iBAAiB,EAAE,EAAA;AAAI;AAAE;AACxH,KAAA;IACAO,OAAAA,EAAS;QACLC,SAAAA,EAAW;AAACC,YAAAA,SAAAA,CAAU,sBAAsB,eAAA,EAAiB;AAAEC,gBAAAA,KAAAA,EAAOC,SAAAA,CAAU,gBAAA,CAAA;gBAAmBC,WAAAA,EAAa,UAAA;gBAAYC,MAAAA,EAAQ,SAAA;gBAAWC,KAAAA,EAAO;AAAkB,aAAA;AAAG,SAAA;AAC3KC,QAAAA,aAAAA,EAAe;AACnB,KAAA;IACAC,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa,sEAAA;IACbC,QAAAA,EAAU;AAAE,QAAA,GAAGC,4BAA4B;QAAEC,IAAAA,EAAM,WAAA;QAAaC,QAAAA,EAAU,wBAAA;AAA0BC,QAAAA,SAAAA,EAAWC,WAAAA,CAAY,iBAAA;AAAmB;AAClJ;;"}