@cratis/scene.blueprint.contracts 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/contractsApplication.ts +28 -0
  5. package/contractsParts.ts +58 -0
  6. package/contractsQueries.ts +56 -0
  7. package/contractsScreenSet.ts +21 -0
  8. package/dist/cjs/blueprint.js +19 -0
  9. package/dist/cjs/blueprint.js.map +1 -0
  10. package/dist/cjs/contractsApplication.js +49 -0
  11. package/dist/cjs/contractsApplication.js.map +1 -0
  12. package/dist/cjs/contractsParts.js +151 -0
  13. package/dist/cjs/contractsParts.js.map +1 -0
  14. package/dist/cjs/contractsQueries.js +64 -0
  15. package/dist/cjs/contractsQueries.js.map +1 -0
  16. package/dist/cjs/contractsScreenSet.js +40 -0
  17. package/dist/cjs/contractsScreenSet.js.map +1 -0
  18. package/dist/cjs/index.js +68 -0
  19. package/dist/cjs/index.js.map +1 -0
  20. package/dist/cjs/manifest.js +88 -0
  21. package/dist/cjs/manifest.js.map +1 -0
  22. package/dist/cjs/navigation.js +109 -0
  23. package/dist/cjs/navigation.js.map +1 -0
  24. package/dist/cjs/package.json +3 -0
  25. package/dist/cjs/packageName.js +8 -0
  26. package/dist/cjs/packageName.js.map +1 -0
  27. package/dist/cjs/screens/index.js +22 -0
  28. package/dist/cjs/screens/index.js.map +1 -0
  29. package/dist/cjs/templateProvenance.js +24 -0
  30. package/dist/cjs/templateProvenance.js.map +1 -0
  31. package/dist/cjs/templates/formTemplates.js +50 -0
  32. package/dist/cjs/templates/formTemplates.js.map +1 -0
  33. package/dist/cjs/templates/inboxTemplate.js +55 -0
  34. package/dist/cjs/templates/inboxTemplate.js.map +1 -0
  35. package/dist/cjs/templates/index.js +25 -0
  36. package/dist/cjs/templates/index.js.map +1 -0
  37. package/dist/cjs/templates/listTemplates.js +145 -0
  38. package/dist/cjs/templates/listTemplates.js.map +1 -0
  39. package/dist/cjs/templates/recordTemplates.js +135 -0
  40. package/dist/cjs/templates/recordTemplates.js.map +1 -0
  41. package/dist/cjs/templates/timelineTemplate.js +85 -0
  42. package/dist/cjs/templates/timelineTemplate.js.map +1 -0
  43. package/dist/esm/blueprint.d.ts +3 -0
  44. package/dist/esm/blueprint.d.ts.map +1 -0
  45. package/dist/esm/blueprint.js +17 -0
  46. package/dist/esm/blueprint.js.map +1 -0
  47. package/dist/esm/contractsApplication.d.ts +10 -0
  48. package/dist/esm/contractsApplication.d.ts.map +1 -0
  49. package/dist/esm/contractsApplication.js +44 -0
  50. package/dist/esm/contractsApplication.js.map +1 -0
  51. package/dist/esm/contractsParts.d.ts +16 -0
  52. package/dist/esm/contractsParts.d.ts.map +1 -0
  53. package/dist/esm/contractsParts.js +133 -0
  54. package/dist/esm/contractsParts.js.map +1 -0
  55. package/dist/esm/contractsQueries.d.ts +38 -0
  56. package/dist/esm/contractsQueries.d.ts.map +1 -0
  57. package/dist/esm/contractsQueries.js +56 -0
  58. package/dist/esm/contractsQueries.js.map +1 -0
  59. package/dist/esm/contractsScreenSet.d.ts +7 -0
  60. package/dist/esm/contractsScreenSet.d.ts.map +1 -0
  61. package/dist/esm/contractsScreenSet.js +38 -0
  62. package/dist/esm/contractsScreenSet.js.map +1 -0
  63. package/dist/esm/index.d.ts +12 -0
  64. package/dist/esm/index.d.ts.map +1 -0
  65. package/dist/esm/index.js +18 -0
  66. package/dist/esm/index.js.map +1 -0
  67. package/dist/esm/manifest.d.ts +3 -0
  68. package/dist/esm/manifest.d.ts.map +1 -0
  69. package/dist/esm/manifest.js +86 -0
  70. package/dist/esm/manifest.js.map +1 -0
  71. package/dist/esm/navigation.d.ts +5 -0
  72. package/dist/esm/navigation.d.ts.map +1 -0
  73. package/dist/esm/navigation.js +105 -0
  74. package/dist/esm/navigation.js.map +1 -0
  75. package/dist/esm/package.json +3 -0
  76. package/dist/esm/packageName.d.ts +2 -0
  77. package/dist/esm/packageName.d.ts.map +1 -0
  78. package/dist/esm/packageName.js +6 -0
  79. package/dist/esm/packageName.js.map +1 -0
  80. package/dist/esm/screens/index.d.ts +3 -0
  81. package/dist/esm/screens/index.d.ts.map +1 -0
  82. package/dist/esm/screens/index.js +20 -0
  83. package/dist/esm/screens/index.js.map +1 -0
  84. package/dist/esm/templateProvenance.d.ts +3 -0
  85. package/dist/esm/templateProvenance.d.ts.map +1 -0
  86. package/dist/esm/templateProvenance.js +22 -0
  87. package/dist/esm/templateProvenance.js.map +1 -0
  88. package/dist/esm/templates/formTemplates.d.ts +3 -0
  89. package/dist/esm/templates/formTemplates.d.ts.map +1 -0
  90. package/dist/esm/templates/formTemplates.js +48 -0
  91. package/dist/esm/templates/formTemplates.js.map +1 -0
  92. package/dist/esm/templates/inboxTemplate.d.ts +3 -0
  93. package/dist/esm/templates/inboxTemplate.d.ts.map +1 -0
  94. package/dist/esm/templates/inboxTemplate.js +53 -0
  95. package/dist/esm/templates/inboxTemplate.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 +17 -0
  99. package/dist/esm/templates/index.js.map +1 -0
  100. package/dist/esm/templates/listTemplates.d.ts +3 -0
  101. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  102. package/dist/esm/templates/listTemplates.js +143 -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 +133 -0
  107. package/dist/esm/templates/recordTemplates.js.map +1 -0
  108. package/dist/esm/templates/timelineTemplate.d.ts +3 -0
  109. package/dist/esm/templates/timelineTemplate.d.ts.map +1 -0
  110. package/dist/esm/templates/timelineTemplate.js +83 -0
  111. package/dist/esm/templates/timelineTemplate.js.map +1 -0
  112. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  113. package/index.ts +14 -0
  114. package/manifest.ts +41 -0
  115. package/navigation.ts +53 -0
  116. package/package.json +78 -4
  117. package/packageName.ts +5 -0
  118. package/sampleData/contracts-en.json +892 -0
  119. package/screens/index.ts +20 -0
  120. package/templateProvenance.ts +15 -0
  121. package/templates/formTemplates.ts +33 -0
  122. package/templates/inboxTemplate.ts +24 -0
  123. package/templates/index.ts +18 -0
  124. package/templates/listTemplates.ts +96 -0
  125. package/templates/recordTemplates.ts +78 -0
  126. package/templates/timelineTemplate.ts +54 -0
  127. package/thumbnails/ContractPage.svg +17 -0
  128. package/thumbnails/ContractsList.svg +29 -0
  129. package/thumbnails/ContractsQuickCreateContract.svg +12 -0
  130. package/thumbnails/ContractsReview.svg +19 -0
  131. package/thumbnails/ContractsTimeline.svg +11 -0
  132. package/thumbnails/contracts.svg +14 -0
