@cratis/scene.blueprint.vendors 0.0.0-stage → 4.78.3

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 +69 -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,135 @@
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 record page: the foundation `RecordPage` with the record's own title, its status and key facts at the top, its fields and the lists that belong to it in the
12
+ * main region, and the activity beside it. What it shows is the record the list handed it the id of.
13
+ */ function recordPageOf(options) {
14
+ const queries = vendorsQueries.vendorsQueriesOf(options.entity);
15
+ const id = options.name;
16
+ return {
17
+ name: options.name,
18
+ fitsSlot: 'content',
19
+ slots: scene_blueprint_default.recordPageTemplate.slots,
20
+ arrangement: scene_blueprint_default.recordPageTemplate.arrangement,
21
+ content: {
22
+ header: [
23
+ scene_blueprint_default.component(`${id}-header`, 'pageHeader', {
24
+ title: vendorsQueries.fromQuery(queries.record, `0.${options.titleField}`),
25
+ subtitle: vendorsQueries.fromQuery(queries.record, '0.summary')
26
+ }, {
27
+ actions: [
28
+ vendorsParts.withBehaviors(vendorsParts.actionButton(`${id}-back`, options.backLabel, 'secondary'), vendorsParts.goesTo(options.backScreen)),
29
+ ...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)))
30
+ ]
31
+ })
32
+ ],
33
+ summary: [
34
+ scene_blueprint_default.component(`${id}-status`, 'statusChip', {
35
+ status: vendorsQueries.fromQuery(queries.summary, '0.status'),
36
+ tone: vendorsQueries.fromQuery(queries.summary, '0.tone')
37
+ }),
38
+ ...options.facts.map((fact)=>scene_blueprint_default.component(`${id}-${fact.id}`, 'statCard', {
39
+ label: fact.label,
40
+ value: vendorsQueries.fromQuery(queries.summary, `0.${fact.field}`),
41
+ ...fact.format ? {
42
+ format: fact.format
43
+ } : {},
44
+ ...vendorsQueries.currencyOfData
45
+ }))
46
+ ],
47
+ tabs: [
48
+ scene_blueprint_default.component(`${id}-tabs`, 'tabSet', {
49
+ tabs: vendorsQueries.fromQuery(queries.tabs),
50
+ urlKey: 'tab',
51
+ label: `${options.displayName} sections`
52
+ })
53
+ ],
54
+ main: [
55
+ scene_blueprint_default.component(`${id}-form`, 'formScreenBody', {
56
+ mode: 'readOnly',
57
+ sections: vendorsQueries.fromQuery(queries.sections),
58
+ values: vendorsQueries.fromQuery(queries.record, '0'),
59
+ ...vendorsQueries.currencyOfData
60
+ }),
61
+ ...options.extras.map((extra)=>scene_blueprint_default.component(`${id}-${extra.key.toLowerCase()}`, 'dataList', {
62
+ label: extra.label,
63
+ rows: vendorsQueries.fromQuery(`${options.entity}${extra.key}`),
64
+ columns: vendorsQueries.fromQuery(`${options.entity}${extra.key}Columns`),
65
+ titleField: extra.titleField,
66
+ pageSize: extra.pageSize ?? 8,
67
+ ...vendorsQueries.currencyOfData
68
+ }))
69
+ ],
70
+ related: [],
71
+ activity: [
72
+ scene_blueprint_default.component(`${id}-activity`, 'activityFeed', {
73
+ label: 'Activity',
74
+ entries: vendorsQueries.fromQuery(queries.activity),
75
+ ...vendorsQueries.localeOfData
76
+ })
77
+ ],
78
+ aside: []
79
+ },
80
+ displayName: options.displayName,
81
+ description: options.description,
82
+ metadata: vendorsParts.vendorsMetadata(options.name, 'Detail', [
83
+ scene_model.TemplateScope.Feature,
84
+ scene_model.TemplateScope.Subfeature
85
+ ])
86
+ };
87
+ }
88
+ /** The vendor page: the vendor's name as its title, its status, spend, rating and open orders at the top, its details, contacts, purchase orders and certificates in the main region, and the activity beside it. */ const vendorPageTemplate = recordPageOf({
89
+ name: 'VendorPage',
90
+ entity: vendorsQueries.VendorsEntityKind.Vendor,
91
+ displayName: 'Vendor page',
92
+ description: 'One vendor: status, spend, rating and open orders, its details, contacts, purchase orders and certificates, and its activity.',
93
+ titleField: 'name',
94
+ backScreen: 'vendors.list',
95
+ backLabel: 'Back to vendors',
96
+ facts: [
97
+ {
98
+ id: 'spend',
99
+ label: 'Spend this year',
100
+ field: 'spend',
101
+ format: 'currency'
102
+ },
103
+ {
104
+ id: 'rating',
105
+ label: 'Rating',
106
+ field: 'rating'
107
+ },
108
+ {
109
+ id: 'open',
110
+ label: 'Open orders',
111
+ field: 'openOrders'
112
+ }
113
+ ],
114
+ extras: [
115
+ {
116
+ key: 'Contacts',
117
+ label: 'Contacts',
118
+ titleField: 'name'
119
+ },
120
+ {
121
+ key: 'Orders',
122
+ label: 'Purchase orders',
123
+ titleField: 'number'
124
+ },
125
+ {
126
+ key: 'Certificates',
127
+ label: 'Certificates',
128
+ titleField: 'name'
129
+ }
130
+ ],
131
+ actions: []
132
+ });
133
+
134
+ exports.vendorPageTemplate = vendorPageTemplate;
135
+ //# sourceMappingURL=recordTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordTemplates.js","sources":["../../../templates/recordTemplates.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 { recordPageTemplate } from '@cratis/scene.blueprint.default';\nimport { VendorsEntityKind, currencyOfData, fromQuery, localeOfData, vendorsQueriesOf } from '../vendorsQueries';\nimport { actionButton, component, goesTo, vendorsMetadata, opensDialog, withBehaviors } from '../vendorsParts';\n\ninterface Fact { id: string; label: string; field: string; format?: 'currency' | 'percent' }\ninterface Extra { key: string; label: string; titleField: string; pageSize?: number }\ninterface Action { id: string; label: string; emphasis: 'primary' | 'secondary' | 'quiet' | 'danger'; dialog?: string; screen?: string }\n\ninterface RecordOptions {\n name: string;\n entity: VendorsEntityKind;\n displayName: string;\n description: string;\n titleField: string;\n backScreen: string;\n backLabel: string;\n facts: Fact[];\n extras: Extra[];\n actions: Action[];\n}\n\n/**\n * One record page: the foundation `RecordPage` with the record's own title, its status and key facts at the top, its fields and the lists that belong to it in the\n * main region, and the activity beside it. What it shows is the record the list handed it the id of.\n */\nfunction recordPageOf(options: RecordOptions): ScreenTemplate {\n const queries = vendorsQueriesOf(options.entity);\n const id = options.name;\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: fromQuery(queries.record, `0.${options.titleField}`), subtitle: fromQuery(queries.record, '0.summary') }, {\n actions: [\n withBehaviors(actionButton(`${id}-back`, options.backLabel, 'secondary'), goesTo(options.backScreen)),\n ...options.actions.map(action => withBehaviors(actionButton(`${id}-${action.id}`, action.label, action.emphasis), action.dialog ? opensDialog(action.dialog) : goesTo(action.screen!))),\n ],\n })],\n summary: [\n component(`${id}-status`, 'statusChip', { status: fromQuery(queries.summary, '0.status'), tone: fromQuery(queries.summary, '0.tone') }),\n ...options.facts.map(fact => component(`${id}-${fact.id}`, 'statCard', {\n label: fact.label, value: fromQuery(queries.summary, `0.${fact.field}`), ...(fact.format ? { format: fact.format } : {}), ...currencyOfData,\n })),\n ],\n tabs: [component(`${id}-tabs`, 'tabSet', { tabs: fromQuery(queries.tabs), urlKey: 'tab', label: `${options.displayName} sections` })],\n main: [\n component(`${id}-form`, 'formScreenBody', { mode: 'readOnly', sections: fromQuery(queries.sections), values: fromQuery(queries.record, '0'), ...currencyOfData }),\n ...options.extras.map(extra => component(`${id}-${extra.key.toLowerCase()}`, 'dataList', {\n label: extra.label, rows: fromQuery(`${options.entity}${extra.key}`), columns: fromQuery(`${options.entity}${extra.key}Columns`), titleField: extra.titleField, pageSize: extra.pageSize ?? 8, ...currencyOfData,\n })),\n ],\n related: [],\n activity: [component(`${id}-activity`, 'activityFeed', { label: 'Activity', entries: fromQuery(queries.activity), ...localeOfData })],\n aside: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: vendorsMetadata(options.name, 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n };\n}\n\n/** The vendor page: the vendor's name as its title, its status, spend, rating and open orders at the top, its details, contacts, purchase orders and certificates in the main region, and the activity beside it. */\nexport const vendorPageTemplate = recordPageOf({\n name: 'VendorPage', entity: VendorsEntityKind.Vendor, displayName: 'Vendor page', description: 'One vendor: status, spend, rating and open orders, its details, contacts, purchase orders and certificates, and its activity.', titleField: 'name', backScreen: 'vendors.list', backLabel: 'Back to vendors',\n facts: [\n { id: 'spend', label: 'Spend this year', field: 'spend', format: 'currency' },\n { id: 'rating', label: 'Rating', field: 'rating' },\n { id: 'open', label: 'Open orders', field: 'openOrders' },\n ],\n extras: [{ key: 'Contacts', label: 'Contacts', titleField: 'name' }, { key: 'Orders', label: 'Purchase orders', titleField: 'number' }, { key: 'Certificates', label: 'Certificates', titleField: 'name' }],\n actions: [],\n});\n"],"names":["recordPageOf","options","queries","vendorsQueriesOf","entity","id","name","fitsSlot","slots","recordPageTemplate","arrangement","content","header","component","title","fromQuery","record","titleField","subtitle","actions","withBehaviors","actionButton","backLabel","goesTo","backScreen","map","action","label","emphasis","dialog","opensDialog","screen","summary","status","tone","facts","fact","value","field","format","currencyOfData","tabs","urlKey","displayName","main","mode","sections","values","extras","extra","key","toLowerCase","rows","columns","pageSize","related","activity","entries","localeOfData","aside","description","metadata","vendorsMetadata","TemplateScope","Feature","Subfeature","vendorPageTemplate","VendorsEntityKind","Vendor"],"mappings":";;;;;;;AAAA;AACA;AAwBA;;;IAIA,SAASA,aAAaC,OAAsB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,+BAAAA,CAAiBF,OAAAA,CAAQG,MAAM,CAAA;IAC/C,MAAMC,EAAAA,GAAKJ,QAAQK,IAAI;IACvB,OAAO;AACHA,QAAAA,IAAAA,EAAML,QAAQK,IAAI;QAClBC,QAAAA,EAAU,SAAA;AACVC,QAAAA,KAAAA,EAAOC,2CAAmBD,KAAK;AAC/BE,QAAAA,WAAAA,EAAaD,2CAAmBC,WAAW;QAC3CC,OAAAA,EAAS;YACLC,MAAAA,EAAQ;AAACC,gBAAAA,iCAAAA,CAAU,CAAA,EAAGR,EAAAA,CAAG,OAAO,CAAC,EAAE,YAAA,EAAc;oBAAES,KAAAA,EAAOC,wBAAAA,CAAUb,QAAQc,MAAM,EAAE,CAAC,EAAE,EAAEf,OAAAA,CAAQgB,UAAU,CAAA,CAAE,CAAA;oBAAGC,QAAAA,EAAUH,wBAAAA,CAAUb,OAAAA,CAAQc,MAAM,EAAE,WAAA;iBAAa,EAAG;oBAChKG,OAAAA,EAAS;AACLC,wBAAAA,0BAAAA,CAAcC,yBAAAA,CAAa,CAAA,EAAGhB,EAAAA,CAAG,KAAK,CAAC,EAAEJ,OAAAA,CAAQqB,SAAS,EAAE,WAAA,CAAA,EAAcC,mBAAAA,CAAOtB,OAAAA,CAAQuB,UAAU,CAAA,CAAA;AAChGvB,wBAAAA,GAAAA,OAAAA,CAAQkB,OAAO,CAACM,GAAG,CAACC,CAAAA,MAAAA,GAAUN,0BAAAA,CAAcC,yBAAAA,CAAa,CAAA,EAAGhB,EAAAA,CAAG,C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B,KAAAA,EAAO,iBAAA;YAAmBV,UAAAA,EAAY;AAAS,SAAA;AAAG,QAAA;YAAEiC,GAAAA,EAAK,cAAA;YAAgBvB,KAAAA,EAAO,cAAA;YAAgBV,UAAAA,EAAY;AAAO;AAAE,KAAA;AAC3ME,IAAAA,OAAAA,EAAS;AACb,CAAA;;"}
@@ -0,0 +1,49 @@
1
+ 'use strict';
2
+
3
+ var scene_engine = require('@cratis/scene.engine');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var navigation = require('./navigation.js');
6
+ var index = require('./screens/index.js');
7
+ var index$1 = require('./templates/index.js');
8
+ var formTemplates = require('./templates/formTemplates.js');
9
+
10
+ // Copyright (c) Cratis. All rights reserved.
11
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
12
+ /** The id of the sample-data pack a new application starts with. */ const vendorsDefaultSampleDataId = 'vendors-en';
13
+ /**
14
+ * The example application of the blueprint: the foundation's layouts, the Vendors templates, the quick-create dialogs and their 4 screens, rendering against the
15
+ * foundation's packages with the default sample-data pack chosen. This is what a gallery previews and what the conformance fixture
16
+ * (`Samples/Vendors/vendors.play`) declares in Screenplay: the document, the structure and the navigation are the three things an application is made of.
17
+ */ function vendorsApplication(sampleData = vendorsDefaultSampleDataId) {
18
+ const profile = {
19
+ ...scene_blueprint_default.previewProfile(undefined),
20
+ name: 'Vendors',
21
+ sampleData: {
22
+ activePack: sampleData,
23
+ mappings: [],
24
+ bindings: []
25
+ }
26
+ };
27
+ return {
28
+ layouts: scene_blueprint_default.defaultLayouts,
29
+ screenTemplates: index$1.vendorsScreenTemplates,
30
+ dialogTemplates: formTemplates.vendorsDialogs,
31
+ screens: index.vendorsScreens,
32
+ uiProfiles: [
33
+ profile
34
+ ]
35
+ };
36
+ }
37
+ /** What a host composes the screens with: the application's logo, which the shell's topbar shows. */ const vendorsComposition = {
38
+ logo: navigation.vendorsNavigation.application.logo
39
+ };
40
+ /** The structure and navigation the shell's regions show and the items' destinations resolve against. */ const vendorsNavigationModel = ()=>({
41
+ structure: new scene_engine.ApplicationStructureIndex(navigation.vendorsStructure),
42
+ navigation: navigation.vendorsNavigation
43
+ });
44
+
45
+ exports.vendorsApplication = vendorsApplication;
46
+ exports.vendorsComposition = vendorsComposition;
47
+ exports.vendorsDefaultSampleDataId = vendorsDefaultSampleDataId;
48
+ exports.vendorsNavigationModel = vendorsNavigationModel;
49
+ //# sourceMappingURL=vendorsApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorsApplication.js","sources":["../../vendorsApplication.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { UiProfile } from '@cratis/scene.model';\nimport { ApplicationStructureIndex } from '@cratis/scene.engine';\nimport { ApplicationDocument, CompositionOptions, defaultLayouts, previewProfile } from '@cratis/scene.blueprint.default';\nimport { vendorsNavigation, vendorsStructure } from './navigation';\nimport { vendorsScreens } from './screens';\nimport { vendorsDialogTemplates, vendorsScreenTemplates } from './templates';\n\n/** The id of the sample-data pack a new application starts with. */\nexport const vendorsDefaultSampleDataId = 'vendors-en';\n\n/**\n * The example application of the blueprint: the foundation's layouts, the Vendors templates, the quick-create dialogs and their 4 screens, rendering against the\n * foundation's packages with the default sample-data pack chosen. This is what a gallery previews and what the conformance fixture\n * (`Samples/Vendors/vendors.play`) declares in Screenplay: the document, the structure and the navigation are the three things an application is made of.\n */\nexport function vendorsApplication(sampleData: string = vendorsDefaultSampleDataId): ApplicationDocument {\n const profile: UiProfile = { ...previewProfile(undefined), name: 'Vendors', sampleData: { activePack: sampleData, mappings: [], bindings: [] } };\n return { layouts: defaultLayouts, screenTemplates: vendorsScreenTemplates, dialogTemplates: vendorsDialogTemplates, screens: vendorsScreens, uiProfiles: [profile] };\n}\n\n/** What a host composes the screens with: the application's logo, which the shell's topbar shows. */\nexport const vendorsComposition: CompositionOptions = { logo: vendorsNavigation.application.logo };\n\n/** The structure and navigation the shell's regions show and the items' destinations resolve against. */\nexport const vendorsNavigationModel = () => ({ structure: new ApplicationStructureIndex(vendorsStructure), navigation: vendorsNavigation });\n"],"names":["vendorsDefaultSampleDataId","vendorsApplication","sampleData","profile","previewProfile","undefined","name","activePack","mappings","bindings","layouts","defaultLayouts","screenTemplates","vendorsScreenTemplates","dialogTemplates","vendorsDialogTemplates","screens","vendorsScreens","uiProfiles","vendorsComposition","logo","vendorsNavigation","application","vendorsNavigationModel","structure","ApplicationStructureIndex","vendorsStructure","navigation"],"mappings":";;;;;;;;;AAAA;AACA;AASA,qEACO,MAAMA,0BAAAA,GAA6B;AAE1C;;;;AAIC,IACM,SAASC,kBAAAA,CAAmBC,UAAAA,GAAqBF,0BAA0B,EAAA;AAC9E,IAAA,MAAMG,OAAAA,GAAqB;AAAE,QAAA,GAAGC,uCAAeC,SAAAA,CAAU;QAAEC,IAAAA,EAAM,SAAA;QAAWJ,UAAAA,EAAY;YAAEK,UAAAA,EAAYL,UAAAA;AAAYM,YAAAA,QAAAA,EAAU,EAAE;AAAEC,YAAAA,QAAAA,EAAU;AAAG;AAAE,KAAA;IAC/I,OAAO;QAAEC,OAAAA,EAASC,sCAAAA;QAAgBC,eAAAA,EAAiBC,8BAAAA;QAAwBC,eAAAA,EAAiBC,4BAAAA;QAAwBC,OAAAA,EAASC,oBAAAA;QAAgBC,UAAAA,EAAY;AAACf,YAAAA;AAAQ;AAAC,KAAA;AACvK;AAEA,sGACO,MAAMgB,kBAAAA,GAAyC;IAAEC,IAAAA,EAAMC,4BAAAA,CAAkBC,WAAW,CAACF;AAAK;AAEjG,0GACO,MAAMG,sBAAAA,GAAyB,KAAO;AAAEC,QAAAA,SAAAA,EAAW,IAAIC,sCAAAA,CAA0BC,2BAAAA,CAAAA;QAAmBC,UAAAA,EAAYN;AAAkB,KAAA;;;;;"}
@@ -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 templateProvenance = require('./templateProvenance.js');
6
+
7
+ // Copyright (c) Cratis. All rights reserved.
8
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
9
+ /** The category of every template of this blueprint (spec Part B 1.2: `Business / <domain>`). */ const vendorsCategory = 'Business / Vendors';
10
+ /** The package-relative thumbnail of a template. */ const thumbnailOf = (templateName)=>`thumbnails/${templateName}.svg`;
11
+ /** The metadata of a screen template of this blueprint: provenance, a type from the vocabulary, the category, a thumbnail and the levels it applies at. */ const vendorsMetadata = (name, type, scopes)=>({
12
+ ...templateProvenance.vendorsTemplateProvenance,
13
+ type,
14
+ category: vendorsCategory,
15
+ thumbnail: thumbnailOf(name),
16
+ scopes
17
+ });
18
+ /** A button of the foundation: a verb, its emphasis, and the permission rule every action declares (spec Part B 1.5). */ const actionButton = (id, label, emphasis, extra = {}, behaviors)=>({
19
+ ...scene_blueprint_default.component(id, 'actionButton', {
20
+ label,
21
+ emphasis,
22
+ permission: 'enabled',
23
+ ...extra
24
+ }),
25
+ ...behaviors ? {
26
+ behaviors
27
+ } : {}
28
+ });
29
+ /** What pressing an element does: open the named dialog template over the page. */ const opensDialog = (dialogTemplate)=>[
30
+ {
31
+ bindings: [
32
+ {
33
+ trigger: {
34
+ kind: scene_model.InteractionTriggerKind.Click
35
+ },
36
+ actions: [
37
+ {
38
+ kind: scene_model.InteractionActionKind.OpenDialog,
39
+ dialogTemplate
40
+ }
41
+ ]
42
+ }
43
+ ]
44
+ }
45
+ ];
46
+ /** What pressing an element does: go to the named screen. */ const goesTo = (screen)=>[
47
+ {
48
+ bindings: [
49
+ {
50
+ trigger: {
51
+ kind: scene_model.InteractionTriggerKind.Click
52
+ },
53
+ actions: [
54
+ {
55
+ kind: scene_model.InteractionActionKind.Navigate,
56
+ screen
57
+ }
58
+ ]
59
+ }
60
+ ]
61
+ }
62
+ ];
63
+ /**
64
+ * What choosing a row of a list does: open the record page, handing it the chosen row's id. The list is single-selection, so choosing a row is
65
+ * opening it - the way a table of records works everywhere.
66
+ */ const opensRecordOnSelect = (listId, screen)=>[
67
+ {
68
+ bindings: [
69
+ {
70
+ trigger: {
71
+ kind: scene_model.InteractionTriggerKind.Select
72
+ },
73
+ actions: [
74
+ {
75
+ kind: scene_model.InteractionActionKind.Navigate,
76
+ screen,
77
+ arguments: [
78
+ {
79
+ name: 'id',
80
+ value: {
81
+ kind: scene_model.BindingSourceKind.ComponentProperty,
82
+ componentId: listId,
83
+ path: 'value'
84
+ }
85
+ }
86
+ ]
87
+ }
88
+ ]
89
+ }
90
+ ]
91
+ }
92
+ ];
93
+ /**
94
+ * What choosing a row of a list does: open the named dialog over the page - a side sheet with the row's detail, so the list stays where it was.
95
+ */ const opensDialogOnSelect = (dialogTemplate)=>[
96
+ {
97
+ bindings: [
98
+ {
99
+ trigger: {
100
+ kind: scene_model.InteractionTriggerKind.Select
101
+ },
102
+ actions: [
103
+ {
104
+ kind: scene_model.InteractionActionKind.OpenDialog,
105
+ dialogTemplate
106
+ }
107
+ ]
108
+ }
109
+ ]
110
+ }
111
+ ];
112
+ /** What a Cancel or Close control does: close the dialog it was opened from. */ const closesDialog = ()=>[
113
+ {
114
+ bindings: [
115
+ {
116
+ trigger: {
117
+ kind: scene_model.InteractionTriggerKind.Click
118
+ },
119
+ actions: [
120
+ {
121
+ kind: scene_model.InteractionActionKind.CloseDialog
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ }
127
+ ];
128
+ /** An element with the given behaviors attached. */ const withBehaviors = (element, behaviors)=>({
129
+ ...element,
130
+ behaviors
131
+ });
132
+
133
+ Object.defineProperty(exports, "component", {
134
+ enumerable: true,
135
+ get: function () { return scene_blueprint_default.component; }
136
+ });
137
+ Object.defineProperty(exports, "panel", {
138
+ enumerable: true,
139
+ get: function () { return scene_blueprint_default.panel; }
140
+ });
141
+ exports.actionButton = actionButton;
142
+ exports.closesDialog = closesDialog;
143
+ exports.goesTo = goesTo;
144
+ exports.opensDialog = opensDialog;
145
+ exports.opensDialogOnSelect = opensDialogOnSelect;
146
+ exports.opensRecordOnSelect = opensRecordOnSelect;
147
+ exports.thumbnailOf = thumbnailOf;
148
+ exports.vendorsCategory = vendorsCategory;
149
+ exports.vendorsMetadata = vendorsMetadata;
150
+ exports.withBehaviors = withBehaviors;
151
+ //# sourceMappingURL=vendorsParts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorsParts.js","sources":["../../vendorsParts.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 {\n Behavior, BindingSourceKind, DialogTemplate, ExternalComponent, InteractionActionKind, InteractionTriggerKind, NavigateAction, OpenDialogAction, SceneElement, ScreenTemplate, TemplateMetadata, TemplateScope,\n} from '@cratis/scene.model';\nimport { component, panel } from '@cratis/scene.blueprint.default';\nimport { vendorsTemplateProvenance } from './templateProvenance';\n\nexport { component, panel };\n\n/** The category of every template of this blueprint (spec Part B 1.2: `Business / <domain>`). */\nexport const vendorsCategory = 'Business / Vendors';\n\n/** The package-relative thumbnail of a template. */\nexport const thumbnailOf = (templateName: string): string => `thumbnails/${templateName}.svg`;\n\n/** The metadata of a screen template of this blueprint: provenance, a type from the vocabulary, the category, a thumbnail and the levels it applies at. */\nexport const vendorsMetadata = (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace' | 'Calendar' | 'Timeline' | 'Inbox' | 'Profile' | 'Wizard', scopes: TemplateScope[]): TemplateMetadata =>\n ({ ...vendorsTemplateProvenance, type, category: vendorsCategory, thumbnail: thumbnailOf(name), scopes });\n\n/** A button of the foundation: a verb, its emphasis, and the permission rule every action declares (spec Part B 1.5). */\nexport const actionButton = (id: string, label: string, emphasis: 'primary' | 'secondary' | 'quiet' | 'danger', extra: Record<string, unknown> = {}, behaviors?: Behavior[]): ExternalComponent =>\n ({ ...component(id, 'actionButton', { label, emphasis, permission: 'enabled', ...extra }), ...(behaviors ? { behaviors } : {}) });\n\n/** What pressing an element does: open the named dialog template over the page. */\nexport const opensDialog = (dialogTemplate: string): Behavior[] =>\n [{ bindings: [{ trigger: { kind: InteractionTriggerKind.Click }, actions: [{ kind: InteractionActionKind.OpenDialog, dialogTemplate } as OpenDialogAction] }] }];\n\n/** What pressing an element does: go to the named screen. */\nexport const goesTo = (screen: string): Behavior[] =>\n [{ bindings: [{ trigger: { kind: InteractionTriggerKind.Click }, actions: [{ kind: InteractionActionKind.Navigate, screen } as NavigateAction] }] }];\n\n/**\n * What choosing a row of a list does: open the record page, handing it the chosen row's id. The list is single-selection, so choosing a row is\n * opening it - the way a table of records works everywhere.\n */\nexport const opensRecordOnSelect = (listId: string, screen: string): Behavior[] => [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Select },\n actions: [{ kind: InteractionActionKind.Navigate, screen, arguments: [{ name: 'id', value: { kind: BindingSourceKind.ComponentProperty, componentId: listId, path: 'value' } }] } as NavigateAction],\n }],\n}];\n\n/**\n * What choosing a row of a list does: open the named dialog over the page - a side sheet with the row's detail, so the list stays where it was.\n */\nexport const opensDialogOnSelect = (dialogTemplate: string): Behavior[] =>\n [{ bindings: [{ trigger: { kind: InteractionTriggerKind.Select }, actions: [{ kind: InteractionActionKind.OpenDialog, dialogTemplate } as OpenDialogAction] }] }];\n\n/** What a Cancel or Close control does: close the dialog it was opened from. */\nexport const closesDialog = (): Behavior[] => [{ bindings: [{ trigger: { kind: InteractionTriggerKind.Click }, actions: [{ kind: InteractionActionKind.CloseDialog }] }] }];\n\n/** An element with the given behaviors attached. */\nexport const withBehaviors = <T extends SceneElement>(element: T, behaviors: Behavior[]): T => ({ ...element, behaviors });\n\nexport type VendorsScreenTemplate = ScreenTemplate;\nexport type VendorsDialogTemplate = DialogTemplate;\n"],"names":["vendorsCategory","thumbnailOf","templateName","vendorsMetadata","name","type","scopes","vendorsTemplateProvenance","category","thumbnail","actionButton","id","label","emphasis","extra","behaviors","component","permission","opensDialog","dialogTemplate","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","OpenDialog","goesTo","screen","Navigate","opensRecordOnSelect","listId","Select","arguments","value","BindingSourceKind","ComponentProperty","componentId","path","opensDialogOnSelect","closesDialog","CloseDialog","withBehaviors","element"],"mappings":";;;;;;AAAA;AACA;AAUA,kGACO,MAAMA,eAAAA,GAAkB;AAE/B,qDACO,MAAMC,WAAAA,GAAc,CAACC,YAAAA,GAAiC,CAAC,WAAW,EAAEA,YAAAA,CAAa,IAAI;AAE5F,4JACO,MAAMC,eAAAA,GAAkB,CAACC,IAAAA,EAAcC,IAAAA,EAA8IC,UACvL;AAAE,QAAA,GAAGC,4CAAyB;AAAEF,QAAAA,IAAAA;QAAMG,QAAAA,EAAUR,eAAAA;AAAiBS,QAAAA,SAAAA,EAAWR,WAAAA,CAAYG,IAAAA,CAAAA;AAAOE,QAAAA;AAAO,KAAA;AAE3G,0HACO,MAAMI,YAAAA,GAAe,CAACC,EAAAA,EAAYC,KAAAA,EAAeC,QAAAA,EAAwDC,KAAAA,GAAiC,EAAE,EAAEC,aAChJ;QAAE,GAAGC,iCAAAA,CAAUL,IAAI,cAAA,EAAgB;AAAEC,YAAAA,KAAAA;AAAOC,YAAAA,QAAAA;YAAUI,UAAAA,EAAY,SAAA;AAAW,YAAA,GAAGH;SAAM,CAAE;AAAE,QAAA,GAAIC,SAAAA,GAAY;AAAEA,YAAAA;AAAU,SAAA,GAAI;AAAI,KAAA;AAEnI,oFACO,MAAMG,WAAAA,GAAc,CAACC,cAAAA,GACxB;AAAC,QAAA;YAAEC,QAAAA,EAAU;AAAC,gBAAA;oBAAEC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,mCAAuBC;AAAM,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,kCAAsBC,UAAU;AAAER,4BAAAA;AAAe;AAAsB;AAAC;AAAE;AAAC;;AAElK,8DACO,MAAMS,MAAAA,GAAS,CAACC,MAAAA,GACnB;AAAC,QAAA;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,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,kCAAsBgB;AAAY;AAAE;AAAC;AAAE;AAAC;;AAEzK,qDACO,MAAMC,gBAAgB,CAAyBC,OAAAA,EAAY7B,aAA8B;AAAE,QAAA,GAAG6B,OAAO;AAAE7B,QAAAA;AAAU,KAAA;;;;;;;;;;;;;;;;;;;"}
@@ -0,0 +1,64 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
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 property taken from a query result - never a value. A vendors template declares *where* its data comes from and the sample-data pack, or the real
9
+ * 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).
10
+ */ const fromQuery = (query, path = '')=>({
11
+ kind: scene_model.BindingSourceKind.QueryResult,
12
+ query,
13
+ path
14
+ });
15
+ /** The queries of the screens that are not a plain list. Each is a shape the sample-data pack supplies rows for. */ const VendorsQuery = {
16
+ /** One row: the `locale` and `currency` the figures and dates are formatted in. */ Settings: 'VendorsSettings',
17
+ OnboardingColumns: 'OnboardingColumns',
18
+ OnboardingCards: 'OnboardingCards',
19
+ Kpis: 'VendorsKpis',
20
+ SpendByCategory: 'VendorsSpendByCategory',
21
+ OnTimeDelivery: 'VendorsOnTimeDelivery',
22
+ Activity: 'VendorsActivity',
23
+ FormErrors: 'VendorsFormErrors'
24
+ };
25
+ /** The entities a template is made for. */ var VendorsEntityKind = /*#__PURE__*/ function(VendorsEntityKind) {
26
+ VendorsEntityKind["Vendor"] = "Vendor";
27
+ return VendorsEntityKind;
28
+ }({});
29
+ /** The read model (and so the shape) the records of each entity are queried from. */ const vendorsEntityPlural = {
30
+ ["Vendor"]: 'Vendors'
31
+ };
32
+ /**
33
+ * The queries one entity's templates bind to, named from the entity so a template never spells one out: the records, the columns and filter fields of the
34
+ * list, its saved views and column choices, the selection, the sections of the quick form, and what the record page shows.
35
+ */ const vendorsQueriesOf = (entity)=>({
36
+ rows: vendorsEntityPlural[entity],
37
+ columns: `${entity}Columns`,
38
+ filterFields: `${entity}FilterFields`,
39
+ views: `${entity}Views`,
40
+ columnChoices: `${entity}ColumnChoices`,
41
+ selection: `${entity}Selection`,
42
+ quickSections: `${entity}QuickSections`,
43
+ record: `${entity}Record`,
44
+ sections: `${entity}Sections`,
45
+ summary: `${entity}Summary`,
46
+ activity: `${entity}Activity`,
47
+ tabs: `${entity}Tabs`
48
+ });
49
+ /** The locale and currency of the data, bound onto every component that formats a figure or a date. */ const localeOfData = {
50
+ locale: fromQuery(VendorsQuery.Settings, '0.locale')
51
+ };
52
+ const currencyOfData = {
53
+ ...localeOfData,
54
+ currency: fromQuery(VendorsQuery.Settings, '0.currency')
55
+ };
56
+
57
+ exports.VendorsEntityKind = VendorsEntityKind;
58
+ exports.VendorsQuery = VendorsQuery;
59
+ exports.currencyOfData = currencyOfData;
60
+ exports.fromQuery = fromQuery;
61
+ exports.localeOfData = localeOfData;
62
+ exports.vendorsEntityPlural = vendorsEntityPlural;
63
+ exports.vendorsQueriesOf = vendorsQueriesOf;
64
+ //# sourceMappingURL=vendorsQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorsQueries.js","sources":["../../vendorsQueries.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 } from '@cratis/scene.model';\n\n/**\n * A property taken from a query result - never a value. A vendors 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/** The queries of the screens that are not a plain list. Each is a shape the sample-data pack supplies rows for. */\nexport const VendorsQuery = {\n /** One row: the `locale` and `currency` the figures and dates are formatted in. */\n Settings: 'VendorsSettings',\n OnboardingColumns: 'OnboardingColumns',\n OnboardingCards: 'OnboardingCards',\n Kpis: 'VendorsKpis',\n SpendByCategory: 'VendorsSpendByCategory',\n OnTimeDelivery: 'VendorsOnTimeDelivery',\n Activity: 'VendorsActivity',\n FormErrors: 'VendorsFormErrors',\n} as const;\n\n/** The entities a template is made for. */\nexport enum VendorsEntityKind {\n Vendor = 'Vendor',\n}\n\n/** The read model (and so the shape) the records of each entity are queried from. */\nexport const vendorsEntityPlural: Record<VendorsEntityKind, string> = {\n [VendorsEntityKind.Vendor]: 'Vendors',\n};\n\n/**\n * The queries one entity's templates bind to, named from the entity so a template never spells one out: the records, the columns and filter fields of the\n * list, its saved views and column choices, the selection, the sections of the quick form, and what the record page shows.\n */\nexport const vendorsQueriesOf = (entity: VendorsEntityKind) => ({\n rows: vendorsEntityPlural[entity],\n columns: `${entity}Columns`,\n filterFields: `${entity}FilterFields`,\n views: `${entity}Views`,\n columnChoices: `${entity}ColumnChoices`,\n selection: `${entity}Selection`,\n quickSections: `${entity}QuickSections`,\n record: `${entity}Record`,\n sections: `${entity}Sections`,\n summary: `${entity}Summary`,\n activity: `${entity}Activity`,\n tabs: `${entity}Tabs`,\n});\n\n/** The locale and currency of the data, bound onto every component that formats a figure or a date. */\nexport const localeOfData = { locale: fromQuery(VendorsQuery.Settings, '0.locale') };\nexport const currencyOfData = { ...localeOfData, currency: fromQuery(VendorsQuery.Settings, '0.currency') };\n"],"names":["fromQuery","query","path","kind","BindingSourceKind","QueryResult","VendorsQuery","Settings","OnboardingColumns","OnboardingCards","Kpis","SpendByCategory","OnTimeDelivery","Activity","FormErrors","VendorsEntityKind","vendorsEntityPlural","vendorsQueriesOf","entity","rows","columns","filterFields","views","columnChoices","selection","quickSections","record","sections","summary","activity","tabs","localeOfData","locale","currencyOfData","currency"],"mappings":";;;;AAAA;AACA;AAIA;;;UAIaA,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,I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,CAAO,QAAQ,CAAC;QAC7BY,IAAAA,EAAM,CAAA,EAAGZ,MAAAA,CAAO,IAAI;AACxB,KAAA;AAEA,wGACO,MAAMa,YAAAA,GAAe;IAAEC,MAAAA,EAAQhC,SAAAA,CAAUM,YAAAA,CAAaC,QAAQ,EAAE,UAAA;AAAY;MACtE0B,cAAAA,GAAiB;AAAE,IAAA,GAAGF,YAAY;IAAEG,QAAAA,EAAUlC,SAAAA,CAAUM,YAAAA,CAAaC,QAAQ,EAAE,YAAA;AAAc;;;;;;;;"}
@@ -0,0 +1,40 @@
1
+ 'use strict';
2
+
3
+ // Copyright (c) Cratis. All rights reserved.
4
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
5
+ /**
6
+ * The screens the blueprint brings, in navigation order. This one list is what the manifest's screen set, the `Screen` instances, the application structure
7
+ * and the navigation are all derived from, so they cannot disagree about which screens exist or where they sit.
8
+ */ const vendorsScreenDefinitions = [
9
+ {
10
+ name: 'vendors.list',
11
+ title: 'Vendors',
12
+ template: 'VendorsList',
13
+ order: 0,
14
+ description: 'Every vendor with what you spend with them and how they perform.'
15
+ },
16
+ {
17
+ name: 'vendors.record',
18
+ title: 'Vendor',
19
+ template: 'VendorPage',
20
+ parent: 'vendors.list',
21
+ description: 'One vendor: key facts, contacts, purchase orders, certificates and activity.'
22
+ },
23
+ {
24
+ name: 'vendors.onboarding',
25
+ title: 'Onboarding',
26
+ template: 'VendorsOnboardingBoard',
27
+ order: 1,
28
+ description: 'Vendors in a column for each onboarding step: prospect, in review, approved and active.'
29
+ },
30
+ {
31
+ name: 'vendors.performance',
32
+ title: 'Performance',
33
+ template: 'VendorsPerformance',
34
+ order: 2,
35
+ description: 'How vendors perform: spend, on-time delivery and the vendors to watch.'
36
+ }
37
+ ];
38
+
39
+ exports.vendorsScreenDefinitions = vendorsScreenDefinitions;
40
+ //# sourceMappingURL=vendorsScreenSet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vendorsScreenSet.js","sources":["../../vendorsScreenSet.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 { BlueprintScreen } from '@cratis/scene.model';\n\n/** One ready-to-use screen: the qualified name that is also its place in the application (`vendors.list.record` would be the `record` feature of `list`). */\nexport interface VendorsScreenDefinition extends BlueprintScreen {\n template: string;\n description: string;\n}\n\n/**\n * The screens the blueprint brings, in navigation order. This one list is what the manifest's screen set, the `Screen` instances, the application structure\n * and the navigation are all derived from, so they cannot disagree about which screens exist or where they sit.\n */\nexport const vendorsScreenDefinitions: VendorsScreenDefinition[] = [\n { name: 'vendors.list', title: 'Vendors', template: 'VendorsList', order: 0, description: 'Every vendor with what you spend with them and how they perform.' },\n { name: 'vendors.record', title: 'Vendor', template: 'VendorPage', parent: 'vendors.list', description: 'One vendor: key facts, contacts, purchase orders, certificates and activity.' },\n { name: 'vendors.onboarding', title: 'Onboarding', template: 'VendorsOnboardingBoard', order: 1, description: 'Vendors in a column for each onboarding step: prospect, in review, approved and active.' },\n { name: 'vendors.performance', title: 'Performance', template: 'VendorsPerformance', order: 2, description: 'How vendors perform: spend, on-time delivery and the vendors to watch.' },\n];\n"],"names":["vendorsScreenDefinitions","name","title","template","order","description","parent"],"mappings":";;AAAA;AACA;AAUA;;;UAIaA,wBAAAA,GAAsD;AAC/D,IAAA;QAAEC,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,SAAA;QAAWC,QAAAA,EAAU,aAAA;QAAeC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAmE,KAAA;AAC7J,IAAA;QAAEJ,IAAAA,EAAM,gBAAA;QAAkBC,KAAAA,EAAO,QAAA;QAAUC,QAAAA,EAAU,YAAA;QAAcG,MAAAA,EAAQ,cAAA;QAAgBD,WAAAA,EAAa;AAA+E,KAAA;AACvL,IAAA;QAAEJ,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,YAAA;QAAcC,QAAAA,EAAU,wBAAA;QAA0BC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAA0F,KAAA;AACxM,IAAA;QAAEJ,IAAAA,EAAM,qBAAA;QAAuBC,KAAAA,EAAO,aAAA;QAAeC,QAAAA,EAAU,oBAAA;QAAsBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAyE;;;"}
@@ -0,0 +1,3 @@
1
+ import { ScenePackageBundle } from '@cratis/scene.react';
2
+ export declare const vendorsBlueprint: ScenePackageBundle;
3
+ //# sourceMappingURL=blueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../blueprint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAMzD,eAAO,MAAM,gBAAgB,EAAE,kBAM9B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { vendorsBlueprintManifest } from './manifest.js';
2
+ import { vendorsScreens } from './screens/index.js';
3
+ import { vendorsScreenTemplates } from './templates/index.js';
4
+ import { vendorsDialogs } from './templates/formTemplates.js';
5
+
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
+ /** This blueprint as a loadable bundle: the manifest names things, this provides them. It provides no component - every component is the foundation's. */ const vendorsBlueprint = {
9
+ manifest: vendorsBlueprintManifest,
10
+ components: {},
11
+ screenTemplates: vendorsScreenTemplates,
12
+ dialogTemplates: vendorsDialogs,
13
+ screens: vendorsScreens
14
+ };
15
+
16
+ export { vendorsBlueprint };
17
+ //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.js","sources":["../../blueprint.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 { ScenePackageBundle } from '@cratis/scene.react';\nimport { vendorsBlueprintManifest } from './manifest';\nimport { vendorsScreens } from './screens';\nimport { vendorsDialogTemplates, vendorsScreenTemplates } from './templates';\n\n/** This blueprint as a loadable bundle: the manifest names things, this provides them. It provides no component - every component is the foundation's. */\nexport const vendorsBlueprint: ScenePackageBundle = {\n manifest: vendorsBlueprintManifest,\n components: {},\n screenTemplates: vendorsScreenTemplates,\n dialogTemplates: vendorsDialogTemplates,\n screens: vendorsScreens,\n};\n"],"names":["vendorsBlueprint","manifest","vendorsBlueprintManifest","components","screenTemplates","vendorsScreenTemplates","dialogTemplates","vendorsDialogTemplates","screens","vendorsScreens"],"mappings":";;;;;AAAA;AACA;AAOA,2JACO,MAAMA,gBAAAA,GAAuC;IAChDC,QAAAA,EAAUC,wBAAAA;AACVC,IAAAA,UAAAA,EAAY,EAAC;IACbC,eAAAA,EAAiBC,sBAAAA;IACjBC,eAAAA,EAAiBC,cAAAA;IACjBC,OAAAA,EAASC;AACb;;"}
@@ -0,0 +1,12 @@
1
+ export * from './packageName';
2
+ export * from './templateProvenance';
3
+ export * from './vendorsQueries';
4
+ export * from './vendorsParts';
5
+ export * from './vendorsScreenSet';
6
+ export * from './templates';
7
+ export * from './screens';
8
+ export * from './navigation';
9
+ export * from './manifest';
10
+ export * from './blueprint';
11
+ export * from './vendorsApplication';
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../index.ts"],"names":[],"mappings":"AAGA,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC;AACjC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,sBAAsB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { vendorsBlueprintName } from './packageName.js';
2
+ export { vendorsTemplateProvenance } from './templateProvenance.js';
3
+ export { VendorsEntityKind, VendorsQuery, currencyOfData, fromQuery, localeOfData, vendorsEntityPlural, vendorsQueriesOf } from './vendorsQueries.js';
4
+ export { actionButton, closesDialog, goesTo, opensDialog, opensDialogOnSelect, opensRecordOnSelect, thumbnailOf, vendorsCategory, vendorsMetadata, withBehaviors } from './vendorsParts.js';
5
+ export { vendorsScreenDefinitions } from './vendorsScreenSet.js';
6
+ export { vendorsScreenTemplates } from './templates/index.js';
7
+ export { vendorsScreens } from './screens/index.js';
8
+ export { vendorsModule, vendorsNavigation, vendorsStructure } from './navigation.js';
9
+ export { vendorsBlueprintManifest } from './manifest.js';
10
+ export { vendorsBlueprint } from './blueprint.js';
11
+ export { vendorsApplication, vendorsComposition, vendorsDefaultSampleDataId, vendorsNavigationModel } from './vendorsApplication.js';
12
+ export { component, panel } from '@cratis/scene.blueprint.default';
13
+ export { vendorPageTemplate } from './templates/recordTemplates.js';
14
+ export { vendorsDialogs as vendorsDialogTemplates, vendorsDialogs } from './templates/formTemplates.js';
15
+ export { vendorsListTemplate } from './templates/listTemplates.js';
16
+ export { vendorsOnboardingTemplate } from './templates/boardTemplate.js';
17
+ export { vendorsPerformanceTemplate } from './templates/dashboardTemplates.js';
18
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
@@ -0,0 +1,3 @@
1
+ import { ScenePackage } from '@cratis/scene.model';
2
+ export declare const vendorsBlueprintManifest: ScenePackage;
3
+ //# sourceMappingURL=manifest.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.d.ts","sourceRoot":"","sources":["../../manifest.ts"],"names":[],"mappings":"AAGA,OAAO,EAAe,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAYhE,eAAO,MAAM,wBAAwB,EAAE,YAyBtC,CAAC"}