@cratis/scene.blueprint.invoicing 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 (134) hide show
  1. package/README.md +66 -2
  2. package/blueprint.ts +16 -0
  3. package/blueprintCatalog.json +132 -0
  4. package/dist/cjs/blueprint.js +19 -0
  5. package/dist/cjs/blueprint.js.map +1 -0
  6. package/dist/cjs/index.js +69 -0
  7. package/dist/cjs/index.js.map +1 -0
  8. package/dist/cjs/invoicingApplication.js +49 -0
  9. package/dist/cjs/invoicingApplication.js.map +1 -0
  10. package/dist/cjs/invoicingParts.js +151 -0
  11. package/dist/cjs/invoicingParts.js.map +1 -0
  12. package/dist/cjs/invoicingQueries.js +66 -0
  13. package/dist/cjs/invoicingQueries.js.map +1 -0
  14. package/dist/cjs/invoicingScreenSet.js +47 -0
  15. package/dist/cjs/invoicingScreenSet.js.map +1 -0
  16. package/dist/cjs/manifest.js +87 -0
  17. package/dist/cjs/manifest.js.map +1 -0
  18. package/dist/cjs/navigation.js +117 -0
  19. package/dist/cjs/navigation.js.map +1 -0
  20. package/dist/cjs/package.json +3 -0
  21. package/dist/cjs/packageName.js +8 -0
  22. package/dist/cjs/packageName.js.map +1 -0
  23. package/dist/cjs/screens/index.js +22 -0
  24. package/dist/cjs/screens/index.js.map +1 -0
  25. package/dist/cjs/templateProvenance.js +24 -0
  26. package/dist/cjs/templateProvenance.js.map +1 -0
  27. package/dist/cjs/templates/calendarTemplate.js +109 -0
  28. package/dist/cjs/templates/calendarTemplate.js.map +1 -0
  29. package/dist/cjs/templates/dashboardTemplates.js +153 -0
  30. package/dist/cjs/templates/dashboardTemplates.js.map +1 -0
  31. package/dist/cjs/templates/formTemplates.js +51 -0
  32. package/dist/cjs/templates/formTemplates.js.map +1 -0
  33. package/dist/cjs/templates/index.js +27 -0
  34. package/dist/cjs/templates/index.js.map +1 -0
  35. package/dist/cjs/templates/listTemplates.js +166 -0
  36. package/dist/cjs/templates/listTemplates.js.map +1 -0
  37. package/dist/cjs/templates/recordTemplates.js +144 -0
  38. package/dist/cjs/templates/recordTemplates.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/invoicingApplication.d.ts +10 -0
  48. package/dist/esm/invoicingApplication.d.ts.map +1 -0
  49. package/dist/esm/invoicingApplication.js +44 -0
  50. package/dist/esm/invoicingApplication.js.map +1 -0
  51. package/dist/esm/invoicingParts.d.ts +16 -0
  52. package/dist/esm/invoicingParts.d.ts.map +1 -0
  53. package/dist/esm/invoicingParts.js +133 -0
  54. package/dist/esm/invoicingParts.js.map +1 -0
  55. package/dist/esm/invoicingQueries.d.ts +39 -0
  56. package/dist/esm/invoicingQueries.d.ts.map +1 -0
  57. package/dist/esm/invoicingQueries.js +58 -0
  58. package/dist/esm/invoicingQueries.js.map +1 -0
  59. package/dist/esm/invoicingScreenSet.d.ts +7 -0
  60. package/dist/esm/invoicingScreenSet.d.ts.map +1 -0
  61. package/dist/esm/invoicingScreenSet.js +45 -0
  62. package/dist/esm/invoicingScreenSet.js.map +1 -0
  63. package/dist/esm/manifest.d.ts +3 -0
  64. package/dist/esm/manifest.d.ts.map +1 -0
  65. package/dist/esm/manifest.js +85 -0
  66. package/dist/esm/manifest.js.map +1 -0
  67. package/dist/esm/navigation.d.ts +5 -0
  68. package/dist/esm/navigation.d.ts.map +1 -0
  69. package/dist/esm/navigation.js +113 -0
  70. package/dist/esm/navigation.js.map +1 -0
  71. package/dist/esm/package.json +3 -0
  72. package/dist/esm/packageName.d.ts +2 -0
  73. package/dist/esm/packageName.d.ts.map +1 -0
  74. package/dist/esm/packageName.js +6 -0
  75. package/dist/esm/packageName.js.map +1 -0
  76. package/dist/esm/screens/index.d.ts +3 -0
  77. package/dist/esm/screens/index.d.ts.map +1 -0
  78. package/dist/esm/screens/index.js +20 -0
  79. package/dist/esm/screens/index.js.map +1 -0
  80. package/dist/esm/templateProvenance.d.ts +3 -0
  81. package/dist/esm/templateProvenance.d.ts.map +1 -0
  82. package/dist/esm/templateProvenance.js +22 -0
  83. package/dist/esm/templateProvenance.js.map +1 -0
  84. package/dist/esm/templates/calendarTemplate.d.ts +3 -0
  85. package/dist/esm/templates/calendarTemplate.d.ts.map +1 -0
  86. package/dist/esm/templates/calendarTemplate.js +107 -0
  87. package/dist/esm/templates/calendarTemplate.js.map +1 -0
  88. package/dist/esm/templates/dashboardTemplates.d.ts +3 -0
  89. package/dist/esm/templates/dashboardTemplates.d.ts.map +1 -0
  90. package/dist/esm/templates/dashboardTemplates.js +151 -0
  91. package/dist/esm/templates/dashboardTemplates.js.map +1 -0
  92. package/dist/esm/templates/formTemplates.d.ts +3 -0
  93. package/dist/esm/templates/formTemplates.d.ts.map +1 -0
  94. package/dist/esm/templates/formTemplates.js +49 -0
  95. package/dist/esm/templates/formTemplates.js.map +1 -0
  96. package/dist/esm/templates/index.d.ts +8 -0
  97. package/dist/esm/templates/index.d.ts.map +1 -0
  98. package/dist/esm/templates/index.js +18 -0
  99. package/dist/esm/templates/index.js.map +1 -0
  100. package/dist/esm/templates/listTemplates.d.ts +4 -0
  101. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  102. package/dist/esm/templates/listTemplates.js +163 -0
  103. package/dist/esm/templates/listTemplates.js.map +1 -0
  104. package/dist/esm/templates/recordTemplates.d.ts +3 -0
  105. package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
  106. package/dist/esm/templates/recordTemplates.js +142 -0
  107. package/dist/esm/templates/recordTemplates.js.map +1 -0
  108. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  109. package/index.ts +14 -0
  110. package/invoicingApplication.ts +28 -0
  111. package/invoicingParts.ts +58 -0
  112. package/invoicingQueries.ts +58 -0
  113. package/invoicingScreenSet.ts +22 -0
  114. package/manifest.ts +41 -0
  115. package/navigation.ts +54 -0
  116. package/package.json +78 -4
  117. package/packageName.ts +5 -0
  118. package/sampleData/invoicing-en.json +988 -0
  119. package/screens/index.ts +20 -0
  120. package/templateProvenance.ts +15 -0
  121. package/templates/calendarTemplate.ts +57 -0
  122. package/templates/dashboardTemplates.ts +76 -0
  123. package/templates/formTemplates.ts +34 -0
  124. package/templates/index.ts +18 -0
  125. package/templates/listTemplates.ts +106 -0
  126. package/templates/recordTemplates.ts +79 -0
  127. package/thumbnails/InvoicePage.svg +17 -0
  128. package/thumbnails/InvoicesList.svg +29 -0
  129. package/thumbnails/InvoicingDueDates.svg +34 -0
  130. package/thumbnails/InvoicingOverview.svg +15 -0
  131. package/thumbnails/InvoicingQuickCreateInvoice.svg +12 -0
  132. package/thumbnails/InvoicingRecordPayment.svg +12 -0
  133. package/thumbnails/PaymentsList.svg +29 -0
  134. package/thumbnails/invoicing.svg +14 -0
