@cratis/scene.blueprint.bookings 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 +123 -0
- package/bookingsApplication.ts +28 -0
- package/bookingsParts.ts +58 -0
- package/bookingsQueries.ts +60 -0
- package/bookingsScreenSet.ts +22 -0
- package/dist/cjs/blueprint.js +19 -0
- package/dist/cjs/blueprint.js.map +1 -0
- package/dist/cjs/bookingsApplication.js +49 -0
- package/dist/cjs/bookingsApplication.js.map +1 -0
- package/dist/cjs/bookingsParts.js +151 -0
- package/dist/cjs/bookingsParts.js.map +1 -0
- package/dist/cjs/bookingsQueries.js +68 -0
- package/dist/cjs/bookingsQueries.js.map +1 -0
- package/dist/cjs/bookingsScreenSet.js +47 -0
- package/dist/cjs/bookingsScreenSet.js.map +1 -0
- package/dist/cjs/index.js +69 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/manifest.js +90 -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 +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/calendarTemplate.js +109 -0
- package/dist/cjs/templates/calendarTemplate.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 +27 -0
- package/dist/cjs/templates/index.js.map +1 -0
- package/dist/cjs/templates/listTemplates.js +167 -0
- package/dist/cjs/templates/listTemplates.js.map +1 -0
- package/dist/cjs/templates/recordTemplates.js +129 -0
- package/dist/cjs/templates/recordTemplates.js.map +1 -0
- package/dist/cjs/templates/wizardTemplate.js +73 -0
- package/dist/cjs/templates/wizardTemplate.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/bookingsApplication.d.ts +10 -0
- package/dist/esm/bookingsApplication.d.ts.map +1 -0
- package/dist/esm/bookingsApplication.js +44 -0
- package/dist/esm/bookingsApplication.js.map +1 -0
- package/dist/esm/bookingsParts.d.ts +16 -0
- package/dist/esm/bookingsParts.d.ts.map +1 -0
- package/dist/esm/bookingsParts.js +133 -0
- package/dist/esm/bookingsParts.js.map +1 -0
- package/dist/esm/bookingsQueries.d.ts +41 -0
- package/dist/esm/bookingsQueries.d.ts.map +1 -0
- package/dist/esm/bookingsQueries.js +60 -0
- package/dist/esm/bookingsQueries.js.map +1 -0
- package/dist/esm/bookingsScreenSet.d.ts +7 -0
- package/dist/esm/bookingsScreenSet.d.ts.map +1 -0
- package/dist/esm/bookingsScreenSet.js +45 -0
- package/dist/esm/bookingsScreenSet.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 +88 -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 +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/calendarTemplate.d.ts +3 -0
- package/dist/esm/templates/calendarTemplate.d.ts.map +1 -0
- package/dist/esm/templates/calendarTemplate.js +107 -0
- package/dist/esm/templates/calendarTemplate.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 +18 -0
- package/dist/esm/templates/index.js.map +1 -0
- package/dist/esm/templates/listTemplates.d.ts +4 -0
- package/dist/esm/templates/listTemplates.d.ts.map +1 -0
- package/dist/esm/templates/listTemplates.js +164 -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 +127 -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 +71 -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 +41 -0
- package/navigation.ts +54 -0
- package/package.json +78 -4
- package/packageName.ts +5 -0
- package/sampleData/bookings-en.json +1057 -0
- package/screens/index.ts +20 -0
- package/templateProvenance.ts +15 -0
- package/templates/calendarTemplate.ts +57 -0
- package/templates/formTemplates.ts +33 -0
- package/templates/index.ts +18 -0
- package/templates/listTemplates.ts +106 -0
- package/templates/recordTemplates.ts +78 -0
- package/templates/wizardTemplate.ts +29 -0
- package/thumbnails/BookingPage.svg +17 -0
- package/thumbnails/BookingsCalendar.svg +34 -0
- package/thumbnails/BookingsList.svg +29 -0
- package/thumbnails/BookingsQuickCreateBooking.svg +12 -0
- package/thumbnails/NewBookingWizard.svg +15 -0
- package/thumbnails/ResourcesList.svg +29 -0
- package/thumbnails/bookings.svg +14 -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 bookings 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 screens that are not a plain list. Each is a shape the sample-data pack supplies rows for. */ const BookingsQuery = {
|
|
16
|
+
/** One row: the `locale` and `currency` the figures and dates are formatted in. */ Settings: 'BookingsSettings',
|
|
17
|
+
BookingEvents: 'BookingEvents',
|
|
18
|
+
BookingEventColumns: 'BookingEventColumns',
|
|
19
|
+
BookingWizardSteps: 'BookingWizardSteps',
|
|
20
|
+
BookingResourceSections: 'BookingResourceSections',
|
|
21
|
+
BookingWhenSections: 'BookingWhenSections',
|
|
22
|
+
BookingDetailSections: 'BookingDetailSections',
|
|
23
|
+
BookingReviewSections: 'BookingReviewSections',
|
|
24
|
+
BookingReviewValues: 'BookingReviewValues',
|
|
25
|
+
FormErrors: 'BookingsFormErrors'
|
|
26
|
+
};
|
|
27
|
+
/** The entities a template is made for. */ var BookingsEntityKind = /*#__PURE__*/ function(BookingsEntityKind) {
|
|
28
|
+
BookingsEntityKind["Booking"] = "Booking";
|
|
29
|
+
BookingsEntityKind["Resource"] = "Resource";
|
|
30
|
+
return BookingsEntityKind;
|
|
31
|
+
}({});
|
|
32
|
+
/** The read model (and so the shape) the records of each entity are queried from. */ const bookingsEntityPlural = {
|
|
33
|
+
["Booking"]: 'Bookings',
|
|
34
|
+
["Resource"]: 'Resources'
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* 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
|
|
38
|
+
* list, its saved views and column choices, the selection, the sections of the quick form, and what the record page shows.
|
|
39
|
+
*/ const bookingsQueriesOf = (entity)=>({
|
|
40
|
+
rows: bookingsEntityPlural[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
|
+
/** The locale and currency of the data, bound onto every component that formats a figure or a date. */ const localeOfData = {
|
|
54
|
+
locale: fromQuery(BookingsQuery.Settings, '0.locale')
|
|
55
|
+
};
|
|
56
|
+
const currencyOfData = {
|
|
57
|
+
...localeOfData,
|
|
58
|
+
currency: fromQuery(BookingsQuery.Settings, '0.currency')
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
exports.BookingsEntityKind = BookingsEntityKind;
|
|
62
|
+
exports.BookingsQuery = BookingsQuery;
|
|
63
|
+
exports.bookingsEntityPlural = bookingsEntityPlural;
|
|
64
|
+
exports.bookingsQueriesOf = bookingsQueriesOf;
|
|
65
|
+
exports.currencyOfData = currencyOfData;
|
|
66
|
+
exports.fromQuery = fromQuery;
|
|
67
|
+
exports.localeOfData = localeOfData;
|
|
68
|
+
//# sourceMappingURL=bookingsQueries.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingsQueries.js","sources":["../../bookingsQueries.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 bookings template declares *where* its data comes from and the sample-data pack, or the real\n * query, supplies the rows (spec SD1); `path` reaches into the result (`0.value` is the first row's `value`, an empty path is the whole result).\n */\nexport const fromQuery = (query: string, path = ''): BindingExpression => ({ kind: BindingSourceKind.QueryResult, query, path });\n\n/** The queries of the screens that are not a plain list. Each is a shape the sample-data pack supplies rows for. */\nexport const BookingsQuery = {\n /** One row: the `locale` and `currency` the figures and dates are formatted in. */\n Settings: 'BookingsSettings',\n BookingEvents: 'BookingEvents',\n BookingEventColumns: 'BookingEventColumns',\n BookingWizardSteps: 'BookingWizardSteps',\n BookingResourceSections: 'BookingResourceSections',\n BookingWhenSections: 'BookingWhenSections',\n BookingDetailSections: 'BookingDetailSections',\n BookingReviewSections: 'BookingReviewSections',\n BookingReviewValues: 'BookingReviewValues',\n FormErrors: 'BookingsFormErrors',\n} as const;\n\n/** The entities a template is made for. */\nexport enum BookingsEntityKind {\n Booking = 'Booking',\n Resource = 'Resource',\n}\n\n/** The read model (and so the shape) the records of each entity are queried from. */\nexport const bookingsEntityPlural: Record<BookingsEntityKind, string> = {\n [BookingsEntityKind.Booking]: 'Bookings',\n [BookingsEntityKind.Resource]: 'Resources',\n};\n\n/**\n * The queries one entity's templates bind to, named from the entity so a template never spells one out: the records, the columns and filter fields of the\n * list, its saved views and column choices, the selection, the sections of the quick form, and what the record page shows.\n */\nexport const bookingsQueriesOf = (entity: BookingsEntityKind) => ({\n rows: bookingsEntityPlural[entity],\n columns: `${entity}Columns`,\n filterFields: `${entity}FilterFields`,\n views: `${entity}Views`,\n columnChoices: `${entity}ColumnChoices`,\n selection: `${entity}Selection`,\n quickSections: `${entity}QuickSections`,\n record: `${entity}Record`,\n sections: `${entity}Sections`,\n summary: `${entity}Summary`,\n activity: `${entity}Activity`,\n tabs: `${entity}Tabs`,\n});\n\n/** The locale and currency of the data, bound onto every component that formats a figure or a date. */\nexport const localeOfData = { locale: fromQuery(BookingsQuery.Settings, '0.locale') };\nexport const currencyOfData = { ...localeOfData, currency: fromQuery(BookingsQuery.Settings, '0.currency') };\n"],"names":["fromQuery","query","path","kind","BindingSourceKind","QueryResult","BookingsQuery","Settings","BookingEvents","BookingEventColumns","BookingWizardSteps","BookingResourceSections","BookingWhenSections","BookingDetailSections","BookingReviewSections","BookingReviewValues","FormErrors","BookingsEntityKind","bookingsEntityPlural","bookingsQueriesOf","entity","rows","columns","filterFields","views","columnChoices","selection","quickSections","record","sections","summary","activity","tabs","localeOfData","locale","currencyOfData","currency"],"mappings":";;;;AAAA;AACA;AAIA;;;UAIaA,SAAAA,GAAY,CAACC,OAAeC,IAAAA,GAAO,EAAE,IAAyB;AAAEC,QAAAA,IAAAA,EAAMC,8BAAkBC,WAAW;AAAEJ,QAAAA,KAAAA;AAAOC,QAAAA;AAAK,KAAA;AAE9H,qHACO,MAAMI,aAAAA,GAAgB;AACzB,wFACAC,QAAAA,EAAU,kBAAA;IACVC,aAAAA,EAAe,eAAA;IACfC,mBAAAA,EAAqB,qBAAA;IACrBC,kBAAAA,EAAoB,oBAAA;IACpBC,uBAAAA,EAAyB,yBAAA;IACzBC,mBAAAA,EAAqB,qBAAA;IACrBC,qBAAAA,EAAuB,uBAAA;IACvBC,qBAAAA,EAAuB,uBAAA;IACvBC,mBAAAA,EAAqB,qBAAA;IACrBC,UAAAA,EAAY;AAChB;AAEA,4CACO,IAAKC,kBAAAA,iBAAAA,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
|
|
|
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 bookingsScreenDefinitions = [
|
|
9
|
+
{
|
|
10
|
+
name: 'bookings.calendar',
|
|
11
|
+
title: 'Calendar',
|
|
12
|
+
template: 'BookingsCalendar',
|
|
13
|
+
order: 0,
|
|
14
|
+
description: 'Every booking on a calendar: who has what, and when.'
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
name: 'bookings.list',
|
|
18
|
+
title: 'Bookings',
|
|
19
|
+
template: 'BookingsList',
|
|
20
|
+
order: 1,
|
|
21
|
+
description: 'Every booking with its resource, time and status.'
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
name: 'bookings.record',
|
|
25
|
+
title: 'Booking',
|
|
26
|
+
template: 'BookingPage',
|
|
27
|
+
parent: 'bookings.list',
|
|
28
|
+
description: 'One booking: key facts, its attendees, its extras and its activity.'
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
name: 'bookings.resources',
|
|
32
|
+
title: 'Resources',
|
|
33
|
+
template: 'ResourcesList',
|
|
34
|
+
order: 2,
|
|
35
|
+
description: 'The rooms, equipment and vehicles that can be booked.'
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
name: 'bookings.new',
|
|
39
|
+
title: 'New booking',
|
|
40
|
+
template: 'NewBookingWizard',
|
|
41
|
+
order: 3,
|
|
42
|
+
description: 'Book a room, equipment or a vehicle in four short steps.'
|
|
43
|
+
}
|
|
44
|
+
];
|
|
45
|
+
|
|
46
|
+
exports.bookingsScreenDefinitions = bookingsScreenDefinitions;
|
|
47
|
+
//# sourceMappingURL=bookingsScreenSet.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bookingsScreenSet.js","sources":["../../bookingsScreenSet.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 (`bookings.list.record` would be the `record` feature of `list`). */\nexport interface BookingsScreenDefinition 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 bookingsScreenDefinitions: BookingsScreenDefinition[] = [\n { name: 'bookings.calendar', title: 'Calendar', template: 'BookingsCalendar', order: 0, description: 'Every booking on a calendar: who has what, and when.' },\n { name: 'bookings.list', title: 'Bookings', template: 'BookingsList', order: 1, description: 'Every booking with its resource, time and status.' },\n { name: 'bookings.record', title: 'Booking', template: 'BookingPage', parent: 'bookings.list', description: 'One booking: key facts, its attendees, its extras and its activity.' },\n { name: 'bookings.resources', title: 'Resources', template: 'ResourcesList', order: 2, description: 'The rooms, equipment and vehicles that can be booked.' },\n { name: 'bookings.new', title: 'New booking', template: 'NewBookingWizard', order: 3, description: 'Book a room, equipment or a vehicle in four short steps.' },\n];\n"],"names":["bookingsScreenDefinitions","name","title","template","order","description","parent"],"mappings":";;AAAA;AACA;AAUA;;;UAIaA,yBAAAA,GAAwD;AACjE,IAAA;QAAEC,IAAAA,EAAM,mBAAA;QAAqBC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,kBAAA;QAAoBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAuD,KAAA;AAC5J,IAAA;QAAEJ,IAAAA,EAAM,eAAA;QAAiBC,KAAAA,EAAO,UAAA;QAAYC,QAAAA,EAAU,cAAA;QAAgBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAoD,KAAA;AACjJ,IAAA;QAAEJ,IAAAA,EAAM,iBAAA;QAAmBC,KAAAA,EAAO,SAAA;QAAWC,QAAAA,EAAU,aAAA;QAAeG,MAAAA,EAAQ,eAAA;QAAiBD,WAAAA,EAAa;AAAsE,KAAA;AAClL,IAAA;QAAEJ,IAAAA,EAAM,oBAAA;QAAsBC,KAAAA,EAAO,WAAA;QAAaC,QAAAA,EAAU,eAAA;QAAiBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAAwD,KAAA;AAC5J,IAAA;QAAEJ,IAAAA,EAAM,cAAA;QAAgBC,KAAAA,EAAO,aAAA;QAAeC,QAAAA,EAAU,kBAAA;QAAoBC,KAAAA,EAAO,CAAA;QAAGC,WAAAA,EAAa;AAA2D;;;"}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var packageName = require('./packageName.js');
|
|
4
|
+
var templateProvenance = require('./templateProvenance.js');
|
|
5
|
+
var bookingsQueries = require('./bookingsQueries.js');
|
|
6
|
+
var bookingsParts = require('./bookingsParts.js');
|
|
7
|
+
var bookingsScreenSet = require('./bookingsScreenSet.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 bookingsApplication = require('./bookingsApplication.js');
|
|
14
|
+
var recordTemplates = require('./templates/recordTemplates.js');
|
|
15
|
+
var calendarTemplate = require('./templates/calendarTemplate.js');
|
|
16
|
+
var formTemplates = require('./templates/formTemplates.js');
|
|
17
|
+
var listTemplates = require('./templates/listTemplates.js');
|
|
18
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
19
|
+
var wizardTemplate = require('./templates/wizardTemplate.js');
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
exports.bookingsBlueprintName = packageName.bookingsBlueprintName;
|
|
24
|
+
exports.bookingsTemplateProvenance = templateProvenance.bookingsTemplateProvenance;
|
|
25
|
+
exports.BookingsEntityKind = bookingsQueries.BookingsEntityKind;
|
|
26
|
+
exports.BookingsQuery = bookingsQueries.BookingsQuery;
|
|
27
|
+
exports.bookingsEntityPlural = bookingsQueries.bookingsEntityPlural;
|
|
28
|
+
exports.bookingsQueriesOf = bookingsQueries.bookingsQueriesOf;
|
|
29
|
+
exports.currencyOfData = bookingsQueries.currencyOfData;
|
|
30
|
+
exports.fromQuery = bookingsQueries.fromQuery;
|
|
31
|
+
exports.localeOfData = bookingsQueries.localeOfData;
|
|
32
|
+
exports.actionButton = bookingsParts.actionButton;
|
|
33
|
+
exports.bookingsCategory = bookingsParts.bookingsCategory;
|
|
34
|
+
exports.bookingsMetadata = bookingsParts.bookingsMetadata;
|
|
35
|
+
exports.closesDialog = bookingsParts.closesDialog;
|
|
36
|
+
exports.goesTo = bookingsParts.goesTo;
|
|
37
|
+
exports.opensDialog = bookingsParts.opensDialog;
|
|
38
|
+
exports.opensDialogOnSelect = bookingsParts.opensDialogOnSelect;
|
|
39
|
+
exports.opensRecordOnSelect = bookingsParts.opensRecordOnSelect;
|
|
40
|
+
exports.thumbnailOf = bookingsParts.thumbnailOf;
|
|
41
|
+
exports.withBehaviors = bookingsParts.withBehaviors;
|
|
42
|
+
exports.bookingsScreenDefinitions = bookingsScreenSet.bookingsScreenDefinitions;
|
|
43
|
+
exports.bookingsScreenTemplates = index.bookingsScreenTemplates;
|
|
44
|
+
exports.bookingsScreens = index$1.bookingsScreens;
|
|
45
|
+
exports.bookingsModule = navigation.bookingsModule;
|
|
46
|
+
exports.bookingsNavigation = navigation.bookingsNavigation;
|
|
47
|
+
exports.bookingsStructure = navigation.bookingsStructure;
|
|
48
|
+
exports.bookingsBlueprintManifest = manifest.bookingsBlueprintManifest;
|
|
49
|
+
exports.bookingsBlueprint = blueprint.bookingsBlueprint;
|
|
50
|
+
exports.bookingsApplication = bookingsApplication.bookingsApplication;
|
|
51
|
+
exports.bookingsComposition = bookingsApplication.bookingsComposition;
|
|
52
|
+
exports.bookingsDefaultSampleDataId = bookingsApplication.bookingsDefaultSampleDataId;
|
|
53
|
+
exports.bookingsNavigationModel = bookingsApplication.bookingsNavigationModel;
|
|
54
|
+
exports.bookingPageTemplate = recordTemplates.bookingPageTemplate;
|
|
55
|
+
exports.bookingsCalendarTemplate = calendarTemplate.bookingsCalendarTemplate;
|
|
56
|
+
exports.bookingsDialogTemplates = formTemplates.bookingsDialogs;
|
|
57
|
+
exports.bookingsDialogs = formTemplates.bookingsDialogs;
|
|
58
|
+
exports.bookingsListTemplate = listTemplates.bookingsListTemplate;
|
|
59
|
+
exports.resourcesListTemplate = listTemplates.resourcesListTemplate;
|
|
60
|
+
Object.defineProperty(exports, "component", {
|
|
61
|
+
enumerable: true,
|
|
62
|
+
get: function () { return scene_blueprint_default.component; }
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(exports, "panel", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
get: function () { return scene_blueprint_default.panel; }
|
|
67
|
+
});
|
|
68
|
+
exports.newBookingWizardTemplate = wizardTemplate.newBookingWizardTemplate;
|
|
69
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var packageName = require('./packageName.js');
|
|
5
|
+
var bookingsScreenSet = require('./bookingsScreenSet.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 = 'Bookings for shared rooms, equipment and vehicles: a booking calendar, a booking list, a booking page, the resources and a wizard that books one in four steps.';
|
|
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 bookingsBlueprintManifest = {
|
|
17
|
+
name: packageName.bookingsBlueprintName,
|
|
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.bookingsScreenTemplates.map((template)=>template.name),
|
|
29
|
+
dialogTemplates: formTemplates.bookingsDialogs.map((template)=>template.name),
|
|
30
|
+
themes: [],
|
|
31
|
+
displayName: 'Bookings',
|
|
32
|
+
description,
|
|
33
|
+
module: '@cratis/scene.blueprint.bookings',
|
|
34
|
+
license: 'MIT',
|
|
35
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
|
|
36
|
+
sampleData: [
|
|
37
|
+
{
|
|
38
|
+
id: 'bookings-en',
|
|
39
|
+
title: 'Bookings · English',
|
|
40
|
+
locale: 'en-GB',
|
|
41
|
+
path: 'sampleData/bookings-en.json',
|
|
42
|
+
description: 'English booking data: twelve bookings of eight rooms, equipment and vehicles from requested to completed, one booking\'s attendees and extras, and the wizard steps.',
|
|
43
|
+
columns: [
|
|
44
|
+
'Booking',
|
|
45
|
+
'Resource',
|
|
46
|
+
'Booked by',
|
|
47
|
+
'Date',
|
|
48
|
+
'From'
|
|
49
|
+
],
|
|
50
|
+
statusColumn: 'Status',
|
|
51
|
+
statuses: {
|
|
52
|
+
good: [
|
|
53
|
+
'Confirmed',
|
|
54
|
+
'Checked in',
|
|
55
|
+
'Completed',
|
|
56
|
+
'Available'
|
|
57
|
+
],
|
|
58
|
+
pending: [
|
|
59
|
+
'Requested',
|
|
60
|
+
'Booked'
|
|
61
|
+
],
|
|
62
|
+
bad: [
|
|
63
|
+
'Cancelled',
|
|
64
|
+
'Maintenance'
|
|
65
|
+
]
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
],
|
|
69
|
+
blueprint: {
|
|
70
|
+
domain: 'bookings',
|
|
71
|
+
description,
|
|
72
|
+
thumbnail: 'thumbnails/bookings.svg',
|
|
73
|
+
screenSet: bookingsScreenSet.bookingsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order })=>({
|
|
74
|
+
name,
|
|
75
|
+
title,
|
|
76
|
+
description: screenDescription,
|
|
77
|
+
template,
|
|
78
|
+
...parent === undefined ? {} : {
|
|
79
|
+
parent
|
|
80
|
+
},
|
|
81
|
+
...order === undefined ? {} : {
|
|
82
|
+
order
|
|
83
|
+
}
|
|
84
|
+
})),
|
|
85
|
+
defaultSampleData: 'bookings-en'
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
|
|
89
|
+
exports.bookingsBlueprintManifest = bookingsBlueprintManifest;
|
|
90
|
+
//# 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 { bookingsBlueprintName } from './packageName';\nimport { bookingsScreenDefinitions } from './bookingsScreenSet';\nimport { bookingsDialogTemplates, bookingsScreenTemplates } from './templates';\n\nconst description = 'Bookings for shared rooms, equipment and vehicles: a booking calendar, a booking list, a booking page, the resources and a wizard that books one in four steps.';\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 bookingsBlueprintManifest: ScenePackage = {\n name: bookingsBlueprintName,\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: bookingsScreenTemplates.map(template => template.name),\n dialogTemplates: bookingsDialogTemplates.map(template => template.name),\n themes: [],\n displayName: 'Bookings',\n description,\n module: '@cratis/scene.blueprint.bookings',\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n sampleData: [{ id: 'bookings-en', title: 'Bookings · English', locale: 'en-GB', path: 'sampleData/bookings-en.json', description: 'English booking data: twelve bookings of eight rooms, equipment and vehicles from requested to completed, one booking\\'s attendees and extras, and the wizard steps.', columns: ['Booking', 'Resource', 'Booked by', 'Date', 'From'], statusColumn: 'Status', statuses: { good: ['Confirmed', 'Checked in', 'Completed', 'Available'], pending: ['Requested', 'Booked'], bad: ['Cancelled', 'Maintenance'] } }],\n blueprint: {\n domain: 'bookings',\n description,\n thumbnail: 'thumbnails/bookings.svg',\n screenSet: bookingsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({\n name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),\n })),\n defaultSampleData: 'bookings-en',\n },\n};\n"],"names":["description","bookingsBlueprintManifest","name","bookingsBlueprintName","version","kind","PackageKind","Blueprint","dependencies","versionRange","components","layouts","screenTemplates","bookingsScreenTemplates","map","template","dialogTemplates","bookingsDialogTemplates","themes","displayName","module","license","licenseUrl","sampleData","id","title","locale","path","columns","statusColumn","statuses","good","pending","bad","blueprint","domain","thumbnail","screenSet","bookingsScreenDefinitions","screenDescription","parent","order","undefined","defaultSampleData"],"mappings":";;;;;;;;AAAA;AACA;AAOA,MAAMA,WAAAA,GAAc,iKAAA;AAEpB;;;;UAKaC,yBAAAA,GAA0C;IACnDC,IAAAA,EAAMC,iCAAAA;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,8BAAwBC,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AACtEc,IAAAA,eAAAA,EAAiBC,8BAAwBH,GAAG,CAACC,CAAAA,QAAAA,GAAYA,SAASb,IAAI,CAAA;AACtEgB,IAAAA,MAAAA,EAAQ,EAAE;IACVC,WAAAA,EAAa,UAAA;AACbnB,IAAAA,WAAAA;IACAoB,MAAAA,EAAQ,kCAAA;IACRC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY,mDAAA;IACZC,UAAAA,EAAY;AAAC,QAAA;YAAEC,EAAAA,EAAI,aAAA;YAAeC,KAAAA,EAAO,oBAAA;YAAsBC,MAAAA,EAAQ,OAAA;YAASC,IAAAA,EAAM,6BAAA;YAA+B3B,WAAAA,EAAa,sKAAA;YAAwK4B,OAAAA,EAAS;AAAC,gBAAA,SAAA;AAAW,gBAAA,UAAA;AAAY,gBAAA,WAAA;AAAa,gBAAA,MAAA;AAAQ,gBAAA;AAAO,aAAA;YAAEC,YAAAA,EAAc,QAAA;YAAUC,QAAAA,EAAU;gBAAEC,IAAAA,EAAM;AAAC,oBAAA,WAAA;AAAa,oBAAA,YAAA;AAAc,oBAAA,WAAA;AAAa,oBAAA;AAAY,iBAAA;gBAAEC,OAAAA,EAAS;AAAC,oBAAA,WAAA;AAAa,oBAAA;AAAS,iBAAA;gBAAEC,GAAAA,EAAK;AAAC,oBAAA,WAAA;AAAa,oBAAA;AAAc;AAAC;AAAE;AAAE,KAAA;IAClhBC,SAAAA,EAAW;QACPC,MAAAA,EAAQ,UAAA;AACRnC,QAAAA,WAAAA;QACAoC,SAAAA,EAAW,yBAAA;AACXC,QAAAA,SAAAA,EAAWC,4CAA0BxB,GAAG,CAAC,CAAC,EAAEZ,IAAI,EAAEuB,KAAK,EAAEzB,aAAauC,iBAAiB,EAAExB,QAAQ,EAAEyB,MAAM,EAAEC,KAAK,EAAE,IAAM;AACpHvC,gBAAAA,IAAAA;AAAMuB,gBAAAA,KAAAA;gBAAOzB,WAAAA,EAAauC,iBAAAA;AAAmBxB,gBAAAA,QAAAA;gBAAU,GAAIyB,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 bookingsScreenSet = require('./bookingsScreenSet.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 bookingsModule = 'bookings';
|
|
9
|
+
/**
|
|
10
|
+
* The application structure the screen set implies: one module, `bookings`, a feature for each screen and the sub-features beneath it (`bookings.record` is the
|
|
11
|
+
* `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.
|
|
12
|
+
*/ const bookingsStructure = (()=>{
|
|
13
|
+
const root = {
|
|
14
|
+
id: bookingsModule,
|
|
15
|
+
name: 'Bookings',
|
|
16
|
+
features: []};
|
|
17
|
+
for (const screen of bookingsScreenSet.bookingsScreenDefinitions){
|
|
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 places a team goes: Calendar, Bookings, Resources, New booking.
|
|
46
|
+
*/ const bookingsNavigation = {
|
|
47
|
+
application: {
|
|
48
|
+
logo: {
|
|
49
|
+
image: '',
|
|
50
|
+
title: 'Bookings'
|
|
51
|
+
},
|
|
52
|
+
regions: [
|
|
53
|
+
{
|
|
54
|
+
region: scene_model.NavigationRegionKind.Topbar,
|
|
55
|
+
items: [
|
|
56
|
+
{
|
|
57
|
+
id: 'bookings',
|
|
58
|
+
title: 'Bookings',
|
|
59
|
+
target: {
|
|
60
|
+
module: bookingsModule
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
]
|
|
66
|
+
},
|
|
67
|
+
modules: [
|
|
68
|
+
{
|
|
69
|
+
module: bookingsModule,
|
|
70
|
+
regions: [
|
|
71
|
+
{
|
|
72
|
+
region: scene_model.NavigationRegionKind.Sidebar,
|
|
73
|
+
mode: scene_model.NavigationRegionMode.Override,
|
|
74
|
+
items: [
|
|
75
|
+
{
|
|
76
|
+
id: 'calendar',
|
|
77
|
+
title: 'Calendar',
|
|
78
|
+
target: {
|
|
79
|
+
module: bookingsModule,
|
|
80
|
+
feature: 'calendar'
|
|
81
|
+
}
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
id: 'list',
|
|
85
|
+
title: 'Bookings',
|
|
86
|
+
target: {
|
|
87
|
+
module: bookingsModule,
|
|
88
|
+
feature: 'list'
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
id: 'resources',
|
|
93
|
+
title: 'Resources',
|
|
94
|
+
target: {
|
|
95
|
+
module: bookingsModule,
|
|
96
|
+
feature: 'resources'
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
id: 'new',
|
|
101
|
+
title: 'New booking',
|
|
102
|
+
target: {
|
|
103
|
+
module: bookingsModule,
|
|
104
|
+
feature: 'new'
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
]
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
]
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
exports.bookingsModule = bookingsModule;
|
|
115
|
+
exports.bookingsNavigation = bookingsNavigation;
|
|
116
|
+
exports.bookingsStructure = bookingsStructure;
|
|
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 { bookingsScreenDefinitions } from './bookingsScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const bookingsModule = 'bookings';\n\n/**\n * The application structure the screen set implies: one module, `bookings`, a feature for each screen and the sub-features beneath it (`bookings.record` is the\n * `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.\n */\nexport const bookingsStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: bookingsModule, name: 'Bookings', features: [], slices: [] };\n for (const screen of bookingsScreenDefinitions) {\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 places a team goes: Calendar, Bookings, Resources, New booking.\n */\nexport const bookingsNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Bookings' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'bookings', title: 'Bookings', target: { module: bookingsModule } }] }],\n },\n modules: [{\n module: bookingsModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'calendar', title: 'Calendar', target: { module: bookingsModule, feature: 'calendar' } },\n { id: 'list', title: 'Bookings', target: { module: bookingsModule, feature: 'list' } },\n { id: 'resources', title: 'Resources', target: { module: bookingsModule, feature: 'resources' } },\n { id: 'new', title: 'New booking', target: { module: bookingsModule, feature: 'new' } },\n ],\n }],\n }],\n};\n"],"names":["bookingsModule","bookingsStructure","root","id","name","features","screen","bookingsScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","bookingsNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature"],"mappings":";;;;;AAAA;AACA;AAKA,8GACO,MAAM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ights 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 bookingsBlueprintName = 'Cratis.Blueprint.Bookings';
|
|
6
|
+
|
|
7
|
+
exports.bookingsBlueprintName = bookingsBlueprintName;
|
|
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 bookingsBlueprintName = 'Cratis.Blueprint.Bookings';\n"],"names":["bookingsBlueprintName"],"mappings":";;AAAA;AACA;AAEA,iHACO,MAAMA,qBAAAA,GAAwB;;"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
4
|
+
var bookingsScreenSet = require('../bookingsScreenSet.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 (`bookingsNavigation`).
|
|
11
|
+
*/ const bookingsScreens = bookingsScreenSet.bookingsScreenDefinitions.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.bookingsScreens = bookingsScreens;
|
|
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 { bookingsScreenDefinitions } from '../bookingsScreenSet';\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 (`bookingsNavigation`).\n */\nexport const bookingsScreens: Screen[] = bookingsScreenDefinitions.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":["bookingsScreens","bookingsScreenDefinitions","map","definition","name","layout","LayoutName","AppShell","screenTemplate","template","slotContent","forms","contributions","path","split"],"mappings":";;;;;AAAA;AACA;AAMA;;;UAIaA,eAAAA,GAA4BC,2CAAAA,CAA0BC,GAAG,CAACC,CAAAA,cAAe;AAClFC,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 bookingsTemplateProvenance = {
|
|
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.bookings'
|
|
18
|
+
},
|
|
19
|
+
license: 'MIT',
|
|
20
|
+
licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE'
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
exports.bookingsTemplateProvenance = bookingsTemplateProvenance;
|
|
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 bookingsTemplateProvenance: 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.bookings' },\n license: 'MIT',\n licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',\n};\n"],"names":["bookingsTemplateProvenance","compatibility","scene","packages","name","versionRange","attribution","author","url","license","licenseUrl"],"mappings":";;AAAA;AACA;AAIA,wGACO,MAAMA,0BAAAA,GAAiH;IAC1HC,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;AAAiF,KAAA;IACvHC,OAAAA,EAAS,KAAA;IACTC,UAAAA,EAAY;AAChB;;"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var scene_model = require('@cratis/scene.model');
|
|
4
|
+
var scene_blueprint_default = require('@cratis/scene.blueprint.default');
|
|
5
|
+
var bookingsQueries = require('../bookingsQueries.js');
|
|
6
|
+
var bookingsParts = require('../bookingsParts.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 calendar: the foundation's `calendarGrid` on a month, a week or as an agenda. The status is told in words as well as by color, the day and view are kept in the
|
|
12
|
+
* address so a link shares the calendar as it is, and the list beside it names everything in the period.
|
|
13
|
+
*/ function calendarOf(options) {
|
|
14
|
+
const id = options.name;
|
|
15
|
+
return {
|
|
16
|
+
name: options.name,
|
|
17
|
+
fitsSlot: 'content',
|
|
18
|
+
slots: [
|
|
19
|
+
{
|
|
20
|
+
name: 'header'
|
|
21
|
+
},
|
|
22
|
+
{
|
|
23
|
+
name: 'calendar'
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
name: 'due'
|
|
27
|
+
}
|
|
28
|
+
],
|
|
29
|
+
arrangement: {
|
|
30
|
+
root: scene_blueprint_default.column([
|
|
31
|
+
scene_blueprint_default.slotLeaf('header'),
|
|
32
|
+
scene_blueprint_default.grid([
|
|
33
|
+
scene_blueprint_default.slotLeaf('calendar', {
|
|
34
|
+
span: 2
|
|
35
|
+
}),
|
|
36
|
+
scene_blueprint_default.slotLeaf('due')
|
|
37
|
+
], 3, 16)
|
|
38
|
+
], 16),
|
|
39
|
+
overrides: [
|
|
40
|
+
{
|
|
41
|
+
width: scene_model.WidthSizeClass.Compact,
|
|
42
|
+
root: scene_blueprint_default.column([
|
|
43
|
+
scene_blueprint_default.slotLeaf('header'),
|
|
44
|
+
scene_blueprint_default.slotLeaf('calendar'),
|
|
45
|
+
scene_blueprint_default.slotLeaf('due')
|
|
46
|
+
], 16)
|
|
47
|
+
}
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
content: {
|
|
51
|
+
header: [
|
|
52
|
+
scene_blueprint_default.component(`${id}-header`, 'pageHeader', {
|
|
53
|
+
title: options.title,
|
|
54
|
+
subtitle: options.subtitle
|
|
55
|
+
}, {
|
|
56
|
+
actions: options.actions.map((action)=>bookingsParts.withBehaviors(bookingsParts.actionButton(`${id}-${action.id}`, action.label, action.emphasis), action.dialog ? bookingsParts.opensDialog(action.dialog) : bookingsParts.goesTo(action.screen)))
|
|
57
|
+
})
|
|
58
|
+
],
|
|
59
|
+
calendar: [
|
|
60
|
+
scene_blueprint_default.component(`${id}-grid`, 'calendarGrid', {
|
|
61
|
+
label: options.label,
|
|
62
|
+
events: bookingsQueries.fromQuery(options.events),
|
|
63
|
+
date: bookingsQueries.fromQuery(bookingsQueries.BookingsQuery.Settings, '0.today'),
|
|
64
|
+
urlKey: 'day',
|
|
65
|
+
...bookingsQueries.localeOfData
|
|
66
|
+
})
|
|
67
|
+
],
|
|
68
|
+
due: [
|
|
69
|
+
scene_blueprint_default.component(`${id}-list`, 'dataList', {
|
|
70
|
+
label: options.listLabel,
|
|
71
|
+
rows: bookingsQueries.fromQuery(options.events),
|
|
72
|
+
columns: bookingsQueries.fromQuery(options.columns),
|
|
73
|
+
titleField: options.titleField,
|
|
74
|
+
pageSize: 6,
|
|
75
|
+
...bookingsQueries.localeOfData
|
|
76
|
+
})
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
displayName: options.displayName,
|
|
80
|
+
description: options.description,
|
|
81
|
+
metadata: bookingsParts.bookingsMetadata(options.name, 'Calendar', [
|
|
82
|
+
scene_model.TemplateScope.Module,
|
|
83
|
+
scene_model.TemplateScope.Feature
|
|
84
|
+
])
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/** The bookings calendar: each booking on its day on a month, a week or an agenda; the status is told in words as well as by color, and the list beside it names every booking in the period. */ const bookingsCalendarTemplate = calendarOf({
|
|
88
|
+
name: 'BookingsCalendar',
|
|
89
|
+
displayName: 'Bookings calendar',
|
|
90
|
+
description: 'Every booking on the day it falls, on a month, a week or as an agenda, with the status told in words.',
|
|
91
|
+
title: 'Calendar',
|
|
92
|
+
subtitle: 'Who has what, and when',
|
|
93
|
+
label: 'Bookings',
|
|
94
|
+
listLabel: 'Bookings in this period',
|
|
95
|
+
events: bookingsQueries.BookingsQuery.BookingEvents,
|
|
96
|
+
columns: bookingsQueries.BookingsQuery.BookingEventColumns,
|
|
97
|
+
titleField: 'title',
|
|
98
|
+
actions: [
|
|
99
|
+
{
|
|
100
|
+
id: 'book',
|
|
101
|
+
label: 'Book a resource',
|
|
102
|
+
emphasis: 'primary',
|
|
103
|
+
screen: 'bookings.new'
|
|
104
|
+
}
|
|
105
|
+
]
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
exports.bookingsCalendarTemplate = bookingsCalendarTemplate;
|
|
109
|
+
//# sourceMappingURL=calendarTemplate.js.map
|