@cratis/scene.blueprint.hr 0.0.0-stage → 4.53.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +66 -2
- package/blueprint.ts +16 -0
- package/blueprintCatalog.json +164 -0
- package/dist/cjs/blueprint.js +19 -0
- package/dist/cjs/blueprint.js.map +1 -0
- package/dist/cjs/hrApplication.js +49 -0
- package/dist/cjs/hrApplication.js.map +1 -0
- package/dist/cjs/hrParts.js +131 -0
- package/dist/cjs/hrParts.js.map +1 -0
- package/dist/cjs/hrQueries.js +67 -0
- package/dist/cjs/hrQueries.js.map +1 -0
- package/dist/cjs/hrScreenSet.js +61 -0
- package/dist/cjs/hrScreenSet.js.map +1 -0
- package/dist/cjs/index.js +69 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/manifest.js +65 -0
- package/dist/cjs/manifest.js.map +1 -0
- package/dist/cjs/navigation.js +135 -0
- package/dist/cjs/navigation.js.map +1 -0
- package/dist/cjs/package.json +3 -0
- package/dist/cjs/packageName.js +8 -0
- package/dist/cjs/packageName.js.map +1 -0
- package/dist/cjs/screens/index.js +22 -0
- package/dist/cjs/screens/index.js.map +1 -0
- package/dist/cjs/templateProvenance.js +24 -0
- package/dist/cjs/templateProvenance.js.map +1 -0
- package/dist/cjs/templates/formTemplates.js +51 -0
- package/dist/cjs/templates/formTemplates.js.map +1 -0
- package/dist/cjs/templates/index.js +30 -0
- package/dist/cjs/templates/index.js.map +1 -0
- package/dist/cjs/templates/listTemplates.js +210 -0
- package/dist/cjs/templates/listTemplates.js.map +1 -0
- package/dist/cjs/templates/orgChartTemplate.js +63 -0
- package/dist/cjs/templates/orgChartTemplate.js.map +1 -0
- package/dist/cjs/templates/recordTemplates.js +181 -0
- package/dist/cjs/templates/recordTemplates.js.map +1 -0
- package/dist/esm/blueprint.d.ts +3 -0
- package/dist/esm/blueprint.d.ts.map +1 -0
- package/dist/esm/blueprint.js +17 -0
- package/dist/esm/blueprint.js.map +1 -0
- package/dist/esm/hrApplication.d.ts +10 -0
- package/dist/esm/hrApplication.d.ts.map +1 -0
- package/dist/esm/hrApplication.js +44 -0
- package/dist/esm/hrApplication.js.map +1 -0
- package/dist/esm/hrParts.d.ts +15 -0
- package/dist/esm/hrParts.d.ts.map +1 -0
- package/dist/esm/hrParts.js +114 -0
- package/dist/esm/hrParts.js.map +1 -0
- package/dist/esm/hrQueries.d.ts +38 -0
- package/dist/esm/hrQueries.d.ts.map +1 -0
- package/dist/esm/hrQueries.js +59 -0
- package/dist/esm/hrQueries.js.map +1 -0
- package/dist/esm/hrScreenSet.d.ts +7 -0
- package/dist/esm/hrScreenSet.d.ts.map +1 -0
- package/dist/esm/hrScreenSet.js +59 -0
- package/dist/esm/hrScreenSet.js.map +1 -0
- package/dist/esm/index.d.ts +12 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +17 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/manifest.d.ts +3 -0
- package/dist/esm/manifest.d.ts.map +1 -0
- package/dist/esm/manifest.js +63 -0
- package/dist/esm/manifest.js.map +1 -0
- package/dist/esm/navigation.d.ts +5 -0
- package/dist/esm/navigation.d.ts.map +1 -0
- package/dist/esm/navigation.js +131 -0
- package/dist/esm/navigation.js.map +1 -0
- package/dist/esm/package.json +3 -0
- package/dist/esm/packageName.d.ts +2 -0
- package/dist/esm/packageName.d.ts.map +1 -0
- package/dist/esm/packageName.js +6 -0
- package/dist/esm/packageName.js.map +1 -0
- package/dist/esm/screens/index.d.ts +3 -0
- package/dist/esm/screens/index.d.ts.map +1 -0
- package/dist/esm/screens/index.js +20 -0
- package/dist/esm/screens/index.js.map +1 -0
- package/dist/esm/templateProvenance.d.ts +3 -0
- package/dist/esm/templateProvenance.d.ts.map +1 -0
- package/dist/esm/templateProvenance.js +22 -0
- package/dist/esm/templateProvenance.js.map +1 -0
- package/dist/esm/templates/formTemplates.d.ts +3 -0
- package/dist/esm/templates/formTemplates.d.ts.map +1 -0
- package/dist/esm/templates/formTemplates.js +49 -0
- package/dist/esm/templates/formTemplates.js.map +1 -0
- package/dist/esm/templates/index.d.ts +7 -0
- package/dist/esm/templates/index.d.ts.map +1 -0
- package/dist/esm/templates/index.js +19 -0
- package/dist/esm/templates/index.js.map +1 -0
- package/dist/esm/templates/listTemplates.d.ts +6 -0
- package/dist/esm/templates/listTemplates.d.ts.map +1 -0
- package/dist/esm/templates/listTemplates.js +205 -0
- package/dist/esm/templates/listTemplates.js.map +1 -0
- package/dist/esm/templates/orgChartTemplate.d.ts +3 -0
- package/dist/esm/templates/orgChartTemplate.d.ts.map +1 -0
- package/dist/esm/templates/orgChartTemplate.js +61 -0
- package/dist/esm/templates/orgChartTemplate.js.map +1 -0
- package/dist/esm/templates/recordTemplates.d.ts +4 -0
- package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
- package/dist/esm/templates/recordTemplates.js +178 -0
- package/dist/esm/templates/recordTemplates.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/hrApplication.ts +28 -0
- package/hrParts.ts +52 -0
- package/hrQueries.ts +59 -0
- package/hrScreenSet.ts +24 -0
- package/index.ts +14 -0
- package/manifest.ts +41 -0
- package/navigation.ts +59 -0
- package/package.json +78 -4
- package/packageName.ts +5 -0
- package/sampleData/hr-nordic.json +1659 -0
- package/screens/index.ts +20 -0
- package/templateProvenance.ts +15 -0
- package/templates/formTemplates.ts +34 -0
- package/templates/index.ts +21 -0
- package/templates/listTemplates.ts +109 -0
- package/templates/orgChartTemplate.ts +27 -0
- package/templates/recordTemplates.ts +75 -0
- package/thumbnails/HrEmployeeDirectory.svg +29 -0
- package/thumbnails/HrEmployeePage.svg +18 -0
- package/thumbnails/HrOnboardingChecklist.svg +18 -0
- package/thumbnails/HrOnboardingList.svg +13 -0
- package/thumbnails/HrOrgChart.svg +20 -0
- package/thumbnails/HrQuickCreateEmployee.svg +12 -0
- package/thumbnails/HrRequestTimeOff.svg +12 -0
- package/thumbnails/HrTimeOffBalanceList.svg +13 -0
- package/thumbnails/HrTimeOffList.svg +13 -0
- package/thumbnails/hr.svg +14 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageName = require('./packageName.js');
|
|
4
|
+
var templateProvenance = require('./templateProvenance.js');
|
|
5
|
+
var hrQueries = require('./hrQueries.js');
|
|
6
|
+
var hrParts = require('./hrParts.js');
|
|
7
|
+
var hrScreenSet = require('./hrScreenSet.js');
|
|
8
|
+
var index = require('./templates/index.js');
|
|
9
|
+
var index$1 = require('./screens/index.js');
|
|
10
|
+
var navigation = require('./navigation.js');
|
|
11
|
+
var manifest = require('./manifest.js');
|
|
12
|
+
var blueprint = require('./blueprint.js');
|
|
13
|
+
var hrApplication = require('./hrApplication.js');
|
|
14
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
15
|
+
var formTemplates = require('./templates/formTemplates.js');
|
|
16
|
+
var listTemplates = require('./templates/listTemplates.js');
|
|
17
|
+
var recordTemplates = require('./templates/recordTemplates.js');
|
|
18
|
+
var orgChartTemplate = require('./templates/orgChartTemplate.js');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.hrBlueprintName = packageName.hrBlueprintName;
|
|
23
|
+
exports.hrTemplateProvenance = templateProvenance.hrTemplateProvenance;
|
|
24
|
+
exports.HrEntityKind = hrQueries.HrEntityKind;
|
|
25
|
+
exports.HrQuery = hrQueries.HrQuery;
|
|
26
|
+
exports.currencyOfData = hrQueries.currencyOfData;
|
|
27
|
+
exports.fromQuery = hrQueries.fromQuery;
|
|
28
|
+
exports.hrEntityPlural = hrQueries.hrEntityPlural;
|
|
29
|
+
exports.hrQueriesOf = hrQueries.hrQueriesOf;
|
|
30
|
+
exports.localeOfData = hrQueries.localeOfData;
|
|
31
|
+
exports.actionButton = hrParts.actionButton;
|
|
32
|
+
exports.closesDialog = hrParts.closesDialog;
|
|
33
|
+
exports.goesTo = hrParts.goesTo;
|
|
34
|
+
exports.hrCategory = hrParts.hrCategory;
|
|
35
|
+
exports.hrMetadata = hrParts.hrMetadata;
|
|
36
|
+
exports.opensDialog = hrParts.opensDialog;
|
|
37
|
+
exports.opensRecordOnSelect = hrParts.opensRecordOnSelect;
|
|
38
|
+
exports.thumbnailOf = hrParts.thumbnailOf;
|
|
39
|
+
exports.withBehaviors = hrParts.withBehaviors;
|
|
40
|
+
exports.hrScreenDefinitions = hrScreenSet.hrScreenDefinitions;
|
|
41
|
+
exports.hrScreenTemplates = index.hrScreenTemplates;
|
|
42
|
+
exports.hrScreens = index$1.hrScreens;
|
|
43
|
+
exports.hrModule = navigation.hrModule;
|
|
44
|
+
exports.hrNavigation = navigation.hrNavigation;
|
|
45
|
+
exports.hrStructure = navigation.hrStructure;
|
|
46
|
+
exports.hrBlueprintManifest = manifest.hrBlueprintManifest;
|
|
47
|
+
exports.hrBlueprint = blueprint.hrBlueprint;
|
|
48
|
+
exports.hrApplication = hrApplication.hrApplication;
|
|
49
|
+
exports.hrComposition = hrApplication.hrComposition;
|
|
50
|
+
exports.hrDefaultSampleDataId = hrApplication.hrDefaultSampleDataId;
|
|
51
|
+
exports.hrNavigationModel = hrApplication.hrNavigationModel;
|
|
52
|
+
Object.defineProperty(exports, "component", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
get: function () { return scene_blueprint_default.component; }
|
|
55
|
+
});
|
|
56
|
+
Object.defineProperty(exports, "panel", {
|
|
57
|
+
enumerable: true,
|
|
58
|
+
get: function () { return scene_blueprint_default.panel; }
|
|
59
|
+
});
|
|
60
|
+
exports.hrDialogTemplates = formTemplates.hrQuickCreateDialogs;
|
|
61
|
+
exports.hrQuickCreateDialogs = formTemplates.hrQuickCreateDialogs;
|
|
62
|
+
exports.hrEmployeeDirectoryTemplate = listTemplates.hrEmployeeDirectoryTemplate;
|
|
63
|
+
exports.hrOnboardingListTemplate = listTemplates.hrOnboardingListTemplate;
|
|
64
|
+
exports.hrTimeOffBalanceListTemplate = listTemplates.hrTimeOffBalanceListTemplate;
|
|
65
|
+
exports.hrTimeOffListTemplate = listTemplates.hrTimeOffListTemplate;
|
|
66
|
+
exports.hrEmployeePageTemplate = recordTemplates.hrEmployeePageTemplate;
|
|
67
|
+
exports.hrOnboardingChecklistTemplate = recordTemplates.hrOnboardingChecklistTemplate;
|
|
68
|
+
exports.hrOrgChartTemplate = orgChartTemplate.hrOrgChartTemplate;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var packageName = require('./packageName.js');
|
|
5
|
+
var hrScreenSet = require('./hrScreenSet.js');
|
|
6
|
+
var index = require('./templates/index.js');
|
|
7
|
+
var formTemplates = require('./templates/formTemplates.js');
|
|
8
|
+
|
|
9
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
10
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
11
|
+
const description = 'People, the org chart, time off and onboarding for an HR team: a directory of cards, employee pages, an org tree, time-off requests and balances, and onboarding checklists.';
|
|
12
|
+
/**
|
|
13
|
+
* This blueprint's declaration. A domain blueprint depends on the foundation set (`Cratis.Blueprint.Default`) and reuses its layouts, slots,
|
|
14
|
+
* components and themes - it ships none of its own - and adds what is specific to the domain: templates, a ready-to-use screen set, sample data
|
|
15
|
+
* and thumbnails. The package `version` is the blueprint's version: it is what a template reference pins and what "update available" compares.
|
|
16
|
+
*/ const hrBlueprintManifest = {
|
|
17
|
+
name: packageName.hrBlueprintName,
|
|
18
|
+
version: '1.0.0',
|
|
19
|
+
kind: scene_model.PackageKind.Blueprint,
|
|
20
|
+
dependencies: [
|
|
21
|
+
{
|
|
22
|
+
name: 'Cratis.Blueprint.Default',
|
|
23
|
+
versionRange: '^1.0.0'
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
components: [],
|
|
27
|
+
layouts: [],
|
|
28
|
+
screenTemplates: index.hrScreenTemplates.map((template)=>template.name),
|
|
29
|
+
dialogTemplates: formTemplates.hrQuickCreateDialogs.map((template)=>template.name),
|
|
30
|
+
themes: [],
|
|
31
|
+
displayName: 'HR People and Time Off',
|
|
32
|
+
description,
|
|
33
|
+
module: '@cratis/scene.blueprint.hr',
|
|
34
|
+
license: 'MIT',
|
|
35
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
|
|
36
|
+
sampleData: [
|
|
37
|
+
{
|
|
38
|
+
id: 'hr-nordic',
|
|
39
|
+
title: 'HR · Nordic',
|
|
40
|
+
locale: 'nb-NO',
|
|
41
|
+
path: 'sampleData/hr-nordic.json'
|
|
42
|
+
}
|
|
43
|
+
],
|
|
44
|
+
blueprint: {
|
|
45
|
+
domain: 'hr',
|
|
46
|
+
description,
|
|
47
|
+
thumbnail: 'thumbnails/hr.svg',
|
|
48
|
+
screenSet: hrScreenSet.hrScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order })=>({
|
|
49
|
+
name,
|
|
50
|
+
title,
|
|
51
|
+
description: screenDescription,
|
|
52
|
+
template,
|
|
53
|
+
...parent === undefined ? {} : {
|
|
54
|
+
parent
|
|
55
|
+
},
|
|
56
|
+
...order === undefined ? {} : {
|
|
57
|
+
order
|
|
58
|
+
}
|
|
59
|
+
})),
|
|
60
|
+
defaultSampleData: 'hr-nordic'
|
|
61
|
+
}
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.hrBlueprintManifest = hrBlueprintManifest;
|
|
65
|
+
//# sourceMappingURL=manifest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"manifest.js","sources":["../../manifest.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { PackageKind, ScenePackage } from '@cratis/scene.model';\nimport { hrBlueprintName } from './packageName';\nimport { hrScreenDefinitions } from './hrScreenSet';\nimport { hrDialogTemplates, hrScreenTemplates } from './templates';\n\nconst description = 'People, the org chart, time off and onboarding for an HR team: a directory of cards, employee pages, an org tree, time-off requests and balances, and onboarding checklists.';\n\n/**\n * This blueprint's declaration. A domain blueprint depends on the foundation set (`Cratis.Blueprint.Default`) and reuses its layouts, slots,\n * components and themes - it ships none of its own - and adds what is specific to the domain: templates, a ready-to-use screen set, sample data\n * and thumbnails. The package `version` is the blueprint's version: it is what a template reference pins and what \"update available\" compares.\n */\nexport const hrBlueprintManifest: ScenePackage = {\n name: hrBlueprintName,\n version: '1.0.0',\n kind: PackageKind.Blueprint,\n dependencies: [{ name: 'Cratis.Blueprint.Default', versionRange: '^1.0.0' }],\n components: [],\n layouts: [],\n screenTemplates: hrScreenTemplates.map(template => template.name),\n dialogTemplates: hrDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'HR People and Time Off',\n description,\n module: '@cratis/scene.blueprint.hr',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n sampleData: [{ id: 'hr-nordic', title: 'HR · Nordic', locale: 'nb-NO', path: 'sampleData/hr-nordic.json' }],\n blueprint: {\n domain: 'hr',\n description,\n thumbnail: 'thumbnails/hr.svg',\n screenSet: hrScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({\n name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),\n })),\n defaultSampleData: 'hr-nordic',\n },\n};\n"],"names":["description","hrBlueprintManifest","name","hrBlueprintName","version","kind","PackageKind","Blueprint","dependencies","versionRange","components","layouts","screenTemplates","hrScreenTemplates","map","template","dialogTemplates","hrDialogTemplates","themes","displayName","module","license","licenseUrl","sampleData","id","title","locale","path","blueprint","domain","thumbnail","screenSet","hrScreenDefinitions","screenDescription","parent","order","undefined","defaultSampleData"],"mappings":";;;;;;;;AAAA;AACA;AAOA,MAAMA,WAAAA,GAAc,8KAAA;AAEpB;;;;UAKaC,mBAAAA,GAAoC;IAC7CC,IAAAA,EAAMC,2BAAAA;IACNC,OAAAA,EAAS,OAAA;AACTC,IAAAA,IAAAA,EAAMC,wBAAYC,SAAS;IAC3BC,YAAAA,EAAc;AAAC,QAAA;YAAEN,IAAAA,EAAM,0BAAA;YAA4BO,YAAAA,EAAc;AAAS;AAAE,KAAA;AAC5EC,IAAAA,UAAAA,EAAY,EAAE;AACdC,IAAAA,OAAAA,EAAS,EAAE;AACXC,IAAAA,eAAAA,EAAiBC,wBAAkBC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AAChEc,IAAAA,eAAAA,EAAiBC,mCAAkBH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AAChEgB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,wBAAA;AACbnB,IAAAA,WAAAA;IACAoB,MAAAA,EAAQ,4BAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY,mDAAA;IACZC,UAAAA,EAAY;AAAC,QAAA;YAAEC,EAAAA,EAAI,WAAA;YAAaC,KAAAA,EAAO,aAAA;YAAeC,MAAAA,EAAQ,OAAA;YAASC,IAAAA,EAAM;AAA4B;AAAE,KAAA;IAC3GC,SAAAA,EAAW;QACPC,MAAAA,EAAQ,IAAA;AACR7B,QAAAA,WAAAA;QACA8B,SAAAA,EAAW,mBAAA;AACXC,QAAAA,SAAAA,EAAWC,gCAAoBlB,GAAG,CAAC,CAAC,EAAEZ,IAAI,EAAEuB,KAAK,EAAEzB,aAAaiC,iBAAiB,EAAElB,QAAQ,EAAEmB,MAAM,EAAEC,KAAK,EAAE,IAAM;AAC9GjC,gBAAAA,IAAAA;AAAMuB,gBAAAA,KAAAA;gBAAOzB,WAAAA,EAAaiC,iBAAAA;AAAmBlB,gBAAAA,QAAAA;gBAAU,GAAImB,MAAAA,KAAWE,SAAAA,GAAY,EAAC,GAAI;AAAEF,oBAAAA;iBAAQ;gBAAG,GAAIC,KAAAA,KAAUC,SAAAA,GAAY,EAAC,GAAI;AAAED,oBAAAA;;aACzI,CAAA,CAAA;QACAE,iBAAAA,EAAmB;AACvB;AACJ;;"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var hrScreenSet = require('./hrScreenSet.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 module the blueprint's screens live in, and so the first segment of every screen's qualified name. */ const hrModule = 'hr';
|
|
9
|
+
/**
|
|
10
|
+
* 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
|
|
11
|
+
* `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.
|
|
12
|
+
*/ const hrStructure = (()=>{
|
|
13
|
+
const root = {
|
|
14
|
+
id: hrModule,
|
|
15
|
+
name: 'HR',
|
|
16
|
+
features: []};
|
|
17
|
+
for (const screen of hrScreenSet.hrScreenDefinitions){
|
|
18
|
+
let parent = root;
|
|
19
|
+
for (const id of screen.name.split('.').slice(1)){
|
|
20
|
+
let node = parent.features.find((candidate)=>candidate.id === id);
|
|
21
|
+
if (!node) {
|
|
22
|
+
node = {
|
|
23
|
+
id,
|
|
24
|
+
name: screen.title,
|
|
25
|
+
features: [],
|
|
26
|
+
slices: []
|
|
27
|
+
};
|
|
28
|
+
parent.features.push(node);
|
|
29
|
+
}
|
|
30
|
+
parent = node;
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
modules: [
|
|
35
|
+
{
|
|
36
|
+
id: root.id,
|
|
37
|
+
name: root.name,
|
|
38
|
+
features: root.features
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
};
|
|
42
|
+
})();
|
|
43
|
+
/**
|
|
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.
|
|
46
|
+
*/ const hrNavigation = {
|
|
47
|
+
application: {
|
|
48
|
+
logo: {
|
|
49
|
+
image: '',
|
|
50
|
+
title: 'HR'
|
|
51
|
+
},
|
|
52
|
+
regions: [
|
|
53
|
+
{
|
|
54
|
+
region: scene_model.NavigationRegionKind.Topbar,
|
|
55
|
+
items: [
|
|
56
|
+
{
|
|
57
|
+
id: 'hr',
|
|
58
|
+
title: 'HR',
|
|
59
|
+
target: {
|
|
60
|
+
module: hrModule
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
modules: [
|
|
68
|
+
{
|
|
69
|
+
module: hrModule,
|
|
70
|
+
regions: [
|
|
71
|
+
{
|
|
72
|
+
region: scene_model.NavigationRegionKind.Sidebar,
|
|
73
|
+
mode: scene_model.NavigationRegionMode.Override,
|
|
74
|
+
items: [
|
|
75
|
+
{
|
|
76
|
+
id: 'directory',
|
|
77
|
+
title: 'Directory',
|
|
78
|
+
target: {
|
|
79
|
+
module: hrModule,
|
|
80
|
+
feature: 'directory'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'org',
|
|
85
|
+
title: 'Org chart',
|
|
86
|
+
target: {
|
|
87
|
+
module: hrModule,
|
|
88
|
+
feature: 'org'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'timeoff',
|
|
93
|
+
title: 'Time off',
|
|
94
|
+
target: {
|
|
95
|
+
module: hrModule,
|
|
96
|
+
feature: 'timeoff'
|
|
97
|
+
},
|
|
98
|
+
children: [
|
|
99
|
+
{
|
|
100
|
+
id: 'requests',
|
|
101
|
+
title: 'Requests',
|
|
102
|
+
target: {
|
|
103
|
+
module: hrModule,
|
|
104
|
+
feature: 'timeoff'
|
|
105
|
+
}
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
id: 'balances',
|
|
109
|
+
title: 'Balances',
|
|
110
|
+
target: {
|
|
111
|
+
module: hrModule,
|
|
112
|
+
feature: 'timeoff.balances'
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
]
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: 'onboarding',
|
|
119
|
+
title: 'Onboarding',
|
|
120
|
+
target: {
|
|
121
|
+
module: hrModule,
|
|
122
|
+
feature: 'onboarding'
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
]
|
|
126
|
+
}
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
exports.hrModule = hrModule;
|
|
133
|
+
exports.hrNavigation = hrNavigation;
|
|
134
|
+
exports.hrStructure = hrStructure;
|
|
135
|
+
//# sourceMappingURL=navigation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"navigation.js","sources":["../../navigation.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ApplicationStructure, NavigationModel, NavigationRegionKind, NavigationRegionMode } from '@cratis/scene.model';\nimport { hrScreenDefinitions } from './hrScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const hrModule = 'hr';\n\n/**\n * The application structure the screen set implies: one module, `hr`, a feature for each screen and the sub-features beneath it (`hr.directory.record` is the\n * `record` feature of `directory`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const hrStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: hrModule, name: 'HR', features: [], slices: [] };\n for (const screen of hrScreenDefinitions) {\n let parent = root;\n for (const id of screen.name.split('.').slice(1)) {\n let node = parent.features.find(candidate => candidate.id === id);\n if (!node) {\n node = { id, name: screen.title, features: [], slices: [] };\n parent.features.push(node);\n }\n parent = node;\n }\n }\n\n return { modules: [{ id: root.id, name: root.name, features: root.features }] } as unknown as ApplicationStructure;\n})();\n\n/**\n * The navigation of the application the blueprint is: the topbar names the module, and the module's sidebar - which overrides the application's - lists\n * the four places an HR team goes: Directory, Org chart, Time off (with its requests and its balances beneath it) and Onboarding.\n */\nexport const hrNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'HR' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'hr', title: 'HR', target: { module: hrModule } }] }],\n },\n modules: [{\n module: hrModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'directory', title: 'Directory', target: { module: hrModule, feature: 'directory' } },\n { id: 'org', title: 'Org chart', target: { module: hrModule, feature: 'org' } },\n {\n id: 'timeoff', title: 'Time off', target: { module: hrModule, feature: 'timeoff' }, children: [\n { id: 'requests', title: 'Requests', target: { module: hrModule, feature: 'timeoff' } },\n { id: 'balances', title: 'Balances', target: { module: hrModule, feature: 'timeoff.balances' } },\n ],\n },\n { id: 'onboarding', title: 'Onboarding', target: { module: hrModule, feature: 'onboarding' } },\n ],\n }],\n }],\n};\n"],"names":["hrModule","hrStructure","root","id","name","features","screen","hrScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","hrNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature","children"],"mappings":";;;;;AAAA;AACA;AAKA,8GACO,MAAMA,QAAAA,GAAW;AAExB;;;AAGC,IACM,MAAMC,WAAAA,GAAqC,CAAA,IAAA;AAE9C,IAAA,MAAMC,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AA,EAAI,YAAA;4BAAcW,KAAAA,EAAO,YAAA;4BAAca,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,QAAAA;gCAAUiC,OAAAA,EAAS;AAAa;AAAE;AAChG;AACL;AAAE;AACN;AAAE;AACN;;;;"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/** The name this blueprint is known by inside a `ui profile`; every component registry key is built from it. */ const hrBlueprintName = 'Cratis.Blueprint.Hr';
|
|
6
|
+
|
|
7
|
+
exports.hrBlueprintName = hrBlueprintName;
|
|
8
|
+
//# sourceMappingURL=packageName.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"packageName.js","sources":["../../packageName.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\n/** The name this blueprint is known by inside a `ui profile`; every component registry key is built from it. */\nexport const hrBlueprintName = 'Cratis.Blueprint.Hr';\n"],"names":["hrBlueprintName"],"mappings":";;AAAA;AACA;AAEA,iHACO,MAAMA,eAAAA,GAAkB;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
4
|
+
var hrScreenSet = require('../hrScreenSet.js');
|
|
5
|
+
|
|
6
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
7
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
8
|
+
/**
|
|
9
|
+
* The ready-to-use screens: real `Screen` instances, one for each entry of the manifest's `blueprint.screenSet`, each filling the screen template it names in
|
|
10
|
+
* the foundation's application shell. A new application that adopts the blueprint gets these, wired into its navigation (`hrNavigation`).
|
|
11
|
+
*/ const hrScreens = hrScreenSet.hrScreenDefinitions.map((definition)=>({
|
|
12
|
+
name: definition.name,
|
|
13
|
+
layout: scene_blueprint_default.LayoutName.AppShell,
|
|
14
|
+
screenTemplate: definition.template,
|
|
15
|
+
slotContent: {},
|
|
16
|
+
forms: [],
|
|
17
|
+
contributions: [],
|
|
18
|
+
path: definition.name.split('.')
|
|
19
|
+
}));
|
|
20
|
+
|
|
21
|
+
exports.hrScreens = hrScreens;
|
|
22
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../../../screens/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 { Screen } from '@cratis/scene.model';\nimport { LayoutName } from '@cratis/scene.blueprint.default';\nimport { hrScreenDefinitions } from '../hrScreenSet';\n\n/**\n * The ready-to-use screens: real `Screen` instances, one for each entry of the manifest's `blueprint.screenSet`, each filling the screen template it names in\n * the foundation's application shell. A new application that adopts the blueprint gets these, wired into its navigation (`hrNavigation`).\n */\nexport const hrScreens: Screen[] = hrScreenDefinitions.map(definition => ({\n name: definition.name,\n layout: LayoutName.AppShell,\n screenTemplate: definition.template,\n slotContent: {},\n forms: [],\n contributions: [],\n path: definition.name.split('.'),\n}));\n"],"names":["hrScreens","hrScreenDefinitions","map","definition","name","layout","LayoutName","AppShell","screenTemplate","template","slotContent","forms","contributions","path","split"],"mappings":";;;;;AAAA;AACA;AAMA;;;UAIaA,SAAAA,GAAsBC,+BAAAA,CAAoBC,GAAG,CAACC,CAAAA,cAAe;AACtEC,QAAAA,IAAAA,EAAMD,WAAWC,IAAI;AACrBC,QAAAA,MAAAA,EAAQC,mCAAWC,QAAQ;AAC3BC,QAAAA,cAAAA,EAAgBL,WAAWM,QAAQ;AACnCC,QAAAA,WAAAA,EAAa,EAAC;AACdC,QAAAA,KAAAA,EAAO,EAAE;AACTC,QAAAA,aAAAA,EAAe,EAAE;AACjBC,QAAAA,IAAAA,EAAMV,UAAAA,CAAWC,IAAI,CAACU,KAAK,CAAC,GAAA;AAChC,KAAA,CAAA;;"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
4
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
5
|
+
/** The compatibility, attribution and license metadata every template this blueprint ships carries. */ const hrTemplateProvenance = {
|
|
6
|
+
compatibility: {
|
|
7
|
+
scene: '^4.13.0',
|
|
8
|
+
packages: [
|
|
9
|
+
{
|
|
10
|
+
name: 'Cratis.Blueprint.Default',
|
|
11
|
+
versionRange: '^1.0.0'
|
|
12
|
+
}
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
attribution: {
|
|
16
|
+
author: 'Cratis',
|
|
17
|
+
url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.hr'
|
|
18
|
+
},
|
|
19
|
+
license: 'MIT',
|
|
20
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.hrTemplateProvenance = hrTemplateProvenance;
|
|
24
|
+
//# sourceMappingURL=templateProvenance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templateProvenance.js","sources":["../../templateProvenance.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 { TemplateMetadata } from '@cratis/scene.model';\n\n/** The compatibility, attribution and license metadata every template this blueprint ships carries. */\nexport const hrTemplateProvenance: Pick<TemplateMetadata, 'compatibility' | 'attribution' | 'license' | 'licenseUrl'> = {\n compatibility: {\n scene: '^4.13.0',\n packages: [{ name: 'Cratis.Blueprint.Default', versionRange: '^1.0.0' }],\n },\n attribution: { author: 'Cratis', url: 'https://github.com/Cratis/Scene/tree/main/Source/JavaScript/blueprint.hr' },\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n"],"names":["hrTemplateProvenance","compatibility","scene","packages","name","versionRange","attribution","author","url","license","licenseUrl"],"mappings":";;AAAA;AACA;AAIA,wGACO,MAAMA,oBAAAA,GAA2G;IACpHC,aAAAA,EAAe;QACXC,KAAAA,EAAO,SAAA;QACPC,QAAAA,EAAU;AAAC,YAAA;gBAAEC,IAAAA,EAAM,0BAAA;gBAA4BC,YAAAA,EAAc;AAAS;AAAE;AAC5E,KAAA;IACAC,WAAAA,EAAa;QAAEC,MAAAA,EAAQ,QAAA;QAAUC,GAAAA,EAAK;AAA2E,KAAA;IACjHC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;;"}
|
|
@@ -0,0 +1,51 @@
|
|
|
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
|
+
* One quick-create dialog: the foundation `QuickCreateDialog` - a short form opened from a page to make one record without leaving it - with the fields
|
|
12
|
+
* that thing needs to get started.
|
|
13
|
+
*/ function quickCreateOf(name, title, subtitle, sections, noun, create) {
|
|
14
|
+
return {
|
|
15
|
+
name,
|
|
16
|
+
slots: scene_blueprint_default.quickCreateDialogTemplate.slots,
|
|
17
|
+
content: {
|
|
18
|
+
header: [
|
|
19
|
+
scene_blueprint_default.component(`${name}-frame`, 'dialogFrame', {
|
|
20
|
+
title,
|
|
21
|
+
subtitle
|
|
22
|
+
})
|
|
23
|
+
],
|
|
24
|
+
body: [
|
|
25
|
+
hrParts.withBehaviors(scene_blueprint_default.component(`${name}-form`, 'formScreenBody', {
|
|
26
|
+
mode: 'create',
|
|
27
|
+
saveAndNew: false,
|
|
28
|
+
strings: {
|
|
29
|
+
formSave: create
|
|
30
|
+
},
|
|
31
|
+
sections: hrQueries.fromQuery(sections),
|
|
32
|
+
errors: hrQueries.fromQuery(hrQueries.HrQuery.FormErrors, '0'),
|
|
33
|
+
...hrQueries.localeOfData
|
|
34
|
+
}), hrParts.closesDialog())
|
|
35
|
+
],
|
|
36
|
+
actions: []
|
|
37
|
+
},
|
|
38
|
+
displayName: `HR quick create ${noun}`,
|
|
39
|
+
description: noun === 'time-off request' ? 'A short form that asks for time off without leaving the page.' : `A short form that creates one ${noun} without leaving the page.`,
|
|
40
|
+
metadata: hrParts.hrMetadata(name, 'Dialog', [
|
|
41
|
+
scene_model.TemplateScope.Slice
|
|
42
|
+
])
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
/** Request time off (type, dates, a note), and the quick creation of an employee. */ const hrQuickCreateDialogs = [
|
|
46
|
+
quickCreateOf('HrRequestTimeOff', 'Request time off', 'Say when and what kind', 'TimeOffQuickSections', 'time-off request', 'Send request'),
|
|
47
|
+
quickCreateOf('HrQuickCreateEmployee', 'New employee', 'Only what is needed to get started', 'EmployeeQuickSections', 'employee', 'Create')
|
|
48
|
+
];
|
|
49
|
+
|
|
50
|
+
exports.hrQuickCreateDialogs = hrQuickCreateDialogs;
|
|
51
|
+
//# sourceMappingURL=formTemplates.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"formTemplates.js","sources":["../../../templates/formTemplates.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 { DialogTemplate, TemplateScope } from '@cratis/scene.model';\nimport { quickCreateDialogTemplate } from '@cratis/scene.blueprint.default';\nimport { HrQuery, fromQuery, localeOfData } from '../hrQueries';\nimport { closesDialog, component, hrMetadata, withBehaviors } from '../hrParts';\n\n/**\n * One quick-create dialog: the foundation `QuickCreateDialog` - a short form opened from a page to make one record without leaving it - with the fields\n * that thing needs to get started.\n */\nfunction quickCreateOf(name: string, title: string, subtitle: string, sections: string, noun: string, create: string): DialogTemplate {\n return {\n name,\n slots: quickCreateDialogTemplate.slots,\n content: {\n header: [component(`${name}-frame`, 'dialogFrame', { title, subtitle })],\n body: [withBehaviors(component(`${name}-form`, 'formScreenBody', {\n mode: 'create', saveAndNew: false, strings: { formSave: create }, sections: fromQuery(sections), errors: fromQuery(HrQuery.FormErrors, '0'), ...localeOfData,\n }), closesDialog())],\n actions: [],\n },\n displayName: `HR quick create ${noun}`,\n description: noun === 'time-off request' ? 'A short form that asks for time off without leaving the page.' : `A short form that creates one ${noun} without leaving the page.`,\n metadata: hrMetadata(name, 'Dialog', [TemplateScope.Slice]),\n };\n}\n\n/** Request time off (type, dates, a note), and the quick creation of an employee. */\nexport const hrQuickCreateDialogs: DialogTemplate[] = [\n quickCreateOf('HrRequestTimeOff', 'Request time off', 'Say when and what kind', 'TimeOffQuickSections', 'time-off request', 'Send request'),\n quickCreateOf('HrQuickCreateEmployee', 'New employee', 'Only what is needed to get started', 'EmployeeQuickSections', 'employee', 'Create'),\n];\n"],"names":["quickCreateOf","name","title","subtitle","sections","noun","create","slots","quickCreateDialogTemplate","content","header","component","body","withBehaviors","mode","saveAndNew","strings","formSave","fromQuery","errors","HrQuery","FormErrors","localeOfData","closesDialog","actions","displayName","description","metadata","hrMetadata","TemplateScope","Slice","hrQuickCreateDialogs"],"mappings":";;;;;;;AAAA;AACA;AAOA;;;AAGC,IACD,SAASA,aAAAA,CAAcC,IAAY,EAAEC,KAAa,EAAEC,QAAgB,EAAEC,QAAgB,EAAEC,IAAY,EAAEC,MAAc,EAAA;IAChH,OAAO;AACHL,QAAAA,IAAAA;AACAM,QAAAA,KAAAA,EAAOC,kDAA0BD,KAAK;QACtCE,OAAAA,EAAS;YACLC,MAAAA,EAAQ;AAACC,gBAAAA,iCAAAA,CAAU,CAAA,EAAGV,IAAAA,CAAK,MAAM,CA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./orgChartTemplate.js');
|
|
5
|
+
var recordTemplates = require('./recordTemplates.js');
|
|
6
|
+
var formTemplates = require('./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
|
+
/** Every screen template this blueprint provides, in the order the manifest lists them. */ const hrScreenTemplates = [
|
|
11
|
+
listTemplates.hrEmployeeDirectoryTemplate,
|
|
12
|
+
recordTemplates.hrEmployeePageTemplate,
|
|
13
|
+
orgChartTemplate.hrOrgChartTemplate,
|
|
14
|
+
listTemplates.hrTimeOffListTemplate,
|
|
15
|
+
listTemplates.hrTimeOffBalanceListTemplate,
|
|
16
|
+
listTemplates.hrOnboardingListTemplate,
|
|
17
|
+
recordTemplates.hrOnboardingChecklistTemplate
|
|
18
|
+
];
|
|
19
|
+
|
|
20
|
+
exports.hrEmployeeDirectoryTemplate = listTemplates.hrEmployeeDirectoryTemplate;
|
|
21
|
+
exports.hrOnboardingListTemplate = listTemplates.hrOnboardingListTemplate;
|
|
22
|
+
exports.hrTimeOffBalanceListTemplate = listTemplates.hrTimeOffBalanceListTemplate;
|
|
23
|
+
exports.hrTimeOffListTemplate = listTemplates.hrTimeOffListTemplate;
|
|
24
|
+
exports.hrOrgChartTemplate = orgChartTemplate.hrOrgChartTemplate;
|
|
25
|
+
exports.hrEmployeePageTemplate = recordTemplates.hrEmployeePageTemplate;
|
|
26
|
+
exports.hrOnboardingChecklistTemplate = recordTemplates.hrOnboardingChecklistTemplate;
|
|
27
|
+
exports.hrDialogTemplates = formTemplates.hrQuickCreateDialogs;
|
|
28
|
+
exports.hrQuickCreateDialogs = formTemplates.hrQuickCreateDialogs;
|
|
29
|
+
exports.hrScreenTemplates = hrScreenTemplates;
|
|
30
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +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":";;;;;;;AAAA;AACA;AAWA,4FACO,MAAMA,iBAAAA,GAAoB;AAC7BC,IAAAA,yCAAAA;AAA6BC,IAAAA,sCAAAA;AAC7BC,IAAAA,mCAAAA;AACAC,IAAAA,mCAAAA;AAAuBC,IAAAA,0CAAAA;AACvBC,IAAAA,sCAAAA;AAA0BC,IAAAA;;;;;;;;;;;;"}
|