@cratis/scene.blueprint.hr 0.0.0-stage → 4.53.1

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 (129) hide show
  1. package/README.md +66 -2
  2. package/blueprint.ts +16 -0
  3. package/blueprintCatalog.json +164 -0
  4. package/dist/cjs/blueprint.js +19 -0
  5. package/dist/cjs/blueprint.js.map +1 -0
  6. package/dist/cjs/hrApplication.js +49 -0
  7. package/dist/cjs/hrApplication.js.map +1 -0
  8. package/dist/cjs/hrParts.js +131 -0
  9. package/dist/cjs/hrParts.js.map +1 -0
  10. package/dist/cjs/hrQueries.js +67 -0
  11. package/dist/cjs/hrQueries.js.map +1 -0
  12. package/dist/cjs/hrScreenSet.js +61 -0
  13. package/dist/cjs/hrScreenSet.js.map +1 -0
  14. package/dist/cjs/index.js +69 -0
  15. package/dist/cjs/index.js.map +1 -0
  16. package/dist/cjs/manifest.js +65 -0
  17. package/dist/cjs/manifest.js.map +1 -0
  18. package/dist/cjs/navigation.js +135 -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/formTemplates.js +51 -0
  28. package/dist/cjs/templates/formTemplates.js.map +1 -0
  29. package/dist/cjs/templates/index.js +30 -0
  30. package/dist/cjs/templates/index.js.map +1 -0
  31. package/dist/cjs/templates/listTemplates.js +210 -0
  32. package/dist/cjs/templates/listTemplates.js.map +1 -0
  33. package/dist/cjs/templates/orgChartTemplate.js +63 -0
  34. package/dist/cjs/templates/orgChartTemplate.js.map +1 -0
  35. package/dist/cjs/templates/recordTemplates.js +181 -0
  36. package/dist/cjs/templates/recordTemplates.js.map +1 -0
  37. package/dist/esm/blueprint.d.ts +3 -0
  38. package/dist/esm/blueprint.d.ts.map +1 -0
  39. package/dist/esm/blueprint.js +17 -0
  40. package/dist/esm/blueprint.js.map +1 -0
  41. package/dist/esm/hrApplication.d.ts +10 -0
  42. package/dist/esm/hrApplication.d.ts.map +1 -0
  43. package/dist/esm/hrApplication.js +44 -0
  44. package/dist/esm/hrApplication.js.map +1 -0
  45. package/dist/esm/hrParts.d.ts +15 -0
  46. package/dist/esm/hrParts.d.ts.map +1 -0
  47. package/dist/esm/hrParts.js +114 -0
  48. package/dist/esm/hrParts.js.map +1 -0
  49. package/dist/esm/hrQueries.d.ts +38 -0
  50. package/dist/esm/hrQueries.d.ts.map +1 -0
  51. package/dist/esm/hrQueries.js +59 -0
  52. package/dist/esm/hrQueries.js.map +1 -0
  53. package/dist/esm/hrScreenSet.d.ts +7 -0
  54. package/dist/esm/hrScreenSet.d.ts.map +1 -0
  55. package/dist/esm/hrScreenSet.js +59 -0
  56. package/dist/esm/hrScreenSet.js.map +1 -0
  57. package/dist/esm/index.d.ts +12 -0
  58. package/dist/esm/index.d.ts.map +1 -0
  59. package/dist/esm/index.js +17 -0
  60. package/dist/esm/index.js.map +1 -0
  61. package/dist/esm/manifest.d.ts +3 -0
  62. package/dist/esm/manifest.d.ts.map +1 -0
  63. package/dist/esm/manifest.js +63 -0
  64. package/dist/esm/manifest.js.map +1 -0
  65. package/dist/esm/navigation.d.ts +5 -0
  66. package/dist/esm/navigation.d.ts.map +1 -0
  67. package/dist/esm/navigation.js +131 -0
  68. package/dist/esm/navigation.js.map +1 -0
  69. package/dist/esm/package.json +3 -0
  70. package/dist/esm/packageName.d.ts +2 -0
  71. package/dist/esm/packageName.d.ts.map +1 -0
  72. package/dist/esm/packageName.js +6 -0
  73. package/dist/esm/packageName.js.map +1 -0
  74. package/dist/esm/screens/index.d.ts +3 -0
  75. package/dist/esm/screens/index.d.ts.map +1 -0
  76. package/dist/esm/screens/index.js +20 -0
  77. package/dist/esm/screens/index.js.map +1 -0
  78. package/dist/esm/templateProvenance.d.ts +3 -0
  79. package/dist/esm/templateProvenance.d.ts.map +1 -0
  80. package/dist/esm/templateProvenance.js +22 -0
  81. package/dist/esm/templateProvenance.js.map +1 -0
  82. package/dist/esm/templates/formTemplates.d.ts +3 -0
  83. package/dist/esm/templates/formTemplates.d.ts.map +1 -0
  84. package/dist/esm/templates/formTemplates.js +49 -0
  85. package/dist/esm/templates/formTemplates.js.map +1 -0
  86. package/dist/esm/templates/index.d.ts +7 -0
  87. package/dist/esm/templates/index.d.ts.map +1 -0
  88. package/dist/esm/templates/index.js +19 -0
  89. package/dist/esm/templates/index.js.map +1 -0
  90. package/dist/esm/templates/listTemplates.d.ts +6 -0
  91. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  92. package/dist/esm/templates/listTemplates.js +205 -0
  93. package/dist/esm/templates/listTemplates.js.map +1 -0
  94. package/dist/esm/templates/orgChartTemplate.d.ts +3 -0
  95. package/dist/esm/templates/orgChartTemplate.d.ts.map +1 -0
  96. package/dist/esm/templates/orgChartTemplate.js +61 -0
  97. package/dist/esm/templates/orgChartTemplate.js.map +1 -0
  98. package/dist/esm/templates/recordTemplates.d.ts +4 -0
  99. package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
  100. package/dist/esm/templates/recordTemplates.js +178 -0
  101. package/dist/esm/templates/recordTemplates.js.map +1 -0
  102. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  103. package/hrApplication.ts +28 -0
  104. package/hrParts.ts +52 -0
  105. package/hrQueries.ts +59 -0
  106. package/hrScreenSet.ts +24 -0
  107. package/index.ts +14 -0
  108. package/manifest.ts +41 -0
  109. package/navigation.ts +59 -0
  110. package/package.json +78 -4
  111. package/packageName.ts +5 -0
  112. package/sampleData/hr-nordic.json +1659 -0
  113. package/screens/index.ts +20 -0
  114. package/templateProvenance.ts +15 -0
  115. package/templates/formTemplates.ts +34 -0
  116. package/templates/index.ts +21 -0
  117. package/templates/listTemplates.ts +109 -0
  118. package/templates/orgChartTemplate.ts +27 -0
  119. package/templates/recordTemplates.ts +75 -0
  120. package/thumbnails/HrEmployeeDirectory.svg +29 -0
  121. package/thumbnails/HrEmployeePage.svg +18 -0
  122. package/thumbnails/HrOnboardingChecklist.svg +18 -0
  123. package/thumbnails/HrOnboardingList.svg +13 -0
  124. package/thumbnails/HrOrgChart.svg +20 -0
  125. package/thumbnails/HrQuickCreateEmployee.svg +12 -0
  126. package/thumbnails/HrRequestTimeOff.svg +12 -0
  127. package/thumbnails/HrTimeOffBalanceList.svg +13 -0
  128. package/thumbnails/HrTimeOffList.svg +13 -0
  129. package/thumbnails/hr.svg +14 -0