@@ -0,0 +1,83 @@
1
+ import { TemplateScope } from '@cratis/scene.model';
2
+ import { timelineScreenTemplate, component } from '@cratis/scene.blueprint.default';
3
+ import { localeOfData, fromQuery, ContractsQuery } from '../contractsQueries.js';
4
+ import { contractsMetadata, withBehaviors, goesTo, actionButton } from '../contractsParts.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 timeline: the foundation `TimelineScreen` with every item as a bar in a lane, how far along it is, the milestones, what waits on what, and a conflict told in
10
+ * words when one lane's bars overlap. The scale is kept in the address; on a phone the schedule is the table, and the same items are listed beneath.
11
+ */ function timelineOf(options) {
12
+ const id = options.name;
13
+ return {
14
+ name: options.name,
15
+ fitsSlot: 'content',
16
+ slots: timelineScreenTemplate.slots,
17
+ arrangement: timelineScreenTemplate.arrangement,
18
+ content: {
19
+ header: [
20
+ component(`${id}-header`, 'pageHeader', {
21
+ title: options.title,
22
+ subtitle: options.subtitle
23
+ }, {
24
+ actions: [
25
+ withBehaviors(actionButton(`${id}-back`, options.back.label, 'secondary'), goesTo(options.back.screen))
26
+ ]
27
+ })
28
+ ],
29
+ toolbar: [
30
+ component(`${id}-search`, 'globalSearch', {
31
+ placeholder: options.searchLabel,
32
+ label: options.searchLabel,
33
+ urlKey: 'timelineq'
34
+ })
35
+ ],
36
+ timeline: [
37
+ component(`${id}-grid`, 'timelineGrid', {
38
+ label: options.label,
39
+ items: fromQuery(options.items),
40
+ today: fromQuery(ContractsQuery.Settings, '0.today'),
41
+ firstDay: fromQuery(ContractsQuery.Settings, '0.firstDay'),
42
+ urlKey: 'scale',
43
+ ...localeOfData
44
+ })
45
+ ],
46
+ list: [
47
+ component(`${id}-list`, 'dataList', {
48
+ label: options.listLabel,
49
+ rows: fromQuery(options.items),
50
+ columns: fromQuery(options.columns),
51
+ titleField: 'title',
52
+ pageSize: 8,
53
+ ...localeOfData
54
+ })
55
+ ]
56
+ },
57
+ displayName: options.displayName,
58
+ description: options.description,
59
+ metadata: contractsMetadata(options.name, 'Timeline', [
60
+ TemplateScope.Module,
61
+ TemplateScope.Feature
62
+ ])
63
+ };
64
+ }
65
+ /** The contracts timeline: each live contract as a bar in a lane for its counterparty, how far through its term it is, and a milestone for each notice date; the list beneath names the same terms. */ const contractsTimelineTemplate = timelineOf({
66
+ name: 'ContractsTimeline',
67
+ displayName: 'Contracts timeline',
68
+ description: 'Every live contract as a bar from start to end in a lane for each counterparty, with how far through it is and the notice dates that matter.',
69
+ title: 'Timeline',
70
+ subtitle: 'Terms and notice dates by counterparty',
71
+ label: 'Contract terms',
72
+ listLabel: 'Terms',
73
+ searchLabel: 'Search the timeline',
74
+ items: ContractsQuery.ContractTimelineItems,
75
+ columns: ContractsQuery.ContractTimelineColumns,
76
+ back: {
77
+ label: 'Open the contracts',
78
+ screen: 'contracts.list'
79
+ }
80
+ });
81
+
82
+ export { contractsTimelineTemplate };
83
+ //# sourceMappingURL=timelineTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"timelineTemplate.js","sources":["../../../templates/timelineTemplate.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 { timelineScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { ContractsQuery, fromQuery, localeOfData } from '../contractsQueries';\nimport { actionButton, component, goesTo, contractsMetadata, withBehaviors } from '../contractsParts';\n\ninterface TimelineOptions {\n name: string;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n label: string;\n listLabel: string;\n searchLabel: string;\n items: string;\n columns: string;\n back: { label: string; screen: string };\n}\n\n/**\n * One timeline: the foundation `TimelineScreen` with every item as a bar in a lane, how far along it is, the milestones, what waits on what, and a conflict told in\n * words when one lane's bars overlap. The scale is kept in the address; on a phone the schedule is the table, and the same items are listed beneath.\n */\nfunction timelineOf(options: TimelineOptions): ScreenTemplate {\n const id = options.name;\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: timelineScreenTemplate.slots,\n arrangement: timelineScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, {\n actions: [withBehaviors(actionButton(`${id}-back`, options.back.label, 'secondary'), goesTo(options.back.screen))],\n })],\n toolbar: [component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: 'timelineq' })],\n timeline: [component(`${id}-grid`, 'timelineGrid', {\n label: options.label, items: fromQuery(options.items), today: fromQuery(ContractsQuery.Settings, '0.today'), firstDay: fromQuery(ContractsQuery.Settings, '0.firstDay'), urlKey: 'scale', ...localeOfData,\n })],\n list: [component(`${id}-list`, 'dataList', { label: options.listLabel, rows: fromQuery(options.items), columns: fromQuery(options.columns), titleField: 'title', pageSize: 8, ...localeOfData })],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: contractsMetadata(options.name, 'Timeline', [TemplateScope.Module, TemplateScope.Feature]),\n };\n}\n\n/** The contracts timeline: each live contract as a bar in a lane for its counterparty, how far through its term it is, and a milestone for each notice date; the list beneath names the same terms. */\nexport const contractsTimelineTemplate = timelineOf({\n name: 'ContractsTimeline', displayName: 'Contracts timeline', description: 'Every live contract as a bar from start to end in a lane for each counterparty, with how far through it is and the notice dates that matter.', title: 'Timeline', subtitle: 'Terms and notice dates by counterparty', label: 'Contract terms', listLabel: 'Terms',\n searchLabel: 'Search the timeline', items: ContractsQuery.ContractTimelineItems, columns: ContractsQuery.ContractTimelineColumns, back: { label: 'Open the contracts', screen: 'contracts.list' },\n});\n"],"names":["timelineOf","options","id","name","fitsSlot","slots","timelineScreenTemplate","arrangement","content","header","component","title","subtitle","actions","withBehaviors","actionButton","back","label","goesTo","screen","toolbar","placeholder","searchLabel","urlKey","timeline","items","fromQuery","today","ContractsQuery","Settings","firstDay","localeOfData","list","listLabel","rows","columns","titleField","pageSize","displayName","description","metadata","contractsMetadata","TemplateScope","Module","Feature","contractsTimelineTemplate","ContractTimelineItems","ContractTimelineColumns"],"mappings":";;;;;AAAA;AACA;AAqBA;;;IAIA,SAASA,WAAWC,OAAwB,EAAA;IACxC,MAAMC,EAAAA,GAAKD,QAAQE,IAAI;IACvB,OAAO;AACHA,QAAAA,IAAAA,EAAMF,QAAQE,IAAI;QAClBC,QAAAA,EAAU,SAAA;AACVC,QAAAA,KAAAA,EAAOC,uBAAuBD,KAAK;AACnCE,QAAAA,WAAAA,EAAaD,uBAAuBC,WAAW;QAC/CC,OAAAA,EAAS;YACLC,MAAAA,EAAQ;AAACC,gBAAAA,SAAAA,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,aAAAA,CAAcC,aAAa,CAAA,EAAGb,EAAAA,CAAG,KAAK,CAAC,EAAED,OAAAA,CAAQe,IAAI,CAACC,KAAK,EAAE,WAAA,CAAA,EAAcC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