@cratis/scene.blueprint.contracts 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/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,133 @@
1
+ import { InteractionActionKind, InteractionTriggerKind, BindingSourceKind } from '@cratis/scene.model';
2
+ import { component } from '@cratis/scene.blueprint.default';
3
+ export { component, panel } from '@cratis/scene.blueprint.default';
4
+ import { contractsTemplateProvenance } from './templateProvenance.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
+ /** The category of every template of this blueprint (spec Part B 1.2: `Business / <domain>`). */ const contractsCategory = 'Business / Contracts';
9
+ /** The package-relative thumbnail of a template. */ const thumbnailOf = (templateName)=>`thumbnails/${templateName}.svg`;
10
+ /** 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 contractsMetadata = (name, type, scopes)=>({
11
+ ...contractsTemplateProvenance,
12
+ type,
13
+ category: contractsCategory,
14
+ thumbnail: thumbnailOf(name),
15
+ scopes
16
+ });
17
+ /** 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)=>({
18
+ ...component(id, 'actionButton', {
19
+ label,
20
+ emphasis,
21
+ permission: 'enabled',
22
+ ...extra
23
+ }),
24
+ ...behaviors ? {
25
+ behaviors
26
+ } : {}
27
+ });
28
+ /** What pressing an element does: open the named dialog template over the page. */ const opensDialog = (dialogTemplate)=>[
29
+ {
30
+ bindings: [
31
+ {
32
+ trigger: {
33
+ kind: InteractionTriggerKind.Click
34
+ },
35
+ actions: [
36
+ {
37
+ kind: InteractionActionKind.OpenDialog,
38
+ dialogTemplate
39
+ }
40
+ ]
41
+ }
42
+ ]
43
+ }
44
+ ];
45
+ /** What pressing an element does: go to the named screen. */ const goesTo = (screen)=>[
46
+ {
47
+ bindings: [
48
+ {
49
+ trigger: {
50
+ kind: InteractionTriggerKind.Click
51
+ },
52
+ actions: [
53
+ {
54
+ kind: InteractionActionKind.Navigate,
55
+ screen
56
+ }
57
+ ]
58
+ }
59
+ ]
60
+ }
61
+ ];
62
+ /**
63
+ * 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
64
+ * opening it - the way a table of records works everywhere.
65
+ */ const opensRecordOnSelect = (listId, screen)=>[
66
+ {
67
+ bindings: [
68
+ {
69
+ trigger: {
70
+ kind: InteractionTriggerKind.Select
71
+ },
72
+ actions: [
73
+ {
74
+ kind: InteractionActionKind.Navigate,
75
+ screen,
76
+ arguments: [
77
+ {
78
+ name: 'id',
79
+ value: {
80
+ kind: BindingSourceKind.ComponentProperty,
81
+ componentId: listId,
82
+ path: 'value'
83
+ }
84
+ }
85
+ ]
86
+ }
87
+ ]
88
+ }
89
+ ]
90
+ }
91
+ ];
92
+ /**
93
+ * 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.
94
+ */ const opensDialogOnSelect = (dialogTemplate)=>[
95
+ {
96
+ bindings: [
97
+ {
98
+ trigger: {
99
+ kind: InteractionTriggerKind.Select
100
+ },
101
+ actions: [
102
+ {
103
+ kind: InteractionActionKind.OpenDialog,
104
+ dialogTemplate
105
+ }
106
+ ]
107
+ }
108
+ ]
109
+ }
110
+ ];
111
+ /** What a Cancel or Close control does: close the dialog it was opened from. */ const closesDialog = ()=>[
112
+ {
113
+ bindings: [
114
+ {
115
+ trigger: {
116
+ kind: InteractionTriggerKind.Click
117
+ },
118
+ actions: [
119
+ {
120
+ kind: InteractionActionKind.CloseDialog
121
+ }
122
+ ]
123
+ }
124
+ ]
125
+ }
126
+ ];
127
+ /** An element with the given behaviors attached. */ const withBehaviors = (element, behaviors)=>({
128
+ ...element,
129
+ behaviors
130
+ });
131
+
132
+ export { actionButton, closesDialog, contractsCategory, contractsMetadata, goesTo, opensDialog, opensDialogOnSelect, opensRecordOnSelect, thumbnailOf, withBehaviors };
133
+ //# sourceMappingURL=contractsParts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsParts.js","sources":["../../contractsParts.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 { contractsTemplateProvenance } 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 contractsCategory = 'Business / Contracts';\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 contractsMetadata = (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace' | 'Calendar' | 'Timeline' | 'Inbox' | 'Profile' | 'Wizard', scopes: TemplateScope[]): TemplateMetadata =>\n ({ ...contractsTemplateProvenance, type, category: contractsCategory, 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 ContractsScreenTemplate = ScreenTemplate;\nexport type ContractsDialogTemplate = DialogTemplate;\n"],"names":["contractsCategory","thumbnailOf","templateName","contractsMetadata","name","type","scopes","contractsTemplateProvenance","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,iBAAAA,GAAoB;AAEjC,qDACO,MAAMC,WAAAA,GAAc,CAACC,YAAAA,GAAiC,CAAC,WAAW,EAAEA,YAAAA,CAAa,IAAI;AAE5F,4JACO,MAAMC,iBAAAA,GAAoB,CAACC,IAAAA,EAAcC,IAAAA,EAA8IC,UACzL;AAAE,QAAA,GAAGC,2BAA2B;AAAEF,QAAAA,IAAAA;QAAMG,QAAAA,EAAUR,iBAAAA;AAAmBS,QAAAA,SAAAA,EAAWR,WAAAA,CAAYG,IAAAA,CAAAA;AAAOE,QAAAA;AAAO,KAAA;AAE/G,0HACO,MAAMI,YAAAA,GAAe,CAACC,EAAAA,EAAYC,KAAAA,EAAeC,QAAAA,EAAwDC,KAAAA,GAAiC,EAAE,EAAEC,aAChJ;QAAE,GAAGC,SAAAA,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,uBAAuBC;AAAM,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBC,UAAU;AAAER,4BAAAA;AAAe;AAAsB;AAAC;AAAE;AAAC;;AAElK,8DACO,MAAMS,MAAAA,GAAS,CAACC,MAAAA,GACnB;AAAC,QAAA;YAAET,QAAAA,EAAU;AAAC,gBAAA;oBAAEC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBC;AAAM,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBI,QAAQ;AAAED,4BAAAA;AAAO;AAAoB;AAAC;AAAE;AAAC;;AAEtJ;;;AAGC,IACM,MAAME,mBAAAA,GAAsB,CAACC,QAAgBH,MAAAA,GAA+B;AAAC,QAAA;YAChFT,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBU;AAAO,qBAAA;oBAC/CR,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBI,QAAQ;AAAED,4BAAAA,MAAAA;4BAAQK,SAAAA,EAAW;AAAC,gCAAA;oCAAE9B,IAAAA,EAAM,IAAA;oCAAM+B,KAAAA,EAAO;AAAEb,wCAAAA,IAAAA,EAAMc,kBAAkBC,iBAAiB;wCAAEC,WAAAA,EAAaN,MAAAA;wCAAQO,IAAAA,EAAM;AAAQ;AAAE;AAAE;AAAC;AAAoB;AACxM;AAAE;AACN;;AAEA;;AAEC,IACM,MAAMC,mBAAAA,GAAsB,CAACrB,cAAAA,GAChC;AAAC,QAAA;YAAEC,QAAAA,EAAU;AAAC,gBAAA;oBAAEC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBU;AAAO,qBAAA;oBAAGR,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBC,UAAU;AAAER,4BAAAA;AAAe;AAAsB;AAAC;AAAE;AAAC;;AAEnK,iFACO,MAAMsB,YAAAA,GAAe,IAAkB;AAAC,QAAA;YAAErB,QAAAA,EAAU;AAAC,gBAAA;oBAAEC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBC;AAAM,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBgB;AAAY;AAAE;AAAC;AAAE;AAAC;;AAEzK,qDACO,MAAMC,gBAAgB,CAAyBC,OAAAA,EAAY7B,aAA8B;AAAE,QAAA,GAAG6B,OAAO;AAAE7B,QAAAA;AAAU,KAAA;;"}
@@ -0,0 +1,38 @@
1
+ import { BindingExpression } from '@cratis/scene.model';
2
+ export declare const fromQuery: (query: string, path?: string) => BindingExpression;
3
+ export declare const ContractsQuery: {
4
+ readonly Settings: 'ContractsSettings';
5
+ readonly ContractTimelineItems: 'ContractTimelineItems';
6
+ readonly ContractTimelineColumns: 'ContractTimelineColumns';
7
+ readonly ContractMessages: 'ContractMessages';
8
+ readonly ContractMessageSections: 'ContractMessageSections';
9
+ readonly ContractMessageValues: 'ContractMessageValues';
10
+ readonly ContractMessageHistory: 'ContractMessageHistory';
11
+ readonly FormErrors: 'ContractsFormErrors';
12
+ };
13
+ export declare enum ContractsEntityKind {
14
+ Contract = "Contract"
15
+ }
16
+ export declare const contractsEntityPlural: Record<ContractsEntityKind, string>;
17
+ export declare const contractsQueriesOf: (entity: ContractsEntityKind) => {
18
+ rows: string;
19
+ columns: string;
20
+ filterFields: string;
21
+ views: string;
22
+ columnChoices: string;
23
+ selection: string;
24
+ quickSections: string;
25
+ record: string;
26
+ sections: string;
27
+ summary: string;
28
+ activity: string;
29
+ tabs: string;
30
+ };
31
+ export declare const localeOfData: {
32
+ locale: BindingExpression;
33
+ };
34
+ export declare const currencyOfData: {
35
+ locale: BindingExpression;
36
+ currency: BindingExpression;
37
+ };
38
+ //# sourceMappingURL=contractsQueries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsQueries.d.ts","sourceRoot":"","sources":["../../contractsQueries.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,qBAAqB,CAAC;AAM3E,eAAO,MAAM,SAAS,UAAW,MAAM,oBAAc,iBAA2E,CAAC;AAGjI,eAAO,MAAM,cAAc;aAEvB,QAAQ,EAAE,mBAAmB;aAC7B,qBAAqB,EAAE,uBAAuB;aAC9C,uBAAuB,EAAE,yBAAyB;aAClD,gBAAgB,EAAE,kBAAkB;aACpC,uBAAuB,EAAE,yBAAyB;aAClD,qBAAqB,EAAE,uBAAuB;aAC9C,sBAAsB,EAAE,wBAAwB;aAChD,UAAU,EAAE,qBAAqB;CAC3B,CAAC;AAGX,oBAAY,mBAAmB;IAC3B,QAAQ,aAAa;CACxB;AAGD,eAAO,MAAM,qBAAqB,EAAE,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAErE,CAAC;AAMF,eAAO,MAAM,kBAAkB,WAAY,mBAAmB;IAC1D,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,KAAK;IACL,aAAa;IACb,SAAS;IACT,aAAa;IACb,MAAM;IACN,QAAQ;IACR,OAAO;IACP,QAAQ;IACR,IAAI;CACN,CAAC;AAGH,eAAO,MAAM,YAAY;IAAK,MAAM;CAAkD,CAAC;AACvF,eAAO,MAAM,cAAc;;;CAAkF,CAAC"}
@@ -0,0 +1,56 @@
1
+ import { BindingSourceKind } from '@cratis/scene.model';
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
+ * A property taken from a query result - never a value. A contracts template declares *where* its data comes from and the sample-data pack, or the real
7
+ * 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).
8
+ */ const fromQuery = (query, path = '')=>({
9
+ kind: BindingSourceKind.QueryResult,
10
+ query,
11
+ path
12
+ });
13
+ /** The queries of the screens that are not a plain list. Each is a shape the sample-data pack supplies rows for. */ const ContractsQuery = {
14
+ /** One row: the `locale` and `currency` the figures and dates are formatted in. */ Settings: 'ContractsSettings',
15
+ ContractTimelineItems: 'ContractTimelineItems',
16
+ ContractTimelineColumns: 'ContractTimelineColumns',
17
+ ContractMessages: 'ContractMessages',
18
+ ContractMessageSections: 'ContractMessageSections',
19
+ ContractMessageValues: 'ContractMessageValues',
20
+ ContractMessageHistory: 'ContractMessageHistory',
21
+ FormErrors: 'ContractsFormErrors'
22
+ };
23
+ /** The entities a template is made for. */ var ContractsEntityKind = /*#__PURE__*/ function(ContractsEntityKind) {
24
+ ContractsEntityKind["Contract"] = "Contract";
25
+ return ContractsEntityKind;
26
+ }({});
27
+ /** The read model (and so the shape) the records of each entity are queried from. */ const contractsEntityPlural = {
28
+ ["Contract"]: 'Contracts'
29
+ };
30
+ /**
31
+ * 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
32
+ * list, its saved views and column choices, the selection, the sections of the quick form, and what the record page shows.
33
+ */ const contractsQueriesOf = (entity)=>({
34
+ rows: contractsEntityPlural[entity],
35
+ columns: `${entity}Columns`,
36
+ filterFields: `${entity}FilterFields`,
37
+ views: `${entity}Views`,
38
+ columnChoices: `${entity}ColumnChoices`,
39
+ selection: `${entity}Selection`,
40
+ quickSections: `${entity}QuickSections`,
41
+ record: `${entity}Record`,
42
+ sections: `${entity}Sections`,
43
+ summary: `${entity}Summary`,
44
+ activity: `${entity}Activity`,
45
+ tabs: `${entity}Tabs`
46
+ });
47
+ /** The locale and currency of the data, bound onto every component that formats a figure or a date. */ const localeOfData = {
48
+ locale: fromQuery(ContractsQuery.Settings, '0.locale')
49
+ };
50
+ const currencyOfData = {
51
+ ...localeOfData,
52
+ currency: fromQuery(ContractsQuery.Settings, '0.currency')
53
+ };
54
+
55
+ export { ContractsEntityKind, ContractsQuery, contractsEntityPlural, contractsQueriesOf, currencyOfData, fromQuery, localeOfData };
56
+ //# sourceMappingURL=contractsQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsQueries.js","sources":["../../contractsQueries.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 contracts 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 ContractsQuery = {\n /** One row: the `locale` and `currency` the figures and dates are formatted in. */\n Settings: 'ContractsSettings',\n ContractTimelineItems: 'ContractTimelineItems',\n ContractTimelineColumns: 'ContractTimelineColumns',\n ContractMessages: 'ContractMessages',\n ContractMessageSections: 'ContractMessageSections',\n ContractMessageValues: 'ContractMessageValues',\n ContractMessageHistory: 'ContractMessageHistory',\n FormErrors: 'ContractsFormErrors',\n} as const;\n\n/** The entities a template is made for. */\nexport enum ContractsEntityKind {\n Contract = 'Contract',\n}\n\n/** The read model (and so the shape) the records of each entity are queried from. */\nexport const contractsEntityPlural: Record<ContractsEntityKind, string> = {\n [ContractsEntityKind.Contract]: 'Contracts',\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 contractsQueriesOf = (entity: ContractsEntityKind) => ({\n rows: contractsEntityPlural[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(ContractsQuery.Settings, '0.locale') };\nexport const currencyOfData = { ...localeOfData, currency: fromQuery(ContractsQuery.Settings, '0.currency') };\n"],"names":["fromQuery","query","path","kind","BindingSourceKind","QueryResult","ContractsQuery","Settings","ContractTimelineItems","ContractTimelineColumns","ContractMessages","ContractMessageSections","ContractMessageValues","ContractMessageHistory","FormErrors","ContractsEntityKind","contractsEntityPlural","contractsQueriesOf","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,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,kBAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,qHACO,MAAMI,cAAAA,GAAiB;AAC1B,wFACAC,QAAAA,EAAU,mBAAA;IACVC,qBAAAA,EAAuB,uBAAA;IACvBC,uBAAAA,EAAyB,yBAAA;IACzBC,gBAAAA,EAAkB,kBAAA;IAClBC,uBAAAA,EAAyB,yBAAA;IACzBC,qBAAAA,EAAuB,uBAAA;IACvBC,sBAAAA,EAAwB,wBAAA;IACxBC,UAAAA,EAAY;AAChB;AAEA,4CACO,IAAKC,mBAAAA,iBAAAA,SAAAA,mBAAAA,EAAAA;;AAAAA,IAAAA,OAAAA,mBAAAA;AAEX,CAAA,CAAA,EAAA;AAED,sFACO,MAAMC,qBAAAA,GAA6D;AACtE,IAAA,CAAA,UAAA,GAAgC;AACpC;AAEA;;;AAGC,IACM,MAAMC,kBAAAA,GAAqB,CAACC,UAAiC;QAChEC,IAAAA,EAAMH,qBAAqB,CAACE,MAAAA,CAAO;QACnCE,OAAAA,EAAS,CAAA,EAAGF,MAAAA,CAAO,OAAO,CAAC;QAC3BG,YAAAA,EAAc,CAAA,EAAGH,MAAAA,CAAO,YAAY,CAAC;QACrCI,KAAAA,EAAO,CAAA,EAAGJ,MAAAA,CAAO,KAAK,CAAC;QACvBK,aAAAA,EAAe,CAAA,EAAGL,MAAAA,CAAO,aAAa,CAAC;QACvCM,SAAAA,EAAW,CAAA,EAAGN,MAAAA,CAAO,SAAS,CAAC;QAC/BO,aAAAA,EAAe,CAAA,EAAGP,MAAAA,CAAO,aAAa,CAAC;QACvCQ,MAAAA,EAAQ,CAAA,EAAGR,MAAAA,CAAO,MAAM,CAAC;QACzBS,QAAAA,EAAU,CAAA,EAAGT,MAAAA,CAAO,QAAQ,CAAC;QAC7BU,OAAAA,EAAS,CAAA,EAAGV,MAAAA,CAAO,OAAO,CAAC;QAC3BW,QAAAA,EAAU,CAAA,EAAGX,MAAAA,CAAO,QAAQ,CAAC;QAC7BY,IAAAA,EAAM,CAAA,EAAGZ,MAAAA,CAAO,IAAI;AACxB,KAAA;AAEA,wGACO,MAAMa,YAAAA,GAAe;IAAEC,MAAAA,EAAQhC,SAAAA,CAAUM,cAAAA,CAAeC,QAAQ,EAAE,UAAA;AAAY;MACxE0B,cAAAA,GAAiB;AAAE,IAAA,GAAGF,YAAY;IAAEG,QAAAA,EAAUlC,SAAAA,CAAUM,cAAAA,CAAeC,QAAQ,EAAE,YAAA;AAAc;;"}
@@ -0,0 +1,7 @@
1
+ import { BlueprintScreen } from '@cratis/scene.model';
2
+ export interface ContractsScreenDefinition extends BlueprintScreen {
3
+ template: string;
4
+ description: string;
5
+ }
6
+ export declare const contractsScreenDefinitions: ContractsScreenDefinition[];
7
+ //# sourceMappingURL=contractsScreenSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsScreenSet.d.ts","sourceRoot":"","sources":["../../contractsScreenSet.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,WAAW,yBAA0B,SAAQ,eAAe;IAC9D,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAMD,eAAO,MAAM,0BAA0B,EAAE,yBAAyB,EAKjE,CAAC"}
@@ -0,0 +1,38 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /**
4
+ * The screens the blueprint brings, in navigation order. This one list is what the manifest's screen set, the `Screen` instances, the application structure
5
+ * and the navigation are all derived from, so they cannot disagree about which screens exist or where they sit.
6
+ */ const contractsScreenDefinitions = [
7
+ {
8
+ name: 'contracts.list',
9
+ title: 'Contracts',
10
+ template: 'ContractsList',
11
+ order: 0,
12
+ description: 'Every contract with who it is with, when it ends and what it is worth.'
13
+ },
14
+ {
15
+ name: 'contracts.record',
16
+ title: 'Contract',
17
+ template: 'ContractPage',
18
+ parent: 'contracts.list',
19
+ description: 'One contract: key facts, parties, obligations, amendments and activity.'
20
+ },
21
+ {
22
+ name: 'contracts.timeline',
23
+ title: 'Timeline',
24
+ template: 'ContractsTimeline',
25
+ order: 1,
26
+ description: 'Every live contract on a schedule, in a lane for each counterparty, with its notice dates.'
27
+ },
28
+ {
29
+ name: 'contracts.review',
30
+ title: 'Needs attention',
31
+ template: 'ContractsReview',
32
+ order: 2,
33
+ description: 'What needs your review, your signature or a renewal decision.'
34
+ }
35
+ ];
36
+
37
+ export { contractsScreenDefinitions };
38
+ //# sourceMappingURL=contractsScreenSet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contractsScreenSet.js","sources":["../../contractsScreenSet.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 (`contracts.list.record` would be the `record` feature of `list`). */\nexport interface ContractsScreenDefinition 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 contractsScreenDefinitions: ContractsScreenDefinition[] = [\n { name: 'contracts.list', title: 'Contracts', template: 'ContractsList', order: 0, description: 'Every contract with who it is with, when it ends and what it is worth.' },\n { name: 'contracts.record', title: 'Contract', template: 'ContractPage', parent: 'contracts.list', description: 'One contract: key facts, parties, obligations, amendments and activity.' },\n { name: 'contracts.timeline', title: 'Timeline', template: 'ContractsTimeline', order: 1, description: 'Every live contract on a schedule, in a lane for each counterparty, with its notice dates.' },\n { name: 'contracts.review', title: 'Needs attention', template: 'ContractsReview', order: 2, description: 'What needs your review, your signature or a renewal decision.' },\n];\n"],"names":["contractsScreenDefinitions","name","title","template","order","description","parent"],"mappings":"AAAA;AACA;AAUA;;;UAIaA,0BAAAA,GAA0D;AACnE,IAAA;QAAEC,IAAAA,EAAM,gBAAA;QAAkBC,KAAAA,EAAO,WAAA;QAAaC,QAAAA,EAAU,eAAA;QAAiBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAyE,KAAA;AACzK,IAAA;QAAEJ,IAAAA,EAAM,kBAAA;QAAoBC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,cAAA;QAAgBG,MAAAA,EAAQ,gBAAA;QAAkBD,WAAAA,EAAa;AAA0E,KAAA;AAC1L,IAAA;QAAEJ,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,mBAAA;QAAqBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAA6F,KAAA;AACpM,IAAA;QAAEJ,IAAAA,EAAM,kBAAA;QAAoBC,KAAAA,EAAO,iBAAA;QAAmBC,QAAAA,EAAU,iBAAA;QAAmBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAgE;;;"}
@@ -0,0 +1,12 @@
1
+ export * from './packageName';
2
+ export * from './templateProvenance';
3
+ export * from './contractsQueries';
4
+ export * from './contractsParts';
5
+ export * from './contractsScreenSet';
6
+ export * from './templates';
7
+ export * from './screens';
8
+ export * from './navigation';
9
+ export * from './manifest';
10
+ export * from './blueprint';
11
+ export * from './contractsApplication';
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,oBAAoB,CAAC;AACnC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,wBAAwB,CAAC"}
@@ -0,0 +1,18 @@
1
+ export { contractsBlueprintName } from './packageName.js';
2
+ export { contractsTemplateProvenance } from './templateProvenance.js';
3
+ export { ContractsEntityKind, ContractsQuery, contractsEntityPlural, contractsQueriesOf, currencyOfData, fromQuery, localeOfData } from './contractsQueries.js';
4
+ export { actionButton, closesDialog, contractsCategory, contractsMetadata, goesTo, opensDialog, opensDialogOnSelect, opensRecordOnSelect, thumbnailOf, withBehaviors } from './contractsParts.js';
5
+ export { contractsScreenDefinitions } from './contractsScreenSet.js';
6
+ export { contractsScreenTemplates } from './templates/index.js';
7
+ export { contractsScreens } from './screens/index.js';
8
+ export { contractsModule, contractsNavigation, contractsStructure } from './navigation.js';
9
+ export { contractsBlueprintManifest } from './manifest.js';
10
+ export { contractsBlueprint } from './blueprint.js';
11
+ export { contractsApplication, contractsComposition, contractsDefaultSampleDataId, contractsNavigationModel } from './contractsApplication.js';
12
+ export { component, panel } from '@cratis/scene.blueprint.default';
13
+ export { contractPageTemplate } from './templates/recordTemplates.js';
14
+ export { contractsDialogs as contractsDialogTemplates, contractsDialogs } from './templates/formTemplates.js';
15
+ export { contractsListTemplate } from './templates/listTemplates.js';
16
+ export { contractsReviewTemplate } from './templates/inboxTemplate.js';
17
+ export { contractsTimelineTemplate } from './templates/timelineTemplate.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 contractsBlueprintManifest: 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,0BAA0B,EAAE,YAyBxC,CAAC"}
@@ -0,0 +1,86 @@
1
+ import { PackageKind } from '@cratis/scene.model';
2
+ import { contractsBlueprintName } from './packageName.js';
3
+ import { contractsScreenDefinitions } from './contractsScreenSet.js';
4
+ import { contractsScreenTemplates } from './templates/index.js';
5
+ import { contractsDialogs } from './templates/formTemplates.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
+ const description = 'Contracts for a legal or procurement team: a contract list, a contract page with its parties, obligations and amendments, a timeline of terms and an inbox for what needs review or signature.';
10
+ /**
11
+ * This blueprint's declaration. A domain blueprint depends on the foundation set (`Cratis.Blueprint.Default`) and reuses its layouts, slots,
12
+ * components and themes - it ships none of its own - and adds what is specific to the domain: templates, a ready-to-use screen set, sample data
13
+ * and thumbnails. The package `version` is the blueprint's version: it is what a template reference pins and what "update available" compares.
14
+ */ const contractsBlueprintManifest = {
15
+ name: contractsBlueprintName,
16
+ version: '1.0.0',
17
+ kind: PackageKind.Blueprint,
18
+ dependencies: [
19
+ {
20
+ name: 'Cratis.Blueprint.Default',
21
+ versionRange: '^1.0.0'
22
+ }
23
+ ],
24
+ components: [],
25
+ layouts: [],
26
+ screenTemplates: contractsScreenTemplates.map((template)=>template.name),
27
+ dialogTemplates: contractsDialogs.map((template)=>template.name),
28
+ themes: [],
29
+ displayName: 'Contracts',
30
+ description,
31
+ module: '@cratis/scene.blueprint.contracts',
32
+ license: 'MIT',
33
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
34
+ sampleData: [
35
+ {
36
+ id: 'contracts-en',
37
+ title: 'Contracts · English',
38
+ locale: 'en-GB',
39
+ path: 'sampleData/contracts-en.json',
40
+ description: 'English contract data: twelve contracts from draft to expired, one contract\'s parties, obligations and amendments, the terms on a timeline and the review queue.',
41
+ columns: [
42
+ 'Contract',
43
+ 'Title',
44
+ 'Counterparty',
45
+ 'Ends',
46
+ 'Value'
47
+ ],
48
+ statusColumn: 'Status',
49
+ statuses: {
50
+ good: [
51
+ 'Active'
52
+ ],
53
+ pending: [
54
+ 'Draft',
55
+ 'In review',
56
+ 'Expiring'
57
+ ],
58
+ bad: [
59
+ 'Expired',
60
+ 'Terminated'
61
+ ]
62
+ }
63
+ }
64
+ ],
65
+ blueprint: {
66
+ domain: 'contracts',
67
+ description,
68
+ thumbnail: 'thumbnails/contracts.svg',
69
+ screenSet: contractsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order })=>({
70
+ name,
71
+ title,
72
+ description: screenDescription,
73
+ template,
74
+ ...parent === undefined ? {} : {
75
+ parent
76
+ },
77
+ ...order === undefined ? {} : {
78
+ order
79
+ }
80
+ })),
81
+ defaultSampleData: 'contracts-en'
82
+ }
83
+ };
84
+
85
+ export { contractsBlueprintManifest };
86
+ //# sourceMappingURL=manifest.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"manifest.js","sources":["../../manifest.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 { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { contractsBlueprintName } from './packageName';\nimport { contractsScreenDefinitions } from './contractsScreenSet';\nimport { contractsDialogTemplates, contractsScreenTemplates } from './templates';\n\nconst description = 'Contracts for a legal or procurement team: a contract list, a contract page with its parties, obligations and amendments, a timeline of terms and an inbox for what needs review or signature.';\n\n/**\n * This blueprint's declaration. A domain blueprint depends on the foundation set (`Cratis.Blueprint.Default`) and reuses its layouts, slots,\n * components and themes - it ships none of its own - and adds what is specific to the domain: templates, a ready-to-use screen set, sample data\n * and thumbnails. The package `version` is the blueprint's version: it is what a template reference pins and what \"update available\" compares.\n */\nexport const contractsBlueprintManifest: ScenePackage = {\n name: contractsBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default', versionRange: '^1.0.0' }],\n components: [],\n layouts: [],\n screenTemplates: contractsScreenTemplates.map(template => template.name),\n dialogTemplates: contractsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Contracts',\n description,\n module: '@cratis/scene.blueprint.contracts',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n sampleData: [{ id: 'contracts-en', title: 'Contracts · English', locale: 'en-GB', path: 'sampleData/contracts-en.json', description: 'English contract data: twelve contracts from draft to expired, one contract\\'s parties, obligations and amendments, the terms on a timeline and the review queue.', columns: ['Contract', 'Title', 'Counterparty', 'Ends', 'Value'], statusColumn: 'Status', statuses: { good: ['Active'], pending: ['Draft', 'In review', 'Expiring'], bad: ['Expired', 'Terminated'] } }],\n blueprint: {\n domain: 'contracts',\n description,\n thumbnail: 'thumbnails/contracts.svg',\n screenSet: contractsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({\n name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),\n })),\n defaultSampleData: 'contracts-en',\n },\n};\n"],"names":["description","contractsBlueprintManifest","name","contractsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","versionRange","components","layouts","screenTemplates","contractsScreenTemplates","map","template","dialogTemplates","contractsDialogTemplates","themes","displayName","module","license","licenseUrl","sampleData","id","title","locale","path","columns","statusColumn","statuses","good","pending","bad","blueprint","domain","thumbnail","screenSet","contractsScreenDefinitions","screenDescription","parent","order","undefined","defaultSampleData"],"mappings":";;;;;;AAAA;AACA;AAOA,MAAMA,WAAAA,GAAc,gMAAA;AAEpB;;;;UAKaC,0BAAAA,GAA2C;IACpDC,IAAAA,EAAMC,sBAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,YAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM,0BAAA;YAA4BO,YAAAA,EAAc;AAAS;AAAE,KAAA;AAC5EC,IAAAA,UAAAA,EAAY,EAAE;AACdC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,yBAAyBC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AACvEc,IAAAA,eAAAA,EAAiBC,iBAAyBH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AACvEgB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,WAAA;AACbnB,IAAAA,WAAAA;IACAoB,MAAAA,EAAQ,mCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY,mDAAA;IACZC,UAAAA,EAAY;AAAC,QAAA;YAAEC,EAAAA,EAAI,cAAA;YAAgBC,KAAAA,EAAO,qBAAA;YAAuBC,MAAAA,EAAQ,OAAA;YAASC,IAAAA,EAAM,8BAAA;YAAgC3B,WAAAA,EAAa,mKAAA;YAAqK4B,OAAAA,EAAS;AAAC,gBAAA,UAAA;AAAY,gBAAA,OAAA;AAAS,gBAAA,cAAA;AAAgB,gBAAA,MAAA;AAAQ,gBAAA;AAAQ,aAAA;YAAEC,YAAAA,EAAc,QAAA;YAAUC,QAAAA,EAAU;gBAAEC,IAAAA,EAAM;AAAC,oBAAA;AAAS,iBAAA;gBAAEC,OAAAA,EAAS;AAAC,oBAAA,OAAA;AAAS,oBAAA,WAAA;AAAa,oBAAA;AAAW,iBAAA;gBAAEC,GAAAA,EAAK;AAAC,oBAAA,SAAA;AAAW,oBAAA;AAAa;AAAC;AAAE;AAAE,KAAA;IACjfC,SAAAA,EAAW;QACPC,MAAAA,EAAQ,WAAA;AACRnC,QAAAA,WAAAA;QACAoC,SAAAA,EAAW,0BAAA;AACXC,QAAAA,SAAAA,EAAWC,2BAA2BxB,GAAG,CAAC,CAAC,EAAEZ,IAAI,EAAEuB,KAAK,EAAEzB,aAAauC,iBAAiB,EAAExB,QAAQ,EAAEyB,MAAM,EAAEC,KAAK,EAAE,IAAM;AACrHvC,gBAAAA,IAAAA;AAAMuB,gBAAAA,KAAAA;gBAAOzB,WAAAA,EAAauC,iBAAAA;AAAmBxB,gBAAAA,QAAAA;gBAAU,GAAIyB,MAAAA,KAAWE,SAAAA,GAAY,EAAC,GAAI;AAAEF,oBAAAA;iBAAQ;gBAAG,GAAIC,KAAAA,KAAUC,SAAAA,GAAY,EAAC,GAAI;AAAED,oBAAAA;;aACzI,CAAA,CAAA;QACAE,iBAAAA,EAAmB;AACvB;AACJ;;"}
@@ -0,0 +1,5 @@
1
+ import { ApplicationStructure, NavigationModel } from '@cratis/scene.model';
2
+ export declare const contractsModule = "contracts";
3
+ export declare const contractsStructure: ApplicationStructure;
4
+ export declare const contractsNavigation: NavigationModel;
5
+ //# sourceMappingURL=navigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../navigation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAA8C,MAAM,qBAAqB,CAAC;AAIxH,eAAO,MAAM,eAAe,cAAc,CAAC;AAM3C,eAAO,MAAM,kBAAkB,EAAE,oBAgB7B,CAAC;AAML,eAAO,MAAM,mBAAmB,EAAE,eAiBjC,CAAC"}
@@ -0,0 +1,105 @@
1
+ import { NavigationRegionMode, NavigationRegionKind } from '@cratis/scene.model';
2
+ import { contractsScreenDefinitions } from './contractsScreenSet.js';
3
+
4
+ // Copyright (c) Cratis. All rights reserved.
5
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
6
+ /** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */ const contractsModule = 'contracts';
7
+ /**
8
+ * The application structure the screen set implies: one module, `contracts`, a feature for each screen and the sub-features beneath it (`contracts.record` is the
9
+ * `record` feature of the module). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.
10
+ */ const contractsStructure = (()=>{
11
+ const root = {
12
+ id: contractsModule,
13
+ name: 'Contracts',
14
+ features: []};
15
+ for (const screen of contractsScreenDefinitions){
16
+ let parent = root;
17
+ for (const id of screen.name.split('.').slice(1)){
18
+ let node = parent.features.find((candidate)=>candidate.id === id);
19
+ if (!node) {
20
+ node = {
21
+ id,
22
+ name: screen.title,
23
+ features: [],
24
+ slices: []
25
+ };
26
+ parent.features.push(node);
27
+ }
28
+ parent = node;
29
+ }
30
+ }
31
+ return {
32
+ modules: [
33
+ {
34
+ id: root.id,
35
+ name: root.name,
36
+ features: root.features
37
+ }
38
+ ]
39
+ };
40
+ })();
41
+ /**
42
+ * The navigation of the application the blueprint is: the topbar names the module, and the module's sidebar - which overrides the application's - lists
43
+ * the places a team goes: Contracts, Timeline, Needs attention.
44
+ */ const contractsNavigation = {
45
+ application: {
46
+ logo: {
47
+ image: '',
48
+ title: 'Contracts'
49
+ },
50
+ regions: [
51
+ {
52
+ region: NavigationRegionKind.Topbar,
53
+ items: [
54
+ {
55
+ id: 'contracts',
56
+ title: 'Contracts',
57
+ target: {
58
+ module: contractsModule
59
+ }
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ },
65
+ modules: [
66
+ {
67
+ module: contractsModule,
68
+ regions: [
69
+ {
70
+ region: NavigationRegionKind.Sidebar,
71
+ mode: NavigationRegionMode.Override,
72
+ items: [
73
+ {
74
+ id: 'list',
75
+ title: 'Contracts',
76
+ target: {
77
+ module: contractsModule,
78
+ feature: 'list'
79
+ }
80
+ },
81
+ {
82
+ id: 'timeline',
83
+ title: 'Timeline',
84
+ target: {
85
+ module: contractsModule,
86
+ feature: 'timeline'
87
+ }
88
+ },
89
+ {
90
+ id: 'review',
91
+ title: 'Needs attention',
92
+ target: {
93
+ module: contractsModule,
94
+ feature: 'review'
95
+ }
96
+ }
97
+ ]
98
+ }
99
+ ]
100
+ }
101
+ ]
102
+ };
103
+
104
+ export { contractsModule, contractsNavigation, contractsStructure };
105
+ //# sourceMappingURL=navigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"navigation.js","sources":["../../navigation.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 { ApplicationStructure, NavigationModel, NavigationRegionKind, NavigationRegionMode } from '@cratis/scene.model';\nimport { contractsScreenDefinitions } from './contractsScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const contractsModule = 'contracts';\n\n/**\n * The application structure the screen set implies: one module, `contracts`, a feature for each screen and the sub-features beneath it (`contracts.record` is the\n * `record` feature of the module). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const contractsStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: contractsModule, name: 'Contracts', features: [], slices: [] };\n for (const screen of contractsScreenDefinitions) {\n let parent = root;\n for (const id of screen.name.split('.').slice(1)) {\n let node = parent.features.find(candidate => candidate.id === id);\n if (!node) {\n node = { id, name: screen.title, features: [], slices: [] };\n parent.features.push(node);\n }\n parent = node;\n }\n }\n\n return { modules: [{ id: root.id, name: root.name, features: root.features }] } as unknown as ApplicationStructure;\n})();\n\n/**\n * The navigation of the application the blueprint is: the topbar names the module, and the module's sidebar - which overrides the application's - lists\n * the places a team goes: Contracts, Timeline, Needs attention.\n */\nexport const contractsNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Contracts' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'contracts', title: 'Contracts', target: { module: contractsModule } }] }],\n },\n modules: [{\n module: contractsModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'list', title: 'Contracts', target: { module: contractsModule, feature: 'list' } },\n { id: 'timeline', title: 'Timeline', target: { module: contractsModule, feature: 'timeline' } },\n { id: 'review', title: 'Needs attention', target: { module: contractsModule, feature: 'review' } },\n ],\n }],\n }],\n};\n"],"names":["contractsModule","contractsStructure","root","id","name","features","screen","contractsScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","contractsNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature"],"mappings":";;;AAAA;AACA;AAKA,8GACO,MAAMA,eAAAA,GAAkB;AAE/B;;;AAGC,IACM,MAAMC,kBAAAA,GAA4C,CAAA,IAAA;AAErD,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,eAAAA;QAAiBI,IAAAA,EAAM,WAAA;AAAaC,QAAAA,QAAAA,EAAU,EAAe,CAAA;IACtF,KAAK,MAAMC,UAAUC,0BAAAA,CAA4B;AAC7C,QAAA,IAAIC,MAAAA,GAASN,IAAAA;QACb,KAAK,MAAMC,EAAAA,IAAMG,MAAAA,CAAOF,IAAI,CAACK,KAAK,CAAC,GAAA,CAAA,CAAKC,KAAK,CAAC,CAAA,CAAA,CAAI;YAC9C,IAAIC,IAAAA,GAAOH,MAAAA,CAAOH,QAAQ,CAACO,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUV,EAAE,KAAKA,EAAAA,CAAAA;AAC9D,YAAA,IAAI,CAACQ,IAAAA,EAAM;gBACPA,IAAAA,GAAO;AAAER,oBAAAA,EAAAA;AAAIC,oBAAAA,IAAAA,EAAME,OAAOQ,KAAK;AAAET,oBAAAA,QAAAA,EAAU,EAAE;AAAEU,oBAAAA,MAAAA,EAAQ;AAAG,iBAAA;gBAC1DP,MAAAA,CAAOH,QAAQ,CAACW,IAAI,CAACL,IAAAA,CAAAA;AACzB,YAAA;YACAH,MAAAA,GAASG,IAAAA;AACb,QAAA;AACJ,IAAA;IAEA,OAAO;QAAEM,OAAAA,EAAS;AAAC,YAAA;AAAEd,gBAAAA,EAAAA,EAAID,KAAKC,EAAE;AAAEC,gBAAAA,IAAAA,EAAMF,KAAKE,IAAI;AAAEC,gBAAAA,QAAAA,EAAUH,KAAKG;AAAS;AAAE;AAAC,KAAA;AAClF,CAAA;AAEA;;;UAIaa,mBAAAA,GAAuC;IAChDC,WAAAA,EAAa;QACTC,IAAAA,EAAM;YAAEC,KAAAA,EAAO,EAAA;YAAIP,KAAAA,EAAO;AAAY,SAAA;QACtCQ,OAAAA,EAAS;AAAC,YAAA;AAAEC,gBAAAA,MAAAA,EAAQC,qBAAqBC,MAAM;gBAAEC,KAAAA,EAAO;AAAC,oBAAA;wBAAEvB,EAAAA,EAAI,WAAA;wBAAaW,KAAAA,EAAO,WAAA;wBAAaa,MAAAA,EAAQ;4BAAEC,MAAAA,EAAQ5B;AAAgB;AAAE;AAAE;AAAC;AAAE;AAC7I,KAAA;IACAiB,OAAAA,EAAS;AAAC,QAAA;YACNW,MAAAA,EAAQ5B,eAAAA;YACRsB,OAAAA,EAAS;AAAC,gBAAA;AACNC,oBAAAA,MAAAA,EAAQC,qBAAqBK,OAAO;AACpCC,oBAAAA,IAAAA,EAAMC,qBAAqBC,QAAQ;oBACnCN,KAAAA,EAAO;AACH,wBAAA;4BAAEvB,EAAAA,EAAI,MAAA;4BAAQW,KAAAA,EAAO,WAAA;4BAAaa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAO;AAAE,yBAAA;AACvF,wBAAA;4BAAE9B,EAAAA,EAAI,UAAA;4BAAYW,KAAAA,EAAO,UAAA;4BAAYa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAW;AAAE,yBAAA;AAC9F,wBAAA;4BAAE9B,EAAAA,EAAI,QAAA;4BAAUW,KAAAA,EAAO,iBAAA;4BAAmBa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAS;AAAE;AACpG;AACL;AAAE;AACN;AAAE;AACN;;"}
@@ -0,0 +1,3 @@
1
+ {
2
+ "type": "module"
3
+ }
@@ -0,0 +1,2 @@
1
+ export declare const contractsBlueprintName = "Cratis.Blueprint.Contracts";
2
+ //# sourceMappingURL=packageName.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageName.d.ts","sourceRoot":"","sources":["../../packageName.ts"],"names":[],"mappings":"AAIA,eAAO,MAAM,sBAAsB,+BAA+B,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Copyright (c) Cratis. All rights reserved.
2
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
+ /** The name this blueprint is known by inside a `ui profile`; every component registry key is built from it. */ const contractsBlueprintName = 'Cratis.Blueprint.Contracts';
4
+
5
+ export { contractsBlueprintName };
6
+ //# sourceMappingURL=packageName.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"packageName.js","sources":["../../packageName.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\n/** The name this blueprint is known by inside a `ui profile`; every component registry key is built from it. */\nexport const contractsBlueprintName = 'Cratis.Blueprint.Contracts';\n"],"names":["contractsBlueprintName"],"mappings":"AAAA;AACA;AAEA,iHACO,MAAMA,sBAAAA,GAAyB;;"}
@@ -0,0 +1,3 @@
1
+ import { Screen } from '@cratis/scene.model';
2
+ export declare const contractsScreens: Screen[];
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../screens/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAQ7C,eAAO,MAAM,gBAAgB,EAAE,MAAM,EAQlC,CAAC"}