@cratis/scene.blueprint.vendors 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/dist/cjs/blueprint.js +19 -0
- package/dist/cjs/blueprint.js.map +1 -0
- package/dist/cjs/index.js +68 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/manifest.js +87 -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/boardTemplate.js +78 -0
- package/dist/cjs/templates/boardTemplate.js.map +1 -0
- package/dist/cjs/templates/dashboardTemplates.js +151 -0
- package/dist/cjs/templates/dashboardTemplates.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/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/vendorsApplication.js +49 -0
- package/dist/cjs/vendorsApplication.js.map +1 -0
- package/dist/cjs/vendorsParts.js +151 -0
- package/dist/cjs/vendorsParts.js.map +1 -0
- package/dist/cjs/vendorsQueries.js +64 -0
- package/dist/cjs/vendorsQueries.js.map +1 -0
- package/dist/cjs/vendorsScreenSet.js +40 -0
- package/dist/cjs/vendorsScreenSet.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 +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 +85 -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/boardTemplate.d.ts +3 -0
- package/dist/esm/templates/boardTemplate.d.ts.map +1 -0
- package/dist/esm/templates/boardTemplate.js +76 -0
- package/dist/esm/templates/boardTemplate.js.map +1 -0
- package/dist/esm/templates/dashboardTemplates.d.ts +3 -0
- package/dist/esm/templates/dashboardTemplates.d.ts.map +1 -0
- package/dist/esm/templates/dashboardTemplates.js +149 -0
- package/dist/esm/templates/dashboardTemplates.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/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/tsconfig.tsbuildinfo +1 -0
- package/dist/esm/vendorsApplication.d.ts +10 -0
- package/dist/esm/vendorsApplication.d.ts.map +1 -0
- package/dist/esm/vendorsApplication.js +44 -0
- package/dist/esm/vendorsApplication.js.map +1 -0
- package/dist/esm/vendorsParts.d.ts +16 -0
- package/dist/esm/vendorsParts.d.ts.map +1 -0
- package/dist/esm/vendorsParts.js +133 -0
- package/dist/esm/vendorsParts.js.map +1 -0
- package/dist/esm/vendorsQueries.d.ts +38 -0
- package/dist/esm/vendorsQueries.d.ts.map +1 -0
- package/dist/esm/vendorsQueries.js +56 -0
- package/dist/esm/vendorsQueries.js.map +1 -0
- package/dist/esm/vendorsScreenSet.d.ts +7 -0
- package/dist/esm/vendorsScreenSet.d.ts.map +1 -0
- package/dist/esm/vendorsScreenSet.js +38 -0
- package/dist/esm/vendorsScreenSet.js.map +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/vendors-en.json +863 -0
- package/screens/index.ts +20 -0
- package/templateProvenance.ts +15 -0
- package/templates/boardTemplate.ts +54 -0
- package/templates/dashboardTemplates.ts +76 -0
- package/templates/formTemplates.ts +33 -0
- package/templates/index.ts +18 -0
- package/templates/listTemplates.ts +96 -0
- package/templates/recordTemplates.ts +78 -0
- package/thumbnails/VendorPage.svg +17 -0
- package/thumbnails/VendorsList.svg +29 -0
- package/thumbnails/VendorsOnboardingBoard.svg +23 -0
- package/thumbnails/VendorsPerformance.svg +15 -0
- package/thumbnails/VendorsQuickCreateVendor.svg +12 -0
- package/thumbnails/vendors.svg +14 -0
- package/vendorsApplication.ts +28 -0
- package/vendorsParts.ts +58 -0
- package/vendorsQueries.ts +56 -0
- package/vendorsScreenSet.ts +21 -0
|
@@ -0,0 +1,56 @@
|
|
|
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 { BindingExpression, BindingSourceKind } from '@cratis/scene.model';
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A property taken from a query result - never a value. A vendors template declares *where* its data comes from and the sample-data pack, or the real
|
|
8
|
+
* 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).
|
|
9
|
+
*/
|
|
10
|
+
export const fromQuery = (query: string, path = ''): BindingExpression => ({ kind: BindingSourceKind.QueryResult, query, path });
|
|
11
|
+
|
|
12
|
+
/** The queries of the screens that are not a plain list. Each is a shape the sample-data pack supplies rows for. */
|
|
13
|
+
export const VendorsQuery = {
|
|
14
|
+
/** One row: the `locale` and `currency` the figures and dates are formatted in. */
|
|
15
|
+
Settings: 'VendorsSettings',
|
|
16
|
+
OnboardingColumns: 'OnboardingColumns',
|
|
17
|
+
OnboardingCards: 'OnboardingCards',
|
|
18
|
+
Kpis: 'VendorsKpis',
|
|
19
|
+
SpendByCategory: 'VendorsSpendByCategory',
|
|
20
|
+
OnTimeDelivery: 'VendorsOnTimeDelivery',
|
|
21
|
+
Activity: 'VendorsActivity',
|
|
22
|
+
FormErrors: 'VendorsFormErrors',
|
|
23
|
+
} as const;
|
|
24
|
+
|
|
25
|
+
/** The entities a template is made for. */
|
|
26
|
+
export enum VendorsEntityKind {
|
|
27
|
+
Vendor = 'Vendor',
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
/** The read model (and so the shape) the records of each entity are queried from. */
|
|
31
|
+
export const vendorsEntityPlural: Record<VendorsEntityKind, string> = {
|
|
32
|
+
[VendorsEntityKind.Vendor]: 'Vendors',
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
/**
|
|
36
|
+
* The queries one entity's templates bind to, named from the entity so a template never spells one out: the records, the columns and filter fields of the
|
|
37
|
+
* list, its saved views and column choices, the selection, the sections of the quick form, and what the record page shows.
|
|
38
|
+
*/
|
|
39
|
+
export const vendorsQueriesOf = (entity: VendorsEntityKind) => ({
|
|
40
|
+
rows: vendorsEntityPlural[entity],
|
|
41
|
+
columns: `${entity}Columns`,
|
|
42
|
+
filterFields: `${entity}FilterFields`,
|
|
43
|
+
views: `${entity}Views`,
|
|
44
|
+
columnChoices: `${entity}ColumnChoices`,
|
|
45
|
+
selection: `${entity}Selection`,
|
|
46
|
+
quickSections: `${entity}QuickSections`,
|
|
47
|
+
record: `${entity}Record`,
|
|
48
|
+
sections: `${entity}Sections`,
|
|
49
|
+
summary: `${entity}Summary`,
|
|
50
|
+
activity: `${entity}Activity`,
|
|
51
|
+
tabs: `${entity}Tabs`,
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
/** The locale and currency of the data, bound onto every component that formats a figure or a date. */
|
|
55
|
+
export const localeOfData = { locale: fromQuery(VendorsQuery.Settings, '0.locale') };
|
|
56
|
+
export const currencyOfData = { ...localeOfData, currency: fromQuery(VendorsQuery.Settings, '0.currency') };
|
|
@@ -0,0 +1,21 @@
|
|
|
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 { BlueprintScreen } from '@cratis/scene.model';
|
|
5
|
+
|
|
6
|
+
/** One ready-to-use screen: the qualified name that is also its place in the application (`vendors.list.record` would be the `record` feature of `list`). */
|
|
7
|
+
export interface VendorsScreenDefinition extends BlueprintScreen {
|
|
8
|
+
template: string;
|
|
9
|
+
description: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* The screens the blueprint brings, in navigation order. This one list is what the manifest's screen set, the `Screen` instances, the application structure
|
|
14
|
+
* and the navigation are all derived from, so they cannot disagree about which screens exist or where they sit.
|
|
15
|
+
*/
|
|
16
|
+
export const vendorsScreenDefinitions: VendorsScreenDefinition[] = [
|
|
17
|
+
{ name: 'vendors.list', title: 'Vendors', template: 'VendorsList', order: 0, description: 'Every vendor with what you spend with them and how they perform.' },
|
|
18
|
+
{ name: 'vendors.record', title: 'Vendor', template: 'VendorPage', parent: 'vendors.list', description: 'One vendor: key facts, contacts, purchase orders, certificates and activity.' },
|
|
19
|
+
{ name: 'vendors.onboarding', title: 'Onboarding', template: 'VendorsOnboardingBoard', order: 1, description: 'Vendors in a column for each onboarding step: prospect, in review, approved and active.' },
|
|
20
|
+
{ name: 'vendors.performance', title: 'Performance', template: 'VendorsPerformance', order: 2, description: 'How vendors perform: spend, on-time delivery and the vendors to watch.' },
|
|
21
|
+
];
|