@cratis/scene.blueprint.hr 4.50.0 → 4.56.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.
- package/README.md +67 -0
- package/blueprintCatalog.json +16 -0
- package/dist/cjs/hrParts.js.map +1 -1
- package/dist/cjs/hrQueries.js +3 -0
- package/dist/cjs/hrQueries.js.map +1 -1
- package/dist/cjs/hrScreenSet.js +7 -0
- package/dist/cjs/hrScreenSet.js.map +1 -1
- package/dist/cjs/index.js +2 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/navigation.js +9 -1
- package/dist/cjs/navigation.js.map +1 -1
- package/dist/cjs/templates/index.js +3 -0
- package/dist/cjs/templates/index.js.map +1 -1
- package/dist/cjs/templates/teamCalendarTemplate.js +99 -0
- package/dist/cjs/templates/teamCalendarTemplate.js.map +1 -0
- package/dist/esm/hrParts.d.ts +1 -1
- package/dist/esm/hrParts.d.ts.map +1 -1
- package/dist/esm/hrParts.js.map +1 -1
- package/dist/esm/hrQueries.d.ts +3 -0
- package/dist/esm/hrQueries.d.ts.map +1 -1
- package/dist/esm/hrQueries.js +3 -0
- package/dist/esm/hrQueries.js.map +1 -1
- package/dist/esm/hrScreenSet.d.ts.map +1 -1
- package/dist/esm/hrScreenSet.js +7 -0
- package/dist/esm/hrScreenSet.js.map +1 -1
- package/dist/esm/index.js +1 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/navigation.d.ts.map +1 -1
- package/dist/esm/navigation.js +9 -1
- package/dist/esm/navigation.js.map +1 -1
- package/dist/esm/templates/index.d.ts +1 -0
- package/dist/esm/templates/index.d.ts.map +1 -1
- package/dist/esm/templates/index.js +3 -1
- package/dist/esm/templates/index.js.map +1 -1
- package/dist/esm/templates/teamCalendarTemplate.d.ts +3 -0
- package/dist/esm/templates/teamCalendarTemplate.d.ts.map +1 -0
- package/dist/esm/templates/teamCalendarTemplate.js +97 -0
- package/dist/esm/templates/teamCalendarTemplate.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -1
- package/hrParts.ts +1 -1
- package/hrQueries.ts +3 -0
- package/hrScreenSet.ts +1 -0
- package/navigation.ts +2 -1
- package/package.json +9 -9
- package/sampleData/hr-nordic.json +150 -1
- package/templates/index.ts +3 -1
- package/templates/teamCalendarTemplate.ts +33 -0
- package/thumbnails/HrTeamCalendar.svg +16 -0
package/README.md
ADDED
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Scene
|
|
2
|
+
|
|
3
|
+
**Describing a user interface without describing a platform** — Scene is the UI model of the Cratis
|
|
4
|
+
model-first layer (experimental).
|
|
5
|
+
|
|
6
|
+
The object model and runtime for Screenplay-based UIs: `Scene.Model` (platform-agnostic screens, layouts,
|
|
7
|
+
forms, contribution points, ui profiles and themes), `Scene.Engine` (binding/resolution runtime), and
|
|
8
|
+
`Scene.React` (the React renderer).
|
|
9
|
+
|
|
10
|
+
## Packages / Deployables
|
|
11
|
+
|
|
12
|
+
[](http://nuget.org/packages/Cratis.Scene.Model)
|
|
13
|
+
[](https://www.npmjs.com/package/@cratis/scene.model)
|
|
14
|
+
[](https://www.npmjs.com/package/@cratis/scene.engine)
|
|
15
|
+
[](https://www.npmjs.com/package/@cratis/scene.react)
|
|
16
|
+
|
|
17
|
+
## Builds
|
|
18
|
+
|
|
19
|
+
[](https://github.com/cratis/scene/actions/workflows/dotnet-build.yml)
|
|
20
|
+
[](https://github.com/cratis/scene/actions/workflows/javascript-build.yml)
|
|
21
|
+
|
|
22
|
+
## Description
|
|
23
|
+
|
|
24
|
+
Scene owns the *object model and runtime* half of the Screenplay stack. In the model-first pipeline,
|
|
25
|
+
[Screenplay](https://github.com/Cratis/Screenplay) describes an event-sourced, CQRS system,
|
|
26
|
+
[Stage](https://github.com/Cratis/Stage) renders it into a running application, and Scene is how that
|
|
27
|
+
application's user interface is described — independently of any rendering platform.
|
|
28
|
+
|
|
29
|
+
`Scene.Model` is the platform-agnostic
|
|
30
|
+
C# object model that [Stage](https://github.com/Cratis/Stage) translates Screenplay's parsed language constructs into, and that [Studio](https://github.com/Cratis/Studio)'s
|
|
31
|
+
design-time tooling reads and writes. `Scene.Engine` walks that graph, resolves bindings (data, action, form,
|
|
32
|
+
navigation contribution) and drives whichever renderer is plugged in — it does not know React exists.
|
|
33
|
+
`Scene.React` is one renderer implementing the abstract vocabulary against real React/DOM; sibling positions
|
|
34
|
+
are reserved for future `Scene.Native` / `Scene.Desktop` renderers. Vendor and internal component packages
|
|
35
|
+
(PrimeReact, internal widget libraries) are adapters plugging into the renderer contract, not part of it.
|
|
36
|
+
|
|
37
|
+
The design-time editor built on top of this object model lives in Studio, not here — see
|
|
38
|
+
[StudioIssues#156](https://github.com/Cratis/StudioIssues/issues/156).
|
|
39
|
+
|
|
40
|
+
## Support
|
|
41
|
+
|
|
42
|
+
Cratis is an open community, and we are glad to help users, teams evaluating the stack, and contributors.
|
|
43
|
+
|
|
44
|
+
| Channel | Details |
|
|
45
|
+
|---|---|
|
|
46
|
+
| Discord | Join the community on [Discord](https://discord.gg/kt4AMpV8WV) for questions and discussions |
|
|
47
|
+
| GitHub Issues | [Report bugs or request features](https://github.com/Cratis/Scene/issues) |
|
|
48
|
+
| Documentation | Read the docs at [cratis.io](https://cratis.io) |
|
|
49
|
+
|
|
50
|
+
## The Cratis ecosystem
|
|
51
|
+
|
|
52
|
+
This project is part of [Cratis](https://www.cratis.io) — free, MIT-licensed tools for building event-sourced and CQRS applications.
|
|
53
|
+
|
|
54
|
+
- **[Chronicle](https://github.com/Cratis/Chronicle)** — event-sourcing database and runtime. Orleans-based kernel, pluggable storage (MongoDB default; PostgreSQL, SQL Server, SQLite, in-memory), language-agnostic gRPC contracts. [Docs](https://www.cratis.io/chronicle/)
|
|
55
|
+
- **Chronicle clients** — first-class [.NET SDK](https://github.com/Cratis/Chronicle), plus [TypeScript](https://github.com/Cratis/Chronicle.TypeScript), [Kotlin/Java](https://github.com/Cratis/Chronicle.Kotlin), and [Elixir](https://github.com/Cratis/Chronicle.Elixir); [Python](https://github.com/Cratis/Chronicle.Python) coming soon (pre-alpha). AI agents connect through the [Chronicle MCP server](https://github.com/Cratis/Chronicle.Mcp).
|
|
56
|
+
- **[Arc](https://github.com/Cratis/Arc)** — opinionated CQRS framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Works without event sourcing. [Docs](https://www.cratis.io/arc/)
|
|
57
|
+
- **[Components](https://github.com/Cratis/Components)** — React components aligned with Arc patterns. [Docs](https://www.cratis.io/components/)
|
|
58
|
+
- **[CLI](https://github.com/Cratis/cli) + Workbench** — inspect and diagnose Chronicle from the terminal or the browser. [Docs](https://www.cratis.io/cli/)
|
|
59
|
+
- **Model-first layer (experimental)** — [Studio](https://github.com/Cratis/Studio), [Screenplay](https://github.com/Cratis/Screenplay), [Stage](https://github.com/Cratis/Stage), Scene (this repository), [Prologue](https://github.com/Cratis/Prologue)
|
|
60
|
+
- **Supporting** — [Fundamentals](https://github.com/Cratis/Fundamentals), [Specifications](https://github.com/Cratis/Specifications), [Synopsis](https://github.com/Cratis/Synopsis), [Lens](https://github.com/Cratis/Lens), [Narrator](https://github.com/Cratis/Narrator), and free [AI tooling](https://github.com/Cratis/AI) (preview); [Ensemble](https://github.com/Cratis/Ensemble) coming soon (pre-release)
|
|
61
|
+
- **[Samples](https://github.com/Cratis/Samples)** — runnable event sourcing and CQRS samples for the whole stack
|
|
62
|
+
|
|
63
|
+
Everything Cratis publishes today is MIT licensed and free to use.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
Part of the [Cratis](https://www.cratis.io) platform · [MIT](./LICENSE)
|
package/blueprintCatalog.json
CHANGED
|
@@ -52,6 +52,13 @@
|
|
|
52
52
|
"template": "HrTimeOffBalanceList",
|
|
53
53
|
"parent": "hr.timeoff"
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
"name": "hr.timeoff.calendar",
|
|
57
|
+
"title": "Team calendar",
|
|
58
|
+
"description": "Who is away and when, on a month, a week or as an agenda.",
|
|
59
|
+
"template": "HrTeamCalendar",
|
|
60
|
+
"parent": "hr.timeoff"
|
|
61
|
+
},
|
|
55
62
|
{
|
|
56
63
|
"name": "hr.onboarding",
|
|
57
64
|
"title": "Onboarding",
|
|
@@ -113,6 +120,15 @@
|
|
|
113
120
|
"category": "Business / HR",
|
|
114
121
|
"thumbnail": "thumbnails/HrTimeOffBalanceList.svg"
|
|
115
122
|
},
|
|
123
|
+
{
|
|
124
|
+
"name": "HrTeamCalendar",
|
|
125
|
+
"kind": "ScreenTemplate",
|
|
126
|
+
"displayName": "HR team calendar",
|
|
127
|
+
"description": "Who is away and when, on a month, a week or as an agenda, with the kind of leave told in words.",
|
|
128
|
+
"type": "Calendar",
|
|
129
|
+
"category": "Business / HR",
|
|
130
|
+
"thumbnail": "thumbnails/HrTeamCalendar.svg"
|
|
131
|
+
},
|
|
116
132
|
{
|
|
117
133
|
"name": "HrOnboardingList",
|
|
118
134
|
"kind": "ScreenTemplate",
|
package/dist/cjs/hrParts.js.map
CHANGED
|
@@ -1 +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,
|
|
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' | 'Calendar', 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,EAAgGC,UACpI;AAAE,QAAA,GAAGC,uCAAoB;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,iCAAAA,CAAUL,IAAI,cAAA,EAAgB;AAAEC,YAAAA,KAAAA;AAAOC,YAAAA,QAAAA;YAAUI,UAAAA,EAAY,SAAA;AAAW,YAAA,GAAGH;SAAM,CAAE;AAAE,QAAA,GAAIC,SAAAA,GAAY;AAAEA,YAAAA;AAAU,SAAA,GAAI;AAAI,KAAA;AAEnI,oFACO,MAAMG,WAAAA,GAAc,CAACC,cAAAA,GACxB;AAAC,QAAA;YAAEC,QAAAA,EAAU;AAAC,gBAAA;oBAAEC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,mCAAuBC;AAAM,qBAAA;oBAAGC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,kCAAsBC,UAAU;AAAER,4BAAAA;AAAe;AAAsB;AAAC;AAAE;AAAC;;AAElK,8DACO,MAAMS,MAAAA,GAAS,CAACC,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@@ -16,6 +16,9 @@ var scene_model = require('@cratis/scene.model');
|
|
|
16
16
|
/** One row: the `locale` the figures and dates are formatted in. */ Settings: 'HrSettings',
|
|
17
17
|
RecordTabs: 'HrRecordTabs',
|
|
18
18
|
OrgNodes: 'OrgNodes',
|
|
19
|
+
TeamCalendarEvents: 'TeamCalendarEvents',
|
|
20
|
+
TeamCalendarFilterFields: 'TeamCalendarFilterFields',
|
|
21
|
+
TeamCalendarColumns: 'TeamCalendarColumns',
|
|
19
22
|
FormErrors: 'HrFormErrors'
|
|
20
23
|
};
|
|
21
24
|
/** The HR entities a template is made for. */ var HrEntityKind = /*#__PURE__*/ function(HrEntityKind) {
|
|
@@ -1 +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;AACA;AAIA;;;UAIaA,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,8BAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,qHACO,MAAMI,OAAAA,GAAU;AACnB,yEACAC,QAAAA,EAAU,YAAA;IACVC,UAAAA,EAAY,cAAA;IACZC,QAAAA,EAAU,UAAA;IACVC,UAAAA,EAAY;AAChB;AAEA,+CACO,IAAKC,YAAAA,iBAAAA,SAAAA,YAAAA,EAAAA;;;;;AAAAA,IAAAA,OAAAA,YAAAA;AAKX,CAAA,CAAA,EAAA;AAED,sFACO,MAAMC,cAAAA,GAA+C;AACxD,IAAA,CAAA,UAAA,GAAyB,WAAA;AACzB,IAAA,CAAA,SAAA,GAAwB,iBAAA;AACxB,IAAA,CAAA,SAAA,GAAwB,UAAA;AACxB,IAAA,CAAA,YAAA,GAA2B;AAC/B;AAEA;;;AAGC,IACM,MAAMC,WAAAA,GAAc,CAACC,UAA0B;QAClDC,IAAAA,EAAMH,cAAc,CAACE,MAAAA,CAAO;QAC5BE,OAAAA,EAAS,CAAA,EAAGF,MAAAA,CAAO,OAAO,CAAC;QAC3BG,YAAAA,EAAc,CAAA,EAAGH,MAAAA,CAAO,YAAY,CAAC;QACrCI,KAAAA,EAAO,CAAA,EAAGJ,MAAAA,CAAO,KAAK,CAAC;QACvBK,aAAAA,EAAe,CAAA,EAAGL,MAAAA,CAAO,aAAa,CAAC;QACvCM,SAAAA,EAAW,CAAA,EAAGN,MAAAA,CAAO,SAAS,CAAC;QAC/BO,QAAAA,EAAU,CAAA,EAAGP,MAAAA,CAAO,QAAQ,CAAC;QAC7BQ,aAAAA,EAAe,CAAA,EAAGR,MAAAA,CAAO,aAAa,CAAC;QACvCS,MAAAA,EAAQ,CAAA,EAAGT,MAAAA,CAAO,MAAM,CAAC;QACzBU,OAAAA,EAAS,CAAA,EAAGV,MAAAA,CAAO,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,
|
|
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 TeamCalendarEvents: 'TeamCalendarEvents',\n TeamCalendarFilterFields: 'TeamCalendarFilterFields',\n TeamCalendarColumns: 'TeamCalendarColumns',\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","TeamCalendarEvents","TeamCalendarFilterFields","TeamCalendarColumns","FormErrors","HrEntityKind","hrEntityPlural","hrQueriesOf","entity","rows","columns","filterFields","views","columnChoices","selection","sections","quickSections","record","summary","documents","activity","tasks","localeOfData","locale","currencyOfData","currency"],"mappings":";;;;AAAA;AACA;AAIA;;;UAIaA,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,8BAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,qHACO,MAAMI,OAAAA,GAAU;AACnB,yEACAC,QAAAA,EAAU,YAAA;IACVC,UAAAA,EAAY,cAAA;IACZC,QAAAA,EAAU,UAAA;IACVC,kBAAAA,EAAoB,oBAAA;IACpBC,wBAAAA,EAA0B,0BAAA;IAC1BC,mBAAAA,EAAqB,qBAAA;IACrBC,UAAAA,EAAY;AAChB;AAEA,+CACO,IAAKC,YAAAA,iBAAAA,SAAAA,YAAAA,EAAAA;;;;;AAAAA,IAAAA,OAAAA,YAAAA;AAKX,CAAA,CAAA,EAAA;AAED,sFACO,MAAMC,cAAAA,GAA+C;AACxD,IAAA,CAAA,UAAA,GAAyB,WAAA;AACzB,IAAA,CAAA,SAAA,GAAwB,iBAAA;AACxB,IAAA,CAAA,SAAA,GAAwB,UAAA;AACxB,IAAA,CAAA,YAAA,GAA2B;AAC/B;AAEA;;;AAGC,IACM,MAAMC,WAAAA,GAAc,CAACC,UAA0B;QAClDC,IAAAA,EAAMH,cAAc,CAACE,MAAAA,CAAO;QAC5BE,OAAAA,EAAS,CAAA,EAAGF,MAAAA,CAAO,OAAO,CAAC;QAC3BG,YAAAA,EAAc,CAAA,EAAGH,MAAAA,CAAO,YAAY,CAAC;QACrCI,KAAAA,EAAO,CAAA,EAAGJ,MAAAA,CAAO,KAAK,CAAC;QACvBK,aAAAA,EAAe,CAAA,EAAGL,MAAAA,CAAO,aAAa,CAAC;QACvCM,SAAAA,EAAW,CAAA,EAAGN,MAAAA,CAAO,SAAS,CAAC;QAC/BO,QAAAA,EAAU,CAAA,EAAGP,MAAAA,CAAO,QAAQ,CAAC;QAC7BQ,aAAAA,EAAe,CAAA,EAAGR,MAAAA,CAAO,aAAa,CAAC;QACvCS,MAAAA,EAAQ,CAAA,EAAGT,MAAAA,CAAO,MAAM,CAAC;QACzBU,OAAAA,EAAS,CAAA,EAAGV,MAAAA,CAAO,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,EAAQhC,SAAAA,CAAUM,OAAAA,CAAQC,QAAQ,EAAE,UAAA;AAAY;MACjE0B,cAAAA,GAAiB;AAAE,IAAA,GAAGF,YAAY;IAAEG,QAAAA,EAAUlC,SAAAA,CAAUM,OAAAA,CAAQC,QAAQ,EAAE,YAAA;AAAc;;;;;;;;"}
|
package/dist/cjs/hrScreenSet.js
CHANGED
|
@@ -41,6 +41,13 @@
|
|
|
41
41
|
parent: 'hr.timeoff',
|
|
42
42
|
description: 'What each employee has taken and has left.'
|
|
43
43
|
},
|
|
44
|
+
{
|
|
45
|
+
name: 'hr.timeoff.calendar',
|
|
46
|
+
title: 'Team calendar',
|
|
47
|
+
template: 'HrTeamCalendar',
|
|
48
|
+
parent: 'hr.timeoff',
|
|
49
|
+
description: 'Who is away and when, on a month, a week or as an agenda.'
|
|
50
|
+
},
|
|
44
51
|
{
|
|
45
52
|
name: 'hr.onboarding',
|
|
46
53
|
title: 'Onboarding',
|
|
@@ -1 +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;;;"}
|
|
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.timeoff.calendar', title: 'Team calendar', template: 'HrTeamCalendar', parent: 'hr.timeoff', description: 'Who is away and when, on a month, a week or as an agenda.' },\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,qBAAA;QAAuBC,KAAAA,EAAO,eAAA;QAAiBC,QAAAA,EAAU,gBAAA;QAAkBG,MAAAA,EAAQ,YAAA;QAAcD,WAAAA,EAAa;AAA4D,KAAA;AAClL,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;;;"}
|
package/dist/cjs/index.js
CHANGED
|
@@ -16,6 +16,7 @@ var formTemplates = require('./templates/formTemplates.js');
|
|
|
16
16
|
var listTemplates = require('./templates/listTemplates.js');
|
|
17
17
|
var recordTemplates = require('./templates/recordTemplates.js');
|
|
18
18
|
var orgChartTemplate = require('./templates/orgChartTemplate.js');
|
|
19
|
+
var teamCalendarTemplate = require('./templates/teamCalendarTemplate.js');
|
|
19
20
|
|
|
20
21
|
|
|
21
22
|
|
|
@@ -66,4 +67,5 @@ exports.hrTimeOffListTemplate = listTemplates.hrTimeOffListTemplate;
|
|
|
66
67
|
exports.hrEmployeePageTemplate = recordTemplates.hrEmployeePageTemplate;
|
|
67
68
|
exports.hrOnboardingChecklistTemplate = recordTemplates.hrOnboardingChecklistTemplate;
|
|
68
69
|
exports.hrOrgChartTemplate = orgChartTemplate.hrOrgChartTemplate;
|
|
70
|
+
exports.hrTeamCalendarTemplate = teamCalendarTemplate.hrTeamCalendarTemplate;
|
|
69
71
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/cjs/navigation.js
CHANGED
|
@@ -42,7 +42,7 @@ var hrScreenSet = require('./hrScreenSet.js');
|
|
|
42
42
|
})();
|
|
43
43
|
/**
|
|
44
44
|
* The navigation of the application the blueprint is: the topbar names the module, and the module's sidebar - which overrides the application's - lists
|
|
45
|
-
* the four places an HR team goes: Directory, Org chart, Time off (with its requests and its balances beneath it) and Onboarding.
|
|
45
|
+
* the four places an HR team goes: Directory, Org chart, Time off (with its requests, the team calendar and its balances beneath it) and Onboarding.
|
|
46
46
|
*/ const hrNavigation = {
|
|
47
47
|
application: {
|
|
48
48
|
logo: {
|
|
@@ -104,6 +104,14 @@ var hrScreenSet = require('./hrScreenSet.js');
|
|
|
104
104
|
feature: 'timeoff'
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
|
+
{
|
|
108
|
+
id: 'calendar',
|
|
109
|
+
title: 'Team calendar',
|
|
110
|
+
target: {
|
|
111
|
+
module: hrModule,
|
|
112
|
+
feature: 'timeoff.calendar'
|
|
113
|
+
}
|
|
114
|
+
},
|
|
107
115
|
{
|
|
108
116
|
id: 'balances',
|
|
109
117
|
title: 'Balances',
|
|
@@ -1 +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,+BAAAA,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,CAACO,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUV,EAAE,KAAKA,EAAAA,CAAAA;AAC9D,YAAA,IAAI,CAACQ,IAAAA,EAAM;gBACPA,IAAAA,GAAO;AAAER,oBAAAA,EAAAA;AAAIC,oBAAAA,IAAAA,EAAME,OAAOQ,KAAK;AAAET,oBAAAA,QAAAA,EAAU,EAAE;AAAEU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C,MAAAA,EAAQ5B,QAAAA;gCAAUiC,OAAAA,EAAS;AAAM;AAAE,yBAAA;AAC9E,wBAAA;4BACI9B,EAAAA,EAAI,SAAA;4BAAWW,KAAAA,EAAO,UAAA;4BAAYa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,QAAAA;gCAAUiC,OAAAA,EAAS;AAAU,6BAAA;4BAAGC,QAAAA,EAAU;AAC1F,gCAAA;oCAAE/B,EAAAA,EAAI,UAAA;oCAAYW,KAAAA,EAAO,UAAA;oCAAYa,MAAAA,EAAQ;wCAAEC,MAAAA,EAAQ5B,QAAAA;wCAAUiC,OAAAA,EAAS;AAAU;AAAE,iCAAA;AACtF,gCAAA;oCAAE9B,EAAAA,EAAI,UAAA;oCAAYW,KAAAA,EAAO,UAAA;oCAAYa,MAAAA,EAAQ;wCAAEC,MAAAA,EAAQ5B,QAAAA;wCAAUiC,OAAAA,EAAS;AAAmB;AAAE;AAClG;AACL,yBAAA;AACA,wBAAA;4BAAE9B,EAAAA,EAAI,YAAA;4BAAcW,KAAAA,EAAO,YAAA;4BAAca,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,QAAAA;gCAAUiC,OAAAA,EAAS;AAAa;AAAE;AAChG;AACL;AAAE;AACN;AAAE;AACN;;;;"}
|
|
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, the team calendar 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: 'calendar', title: 'Team calendar', target: { module: hrModule, feature: 'timeoff.calendar' } },\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;;;A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A,EAAS;AAAmB;AAAE,iCAAA;AACpG,gCAAA;oCAAE9B,EAAAA,EAAI,UAAA;oCAAYW,KAAAA,EAAO,UAAA;oCAAYa,MAAAA,EAAQ;wCAAEC,MAAAA,EAAQ5B,QAAAA;wCAAUiC,OAAAA,EAAS;AAAmB;AAAE;AAClG;AACL,yBAAA;AACA,wBAAA;4BAAE9B,EAAAA,EAAI,YAAA;4BAAcW,KAAAA,EAAO,YAAA;4BAAca,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,QAAAA;gCAAUiC,OAAAA,EAAS;AAAa;AAAE;AAChG;AACL;AAAE;AACN;AAAE;AACN;;;;"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var listTemplates = require('./listTemplates.js');
|
|
4
4
|
var orgChartTemplate = require('./orgChartTemplate.js');
|
|
5
|
+
var teamCalendarTemplate = require('./teamCalendarTemplate.js');
|
|
5
6
|
var recordTemplates = require('./recordTemplates.js');
|
|
6
7
|
var formTemplates = require('./formTemplates.js');
|
|
7
8
|
|
|
@@ -13,6 +14,7 @@ var formTemplates = require('./formTemplates.js');
|
|
|
13
14
|
orgChartTemplate.hrOrgChartTemplate,
|
|
14
15
|
listTemplates.hrTimeOffListTemplate,
|
|
15
16
|
listTemplates.hrTimeOffBalanceListTemplate,
|
|
17
|
+
teamCalendarTemplate.hrTeamCalendarTemplate,
|
|
16
18
|
listTemplates.hrOnboardingListTemplate,
|
|
17
19
|
recordTemplates.hrOnboardingChecklistTemplate
|
|
18
20
|
];
|
|
@@ -22,6 +24,7 @@ exports.hrOnboardingListTemplate = listTemplates.hrOnboardingListTemplate;
|
|
|
22
24
|
exports.hrTimeOffBalanceListTemplate = listTemplates.hrTimeOffBalanceListTemplate;
|
|
23
25
|
exports.hrTimeOffListTemplate = listTemplates.hrTimeOffListTemplate;
|
|
24
26
|
exports.hrOrgChartTemplate = orgChartTemplate.hrOrgChartTemplate;
|
|
27
|
+
exports.hrTeamCalendarTemplate = teamCalendarTemplate.hrTeamCalendarTemplate;
|
|
25
28
|
exports.hrEmployeePageTemplate = recordTemplates.hrEmployeePageTemplate;
|
|
26
29
|
exports.hrOnboardingChecklistTemplate = recordTemplates.hrOnboardingChecklistTemplate;
|
|
27
30
|
exports.hrDialogTemplates = formTemplates.hrQuickCreateDialogs;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":["../../../templates/index.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 { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate } from './listTemplates';\nimport { hrOrgChartTemplate } from './orgChartTemplate';\nimport { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './recordTemplates';\n\nexport * from './listTemplates';\nexport * from './recordTemplates';\nexport * from './orgChartTemplate';\nexport * from './formTemplates';\n\n/** Every screen template this blueprint provides, in the order the manifest lists them. */\nexport const hrScreenTemplates = [\n hrEmployeeDirectoryTemplate, hrEmployeePageTemplate,\n hrOrgChartTemplate,\n hrTimeOffListTemplate, hrTimeOffBalanceListTemplate,\n hrOnboardingListTemplate, hrOnboardingChecklistTemplate,\n];\n\nexport { hrQuickCreateDialogs as hrDialogTemplates } from './formTemplates';\n"],"names":["hrScreenTemplates","hrEmployeeDirectoryTemplate","hrEmployeePageTemplate","hrOrgChartTemplate","hrTimeOffListTemplate","hrTimeOffBalanceListTemplate","hrOnboardingListTemplate","hrOnboardingChecklistTemplate"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../templates/index.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 { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate } from './listTemplates';\nimport { hrOrgChartTemplate } from './orgChartTemplate';\nimport { hrTeamCalendarTemplate } from './teamCalendarTemplate';\nimport { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './recordTemplates';\n\nexport * from './listTemplates';\nexport * from './recordTemplates';\nexport * from './orgChartTemplate';\nexport * from './teamCalendarTemplate';\nexport * from './formTemplates';\n\n/** Every screen template this blueprint provides, in the order the manifest lists them. */\nexport const hrScreenTemplates = [\n hrEmployeeDirectoryTemplate, hrEmployeePageTemplate,\n hrOrgChartTemplate,\n hrTimeOffListTemplate, hrTimeOffBalanceListTemplate, hrTeamCalendarTemplate,\n hrOnboardingListTemplate, hrOnboardingChecklistTemplate,\n];\n\nexport { hrQuickCreateDialogs as hrDialogTemplates } from './formTemplates';\n"],"names":["hrScreenTemplates","hrEmployeeDirectoryTemplate","hrEmployeePageTemplate","hrOrgChartTemplate","hrTimeOffListTemplate","hrTimeOffBalanceListTemplate","hrTeamCalendarTemplate","hrOnboardingListTemplate","hrOnboardingChecklistTemplate"],"mappings":";;;;;;;;AAAA;AACA;AAaA,4FACO,MAAMA,iBAAAA,GAAoB;AAC7BC,IAAAA,yCAAAA;AAA6BC,IAAAA,sCAAAA;AAC7BC,IAAAA,mCAAAA;AACAC,IAAAA,mCAAAA;AAAuBC,IAAAA,0CAAAA;AAA8BC,IAAAA,2CAAAA;AACrDC,IAAAA,sCAAAA;AAA0BC,IAAAA;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
/**
|
|
11
|
+
* The team calendar: who is away and when, on a month, a week or as an agenda (the foundation's `calendarGrid`). A request spans the days it asks for, the kind of
|
|
12
|
+
* leave is told in words as well as by color, and the day and view are kept in the address, so a link shares the calendar as it is. A filter narrows it to a person
|
|
13
|
+
* or a kind of leave, and the list beside it names everyone away in the period.
|
|
14
|
+
*/ const hrTeamCalendarTemplate = {
|
|
15
|
+
name: 'HrTeamCalendar',
|
|
16
|
+
fitsSlot: 'content',
|
|
17
|
+
slots: [
|
|
18
|
+
{
|
|
19
|
+
name: 'header'
|
|
20
|
+
},
|
|
21
|
+
{
|
|
22
|
+
name: 'filters'
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
name: 'calendar'
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
name: 'away'
|
|
29
|
+
}
|
|
30
|
+
],
|
|
31
|
+
arrangement: {
|
|
32
|
+
root: scene_blueprint_default.column([
|
|
33
|
+
scene_blueprint_default.slotLeaf('header'),
|
|
34
|
+
scene_blueprint_default.slotLeaf('filters'),
|
|
35
|
+
scene_blueprint_default.grid([
|
|
36
|
+
scene_blueprint_default.slotLeaf('calendar', {
|
|
37
|
+
span: 2
|
|
38
|
+
}),
|
|
39
|
+
scene_blueprint_default.slotLeaf('away')
|
|
40
|
+
], 3, 16)
|
|
41
|
+
], 16),
|
|
42
|
+
overrides: [
|
|
43
|
+
{
|
|
44
|
+
width: scene_model.WidthSizeClass.Compact,
|
|
45
|
+
root: scene_blueprint_default.column([
|
|
46
|
+
scene_blueprint_default.slotLeaf('header'),
|
|
47
|
+
scene_blueprint_default.slotLeaf('filters'),
|
|
48
|
+
scene_blueprint_default.slotLeaf('calendar'),
|
|
49
|
+
scene_blueprint_default.slotLeaf('away')
|
|
50
|
+
], 16)
|
|
51
|
+
}
|
|
52
|
+
]
|
|
53
|
+
},
|
|
54
|
+
content: {
|
|
55
|
+
header: [
|
|
56
|
+
scene_blueprint_default.component('HrTeamCalendar-header', 'pageHeader', {
|
|
57
|
+
title: 'Team calendar',
|
|
58
|
+
subtitle: 'Who is away and when'
|
|
59
|
+
}, {
|
|
60
|
+
actions: [
|
|
61
|
+
hrParts.withBehaviors(hrParts.actionButton('HrTeamCalendar-request', 'Request time off', 'primary'), hrParts.opensDialog('HrRequestTimeOff'))
|
|
62
|
+
]
|
|
63
|
+
})
|
|
64
|
+
],
|
|
65
|
+
filters: [
|
|
66
|
+
scene_blueprint_default.component('HrTeamCalendar-filter', 'filterBuilder', {
|
|
67
|
+
fields: hrQueries.fromQuery(hrQueries.HrQuery.TeamCalendarFilterFields)
|
|
68
|
+
})
|
|
69
|
+
],
|
|
70
|
+
calendar: [
|
|
71
|
+
scene_blueprint_default.component('HrTeamCalendar-grid', 'calendarGrid', {
|
|
72
|
+
label: 'Team calendar',
|
|
73
|
+
events: hrQueries.fromQuery(hrQueries.HrQuery.TeamCalendarEvents),
|
|
74
|
+
date: hrQueries.fromQuery(hrQueries.HrQuery.Settings, '0.calendarDay'),
|
|
75
|
+
urlKey: 'day',
|
|
76
|
+
...hrQueries.localeOfData
|
|
77
|
+
})
|
|
78
|
+
],
|
|
79
|
+
away: [
|
|
80
|
+
scene_blueprint_default.component('HrTeamCalendar-away', 'dataList', {
|
|
81
|
+
label: 'Away in this period',
|
|
82
|
+
rows: hrQueries.fromQuery(hrQueries.HrQuery.TeamCalendarEvents),
|
|
83
|
+
columns: hrQueries.fromQuery(hrQueries.HrQuery.TeamCalendarColumns),
|
|
84
|
+
titleField: 'person',
|
|
85
|
+
pageSize: 6,
|
|
86
|
+
...hrQueries.localeOfData
|
|
87
|
+
})
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
displayName: 'HR team calendar',
|
|
91
|
+
description: 'Who is away and when, on a month, a week or as an agenda, with the kind of leave told in words.',
|
|
92
|
+
metadata: hrParts.hrMetadata('HrTeamCalendar', 'Calendar', [
|
|
93
|
+
scene_model.TemplateScope.Module,
|
|
94
|
+
scene_model.TemplateScope.Feature
|
|
95
|
+
])
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
exports.hrTeamCalendarTemplate = hrTeamCalendarTemplate;
|
|
99
|
+
//# sourceMappingURL=teamCalendarTemplate.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"teamCalendarTemplate.js","sources":["../../../templates/teamCalendarTemplate.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, WidthSizeClass } from '@cratis/scene.model';\nimport { column, grid, slotLeaf } from '@cratis/scene.blueprint.default';\nimport { HrQuery, fromQuery, localeOfData } from '../hrQueries';\nimport { actionButton, component, hrMetadata, opensDialog, withBehaviors } from '../hrParts';\n\n/**\n * The team calendar: who is away and when, on a month, a week or as an agenda (the foundation's `calendarGrid`). A request spans the days it asks for, the kind of\n * leave is told in words as well as by color, and the day and view are kept in the address, so a link shares the calendar as it is. A filter narrows it to a person\n * or a kind of leave, and the list beside it names everyone away in the period.\n */\nexport const hrTeamCalendarTemplate: ScreenTemplate = {\n name: 'HrTeamCalendar',\n fitsSlot: 'content',\n slots: [{ name: 'header' }, { name: 'filters' }, { name: 'calendar' }, { name: 'away' }],\n arrangement: {\n root: column([slotLeaf('header'), slotLeaf('filters'), grid([slotLeaf('calendar', { span: 2 }), slotLeaf('away')], 3, 16)], 16),\n overrides: [{ width: WidthSizeClass.Compact, root: column([slotLeaf('header'), slotLeaf('filters'), slotLeaf('calendar'), slotLeaf('away')], 16) }],\n },\n content: {\n header: [component('HrTeamCalendar-header', 'pageHeader', { title: 'Team calendar', subtitle: 'Who is away and when' }, {\n actions: [withBehaviors(actionButton('HrTeamCalendar-request', 'Request time off', 'primary'), opensDialog('HrRequestTimeOff'))],\n })],\n filters: [component('HrTeamCalendar-filter', 'filterBuilder', { fields: fromQuery(HrQuery.TeamCalendarFilterFields) })],\n calendar: [component('HrTeamCalendar-grid', 'calendarGrid', { label: 'Team calendar', events: fromQuery(HrQuery.TeamCalendarEvents), date: fromQuery(HrQuery.Settings, '0.calendarDay'), urlKey: 'day', ...localeOfData })],\n away: [component('HrTeamCalendar-away', 'dataList', { label: 'Away in this period', rows: fromQuery(HrQuery.TeamCalendarEvents), columns: fromQuery(HrQuery.TeamCalendarColumns), titleField: 'person', pageSize: 6, ...localeOfData })],\n },\n displayName: 'HR team calendar',\n description: 'Who is away and when, on a month, a week or as an agenda, with the kind of leave told in words.',\n metadata: hrMetadata('HrTeamCalendar', 'Calendar', [TemplateScope.Module, TemplateScope.Feature]),\n};\n"],"names":["hrTeamCalendarTemplate","name","fitsSlot","slots","arrangement","root","column","slotLeaf","grid","span","overrides","width","WidthSizeClass","Compact","content","header","component","title","subtitle","actions","withBehaviors","actionButton","opensDialog","filters","fields","fromQuery","HrQuery","TeamCalendarFilterFields","calendar","label","events","TeamCalendarEvents","date","Settings","urlKey","localeOfData","away","rows","columns","TeamCalendarColumns","titleField","pageSize","displayName","description","metadata","hrMetadata","TemplateScope","Module","Feature"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;;UAKaA,sBAAAA,GAAyC;IAClDC,IAAAA,EAAM,gBAAA;IACNC,QAAAA,EAAU,SAAA;IACVC,KAAAA,EAAO;AAAC,QAAA;YAAEF,IAAAA,EAAM;AAAS,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAU,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAW,SAAA;AAAG,QAAA;YAAEA,IAAAA,EAAM;AAAO;AAAE,KAAA;IACxFG,WAAAA,EAAa;AACTC,QAAAA,IAAAA,EAAMC,8BAAAA,CAAO;YAACC,gCAAAA,CAAS,QAAA,CAAA;YAAWA,gCAAAA,CAAS,SAAA,CAAA;YAAYC,4BAAAA,CAAK;AAACD,gBAAAA,gCAAAA,CAAS,UAAA,EAAY;oBAAEE,IAAAA,EAAM;AAAE,iBAAA,CAAA;gBAAIF,gCAAAA,CAAS,MAAA;AAAQ,aAAA,EAAE,CAAA,EAAG,EAAA;SAAI,EAAE,EAAA,CAAA;QAC5HG,SAAAA,EAAW;AAAC,YAAA;A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A,EAASb,mBAAAA,CAAUC,kBAAQa,mBAAmB,CAAA;gBAAGC,UAAAA,EAAY,QAAA;gBAAUC,QAAAA,EAAU,CAAA;AAAG,gBAAA,GAAGN;AAAa,aAAA;AAAG;AAC5O,KAAA;IACAO,WAAAA,EAAa,kBAAA;IACbC,WAAAA,EAAa,iGAAA;IACbC,QAAAA,EAAUC,kBAAAA,CAAW,kBAAkB,UAAA,EAAY;AAACC,QAAAA,yBAAAA,CAAcC,MAAM;AAAED,QAAAA,yBAAAA,CAAcE;AAAQ,KAAA;AACpG;;"}
|
package/dist/esm/hrParts.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import { component, panel } from '@cratis/scene.blueprint.default';
|
|
|
3
3
|
export { component, panel };
|
|
4
4
|
export declare const hrCategory = "Business / HR";
|
|
5
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;
|
|
6
|
+
export declare const hrMetadata: (name: string, type: 'Dashboard' | 'List' | 'Board' | 'Detail' | 'Form' | 'Dialog' | 'Workspace' | 'Calendar', scopes: TemplateScope[]) => TemplateMetadata;
|
|
7
7
|
export declare const actionButton: (id: string, label: string, emphasis: 'primary' | 'secondary' | 'quiet' | 'danger', extra?: Record<string, unknown>, behaviors?: Behavior[]) => ExternalComponent;
|
|
8
8
|
export declare const opensDialog: (dialogTemplate: string) => Behavior[];
|
|
9
9
|
export declare const goesTo: (screen: string) => Behavior[];
|
|
@@ -1 +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,S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,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"}
|
package/dist/esm/hrParts.js.map
CHANGED
|
@@ -1 +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,
|
|
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' | 'Calendar', 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,WA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M,MAAME,mBAAAA,GAAsB,CAACC,QAAgBH,MAAAA,GAA+B;AAAC,QAAA;YAChFT,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBU;AAAO,qBAAA;oBAC/CR,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBI,QAAQ;AAAED,4BAAAA,MAAAA;4BAAQK,SAAAA,EAAW;AAAC,gCAAA;oCAAE9B,IAAAA,EAAM,IAAA;oCAAM+B,KAAAA,EAAO;AAAEb,wCAAAA,IAAAA,EAAMc,kBAAkBC,iBAAiB;wCAAEC,WAAAA,EAAaN,MAAAA;wCAAQO,IAAAA,EAAM;AAAQ;AAAE;AAAE;AAAC;AAAoB;AACxM;AAAE;AACN;;AAEA,iFACO,MAAMC,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;;"}
|
package/dist/esm/hrQueries.d.ts
CHANGED
|
@@ -4,6 +4,9 @@ export declare const HrQuery: {
|
|
|
4
4
|
readonly Settings: 'HrSettings';
|
|
5
5
|
readonly RecordTabs: 'HrRecordTabs';
|
|
6
6
|
readonly OrgNodes: 'OrgNodes';
|
|
7
|
+
readonly TeamCalendarEvents: 'TeamCalendarEvents';
|
|
8
|
+
readonly TeamCalendarFilterFields: 'TeamCalendarFilterFields';
|
|
9
|
+
readonly TeamCalendarColumns: 'TeamCalendarColumns';
|
|
7
10
|
readonly FormErrors: 'HrFormErrors';
|
|
8
11
|
};
|
|
9
12
|
export declare enum HrEntityKind {
|
|
@@ -1 +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"}
|
|
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,kBAAkB,EAAE,oBAAoB;aACxC,wBAAwB,EAAE,0BAA0B;aACpD,mBAAmB,EAAE,qBAAqB;aAC1C,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"}
|
package/dist/esm/hrQueries.js
CHANGED
|
@@ -14,6 +14,9 @@ import { BindingSourceKind } from '@cratis/scene.model';
|
|
|
14
14
|
/** One row: the `locale` the figures and dates are formatted in. */ Settings: 'HrSettings',
|
|
15
15
|
RecordTabs: 'HrRecordTabs',
|
|
16
16
|
OrgNodes: 'OrgNodes',
|
|
17
|
+
TeamCalendarEvents: 'TeamCalendarEvents',
|
|
18
|
+
TeamCalendarFilterFields: 'TeamCalendarFilterFields',
|
|
19
|
+
TeamCalendarColumns: 'TeamCalendarColumns',
|
|
17
20
|
FormErrors: 'HrFormErrors'
|
|
18
21
|
};
|
|
19
22
|
/** The HR entities a template is made for. */ var HrEntityKind = /*#__PURE__*/ function(HrEntityKind) {
|
|
@@ -1 +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;AACA;AAIA;;;UAIaA,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,kBAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,qHACO,MAAMI,OAAAA,GAAU;AACnB,yEACAC,QAAAA,EAAU,YAAA;IACVC,UAAAA,EAAY,cAAA;IACZC,QAAAA,EAAU,UAAA;IACVC,UAAAA,EAAY;AAChB;AAEA,+CACO,IAAKC,YAAAA,iBAAAA,SAAAA,YAAAA,EAAAA;;;;;AAAAA,IAAAA,OAAAA,YAAAA;AAKX,CAAA,CAAA,EAAA;AAED,sFACO,MAAMC,cAAAA,GAA+C;AACxD,IAAA,CAAA,UAAA,GAAyB,WAAA;AACzB,IAAA,CAAA,SAAA,GAAwB,iBAAA;AACxB,IAAA,CAAA,SAAA,GAAwB,UAAA;AACxB,IAAA,CAAA,YAAA,GAA2B;AAC/B;AAEA;;;AAGC,IACM,MAAMC,WAAAA,GAAc,CAACC,UAA0B;QAClDC,IAAAA,EAAMH,cAAc,CAACE,MAAAA,CAAO;QAC5BE,OAAAA,EAAS,CAAA,EAAGF,MAAAA,CAAO,OAAO,CAAC;QAC3BG,YAAAA,EAAc,CAAA,EAAGH,MAAAA,CAAO,YAAY,CAAC;QACrCI,KAAAA,EAAO,CAAA,EAAGJ,MAAAA,CAAO,KAAK,CAAC;QACvBK,aAAAA,EAAe,CAAA,EAAGL,MAAAA,CAAO,aAAa,CAAC;QACvCM,SAAAA,EAAW,CAAA,EAAGN,MAAAA,CAAO,SAAS,CAAC;QAC/BO,QAAAA,EAAU,CAAA,EAAGP,MAAAA,CAAO,QAAQ,CAAC;QAC7BQ,aAAAA,EAAe,CAAA,EAAGR,MAAAA,CAAO,aAAa,CAAC;QACvCS,MAAAA,EAAQ,CAAA,EAAGT,MAAAA,CAAO,MAAM,CAAC;QACzBU,OAAAA,EAAS,CAAA,EAAGV,MAAAA,CAAO,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,
|
|
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 TeamCalendarEvents: 'TeamCalendarEvents',\n TeamCalendarFilterFields: 'TeamCalendarFilterFields',\n TeamCalendarColumns: 'TeamCalendarColumns',\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","TeamCalendarEvents","TeamCalendarFilterFields","TeamCalendarColumns","FormErrors","HrEntityKind","hrEntityPlural","hrQueriesOf","entity","rows","columns","filterFields","views","columnChoices","selection","sections","quickSections","record","summary","documents","activity","tasks","localeOfData","locale","currencyOfData","currency"],"mappings":";;AAAA;AACA;AAIA;;;UAIaA,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,kBAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,qHACO,MAAMI,OAAAA,GAAU;AACnB,yEACAC,QAAAA,EAAU,YAAA;IACVC,UAAAA,EAAY,cAAA;IACZC,QAAAA,EAAU,UAAA;IACVC,kBAAAA,EAAoB,oBAAA;IACpBC,wBAAAA,EAA0B,0BAAA;IAC1BC,m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,SAAAA,CAAUM,OAAAA,CAAQC,QAAQ,EAAE,UAAA;AAAY;MACjE0B,cAAAA,GAAiB;AAAE,IAAA,GAAGF,YAAY;IAAEG,QAAAA,EAAUlC,SAAAA,CAAUM,OAAAA,CAAQC,QAAQ,EAAE,YAAA;AAAc;;"}
|
|
@@ -1 +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,
|
|
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,EASnD,CAAC"}
|
package/dist/esm/hrScreenSet.js
CHANGED
|
@@ -39,6 +39,13 @@
|
|
|
39
39
|
parent: 'hr.timeoff',
|
|
40
40
|
description: 'What each employee has taken and has left.'
|
|
41
41
|
},
|
|
42
|
+
{
|
|
43
|
+
name: 'hr.timeoff.calendar',
|
|
44
|
+
title: 'Team calendar',
|
|
45
|
+
template: 'HrTeamCalendar',
|
|
46
|
+
parent: 'hr.timeoff',
|
|
47
|
+
description: 'Who is away and when, on a month, a week or as an agenda.'
|
|
48
|
+
},
|
|
42
49
|
{
|
|
43
50
|
name: 'hr.onboarding',
|
|
44
51
|
title: 'Onboarding',
|
|
@@ -1 +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;;;"}
|
|
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.timeoff.calendar', title: 'Team calendar', template: 'HrTeamCalendar', parent: 'hr.timeoff', description: 'Who is away and when, on a month, a week or as an agenda.' },\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,qBAAA;QAAuBC,KAAAA,EAAO,eAAA;QAAiBC,QAAAA,EAAU,gBAAA;QAAkBG,MAAAA,EAAQ,YAAA;QAAcD,WAAAA,EAAa;AAA4D,KAAA;AAClL,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;;;"}
|
package/dist/esm/index.js
CHANGED
|
@@ -14,4 +14,5 @@ export { hrQuickCreateDialogs as hrDialogTemplates, hrQuickCreateDialogs } from
|
|
|
14
14
|
export { hrEmployeeDirectoryTemplate, hrOnboardingListTemplate, hrTimeOffBalanceListTemplate, hrTimeOffListTemplate } from './templates/listTemplates.js';
|
|
15
15
|
export { hrEmployeePageTemplate, hrOnboardingChecklistTemplate } from './templates/recordTemplates.js';
|
|
16
16
|
export { hrOrgChartTemplate } from './templates/orgChartTemplate.js';
|
|
17
|
+
export { hrTeamCalendarTemplate } from './templates/teamCalendarTemplate.js';
|
|
17
18
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;"}
|