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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (129) hide show
  1. package/blueprint.ts +16 -0
  2. package/blueprintCatalog.json +164 -0
  3. package/dist/cjs/blueprint.js +19 -0
  4. package/dist/cjs/blueprint.js.map +1 -0
  5. package/dist/cjs/hrApplication.js +49 -0
  6. package/dist/cjs/hrApplication.js.map +1 -0
  7. package/dist/cjs/hrParts.js +131 -0
  8. package/dist/cjs/hrParts.js.map +1 -0
  9. package/dist/cjs/hrQueries.js +67 -0
  10. package/dist/cjs/hrQueries.js.map +1 -0
  11. package/dist/cjs/hrScreenSet.js +61 -0
  12. package/dist/cjs/hrScreenSet.js.map +1 -0
  13. package/dist/cjs/index.js +69 -0
  14. package/dist/cjs/index.js.map +1 -0
  15. package/dist/cjs/manifest.js +65 -0
  16. package/dist/cjs/manifest.js.map +1 -0
  17. package/dist/cjs/navigation.js +135 -0
  18. package/dist/cjs/navigation.js.map +1 -0
  19. package/dist/cjs/package.json +3 -0
  20. package/dist/cjs/packageName.js +8 -0
  21. package/dist/cjs/packageName.js.map +1 -0
  22. package/dist/cjs/screens/index.js +22 -0
  23. package/dist/cjs/screens/index.js.map +1 -0
  24. package/dist/cjs/templateProvenance.js +24 -0
  25. package/dist/cjs/templateProvenance.js.map +1 -0
  26. package/dist/cjs/templates/formTemplates.js +51 -0
  27. package/dist/cjs/templates/formTemplates.js.map +1 -0
  28. package/dist/cjs/templates/index.js +30 -0
  29. package/dist/cjs/templates/index.js.map +1 -0
  30. package/dist/cjs/templates/listTemplates.js +210 -0
  31. package/dist/cjs/templates/listTemplates.js.map +1 -0
  32. package/dist/cjs/templates/orgChartTemplate.js +63 -0
  33. package/dist/cjs/templates/orgChartTemplate.js.map +1 -0
  34. package/dist/cjs/templates/recordTemplates.js +181 -0
  35. package/dist/cjs/templates/recordTemplates.js.map +1 -0
  36. package/dist/esm/blueprint.d.ts +3 -0
  37. package/dist/esm/blueprint.d.ts.map +1 -0
  38. package/dist/esm/blueprint.js +17 -0
  39. package/dist/esm/blueprint.js.map +1 -0
  40. package/dist/esm/hrApplication.d.ts +10 -0
  41. package/dist/esm/hrApplication.d.ts.map +1 -0
  42. package/dist/esm/hrApplication.js +44 -0
  43. package/dist/esm/hrApplication.js.map +1 -0
  44. package/dist/esm/hrParts.d.ts +15 -0
  45. package/dist/esm/hrParts.d.ts.map +1 -0
  46. package/dist/esm/hrParts.js +114 -0
  47. package/dist/esm/hrParts.js.map +1 -0
  48. package/dist/esm/hrQueries.d.ts +38 -0
  49. package/dist/esm/hrQueries.d.ts.map +1 -0
  50. package/dist/esm/hrQueries.js +59 -0
  51. package/dist/esm/hrQueries.js.map +1 -0
  52. package/dist/esm/hrScreenSet.d.ts +7 -0
  53. package/dist/esm/hrScreenSet.d.ts.map +1 -0
  54. package/dist/esm/hrScreenSet.js +59 -0
  55. package/dist/esm/hrScreenSet.js.map +1 -0
  56. package/dist/esm/index.d.ts +12 -0
  57. package/dist/esm/index.d.ts.map +1 -0
  58. package/dist/esm/index.js +17 -0
  59. package/dist/esm/index.js.map +1 -0
  60. package/dist/esm/manifest.d.ts +3 -0
  61. package/dist/esm/manifest.d.ts.map +1 -0
  62. package/dist/esm/manifest.js +63 -0
  63. package/dist/esm/manifest.js.map +1 -0
  64. package/dist/esm/navigation.d.ts +5 -0
  65. package/dist/esm/navigation.d.ts.map +1 -0
  66. package/dist/esm/navigation.js +131 -0
  67. package/dist/esm/navigation.js.map +1 -0
  68. package/dist/esm/package.json +3 -0
  69. package/dist/esm/packageName.d.ts +2 -0
  70. package/dist/esm/packageName.d.ts.map +1 -0
  71. package/dist/esm/packageName.js +6 -0
  72. package/dist/esm/packageName.js.map +1 -0
  73. package/dist/esm/screens/index.d.ts +3 -0
  74. package/dist/esm/screens/index.d.ts.map +1 -0
  75. package/dist/esm/screens/index.js +20 -0
  76. package/dist/esm/screens/index.js.map +1 -0
  77. package/dist/esm/templateProvenance.d.ts +3 -0
  78. package/dist/esm/templateProvenance.d.ts.map +1 -0
  79. package/dist/esm/templateProvenance.js +22 -0
  80. package/dist/esm/templateProvenance.js.map +1 -0
  81. package/dist/esm/templates/formTemplates.d.ts +3 -0
  82. package/dist/esm/templates/formTemplates.d.ts.map +1 -0
  83. package/dist/esm/templates/formTemplates.js +49 -0
  84. package/dist/esm/templates/formTemplates.js.map +1 -0
  85. package/dist/esm/templates/index.d.ts +7 -0
  86. package/dist/esm/templates/index.d.ts.map +1 -0
  87. package/dist/esm/templates/index.js +19 -0
  88. package/dist/esm/templates/index.js.map +1 -0
  89. package/dist/esm/templates/listTemplates.d.ts +6 -0
  90. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  91. package/dist/esm/templates/listTemplates.js +205 -0
  92. package/dist/esm/templates/listTemplates.js.map +1 -0
  93. package/dist/esm/templates/orgChartTemplate.d.ts +3 -0
  94. package/dist/esm/templates/orgChartTemplate.d.ts.map +1 -0
  95. package/dist/esm/templates/orgChartTemplate.js +61 -0
  96. package/dist/esm/templates/orgChartTemplate.js.map +1 -0
  97. package/dist/esm/templates/recordTemplates.d.ts +4 -0
  98. package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
  99. package/dist/esm/templates/recordTemplates.js +178 -0
  100. package/dist/esm/templates/recordTemplates.js.map +1 -0
  101. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  102. package/hrApplication.ts +28 -0
  103. package/hrParts.ts +52 -0
  104. package/hrQueries.ts +59 -0
  105. package/hrScreenSet.ts +24 -0
  106. package/index.ts +14 -0
  107. package/manifest.ts +41 -0
  108. package/navigation.ts +59 -0
  109. package/package.json +79 -5
  110. package/packageName.ts +5 -0
  111. package/sampleData/hr-nordic.json +1659 -0
  112. package/screens/index.ts +20 -0
  113. package/templateProvenance.ts +15 -0
  114. package/templates/formTemplates.ts +34 -0
  115. package/templates/index.ts +21 -0
  116. package/templates/listTemplates.ts +109 -0
  117. package/templates/orgChartTemplate.ts +27 -0
  118. package/templates/recordTemplates.ts +75 -0
  119. package/thumbnails/HrEmployeeDirectory.svg +29 -0
  120. package/thumbnails/HrEmployeePage.svg +18 -0
  121. package/thumbnails/HrOnboardingChecklist.svg +18 -0
  122. package/thumbnails/HrOnboardingList.svg +13 -0
  123. package/thumbnails/HrOrgChart.svg +20 -0
  124. package/thumbnails/HrQuickCreateEmployee.svg +12 -0
  125. package/thumbnails/HrRequestTimeOff.svg +12 -0
  126. package/thumbnails/HrTimeOffBalanceList.svg +13 -0
  127. package/thumbnails/HrTimeOffList.svg +13 -0
  128. package/thumbnails/hr.svg +14 -0
  129. package/README.md +0 -3