@@ -0,0 +1,163 @@
1
+ import { TemplateScope, NotificationLevel, InteractionActionKind, InteractionTriggerKind } from '@cratis/scene.model';
2
+ import { component, listScreenTemplate } from '@cratis/scene.blueprint.default';
3
+ import { invoicingQueriesOf, localeOfData, fromQuery, InvoicingEntityKind } from '../invoicingQueries.js';
4
+ import { withBehaviors, opensDialog, goesTo, actionButton, invoicingMetadata, opensRecordOnSelect, opensDialogOnSelect } from '../invoicingParts.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
+ const listScopes = [
9
+ TemplateScope.Module,
10
+ TemplateScope.Feature
11
+ ];
12
+ /** 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)=>withBehaviors(actionButton(id, 'Export', 'secondary'), [
13
+ {
14
+ bindings: [
15
+ {
16
+ trigger: {
17
+ kind: InteractionTriggerKind.Click
18
+ },
19
+ actions: [
20
+ {
21
+ kind: InteractionActionKind.Notify,
22
+ level: NotificationLevel.Info,
23
+ message: {
24
+ text: 'The export has started.'
25
+ }
26
+ }
27
+ ]
28
+ }
29
+ ]
30
+ }
31
+ ]);
32
+ /**
33
+ * One list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and
34
+ * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.
35
+ */ function listTemplateOf(options) {
36
+ const queries = invoicingQueriesOf(options.entity);
37
+ const id = options.name;
38
+ const listId = `${id}-records`;
39
+ const primary = withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen));
40
+ const list = component(listId, 'dataList', {
41
+ label: options.title,
42
+ rows: fromQuery(queries.rows),
43
+ columns: fromQuery(queries.columns),
44
+ titleField: options.titleField,
45
+ pageSize: options.cards ? 12 : 10,
46
+ urlKey: options.urlKey,
47
+ ...localeOfData,
48
+ rowActions: options.rowActions,
49
+ ...options.readOnly ? {} : {
50
+ selectionMode: options.recordScreen || options.recordDialog ? 'single' : 'multiple'
51
+ },
52
+ ...options.cards ? {
53
+ variant: 'cards',
54
+ ...options.cards.imageField ? {
55
+ imageField: options.cards.imageField
56
+ } : {}
57
+ } : {},
58
+ ...options.grouped ? {
59
+ variant: 'grouped',
60
+ groupBy: options.grouped.groupBy
61
+ } : {},
62
+ ...options.toneField ? {
63
+ toneField: options.toneField
64
+ } : {}
65
+ });
66
+ return {
67
+ name: options.name,
68
+ fitsSlot: 'content',
69
+ slots: listScreenTemplate.slots,
70
+ arrangement: listScreenTemplate.arrangement,
71
+ content: {
72
+ header: [
73
+ component(`${id}-header`, 'pageHeader', {
74
+ title: options.title,
75
+ subtitle: options.subtitle
76
+ }, {
77
+ actions: [
78
+ exportAction(`${id}-export`),
79
+ primary
80
+ ]
81
+ })
82
+ ],
83
+ toolbar: [
84
+ component(`${id}-search`, 'globalSearch', {
85
+ placeholder: options.searchLabel,
86
+ label: options.searchLabel,
87
+ urlKey: `${options.urlKey}q`
88
+ }),
89
+ component(`${id}-views`, 'savedViewsMenu', {
90
+ views: fromQuery(queries.views),
91
+ savePermission: 'enabled',
92
+ managePermission: 'enabled'
93
+ }),
94
+ component(`${id}-columns`, 'columnChooser', {
95
+ columns: fromQuery(queries.columnChoices)
96
+ })
97
+ ],
98
+ filters: [
99
+ component(`${id}-filter`, 'filterBuilder', {
100
+ fields: fromQuery(queries.filterFields),
101
+ ...localeOfData
102
+ })
103
+ ],
104
+ list: [
105
+ options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : options.recordDialog ? withBehaviors(list, opensDialogOnSelect(options.recordDialog)) : list
106
+ ],
107
+ bulkBar: options.recordScreen || options.recordDialog || options.readOnly ? [] : [
108
+ component(`${id}-bulk`, 'bulkBar', {
109
+ selection: fromQuery(queries.selection),
110
+ actions: options.bulkActions
111
+ })
112
+ ],
113
+ footer: []
114
+ },
115
+ displayName: options.displayName,
116
+ description: options.description,
117
+ metadata: invoicingMetadata(options.name, 'List', listScopes)
118
+ };
119
+ }
120
+ /** The invoices: every invoice with its customer, issue and due dates, amount and status. Choosing an invoice opens it. */ const invoicesListTemplate = listTemplateOf({
121
+ name: 'InvoicesList',
122
+ entity: InvoicingEntityKind.Invoice,
123
+ displayName: 'Invoices list',
124
+ description: 'Every invoice with its customer, issue and due dates, amount and status, filtered by customer, status and date.',
125
+ title: 'Invoices',
126
+ subtitle: 'Everything you have billed',
127
+ searchLabel: 'Search invoices',
128
+ urlKey: 'invoices',
129
+ primary: {
130
+ label: 'New invoice',
131
+ dialog: 'InvoicingQuickCreateInvoice'
132
+ },
133
+ rowActions: [
134
+ 'Open',
135
+ 'Send reminder'
136
+ ],
137
+ bulkActions: [],
138
+ titleField: 'number',
139
+ recordScreen: 'invoicing.record'
140
+ });
141
+ /** The payments: what came in, which invoice it settled, when and by what method. A record of what happened, which nobody edits. */ const paymentsListTemplate = listTemplateOf({
142
+ name: 'PaymentsList',
143
+ entity: InvoicingEntityKind.Payment,
144
+ displayName: 'Payments list',
145
+ description: 'The payments received with the invoice each settled, when and how, filtered by method and date.',
146
+ title: 'Payments',
147
+ subtitle: 'What has come in',
148
+ searchLabel: 'Search payments',
149
+ urlKey: 'payments',
150
+ primary: {
151
+ label: 'Open the invoices',
152
+ screen: 'invoicing.list'
153
+ },
154
+ rowActions: [
155
+ 'Open invoice'
156
+ ],
157
+ bulkActions: [],
158
+ titleField: 'reference',
159
+ readOnly: true
160
+ });
161
+
162
+ export { invoicesListTemplate, paymentsListTemplate };
163
+ //# 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 { InvoicingEntityKind, fromQuery, invoicingQueriesOf, localeOfData } from '../invoicingQueries';\nimport { actionButton, component, goesTo, invoicingMetadata, opensDialog, opensDialogOnSelect, opensRecordOnSelect, withBehaviors } from '../invoicingParts';\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: InvoicingEntityKind;\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 = invoicingQueriesOf(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: invoicingMetadata(options.name, 'List', listScopes),\n };\n}\n\n\n/** The invoices: every invoice with its customer, issue and due dates, amount and status. Choosing an invoice opens it. */\nexport const invoicesListTemplate = listTemplateOf({\n name: 'InvoicesList',\n entity: InvoicingEntityKind.Invoice, displayName: 'Invoices list', description: 'Every invoice with its customer, issue and due dates, amount and status, filtered by customer, status and date.', title: 'Invoices', subtitle: 'Everything you have billed', searchLabel: 'Search invoices', urlKey: 'invoices',\n primary: { label: 'New invoice', dialog: 'InvoicingQuickCreateInvoice' },\n rowActions: ['Open', 'Send reminder'], bulkActions: [],\n titleField: 'number', recordScreen: 'invoicing.record'\n});\n\n/** The payments: what came in, which invoice it settled, when and by what method. A record of what happened, which nobody edits. */\nexport const paymentsListTemplate = listTemplateOf({\n name: 'PaymentsList',\n entity: InvoicingEntityKind.Payment, displayName: 'Payments list', description: 'The payments received with the invoice each settled, when and how, filtered by method and date.', title: 'Payments', subtitle: 'What has come in', searchLabel: 'Search payments', urlKey: 'payments',\n primary: { label: 'Open the invoices', screen: 'invoicing.list' },\n rowActions: ['Open invoice'], bulkActions: [],\n titleField: 'reference',\n readOnly: true\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","invoicingQueriesOf","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","invoicingMetadata","invoicesListTemplate","InvoicingEntityKind","Invoice","paymentsListTemplate","Payment"],"mappings":";;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,aAAAA,CAAcC,MAAM;AAAED,IAAAA,aAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,aAAAA,CAAcC,YAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBC;AAAM,qBAAA;oBAC9CC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBC,MAAM;AAAEC,4BAAAA,KAAAA,EAAOC,kBAAkBC,IAAI;4BAAEC,OAAAA,EAAS;gCAAEC,IAAAA,EAAM;AAA0B;AAAE;AAA6B;AAC7J;AAAE;AACN;AAAE,KAAA,CAAA;AA8BF;;;IAIA,SAASC,eAAeC,OAAoB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,kBAAAA,CAAmBF,OAAAA,CAAQG,MAAM,CAAA;IACjD,MAAMpB,EAAAA,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
+ import { ScreenTemplate } from '@cratis/scene.model';
2
+ export declare const invoicePageTemplate: ScreenTemplate;
3
+ //# sourceMappingURL=recordTemplates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordTemplates.d.ts","sourceRoot":"","sources":["../../../templates/recordTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAiEpE,eAAO,MAAM,mBAAmB,gBAU9B,CAAC"}
@@ -0,0 +1,142 @@
1
+ import { TemplateScope } from '@cratis/scene.model';
2
+ import { recordPageTemplate, component } from '@cratis/scene.blueprint.default';
3
+ import { localeOfData, fromQuery, currencyOfData, invoicingQueriesOf, InvoicingEntityKind } from '../invoicingQueries.js';
4
+ import { invoicingMetadata, withBehaviors, goesTo, actionButton, opensDialog } from '../invoicingParts.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
+ /**
9
+ * 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
10
+ * main region, and the activity beside it. What it shows is the record the list handed it the id of.
11
+ */ function recordPageOf(options) {
12
+ const queries = invoicingQueriesOf(options.entity);
13
+ const id = options.name;
14
+ return {
15
+ name: options.name,
16
+ fitsSlot: 'content',
17
+ slots: recordPageTemplate.slots,
18
+ arrangement: recordPageTemplate.arrangement,
19
+ content: {
20
+ header: [
21
+ component(`${id}-header`, 'pageHeader', {
22
+ title: fromQuery(queries.record, `0.${options.titleField}`),
23
+ subtitle: fromQuery(queries.record, '0.summary')
24
+ }, {
25
+ actions: [
26
+ withBehaviors(actionButton(`${id}-back`, options.backLabel, 'secondary'), goesTo(options.backScreen)),
27
+ ...options.actions.map((action)=>withBehaviors(actionButton(`${id}-${action.id}`, action.label, action.emphasis), action.dialog ? opensDialog(action.dialog) : goesTo(action.screen)))
28
+ ]
29
+ })
30
+ ],
31
+ summary: [
32
+ component(`${id}-status`, 'statusChip', {
33
+ status: fromQuery(queries.summary, '0.status'),
34
+ tone: fromQuery(queries.summary, '0.tone')
35
+ }),
36
+ ...options.facts.map((fact)=>component(`${id}-${fact.id}`, 'statCard', {
37
+ label: fact.label,
38
+ value: fromQuery(queries.summary, `0.${fact.field}`),
39
+ ...fact.format ? {
40
+ format: fact.format
41
+ } : {},
42
+ ...currencyOfData
43
+ }))
44
+ ],
45
+ tabs: [
46
+ component(`${id}-tabs`, 'tabSet', {
47
+ tabs: fromQuery(queries.tabs),
48
+ urlKey: 'tab',
49
+ label: `${options.displayName} sections`
50
+ })
51
+ ],
52
+ main: [
53
+ component(`${id}-form`, 'formScreenBody', {
54
+ mode: 'readOnly',
55
+ sections: fromQuery(queries.sections),
56
+ values: fromQuery(queries.record, '0'),
57
+ ...currencyOfData
58
+ }),
59
+ ...options.extras.map((extra)=>component(`${id}-${extra.key.toLowerCase()}`, 'dataList', {
60
+ label: extra.label,
61
+ rows: fromQuery(`${options.entity}${extra.key}`),
62
+ columns: fromQuery(`${options.entity}${extra.key}Columns`),
63
+ titleField: extra.titleField,
64
+ pageSize: extra.pageSize ?? 8,
65
+ ...currencyOfData
66
+ }))
67
+ ],
68
+ related: [],
69
+ activity: [
70
+ component(`${id}-activity`, 'activityFeed', {
71
+ label: 'Activity',
72
+ entries: fromQuery(queries.activity),
73
+ ...localeOfData
74
+ })
75
+ ],
76
+ aside: []
77
+ },
78
+ displayName: options.displayName,
79
+ description: options.description,
80
+ metadata: invoicingMetadata(options.name, 'Detail', [
81
+ TemplateScope.Feature,
82
+ TemplateScope.Subfeature
83
+ ])
84
+ };
85
+ }
86
+ /** The invoice page: the invoice number as its title, its status, total, paid amount and balance due at the top, its fields, lines and payments in the main region, and the activity beside it. */ const invoicePageTemplate = recordPageOf({
87
+ name: 'InvoicePage',
88
+ entity: InvoicingEntityKind.Invoice,
89
+ displayName: 'Invoice page',
90
+ description: 'One invoice: status, total, paid and balance due, its details, lines and payments, and its activity.',
91
+ titleField: 'number',
92
+ backScreen: 'invoicing.list',
93
+ backLabel: 'Back to invoices',
94
+ facts: [
95
+ {
96
+ id: 'total',
97
+ label: 'Invoice total',
98
+ field: 'total',
99
+ format: 'currency'
100
+ },
101
+ {
102
+ id: 'paid',
103
+ label: 'Paid',
104
+ field: 'paid',
105
+ format: 'currency'
106
+ },
107
+ {
108
+ id: 'balance',
109
+ label: 'Balance due',
110
+ field: 'balance',
111
+ format: 'currency'
112
+ },
113
+ {
114
+ id: 'days',
115
+ label: 'Days to due date',
116
+ field: 'daysToDue'
117
+ }
118
+ ],
119
+ extras: [
120
+ {
121
+ key: 'Lines',
122
+ label: 'Invoice lines',
123
+ titleField: 'description'
124
+ },
125
+ {
126
+ key: 'Payments',
127
+ label: 'Payments',
128
+ titleField: 'reference'
129
+ }
130
+ ],
131
+ actions: [
132
+ {
133
+ id: 'pay',
134
+ label: 'Record payment',
135
+ emphasis: 'primary',
136
+ dialog: 'InvoicingRecordPayment'
137
+ }
138
+ ]
139
+ });
140
+
141
+ export { invoicePageTemplate };
142
+ //# 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 { InvoicingEntityKind, currencyOfData, fromQuery, localeOfData, invoicingQueriesOf } from '../invoicingQueries';\nimport { actionButton, component, goesTo, invoicingMetadata, opensDialog, withBehaviors } from '../invoicingParts';\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: InvoicingEntityKind;\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 = invoicingQueriesOf(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: invoicingMetadata(options.name, 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n };\n}\n\n/** The invoice page: the invoice number as its title, its status, total, paid amount and balance due at the top, its fields, lines and payments in the main region, and the activity beside it. */\nexport const invoicePageTemplate = recordPageOf({\n name: 'InvoicePage', entity: InvoicingEntityKind.Invoice, displayName: 'Invoice page', description: 'One invoice: status, total, paid and balance due, its details, lines and payments, and its activity.', titleField: 'number', backScreen: 'invoicing.list', backLabel: 'Back to invoices',\n facts: [\n { id: 'total', label: 'Invoice total', field: 'total', format: 'currency' },\n { id: 'paid', label: 'Paid', field: 'paid', format: 'currency' },\n { id: 'balance', label: 'Balance due', field: 'balance', format: 'currency' },\n { id: 'days', label: 'Days to due date', field: 'daysToDue' },\n ],\n extras: [{ key: 'Lines', label: 'Invoice lines', titleField: 'description' }, { key: 'Payments', label: 'Payments', titleField: 'reference' }],\n actions: [{ id: 'pay', label: 'Record payment', emphasis: 'primary', dialog: 'InvoicingRecordPayment' }],\n});\n"],"names":["recordPageOf","options","queries","invoicingQueriesOf","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","invoicingMetadata","TemplateScope","Feature","Subfeature","invoicePageTemplate","InvoicingEntityKind","Invoice"],"mappings":";;;;;AAAA;AACA;AAwBA;;;IAIA,SAASA,aAAaC,OAAsB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,kBAAAA,CAAmBF,OAAAA,CAAQG,MAAM,CAAA;IACjD,MAAMC,EAAAA,GAAKJ,QAAQK,IAAI;IACvB,OAAO;AACHA,QAAAA,IAAAA,EAAML,QA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