@cratis/scene.blueprint.approvals 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/approvalsApplication.ts +28 -0
- package/approvalsParts.ts +50 -0
- package/approvalsQueries.ts +58 -0
- package/approvalsScreenSet.ts +24 -0
- package/blueprint.ts +16 -0
- package/blueprintCatalog.json +171 -0
- package/dist/cjs/approvalsApplication.js +49 -0
- package/dist/cjs/approvalsApplication.js.map +1 -0
- package/dist/cjs/approvalsParts.js +131 -0
- package/dist/cjs/approvalsParts.js.map +1 -0
- package/dist/cjs/approvalsQueries.js +68 -0
- package/dist/cjs/approvalsQueries.js.map +1 -0
- package/dist/cjs/approvalsScreenSet.js +61 -0
- package/dist/cjs/approvalsScreenSet.js.map +1 -0
- package/dist/cjs/blueprint.js +19 -0
- package/dist/cjs/blueprint.js.map +1 -0
- package/dist/cjs/index.js +67 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/manifest.js +71 -0
- package/dist/cjs/manifest.js.map +1 -0
- package/dist/cjs/navigation.js +117 -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 +23 -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 +111 -0
- package/dist/cjs/templates/formTemplates.js.map +1 -0
- package/dist/cjs/templates/index.js +31 -0
- package/dist/cjs/templates/index.js.map +1 -0
- package/dist/cjs/templates/listTemplates.js +221 -0
- package/dist/cjs/templates/listTemplates.js.map +1 -0
- package/dist/cjs/templates/recordTemplates.js +97 -0
- package/dist/cjs/templates/recordTemplates.js.map +1 -0
- package/dist/cjs/templates/wizardTemplate.js +77 -0
- package/dist/cjs/templates/wizardTemplate.js.map +1 -0
- package/dist/esm/approvalsApplication.d.ts +10 -0
- package/dist/esm/approvalsApplication.d.ts.map +1 -0
- package/dist/esm/approvalsApplication.js +44 -0
- package/dist/esm/approvalsApplication.js.map +1 -0
- package/dist/esm/approvalsParts.d.ts +13 -0
- package/dist/esm/approvalsParts.d.ts.map +1 -0
- package/dist/esm/approvalsParts.js +114 -0
- package/dist/esm/approvalsParts.js.map +1 -0
- package/dist/esm/approvalsQueries.d.ts +51 -0
- package/dist/esm/approvalsQueries.d.ts.map +1 -0
- package/dist/esm/approvalsQueries.js +63 -0
- package/dist/esm/approvalsQueries.js.map +1 -0
- package/dist/esm/approvalsScreenSet.d.ts +7 -0
- package/dist/esm/approvalsScreenSet.d.ts.map +1 -0
- package/dist/esm/approvalsScreenSet.js +59 -0
- package/dist/esm/approvalsScreenSet.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/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 +69 -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 +113 -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 +21 -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 +6 -0
- package/dist/esm/templates/formTemplates.d.ts.map +1 -0
- package/dist/esm/templates/formTemplates.js +106 -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 +20 -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 +216 -0
- package/dist/esm/templates/listTemplates.js.map +1 -0
- package/dist/esm/templates/recordTemplates.d.ts +3 -0
- package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
- package/dist/esm/templates/recordTemplates.js +95 -0
- package/dist/esm/templates/recordTemplates.js.map +1 -0
- package/dist/esm/templates/wizardTemplate.d.ts +3 -0
- package/dist/esm/templates/wizardTemplate.d.ts.map +1 -0
- package/dist/esm/templates/wizardTemplate.js +75 -0
- package/dist/esm/templates/wizardTemplate.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/index.ts +14 -0
- package/manifest.ts +44 -0
- package/navigation.ts +54 -0
- package/package.json +78 -4
- package/packageName.ts +5 -0
- package/sampleData/approvals-general.json +1269 -0
- package/sampleData/approvals-nordic.json +1269 -0
- package/screens/index.ts +21 -0
- package/templateProvenance.ts +15 -0
- package/templates/formTemplates.ts +61 -0
- package/templates/index.ts +19 -0
- package/templates/listTemplates.ts +116 -0
- package/templates/recordTemplates.ts +45 -0
- package/templates/wizardTemplate.ts +33 -0
- package/thumbnails/AllRequests.svg +13 -0
- package/thumbnails/ApprovalInbox.svg +23 -0
- package/thumbnails/DecisionDialog.svg +11 -0
- package/thumbnails/MyRequests.svg +13 -0
- package/thumbnails/NewRequestWizard.svg +14 -0
- package/thumbnails/RequestPage.svg +11 -0
- package/thumbnails/RequestTypeEditForm.svg +14 -0
- package/thumbnails/RequestTypeQuickCreate.svg +11 -0
- package/thumbnails/RequestTypes.svg +13 -0
- package/thumbnails/approvals.svg +9 -0
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
|
|
5
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
6
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
7
|
+
/**
|
|
8
|
+
* A property taken from a query result - never a value. A template declares *where* its data comes from and the sample-data pack, or the real
|
|
9
|
+
* 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).
|
|
10
|
+
*/ const fromQuery = (query, path = '')=>({
|
|
11
|
+
kind: scene_model.BindingSourceKind.QueryResult,
|
|
12
|
+
query,
|
|
13
|
+
path
|
|
14
|
+
});
|
|
15
|
+
/** The queries of the approvals application, each a shape the sample-data packs supply rows for. */ const ApprovalsQuery = {
|
|
16
|
+
/** One row: the `locale` and the `currency` the figures and dates are formatted in. */ Settings: 'ApprovalsSettings',
|
|
17
|
+
Inbox: 'InboxRequests',
|
|
18
|
+
InboxColumns: 'InboxColumns',
|
|
19
|
+
InboxFilterFields: 'InboxFilterFields',
|
|
20
|
+
InboxViews: 'InboxViews',
|
|
21
|
+
MyRequests: 'MyRequests',
|
|
22
|
+
MyRequestColumns: 'MyRequestColumns',
|
|
23
|
+
MyRequestFilterFields: 'MyRequestFilterFields',
|
|
24
|
+
MyRequestViews: 'MyRequestViews',
|
|
25
|
+
MyRequestColumnChoices: 'MyRequestColumnChoices',
|
|
26
|
+
MyRequestSelection: 'MyRequestSelection',
|
|
27
|
+
AllRequests: 'AllRequests',
|
|
28
|
+
AllRequestColumns: 'AllRequestColumns',
|
|
29
|
+
AllRequestFilterFields: 'AllRequestFilterFields',
|
|
30
|
+
AllRequestViews: 'AllRequestViews',
|
|
31
|
+
AllRequestColumnChoices: 'AllRequestColumnChoices',
|
|
32
|
+
AllRequestSelection: 'AllRequestSelection',
|
|
33
|
+
RequestTypes: 'RequestTypes',
|
|
34
|
+
RequestTypeColumns: 'RequestTypeColumns',
|
|
35
|
+
RequestTypeFilterFields: 'RequestTypeFilterFields',
|
|
36
|
+
RequestTypeViews: 'RequestTypeViews',
|
|
37
|
+
RequestTypeColumnChoices: 'RequestTypeColumnChoices',
|
|
38
|
+
RequestTypeSelection: 'RequestTypeSelection',
|
|
39
|
+
WizardSteps: 'RequestWizardSteps',
|
|
40
|
+
TypeSections: 'RequestTypeSections',
|
|
41
|
+
DetailSections: 'RequestDetailSections',
|
|
42
|
+
ReviewSections: 'RequestReviewSections',
|
|
43
|
+
ReviewValues: 'RequestReviewValues',
|
|
44
|
+
Request: 'RequestRecord',
|
|
45
|
+
RequestSummary: 'RequestSummary',
|
|
46
|
+
RequestSections: 'RequestSections',
|
|
47
|
+
Chain: 'RequestChain',
|
|
48
|
+
Attachments: 'RequestAttachments',
|
|
49
|
+
AttachmentColumns: 'AttachmentColumns',
|
|
50
|
+
Comments: 'RequestComments',
|
|
51
|
+
RequestTabs: 'RequestTabs',
|
|
52
|
+
DecisionSections: 'DecisionSections',
|
|
53
|
+
TypeEditorSections: 'RequestTypeEditorSections',
|
|
54
|
+
FormErrors: 'ApprovalsFormErrors'
|
|
55
|
+
};
|
|
56
|
+
/** The locale and currency of the data, bound onto every component that formats a figure or a date. */ const localeOfData = {
|
|
57
|
+
locale: fromQuery(ApprovalsQuery.Settings, '0.locale')
|
|
58
|
+
};
|
|
59
|
+
const currencyOfData = {
|
|
60
|
+
...localeOfData,
|
|
61
|
+
currency: fromQuery(ApprovalsQuery.Settings, '0.currency')
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
exports.ApprovalsQuery = ApprovalsQuery;
|
|
65
|
+
exports.currencyOfData = currencyOfData;
|
|
66
|
+
exports.fromQuery = fromQuery;
|
|
67
|
+
exports.localeOfData = localeOfData;
|
|
68
|
+
//# sourceMappingURL=approvalsQueries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approvalsQueries.js","sources":["../../approvalsQueries.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { BindingExpression, BindingSourceKind } from '@cratis/scene.model';\n\n/**\n * A property taken from a query result - never a value. A 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 approvals application, each a shape the sample-data packs supply rows for. */\nexport const ApprovalsQuery = {\n /** One row: the `locale` and the `currency` the figures and dates are formatted in. */\n Settings: 'ApprovalsSettings',\n Inbox: 'InboxRequests',\n InboxColumns: 'InboxColumns',\n InboxFilterFields: 'InboxFilterFields',\n InboxViews: 'InboxViews',\n MyRequests: 'MyRequests',\n MyRequestColumns: 'MyRequestColumns',\n MyRequestFilterFields: 'MyRequestFilterFields',\n MyRequestViews: 'MyRequestViews',\n MyRequestColumnChoices: 'MyRequestColumnChoices',\n MyRequestSelection: 'MyRequestSelection',\n AllRequests: 'AllRequests',\n AllRequestColumns: 'AllRequestColumns',\n AllRequestFilterFields: 'AllRequestFilterFields',\n AllRequestViews: 'AllRequestViews',\n AllRequestColumnChoices: 'AllRequestColumnChoices',\n AllRequestSelection: 'AllRequestSelection',\n RequestTypes: 'RequestTypes',\n RequestTypeColumns: 'RequestTypeColumns',\n RequestTypeFilterFields: 'RequestTypeFilterFields',\n RequestTypeViews: 'RequestTypeViews',\n RequestTypeColumnChoices: 'RequestTypeColumnChoices',\n RequestTypeSelection: 'RequestTypeSelection',\n WizardSteps: 'RequestWizardSteps',\n TypeSections: 'RequestTypeSections',\n DetailSections: 'RequestDetailSections',\n ReviewSections: 'RequestReviewSections',\n ReviewValues: 'RequestReviewValues',\n Request: 'RequestRecord',\n RequestSummary: 'RequestSummary',\n RequestSections: 'RequestSections',\n Chain: 'RequestChain',\n Attachments: 'RequestAttachments',\n AttachmentColumns: 'AttachmentColumns',\n Comments: 'RequestComments',\n RequestTabs: 'RequestTabs',\n DecisionSections: 'DecisionSections',\n TypeEditorSections: 'RequestTypeEditorSections',\n FormErrors: 'ApprovalsFormErrors',\n} as const;\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(ApprovalsQuery.Settings, '0.locale') };\nexport const currencyOfData = { ...localeOfData, currency: fromQuery(ApprovalsQuery.Settings, '0.currency') };\n"],"names":["fromQuery","query","path","kind","BindingSourceKind","QueryResult","ApprovalsQuery","Settings","Inbox","InboxColumns","InboxFilterFields","InboxViews","MyRequests","MyRequestColumns","MyRequestFilterFields","MyRequestViews","MyRequestColumnChoices","MyRequestSelection","AllRequests","AllRequestColumns","AllRequestFilterFields","AllRequestViews","AllRequestColumnChoices","AllRequestSelection","RequestTypes","RequestTypeColumns","RequestTypeFilterFields","RequestTypeViews","RequestTypeColumnChoices","RequestTypeSelection","WizardSteps","TypeSections","DetailSections","ReviewSections","ReviewValues","Request","RequestSummary","RequestSections","Chain","Attachments","AttachmentColumns","Comments","RequestTabs","DecisionSections","TypeEditorSections","FormErrors","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,qGACO,MAAMI,cAAAA,GAAiB;AAC1B,4FACAC,QAAAA,EAAU,mBAAA;IACVC,KAAAA,EAAO,eAAA;IACPC,YAAAA,EAAc,cAAA;IACdC,iBAAAA,EAAmB,mBAAA;IACnBC,UAAAA,EAAY,YAAA;IACZC,UAAAA,EAAY,YAAA;IACZC,gBAAAA,EAAkB,kBAAA;IAClBC,qBAAAA,EAAuB,uBAAA;IACvBC,cAAAA,EAAgB,gBAAA;IAChBC,sBAAAA,EAAwB,wBAAA;IACxBC,kBAAAA,EAAoB,oBAAA;IACpBC,WAAAA,EAAa,aAAA;IACbC,iBAAAA,EAAmB,mBAAA;IACnBC,sBAAAA,EAAwB,wBAAA;IACxBC,eAAAA,EAAiB,iBAAA;IACjBC,uBAAAA,EAAyB,yBAAA;IACzBC,mBAAAA,EAAqB,qBAAA;IACrBC,YAAAA,EAAc,cAAA;IACdC,kBAAAA,EAAoB,oBAAA;IACpBC,uBAAAA,EAAyB,yBAAA;IACzBC,gBAAAA,EAAkB,kBAAA;IAClBC,wBAAAA,EAA0B,0BAAA;IAC1BC,oBAAAA,EAAsB,sBAAA;IACtBC,WAAAA,EAAa,oBAAA;IACbC,YAAAA,EAAc,qBAAA;IACdC,cAAAA,EAAgB,uBAAA;IAChBC,cAAAA,EAAgB,uBAAA;IAChBC,YAAAA,EAAc,qBAAA;IACdC,OAAAA,EAAS,eAAA;IACTC,cAAAA,EAAgB,gBAAA;IAChBC,eAAAA,EAAiB,iBAAA;IACjBC,KAAAA,EAAO,cAAA;IACPC,WAAAA,EAAa,oBAAA;IACbC,iBAAAA,EAAmB,mBAAA;IACnBC,QAAAA,EAAU,iBAAA;IACVC,WAAAA,EAAa,aAAA;IACbC,gBAAAA,EAAkB,kBAAA;IAClBC,kBAAAA,EAAoB,2BAAA;IACpBC,UAAAA,EAAY;AAChB;AAEA,wGACO,MAAMC,YAAAA,GAAe;IAAEC,MAAAA,EAAQ/C,SAAAA,CAAUM,cAAAA,CAAeC,QAAQ,EAAE,UAAA;AAAY;MACxEyC,cAAAA,GAAiB;AAAE,IAAA,GAAGF,YAAY;IAAEG,QAAAA,EAAUjD,SAAAA,CAAUM,cAAAA,CAAeC,QAAQ,EAAE,YAAA;AAAc;;;;;"}
|
|
@@ -0,0 +1,61 @@
|
|
|
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
|
+
/**
|
|
6
|
+
* The screens the blueprint brings, in navigation order. This one list is what the manifest's screen set, the `Screen` instances, the application structure
|
|
7
|
+
* and the navigation are all derived from, so they cannot disagree about which screens exist or where they sit.
|
|
8
|
+
*/ const approvalsScreenDefinitions = [
|
|
9
|
+
{
|
|
10
|
+
name: 'approvals.inbox',
|
|
11
|
+
title: 'Inbox',
|
|
12
|
+
template: 'ApprovalInbox',
|
|
13
|
+
order: 0,
|
|
14
|
+
description: 'The requests waiting for my decision, with Approve, Reject and Request changes on each.'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'approvals.requests',
|
|
18
|
+
title: 'My requests',
|
|
19
|
+
template: 'MyRequests',
|
|
20
|
+
order: 1,
|
|
21
|
+
description: 'The requests I made, with draft, submitted, approved and rejected as chips.'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'approvals.requests.new',
|
|
25
|
+
title: 'New request',
|
|
26
|
+
template: 'NewRequestWizard',
|
|
27
|
+
parent: 'approvals.requests',
|
|
28
|
+
description: 'Request type, details, attachments, then review and submit.'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'approvals.requests.page',
|
|
32
|
+
title: 'Request',
|
|
33
|
+
template: 'RequestPage',
|
|
34
|
+
parent: 'approvals.requests',
|
|
35
|
+
description: 'One request: its summary, its approval chain, its attachments and the comments.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'approvals.all',
|
|
39
|
+
title: 'All requests',
|
|
40
|
+
template: 'AllRequests',
|
|
41
|
+
order: 2,
|
|
42
|
+
description: 'Every request in the organisation.'
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: 'approvals.templates',
|
|
46
|
+
title: 'Templates',
|
|
47
|
+
template: 'RequestTypes',
|
|
48
|
+
order: 3,
|
|
49
|
+
description: 'The request types an organisation offers, for administrators.'
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: 'approvals.templates.edit',
|
|
53
|
+
title: 'Edit request type',
|
|
54
|
+
template: 'RequestTypeEditForm',
|
|
55
|
+
parent: 'approvals.templates',
|
|
56
|
+
description: 'Edits what a request type asks for and who approves it.'
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
|
|
60
|
+
exports.approvalsScreenDefinitions = approvalsScreenDefinitions;
|
|
61
|
+
//# sourceMappingURL=approvalsScreenSet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"approvalsScreenSet.js","sources":["../../approvalsScreenSet.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 (`approvals.requests.new` is the `new` feature of `requests` in the `approvals` module). */\nexport interface ApprovalsScreenDefinition 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 approvalsScreenDefinitions: ApprovalsScreenDefinition[] = [\n { name: 'approvals.inbox', title: 'Inbox', template: 'ApprovalInbox', order: 0, description: 'The requests waiting for my decision, with Approve, Reject and Request changes on each.' },\n { name: 'approvals.requests', title: 'My requests', template: 'MyRequests', order: 1, description: 'The requests I made, with draft, submitted, approved and rejected as chips.' },\n { name: 'approvals.requests.new', title: 'New request', template: 'NewRequestWizard', parent: 'approvals.requests', description: 'Request type, details, attachments, then review and submit.' },\n { name: 'approvals.requests.page', title: 'Request', template: 'RequestPage', parent: 'approvals.requests', description: 'One request: its summary, its approval chain, its attachments and the comments.' },\n { name: 'approvals.all', title: 'All requests', template: 'AllRequests', order: 2, description: 'Every request in the organisation.' },\n { name: 'approvals.templates', title: 'Templates', template: 'RequestTypes', order: 3, description: 'The request types an organisation offers, for administrators.' },\n { name: 'approvals.templates.edit', title: 'Edit request type', template: 'RequestTypeEditForm', parent: 'approvals.templates', description: 'Edits what a request type asks for and who approves it.' },\n];\n"],"names":["approvalsScreenDefinitions","name","title","template","order","description","parent"],"mappings":";;AAAA;AACA;AAUA;;;UAIaA,0BAAAA,GAA0D;AACnE,IAAA;QAAEC,IAAAA,EAAM,iBAAA;QAAmBC,KAAAA,EAAO,OAAA;QAASC,QAAAA,EAAU,eAAA;QAAiBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAA0F,KAAA;AACvL,IAAA;QAAEJ,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,aAAA;QAAeC,QAAAA,EAAU,YAAA;QAAcC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAA8E,KAAA;AACjL,IAAA;QAAEJ,IAAAA,EAAM,wBAAA;QAA0BC,KAAAA,EAAO,aAAA;QAAeC,QAAAA,EAAU,kBAAA;QAAoBG,MAAAA,EAAQ,oBAAA;QAAsBD,WAAAA,EAAa;AAA8D,KAAA;AAC/L,IAAA;QAAEJ,IAAAA,EAAM,yBAAA;QAA2BC,KAAAA,EAAO,SAAA;QAAWC,QAAAA,EAAU,aAAA;QAAeG,MAAAA,EAAQ,oBAAA;QAAsBD,WAAAA,EAAa;AAAkF,KAAA;AAC3M,IAAA;QAAEJ,IAAAA,EAAM,eAAA;QAAiBC,KAAAA,EAAO,cAAA;QAAgBC,QAAAA,EAAU,aAAA;QAAeC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAqC,KAAA;AACrI,IAAA;QAAEJ,IAAAA,EAAM,qBAAA;QAAuBC,KAAAA,EAAO,WAAA;QAAaC,QAAAA,EAAU,cAAA;QAAgBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAgE,KAAA;AACpK,IAAA;QAAEJ,IAAAA,EAAM,0BAAA;QAA4BC,KAAAA,EAAO,mBAAA;QAAqBC,QAAAA,EAAU,qBAAA;QAAuBG,MAAAA,EAAQ,qBAAA;QAAuBD,WAAAA,EAAa;AAA0D;;;"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var manifest = require('./manifest.js');
|
|
4
|
+
var index = require('./screens/index.js');
|
|
5
|
+
var index$1 = require('./templates/index.js');
|
|
6
|
+
var formTemplates = require('./templates/formTemplates.js');
|
|
7
|
+
|
|
8
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
9
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
10
|
+
/** This blueprint as a loadable bundle: the manifest names things, this provides them. It provides no component - every component is the foundation's. */ const approvalsBlueprint = {
|
|
11
|
+
manifest: manifest.approvalsBlueprintManifest,
|
|
12
|
+
components: {},
|
|
13
|
+
screenTemplates: index$1.approvalsScreenTemplates,
|
|
14
|
+
dialogTemplates: formTemplates.approvalsDialogTemplates,
|
|
15
|
+
screens: index.approvalsScreens
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
exports.approvalsBlueprint = approvalsBlueprint;
|
|
19
|
+
//# sourceMappingURL=blueprint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"blueprint.js","sources":["../../blueprint.ts"],"sourcesContent":["// Copyright (c) Cratis. All rights reserved.\n// Licensed under the MIT license. See LICENSE file in the project root for full license information.\n\nimport { ScenePackageBundle } from '@cratis/scene.react';\nimport { approvalsBlueprintManifest } from './manifest';\nimport { approvalsScreens } from './screens';\nimport { approvalsDialogTemplates, approvalsScreenTemplates } from './templates';\n\n/** This blueprint as a loadable bundle: the manifest names things, this provides them. It provides no component - every component is the foundation's. */\nexport const approvalsBlueprint: ScenePackageBundle = {\n manifest: approvalsBlueprintManifest,\n components: {},\n screenTemplates: approvalsScreenTemplates,\n dialogTemplates: approvalsDialogTemplates,\n screens: approvalsScreens,\n};\n"],"names":["approvalsBlueprint","manifest","approvalsBlueprintManifest","components","screenTemplates","approvalsScreenTemplates","dialogTemplates","approvalsDialogTemplates","screens","approvalsScreens"],"mappings":";;;;;;;AAAA;AACA;AAOA,2JACO,MAAMA,kBAAAA,GAAyC;IAClDC,QAAAA,EAAUC,mCAAAA;AACVC,IAAAA,UAAAA,EAAY,EAAC;IACbC,eAAAA,EAAiBC,gCAAAA;IACjBC,eAAAA,EAAiBC,sCAAAA;IACjBC,OAAAA,EAASC;AACb;;"}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageName = require('./packageName.js');
|
|
4
|
+
var templateProvenance = require('./templateProvenance.js');
|
|
5
|
+
var approvalsQueries = require('./approvalsQueries.js');
|
|
6
|
+
var approvalsParts = require('./approvalsParts.js');
|
|
7
|
+
var approvalsScreenSet = require('./approvalsScreenSet.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 approvalsApplication = require('./approvalsApplication.js');
|
|
14
|
+
var listTemplates = require('./templates/listTemplates.js');
|
|
15
|
+
var formTemplates = require('./templates/formTemplates.js');
|
|
16
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
17
|
+
var wizardTemplate = require('./templates/wizardTemplate.js');
|
|
18
|
+
var recordTemplates = require('./templates/recordTemplates.js');
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
exports.approvalsBlueprintName = packageName.approvalsBlueprintName;
|
|
23
|
+
exports.approvalsTemplateProvenance = templateProvenance.approvalsTemplateProvenance;
|
|
24
|
+
exports.ApprovalsQuery = approvalsQueries.ApprovalsQuery;
|
|
25
|
+
exports.currencyOfData = approvalsQueries.currencyOfData;
|
|
26
|
+
exports.fromQuery = approvalsQueries.fromQuery;
|
|
27
|
+
exports.localeOfData = approvalsQueries.localeOfData;
|
|
28
|
+
exports.actionButton = approvalsParts.actionButton;
|
|
29
|
+
exports.approvalsCategory = approvalsParts.approvalsCategory;
|
|
30
|
+
exports.approvalsMetadata = approvalsParts.approvalsMetadata;
|
|
31
|
+
exports.closesDialog = approvalsParts.closesDialog;
|
|
32
|
+
exports.goesTo = approvalsParts.goesTo;
|
|
33
|
+
exports.opensDialog = approvalsParts.opensDialog;
|
|
34
|
+
exports.opensRecordOnSelect = approvalsParts.opensRecordOnSelect;
|
|
35
|
+
exports.thumbnailOf = approvalsParts.thumbnailOf;
|
|
36
|
+
exports.withBehaviors = approvalsParts.withBehaviors;
|
|
37
|
+
exports.approvalsScreenDefinitions = approvalsScreenSet.approvalsScreenDefinitions;
|
|
38
|
+
exports.approvalsScreenTemplates = index.approvalsScreenTemplates;
|
|
39
|
+
exports.approvalsScreens = index$1.approvalsScreens;
|
|
40
|
+
exports.approvalsModule = navigation.approvalsModule;
|
|
41
|
+
exports.approvalsNavigation = navigation.approvalsNavigation;
|
|
42
|
+
exports.approvalsStructure = navigation.approvalsStructure;
|
|
43
|
+
exports.approvalsBlueprintManifest = manifest.approvalsBlueprintManifest;
|
|
44
|
+
exports.approvalsBlueprint = blueprint.approvalsBlueprint;
|
|
45
|
+
exports.approvalsApplication = approvalsApplication.approvalsApplication;
|
|
46
|
+
exports.approvalsComposition = approvalsApplication.approvalsComposition;
|
|
47
|
+
exports.approvalsDefaultSampleDataId = approvalsApplication.approvalsDefaultSampleDataId;
|
|
48
|
+
exports.approvalsNavigationModel = approvalsApplication.approvalsNavigationModel;
|
|
49
|
+
exports.allRequestsTemplate = listTemplates.allRequestsTemplate;
|
|
50
|
+
exports.approvalInboxTemplate = listTemplates.approvalInboxTemplate;
|
|
51
|
+
exports.myRequestsTemplate = listTemplates.myRequestsTemplate;
|
|
52
|
+
exports.requestTypesTemplate = listTemplates.requestTypesTemplate;
|
|
53
|
+
exports.approvalsDialogTemplates = formTemplates.approvalsDialogTemplates;
|
|
54
|
+
exports.decisionDialogTemplate = formTemplates.decisionDialogTemplate;
|
|
55
|
+
exports.requestTypeEditFormTemplate = formTemplates.requestTypeEditFormTemplate;
|
|
56
|
+
exports.requestTypeQuickCreateDialogTemplate = formTemplates.requestTypeQuickCreateDialogTemplate;
|
|
57
|
+
Object.defineProperty(exports, "component", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function () { return scene_blueprint_default.component; }
|
|
60
|
+
});
|
|
61
|
+
Object.defineProperty(exports, "panel", {
|
|
62
|
+
enumerable: true,
|
|
63
|
+
get: function () { return scene_blueprint_default.panel; }
|
|
64
|
+
});
|
|
65
|
+
exports.newRequestWizardTemplate = wizardTemplate.newRequestWizardTemplate;
|
|
66
|
+
exports.requestPageTemplate = recordTemplates.requestPageTemplate;
|
|
67
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var packageName = require('./packageName.js');
|
|
5
|
+
var approvalsScreenSet = require('./approvalsScreenSet.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 = 'Requests and approvals: an approver\'s inbox, my requests, a new-request wizard, request pages with their approval chain and the request types an organisation offers.';
|
|
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 approvalsBlueprintManifest = {
|
|
17
|
+
name: packageName.approvalsBlueprintName,
|
|
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.approvalsScreenTemplates.map((template)=>template.name),
|
|
29
|
+
dialogTemplates: formTemplates.approvalsDialogTemplates.map((template)=>template.name),
|
|
30
|
+
themes: [],
|
|
31
|
+
displayName: 'Approvals and Requests',
|
|
32
|
+
description,
|
|
33
|
+
module: '@cratis/scene.blueprint.approvals',
|
|
34
|
+
license: 'MIT',
|
|
35
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
|
|
36
|
+
sampleData: [
|
|
37
|
+
{
|
|
38
|
+
id: 'approvals-general',
|
|
39
|
+
title: 'Approvals · General',
|
|
40
|
+
locale: 'en-GB',
|
|
41
|
+
path: 'sampleData/approvals-general.json'
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 'approvals-nordic',
|
|
45
|
+
title: 'Approvals · Nordic',
|
|
46
|
+
locale: 'nb-NO',
|
|
47
|
+
path: 'sampleData/approvals-nordic.json'
|
|
48
|
+
}
|
|
49
|
+
],
|
|
50
|
+
blueprint: {
|
|
51
|
+
domain: 'approvals',
|
|
52
|
+
description,
|
|
53
|
+
thumbnail: 'thumbnails/approvals.svg',
|
|
54
|
+
screenSet: approvalsScreenSet.approvalsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order })=>({
|
|
55
|
+
name,
|
|
56
|
+
title,
|
|
57
|
+
description: screenDescription,
|
|
58
|
+
template,
|
|
59
|
+
...parent === undefined ? {} : {
|
|
60
|
+
parent
|
|
61
|
+
},
|
|
62
|
+
...order === undefined ? {} : {
|
|
63
|
+
order
|
|
64
|
+
}
|
|
65
|
+
})),
|
|
66
|
+
defaultSampleData: 'approvals-general'
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
exports.approvalsBlueprintManifest = approvalsBlueprintManifest;
|
|
71
|
+
//# 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 { approvalsBlueprintName } from './packageName';\nimport { approvalsScreenDefinitions } from './approvalsScreenSet';\nimport { approvalsDialogTemplates, approvalsScreenTemplates } from './templates';\n\nconst description = 'Requests and approvals: an approver\\'s inbox, my requests, a new-request wizard, request pages with their approval chain and the request types an organisation offers.';\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 approvalsBlueprintManifest: ScenePackage = {\n name: approvalsBlueprintName,\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: approvalsScreenTemplates.map(template => template.name),\n dialogTemplates: approvalsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Approvals and Requests',\n description,\n module: '@cratis/scene.blueprint.approvals',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n sampleData: [\n { id: 'approvals-general', title: 'Approvals · General', locale: 'en-GB', path: 'sampleData/approvals-general.json' },\n { id: 'approvals-nordic', title: 'Approvals · Nordic', locale: 'nb-NO', path: 'sampleData/approvals-nordic.json' },\n ],\n blueprint: {\n domain: 'approvals',\n description,\n thumbnail: 'thumbnails/approvals.svg',\n screenSet: approvalsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({\n name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),\n })),\n defaultSampleData: 'approvals-general',\n },\n};\n"],"names":["description","approvalsBlueprintManifest","name","approvalsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","versionRange","components","layouts","screenTemplates","approvalsScreenTemplates","map","template","dialogTemplates","approvalsDialogTemplates","themes","displayName","module","license","licenseUrl","sampleData","id","title","locale","path","blueprint","domain","thumbnail","screenSet","approvalsScreenDefinitions","screenDescription","parent","order","undefined","defaultSampleData"],"mappings":";;;;;;;;AAAA;AACA;AAOA,MAAMA,WAAAA,GAAc,wKAAA;AAEpB;;;;UAKaC,0BAAAA,GAA2C;IACpDC,IAAAA,EAAMC,kCAAAA;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,+BAAyBC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AACvEc,IAAAA,eAAAA,EAAiBC,uCAAyBH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AACvEgB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,wBAAA;AACbnB,IAAAA,WAAAA;IACAoB,MAAAA,EAAQ,mCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY,mDAAA;IACZC,UAAAA,EAAY;AACR,QAAA;YAAEC,EAAAA,EAAI,mBAAA;YAAqBC,KAAAA,EAAO,qBAAA;YAAuBC,MAAAA,EAAQ,OAAA;YAASC,IAAAA,EAAM;AAAoC,SAAA;AACpH,QAAA;YAAEH,EAAAA,EAAI,kBAAA;YAAoBC,KAAAA,EAAO,oBAAA;YAAsBC,MAAAA,EAAQ,OAAA;YAASC,IAAAA,EAAM;AAAmC;AACpH,KAAA;IACDC,SAAAA,EAAW;QACPC,MAAAA,EAAQ,WAAA;AACR7B,QAAAA,WAAAA;QACA8B,SAAAA,EAAW,0BAAA;AACXC,QAAAA,SAAAA,EAAWC,8CAA2BlB,GAAG,CAAC,CAAC,EAAEZ,IAAI,EAAEuB,KAAK,EAAEzB,aAAaiC,iBAAiB,EAAElB,QAAQ,EAAEmB,MAAM,EAAEC,KAAK,EAAE,IAAM;AACrHjC,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,117 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var approvalsScreenSet = require('./approvalsScreenSet.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 approvalsModule = 'approvals';
|
|
9
|
+
/**
|
|
10
|
+
* The application structure the screen set implies: one module, `approvals`, a feature for each screen and the sub-features beneath it (`approvals.requests.new`
|
|
11
|
+
* is the `new` feature of `requests`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.
|
|
12
|
+
*/ const approvalsStructure = (()=>{
|
|
13
|
+
const root = {
|
|
14
|
+
id: approvalsModule,
|
|
15
|
+
name: 'Approvals',
|
|
16
|
+
features: []};
|
|
17
|
+
for (const screen of approvalsScreenSet.approvalsScreenDefinitions){
|
|
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 the four
|
|
45
|
+
* places of an approvals application: Inbox, My requests, All requests and Templates (for administrators).
|
|
46
|
+
*/ const approvalsNavigation = {
|
|
47
|
+
application: {
|
|
48
|
+
logo: {
|
|
49
|
+
image: '',
|
|
50
|
+
title: 'Approvals'
|
|
51
|
+
},
|
|
52
|
+
regions: [
|
|
53
|
+
{
|
|
54
|
+
region: scene_model.NavigationRegionKind.Topbar,
|
|
55
|
+
items: [
|
|
56
|
+
{
|
|
57
|
+
id: 'approvals',
|
|
58
|
+
title: 'Approvals',
|
|
59
|
+
target: {
|
|
60
|
+
module: approvalsModule
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
modules: [
|
|
68
|
+
{
|
|
69
|
+
module: approvalsModule,
|
|
70
|
+
regions: [
|
|
71
|
+
{
|
|
72
|
+
region: scene_model.NavigationRegionKind.Sidebar,
|
|
73
|
+
mode: scene_model.NavigationRegionMode.Override,
|
|
74
|
+
items: [
|
|
75
|
+
{
|
|
76
|
+
id: 'inbox',
|
|
77
|
+
title: 'Inbox',
|
|
78
|
+
target: {
|
|
79
|
+
module: approvalsModule,
|
|
80
|
+
feature: 'inbox'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'requests',
|
|
85
|
+
title: 'My requests',
|
|
86
|
+
target: {
|
|
87
|
+
module: approvalsModule,
|
|
88
|
+
feature: 'requests'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'all',
|
|
93
|
+
title: 'All requests',
|
|
94
|
+
target: {
|
|
95
|
+
module: approvalsModule,
|
|
96
|
+
feature: 'all'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'templates',
|
|
101
|
+
title: 'Templates',
|
|
102
|
+
target: {
|
|
103
|
+
module: approvalsModule,
|
|
104
|
+
feature: 'templates'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
exports.approvalsModule = approvalsModule;
|
|
115
|
+
exports.approvalsNavigation = approvalsNavigation;
|
|
116
|
+
exports.approvalsStructure = approvalsStructure;
|
|
117
|
+
//# 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 { approvalsScreenDefinitions } from './approvalsScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const approvalsModule = 'approvals';\n\n/**\n * The application structure the screen set implies: one module, `approvals`, a feature for each screen and the sub-features beneath it (`approvals.requests.new`\n * is the `new` feature of `requests`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const approvalsStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: approvalsModule, name: 'Approvals', features: [], slices: [] };\n for (const screen of approvalsScreenDefinitions) {\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 the four\n * places of an approvals application: Inbox, My requests, All requests and Templates (for administrators).\n */\nexport const approvalsNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Approvals' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'approvals', title: 'Approvals', target: { module: approvalsModule } }] }],\n },\n modules: [{\n module: approvalsModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'inbox', title: 'Inbox', target: { module: approvalsModule, feature: 'inbox' } },\n { id: 'requests', title: 'My requests', target: { module: approvalsModule, feature: 'requests' } },\n { id: 'all', title: 'All requests', target: { module: approvalsModule, feature: 'all' } },\n { id: 'templates', title: 'Templates', target: { module: approvalsModule, feature: 'templates' } },\n ],\n }],\n }],\n};\n"],"names":["approvalsModule","approvalsStructure","root","id","name","features","screen","approvalsScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","approvalsNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature"],"mappings":";;;;;AAAA;AACA;AAKA,8GACO,MAAMA,eAAAA,GAAkB;AAE/B;;;AAGC,IACM,MAAMC,kBAAAA,GAA4C,CAAA,IAAA;AAErD,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,eAAAA;QAAiBI,IAAAA,EAAM,WAAA;AAAaC,QAAAA,QAAAA,EAAU,EAAe,CAAA;IACtF,KAAK,MAAMC,UAAUC,6CAAAA,CAA4B;AAC7C,QAAA,IAAIC,MAAAA,GAASN,IAAAA;QACb,KAAK,MAAMC,EAAAA,IAAMG,MAAAA,CAAOF,IAAI,CAACK,KAAK,CAAC,GAAA,CAAA,CAAKC,KAAK,CAAC,CAAA,CAAA,CAAI;YAC9C,IAAIC,IAAAA,GAAOH,MAAAA,CAAOH,QAAQ,CAACO,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUV,EAAE,KAAKA,EAAAA,CAAAA;AAC9D,YAAA,IAAI,CAACQ,IAAAA,EAAM;gBACPA,IAAAA,GAAO;AAAER,oBAAAA,EAAAA;AAAIC,oBAAAA,IAAAA,EAAME,OAAOQ,KAAK;AAAET,oBAAAA,QAAAA,EAAU,EAAE;AAAEU,oBAAAA,MAAAA,EAAQ;AAAG,iBAAA;gBAC1DP,MAAAA,CAAOH,QAAQ,CAACW,IAAI,CAACL,IAAAA,CAAAA;AACzB,YAAA;YACAH,MAAAA,GAASG,IAAAA;AACb,QAAA;AACJ,IAAA;IAEA,OAAO;QAAEM,OAAAA,EAAS;AAAC,YAAA;AAAEd,gBAAAA,EAAAA,EAAID,KAAKC,EAAE;AAAEC,gBAAAA,IAAAA,EAAMF,KAAKE,IAAI;AAAEC,gBAAAA,QAAAA,EAAUH,KAAKG;AAAS;AAAE;AAAC,KAAA;AAClF,CAAA;AAEA;;;UAIaa,mBAAAA,GAAuC;IAChDC,WAAAA,EAAa;QACTC,IAAAA,EAAM;YAAEC,KAAAA,EAAO,EAAA;YAAIP,KAAAA,EAAO;AAAY,SAAA;QACtCQ,OAAAA,EAAS;AAAC,YAAA;AAAEC,gBAAAA,MAAAA,EAAQC,iCAAqBC,MAAM;gBAAEC,KAAAA,EAAO;AAAC,oBAAA;wBAAEvB,EAAAA,EAAI,WAAA;wBAAaW,KAAAA,EAAO,WAAA;wBAAaa,MAAAA,EAAQ;4BAAEC,MAAAA,EAAQ5B;AAAgB;AAAE;AAAE;AAAC;AAAE;AAC7I,KAAA;IACAiB,OAAAA,EAAS;AAAC,QAAA;YACNW,MAAAA,EAAQ5B,eAAAA;YACRsB,OAAAA,EAAS;AAAC,gBAAA;AACNC,oBAAAA,MAAAA,EAAQC,iCAAqBK,OAAO;AACpCC,oBAAAA,IAAAA,EAAMC,iCAAqBC,QAAQ;oBACnCN,KAAAA,EAAO;AACH,wBAAA;4BAAEvB,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,OAAA;4BAASa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAQ;AAAE,yBAAA;AACrF,wBAAA;4BAAE9B,EAAAA,EAAI,UAAA;4BAAYW,KAAAA,EAAO,aAAA;4BAAea,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAW;AAAE,yBAAA;AACjG,wBAAA;4BAAE9B,EAAAA,EAAI,KAAA;4BAAOW,KAAAA,EAAO,cAAA;4BAAgBa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAM;AAAE,yBAAA;AACxF,wBAAA;4BAAE9B,EAAAA,EAAI,WAAA;4BAAaW,KAAAA,EAAO,WAAA;4BAAaa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,eAAAA;gCAAiBiC,OAAAA,EAAS;AAAY;AAAE;AACpG;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 approvalsBlueprintName = 'Cratis.Blueprint.Approvals';
|
|
6
|
+
|
|
7
|
+
exports.approvalsBlueprintName = approvalsBlueprintName;
|
|
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 approvalsBlueprintName = 'Cratis.Blueprint.Approvals';\n"],"names":["approvalsBlueprintName"],"mappings":";;AAAA;AACA;AAEA,iHACO,MAAMA,sBAAAA,GAAyB;;"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
4
|
+
var approvalsScreenSet = require('../approvalsScreenSet.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 the
|
|
10
|
+
* foundation's application shell. A new application that adopts the blueprint gets these, wired into
|
|
11
|
+
* its navigation (`approvalsNavigation`).
|
|
12
|
+
*/ const approvalsScreens = approvalsScreenSet.approvalsScreenDefinitions.map((definition)=>({
|
|
13
|
+
name: definition.name,
|
|
14
|
+
layout: scene_blueprint_default.LayoutName.AppShell,
|
|
15
|
+
screenTemplate: definition.template,
|
|
16
|
+
slotContent: {},
|
|
17
|
+
forms: [],
|
|
18
|
+
contributions: [],
|
|
19
|
+
path: definition.name.split('.')
|
|
20
|
+
}));
|
|
21
|
+
|
|
22
|
+
exports.approvalsScreens = approvalsScreens;
|
|
23
|
+
//# 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 { approvalsScreenDefinitions } from '../approvalsScreenSet';\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 the\n * foundation's application shell. A new application that adopts the blueprint gets these, wired into\n * its navigation (`approvalsNavigation`).\n */\nexport const approvalsScreens: Screen[] = approvalsScreenDefinitions.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":["approvalsScreens","approvalsScreenDefinitions","map","definition","name","layout","LayoutName","AppShell","screenTemplate","template","slotContent","forms","contributions","path","split"],"mappings":";;;;;AAAA;AACA;AAMA;;;;UAKaA,gBAAAA,GAA6BC,6CAAAA,CAA2BC,GAAG,CAACC,CAAAA,cAAe;AACpFC,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 approvalsTemplateProvenance = {
|
|
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.approvals'
|
|
18
|
+
},
|
|
19
|
+
license: 'MIT',
|
|
20
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.approvalsTemplateProvenance = approvalsTemplateProvenance;
|
|
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 approvalsTemplateProvenance: 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.approvals' },\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n"],"names":["approvalsTemplateProvenance","compatibility","scene","packages","name","versionRange","attribution","author","url","license","licenseUrl"],"mappings":";;AAAA;AACA;AAIA,wGACO,MAAMA,2BAAAA,GAAkH;IAC3HC,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;AAAkF,KAAA;IACxHC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;;"}
|