@@ -0,0 +1 @@
1
+ {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { HrEntityKind, fromQuery, hrQueriesOf, localeOfData } from '../hrQueries';\nimport { actionButton, component, goesTo, hrMetadata, opensDialog, opensRecordOnSelect, withBehaviors } from '../hrParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: HrEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to. */\n primary: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One HR list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = hrQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', imageField: options.cards.imageField } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: [exportAction(`${id}-export`), primary] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list],\n bulkBar: options.recordScreen || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: hrMetadata(options.name, 'List', listScopes),\n };\n}\n\n/** The directory: everyone in the company as cards - photo, name, title, department and how to reach them. Choosing a card opens the employee. */\nexport const hrEmployeeDirectoryTemplate = listTemplateOf({\n name: 'HrEmployeeDirectory', entity: HrEntityKind.Employee, displayName: 'HR employee directory', description: 'Employees as cards with photo, name, title, department and contact, filtered by department, location and status.',\n title: 'Directory', subtitle: 'Everyone in the company', searchLabel: 'Search people', urlKey: 'people', primary: { label: 'New employee', dialog: 'HrQuickCreateEmployee' },\n rowActions: ['View profile', 'Send email'], bulkActions: [], titleField: 'name', recordScreen: 'hr.directory.record', cards: { imageField: 'photo' },\n});\n\n/** The time-off requests: who asked for what and when, with the actions a manager takes on one or many at once. */\nexport const hrTimeOffListTemplate = listTemplateOf({\n name: 'HrTimeOffList', entity: HrEntityKind.TimeOff, displayName: 'HR time off', description: 'Time-off requests with the employee, type, dates, days and status, filtered by type, status and period.',\n title: 'Time off', subtitle: 'Requests to approve and who is away', searchLabel: 'Search requests', urlKey: 'timeoff', primary: { label: 'Request time off', dialog: 'HrRequestTimeOff' },\n rowActions: ['Approve', 'Decline', 'Cancel'], bulkActions: ['Approve', 'Decline'], titleField: 'employee',\n});\n\n/** The balances: what each employee is entitled to, has taken and has left, with how much of the year is used. Read only. */\nexport const hrTimeOffBalanceListTemplate = listTemplateOf({\n name: 'HrTimeOffBalanceList', entity: HrEntityKind.Balance, displayName: 'HR time-off balances', description: 'Each employee\\'s entitlement, days taken and days left, with how much of it is used.',\n title: 'Balances', subtitle: 'Time off taken and left this year', searchLabel: 'Search balances', urlKey: 'balances', primary: { label: 'Request time off', dialog: 'HrRequestTimeOff' },\n rowActions: ['View employee'], bulkActions: [], titleField: 'employee', readOnly: true,\n});\n\n/** The onboarding: new hires, when they start, who looks after them and how far along their checklist is. Choosing a row opens the checklist. */\nexport const hrOnboardingListTemplate = listTemplateOf({\n name: 'HrOnboardingList', entity: HrEntityKind.Onboarding, displayName: 'HR onboarding', description: 'New hires with their start date, owner and a progress bar of their checklist.',\n title: 'Onboarding', subtitle: 'New hires and how far along they are', searchLabel: 'Search new hires', urlKey: 'onboarding', primary: { label: 'New employee', dialog: 'HrQuickCreateEmployee' },\n rowActions: ['Open checklist', 'Remind owner'], bulkActions: [], titleField: 'name', recordScreen: 'hr.onboarding.record',\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","hrQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","variant","imageField","toneField","fitsSlot","slots","listScreenTemplate","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","hrMetadata","hrEmployeeDirectoryTemplate","HrEntityKind","Employee","hrTimeOffListTemplate","TimeOff","hrTimeOffBalanceListTemplate","Balance","hrOnboardingListTemplate","Onboarding"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,yBAAAA,CAAcC,MAAM;AAAED,IAAAA,yBAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,qBAAAA,CAAcC,oBAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QA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 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var hrQueries = require('../hrQueries.js');
6
+ var hrParts = require('../hrParts.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ /**
11
+ * The org chart: the company as a tree - who reports to whom, with each person's title and how many report to them. It follows the ARIA tree pattern, so it is as
12
+ * usable from a keyboard and a screen reader as with a pointer, and the chosen person is kept in the address, so a link points at a place in the chart.
13
+ */ const hrOrgChartTemplate = {
14
+ name: 'HrOrgChart',
15
+ fitsSlot: 'content',
16
+ slots: [
17
+ {
18
+ name: 'header'
19
+ },
20
+ {
21
+ name: 'chart'
22
+ }
23
+ ],
24
+ arrangement: {
25
+ root: scene_blueprint_default.column([
26
+ scene_blueprint_default.slotLeaf('header'),
27
+ scene_blueprint_default.slotLeaf('chart')
28
+ ], 16)
29
+ },
30
+ content: {
31
+ header: [
32
+ scene_blueprint_default.component('HrOrgChart-header', 'pageHeader', {
33
+ title: 'Org chart',
34
+ subtitle: 'Who reports to whom'
35
+ }, {
36
+ actions: [
37
+ hrParts.withBehaviors(hrParts.actionButton('HrOrgChart-directory', 'Open the directory', 'secondary'), hrParts.goesTo('hr.directory'))
38
+ ]
39
+ })
40
+ ],
41
+ chart: [
42
+ scene_blueprint_default.component('HrOrgChart-tree', 'orgTree', {
43
+ nodes: hrQueries.fromQuery(hrQueries.HrQuery.OrgNodes),
44
+ expandedDepth: 2,
45
+ urlKey: 'person',
46
+ strings: {
47
+ orgTree: 'Org chart',
48
+ orgReports: '{count} reports'
49
+ },
50
+ ...hrQueries.localeOfData
51
+ })
52
+ ]
53
+ },
54
+ displayName: 'HR org chart',
55
+ description: 'The company as a tree of who reports to whom, with titles and report counts.',
56
+ metadata: hrParts.hrMetadata('HrOrgChart', 'Detail', [
57
+ scene_model.TemplateScope.Module,
58
+ scene_model.TemplateScope.Feature
59
+ ])
60
+ };
61
+
62
+ exports.hrOrgChartTemplate = hrOrgChartTemplate;
63
+ //# sourceMappingURL=orgChartTemplate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orgChartTemplate.js","sources":["../../../templates/orgChartTemplate.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { column, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { HrQuery, fromQuery, localeOfData } from '../hrQueries';\nimport { actionButton, component, goesTo, hrMetadata, withBehaviors } from '../hrParts';\n\n/**\n * The org chart: the company as a tree - who reports to whom, with each person's title and how many report to them. It follows the ARIA tree pattern, so it is as\n * usable from a keyboard and a screen reader as with a pointer, and the chosen person is kept in the address, so a link points at a place in the chart.\n */\nexport const hrOrgChartTemplate: ScreenTemplate = {\n name: 'HrOrgChart',\n fitsSlot: 'content',\n slots: [{ name: 'header' }, { name: 'chart' }],\n arrangement: { root: column([slotLeaf('header'), slotLeaf('chart')], 16) },\n content: {\n header: [component('HrOrgChart-header', 'pageHeader', { title: 'Org chart', subtitle: 'Who reports to whom' }, {\n actions: [withBehaviors(actionButton('HrOrgChart-directory', 'Open the directory', 'secondary'), goesTo('hr.directory'))],\n })],\n chart: [component('HrOrgChart-tree', 'orgTree', { nodes: fromQuery(HrQuery.OrgNodes), expandedDepth: 2, urlKey: 'person', strings: { orgTree: 'Org chart', orgReports: '{count} reports' }, ...localeOfData })],\n },\n displayName: 'HR org chart',\n description: 'The company as a tree of who reports to whom, with titles and report counts.',\n metadata: hrMetadata('HrOrgChart', 'Detail', [TemplateScope.Module, TemplateScope.Feature]),\n};\n"],"names":["hrOrgChartTemplate","name","fitsSlot","slots","arrangement","root","column","slotLeaf","content","header","component","title","subtitle","actions","withBehaviors","actionButton","goesTo","chart","nodes","fromQuery","HrQuery","OrgNodes","expandedDepth","urlKey","strings","orgTree","orgReports","localeOfData","displayName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AQ,KAAA;AAC9F;;"}
@@ -0,0 +1,181 @@
1
+ 'use strict';
2
+
3
+ var scene_model = require('@cratis/scene.model');
4
+ var scene_blueprint_default = require('@cratis/scene.blueprint.default');
5
+ var hrQueries = require('../hrQueries.js');
6
+ var hrParts = require('../hrParts.js');
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ const employee = hrQueries.hrQueriesOf(hrQueries.HrEntityKind.Employee);
11
+ const onboarding = hrQueries.hrQueriesOf(hrQueries.HrEntityKind.Onboarding);
12
+ /**
13
+ * The employee page: the foundation `RecordPage` with the employee's name as its title, the time-off balance as key facts under it, the personal and job
14
+ * information as the record, the employee's documents and time-off requests as related lists, their history and the open tasks beside it.
15
+ */ const hrEmployeePageTemplate = {
16
+ name: 'HrEmployeePage',
17
+ fitsSlot: 'content',
18
+ slots: scene_blueprint_default.recordPageTemplate.slots,
19
+ arrangement: scene_blueprint_default.recordPageTemplate.arrangement,
20
+ content: {
21
+ header: [
22
+ scene_blueprint_default.component('HrEmployeePage-header', 'pageHeader', {
23
+ title: hrQueries.fromQuery(employee.record, '0.name'),
24
+ subtitle: hrQueries.fromQuery(employee.record, '0.title')
25
+ }, {
26
+ actions: [
27
+ hrParts.withBehaviors(hrParts.actionButton('HrEmployeePage-timeoff', 'Request time off', 'primary'), hrParts.opensDialog('HrRequestTimeOff'))
28
+ ]
29
+ })
30
+ ],
31
+ summary: [
32
+ scene_blueprint_default.component('HrEmployeePage-status', 'statusChip', {
33
+ status: hrQueries.fromQuery(employee.summary, '0.status'),
34
+ tone: hrQueries.fromQuery(employee.summary, '0.tone')
35
+ }),
36
+ scene_blueprint_default.component('HrEmployeePage-left', 'statCard', {
37
+ label: 'Leave left (days)',
38
+ value: hrQueries.fromQuery(employee.summary, '0.leaveLeft'),
39
+ ...hrQueries.localeOfData
40
+ }),
41
+ scene_blueprint_default.component('HrEmployeePage-taken', 'statCard', {
42
+ label: 'Leave taken (days)',
43
+ value: hrQueries.fromQuery(employee.summary, '0.leaveTaken'),
44
+ ...hrQueries.localeOfData
45
+ }),
46
+ scene_blueprint_default.component('HrEmployeePage-service', 'statCard', {
47
+ label: 'Years of service',
48
+ value: hrQueries.fromQuery(employee.summary, '0.years'),
49
+ ...hrQueries.localeOfData
50
+ }),
51
+ scene_blueprint_default.component('HrEmployeePage-team', 'avatarStack', {
52
+ people: hrQueries.fromQuery(employee.summary, '0.people')
53
+ })
54
+ ],
55
+ tabs: [
56
+ scene_blueprint_default.component('HrEmployeePage-tabs', 'tabSet', {
57
+ tabs: hrQueries.fromQuery(hrQueries.HrQuery.RecordTabs),
58
+ urlKey: 'tab',
59
+ label: 'Employee sections'
60
+ })
61
+ ],
62
+ main: [
63
+ scene_blueprint_default.component('HrEmployeePage-form', 'formScreenBody', {
64
+ mode: 'readOnly',
65
+ sections: hrQueries.fromQuery(employee.sections),
66
+ values: hrQueries.fromQuery(employee.record, '0'),
67
+ ...hrQueries.localeOfData
68
+ })
69
+ ],
70
+ related: [
71
+ scene_blueprint_default.component('HrEmployeePage-documents', 'dataList', {
72
+ label: 'Documents',
73
+ rows: hrQueries.fromQuery(employee.documents),
74
+ columns: hrQueries.fromQuery('DocumentColumns'),
75
+ titleField: 'name',
76
+ pageSize: 5,
77
+ ...hrQueries.localeOfData
78
+ }),
79
+ scene_blueprint_default.component('HrEmployeePage-requests', 'dataList', {
80
+ label: 'Time off',
81
+ rows: hrQueries.fromQuery('EmployeeTimeOff'),
82
+ columns: hrQueries.fromQuery(hrQueries.hrQueriesOf(hrQueries.HrEntityKind.TimeOff).columns),
83
+ titleField: 'employee',
84
+ pageSize: 5,
85
+ ...hrQueries.localeOfData
86
+ })
87
+ ],
88
+ activity: [
89
+ scene_blueprint_default.component('HrEmployeePage-activity', 'activityFeed', {
90
+ label: 'History',
91
+ entries: hrQueries.fromQuery(employee.activity),
92
+ ...hrQueries.localeOfData
93
+ })
94
+ ],
95
+ aside: [
96
+ scene_blueprint_default.component('HrEmployeePage-tasks', 'checklistSection', {
97
+ label: 'Open tasks',
98
+ sections: hrQueries.fromQuery(employee.tasks),
99
+ ...hrQueries.localeOfData
100
+ })
101
+ ]
102
+ },
103
+ displayName: 'HR employee page',
104
+ description: 'One employee: personal and job information, documents and time-off balance.',
105
+ metadata: hrParts.hrMetadata('HrEmployeePage', 'Detail', [
106
+ scene_model.TemplateScope.Feature,
107
+ scene_model.TemplateScope.Subfeature
108
+ ])
109
+ };
110
+ /**
111
+ * The onboarding checklist: a `RecordPage` variant for one new hire. Where an ordinary record page leads with the record's fields, this one leads with the checklist -
112
+ * sections of tasks (before the first day, the first week, the first month), each task with an owner and a due date and a way to tick it off - and keeps the
113
+ * key facts of the hire (start date, manager, buddy, equipment) beside it.
114
+ */ const hrOnboardingChecklistTemplate = {
115
+ name: 'HrOnboardingChecklist',
116
+ fitsSlot: 'content',
117
+ slots: scene_blueprint_default.recordPageTemplate.slots,
118
+ arrangement: scene_blueprint_default.recordPageTemplate.arrangement,
119
+ content: {
120
+ header: [
121
+ scene_blueprint_default.component('HrOnboardingChecklist-header', 'pageHeader', {
122
+ title: hrQueries.fromQuery(onboarding.record, '0.name'),
123
+ subtitle: 'Onboarding checklist'
124
+ })
125
+ ],
126
+ summary: [
127
+ scene_blueprint_default.component('HrOnboardingChecklist-status', 'statusChip', {
128
+ status: hrQueries.fromQuery(onboarding.summary, '0.status'),
129
+ tone: hrQueries.fromQuery(onboarding.summary, '0.tone')
130
+ }),
131
+ scene_blueprint_default.component('HrOnboardingChecklist-done', 'statCard', {
132
+ label: 'Tasks done',
133
+ value: hrQueries.fromQuery(onboarding.summary, '0.done'),
134
+ ...hrQueries.localeOfData
135
+ }),
136
+ scene_blueprint_default.component('HrOnboardingChecklist-open', 'statCard', {
137
+ label: 'Tasks open',
138
+ value: hrQueries.fromQuery(onboarding.summary, '0.open'),
139
+ ...hrQueries.localeOfData
140
+ }),
141
+ scene_blueprint_default.component('HrOnboardingChecklist-owners', 'avatarStack', {
142
+ people: hrQueries.fromQuery(onboarding.summary, '0.people')
143
+ })
144
+ ],
145
+ tabs: [],
146
+ main: [
147
+ scene_blueprint_default.component('HrOnboardingChecklist-tasks', 'checklistSection', {
148
+ label: 'Onboarding tasks',
149
+ sections: hrQueries.fromQuery(onboarding.tasks),
150
+ editPermission: 'enabled',
151
+ ...hrQueries.localeOfData
152
+ })
153
+ ],
154
+ related: [],
155
+ activity: [
156
+ scene_blueprint_default.component('HrOnboardingChecklist-activity', 'activityFeed', {
157
+ label: 'History',
158
+ entries: hrQueries.fromQuery(onboarding.activity),
159
+ ...hrQueries.localeOfData
160
+ })
161
+ ],
162
+ aside: [
163
+ scene_blueprint_default.component('HrOnboardingChecklist-facts', 'formScreenBody', {
164
+ mode: 'readOnly',
165
+ sections: hrQueries.fromQuery(onboarding.sections),
166
+ values: hrQueries.fromQuery(onboarding.record, '0'),
167
+ ...hrQueries.localeOfData
168
+ })
169
+ ]
170
+ },
171
+ displayName: 'HR onboarding checklist',
172
+ description: 'One new hire\'s onboarding: checklist sections with an owner and a due date for each task, and the key facts of the hire.',
173
+ metadata: hrParts.hrMetadata('HrOnboardingChecklist', 'Detail', [
174
+ scene_model.TemplateScope.Feature,
175
+ scene_model.TemplateScope.Subfeature
176
+ ])
177
+ };
178
+
179
+ exports.hrEmployeePageTemplate = hrEmployeePageTemplate;
180
+ exports.hrOnboardingChecklistTemplate = hrOnboardingChecklistTemplate;
181
+ //# sourceMappingURL=recordTemplates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recordTemplates.js","sources":["../../../templates/recordTemplates.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { recordPageTemplate } from '@cratis/scene.blueprint.default';\nimport { HrEntityKind, HrQuery, fromQuery, hrQueriesOf, localeOfData } from '../hrQueries';\nimport { actionButton, component, hrMetadata, opensDialog, withBehaviors } from '../hrParts';\n\nconst employee = hrQueriesOf(HrEntityKind.Employee);\nconst onboarding = hrQueriesOf(HrEntityKind.Onboarding);\n\n/**\n * The employee page: the foundation `RecordPage` with the employee's name as its title, the time-off balance as key facts under it, the personal and job\n * information as the record, the employee's documents and time-off requests as related lists, their history and the open tasks beside it.\n */\nexport const hrEmployeePageTemplate: ScreenTemplate = {\n name: 'HrEmployeePage',\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component('HrEmployeePage-header', 'pageHeader', { title: fromQuery(employee.record, '0.name'), subtitle: fromQuery(employee.record, '0.title') }, {\n actions: [withBehaviors(actionButton('HrEmployeePage-timeoff', 'Request time off', 'primary'), opensDialog('HrRequestTimeOff'))],\n })],\n summary: [\n component('HrEmployeePage-status', 'statusChip', { status: fromQuery(employee.summary, '0.status'), tone: fromQuery(employee.summary, '0.tone') }),\n component('HrEmployeePage-left', 'statCard', { label: 'Leave left (days)', value: fromQuery(employee.summary, '0.leaveLeft'), ...localeOfData }),\n component('HrEmployeePage-taken', 'statCard', { label: 'Leave taken (days)', value: fromQuery(employee.summary, '0.leaveTaken'), ...localeOfData }),\n component('HrEmployeePage-service', 'statCard', { label: 'Years of service', value: fromQuery(employee.summary, '0.years'), ...localeOfData }),\n component('HrEmployeePage-team', 'avatarStack', { people: fromQuery(employee.summary, '0.people') }),\n ],\n tabs: [component('HrEmployeePage-tabs', 'tabSet', { tabs: fromQuery(HrQuery.RecordTabs), urlKey: 'tab', label: 'Employee sections' })],\n main: [component('HrEmployeePage-form', 'formScreenBody', { mode: 'readOnly', sections: fromQuery(employee.sections), values: fromQuery(employee.record, '0'), ...localeOfData })],\n related: [\n component('HrEmployeePage-documents', 'dataList', { label: 'Documents', rows: fromQuery(employee.documents), columns: fromQuery('DocumentColumns'), titleField: 'name', pageSize: 5, ...localeOfData }),\n component('HrEmployeePage-requests', 'dataList', {\n label: 'Time off', rows: fromQuery('EmployeeTimeOff'), columns: fromQuery(hrQueriesOf(HrEntityKind.TimeOff).columns), titleField: 'employee', pageSize: 5, ...localeOfData,\n }),\n ],\n activity: [component('HrEmployeePage-activity', 'activityFeed', { label: 'History', entries: fromQuery(employee.activity), ...localeOfData })],\n aside: [component('HrEmployeePage-tasks', 'checklistSection', { label: 'Open tasks', sections: fromQuery(employee.tasks), ...localeOfData })],\n },\n displayName: 'HR employee page',\n description: 'One employee: personal and job information, documents and time-off balance.',\n metadata: hrMetadata('HrEmployeePage', 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n};\n\n/**\n * The onboarding checklist: a `RecordPage` variant for one new hire. Where an ordinary record page leads with the record's fields, this one leads with the checklist -\n * sections of tasks (before the first day, the first week, the first month), each task with an owner and a due date and a way to tick it off - and keeps the\n * key facts of the hire (start date, manager, buddy, equipment) beside it.\n */\nexport const hrOnboardingChecklistTemplate: ScreenTemplate = {\n name: 'HrOnboardingChecklist',\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component('HrOnboardingChecklist-header', 'pageHeader', { title: fromQuery(onboarding.record, '0.name'), subtitle: 'Onboarding checklist' })],\n summary: [\n component('HrOnboardingChecklist-status', 'statusChip', { status: fromQuery(onboarding.summary, '0.status'), tone: fromQuery(onboarding.summary, '0.tone') }),\n component('HrOnboardingChecklist-done', 'statCard', { label: 'Tasks done', value: fromQuery(onboarding.summary, '0.done'), ...localeOfData }),\n component('HrOnboardingChecklist-open', 'statCard', { label: 'Tasks open', value: fromQuery(onboarding.summary, '0.open'), ...localeOfData }),\n component('HrOnboardingChecklist-owners', 'avatarStack', { people: fromQuery(onboarding.summary, '0.people') }),\n ],\n tabs: [],\n main: [component('HrOnboardingChecklist-tasks', 'checklistSection', { label: 'Onboarding tasks', sections: fromQuery(onboarding.tasks), editPermission: 'enabled', ...localeOfData })],\n related: [],\n activity: [component('HrOnboardingChecklist-activity', 'activityFeed', { label: 'History', entries: fromQuery(onboarding.activity), ...localeOfData })],\n aside: [component('HrOnboardingChecklist-facts', 'formScreenBody', { mode: 'readOnly', sections: fromQuery(onboarding.sections), values: fromQuery(onboarding.record, '0'), ...localeOfData })],\n },\n displayName: 'HR onboarding checklist',\n description: 'One new hire\\'s onboarding: checklist sections with an owner and a due date for each task, and the key facts of the hire.',\n metadata: hrMetadata('HrOnboardingChecklist', 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n};\n"],"names":["employee","hrQueriesOf","HrEntityKind","Employee","onboarding","Onboarding","hrEmployeePageTemplate","name","fitsSlot","slots","recordPageTemplate","arrangement","content","header","component","title","fromQuery","record","subtitle","actions","withBehaviors","actionButton","opensDialog","summary","status","tone","label","value","localeOfData","people","tabs","HrQuery","RecordTabs","urlKey","main","mode","sections","values","related","rows","documents","columns","titleField","pageSize","TimeOff","activity","entries","aside","tasks","displayName","description","metadata","hrMetadata","TemplateScope","Feature","Subfeature","hrOnboardingChecklistTemplate","editPermission"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,QAAAA,GAAWC,qBAAAA,CAAYC,sBAAAA,CAAaC,QAAQ,CAAA;AAClD,MAAMC,UAAAA,GAAaH,qBAAAA,CAAYC,sBAAAA,CAAaG,UAAU,CAAA;AAEtD;;;UAIaC,sBAAAA,GAAyC;IAClDC,IAAAA,EAAM,gBAAA;IACNC,QAAAA,EAAU,SAAA;AACVC,IAAAA,KAAAA,EAAOC,2CAAmBD,KAAK;AAC/BE,IAAAA,WAAAA,EAAaD,2CAAmBC,WAAW;IAC3CC,OAAAA,EAAS;QACLC,MAAAA,EAAQ;AAACC,YAAAA,iCAAAA,CAAU,yBAAyB,YAAA,EAAc;gBAAEC,KAAAA,EAAOC,mBAAAA,CAAUhB,QAAAA,CAASiB,MAAM,EAAE,QAAA,CAAA;gBAAWC,QAAAA,EAAUF,mBAAAA,CAAUhB,QAAAA,CAASiB,MAAM,EAAE,SAAA;aAAW,EAAG;gBACxJE,OAAAA,EAAS;AAACC,oBAAAA,qBAA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AAW,yBAAyB,QAAA,EAAU;AAACC,QAAAA,yBAAAA,CAAcC,OAAO;AAAED,QAAAA,yBAAAA,CAAcE;AAAW,KAAA;AAC7G;;;"}
@@ -0,0 +1,3 @@
1
+ import { ScenePackageBundle } from '@cratis/scene.react';
2
+ export declare const hrBlueprint: ScenePackageBundle;
3
+ //# sourceMappingURL=blueprint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.d.ts","sourceRoot":"","sources":["../../blueprint.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAMzD,eAAO,MAAM,WAAW,EAAE,kBAMzB,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { hrBlueprintManifest } from './manifest.js';
2
+ import { hrScreens } from './screens/index.js';
3
+ import { hrScreenTemplates } from './templates/index.js';
4
+ import { hrQuickCreateDialogs } from './templates/formTemplates.js';
5
+
6
+ // Copyright (c) Cratis. All rights reserved.
7
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
8
+ /** This blueprint as a loadable bundle: the manifest names things, this provides them. It provides no component - every component is the foundation's. */ const hrBlueprint = {
9
+ manifest: hrBlueprintManifest,
10
+ components: {},
11
+ screenTemplates: hrScreenTemplates,
12
+ dialogTemplates: hrQuickCreateDialogs,
13
+ screens: hrScreens
14
+ };
15
+
16
+ export { hrBlueprint };
17
+ //# sourceMappingURL=blueprint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"blueprint.js","sources":["../../blueprint.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { hrBlueprintManifest } from './manifest';\nimport { hrScreens } from './screens';\nimport { hrDialogTemplates, hrScreenTemplates } from './templates';\n\n/** This blueprint as a loadable bundle: the manifest names things, this provides them. It provides no component - every component is the foundation's. */\nexport const hrBlueprint: ScenePackageBundle = {\n manifest: hrBlueprintManifest,\n components: {},\n screenTemplates: hrScreenTemplates,\n dialogTemplates: hrDialogTemplates,\n screens: hrScreens,\n};\n"],"names":["hrBlueprint","manifest","hrBlueprintManifest","components","screenTemplates","hrScreenTemplates","dialogTemplates","hrDialogTemplates","screens","hrScreens"],"mappings":";;;;;AAAA;AACA;AAOA,2JACO,MAAMA,WAAAA,GAAkC;IAC3CC,QAAAA,EAAUC,mBAAAA;AACVC,IAAAA,UAAAA,EAAY,EAAC;IACbC,eAAAA,EAAiBC,iBAAAA;IACjBC,eAAAA,EAAiBC,oBAAAA;IACjBC,OAAAA,EAASC;AACb;;"}
@@ -0,0 +1,10 @@
1
+ import { ApplicationStructureIndex } from '@cratis/scene.engine';
2
+ import { ApplicationDocument, CompositionOptions } from '@cratis/scene.blueprint.default';
3
+ export declare const hrDefaultSampleDataId = "hr-nordic";
4
+ export declare function hrApplication(sampleData?: string): ApplicationDocument;
5
+ export declare const hrComposition: CompositionOptions;
6
+ export declare const hrNavigationModel: () => {
7
+ structure: ApplicationStructureIndex;
8
+ navigation: import("@cratis/scene.model").NavigationModel;
9
+ };
10
+ //# sourceMappingURL=hrApplication.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrApplication.d.ts","sourceRoot":"","sources":["../../hrApplication.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,sBAAsB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,EAAkC,MAAM,iCAAiC,CAAC;AAM1H,eAAO,MAAM,qBAAqB,cAAc,CAAC;AAOjD,wBAAgB,aAAa,CAAC,UAAU,GAAE,MAA8B,GAAG,mBAAmB,CAG7F;AAGD,eAAO,MAAM,aAAa,EAAE,kBAA4D,CAAC;AAGzF,eAAO,MAAM,iBAAiB;IAAY,SAAS;IAA8C,UAAU;CAAiB,CAAC"}
@@ -0,0 +1,44 @@
1
+ import { ApplicationStructureIndex } from '@cratis/scene.engine';
2
+ import { previewProfile, defaultLayouts } from '@cratis/scene.blueprint.default';
3
+ import { hrNavigation, hrStructure } from './navigation.js';
4
+ import { hrScreens } from './screens/index.js';
5
+ import { hrScreenTemplates } from './templates/index.js';
6
+ import { hrQuickCreateDialogs } from './templates/formTemplates.js';
7
+
8
+ // Copyright (c) Cratis. All rights reserved.
9
+ // Licensed under the MIT license. See LICENSE file in the project root for full license information.
10
+ /** The id of the sample-data pack a new application starts with. */ const hrDefaultSampleDataId = 'hr-nordic';
11
+ /**
12
+ * The example application of the blueprint: the foundation's layouts, the HR People and Time Off templates and quick-create dialogs and its seven screens, rendering against the
13
+ * foundation's packages with the default sample-data pack chosen. This is what a gallery previews and what the conformance fixture
14
+ * (`Samples/Hr/hr.play`) declares in Screenplay: the document, the structure and the navigation are the three things an application is made of.
15
+ */ function hrApplication(sampleData = hrDefaultSampleDataId) {
16
+ const profile = {
17
+ ...previewProfile(undefined),
18
+ name: 'HR People and Time Off',
19
+ sampleData: {
20
+ activePack: sampleData,
21
+ mappings: [],
22
+ bindings: []
23
+ }
24
+ };
25
+ return {
26
+ layouts: defaultLayouts,
27
+ screenTemplates: hrScreenTemplates,
28
+ dialogTemplates: hrQuickCreateDialogs,
29
+ screens: hrScreens,
30
+ uiProfiles: [
31
+ profile
32
+ ]
33
+ };
34
+ }
35
+ /** What a host composes the screens with: the application's logo, which the shell's topbar shows. */ const hrComposition = {
36
+ logo: hrNavigation.application.logo
37
+ };
38
+ /** The structure and navigation the shell's regions show and the items' destinations resolve against. */ const hrNavigationModel = ()=>({
39
+ structure: new ApplicationStructureIndex(hrStructure),
40
+ navigation: hrNavigation
41
+ });
42
+
43
+ export { hrApplication, hrComposition, hrDefaultSampleDataId, hrNavigationModel };
44
+ //# sourceMappingURL=hrApplication.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"hrApplication.js","sources":["../../hrApplication.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { UiProfile } from '@cratis/scene.model';\nimport { ApplicationStructureIndex } from '@cratis/scene.engine';\nimport { ApplicationDocument, CompositionOptions, defaultLayouts, previewProfile } from '@cratis/scene.blueprint.default';\nimport { hrNavigation, hrStructure } from './navigation';\nimport { hrScreens } from './screens';\nimport { hrDialogTemplates, hrScreenTemplates } from './templates';\n\n/** The id of the sample-data pack a new application starts with. */\nexport const hrDefaultSampleDataId = 'hr-nordic';\n\n/**\n * The example application of the blueprint: the foundation's layouts, the HR People and Time Off templates and quick-create dialogs and its seven screens, rendering against the\n * foundation's packages with the default sample-data pack chosen. This is what a gallery previews and what the conformance fixture\n * (`Samples/Hr/hr.play`) declares in Screenplay: the document, the structure and the navigation are the three things an application is made of.\n */\nexport function hrApplication(sampleData: string = hrDefaultSampleDataId): ApplicationDocument {\n const profile: UiProfile = { ...previewProfile(undefined), name: 'HR People and Time Off', sampleData: { activePack: sampleData, mappings: [], bindings: [] } };\n return { layouts: defaultLayouts, screenTemplates: hrScreenTemplates, dialogTemplates: hrDialogTemplates, screens: hrScreens, uiProfiles: [profile] };\n}\n\n/** What a host composes the screens with: the application's logo, which the shell's topbar shows. */\nexport const hrComposition: CompositionOptions = { logo: hrNavigation.application.logo };\n\n/** The structure and navigation the shell's regions show and the items' destinations resolve against. */\nexport const hrNavigationModel = () => ({ structure: new ApplicationStructureIndex(hrStructure), navigation: hrNavigation });\n"],"names":["hrDefaultSampleDataId","hrApplication","sampleData","profile","previewProfile","undefined","name","activePack","mappings","bindings","layouts","defaultLayouts","screenTemplates","hrScreenTemplates","dialogTemplates","hrDialogTemplates","screens","hrScreens","uiProfiles","hrComposition","logo","hrNavigation","application","hrNavigationModel","structure","ApplicationStructureIndex","hrStructure","navigation"],"mappings":";;;;;;;AAAA;AACA;AASA,qEACO,MAAMA,qBAAAA,GAAwB;AAErC;;;;AAIC,IACM,SAASC,aAAAA,CAAcC,UAAAA,GAAqBF,qBAAqB,EAAA;AACpE,IAAA,MAAMG,OAAAA,GAAqB;AAAE,QAAA,GAAGC,eAAeC,SAAAA,CAAU;QAAEC,IAAAA,EAAM,wBAAA;QAA0BJ,UAAAA,EAAY;YAAEK,UAAAA,EAAYL,UAAAA;AAAYM,YAAAA,QAAAA,EAAU,EAAE;AAAEC,YAAAA,QAAAA,EAAU;AAAG;AAAE,KAAA;IAC9J,OAAO;QAAEC,OAAAA,EAASC,cAAAA;QAAgBC,eAAAA,EAAiBC,iBAAAA;QAAmBC,eAAAA,EAAiBC,oBAAAA;QAAmBC,OAAAA,EAASC,SAAAA;QAAWC,UAAAA,EAAY;AAACf,YAAAA;AAAQ;AAAC,KAAA;AACxJ;AAEA,sGACO,MAAMgB,aAAAA,GAAoC;IAAEC,IAAAA,EAAMC,YAAAA,CAAaC,WAAW,CAACF;AAAK;AAEvF,0GACO,MAAMG,iBAAAA,GAAoB,KAAO;AAAEC,QAAAA,SAAAA,EAAW,IAAIC,yBAAAA,CAA0BC,WAAAA,CAAAA;QAAcC,UAAAA,EAAYN;AAAa,KAAA;;"}
@@ -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,OAAO,EACH,QAAQ,EAAqB,cAAc,EAAE,iBAAiB,EAAmF,YAAY,EAAE,cAAc,EAAE,gBAAgB,EAAE,aAAa,EACjN,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,iCAAiC,CAAC;AAGnE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC;AAG5B,eAAO,MAAM,UAAU,kBAAkB,CAAC;AAG1C,eAAO,MAAM,WAAW,iBAAkB,MAAM,KAAG,MAA0C,CAAC;AAG9F,eAAO,MAAM,UAAU,SAAU,MAAM,QAAQ,WAAW,GAAG,MAAM,GAAG,OAAO,GAAG,QAAQ,GAAG,MAAM,GAAG,QAAQ,GAAG,WAAW,UAAU,aAAa,EAAE,KAAG,gBACnD,CAAC;AAGpG,eAAO,MAAM,YAAY,OAAQ,MAAM,SAAS,MAAM,YAAY,SAAS,GAAG,WAAW,GAAG,OAAO,GAAG,QAAQ,UAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,cAAmB,QAAQ,EAAE,KAAG,iBACzC,CAAC;AAGtI,eAAO,MAAM,WAAW,mBAAoB,MAAM,KAAG,QAAQ,EACuG,CAAC;AAGrK,eAAO,MAAM,MAAM,WAAY,MAAM,KAAG,QAAQ,EACwG,CAAC;AAMzJ,eAAO,MAAM,mBAAmB,WAAY,MAAM,UAAU,MAAM,KAAG,QAAQ,EAK3E,CAAC;AAGH,eAAO,MAAM,YAAY,QAAO,QAAQ,EAAmI,CAAC;AAG5K,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,YAAY,WAAW,CAAC,aAAa,QAAQ,EAAE,KAAG,CAAgC,CAAC;AAE3H,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC;AAC9C,MAAM,MAAM,gBAAgB,GAAG,cAAc,CAAC"}
@@ -0,0 +1,114 @@
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 { 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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AMC,YAAAA,GAAe,IAAkB;AAAC,QAAA;YAAEpB,QAAAA,EAAU;AAAC,gBAAA;oBAAEC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBC;AAAM,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,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"}