@cratis/scene.blueprint.vendors 0.0.0-stage → 4.71.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 (132) hide show
  1. package/README.md +66 -2
  2. package/blueprint.ts +16 -0
  3. package/blueprintCatalog.json +107 -0
  4. package/dist/cjs/blueprint.js +19 -0
  5. package/dist/cjs/blueprint.js.map +1 -0
  6. package/dist/cjs/index.js +68 -0
  7. package/dist/cjs/index.js.map +1 -0
  8. package/dist/cjs/manifest.js +87 -0
  9. package/dist/cjs/manifest.js.map +1 -0
  10. package/dist/cjs/navigation.js +109 -0
  11. package/dist/cjs/navigation.js.map +1 -0
  12. package/dist/cjs/package.json +3 -0
  13. package/dist/cjs/packageName.js +8 -0
  14. package/dist/cjs/packageName.js.map +1 -0
  15. package/dist/cjs/screens/index.js +22 -0
  16. package/dist/cjs/screens/index.js.map +1 -0
  17. package/dist/cjs/templateProvenance.js +24 -0
  18. package/dist/cjs/templateProvenance.js.map +1 -0
  19. package/dist/cjs/templates/boardTemplate.js +78 -0
  20. package/dist/cjs/templates/boardTemplate.js.map +1 -0
  21. package/dist/cjs/templates/dashboardTemplates.js +151 -0
  22. package/dist/cjs/templates/dashboardTemplates.js.map +1 -0
  23. package/dist/cjs/templates/formTemplates.js +50 -0
  24. package/dist/cjs/templates/formTemplates.js.map +1 -0
  25. package/dist/cjs/templates/index.js +25 -0
  26. package/dist/cjs/templates/index.js.map +1 -0
  27. package/dist/cjs/templates/listTemplates.js +145 -0
  28. package/dist/cjs/templates/listTemplates.js.map +1 -0
  29. package/dist/cjs/templates/recordTemplates.js +135 -0
  30. package/dist/cjs/templates/recordTemplates.js.map +1 -0
  31. package/dist/cjs/vendorsApplication.js +49 -0
  32. package/dist/cjs/vendorsApplication.js.map +1 -0
  33. package/dist/cjs/vendorsParts.js +151 -0
  34. package/dist/cjs/vendorsParts.js.map +1 -0
  35. package/dist/cjs/vendorsQueries.js +64 -0
  36. package/dist/cjs/vendorsQueries.js.map +1 -0
  37. package/dist/cjs/vendorsScreenSet.js +40 -0
  38. package/dist/cjs/vendorsScreenSet.js.map +1 -0
  39. package/dist/esm/blueprint.d.ts +3 -0
  40. package/dist/esm/blueprint.d.ts.map +1 -0
  41. package/dist/esm/blueprint.js +17 -0
  42. package/dist/esm/blueprint.js.map +1 -0
  43. package/dist/esm/index.d.ts +12 -0
  44. package/dist/esm/index.d.ts.map +1 -0
  45. package/dist/esm/index.js +18 -0
  46. package/dist/esm/index.js.map +1 -0
  47. package/dist/esm/manifest.d.ts +3 -0
  48. package/dist/esm/manifest.d.ts.map +1 -0
  49. package/dist/esm/manifest.js +85 -0
  50. package/dist/esm/manifest.js.map +1 -0
  51. package/dist/esm/navigation.d.ts +5 -0
  52. package/dist/esm/navigation.d.ts.map +1 -0
  53. package/dist/esm/navigation.js +105 -0
  54. package/dist/esm/navigation.js.map +1 -0
  55. package/dist/esm/package.json +3 -0
  56. package/dist/esm/packageName.d.ts +2 -0
  57. package/dist/esm/packageName.d.ts.map +1 -0
  58. package/dist/esm/packageName.js +6 -0
  59. package/dist/esm/packageName.js.map +1 -0
  60. package/dist/esm/screens/index.d.ts +3 -0
  61. package/dist/esm/screens/index.d.ts.map +1 -0
  62. package/dist/esm/screens/index.js +20 -0
  63. package/dist/esm/screens/index.js.map +1 -0
  64. package/dist/esm/templateProvenance.d.ts +3 -0
  65. package/dist/esm/templateProvenance.d.ts.map +1 -0
  66. package/dist/esm/templateProvenance.js +22 -0
  67. package/dist/esm/templateProvenance.js.map +1 -0
  68. package/dist/esm/templates/boardTemplate.d.ts +3 -0
  69. package/dist/esm/templates/boardTemplate.d.ts.map +1 -0
  70. package/dist/esm/templates/boardTemplate.js +76 -0
  71. package/dist/esm/templates/boardTemplate.js.map +1 -0
  72. package/dist/esm/templates/dashboardTemplates.d.ts +3 -0
  73. package/dist/esm/templates/dashboardTemplates.d.ts.map +1 -0
  74. package/dist/esm/templates/dashboardTemplates.js +149 -0
  75. package/dist/esm/templates/dashboardTemplates.js.map +1 -0
  76. package/dist/esm/templates/formTemplates.d.ts +3 -0
  77. package/dist/esm/templates/formTemplates.d.ts.map +1 -0
  78. package/dist/esm/templates/formTemplates.js +48 -0
  79. package/dist/esm/templates/formTemplates.js.map +1 -0
  80. package/dist/esm/templates/index.d.ts +8 -0
  81. package/dist/esm/templates/index.d.ts.map +1 -0
  82. package/dist/esm/templates/index.js +17 -0
  83. package/dist/esm/templates/index.js.map +1 -0
  84. package/dist/esm/templates/listTemplates.d.ts +3 -0
  85. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  86. package/dist/esm/templates/listTemplates.js +143 -0
  87. package/dist/esm/templates/listTemplates.js.map +1 -0
  88. package/dist/esm/templates/recordTemplates.d.ts +3 -0
  89. package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
  90. package/dist/esm/templates/recordTemplates.js +133 -0
  91. package/dist/esm/templates/recordTemplates.js.map +1 -0
  92. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  93. package/dist/esm/vendorsApplication.d.ts +10 -0
  94. package/dist/esm/vendorsApplication.d.ts.map +1 -0
  95. package/dist/esm/vendorsApplication.js +44 -0
  96. package/dist/esm/vendorsApplication.js.map +1 -0
  97. package/dist/esm/vendorsParts.d.ts +16 -0
  98. package/dist/esm/vendorsParts.d.ts.map +1 -0
  99. package/dist/esm/vendorsParts.js +133 -0
  100. package/dist/esm/vendorsParts.js.map +1 -0
  101. package/dist/esm/vendorsQueries.d.ts +38 -0
  102. package/dist/esm/vendorsQueries.d.ts.map +1 -0
  103. package/dist/esm/vendorsQueries.js +56 -0
  104. package/dist/esm/vendorsQueries.js.map +1 -0
  105. package/dist/esm/vendorsScreenSet.d.ts +7 -0
  106. package/dist/esm/vendorsScreenSet.d.ts.map +1 -0
  107. package/dist/esm/vendorsScreenSet.js +38 -0
  108. package/dist/esm/vendorsScreenSet.js.map +1 -0
  109. package/index.ts +14 -0
  110. package/manifest.ts +41 -0
  111. package/navigation.ts +53 -0
  112. package/package.json +78 -4
  113. package/packageName.ts +5 -0
  114. package/sampleData/vendors-en.json +863 -0
  115. package/screens/index.ts +20 -0
  116. package/templateProvenance.ts +15 -0
  117. package/templates/boardTemplate.ts +54 -0
  118. package/templates/dashboardTemplates.ts +76 -0
  119. package/templates/formTemplates.ts +33 -0
  120. package/templates/index.ts +18 -0
  121. package/templates/listTemplates.ts +96 -0
  122. package/templates/recordTemplates.ts +78 -0
  123. package/thumbnails/VendorPage.svg +17 -0
  124. package/thumbnails/VendorsList.svg +29 -0
  125. package/thumbnails/VendorsOnboardingBoard.svg +23 -0
  126. package/thumbnails/VendorsPerformance.svg +15 -0
  127. package/thumbnails/VendorsQuickCreateVendor.svg +12 -0
  128. package/thumbnails/vendors.svg +14 -0
  129. package/vendorsApplication.ts +28 -0
  130. package/vendorsParts.ts +58 -0
  131. package/vendorsQueries.ts +56 -0
  132. package/vendorsScreenSet.ts +21 -0