@@ -0,0 +1,15 @@
1
+ import { Behavior, DialogTemplate, ExternalComponent, SceneElement, ScreenTemplate, TemplateMetadata, TemplateScope } from '@cratis/scene.model';
2
+ import { component, panel } from '@cratis/scene.blueprint.default';
3
+ export { component, panel };
4
+ export declare const hrCategory = "Business / HR";
5
+ export declare const thumbnailOf: (templateName: string) => string;
6
+ export declare const hrMetadata: (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace', scopes: TemplateScope[]) => TemplateMetadata;
7
+ export declare const actionButton: (id: string, label: string, emphasis: 'primary' | 'secondary' | 'quiet' | 'danger', extra?: Record<string, unknown>, behaviors?: Behavior[]) => ExternalComponent;
8
+ export declare const opensDialog: (dialogTemplate: string) => Behavior[];
9
+ export declare const goesTo: (screen: string) => Behavior[];
10
+ export declare const opensRecordOnSelect: (listId: string, screen: string) => Behavior[];
11
+ export declare const closesDialog: () => Behavior[];
12
+ export declare const withBehaviors: <T extends SceneElement>(element: T, behaviors: Behavior[]) => T;
13
+ export type HrScreenTemplate = ScreenTemplate;
14
+ export type HrDialogTemplate = DialogTemplate;
15
+ //# sourceMappingURL=hrParts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrParts.d.ts","sourceRoot":"","sources":["../../hrParts.ts"],"names":[],"mappings":"AAGA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ueprint.default';
3
+ export { component, panel } from '@cratis/scene.blueprint.default';
4
+ import { hrTemplateProvenance } 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 hrCategory = 'Business / HR';
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 hrMetadata = (name, type, scopes)=>({
11
+ ...hrTemplateProvenance,
12
+ type,
13
+ category: hrCategory,
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
+ /** What a Cancel or Close control does: close the dialog it was opened from. */ const closesDialog = ()=>[
93
+ {
94
+ bindings: [
95
+ {
96
+ trigger: {
97
+ kind: InteractionTriggerKind.Click
98
+ },
99
+ actions: [
100
+ {
101
+ kind: InteractionActionKind.CloseDialog
102
+ }
103
+ ]
104
+ }
105
+ ]
106
+ }
107
+ ];
108
+ /** An element with the given behaviors attached. */ const withBehaviors = (element, behaviors)=>({
109
+ ...element,
110
+ behaviors
111
+ });
112
+
113
+ export { actionButton, closesDialog, goesTo, hrCategory, hrMetadata, opensDialog, opensRecordOnSelect, thumbnailOf, withBehaviors };
114
+ //# sourceMappingURL=hrParts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrParts.js","sources":["../../hrParts.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 { hrTemplateProvenance } 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 hrCategory = 'Business / HR';\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 hrMetadata = (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace', scopes: TemplateScope[]): TemplateMetadata =>\n ({ ...hrTemplateProvenance, type, category: hrCategory, 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/** 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 HrScreenTemplate = ScreenTemplate;\nexport type HrDialogTemplate = DialogTemplate;\n"],"names":["hrCategory","thumbnailOf","templateName","hrMetadata","name","type","scopes","hrTemplateProvenance","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","closesDialog","CloseDialog","withBehaviors","element"],"mappings":";;;;;AAAA;AACA;AAUA,kGACO,MAAMA,UAAAA,GAAa;AAE1B,qDACO,MAAMC,WAAAA,GAAc,CAACC,YAAAA,GAAiC,CAAC,WAAW,EAAEA,YAAAA,CAAa,IAAI;AAE5F,4JACO,MAAMC,UAAAA,GAAa,CAACC,IAAAA,EAAcC,IAAAA,EAAmFC,UACvH;AAAE,QAAA,GAAGC,oBAAoB;AAAEF,QAAAA,IAAAA;QAAMG,QAAAA,EAAUR,UAAAA;AAAYS,QAAAA,SAAAA,EAAWR,WAAAA,CAAYG,IAAAA,CAAAA;AAAOE,QAAAA;AAAO,KAAA;AAEjG,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,EA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AA,EAAMI,sBAAsBe;AAAY;AAAE;AAAC;AAAE;AAAC;;AAEzK,qDACO,MAAMC,gBAAgB,CAAyBC,OAAAA,EAAY5B,aAA8B;AAAE,QAAA,GAAG4B,OAAO;AAAE5B,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 HrQuery: {
4
+ readonly Settings: 'HrSettings';
5
+ readonly RecordTabs: 'HrRecordTabs';
6
+ readonly OrgNodes: 'OrgNodes';
7
+ readonly FormErrors: 'HrFormErrors';
8
+ };
9
+ export declare enum HrEntityKind {
10
+ Employee = "Employee",
11
+ TimeOff = "TimeOff",
12
+ Balance = "Balance",
13
+ Onboarding = "Onboarding"
14
+ }
15
+ export declare const hrEntityPlural: Record<HrEntityKind, string>;
16
+ export declare const hrQueriesOf: (entity: HrEntityKind) => {
17
+ rows: string;
18
+ columns: string;
19
+ filterFields: string;
20
+ views: string;
21
+ columnChoices: string;
22
+ selection: string;
23
+ sections: string;
24
+ quickSections: string;
25
+ record: string;
26
+ summary: string;
27
+ documents: string;
28
+ activity: string;
29
+ tasks: 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=hrQueries.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrQueries.d.ts","sourceRoot":"","sources":["../../hrQueries.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,iBAAiB,EAAqB,MAAM,qBAAqB,CAAC;AAM3E,eAAO,MAAM,SAAS,UAAW,MAAM,oBAAc,iBAA2E,CAAC;AAGjI,eAAO,MAAM,OAAO;aAEhB,QAAQ,EAAE,YAAY;aACtB,UAAU,EAAE,cAAc;aAC1B,QAAQ,EAAE,UAAU;aACpB,UAAU,EAAE,cAAc;CACpB,CAAC;AAGX,oBAAY,YAAY;IACpB,QAAQ,aAAa;IACrB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,UAAU,eAAe;CAC5B;AAGD,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,YAAY,EAAE,MAAM,CAKvD,CAAC;AAMF,eAAO,MAAM,WAAW,WAAY,YAAY;IAC5C,IAAI;IACJ,OAAO;IACP,YAAY;IACZ,KAAK;IACL,aAAa;IACb,SAAS;IACT,QAAQ;IACR,aAAa;IACb,MAAM;IACN,OAAO;IACP,SAAS;IACT,QAAQ;IACR,KAAK;CACP,CAAC;AAGH,eAAO,MAAM,YAAY;IAAK,MAAM;CAA2C,CAAC;AAChF,eAAO,MAAM,cAAc;;;CAA2E,CAAC"}
@@ -0,0 +1,59 @@
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. An HR 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 HrQuery = {
14
+ /** One row: the `locale` the figures and dates are formatted in. */ Settings: 'HrSettings',
15
+ RecordTabs: 'HrRecordTabs',
16
+ OrgNodes: 'OrgNodes',
17
+ FormErrors: 'HrFormErrors'
18
+ };
19
+ /** The HR entities a template is made for. */ var HrEntityKind = /*#__PURE__*/ function(HrEntityKind) {
20
+ HrEntityKind["Employee"] = "Employee";
21
+ HrEntityKind["TimeOff"] = "TimeOff";
22
+ HrEntityKind["Balance"] = "Balance";
23
+ HrEntityKind["Onboarding"] = "Onboarding";
24
+ return HrEntityKind;
25
+ }({});
26
+ /** The read model (and so the shape) the records of each entity are queried from. */ const hrEntityPlural = {
27
+ ["Employee"]: 'Employees',
28
+ ["TimeOff"]: 'TimeOffRequests',
29
+ ["Balance"]: 'Balances',
30
+ ["Onboarding"]: 'Onboardings'
31
+ };
32
+ /**
33
+ * The queries one entity's templates bind to, named from the entity so a template never spells one out: the records, the columns and filter fields of the
34
+ * list, its saved views and column choices, the selection, the sections of the full and the quick form, and the record the page shows.
35
+ */ const hrQueriesOf = (entity)=>({
36
+ rows: hrEntityPlural[entity],
37
+ columns: `${entity}Columns`,
38
+ filterFields: `${entity}FilterFields`,
39
+ views: `${entity}Views`,
40
+ columnChoices: `${entity}ColumnChoices`,
41
+ selection: `${entity}Selection`,
42
+ sections: `${entity}Sections`,
43
+ quickSections: `${entity}QuickSections`,
44
+ record: `${entity}Record`,
45
+ summary: `${entity}Summary`,
46
+ documents: `${entity}Documents`,
47
+ activity: `${entity}Activity`,
48
+ tasks: `${entity}Tasks`
49
+ });
50
+ /** The locale and currency of the data, bound onto every component that formats a figure or a date. */ const localeOfData = {
51
+ locale: fromQuery(HrQuery.Settings, '0.locale')
52
+ };
53
+ const currencyOfData = {
54
+ ...localeOfData,
55
+ currency: fromQuery(HrQuery.Settings, '0.currency')
56
+ };
57
+
58
+ export { HrEntityKind, HrQuery, currencyOfData, fromQuery, hrEntityPlural, hrQueriesOf, localeOfData };
59
+ //# sourceMappingURL=hrQueries.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrQueries.js","sources":["../../hrQueries.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. An HR 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 HrQuery = {\n /** One row: the `locale` the figures and dates are formatted in. */\n Settings: 'HrSettings',\n RecordTabs: 'HrRecordTabs',\n OrgNodes: 'OrgNodes',\n FormErrors: 'HrFormErrors',\n} as const;\n\n/** The HR entities a template is made for. */\nexport enum HrEntityKind {\n Employee = 'Employee',\n TimeOff = 'TimeOff',\n Balance = 'Balance',\n Onboarding = 'Onboarding',\n}\n\n/** The read model (and so the shape) the records of each entity are queried from. */\nexport const hrEntityPlural: Record<HrEntityKind, string> = {\n [HrEntityKind.Employee]: 'Employees',\n [HrEntityKind.TimeOff]: 'TimeOffRequests',\n [HrEntityKind.Balance]: 'Balances',\n [HrEntityKind.Onboarding]: 'Onboardings',\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 full and the quick form, and the record the page shows.\n */\nexport const hrQueriesOf = (entity: HrEntityKind) => ({\n rows: hrEntityPlural[entity],\n columns: `${entity}Columns`,\n filterFields: `${entity}FilterFields`,\n views: `${entity}Views`,\n columnChoices: `${entity}ColumnChoices`,\n selection: `${entity}Selection`,\n sections: `${entity}Sections`,\n quickSections: `${entity}QuickSections`,\n record: `${entity}Record`,\n summary: `${entity}Summary`,\n documents: `${entity}Documents`,\n activity: `${entity}Activity`,\n tasks: `${entity}Tasks`,\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(HrQuery.Settings, '0.locale') };\nexport const currencyOfData = { ...localeOfData, currency: fromQuery(HrQuery.Settings, '0.currency') };\n"],"names":["fromQuery","query","path","kind","BindingSourceKind","QueryResult","HrQuery","Settings","RecordTabs","OrgNodes","FormErrors","HrEntityKind","hrEntityPlural","hrQueriesOf","entity","rows","columns","filterFields","views","columnChoices","selection","sections","quickSections","record","summary","documents","activity","tasks","localeOfData","locale","currencyOfData","currency"],"mappings":";;AAAA;A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O,OAAO,CAAC;QAC3BW,SAAAA,EAAW,CAAA,EAAGX,MAAAA,CAAO,SAAS,CAAC;QAC/BY,QAAAA,EAAU,CAAA,EAAGZ,MAAAA,CAAO,QAAQ,CAAC;QAC7Ba,KAAAA,EAAO,CAAA,EAAGb,MAAAA,CAAO,KAAK;AAC1B,KAAA;AAEA,wGACO,MAAMc,YAAAA,GAAe;IAAEC,MAAAA,EAAQ7B,SAAAA,CAAUM,OAAAA,CAAQC,QAAQ,EAAE,UAAA;AAAY;MACjEuB,cAAAA,GAAiB;AAAE,IAAA,GAAGF,YAAY;IAAEG,QAAAA,EAAU/B,SAAAA,CAAUM,OAAAA,CAAQC,QAAQ,EAAE,YAAA;AAAc;;"}
@@ -0,0 +1,7 @@
1
+ import { BlueprintScreen } from '@cratis/scene.model';
2
+ export interface HrScreenDefinition extends BlueprintScreen {
3
+ template: string;
4
+ description: string;
5
+ }
6
+ export declare const hrScreenDefinitions: HrScreenDefinition[];
7
+ //# sourceMappingURL=hrScreenSet.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrScreenSet.d.ts","sourceRoot":"","sources":["../../hrScreenSet.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAGtD,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IACvD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACvB;AAMD,eAAO,MAAM,mBAAmB,EAAE,kBAAkB,EAQnD,CAAC"}
@@ -0,0 +1,59 @@
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 hrScreenDefinitions = [
7
+ {
8
+ name: 'hr.directory',
9
+ title: 'Directory',
10
+ template: 'HrEmployeeDirectory',
11
+ order: 0,
12
+ description: 'Everyone in the company as cards with their photo, title, department and contact.'
13
+ },
14
+ {
15
+ name: 'hr.directory.record',
16
+ title: 'Employee',
17
+ template: 'HrEmployeePage',
18
+ parent: 'hr.directory',
19
+ description: 'One employee: personal and job information, documents and time-off balance.'
20
+ },
21
+ {
22
+ name: 'hr.org',
23
+ title: 'Org chart',
24
+ template: 'HrOrgChart',
25
+ order: 1,
26
+ description: 'Who reports to whom, as a tree.'
27
+ },
28
+ {
29
+ name: 'hr.timeoff',
30
+ title: 'Time off',
31
+ template: 'HrTimeOffList',
32
+ order: 2,
33
+ description: 'Time-off requests to approve, with who is away and for how long.'
34
+ },
35
+ {
36
+ name: 'hr.timeoff.balances',
37
+ title: 'Balances',
38
+ template: 'HrTimeOffBalanceList',
39
+ parent: 'hr.timeoff',
40
+ description: 'What each employee has taken and has left.'
41
+ },
42
+ {
43
+ name: 'hr.onboarding',
44
+ title: 'Onboarding',
45
+ template: 'HrOnboardingList',
46
+ order: 3,
47
+ description: 'New hires and how far along their onboarding is.'
48
+ },
49
+ {
50
+ name: 'hr.onboarding.record',
51
+ title: 'Onboarding checklist',
52
+ template: 'HrOnboardingChecklist',
53
+ parent: 'hr.onboarding',
54
+ description: 'One new hire\'s checklist: sections of tasks, each with an owner and a due date.'
55
+ }
56
+ ];
57
+
58
+ export { hrScreenDefinitions };
59
+ //# sourceMappingURL=hrScreenSet.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrScreenSet.js","sources":["../../hrScreenSet.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 (`hr.directory.record` is the `record` feature of `directory` in the `hr` module). */\nexport interface HrScreenDefinition 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 hrScreenDefinitions: HrScreenDefinition[] = [\n { name: 'hr.directory', title: 'Directory', template: 'HrEmployeeDirectory', order: 0, description: 'Everyone in the company as cards with their photo, title, department and contact.' },\n { name: 'hr.directory.record', title: 'Employee', template: 'HrEmployeePage', parent: 'hr.directory', description: 'One employee: personal and job information, documents and time-off balance.' },\n { name: 'hr.org', title: 'Org chart', template: 'HrOrgChart', order: 1, description: 'Who reports to whom, as a tree.' },\n { name: 'hr.timeoff', title: 'Time off', template: 'HrTimeOffList', order: 2, description: 'Time-off requests to approve, with who is away and for how long.' },\n { name: 'hr.timeoff.balances', title: 'Balances', template: 'HrTimeOffBalanceList', parent: 'hr.timeoff', description: 'What each employee has taken and has left.' },\n { name: 'hr.onboarding', title: 'Onboarding', template: 'HrOnboardingList', order: 3, description: 'New hires and how far along their onboarding is.' },\n { name: 'hr.onboarding.record', title: 'Onboarding checklist', template: 'HrOnboardingChecklist', parent: 'hr.onboarding', description: 'One new hire\\'s checklist: sections of tasks, each with an owner and a due date.' },\n];\n"],"names":["hrScreenDefinitions","name","title","template","order","description","parent"],"mappings":"AAAA;AACA;AAUA;;;UAIaA,mBAAAA,GAA4C;AACrD,IAAA;QAAEC,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,WAAA;QAAaC,QAAAA,EAAU,qBAAA;QAAuBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAoF,KAAA;AACxL,IAAA;QAAEJ,IAAAA,EAAM,qBAAA;QAAuBC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,gBAAA;QAAkBG,MAAAA,EAAQ,cAAA;QAAgBD,WAAAA,EAAa;AAA8E,KAAA;AACjM,IAAA;QAAEJ,IAAAA,EAAM,QAAA;QAAUC,KAAAA,EAAO,WAAA;QAAaC,QAAAA,EAAU,YAAA;QAAcC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAkC,KAAA;AACvH,IAAA;QAAEJ,IAAAA,EAAM,YAAA;QAAcC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,eAAA;QAAiBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAmE,KAAA;AAC9J,IAAA;QAAEJ,IAAAA,EAAM,qBAAA;QAAuBC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,sBAAA;QAAwBG,MAAAA,EAAQ,YAAA;QAAcD,WAAAA,EAAa;AAA6C,KAAA;AACpK,IAAA;QAAEJ,IAAAA,EAAM,eAAA;QAAiBC,KAAAA,EAAO,YAAA;QAAcC,QAAAA,EAAU,kBAAA;QAAoBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAmD,KAAA;AACtJ,IAAA;QAAEJ,IAAAA,EAAM,sBAAA;QAAwBC,KAAAA,EAAO,sBAAA;QAAwBC,QAAAA,EAAU,uBAAA;QAAyBG,MAAAA,EAAQ,eAAA;QAAiBD,WAAAA,EAAa;AAAmF;;;"}
@@ -0,0 +1,12 @@
1
+ export * from './packageName';
2
+ export * from './templateProvenance';
3
+ export * from './hrQueries';
4
+ export * from './hrParts';
5
+ export * from './hrScreenSet';
6
+ export * from './templates';
7
+ export * from './screens';
8
+ export * from './navigation';
9
+ export * from './manifest';
10
+ export * from './blueprint';
11
+ export * from './hrApplication';
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,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,eAAe,CAAC;AAC9B,cAAc,aAAa,CAAC;AAC5B,cAAc,WAAW,CAAC;AAC1B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC;AAC5B,cAAc,iBAAiB,CAAC"}
@@ -0,0 +1,17 @@
1
+ export { hrBlueprintName } from './packageName.js';
2
+ export { hrTemplateProvenance } from './templateProvenance.js';
3
+ export { HrEntityKind, HrQuery, currencyOfData, fromQuery, hrEntityPlural, hrQueriesOf, localeOfData } from './hrQueries.js';
4
+ export { actionButton, closesDialog, goesTo, hrCategory, hrMetadata, opensDialog, opensRecordOnSelect, thumbnailOf, withBehaviors } from './hrParts.js';
5
+ export { hrScreenDefinitions } from './hrScreenSet.js';
6
+ export { hrScreenTemplates } from './templates/index.js';
7
+ export { hrScreens } from './screens/index.js';
8
+ export { hrModule, hrNavigation, hrStructure } from './navigation.js';
9
+ export { hrBlueprintManifest } from './manifest.js';
10
+ export { hrBlueprint } from './blueprint.js';
11
+ export { hrApplication, hrComposition, hrDefaultSampleDataId, hrNavigationModel } from './hrApplication.js';
12
+ export { component, panel } from '@cratis/scene.blueprint.default';
13
+ export { hrQuickCreateDialogs as hrDialogTemplates, hrQuickCreateDialogs } from './templates/formTemplates.js';
14
+ export { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate } from './templates/listTemplates.js';
15
+ export { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './templates/recordTemplates.js';
16
+ export { hrOrgChartTemplate } from './templates/orgChartTemplate.js';
17
+ //# 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 hrBlueprintManifest: 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,mBAAmB,EAAE,YAyBjC,CAAC"}
@@ -0,0 +1,63 @@
1
+ import { PackageKind } from '@cratis/scene.model';
2
+ import { hrBlueprintName } from './packageName.js';
3
+ import { hrScreenDefinitions } from './hrScreenSet.js';
4
+ import { hrScreenTemplates } from './templates/index.js';
5
+ import { hrQuickCreateDialogs } 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 = 'People, the org chart, time off and onboarding for an HR team: a directory of cards, employee pages, an org tree, time-off requests and balances, and onboarding checklists.';
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 hrBlueprintManifest = {
15
+ name: hrBlueprintName,
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: hrScreenTemplates.map((template)=>template.name),
27
+ dialogTemplates: hrQuickCreateDialogs.map((template)=>template.name),
28
+ themes: [],
29
+ displayName: 'HR People and Time Off',
30
+ description,
31
+ module: '@cratis/scene.blueprint.hr',
32
+ license: 'MIT',
33
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
34
+ sampleData: [
35
+ {
36
+ id: 'hr-nordic',
37
+ title: 'HR · Nordic',
38
+ locale: 'nb-NO',
39
+ path: 'sampleData/hr-nordic.json'
40
+ }
41
+ ],
42
+ blueprint: {
43
+ domain: 'hr',
44
+ description,
45
+ thumbnail: 'thumbnails/hr.svg',
46
+ screenSet: hrScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order })=>({
47
+ name,
48
+ title,
49
+ description: screenDescription,
50
+ template,
51
+ ...parent === undefined ? {} : {
52
+ parent
53
+ },
54
+ ...order === undefined ? {} : {
55
+ order
56
+ }
57
+ })),
58
+ defaultSampleData: 'hr-nordic'
59
+ }
60
+ };
61
+
62
+ export { hrBlueprintManifest };
63
+ //# 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 { hrBlueprintName } from './packageName';\nimport { hrScreenDefinitions } from './hrScreenSet';\nimport { hrDialogTemplates, hrScreenTemplates } from './templates';\n\nconst description = 'People, the org chart, time off and onboarding for an HR team: a directory of cards, employee pages, an org tree, time-off requests and balances, and onboarding checklists.';\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 hrBlueprintManifest: ScenePackage = {\n name: hrBlueprintName,\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: hrScreenTemplates.map(template => template.name),\n dialogTemplates: hrDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'HR People and Time Off',\n description,\n module: '@cratis/scene.blueprint.hr',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n sampleData: [{ id: 'hr-nordic', title: 'HR · Nordic', locale: 'nb-NO', path: 'sampleData/hr-nordic.json' }],\n blueprint: {\n domain: 'hr',\n description,\n thumbnail: 'thumbnails/hr.svg',\n screenSet: hrScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({\n name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),\n })),\n defaultSampleData: 'hr-nordic',\n },\n};\n"],"names":["description","hrBlueprintManifest","name","hrBlueprintName","version","kind","PackageKind","Blueprint","dependencies","versionRange","components","layouts","screenTemplates","hrScreenTemplates","map","template","dialogTemplates","hrDialogTemplates","themes","displayName","module","license","licenseUrl","sampleData","id","title","locale","path","blueprint","domain","thumbnail","screenSet","hrScreenDefinitions","screenDescription","parent","order","undefined","defaultSampleData"],"mappings":";;;;;;AAAA;AACA;AAOA,MAAMA,WAAAA,GAAc,8KAAA;AAEpB;;;;UAKaC,mBAAAA,GAAoC;IAC7CC,IAAAA,EAAMC,eAAAA;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,kBAAkBC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AAChEc,IAAAA,eAAAA,EAAiBC,qBAAkBH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AAChEgB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,wBAAA;AACbnB,IAAAA,WAAAA;IACAoB,MAAAA,EAAQ,4BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY,mDAAA;IACZC,UAAAA,EAAY;AAAC,QAAA;YAAEC,EAAAA,EAAI,WAAA;YAAaC,KAAAA,EAAO,aAAA;YAAeC,MAAAA,EAAQ,OAAA;YAASC,IAAAA,EAAM;AAA4B;AAAE,KAAA;IAC3GC,SAAAA,EAAW;QACPC,MAAAA,EAAQ,IAAA;AACR7B,QAAAA,WAAAA;QACA8B,SAAAA,EAAW,mBAAA;AACXC,QAAAA,SAAAA,EAAWC,oBAAoBlB,GAAG,CAAC,CAAC,EAAEZ,IAAI,EAAEuB,KAAK,EAAEzB,aAAaiC,iBAAiB,EAAElB,QAAQ,EAAEmB,MAAM,EAAEC,KAAK,EAAE,IAAM;AAC9GjC,gBAAAA,IAAAA;AAAMuB,gBAAAA,KAAAA;gBAAOzB,WAAAA,EAAaiC,iBAAAA;AAAmBlB,gBAAAA,QAAAA;gBAAU,GAAImB,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 hrModule = "hr";
3
+ export declare const hrStructure: ApplicationStructure;
4
+ export declare const hrNavigation: 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,QAAQ,OAAO,CAAC;AAM7B,eAAO,MAAM,WAAW,EAAE,oBAgBtB,CAAC;AAML,eAAO,MAAM,YAAY,EAAE,eAuB1B,CAAC"}
@@ -0,0 +1,131 @@
1
+ import { NavigationRegionMode, NavigationRegionKind } from '@cratis/scene.model';
2
+ import { hrScreenDefinitions } from './hrScreenSet.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 hrModule = 'hr';
7
+ /**
8
+ * The application structure the screen set implies: one module, `hr`, a feature for each screen and the sub-features beneath it (`hr.directory.record` is the
9
+ * `record` feature of `directory`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.
10
+ */ const hrStructure = (()=>{
11
+ const root = {
12
+ id: hrModule,
13
+ name: 'HR',
14
+ features: []};
15
+ for (const screen of hrScreenDefinitions){
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 four places an HR team goes: Directory, Org chart, Time off (with its requests and its balances beneath it) and Onboarding.
44
+ */ const hrNavigation = {
45
+ application: {
46
+ logo: {
47
+ image: '',
48
+ title: 'HR'
49
+ },
50
+ regions: [
51
+ {
52
+ region: NavigationRegionKind.Topbar,
53
+ items: [
54
+ {
55
+ id: 'hr',
56
+ title: 'HR',
57
+ target: {
58
+ module: hrModule
59
+ }
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ },
65
+ modules: [
66
+ {
67
+ module: hrModule,
68
+ regions: [
69
+ {
70
+ region: NavigationRegionKind.Sidebar,
71
+ mode: NavigationRegionMode.Override,
72
+ items: [
73
+ {
74
+ id: 'directory',
75
+ title: 'Directory',
76
+ target: {
77
+ module: hrModule,
78
+ feature: 'directory'
79
+ }
80
+ },
81
+ {
82
+ id: 'org',
83
+ title: 'Org chart',
84
+ target: {
85
+ module: hrModule,
86
+ feature: 'org'
87
+ }
88
+ },
89
+ {
90
+ id: 'timeoff',
91
+ title: 'Time off',
92
+ target: {
93
+ module: hrModule,
94
+ feature: 'timeoff'
95
+ },
96
+ children: [
97
+ {
98
+ id: 'requests',
99
+ title: 'Requests',
100
+ target: {
101
+ module: hrModule,
102
+ feature: 'timeoff'
103
+ }
104
+ },
105
+ {
106
+ id: 'balances',
107
+ title: 'Balances',
108
+ target: {
109
+ module: hrModule,
110
+ feature: 'timeoff.balances'
111
+ }
112
+ }
113
+ ]
114
+ },
115
+ {
116
+ id: 'onboarding',
117
+ title: 'Onboarding',
118
+ target: {
119
+ module: hrModule,
120
+ feature: 'onboarding'
121
+ }
122
+ }
123
+ ]
124
+ }
125
+ ]
126
+ }
127
+ ]
128
+ };
129
+
130
+ export { hrModule, hrNavigation, hrStructure };
131
+ //# 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 { hrScreenDefinitions } from './hrScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const hrModule = 'hr';\n\n/**\n * The application structure the screen set implies: one module, `hr`, a feature for each screen and the sub-features beneath it (`hr.directory.record` is the\n * `record` feature of `directory`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const hrStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: hrModule, name: 'HR', features: [], slices: [] };\n for (const screen of hrScreenDefinitions) {\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 four places an HR team goes: Directory, Org chart, Time off (with its requests and its balances beneath it) and Onboarding.\n */\nexport const hrNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'HR' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'hr', title: 'HR', target: { module: hrModule } }] }],\n },\n modules: [{\n module: hrModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'directory', title: 'Directory', target: { module: hrModule, feature: 'directory' } },\n { id: 'org', title: 'Org chart', target: { module: hrModule, feature: 'org' } },\n {\n id: 'timeoff', title: 'Time off', target: { module: hrModule, feature: 'timeoff' }, children: [\n { id: 'requests', title: 'Requests', target: { module: hrModule, feature: 'timeoff' } },\n { id: 'balances', title: 'Balances', target: { module: hrModule, feature: 'timeoff.balances' } },\n ],\n },\n { id: 'onboarding', title: 'Onboarding', target: { module: hrModule, feature: 'onboarding' } },\n ],\n }],\n }],\n};\n"],"names":["hrModule","hrStructure","root","id","name","features","screen","hrScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","hrNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature","children"],"mappings":";;;AAAA;AACA;AAKA,8GACO,MAAMA,QAAAA,GAAW;AAExB;;;AAGC,IACM,MAAMC,WAAAA,GAAqC,CAAA,IAAA;AAE9C,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,QAAAA;QAAUI,IAAAA,EAAM,IAAA;AAAMC,QAAAA,QAAAA,EAAU,EAAe,CAAA;IACxE,KAAK,MAAMC,UAAUC,mBAAAA,CAAqB;AACtC,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,C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