@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.
Files changed (133) hide show
  1. package/README.md +66 -2
  2. package/blueprint.ts +16 -0
  3. package/blueprintCatalog.json +123 -0
  4. package/bookingsApplication.ts +28 -0
  5. package/bookingsParts.ts +58 -0
  6. package/bookingsQueries.ts +60 -0
  7. package/bookingsScreenSet.ts +22 -0
  8. package/dist/cjs/blueprint.js +19 -0
  9. package/dist/cjs/blueprint.js.map +1 -0
  10. package/dist/cjs/bookingsApplication.js +49 -0
  11. package/dist/cjs/bookingsApplication.js.map +1 -0
  12. package/dist/cjs/bookingsParts.js +151 -0
  13. package/dist/cjs/bookingsParts.js.map +1 -0
  14. package/dist/cjs/bookingsQueries.js +68 -0
  15. package/dist/cjs/bookingsQueries.js.map +1 -0
  16. package/dist/cjs/bookingsScreenSet.js +47 -0
  17. package/dist/cjs/bookingsScreenSet.js.map +1 -0
  18. package/dist/cjs/index.js +69 -0
  19. package/dist/cjs/index.js.map +1 -0
  20. package/dist/cjs/manifest.js +90 -0
  21. package/dist/cjs/manifest.js.map +1 -0
  22. package/dist/cjs/navigation.js +117 -0
  23. package/dist/cjs/navigation.js.map +1 -0
  24. package/dist/cjs/package.json +3 -0
  25. package/dist/cjs/packageName.js +8 -0
  26. package/dist/cjs/packageName.js.map +1 -0
  27. package/dist/cjs/screens/index.js +22 -0
  28. package/dist/cjs/screens/index.js.map +1 -0
  29. package/dist/cjs/templateProvenance.js +24 -0
  30. package/dist/cjs/templateProvenance.js.map +1 -0
  31. package/dist/cjs/templates/calendarTemplate.js +109 -0
  32. package/dist/cjs/templates/calendarTemplate.js.map +1 -0
  33. package/dist/cjs/templates/formTemplates.js +50 -0
  34. package/dist/cjs/templates/formTemplates.js.map +1 -0
  35. package/dist/cjs/templates/index.js +27 -0
  36. package/dist/cjs/templates/index.js.map +1 -0
  37. package/dist/cjs/templates/listTemplates.js +167 -0
  38. package/dist/cjs/templates/listTemplates.js.map +1 -0
  39. package/dist/cjs/templates/recordTemplates.js +129 -0
  40. package/dist/cjs/templates/recordTemplates.js.map +1 -0
  41. package/dist/cjs/templates/wizardTemplate.js +73 -0
  42. package/dist/cjs/templates/wizardTemplate.js.map +1 -0
  43. package/dist/esm/blueprint.d.ts +3 -0
  44. package/dist/esm/blueprint.d.ts.map +1 -0
  45. package/dist/esm/blueprint.js +17 -0
  46. package/dist/esm/blueprint.js.map +1 -0
  47. package/dist/esm/bookingsApplication.d.ts +10 -0
  48. package/dist/esm/bookingsApplication.d.ts.map +1 -0
  49. package/dist/esm/bookingsApplication.js +44 -0
  50. package/dist/esm/bookingsApplication.js.map +1 -0
  51. package/dist/esm/bookingsParts.d.ts +16 -0
  52. package/dist/esm/bookingsParts.d.ts.map +1 -0
  53. package/dist/esm/bookingsParts.js +133 -0
  54. package/dist/esm/bookingsParts.js.map +1 -0
  55. package/dist/esm/bookingsQueries.d.ts +41 -0
  56. package/dist/esm/bookingsQueries.d.ts.map +1 -0
  57. package/dist/esm/bookingsQueries.js +60 -0
  58. package/dist/esm/bookingsQueries.js.map +1 -0
  59. package/dist/esm/bookingsScreenSet.d.ts +7 -0
  60. package/dist/esm/bookingsScreenSet.d.ts.map +1 -0
  61. package/dist/esm/bookingsScreenSet.js +45 -0
  62. package/dist/esm/bookingsScreenSet.js.map +1 -0
  63. package/dist/esm/index.d.ts +12 -0
  64. package/dist/esm/index.d.ts.map +1 -0
  65. package/dist/esm/index.js +18 -0
  66. package/dist/esm/index.js.map +1 -0
  67. package/dist/esm/manifest.d.ts +3 -0
  68. package/dist/esm/manifest.d.ts.map +1 -0
  69. package/dist/esm/manifest.js +88 -0
  70. package/dist/esm/manifest.js.map +1 -0
  71. package/dist/esm/navigation.d.ts +5 -0
  72. package/dist/esm/navigation.d.ts.map +1 -0
  73. package/dist/esm/navigation.js +113 -0
  74. package/dist/esm/navigation.js.map +1 -0
  75. package/dist/esm/package.json +3 -0
  76. package/dist/esm/packageName.d.ts +2 -0
  77. package/dist/esm/packageName.d.ts.map +1 -0
  78. package/dist/esm/packageName.js +6 -0
  79. package/dist/esm/packageName.js.map +1 -0
  80. package/dist/esm/screens/index.d.ts +3 -0
  81. package/dist/esm/screens/index.d.ts.map +1 -0
  82. package/dist/esm/screens/index.js +20 -0
  83. package/dist/esm/screens/index.js.map +1 -0
  84. package/dist/esm/templateProvenance.d.ts +3 -0
  85. package/dist/esm/templateProvenance.d.ts.map +1 -0
  86. package/dist/esm/templateProvenance.js +22 -0
  87. package/dist/esm/templateProvenance.js.map +1 -0
  88. package/dist/esm/templates/calendarTemplate.d.ts +3 -0
  89. package/dist/esm/templates/calendarTemplate.d.ts.map +1 -0
  90. package/dist/esm/templates/calendarTemplate.js +107 -0
  91. package/dist/esm/templates/calendarTemplate.js.map +1 -0
  92. package/dist/esm/templates/formTemplates.d.ts +3 -0
  93. package/dist/esm/templates/formTemplates.d.ts.map +1 -0
  94. package/dist/esm/templates/formTemplates.js +48 -0
  95. package/dist/esm/templates/formTemplates.js.map +1 -0
  96. package/dist/esm/templates/index.d.ts +8 -0
  97. package/dist/esm/templates/index.d.ts.map +1 -0
  98. package/dist/esm/templates/index.js +18 -0
  99. package/dist/esm/templates/index.js.map +1 -0
  100. package/dist/esm/templates/listTemplates.d.ts +4 -0
  101. package/dist/esm/templates/listTemplates.d.ts.map +1 -0
  102. package/dist/esm/templates/listTemplates.js +164 -0
  103. package/dist/esm/templates/listTemplates.js.map +1 -0
  104. package/dist/esm/templates/recordTemplates.d.ts +3 -0
  105. package/dist/esm/templates/recordTemplates.d.ts.map +1 -0
  106. package/dist/esm/templates/recordTemplates.js +127 -0
  107. package/dist/esm/templates/recordTemplates.js.map +1 -0
  108. package/dist/esm/templates/wizardTemplate.d.ts +3 -0
  109. package/dist/esm/templates/wizardTemplate.d.ts.map +1 -0
  110. package/dist/esm/templates/wizardTemplate.js +71 -0
  111. package/dist/esm/templates/wizardTemplate.js.map +1 -0
  112. package/dist/esm/tsconfig.tsbuildinfo +1 -0
  113. package/index.ts +14 -0
  114. package/manifest.ts +41 -0
  115. package/navigation.ts +54 -0
  116. package/package.json +78 -4
  117. package/packageName.ts +5 -0
  118. package/sampleData/bookings-en.json +1057 -0
  119. package/screens/index.ts +20 -0
  120. package/templateProvenance.ts +15 -0
  121. package/templates/calendarTemplate.ts +57 -0
  122. package/templates/formTemplates.ts +33 -0
  123. package/templates/index.ts +18 -0
  124. package/templates/listTemplates.ts +106 -0
  125. package/templates/recordTemplates.ts +78 -0
  126. package/templates/wizardTemplate.ts +29 -0
  127. package/thumbnails/BookingPage.svg +17 -0
  128. package/thumbnails/BookingsCalendar.svg +34 -0
  129. package/thumbnails/BookingsList.svg +29 -0
  130. package/thumbnails/BookingsQuickCreateBooking.svg +12 -0
  131. package/thumbnails/NewBookingWizard.svg +15 -0
  132. package/thumbnails/ResourcesList.svg +29 -0
  133. package/thumbnails/bookings.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 './bookingsQueries';