@@ -0,0 +1,78 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var vendorsQueries = require('../vendorsQueries.js');
6
+ var vendorsParts = require('../vendorsParts.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ /**
11
+ * One board: the foundation `BoardScreen` with a column for each step and a card for each record. A card moves to another step by dragging or by its own Move-to menu,
12
+ * and a column says in words when its limit is exceeded.
13
+ */ function boardOf(options) {
14
+ const id = options.name;
15
+ return {
16
+ name: options.name,
17
+ fitsSlot: 'content',
18
+ slots: scene_blueprint_default.boardScreenTemplate.slots,
19
+ arrangement: scene_blueprint_default.boardScreenTemplate.arrangement,
20
+ content: {
21
+ header: [
22
+ scene_blueprint_default.component(`${id}-header`, 'pageHeader', {
23
+ title: options.title,
24
+ subtitle: options.subtitle
25
+ }, {
26
+ actions: [
27
+ vendorsParts.withBehaviors(vendorsParts.actionButton(`${id}-new`, options.primary.label, 'primary'), vendorsParts.opensDialog(options.primary.dialog))
28
+ ]
29
+ })
30
+ ],
31
+ toolbar: [
32
+ scene_blueprint_default.component(`${id}-search`, 'globalSearch', {
33
+ placeholder: options.searchLabel,
34
+ label: options.searchLabel
35
+ }),
36
+ scene_blueprint_default.component(`${id}-views`, 'savedViewsMenu', {
37
+ views: vendorsQueries.fromQuery(vendorsQueries.vendorsQueriesOf(options.entity).views),
38
+ savePermission: 'enabled',
39
+ managePermission: 'enabled'
40
+ })
41
+ ],
42
+ board: [
43
+ scene_blueprint_default.component(`${id}-columns`, 'kanbanBoard', {
44
+ columns: vendorsQueries.fromQuery(options.columns),
45
+ cards: vendorsQueries.fromQuery(options.cards),
46
+ editPermission: 'enabled',
47
+ label: options.label,
48
+ ...vendorsQueries.localeOfData
49
+ })
50
+ ]
51
+ },
52
+ displayName: options.displayName,
53
+ description: options.description,
54
+ metadata: vendorsParts.vendorsMetadata(options.name, 'Board', [
55
+ scene_model.TemplateScope.Module,
56
+ scene_model.TemplateScope.Feature
57
+ ])
58
+ };
59
+ }
60
+ /** The onboarding board: a column for each step a vendor goes through and a card for each vendor with its category and country. */ const vendorsOnboardingTemplate = boardOf({
61
+ name: 'VendorsOnboardingBoard',
62
+ displayName: 'Vendors onboarding board',
63
+ description: 'Vendors as cards in a column for each onboarding step, moved by dragging or by menu.',
64
+ title: 'Onboarding',
65
+ subtitle: 'Drag a vendor to its next step',
66
+ searchLabel: 'Search the board',
67
+ label: 'Vendors by onboarding step',
68
+ entity: vendorsQueries.VendorsEntityKind.Vendor,
69
+ columns: vendorsQueries.VendorsQuery.OnboardingColumns,
70
+ cards: vendorsQueries.VendorsQuery.OnboardingCards,
71
+ primary: {
72
+ label: 'New vendor',
73
+ dialog: 'VendorsQuickCreateVendor'
74
+ }
75
+ });
76
+
77
+ exports.vendorsOnboardingTemplate = vendorsOnboardingTemplate;
78
+ //# sourceMappingURL=boardTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boardTemplate.js","sources":["../../../templates/boardTemplate.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, TemplateScope } from '@cratis/scene.model';\nimport { boardScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { VendorsEntityKind, VendorsQuery, fromQuery, localeOfData, vendorsQueriesOf } from '../vendorsQueries';\nimport { actionButton, component, vendorsMetadata, opensDialog, withBehaviors } from '../vendorsParts';\n\ninterface BoardOptions {\n name: string;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n label: string;\n entity: VendorsEntityKind;\n columns: string;\n cards: string;\n primary: { label: string; dialog: string };\n}\n\n/**\n * One board: the foundation `BoardScreen` with a column for each step and a card for each record. A card moves to another step by dragging or by its own Move-to menu,\n * and a column says in words when its limit is exceeded.\n */\nfunction boardOf(options: BoardOptions): ScreenTemplate {\n const id = options.name;\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: boardScreenTemplate.slots,\n arrangement: boardScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, {\n actions: [withBehaviors(actionButton(`${id}-new`, options.primary.label, 'primary'), opensDialog(options.primary.dialog))],\n })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(vendorsQueriesOf(options.entity).views), savePermission: 'enabled', managePermission: 'enabled' }),\n ],\n board: [component(`${id}-columns`, 'kanbanBoard', { columns: fromQuery(options.columns), cards: fromQuery(options.cards), editPermission: 'enabled', label: options.label, ...localeOfData })],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: vendorsMetadata(options.name, 'Board', [TemplateScope.Module, TemplateScope.Feature]),\n };\n}\n\n/** The onboarding board: a column for each step a vendor goes through and a card for each vendor with its category and country. */\nexport const vendorsOnboardingTemplate = boardOf({\n name: 'VendorsOnboardingBoard', displayName: 'Vendors onboarding board', description: 'Vendors as cards in a column for each onboarding step, moved by dragging or by menu.', title: 'Onboarding', subtitle: 'Drag a vendor to its next step', searchLabel: 'Search the board', label: 'Vendors by onboarding step',\n entity: VendorsEntityKind.Vendor, columns: VendorsQuery.OnboardingColumns, cards: VendorsQuery.OnboardingCards, primary: { label: 'New vendor', dialog: 'VendorsQuickCreateVendor' },\n});\n"],"names":["boardOf","options","id","name","fitsSlot","slots","boardScreenTemplate","arrangement","content","header","component","title","subtitle","actions","withBehaviors","actionButton","primary","label","opensDialog","dialog","toolbar","placeholder","searchLabel","views","fromQuery","vendorsQueriesOf","entity","savePermission","managePermission","board","columns","cards","editPermission","localeOfData","displayName","description","metadata","vendorsMetadata","TemplateScope","Module","Feature","vendorsOnboardingTemplate","VendorsEntityKind","Vendor","VendorsQuery","OnboardingColumns","OnboardingCards"],"mappings":";;;;;;;AAAA;AACA;AAqBA;;;IAIA,SAASA,QAAQC,OAAqB,EAAA;IAClC,MAAMC,EAAAA,GAAKD,QAAQE,IAAI;IACvB,OAAO;AACHA,QAAAA,IAAAA,EAAMF,QAAQE,IAAI;QAClBC,QAAAA,EAAU,SAAA;AACVC,QAAAA,KAAAA,EAAOC,4CAAoBD,KAAK;AAChCE,QAAAA,WAAAA,EAAaD,4CAAoBC,WAAW;QAC5CC,OAAAA,EAAS;YACLC,MAAAA,EAAQ;AAACC,gBAAAA,iCAAAA,CAAU,CAAA,EAAGR,EAAAA,CAAG,OAAO,CAAC,EAAE,YAAA,EAAc;AAAES,oBAAAA,KAAAA,EAAOV,QAAQU,KAAK;AAAEC,oBAAAA,QAAAA,EAAUX,QAAQW;iBAAS,EAAG;oBACnGC,OAAAA,EAAS;AAACC,wBAAAA,0BAAAA,CAAcC,0BAAa,CAAA,EAAGb,EAAAA,CAAG,IAAI,CAAC,EAAED,OAAAA,CAAQe,OAAO,CAACC,KAAK,EAAE,SAAA,CAAA,EAAYC,wBAAAA,CAAYjB,OAAAA,CAA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AAA,EAAM,wBAAA;IAA0B+B,WAAAA,EAAa,0BAAA;IAA4BC,WAAAA,EAAa,sFAAA;IAAwFxB,KAAAA,EAAO,YAAA;IAAcC,QAAAA,EAAU,gCAAA;IAAkCU,WAAAA,EAAa,kBAAA;IAAoBL,KAAAA,EAAO,4BAAA;AACvRS,IAAAA,MAAAA,EAAQgB,iCAAkBC,MAAM;AAAEb,IAAAA,OAAAA,EAASc,4BAAaC,iBAAiB;AAAEd,IAAAA,KAAAA,EAAOa,4BAAaE,eAAe;IAAE9B,OAAAA,EAAS;QAAEC,KAAAA,EAAO,YAAA;QAAcE,MAAAA,EAAQ;AAA2B;AACvL,CAAA;;"}
@@ -0,0 +1,151 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var vendorsQueries = require('../vendorsQueries.js');
6
+ var vendorsParts = require('../vendorsParts.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ /**
11
+ * One dashboard: the foundation `DashboardScreen` - key figures over two charts, a table beneath and a list beside - with every region its own component with its own
12
+ * loading, empty and error states, so one failed query leaves the others on the page.
13
+ */ function dashboardOf(options) {
14
+ const id = options.name;
15
+ return {
16
+ name: options.name,
17
+ fitsSlot: 'content',
18
+ slots: scene_blueprint_default.dashboardScreenTemplate.slots,
19
+ arrangement: scene_blueprint_default.dashboardScreenTemplate.arrangement,
20
+ content: {
21
+ header: [
22
+ scene_blueprint_default.component(`${id}-header`, 'pageHeader', {
23
+ title: options.title,
24
+ subtitle: options.subtitle
25
+ }, {
26
+ actions: options.actions.map((action)=>vendorsParts.withBehaviors(vendorsParts.actionButton(`${id}-${action.id}`, action.label, action.emphasis), action.dialog ? vendorsParts.opensDialog(action.dialog) : vendorsParts.goesTo(action.screen)))
27
+ })
28
+ ],
29
+ kpis: options.figures.map((figure)=>scene_blueprint_default.component(`${id}-${figure.id}`, 'statCard', {
30
+ label: figure.label,
31
+ value: vendorsQueries.fromQuery(figure.query, `${figure.index}.value`),
32
+ change: vendorsQueries.fromQuery(figure.query, `${figure.index}.change`),
33
+ comparison: figure.comparison,
34
+ ...figure.format ? {
35
+ format: figure.format
36
+ } : {},
37
+ ...figure.fractionDigits === undefined ? {} : {
38
+ fractionDigits: figure.fractionDigits
39
+ },
40
+ ...figure.goodDirection ? {
41
+ goodDirection: figure.goodDirection
42
+ } : {},
43
+ ...vendorsQueries.currencyOfData
44
+ })),
45
+ charts: options.charts.map((chart)=>scene_blueprint_default.component(`${id}-${chart.id}`, 'chartWrapper', {
46
+ title: chart.title,
47
+ kind: chart.kind,
48
+ categories: vendorsQueries.fromQuery(chart.query, '0.categories'),
49
+ series: vendorsQueries.fromQuery(chart.query, '0.series'),
50
+ ...vendorsQueries.localeOfData
51
+ })),
52
+ tables: [
53
+ scene_blueprint_default.component(`${id}-table`, 'dataList', {
54
+ label: options.table.label,
55
+ rows: vendorsQueries.fromQuery(options.table.rows),
56
+ columns: vendorsQueries.fromQuery(options.table.columns),
57
+ titleField: options.table.titleField,
58
+ pageSize: options.table.pageSize,
59
+ ...vendorsQueries.localeOfData
60
+ })
61
+ ],
62
+ aside: [
63
+ options.aside.kind === 'activity' ? scene_blueprint_default.component(`${id}-aside`, 'activityFeed', {
64
+ label: options.aside.label,
65
+ entries: vendorsQueries.fromQuery(options.aside.query),
66
+ ...vendorsQueries.localeOfData
67
+ }) : scene_blueprint_default.component(`${id}-aside`, 'checklistSection', {
68
+ label: options.aside.label,
69
+ sections: vendorsQueries.fromQuery(options.aside.query),
70
+ ...vendorsQueries.localeOfData
71
+ })
72
+ ]
73
+ },
74
+ displayName: options.displayName,
75
+ description: options.description,
76
+ metadata: vendorsParts.vendorsMetadata(options.name, 'Dashboard', [
77
+ scene_model.TemplateScope.Module,
78
+ scene_model.TemplateScope.Feature
79
+ ])
80
+ };
81
+ }
82
+ /** The performance dashboard: three key figures over two charts - spend by category and on-time delivery - with the vendors beneath and the latest activity beside them. */ const vendorsPerformanceTemplate = dashboardOf({
83
+ name: 'VendorsPerformance',
84
+ displayName: 'Vendors performance',
85
+ description: 'Active vendors, spend this year, on-time delivery, spend by category, delivery over the quarters and the vendors to watch.',
86
+ title: 'Vendor performance',
87
+ subtitle: 'Spend and delivery this year',
88
+ figures: [
89
+ {
90
+ id: 'active',
91
+ label: 'Active vendors',
92
+ query: vendorsQueries.VendorsQuery.Kpis,
93
+ index: 0,
94
+ comparison: 'last year'
95
+ },
96
+ {
97
+ id: 'spend',
98
+ label: 'Spend this year',
99
+ query: vendorsQueries.VendorsQuery.Kpis,
100
+ index: 1,
101
+ format: 'currency',
102
+ fractionDigits: 0,
103
+ comparison: 'last year'
104
+ },
105
+ {
106
+ id: 'ontime',
107
+ label: 'On-time delivery',
108
+ query: vendorsQueries.VendorsQuery.Kpis,
109
+ index: 2,
110
+ format: 'percent',
111
+ comparison: 'last quarter'
112
+ }
113
+ ],
114
+ charts: [
115
+ {
116
+ id: 'spend-chart',
117
+ title: 'Spend by category',
118
+ kind: 'bar',
119
+ query: vendorsQueries.VendorsQuery.SpendByCategory
120
+ },
121
+ {
122
+ id: 'ontime-chart',
123
+ title: 'On-time delivery',
124
+ kind: 'line',
125
+ query: vendorsQueries.VendorsQuery.OnTimeDelivery
126
+ }
127
+ ],
128
+ table: {
129
+ label: 'Vendors',
130
+ titleField: 'name',
131
+ pageSize: 5,
132
+ rows: vendorsQueries.vendorsQueriesOf(vendorsQueries.VendorsEntityKind.Vendor).rows,
133
+ columns: vendorsQueries.vendorsQueriesOf(vendorsQueries.VendorsEntityKind.Vendor).columns
134
+ },
135
+ aside: {
136
+ kind: 'activity',
137
+ label: 'Latest activity',
138
+ query: vendorsQueries.VendorsQuery.Activity
139
+ },
140
+ actions: [
141
+ {
142
+ id: 'vendors',
143
+ label: 'Open the vendors',
144
+ emphasis: 'secondary',
145
+ screen: 'vendors.list'
146
+ }
147
+ ]
148
+ });
149
+
150
+ exports.vendorsPerformanceTemplate = vendorsPerformanceTemplate;
151
+ //# sourceMappingURL=dashboardTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dashboardTemplates.js","sources":["../../../templates/dashboardTemplates.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, TemplateScope } from '@cratis/scene.model';\nimport { dashboardScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { VendorsEntityKind, VendorsQuery, currencyOfData, fromQuery, localeOfData, vendorsQueriesOf } from '../vendorsQueries';\nimport { actionButton, component, goesTo, vendorsMetadata, opensDialog, withBehaviors } from '../vendorsParts';\n\ninterface KeyFigure { id: string; label: string; query: string; index: number; format?: 'currency' | 'percent'; fractionDigits?: number; goodDirection?: 'up' | 'down'; comparison: string }\ninterface Chart { id: string; title: string; kind: 'bar' | 'line' | 'donut' | 'funnel'; query: string }\ninterface Action { id: string; label: string; emphasis: 'primary' | 'secondary' | 'quiet' | 'danger'; dialog?: string; screen?: string }\n\ninterface DashboardOptions {\n name: string;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n figures: KeyFigure[];\n charts: Chart[];\n table: { label: string; rows: string; columns: string; titleField: string; pageSize: number };\n aside: { kind: 'activity'; label: string; query: string } | { kind: 'checklist'; label: string; query: string };\n actions: Action[];\n}\n\n/**\n * One dashboard: the foundation `DashboardScreen` - key figures over two charts, a table beneath and a list beside - with every region its own component with its own\n * loading, empty and error states, so one failed query leaves the others on the page.\n */\nfunction dashboardOf(options: DashboardOptions): ScreenTemplate {\n const id = options.name;\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: dashboardScreenTemplate.slots,\n arrangement: dashboardScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, {\n actions: options.actions.map(action => withBehaviors(actionButton(`${id}-${action.id}`, action.label, action.emphasis), action.dialog ? opensDialog(action.dialog) : goesTo(action.screen!))),\n })],\n kpis: options.figures.map(figure => component(`${id}-${figure.id}`, 'statCard', {\n label: figure.label, value: fromQuery(figure.query, `${figure.index}.value`), change: fromQuery(figure.query, `${figure.index}.change`), comparison: figure.comparison,\n ...(figure.format ? { format: figure.format } : {}), ...(figure.fractionDigits === undefined ? {} : { fractionDigits: figure.fractionDigits }), ...(figure.goodDirection ? { goodDirection: figure.goodDirection } : {}), ...currencyOfData,\n })),\n charts: options.charts.map(chart => component(`${id}-${chart.id}`, 'chartWrapper', {\n title: chart.title, kind: chart.kind, categories: fromQuery(chart.query, '0.categories'), series: fromQuery(chart.query, '0.series'), ...localeOfData,\n })),\n tables: [component(`${id}-table`, 'dataList', {\n label: options.table.label, rows: fromQuery(options.table.rows), columns: fromQuery(options.table.columns), titleField: options.table.titleField, pageSize: options.table.pageSize, ...localeOfData,\n })],\n aside: [options.aside.kind === 'activity'\n ? component(`${id}-aside`, 'activityFeed', { label: options.aside.label, entries: fromQuery(options.aside.query), ...localeOfData })\n : component(`${id}-aside`, 'checklistSection', { label: options.aside.label, sections: fromQuery(options.aside.query), ...localeOfData })],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: vendorsMetadata(options.name, 'Dashboard', [TemplateScope.Module, TemplateScope.Feature]),\n };\n}\n\n/** The performance dashboard: three key figures over two charts - spend by category and on-time delivery - with the vendors beneath and the latest activity beside them. */\nexport const vendorsPerformanceTemplate = dashboardOf({\n name: 'VendorsPerformance', displayName: 'Vendors performance', description: 'Active vendors, spend this year, on-time delivery, spend by category, delivery over the quarters and the vendors to watch.', title: 'Vendor performance', subtitle: 'Spend and delivery this year',\n figures: [\n { id: 'active', label: 'Active vendors', query: VendorsQuery.Kpis, index: 0, comparison: 'last year' },\n { id: 'spend', label: 'Spend this year', query: VendorsQuery.Kpis, index: 1, format: 'currency', fractionDigits: 0, comparison: 'last year' },\n { id: 'ontime', label: 'On-time delivery', query: VendorsQuery.Kpis, index: 2, format: 'percent', comparison: 'last quarter' },\n ],\n charts: [\n { id: 'spend-chart', title: 'Spend by category', kind: 'bar', query: VendorsQuery.SpendByCategory },\n { id: 'ontime-chart', title: 'On-time delivery', kind: 'line', query: VendorsQuery.OnTimeDelivery },\n ],\n table: { label: 'Vendors', titleField: 'name', pageSize: 5, rows: vendorsQueriesOf(VendorsEntityKind.Vendor).rows, columns: vendorsQueriesOf(VendorsEntityKind.Vendor).columns },\n aside: { kind: 'activity', label: 'Latest activity', query: VendorsQuery.Activity },\n actions: [{ id: 'vendors', label: 'Open the vendors', emphasis: 'secondary', screen: 'vendors.list' }],\n});\n"],"names":["dashboardOf","options","id","name","fitsSlot","slots","dashboardScreenTemplate","arrangement","content","header","component","title","subtitle","actions","map","action","withBehaviors","actionButton","label","emphasis","dialog","opensDialog","goesTo","screen","kpis","figures","figure","value","fromQuery","query","index","change","comparison","format","fractionDigits","undefined","goodDirection","currencyOfData","charts","chart","kind","categories","series","localeOfData","tables","table","rows","columns","titleField","pageSize","aside","entries","sections","displayName","description","metadata","vendorsMetadata","TemplateScope","Module","Feature","vendorsPerformanceTemplate","VendorsQuery","Kpis","SpendByCategory","OnTimeDelivery","vendorsQueriesOf","VendorsEntityKind","Vendor","Activity"],"mappings":";;;;;;;AAAA;AACA;AAwBA;;;IAIA,SAASA,YAAYC,OAAyB,EAAA;IAC1C,MAAMC,EAAAA,GAAKD,QAAQE,IAAI;IACvB,OAAO;AACHA,QAAAA,IAAAA,EAAMF,QAAQE,IAAI;QAClBC,QAAAA,EAAU,SAAA;AACVC,QAAAA,KAAAA,EAAOC,gDAAwBD,KAAK;AACpCE,QAAAA,WAAAA,EAAaD,gDAAwBC,WAAW;QAChDC,OAAAA,EAAS;YACLC,MAAAA,EAAQ;AAACC,gBAAAA,iCAAAA,CAAU,CAAA,EAAGR,EAAAA,CAAG,OAAO,CAAC,EAAE,YAAA,EAAc;AAAES,oBAAAA,KAAAA,EAAOV,QAAQU,KAAK;AAAEC,oBAAAA,QAAAA,EAAUX,QAAQW;iBAAS,EAAG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
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var vendorsQueries = require('../vendorsQueries.js');
6
+ var vendorsParts = require('../vendorsParts.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ /**
11
+ * One quick-create dialog: the foundation `QuickCreateDialog` - a short form opened from a page to make one record without leaving it - with the fields
12
+ * that thing needs to get started.
13
+ */ function quickCreateOf(name, title, sections, noun, submit) {
14
+ return {
15
+ name,
16
+ slots: scene_blueprint_default.quickCreateDialogTemplate.slots,
17
+ content: {
18
+ header: [
19
+ scene_blueprint_default.component(`${name}-frame`, 'dialogFrame', {
20
+ title,
21
+ subtitle: 'Only what is needed to get started'
22
+ })
23
+ ],
24
+ body: [
25
+ vendorsParts.withBehaviors(scene_blueprint_default.component(`${name}-form`, 'formScreenBody', {
26
+ mode: 'create',
27
+ saveAndNew: false,
28
+ strings: {
29
+ formSave: submit
30
+ },
31
+ sections: vendorsQueries.fromQuery(sections),
32
+ errors: vendorsQueries.fromQuery(vendorsQueries.VendorsQuery.FormErrors, '0'),
33
+ ...vendorsQueries.localeOfData
34
+ }), vendorsParts.closesDialog())
35
+ ],
36
+ actions: []
37
+ },
38
+ displayName: `Vendors quick create ${noun}`,
39
+ description: `A short form that creates one ${noun} without leaving the page.`,
40
+ metadata: vendorsParts.vendorsMetadata(name, 'Dialog', [
41
+ scene_model.TemplateScope.Slice
42
+ ])
43
+ };
44
+ }
45
+ /** The quick dialogs of the blueprint. */ const vendorsDialogs = [
46
+ quickCreateOf('VendorsQuickCreateVendor', 'New vendor', 'VendorQuickSections', 'vendor', 'Create')
47
+ ];
48
+
49
+ exports.vendorsDialogs = vendorsDialogs;
50
+ //# sourceMappingURL=formTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"formTemplates.js","sources":["../../../templates/formTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { DialogTemplate, TemplateScope } from '@cratis/scene.model';\nimport { quickCreateDialogTemplate } from '@cratis/scene.blueprint.default';\nimport { VendorsQuery, fromQuery, localeOfData } from '../vendorsQueries';\nimport { closesDialog, component, vendorsMetadata, withBehaviors } from '../vendorsParts';\n\n/**\n * One quick-create dialog: the foundation `QuickCreateDialog` - a short form opened from a page to make one record without leaving it - with the fields\n * that thing needs to get started.\n */\nfunction quickCreateOf(name: string, title: string, sections: string, noun: string, submit: string): DialogTemplate {\n return {\n name,\n slots: quickCreateDialogTemplate.slots,\n content: {\n header: [component(`${name}-frame`, 'dialogFrame', { title, subtitle: 'Only what is needed to get started' })],\n body: [withBehaviors(component(`${name}-form`, 'formScreenBody', {\n mode: 'create', saveAndNew: false, strings: { formSave: submit }, sections: fromQuery(sections), errors: fromQuery(VendorsQuery.FormErrors, '0'), ...localeOfData,\n }), closesDialog())],\n actions: [],\n },\n displayName: `Vendors quick create ${noun}`,\n description: `A short form that creates one ${noun} without leaving the page.`,\n metadata: vendorsMetadata(name, 'Dialog', [TemplateScope.Slice]),\n };\n}\n\n/** The quick dialogs of the blueprint. */\nexport const vendorsDialogs: DialogTemplate[] = [\n quickCreateOf('VendorsQuickCreateVendor', 'New vendor', 'VendorQuickSections', 'vendor', 'Create'),\n];\n"],"names":["quickCreateOf","name","title","sections","noun","submit","slots","quickCreateDialogTemplate","content","header","component","subtitle","body","withBehaviors","mode","saveAndNew","strings","formSave","fromQuery","errors","VendorsQuery","FormErrors","localeOfData","closesDialog","actions","displayName","description","metadata","vendorsMetadata","TemplateScope","Slice","vendorsDialogs"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;IAIA,SAASA,aAAAA,CAAcC,IAAY,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,IAAY,EAAEC,MAAc,EAAA;IAC9F,OAAO;AACHJ,QAAAA,IAAAA;AACAK,QAAAA,KAAAA,EAAOC,kDAA0BD,KAAK;QACtCE,OAAAA,EAAS;YACLC,MAAAA,EAAQ;AAACC,gBAAAA,iCAAAA,CAAU,CAAA,EAAGT,IAAAA,CAAK,MAAM,CAAC,EAAE,aAAA,EAAe;AAAEC,oBAAAA,KAAAA;oBAAOS,QAAAA,EAAU;AAAqC,iBAAA;AAAG,aAAA;YAC9GC,IAAAA,EAAM;AAACC,gBAAAA,0BAAAA,CAAcH,kCAAU,CAAA,EAAGT,IAAAA,CAAK,KAAK,CAAC,EAAE,gBAAA,EAAkB;oBAC7Da,IAAAA,EAAM,QAAA;oBAAUC,UAAAA,EAAY,KAAA;oBAAOC,OAAAA,EAAS;wBAAEC,QAAAA,EAAUZ;AAAO,qBAAA;AAAGF,oBAAAA,QAAAA,EAAUe,wBAAAA,CAAUf,QAAAA,CAAAA;oBAAWgB,MAAAA,EAAQD,wBAAAA,CAAUE,2BAAAA,CAAaC,UAAU,EAAE,GAAA,CAAA;AAAM,oBAAA,GAAGC;iBACzJ,CAAA,EAAIC,yBAAAA,EAAAA;AAAgB,aAAA;AACpBC,YAAAA,OAAAA,EAAS;AACb,SAAA;QACAC,WAAAA,EAAa,CAAC,qBAAqB,EAAErB,IAAAA,CAAAA,CAAM;AAC3CsB,QAAAA,WAAAA,EAAa,CAAC,8BAA8B,EAAEtB,IAAAA,CAAK,0BAA0B,CAAC;QAC9EuB,QAAAA,EAAUC,4BAAAA,CAAgB3B,MAAM,QAAA,EAAU;AAAC4B,YAAAA,yBAAAA,CAAcC;AAAM,SAAA;AACnE,KAAA;AACJ;AAEA,2CACO,MAAMC,cAAAA,GAAmC;IAC5C/B,aAAAA,CAAc,0BAAA,EAA4B,YAAA,EAAc,qBAAA,EAAuB,QAAA,EAAU,QAAA;;;"}
@@ -0,0 +1,25 @@
1
+ 'use strict';
2
+
3
+ var listTemplates = require('./listTemplates.js');
4
+ var recordTemplates = require('./recordTemplates.js');
5
+ var boardTemplate = require('./boardTemplate.js');
6
+ var dashboardTemplates = require('./dashboardTemplates.js');
7
+ var formTemplates = require('./formTemplates.js');
8
+
9
+ // Copyright (c) Cratis. All rights reserved.
10
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
11
+ /** Every screen template this blueprint provides, in the order the manifest lists them. */ const vendorsScreenTemplates = [
12
+ listTemplates.vendorsListTemplate,
13
+ recordTemplates.vendorPageTemplate,
14
+ boardTemplate.vendorsOnboardingTemplate,
15
+ dashboardTemplates.vendorsPerformanceTemplate
16
+ ];
17
+
18
+ exports.vendorsListTemplate = listTemplates.vendorsListTemplate;
19
+ exports.vendorPageTemplate = recordTemplates.vendorPageTemplate;
20
+ exports.vendorsOnboardingTemplate = boardTemplate.vendorsOnboardingTemplate;
21
+ exports.vendorsPerformanceTemplate = dashboardTemplates.vendorsPerformanceTemplate;
22
+ exports.vendorsDialogTemplates = formTemplates.vendorsDialogs;
23
+ exports.vendorsDialogs = formTemplates.vendorsDialogs;
24
+ exports.vendorsScreenTemplates = vendorsScreenTemplates;
25
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":["../../../templates/index.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 { vendorsListTemplate } from './listTemplates';\nimport { vendorPageTemplate } from './recordTemplates';\nimport { vendorsOnboardingTemplate } from './boardTemplate';\nimport { vendorsPerformanceTemplate } from './dashboardTemplates';\n\nexport * from './listTemplates';\nexport * from './recordTemplates';\nexport * from './boardTemplate';\nexport * from './dashboardTemplates';\nexport * from './formTemplates';\n\n/** Every screen template this blueprint provides, in the order the manifest lists them. */\nexport const vendorsScreenTemplates = [vendorsListTemplate, vendorPageTemplate, vendorsOnboardingTemplate, vendorsPerformanceTemplate];\n\nexport { vendorsDialogs as vendorsDialogTemplates } from './formTemplates';\n"],"names":["vendorsScreenTemplates","vendorsListTemplate","vendorPageTemplate","vendorsOnboardingTemplate","vendorsPerformanceTemplate"],"mappings":";;;;;;;;AAAA;AACA;AAaA,4FACO,MAAMA,sBAAAA,GAAyB;AAACC,IAAAA,iCAAAA;AAAqBC,IAAAA,kCAAAA;AAAoBC,IAAAA,uCAAAA;AAA2BC,IAAAA;;;;;;;;;"}
@@ -0,0 +1,145 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var vendorsQueries = require('../vendorsQueries.js');
6
+ var vendorsParts = require('../vendorsParts.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ const listScopes = [
11
+ scene_model.TemplateScope.Module,
12
+ scene_model.TemplateScope.Feature
13
+ ];
14
+ /** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */ const exportAction = (id)=>vendorsParts.withBehaviors(vendorsParts.actionButton(id, 'Export', 'secondary'), [
15
+ {
16
+ bindings: [
17
+ {
18
+ trigger: {
19
+ kind: scene_model.InteractionTriggerKind.Click
20
+ },
21
+ actions: [
22
+ {
23
+ kind: scene_model.InteractionActionKind.Notify,
24
+ level: scene_model.NotificationLevel.Info,
25
+ message: {
26
+ text: 'The export has started.'
27
+ }
28
+ }
29
+ ]
30
+ }
31
+ ]
32
+ }
33
+ ]);
34
+ /**
35
+ * One list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and
36
+ * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.
37
+ */ function listTemplateOf(options) {
38
+ const queries = vendorsQueries.vendorsQueriesOf(options.entity);
39
+ const id = options.name;
40
+ const listId = `${id}-records`;
41
+ const primary = vendorsParts.withBehaviors(vendorsParts.actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? vendorsParts.opensDialog(options.primary.dialog) : vendorsParts.goesTo(options.primary.screen));
42
+ const list = scene_blueprint_default.component(listId, 'dataList', {
43
+ label: options.title,
44
+ rows: vendorsQueries.fromQuery(queries.rows),
45
+ columns: vendorsQueries.fromQuery(queries.columns),
46
+ titleField: options.titleField,
47
+ pageSize: options.cards ? 12 : 10,
48
+ urlKey: options.urlKey,
49
+ ...vendorsQueries.localeOfData,
50
+ rowActions: options.rowActions,
51
+ ...options.readOnly ? {} : {
52
+ selectionMode: options.recordScreen || options.recordDialog ? 'single' : 'multiple'
53
+ },
54
+ ...options.cards ? {
55
+ variant: 'cards',
56
+ ...options.cards.imageField ? {
57
+ imageField: options.cards.imageField
58
+ } : {}
59
+ } : {},
60
+ ...options.grouped ? {
61
+ variant: 'grouped',
62
+ groupBy: options.grouped.groupBy
63
+ } : {},
64
+ ...options.toneField ? {
65
+ toneField: options.toneField
66
+ } : {}
67
+ });
68
+ return {
69
+ name: options.name,
70
+ fitsSlot: 'content',
71
+ slots: scene_blueprint_default.listScreenTemplate.slots,
72
+ arrangement: scene_blueprint_default.listScreenTemplate.arrangement,
73
+ content: {
74
+ header: [
75
+ scene_blueprint_default.component(`${id}-header`, 'pageHeader', {
76
+ title: options.title,
77
+ subtitle: options.subtitle
78
+ }, {
79
+ actions: [
80
+ exportAction(`${id}-export`),
81
+ primary
82
+ ]
83
+ })
84
+ ],
85
+ toolbar: [
86
+ scene_blueprint_default.component(`${id}-search`, 'globalSearch', {
87
+ placeholder: options.searchLabel,
88
+ label: options.searchLabel,
89
+ urlKey: `${options.urlKey}q`
90
+ }),
91
+ scene_blueprint_default.component(`${id}-views`, 'savedViewsMenu', {
92
+ views: vendorsQueries.fromQuery(queries.views),
93
+ savePermission: 'enabled',
94
+ managePermission: 'enabled'
95
+ }),
96
+ scene_blueprint_default.component(`${id}-columns`, 'columnChooser', {
97
+ columns: vendorsQueries.fromQuery(queries.columnChoices)
98
+ })
99
+ ],
100
+ filters: [
101
+ scene_blueprint_default.component(`${id}-filter`, 'filterBuilder', {
102
+ fields: vendorsQueries.fromQuery(queries.filterFields),
103
+ ...vendorsQueries.localeOfData
104
+ })
105
+ ],
106
+ list: [
107
+ options.recordScreen ? vendorsParts.withBehaviors(list, vendorsParts.opensRecordOnSelect(listId, options.recordScreen)) : options.recordDialog ? vendorsParts.withBehaviors(list, vendorsParts.opensDialogOnSelect(options.recordDialog)) : list
108
+ ],
109
+ bulkBar: options.recordScreen || options.recordDialog || options.readOnly ? [] : [
110
+ scene_blueprint_default.component(`${id}-bulk`, 'bulkBar', {
111
+ selection: vendorsQueries.fromQuery(queries.selection),
112
+ actions: options.bulkActions
113
+ })
114
+ ],
115
+ footer: []
116
+ },
117
+ displayName: options.displayName,
118
+ description: options.description,
119
+ metadata: vendorsParts.vendorsMetadata(options.name, 'List', listScopes)
120
+ };
121
+ }
122
+ /** The vendors: every vendor with its category, country, spend this year, rating and status. Choosing a vendor opens it. */ const vendorsListTemplate = listTemplateOf({
123
+ name: 'VendorsList',
124
+ entity: vendorsQueries.VendorsEntityKind.Vendor,
125
+ displayName: 'Vendors list',
126
+ description: 'Every vendor with its category, country, spend, rating and status, filtered by category, status, country and account manager.',
127
+ title: 'Vendors',
128
+ subtitle: 'Everyone you buy from',
129
+ searchLabel: 'Search vendors',
130
+ urlKey: 'vendors',
131
+ primary: {
132
+ label: 'New vendor',
133
+ dialog: 'VendorsQuickCreateVendor'
134
+ },
135
+ rowActions: [
136
+ 'Open',
137
+ 'Suspend'
138
+ ],
139
+ bulkActions: [],
140
+ titleField: 'name',
141
+ recordScreen: 'vendors.record'
142
+ });
143
+
144
+ exports.vendorsListTemplate = vendorsListTemplate;
145
+ //# sourceMappingURL=listTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.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 { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { VendorsEntityKind, fromQuery, vendorsQueriesOf, localeOfData } from '../vendorsQueries';\nimport { actionButton, component, goesTo, vendorsMetadata, opensDialog, opensDialogOnSelect, opensRecordOnSelect, withBehaviors } from '../vendorsParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: VendorsEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to. */\n primary: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** The side sheet a chosen row opens instead of a record page; the list then selects one row at a time. */\n recordDialog?: string;\n /** Group the rows (`variant: grouped`) by this field. */\n grouped?: { groupBy: string };\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField?: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = vendorsQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen || options.recordDialog ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', ...(options.cards.imageField ? { imageField: options.cards.imageField } : {}) } : {}),\n ...(options.grouped ? { variant: 'grouped', groupBy: options.grouped.groupBy } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: [exportAction(`${id}-export`), primary] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : options.recordDialog ? withBehaviors(list, opensDialogOnSelect(options.recordDialog)) : list],\n bulkBar: options.recordScreen || options.recordDialog || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: vendorsMetadata(options.name, 'List', listScopes),\n };\n}\n\n\n/** The vendors: every vendor with its category, country, spend this year, rating and status. Choosing a vendor opens it. */\nexport const vendorsListTemplate = listTemplateOf({\n name: 'VendorsList',\n entity: VendorsEntityKind.Vendor, displayName: 'Vendors list', description: 'Every vendor with its category, country, spend, rating and status, filtered by category, status, country and account manager.', title: 'Vendors', subtitle: 'Everyone you buy from', searchLabel: 'Search vendors', urlKey: 'vendors',\n primary: { label: 'New vendor', dialog: 'VendorsQuickCreateVendor' },\n rowActions: ['Open', 'Suspend'], bulkActions: [],\n titleField: 'name', recordScreen: 'vendors.record'\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","vendorsQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","recordDialog","variant","imageField","grouped","groupBy","toneField","fitsSlot","slots","listScreenTemplate","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","opensDialogOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","vendorsMetadata","vendorsListTemplate","VendorsEntityKind","Vendor"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,yBAAAA,CAAcC,MAAM;AAAED,IAAAA,yBAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,0BAAAA,CAAcC,yBAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,mCAAuBC;AAAM,qBAAA;oBAC9CC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,kCAAsBC,MAAM;AAAEC,4BAAAA,KAAAA,EAAOC,8BAAkBC,IAAI;4BAAEC,OAAAA,EAAS;gCAAEC,IAAAA,EAAM;AAA0B;AAAE;A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