@cratis/scene.blueprint.contracts 0.0.0-stage → 4.71.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 +66 -2
- package/blueprint.ts +16 -0
- package/blueprintCatalog.json +107 -0
- package/contractsApplication.ts +28 -0
- package/contractsParts.ts +58 -0
- package/contractsQueries.ts +56 -0
- package/contractsScreenSet.ts +21 -0
- package/dist/cjs/blueprint.js +19 -0
- package/dist/cjs/blueprint.js.map +1 -0
- package/dist/cjs/contractsApplication.js +49 -0
- package/dist/cjs/contractsApplication.js.map +1 -0
- package/dist/cjs/contractsParts.js +151 -0
- package/dist/cjs/contractsParts.js.map +1 -0
- package/dist/cjs/contractsQueries.js +64 -0
- package/dist/cjs/contractsQueries.js.map +1 -0
- package/dist/cjs/contractsScreenSet.js +40 -0
- package/dist/cjs/contractsScreenSet.js.map +1 -0
- package/dist/cjs/index.js +68 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/manifest.js +88 -0
- package/dist/cjs/manifest.js.map +1 -0
- package/dist/cjs/navigation.js +109 -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 +50 -0
- package/dist/cjs/templates/formTemplates.js.map +1 -0
- package/dist/cjs/templates/inboxTemplate.js +55 -0
- package/dist/cjs/templates/inboxTemplate.js.map +1 -0
- package/dist/cjs/templates/index.js +25 -0
- package/dist/cjs/templates/index.js.map +1 -0
- package/dist/cjs/templates/listTemplates.js +145 -0
- package/dist/cjs/templates/listTemplates.js.map +1 -0
- package/dist/cjs/templates/recordTemplates.js +135 -0
- package/dist/cjs/templates/recordTemplates.js.map +1 -0
- package/dist/cjs/templates/timelineTemplate.js +85 -0
- package/dist/cjs/templates/timelineTemplate.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/contractsApplication.d.ts +10 -0
- package/dist/esm/contractsApplication.d.ts.map +1 -0
- package/dist/esm/contractsApplication.js +44 -0
- package/dist/esm/contractsApplication.js.map +1 -0
- package/dist/esm/contractsParts.d.ts +16 -0
- package/dist/esm/contractsParts.d.ts.map +1 -0
- package/dist/esm/contractsParts.js +133 -0
- package/dist/esm/contractsParts.js.map +1 -0
- package/dist/esm/contractsQueries.d.ts +38 -0
- package/dist/esm/contractsQueries.d.ts.map +1 -0
- package/dist/esm/contractsQueries.js +56 -0
- package/dist/esm/contractsQueries.js.map +1 -0
- package/dist/esm/contractsScreenSet.d.ts +7 -0
- package/dist/esm/contractsScreenSet.d.ts.map +1 -0
- package/dist/esm/contractsScreenSet.js +38 -0
- package/dist/esm/contractsScreenSet.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 +18 -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 +86 -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 +105 -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 +48 -0
- package/dist/esm/templates/formTemplates.js.map +1 -0
- package/dist/esm/templates/inboxTemplate.d.ts +3 -0
- package/dist/esm/templates/inboxTemplate.d.ts.map +1 -0
- package/dist/esm/templates/inboxTemplate.js +53 -0
- package/dist/esm/templates/inboxTemplate.js.map +1 -0
- package/dist/esm/templates/index.d.ts +8 -0
- package/dist/esm/templates/index.d.ts.map +1 -0
- package/dist/esm/templates/index.js +17 -0
- package/dist/esm/templates/index.js.map +1 -0
- package/dist/esm/templates/listTemplates.d.ts +3 -0
- package/dist/esm/templates/listTemplates.d.ts.map +1 -0
- package/dist/esm/templates/listTemplates.js +143 -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 +133 -0
- package/dist/esm/templates/recordTemplates.js.map +1 -0
- package/dist/esm/templates/timelineTemplate.d.ts +3 -0
- package/dist/esm/templates/timelineTemplate.d.ts.map +1 -0
- package/dist/esm/templates/timelineTemplate.js +83 -0
- package/dist/esm/templates/timelineTemplate.js.map +1 -0
- package/dist/esm/tsconfig.tsbuildinfo +1 -0
- package/index.ts +14 -0
- package/manifest.ts +41 -0
- package/navigation.ts +53 -0
- package/package.json +78 -4
- package/packageName.ts +5 -0
- package/sampleData/contracts-en.json +892 -0
- package/screens/index.ts +20 -0
- package/templateProvenance.ts +15 -0
- package/templates/formTemplates.ts +33 -0
- package/templates/inboxTemplate.ts +24 -0
- package/templates/index.ts +18 -0
- package/templates/listTemplates.ts +96 -0
- package/templates/recordTemplates.ts +78 -0
- package/templates/timelineTemplate.ts +54 -0
- package/thumbnails/ContractPage.svg +17 -0
- package/thumbnails/ContractsList.svg +29 -0
- package/thumbnails/ContractsQuickCreateContract.svg +12 -0
- package/thumbnails/ContractsReview.svg +19 -0
- package/thumbnails/ContractsTimeline.svg +11 -0
- package/thumbnails/contracts.svg +14 -0
package/index.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
export * from './packageName';
|
|
5
|
+
export * from './templateProvenance';
|
|
6
|
+
export * from './contractsQueries';
|
|
7
|
+
export * from './contractsParts';
|
|
8
|
+
export * from './contractsScreenSet';
|
|
9
|
+
export * from './templates';
|
|
10
|
+
export * from './screens';
|
|
11
|
+
export * from './navigation';
|
|
12
|
+
export * from './manifest';
|
|
13
|
+
export * from './blueprint';
|
|
14
|
+
export * from './contractsApplication';
|
package/manifest.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { PackageKind, ScenePackage } from '@cratis/scene.model';
|
|
5
|
+
import { contractsBlueprintName } from './packageName';
|
|
6
|
+
import { contractsScreenDefinitions } from './contractsScreenSet';
|
|
7
|
+
import { contractsDialogTemplates, contractsScreenTemplates } from './templates';
|
|
8
|
+
|
|
9
|
+
const description = 'Contracts for a legal or procurement team: a contract list, a contract page with its parties, obligations and amendments, a timeline of terms and an inbox for what needs review or signature.';
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* This blueprint's declaration. A domain blueprint depends on the foundation set (`Cratis.Blueprint.Default`) and reuses its layouts, slots,
|
|
13
|
+
* 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
|
|
14
|
+
* and thumbnails. The package `version` is the blueprint's version: it is what a template reference pins and what "update available" compares.
|
|
15
|
+
*/
|
|
16
|
+
export const contractsBlueprintManifest: ScenePackage = {
|
|
17
|
+
name: contractsBlueprintName,
|
|
18
|
+
version: '1.0.0',
|
|
19
|
+
kind: PackageKind.Blueprint,
|
|
20
|
+
dependencies: [{ name: 'Cratis.Blueprint.Default', versionRange: '^1.0.0' }],
|
|
21
|
+
components: [],
|
|
22
|
+
layouts: [],
|
|
23
|
+
screenTemplates: contractsScreenTemplates.map(template => template.name),
|
|
24
|
+
dialogTemplates: contractsDialogTemplates.map(template => template.name),
|
|
25
|
+
themes: [],
|
|
26
|
+
displayName: 'Contracts',
|
|
27
|
+
description,
|
|
28
|
+
module: '@cratis/scene.blueprint.contracts',
|
|
29
|
+
license: 'MIT',
|
|
30
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
|
|
31
|
+
sampleData: [{ id: 'contracts-en', title: 'Contracts · English', locale: 'en-GB', path: 'sampleData/contracts-en.json', description: 'English contract data: twelve contracts from draft to expired, one contract\'s parties, obligations and amendments, the terms on a timeline and the review queue.', columns: ['Contract', 'Title', 'Counterparty', 'Ends', 'Value'], statusColumn: 'Status', statuses: { good: ['Active'], pending: ['Draft', 'In review', 'Expiring'], bad: ['Expired', 'Terminated'] } }],
|
|
32
|
+
blueprint: {
|
|
33
|
+
domain: 'contracts',
|
|
34
|
+
description,
|
|
35
|
+
thumbnail: 'thumbnails/contracts.svg',
|
|
36
|
+
screenSet: contractsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({
|
|
37
|
+
name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),
|
|
38
|
+
})),
|
|
39
|
+
defaultSampleData: 'contracts-en',
|
|
40
|
+
},
|
|
41
|
+
};
|
package/navigation.ts
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
import { ApplicationStructure, NavigationModel, NavigationRegionKind, NavigationRegionMode } from '@cratis/scene.model';
|
|
5
|
+
import { contractsScreenDefinitions } from './contractsScreenSet';
|
|
6
|
+
|
|
7
|
+
/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */
|
|
8
|
+
export const contractsModule = 'contracts';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The application structure the screen set implies: one module, `contracts`, a feature for each screen and the sub-features beneath it (`contracts.record` is the
|
|
12
|
+
* `record` feature of the module). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.
|
|
13
|
+
*/
|
|
14
|
+
export const contractsStructure: ApplicationStructure = (() => {
|
|
15
|
+
interface Node { id: string; name: string; features: Node[]; slices: never[] }
|
|
16
|
+
const root: Node = { id: contractsModule, name: 'Contracts', features: [], slices: [] };
|
|
17
|
+
for (const screen of contractsScreenDefinitions) {
|
|
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 = { id, name: screen.title, features: [], slices: [] };
|
|
23
|
+
parent.features.push(node);
|
|
24
|
+
}
|
|
25
|
+
parent = node;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
return { modules: [{ id: root.id, name: root.name, features: root.features }] } as unknown as ApplicationStructure;
|
|
30
|
+
})();
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* The navigation of the application the blueprint is: the topbar names the module, and the module's sidebar - which overrides the application's - lists
|
|
34
|
+
* the places a team goes: Contracts, Timeline, Needs attention.
|
|
35
|
+
*/
|
|
36
|
+
export const contractsNavigation: NavigationModel = {
|
|
37
|
+
application: {
|
|
38
|
+
logo: { image: '', title: 'Contracts' },
|
|
39
|
+
regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'contracts', title: 'Contracts', target: { module: contractsModule } }] }],
|
|
40
|
+
},
|
|
41
|
+
modules: [{
|
|
42
|
+
module: contractsModule,
|
|
43
|
+
regions: [{
|
|
44
|
+
region: NavigationRegionKind.Sidebar,
|
|
45
|
+
mode: NavigationRegionMode.Override,
|
|
46
|
+
items: [
|
|
47
|
+
{ id: 'list', title: 'Contracts', target: { module: contractsModule, feature: 'list' } },
|
|
48
|
+
{ id: 'timeline', title: 'Timeline', target: { module: contractsModule, feature: 'timeline' } },
|
|
49
|
+
{ id: 'review', title: 'Needs attention', target: { module: contractsModule, feature: 'review' } },
|
|
50
|
+
],
|
|
51
|
+
}],
|
|
52
|
+
}],
|
|
53
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,80 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
"name": "@cratis/scene.blueprint.contracts",
|
|
3
|
+
"version": "4.71.0",
|
|
4
|
+
"description": "Contracts for a legal or procurement team: a contract list, a contract page with its parties, obligations and amendments, a timeline of terms and an inbox for what needs review or signature.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"cratis",
|
|
7
|
+
"scene",
|
|
8
|
+
"react",
|
|
9
|
+
"ui",
|
|
10
|
+
"blueprint",
|
|
11
|
+
"contracts"
|
|
12
|
+
],
|
|
13
|
+
"author": "Cratis",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"repository": {
|
|
16
|
+
"type": "git",
|
|
17
|
+
"url": "git+https://github.com/Cratis/Scene.git"
|
|
18
|
+
},
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"files": [
|
|
23
|
+
"dist",
|
|
24
|
+
"sampleData",
|
|
25
|
+
"thumbnails",
|
|
26
|
+
"blueprintCatalog.json",
|
|
27
|
+
"**/*.ts",
|
|
28
|
+
"**/*.tsx",
|
|
29
|
+
"!**/for_*/**"
|
|
30
|
+
],
|
|
31
|
+
"main": "dist/cjs/index.js",
|
|
32
|
+
"module": "dist/esm/index.js",
|
|
33
|
+
"types": "dist/esm/index.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
"./package.json": "./package.json",
|
|
36
|
+
".": {
|
|
37
|
+
"types": "./dist/esm/index.d.ts",
|
|
38
|
+
"require": "./dist/cjs/index.js",
|
|
39
|
+
"import": "./dist/esm/index.js"
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
"scripts": {
|
|
43
|
+
"prepare": "yarn g:build",
|
|
44
|
+
"clean": "yarn g:clean",
|
|
45
|
+
"build": "yarn g:build",
|
|
46
|
+
"lint": "yarn g:lint",
|
|
47
|
+
"lint:ci": "yarn g:lint:ci",
|
|
48
|
+
"test": "yarn g:test",
|
|
49
|
+
"test:browser": "yarn g:test --config ./vitest.browser.config.mts",
|
|
50
|
+
"ci": "yarn g:ci",
|
|
51
|
+
"up": "yarn g:up"
|
|
52
|
+
},
|
|
53
|
+
"dependencies": {
|
|
54
|
+
"@cratis/scene.blueprint.default": "4.71.0",
|
|
55
|
+
"@cratis/scene.engine": "4.71.0",
|
|
56
|
+
"@cratis/scene.model": "4.71.0",
|
|
57
|
+
"@cratis/scene.react": "4.71.0"
|
|
58
|
+
},
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@cratis/scene.blueprint.default": "4.71.0",
|
|
61
|
+
"@cratis/scene.engine": "4.71.0",
|
|
62
|
+
"@cratis/scene.model": "4.71.0",
|
|
63
|
+
"@cratis/scene.react": "4.71.0",
|
|
64
|
+
"@primereact/core": "11.2.0",
|
|
65
|
+
"@primereact/headless": "11.2.0",
|
|
66
|
+
"primeicons": "8.0.2",
|
|
67
|
+
"primereact": "11.2.0",
|
|
68
|
+
"react": "^19.3.0",
|
|
69
|
+
"react-dom": "^19.3.0"
|
|
70
|
+
},
|
|
71
|
+
"peerDependencies": {
|
|
72
|
+
"@cratis/components": "^4.1.1",
|
|
73
|
+
"@primereact/core": "^11.0.0",
|
|
74
|
+
"@primereact/headless": "^11.0.0",
|
|
75
|
+
"primeicons": "^8.0.0",
|
|
76
|
+
"primereact": "^11.0.0",
|
|
77
|
+
"react": "^19.0.0",
|
|
78
|
+
"react-dom": "^19.0.0"
|
|
79
|
+
}
|
|
6
80
|
}
|
package/packageName.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
// Copyright (c) Cratis. All rights reserved.
|
|
2
|
+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
|
|
3
|
+
|
|
4
|
+
/** The name this blueprint is known by inside a `ui profile`; every component registry key is built from it. */
|
|
5
|
+
export const contractsBlueprintName = 'Cratis.Blueprint.Contracts';
|