7
+ export * from './bookingsParts';
8
+ export * from './bookingsScreenSet';
9
+ export * from './templates';
10
+ export * from './screens';
11
+ export * from './navigation';
12
+ export * from './manifest';
13
+ export * from './blueprint';
14
+ export * from './bookingsApplication';
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 { bookingsBlueprintName } from './packageName';
6
+ import { bookingsScreenDefinitions } from './bookingsScreenSet';
7
+ import { bookingsDialogTemplates, bookingsScreenTemplates } from './templates';
8
+
9
+ 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.';
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 bookingsBlueprintManifest: ScenePackage = {
17
+ name: bookingsBlueprintName,
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: bookingsScreenTemplates.map(template => template.name),
24
+ dialogTemplates: bookingsDialogTemplates.map(template => template.name),
25
+ themes: [],
26
+ displayName: 'Bookings',
27
+ description,
28
+ module: '@cratis/scene.blueprint.bookings',
29
+ license: 'MIT',
30
+ licenseUrl: 'https://github.com/Cratis/Scene/blob/main/LICENSE',
31
+ 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'] } }],
32
+ blueprint: {
33
+ domain: 'bookings',
34
+ description,
35
+ thumbnail: 'thumbnails/bookings.svg',
36
+ screenSet: bookingsScreenDefinitions.map(({ name, title, description: screenDescription, template, parent, order }) => ({
37
+ name, title, description: screenDescription, template, ...(parent === undefined ? {} : { parent }), ...(order === undefined ? {} : { order }),
38
+ })),
39
+ defaultSampleData: 'bookings-en',
40
+ },
41
+ };
package/navigation.ts ADDED
@@ -0,0 +1,54 @@
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 { bookingsScreenDefinitions } from './bookingsScreenSet';
6
+
7
+ /** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */
8
+ export const bookingsModule = 'bookings';
9
+
10
+ /**
11
+ * 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
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 bookingsStructure: ApplicationStructure = (() => {
15
+ interface Node { id: string; name: string; features: Node[]; slices: never[] }
16
+ const root: Node = { id: bookingsModule, name: 'Bookings', features: [], slices: [] };
17
+ for (const screen of 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 = { 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: Calendar, Bookings, Resources, New booking.
35
+ */
36
+ export const bookingsNavigation: NavigationModel = {
37
+ application: {
38
+ logo: { image: '', title: 'Bookings' },
39
+ regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'bookings', title: 'Bookings', target: { module: bookingsModule } }] }],
40
+ },
41
+ modules: [{
42
+ module: bookingsModule,
43
+ regions: [{
44
+ region: NavigationRegionKind.Sidebar,
45
+ mode: NavigationRegionMode.Override,
46
+ items: [
47
+ { id: 'calendar', title: 'Calendar', target: { module: bookingsModule, feature: 'calendar' } },
48
+ { id: 'list', title: 'Bookings', target: { module: bookingsModule, feature: 'list' } },
49
+ { id: 'resources', title: 'Resources', target: { module: bookingsModule, feature: 'resources' } },
50
+ { id: 'new', title: 'New booking', target: { module: bookingsModule, feature: 'new' } },
51
+ ],
52
+ }],
53
+ }],
54
+ };
package/package.json CHANGED
@@ -1,6 +1,80 @@
1
1
  {
2
- "name": "@cratis/scene.blueprint.bookings",
3
- "version": "0.0.0-stage",
4
- "stub": true,
5
- "description": "Temporary package placeholder for staged publishing"
2
+ "name": "@cratis/scene.blueprint.bookings",
3
+ "version": "4.71.0",
4
+ "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.",
5
+ "keywords": [
6
+ "cratis",
7
+ "scene",
8
+ "react",
9
+ "ui",
10
+ "blueprint",
11
+ "bookings"
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 bookingsBlueprintName = 'Cratis.Blueprint.Bookings';