@cratis/scene.blueprint.administration 4.88.0 → 5.1.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 CHANGED
@@ -1,10 +1,10 @@
1
1
  # Cratis Scene
2
2
 
3
- Cratis Scene is an experimental UI model and runtime for developers building platform-independent,
3
+ Cratis Scene is a UI model and runtime for developers building platform-independent,
4
4
  Screenplay-based user interfaces.
5
5
 
6
6
  **Describing a user interface without describing a platform** — Scene is the UI model of the Cratis
7
- model-first layer (experimental).
7
+ model-first layer.
8
8
 
9
9
  The object model and runtime for Screenplay-based UIs: `Scene.Model` (platform-agnostic screens, layouts,
10
10
  forms, contribution points, ui profiles and themes), `Scene.Engine` (binding/resolution runtime), and
@@ -30,7 +30,7 @@ Scene owns the *object model and runtime* half of the Screenplay stack. In the m
30
30
  application's user interface is described — independently of any rendering platform.
31
31
 
32
32
  `Scene.Model` is the platform-agnostic
33
- C# object model that [Stage](https://github.com/Cratis/Stage) translates Screenplay's parsed language constructs into, and that [Studio](https://github.com/Cratis/Studio)'s
33
+ C# object model that [Stage](https://github.com/Cratis/Stage) translates Screenplay's parsed language constructs into, and that Studio's
34
34
  design-time tooling reads and writes. `Scene.Engine` walks that graph, resolves bindings (data, action, form,
35
35
  navigation contribution) and drives whichever renderer is plugged in — it does not know React exists.
36
36
  `Scene.React` is one renderer implementing the abstract vocabulary against real React/DOM; sibling positions
@@ -52,18 +52,18 @@ Cratis is an open community, and we are glad to help users, teams evaluating the
52
52
 
53
53
  ## The Cratis ecosystem
54
54
 
55
- This project is part of [Cratis](https://www.cratis.io) — free, MIT-licensed tools for building event-sourced and CQRS applications.
55
+ This project is part of [Cratis](https://www.cratis.io) — tools for building event-sourced and CQRS applications.
56
56
 
57
57
  - **[Chronicle](https://github.com/Cratis/Chronicle)** — event-sourcing database and runtime. Orleans-based kernel, pluggable storage (MongoDB default; PostgreSQL, SQL Server, SQLite, in-memory), language-agnostic gRPC contracts. [Docs](https://www.cratis.io/chronicle/)
58
- - **Chronicle clients** — first-class [.NET SDK](https://github.com/Cratis/Chronicle), plus [TypeScript](https://github.com/Cratis/Chronicle.TypeScript), [Kotlin/Java](https://github.com/Cratis/Chronicle.Kotlin), and [Elixir](https://github.com/Cratis/Chronicle.Elixir); [Python](https://github.com/Cratis/Chronicle.Python) coming soon (pre-alpha). AI agents connect through the [Chronicle MCP server](https://github.com/Cratis/Chronicle.Mcp).
58
+ - **Chronicle clients** — first-class [.NET SDK](https://github.com/Cratis/Chronicle), plus [TypeScript](https://github.com/Cratis/Chronicle.TypeScript), [Kotlin/Java](https://github.com/Cratis/Chronicle.Kotlin), and [Elixir](https://github.com/Cratis/Chronicle.Elixir); [Python](https://github.com/Cratis/Chronicle.Python) coming soon. AI agents connect through the [Chronicle MCP server](https://github.com/Cratis/Chronicle.Mcp).
59
59
  - **[Arc](https://github.com/Cratis/Arc)** — opinionated CQRS framework for ASP.NET Core with commands, queries, validation, authorization, and TypeScript proxy generation. Works without event sourcing. [Docs](https://www.cratis.io/arc/)
60
60
  - **[Components](https://github.com/Cratis/Components)** — React components aligned with Arc patterns. [Docs](https://www.cratis.io/components/)
61
61
  - **[CLI](https://github.com/Cratis/cli) + Workbench** — inspect and diagnose Chronicle from the terminal or the browser. [Docs](https://www.cratis.io/cli/)
62
- - **Model-first layer (experimental)** — [Studio](https://github.com/Cratis/Studio), [Screenplay](https://github.com/Cratis/Screenplay), [Stage](https://github.com/Cratis/Stage), Scene (this repository), [Prologue](https://github.com/Cratis/Prologue)
63
- - **Supporting** — [Fundamentals](https://github.com/Cratis/Fundamentals), [Specifications](https://github.com/Cratis/Specifications), [Synopsis](https://github.com/Cratis/Synopsis), [Lens](https://github.com/Cratis/Lens), [Narrator](https://github.com/Cratis/Narrator), and free [AI tooling](https://github.com/Cratis/AI) (preview); [Ensemble](https://github.com/Cratis/Ensemble) coming soon (pre-release)
62
+ - **Model-first layer** — Studio, [Screenplay](https://github.com/Cratis/Screenplay), [Stage](https://github.com/Cratis/Stage), Scene (this repository), [Prologue](https://github.com/Cratis/Prologue)
63
+ - **Supporting** — [Fundamentals](https://github.com/Cratis/Fundamentals), [Specifications](https://github.com/Cratis/Specifications), [Synopsis](https://github.com/Cratis/Synopsis), [Lens](https://github.com/Cratis/Lens), [Narrator](https://github.com/Cratis/Narrator), and free [AI tooling](https://github.com/Cratis/AI); [Ensemble](https://github.com/Cratis/Ensemble) coming soon
64
64
  - **[Samples](https://github.com/Cratis/Samples)** — runnable event sourcing and CQRS samples for the whole stack
65
65
 
66
- Everything Cratis publishes today is MIT licensed and free to use.
66
+ Scene is MIT licensed and free to use.
67
67
 
68
68
  ---
69
69
 
@@ -61,7 +61,34 @@
61
61
  "description": "Users with name, email, role, status and last active, filtered by role, status and last active; an invite action.",
62
62
  "type": "List",
63
63
  "category": "Business / Administration",
64
- "thumbnail": "thumbnails/AdministrationUserList.svg"
64
+ "thumbnail": "thumbnails/AdministrationUserList.svg",
65
+ "outlets": [
66
+ {
67
+ "name": "toolbar",
68
+ "kind": "actions",
69
+ "defaults": 2
70
+ },
71
+ {
72
+ "name": "filters",
73
+ "kind": "filters",
74
+ "defaults": 1
75
+ },
76
+ {
77
+ "name": "stats",
78
+ "kind": "stats",
79
+ "defaults": 0
80
+ },
81
+ {
82
+ "name": "rowActions",
83
+ "kind": "actions",
84
+ "defaults": 0
85
+ },
86
+ {
87
+ "name": "emptyActions",
88
+ "kind": "actions",
89
+ "defaults": 0
90
+ }
91
+ ]
65
92
  },
66
93
  {
67
94
  "name": "AdministrationUserPage",
@@ -70,7 +97,19 @@
70
97
  "description": "One user: profile, role assignments and sessions.",
71
98
  "type": "Detail",
72
99
  "category": "Business / Administration",
73
- "thumbnail": "thumbnails/AdministrationUserPage.svg"
100
+ "thumbnail": "thumbnails/AdministrationUserPage.svg",
101
+ "outlets": [
102
+ {
103
+ "name": "toolbar",
104
+ "kind": "actions",
105
+ "defaults": 0
106
+ },
107
+ {
108
+ "name": "recordTabs",
109
+ "kind": "tabs",
110
+ "defaults": 1
111
+ }
112
+ ]
74
113
  },
75
114
  {
76
115
  "name": "AdministrationRoles",
@@ -79,7 +118,19 @@
79
118
  "description": "The roles on the left and the permission matrix of the chosen role on the right.",
80
119
  "type": "Workspace",
81
120
  "category": "Business / Administration",
82
- "thumbnail": "thumbnails/AdministrationRoles.svg"
121
+ "thumbnail": "thumbnails/AdministrationRoles.svg",
122
+ "outlets": [
123
+ {
124
+ "name": "rowActions",
125
+ "kind": "actions",
126
+ "defaults": 0
127
+ },
128
+ {
129
+ "name": "detailTabs",
130
+ "kind": "tabs",
131
+ "defaults": 1
132
+ }
133
+ ]
83
134
  },
84
135
  {
85
136
  "name": "AdministrationSettings",
@@ -97,7 +148,34 @@
97
148
  "description": "Time, actor, action and target of every change, filtered by actor, action and date range; exportable.",
98
149
  "type": "List",
99
150
  "category": "Business / Administration",
100
- "thumbnail": "thumbnails/AdministrationAuditLog.svg"
151
+ "thumbnail": "thumbnails/AdministrationAuditLog.svg",
152
+ "outlets": [
153
+ {
154
+ "name": "toolbar",
155
+ "kind": "actions",
156
+ "defaults": 2
157
+ },
158
+ {
159
+ "name": "filters",
160
+ "kind": "filters",
161
+ "defaults": 1
162
+ },
163
+ {
164
+ "name": "stats",
165
+ "kind": "stats",
166
+ "defaults": 0
167
+ },
168
+ {
169
+ "name": "rowActions",
170
+ "kind": "actions",
171
+ "defaults": 0
172
+ },
173
+ {
174
+ "name": "emptyActions",
175
+ "kind": "actions",
176
+ "defaults": 0
177
+ }
178
+ ]
101
179
  },
102
180
  {
103
181
  "name": "AdministrationInviteUser",
@@ -49,11 +49,13 @@ var administrationScreenSet = require('./administrationScreenSet.js');
49
49
  image: '',
50
50
  title: 'Administration'
51
51
  },
52
- regions: [
52
+ outlets: [
53
53
  {
54
- region: scene_model.NavigationRegionKind.Topbar,
55
- items: [
54
+ name: scene_model.NavigationRegionKind.Topbar,
55
+ kind: scene_model.OutletKind.Navigation,
56
+ defaults: [
56
57
  {
58
+ kind: scene_model.OutletItemKind.Navigation,
57
59
  id: 'admin',
58
60
  title: 'Administration',
59
61
  target: {
@@ -67,12 +69,13 @@ var administrationScreenSet = require('./administrationScreenSet.js');
67
69
  modules: [
68
70
  {
69
71
  module: administrationModule,
70
- regions: [
72
+ refinements: [
71
73
  {
72
- region: scene_model.NavigationRegionKind.Sidebar,
73
- mode: scene_model.NavigationRegionMode.Override,
74
+ outlet: scene_model.NavigationRegionKind.Sidebar,
75
+ mode: scene_model.OutletMode.Overrides,
74
76
  items: [
75
77
  {
78
+ kind: scene_model.OutletItemKind.Navigation,
76
79
  id: 'users',
77
80
  title: 'Users',
78
81
  target: {
@@ -81,6 +84,7 @@ var administrationScreenSet = require('./administrationScreenSet.js');
81
84
  }
82
85
  },
83
86
  {
87
+ kind: scene_model.OutletItemKind.Navigation,
84
88
  id: 'roles',
85
89
  title: 'Roles',
86
90
  target: {
@@ -89,6 +93,7 @@ var administrationScreenSet = require('./administrationScreenSet.js');
89
93
  }
90
94
  },
91
95
  {
96
+ kind: scene_model.OutletItemKind.Navigation,
92
97
  id: 'settings',
93
98
  title: 'Settings',
94
99
  target: {
@@ -97,6 +102,7 @@ var administrationScreenSet = require('./administrationScreenSet.js');
97
102
  }
98
103
  },
99
104
  {
105
+ kind: scene_model.OutletItemKind.Navigation,
100
106
  id: 'audit',
101
107
  title: 'Audit log',
102
108
  target: {
@@ -1 +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 { administrationScreenDefinitions } from './administrationScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const administrationModule = 'admin';\n\n/**\n * The application structure the screen set implies: one module, `admin`, a feature for each screen and the sub-features beneath it (`admin.users.record` is the\n * `record` feature of `users`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const administrationStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: administrationModule, name: 'Administration', features: [], slices: [] };\n for (const screen of administrationScreenDefinitions) {\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 four places an administrator goes: Users, Roles, Settings and Audit log.\n */\nexport const administrationNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Administration' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'admin', title: 'Administration', target: { module: administrationModule } }] }],\n },\n modules: [{\n module: administrationModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'users', title: 'Users', target: { module: administrationModule, feature: 'users' } },\n { id: 'roles', title: 'Roles', target: { module: administrationModule, feature: 'roles' } },\n { id: 'settings', title: 'Settings', target: { module: administrationModule, feature: 'settings' } },\n { id: 'audit', title: 'Audit log', target: { module: administrationModule, feature: 'audit' } },\n ],\n }],\n }],\n};\n"],"names":["administrationModule","administrationStructure","root","id","name","features","screen","administrationScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","administrationNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature"],"mappings":";;;;;AAAA;AACA;AAKA,8GACO,MAAMA,oBAAAA,GAAuB;AAEpC;;;AAGC,IACM,MAAMC,uBAAAA,GAAiD,CAAA,IAAA;AAE1D,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,oBAAAA;QAAsBI,IAAAA,EA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AAA,EAAQ;4BAAEC,MAAAA,EAAQ5B;AAAqB;AAAE;AAAE;AAAC;AAAE;AACnJ,KAAA;IACAiB,OAAAA,EAAS;AAAC,QAAA;YACNW,MAAAA,EAAQ5B,oBAAAA;YACRsB,OAAAA,EAAS;AAAC,gBAAA;AACNC,oBAAAA,MAAAA,EAAQC,iCAAqBK,OAAO;AACpCC,oBAAAA,IAAAA,EAAMC,iCAAqBC,QAAQ;oBACnCN,KAAAA,EAAO;AACH,wBAAA;4BAAEvB,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,OAAA;4BAASa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,oBAAAA;gCAAsBiC,OAAAA,EAAS;AAAQ;AAAE,yBAAA;AAC1F,wBAAA;4BAAE9B,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,OAAA;4BAASa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,oBAAAA;gCAAsBiC,OAAAA,EAAS;AAAQ;AAAE,yBAAA;AAC1F,wBAAA;4BAAE9B,EAAAA,EAAI,UAAA;4BAAYW,KAAAA,EAAO,UAAA;4BAAYa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,oBAAAA;gCAAsBiC,OAAAA,EAAS;AAAW;AAAE,yBAAA;AACnG,wBAAA;4BAAE9B,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,WAAA;4BAAaa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,oBAAAA;gCAAsBiC,OAAAA,EAAS;AAAQ;AAAE;AACjG;AACL;AAAE;AACN;AAAE;AACN;;;;"}
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, OutletItemKind, OutletKind, OutletMode } from '@cratis/scene.model';\nimport { administrationScreenDefinitions } from './administrationScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const administrationModule = 'admin';\n\n/**\n * The application structure the screen set implies: one module, `admin`, a feature for each screen and the sub-features beneath it (`admin.users.record` is the\n * `record` feature of `users`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const administrationStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: administrationModule, name: 'Administration', features: [], slices: [] };\n for (const screen of administrationScreenDefinitions) {\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 four places an administrator goes: Users, Roles, Settings and Audit log.\n */\nexport const administrationNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Administration' },\n outlets: [{ name: NavigationRegionKind.Topbar, kind: OutletKind.Navigation, defaults: [{ kind: OutletItemKind.Navigation, id: 'admin', title: 'Administration', target: { module: administrationModule } }] }],\n },\n modules: [{\n module: administrationModule,\n refinements: [{\n outlet: NavigationRegionKind.Sidebar,\n mode: OutletMode.Overrides,\n items: [\n { kind: OutletItemKind.Navigation, id: 'users', title: 'Users', target: { module: administrationModule, feature: 'users' } },\n { kind: OutletItemKind.Navigation, id: 'roles', title: 'Roles', target: { module: administrationModule, feature: 'roles' } },\n { kind: OutletItemKind.Navigation, id: 'settings', title: 'Settings', target: { module: administrationModule, feature: 'settings' } },\n { kind: OutletItemKind.Navigation, id: 'audit', title: 'Audit log', target: { module: administrationModule, feature: 'audit' } },\n ],\n }],\n }],\n};\n"],"names":["administrationModule","administrationStructure","root","id","name","features","screen","administrationScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","administrationNavigation","application","logo","image","outlets","NavigationRegionKind","Topbar","kind","OutletKind","Navigation","defaults","OutletItemKind","target","module","refinements","outlet","Sidebar","mode","OutletMode","Overrides","items","feature"],"mappings":";;;;;AAAA;AACA;AAKA,8GACO,MAAMA,oBAAAA,GAAuB;AAEpC;;;AAGC,IACM,MAAMC,uBAAAA,GAAiD,CAAA,IAAA;AAE1D,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,oBAAAA;QAAsBI,IAAAA,EAAM,gBAAA;AAAkBC,QAAAA,QAAAA,EAAU,EAAe,CAAA;IAChG,KAAK,MAAMC,UAAUC,uDAAAA,CAAiC;AAClD,QAAA,IAAIC,MAAAA,GAASN,IAAAA;QACb,KAAK,MAAMC,EAAAA,IAAMG,MAAAA,CAAOF,IAAI,CAACK,KAAK,CAAC,GAAA,CAAA,CAAKC,KAAK,CAAC,CAAA,CAAA,CAAI;YAC9C,IAAIC,IAAAA,GAAOH,MAAAA,CAAOH,QAAQ,CAACO,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUV,EAAE,KAAKA,EAAAA,CAAAA;AAC9D,YAAA,IAAI,CAACQ,IAAAA,EAAM;gBACPA,IAAAA,GAAO;AAAER,oBAAAA,EAAAA;AAAIC,oBAAAA,IAAAA,EAAME,OAAOQ,KAAK;AAAET,oBAAAA,QAAAA,EAAU,EAAE;AAAEU,oBAAAA,MAAAA,EAAQ;AAAG,iBAAA;gBAC1DP,MAAAA,CAAOH,QAAQ,CAACW,IAAI,CAACL,IAAAA,CAAAA;AACzB,YAAA;YACAH,MAAAA,GAASG,IAAAA;AACb,QAAA;AACJ,IAAA;IAEA,OAAO;QAAEM,OAAAA,EAAS;AAAC,YAAA;AAAEd,gBAAAA,EAAAA,EAAID,KAAKC,EAAE;AAAEC,gBAAAA,IAAAA,EAAMF,KAAKE,IAAI;AAAEC,gBAAAA,QAAAA,EAAUH,KAAKG;AAAS;AAAE;AAAC,KAAA;AAClF,CAAA;AAEA;;;UAI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,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ/B,oBAAAA;gCAAsBuC,OAAAA,EAAS;AAAW;AAAE,yBAAA;AACpI,wBAAA;AAAEd,4BAAAA,IAAAA,EAAMI,2BAAeF,UAAU;4BAAExB,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,WAAA;4BAAagB,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ/B,oBAAAA;gCAAsBuC,OAAAA,EAAS;AAAQ;AAAE;AAClI;AACL;AAAE;AACN;AAAE;AACN;;;;"}
@@ -63,6 +63,7 @@ const listScopes = [
63
63
  name: options.name,
64
64
  fitsSlot: 'content',
65
65
  slots: scene_blueprint_default.listScreenTemplate.slots,
66
+ outlets: scene_blueprint_default.listScreenTemplate.outlets,
66
67
  arrangement: scene_blueprint_default.listScreenTemplate.arrangement,
67
68
  content: {
68
69
  header: [
@@ -1 +1 @@
1
- {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.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 { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationEntityKind, fromQuery, administrationQueriesOf, localeOfData } from '../administrationQueries';\nimport { actionButton, component, goesTo, administrationMetadata, opensDialog, opensRecordOnSelect, withBehaviors } from '../administrationParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: AdministrationEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to; absent for a list that is only read and exported. */\n primary?: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One Administration list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = administrationQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = options.primary && withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', imageField: options.cards.imageField } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: primary ? [exportAction(`${id}-export`), primary] : [exportAction(`${id}-export`)] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list],\n bulkBar: options.recordScreen || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: administrationMetadata(options.name, 'List', listScopes),\n };\n}\n\n/** The users: everyone with an account, with their role, status and when they were last active. Choosing a row opens the user; **Invite** opens the invitation dialog. */\nexport const administrationUserListTemplate = listTemplateOf({\n name: 'AdministrationUserList', entity: AdministrationEntityKind.User, displayName: 'Administration users', description: 'Users with name, email, role, status and last active, filtered by role, status and last active; an invite action.',\n title: 'Users', subtitle: 'Everyone with an account', searchLabel: 'Search users', urlKey: 'users', primary: { label: 'Invite user', dialog: 'AdministrationInviteUser' },\n rowActions: ['Edit', 'Suspend', 'Reset password'], bulkActions: [], titleField: 'name', recordScreen: 'admin.users.record',\n});\n\n/** The audit log: who did what to what and when, newest first. Read only - nobody edits history - and exportable. */\nexport const administrationAuditLogTemplate = listTemplateOf({\n name: 'AdministrationAuditLog', entity: AdministrationEntityKind.Audit, displayName: 'Administration audit log', description: 'Time, actor, action and target of every change, filtered by actor, action and date range; exportable.',\n title: 'Audit log', subtitle: 'Who did what, and when', searchLabel: 'Search the audit log', urlKey: 'audit', rowActions: [], bulkActions: [], titleField: 'actor', readOnly: true,\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","administrationQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","variant","imageField","toneField","fitsSlot","slots","listScreenTemplate","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","administrationMetadata","administrationUserListTemplate","AdministrationEntityKind","User","administrationAuditLogTemplate","Audit"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,yBAAAA,CAAcC,MAAM;AAAED,IAAAA,yBAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,iCAAAA,CAAcC,gCAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,mCAAuBC;AAAM,qBAAA;oBAC9CC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,kCAAsBC,MAAM;AAAEC,4BAAAA,KAAAA,EAAOC,8BAAkBC,IAAI;4BAAEC,OAAAA,EAAS;gCAAEC,IAAAA,EAAM;AAA0B;AAAE;AAA6B;AAC7J;AAAE;AACN;AAAE,KAAA,CAAA;AA0BF;;;IAIA,SAASC,eAAeC,OAAoB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,6CAAAA,CAAwBF,OAAAA,CAAQG,MAAM,CAAA;IACtD,MAAMpB,EAAAA,GAAKiB,QAAQI,IAAI;AACvB,IAAA,MAAMC,MAAAA,GAAS,CAAA,EAAGtB,EAAAA,CAAG,QAAQ,CAAC;AAC9B,IAAA,MAAMuB,OAAAA,GAAUN,OAAAA,CAAQM,OAAO,IAAItB,kCAAc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AA,EAAS;QAAEC,KAAAA,EAAO,aAAA;QAAeC,MAAAA,EAAQ;AAA2B,KAAA;IACxKe,UAAAA,EAAY;AAAC,QAAA,MAAA;AAAQ,QAAA,SAAA;AAAW,QAAA;AAAiB,KAAA;AAAE2B,IAAAA,WAAAA,EAAa,EAAE;IAAEhC,UAAAA,EAAY,MAAA;IAAQQ,YAAAA,EAAc;AAC1G,CAAA;AAEA,sHACO,MAAMiC,8BAAAA,GAAiC5D,cAAAA,CAAe;IACzDK,IAAAA,EAAM,wBAAA;AAA0BD,IAAAA,MAAAA,EAAQsD,+CAAyBG,KAAK;IAAER,WAAAA,EAAa,0BAAA;IAA4BC,WAAAA,EAAa,uGAAA;IAC9HvC,KAAAA,EAAO,WAAA;IAAasB,QAAAA,EAAU,wBAAA;IAA0BG,WAAAA,EAAa,sBAAA;IAAwBlB,MAAAA,EAAQ,OAAA;AAASE,IAAAA,UAAAA,EAAY,EAAE;AAAE2B,IAAAA,WAAAA,EAAa,EAAE;IAAEhC,UAAAA,EAAY,OAAA;IAASM,QAAAA,EAAU;AAClL,CAAA;;;"}
1
+ {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.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 { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationEntityKind, fromQuery, administrationQueriesOf, localeOfData } from '../administrationQueries';\nimport { actionButton, component, goesTo, administrationMetadata, opensDialog, opensRecordOnSelect, withBehaviors } from '../administrationParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: AdministrationEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to; absent for a list that is only read and exported. */\n primary?: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One Administration list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = administrationQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = options.primary && withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', imageField: options.cards.imageField } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n outlets: listScreenTemplate.outlets,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: primary ? [exportAction(`${id}-export`), primary] : [exportAction(`${id}-export`)] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list],\n bulkBar: options.recordScreen || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: administrationMetadata(options.name, 'List', listScopes),\n };\n}\n\n/** The users: everyone with an account, with their role, status and when they were last active. Choosing a row opens the user; **Invite** opens the invitation dialog. */\nexport const administrationUserListTemplate = listTemplateOf({\n name: 'AdministrationUserList', entity: AdministrationEntityKind.User, displayName: 'Administration users', description: 'Users with name, email, role, status and last active, filtered by role, status and last active; an invite action.',\n title: 'Users', subtitle: 'Everyone with an account', searchLabel: 'Search users', urlKey: 'users', primary: { label: 'Invite user', dialog: 'AdministrationInviteUser' },\n rowActions: ['Edit', 'Suspend', 'Reset password'], bulkActions: [], titleField: 'name', recordScreen: 'admin.users.record',\n});\n\n/** The audit log: who did what to what and when, newest first. Read only - nobody edits history - and exportable. */\nexport const administrationAuditLogTemplate = listTemplateOf({\n name: 'AdministrationAuditLog', entity: AdministrationEntityKind.Audit, displayName: 'Administration audit log', description: 'Time, actor, action and target of every change, filtered by actor, action and date range; exportable.',\n title: 'Audit log', subtitle: 'Who did what, and when', searchLabel: 'Search the audit log', urlKey: 'audit', rowActions: [], bulkActions: [], titleField: 'actor', readOnly: true,\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","administrationQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","variant","imageField","toneField","fitsSlot","slots","listScreenTemplate","outlets","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","administrationMetadata","administrationUserListTemplate","AdministrationEntityKind","User","administrationAuditLogTemplate","Audit"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,yBAAAA,CAAcC,MAAM;AAAED,IAAAA,yBAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,iCAAAA,CAAcC,gCAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,mCAAuBC;AAAM,qBAAA;oBAC9CC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,kCAAsBC,MAAM;AAAEC,4BAAAA,KAAAA,EAAOC,8BAAkBC,IAAI;4BAAEC,OAAAA,EAAS;gCAAEC,IAAAA,EAAM;AAA0B;AAAE;AAA6B;AAC7J;AAAE;AACN;AAAE,KAAA,CAAA;AA0BF;;;IAIA,SAASC,eAAeC,OAAoB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,6CAAAA,CAAwBF,OAAAA,CAAQG,MAAM,CAAA;IACtD,MAAMpB,EAAAA,GAAKiB,QA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D,+CAAyBC,IAAI;IAAEN,WAAAA,EAAa,sBAAA;IAAwBC,WAAAA,EAAa,mHAAA;IACzHxC,KAAAA,EAAO,OAAA;IAASuB,QAAAA,EAAU,0BAAA;IAA4BG,WAAAA,EAAa,cAAA;IAAgBnB,MAAAA,EAAQ,OAAA;IAASf,OAAAA,EAAS;QAAEC,KAAAA,EAAO,aAAA;QAAeC,MAAAA,EAAQ;AAA2B,KAAA;IACxKe,UAAAA,EAAY;AAAC,QAAA,MAAA;AAAQ,QAAA,SAAA;AAAW,QAAA;AAAiB,KAAA;AAAE4B,IAAAA,WAAAA,EAAa,EAAE;IAAEjC,UAAAA,EAAY,MAAA;IAAQQ,YAAAA,EAAc;AAC1G,CAAA;AAEA,sHACO,MAAMkC,8BAAAA,GAAiC7D,cAAAA,CAAe;IACzDK,IAAAA,EAAM,wBAAA;AAA0BD,IAAAA,MAAAA,EAAQuD,+CAAyBG,KAAK;IAAER,WAAAA,EAAa,0BAAA;IAA4BC,WAAAA,EAAa,uGAAA;IAC9HxC,KAAAA,EAAO,WAAA;IAAauB,QAAAA,EAAU,wBAAA;IAA0BG,WAAAA,EAAa,sBAAA;IAAwBnB,MAAAA,EAAQ,OAAA;AAASE,IAAAA,UAAAA,EAAY,EAAE;AAAE4B,IAAAA,WAAAA,EAAa,EAAE;IAAEjC,UAAAA,EAAY,OAAA;IAASM,QAAAA,EAAU;AAClL,CAAA;;;"}
@@ -15,6 +15,7 @@ const user = administrationQueries.administrationQueriesOf(administrationQueries
15
15
  name: 'AdministrationUserPage',
16
16
  fitsSlot: 'content',
17
17
  slots: scene_blueprint_default.recordPageTemplate.slots,
18
+ outlets: scene_blueprint_default.recordPageTemplate.outlets,
18
19
  arrangement: scene_blueprint_default.recordPageTemplate.arrangement,
19
20
  content: {
20
21
  header: [
@@ -1 +1 @@
1
- {"version":3,"file":"recordTemplates.js","sources":["../../../templates/recordTemplates.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 { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { recordPageTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationEntityKind, AdministrationQuery, administrationQueriesOf, fromQuery, localeOfData } from '../administrationQueries';\nimport { actionButton, administrationMetadata, component, opensDialog, withBehaviors } from '../administrationParts';\n\nconst user = administrationQueriesOf(AdministrationEntityKind.User);\n\n/**\n * The user page: the foundation `RecordPage` with the user's name as its title, their status and when they were last active as key facts, their profile as the\n * record, the roles they hold and the sessions they have open as related lists, and what has happened to the account beside them.\n */\nexport const administrationUserPageTemplate: ScreenTemplate = {\n name: 'AdministrationUserPage',\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component('AdministrationUserPage-header', 'pageHeader', { title: fromQuery(user.record, '0.name'), subtitle: fromQuery(user.record, '0.email') }, {\n actions: [withBehaviors(actionButton('AdministrationUserPage-invite', 'Invite user', 'secondary'), opensDialog('AdministrationInviteUser'))],\n })],\n summary: [\n component('AdministrationUserPage-status', 'statusChip', { status: fromQuery(user.summary, '0.status'), tone: fromQuery(user.summary, '0.tone') }),\n component('AdministrationUserPage-roles', 'statCard', { label: 'Roles', value: fromQuery(user.summary, '0.roles'), ...localeOfData }),\n component('AdministrationUserPage-sessions', 'statCard', { label: 'Open sessions', value: fromQuery(user.summary, '0.sessions'), ...localeOfData }),\n component('AdministrationUserPage-logins', 'statCard', { label: 'Sign-ins this month', value: fromQuery(user.summary, '0.logins'), ...localeOfData }),\n ],\n tabs: [component('AdministrationUserPage-tabs', 'tabSet', { tabs: fromQuery(AdministrationQuery.RecordTabs), urlKey: 'tab', label: 'User sections' })],\n main: [component('AdministrationUserPage-form', 'formScreenBody', { mode: 'readOnly', sections: fromQuery(user.sections), values: fromQuery(user.record, '0'), ...localeOfData })],\n related: [\n component('AdministrationUserPage-assignments', 'dataList', { label: 'Role assignments', rows: fromQuery(user.roles), columns: fromQuery('AssignmentColumns'), titleField: 'role', ...localeOfData }),\n component('AdministrationUserPage-sessionlist', 'dataList', {\n label: 'Sessions', rows: fromQuery(user.sessions), columns: fromQuery('SessionColumns'), titleField: 'device', rowActions: ['Sign out'], ...localeOfData,\n }),\n ],\n activity: [component('AdministrationUserPage-activity', 'activityFeed', { label: 'Account history', entries: fromQuery(user.activity), ...localeOfData })],\n aside: [],\n },\n displayName: 'Administration user page',\n description: 'One user: profile, role assignments and sessions.',\n metadata: administrationMetadata('AdministrationUserPage', 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n};\n"],"names":["user","administrationQueriesOf","AdministrationEntityKind","User","administrationUserPageTemplate","name","fitsSlot","slots","recordPageTemplate","arrangement","content","header","component","title","fromQuery","record","subtitle","actions","withBehaviors","actionButton","opensDialog","summary","status","tone","label","value","localeOfData","tabs","AdministrationQuery","RecordTabs","urlKey","main","mode","sections","values","related","rows","roles","columns","titleField","sessions","rowActions","activity","entries","aside","displayName","description","metadata","administrationMetadata","TemplateScope","Feature","Subfeature"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,IAAAA,GAAOC,6CAAAA,CAAwBC,8CAAAA,CAAyBC,IAAI,CAAA;AAElE;;;UAIaC,8BAAAA,GAAiD;IAC1DC,IAAAA,EAAM,wBAAA;IACNC,QAAAA,EAAU,SAAA;AACVC,IAAAA,KAAAA,EAAOC,2CAAmBD,KAAK;AAC/BE,IAAAA,WAAAA,EAAaD,2CAAmBC,WAAW;IAC3CC,OAAAA,EAAS;QACLC,MAAAA,EAAQ;AAACC,YAAAA,iCAAAA,CAAU,iCAAiC,YAAA,EAAc;gBAAEC,KAAAA,EAAOC,+BAAAA,CAAUd,IAAAA,CAAKe,MAAM,EAAE,QAAA,CAAA;gBAAWC,QAAAA,EAAUF,+BAAAA,CAAUd,IAAAA,CAAKe,MAAM,EAAE,SAAA;aAAW,EAAG;gBACxJE,OAAAA,EAAS;AAACC,oBAAAA,iCAAAA,CAAcC,gCAAAA,CAAa,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H;;"}
1
+ {"version":3,"file":"recordTemplates.js","sources":["../../../templates/recordTemplates.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 { ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { recordPageTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationEntityKind, AdministrationQuery, administrationQueriesOf, fromQuery, localeOfData } from '../administrationQueries';\nimport { actionButton, administrationMetadata, component, opensDialog, withBehaviors } from '../administrationParts';\n\nconst user = administrationQueriesOf(AdministrationEntityKind.User);\n\n/**\n * The user page: the foundation `RecordPage` with the user's name as its title, their status and when they were last active as key facts, their profile as the\n * record, the roles they hold and the sessions they have open as related lists, and what has happened to the account beside them.\n */\nexport const administrationUserPageTemplate: ScreenTemplate = {\n name: 'AdministrationUserPage',\n fitsSlot: 'content',\n slots: recordPageTemplate.slots,\n outlets: recordPageTemplate.outlets,\n arrangement: recordPageTemplate.arrangement,\n content: {\n header: [component('AdministrationUserPage-header', 'pageHeader', { title: fromQuery(user.record, '0.name'), subtitle: fromQuery(user.record, '0.email') }, {\n actions: [withBehaviors(actionButton('AdministrationUserPage-invite', 'Invite user', 'secondary'), opensDialog('AdministrationInviteUser'))],\n })],\n summary: [\n component('AdministrationUserPage-status', 'statusChip', { status: fromQuery(user.summary, '0.status'), tone: fromQuery(user.summary, '0.tone') }),\n component('AdministrationUserPage-roles', 'statCard', { label: 'Roles', value: fromQuery(user.summary, '0.roles'), ...localeOfData }),\n component('AdministrationUserPage-sessions', 'statCard', { label: 'Open sessions', value: fromQuery(user.summary, '0.sessions'), ...localeOfData }),\n component('AdministrationUserPage-logins', 'statCard', { label: 'Sign-ins this month', value: fromQuery(user.summary, '0.logins'), ...localeOfData }),\n ],\n tabs: [component('AdministrationUserPage-tabs', 'tabSet', { tabs: fromQuery(AdministrationQuery.RecordTabs), urlKey: 'tab', label: 'User sections' })],\n main: [component('AdministrationUserPage-form', 'formScreenBody', { mode: 'readOnly', sections: fromQuery(user.sections), values: fromQuery(user.record, '0'), ...localeOfData })],\n related: [\n component('AdministrationUserPage-assignments', 'dataList', { label: 'Role assignments', rows: fromQuery(user.roles), columns: fromQuery('AssignmentColumns'), titleField: 'role', ...localeOfData }),\n component('AdministrationUserPage-sessionlist', 'dataList', {\n label: 'Sessions', rows: fromQuery(user.sessions), columns: fromQuery('SessionColumns'), titleField: 'device', rowActions: ['Sign out'], ...localeOfData,\n }),\n ],\n activity: [component('AdministrationUserPage-activity', 'activityFeed', { label: 'Account history', entries: fromQuery(user.activity), ...localeOfData })],\n aside: [],\n },\n displayName: 'Administration user page',\n description: 'One user: profile, role assignments and sessions.',\n metadata: administrationMetadata('AdministrationUserPage', 'Detail', [TemplateScope.Feature, TemplateScope.Subfeature]),\n};\n"],"names":["user","administrationQueriesOf","AdministrationEntityKind","User","administrationUserPageTemplate","name","fitsSlot","slots","recordPageTemplate","outlets","arrangement","content","header","component","title","fromQuery","record","subtitle","actions","withBehaviors","actionButton","opensDialog","summary","status","tone","label","value","localeOfData","tabs","AdministrationQuery","RecordTabs","urlKey","main","mode","sections","values","related","rows","roles","columns","titleField","sessions","rowActions","activity","entries","aside","displayName","description","metadata","administrationMetadata","TemplateScope","Feature","Subfeature"],"mappings":";;;;;;;AAAA;AACA;AAOA,MAAMA,IAAAA,GAAOC,6CAAAA,CAAwBC,8CAAAA,CAAyBC,IAAI,CAAA;AAElE;;;UAIaC,8BAAAA,GAAiD;IAC1DC,IAAAA,EAAM,wBAAA;IACNC,QAAAA,EAAU,SAAA;AACVC,IAAAA,KAAAA,EAAOC,2CAAmBD,KAAK;AAC/BE,IAAAA,OAAAA,EAASD,2CAAmBC,OAAO;AACnCC,IAAAA,WAAAA,EAAaF,2CAAmBE,WAAW;IAC3CC,OAAAA,EAAS;QACLC,MAAAA,EAAQ;AAACC,YAAAA,iCAAAA,CAAU,iCAAiC,YAAA,EAAc;gBAAEC,KAAAA,EAAOC,+BAAAA,CAAUf,IAAA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C,WAAAA,EAAa,0BAAA;IACbC,WAAAA,EAAa,mDAAA;IACbC,QAAAA,EAAUC,0CAAAA,CAAuB,0BAA0B,QAAA,EAAU;AAACC,QAAAA,yBAAAA,CAAcC,OAAO;AAAED,QAAAA,yBAAAA,CAAcE;AAAW,KAAA;AAC1H;;"}
@@ -16,6 +16,7 @@ var administrationParts = require('../administrationParts.js');
16
16
  name: 'AdministrationRoles',
17
17
  fitsSlot: 'content',
18
18
  slots: scene_blueprint_default.masterDetailScreenTemplate.slots,
19
+ outlets: scene_blueprint_default.masterDetailScreenTemplate.outlets,
19
20
  arrangement: scene_blueprint_default.masterDetailScreenTemplate.arrangement,
20
21
  content: {
21
22
  list: [
@@ -1 +1 @@
1
- {"version":3,"file":"rolesTemplate.js","sources":["../../../templates/rolesTemplate.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 { BindingSourceKind, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { masterDetailScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationQuery, fromQuery, localeOfData } from '../administrationQueries';\nimport { actionButton, administrationMetadata, component, opensDialog, withBehaviors } from '../administrationParts';\n\n/** The list of roles; the permission matrix binds to the row that is chosen in it. */\nconst rolesId = 'AdministrationRoles-list';\n\n/**\n * Roles and permissions: the foundation `MasterDetail` with the roles on the left - each with how many people hold it - and, on the right, the permission matrix\n * of the role that is chosen. While no role is chosen the matrix shows every role side by side, so roles can be compared before one is picked. The chosen role is\n * kept in the address, so a link points at a role. Granting and revoking are the matrix's own checkboxes, each named in words for a screen reader.\n */\nexport const administrationRolesTemplate: ScreenTemplate = {\n name: 'AdministrationRoles',\n fitsSlot: 'content',\n slots: masterDetailScreenTemplate.slots,\n arrangement: masterDetailScreenTemplate.arrangement,\n content: {\n list: [\n component('AdministrationRoles-header', 'pageHeader', { title: 'Roles', subtitle: 'Choose a role to see what it may do' }, {\n actions: [withBehaviors(actionButton('AdministrationRoles-new', 'New role', 'primary'), opensDialog('AdministrationQuickCreateRole'))],\n }),\n component(rolesId, 'dataList', {\n label: 'Roles', rows: fromQuery(AdministrationQuery.RoleList), columns: fromQuery(AdministrationQuery.RoleColumns), titleField: 'name', selectionMode: 'single', urlKey: 'roles', ...localeOfData,\n }),\n ],\n details: [component('AdministrationRoles-matrix', 'permissionMatrix', {\n label: 'Permissions', roles: fromQuery(AdministrationQuery.MatrixRoles), permissions: fromQuery(AdministrationQuery.Permissions), grants: fromQuery(AdministrationQuery.Grants), editPermission: 'enabled',\n focusRole: { kind: BindingSourceKind.ComponentProperty, componentId: rolesId, path: 'value' }, ...localeOfData,\n })],\n },\n displayName: 'Administration roles and permissions',\n description: 'The roles on the left and the permission matrix of the chosen role on the right.',\n metadata: administrationMetadata('AdministrationRoles', 'Workspace', [TemplateScope.Module, TemplateScope.Feature]),\n};\n"],"names":["rolesId","administrationRolesTemplate","name","fitsSlot","slots","masterDetailScreenTemplate","arrangement","content","list","component","title","subtitle","actions","withBehaviors","actionButton","opensDialog","label","rows","fromQuery","AdministrationQuery","RoleList","columns","RoleColumns","titleField","selectionMode","urlKey","localeOfData","details","roles","MatrixRoles","permissions","Permissions","grants","Grants","editPermission","focusRole","kind","BindingSourceKind","ComponentProperty","componentId","path","displayName","description","metadata","administrationMetadata","TemplateScope","Module","Feature"],"mappings":";;;;;;;AAAA;AACA;AAOA,uFACA,MAAMA,OAAAA,GAAU,0BAAA;AAEhB;;;;UAKaC,2BAAAA,GAA8C;IACvDC,IAAAA,EAAM,qBAAA;IACNC,QAAAA,EAAU,SAAA;AACVC,IAAAA,KAAAA,EAAOC,mDAA2BD,KAAK;AACvCE,IAAAA,WAAAA,EAAaD,mDAA2BC,WAAW;IACnDC,OAAAA,EAAS;QACLC,IAAAA,EAAM;AACFC,YAAAA,iCAAAA,CAAU,8BAA8B,YAAA,EAAc;gBAAEC,KAAAA,EAAO,OAAA;gBAASC,QAAAA,EAAU;aAAsC,EAAG;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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 { BindingSourceKind, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { masterDetailScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationQuery, fromQuery, localeOfData } from '../administrationQueries';\nimport { actionButton, administrationMetadata, component, opensDialog, withBehaviors } from '../administrationParts';\n\n/** The list of roles; the permission matrix binds to the row that is chosen in it. */\nconst rolesId = 'AdministrationRoles-list';\n\n/**\n * Roles and permissions: the foundation `MasterDetail` with the roles on the left - each with how many people hold it - and, on the right, the permission matrix\n * of the role that is chosen. While no role is chosen the matrix shows every role side by side, so roles can be compared before one is picked. The chosen role is\n * kept in the address, so a link points at a role. Granting and revoking are the matrix's own checkboxes, each named in words for a screen reader.\n */\nexport const administrationRolesTemplate: ScreenTemplate = {\n name: 'AdministrationRoles',\n fitsSlot: 'content',\n slots: masterDetailScreenTemplate.slots,\n outlets: masterDetailScreenTemplate.outlets,\n arrangement: masterDetailScreenTemplate.arrangement,\n content: {\n list: [\n component('AdministrationRoles-header', 'pageHeader', { title: 'Roles', subtitle: 'Choose a role to see what it may do' }, {\n actions: [withBehaviors(actionButton('AdministrationRoles-new', 'New role', 'primary'), opensDialog('AdministrationQuickCreateRole'))],\n }),\n component(rolesId, 'dataList', {\n label: 'Roles', rows: fromQuery(AdministrationQuery.RoleList), columns: fromQuery(AdministrationQuery.RoleColumns), titleField: 'name', selectionMode: 'single', urlKey: 'roles', ...localeOfData,\n }),\n ],\n details: [component('AdministrationRoles-matrix', 'permissionMatrix', {\n label: 'Permissions', roles: fromQuery(AdministrationQuery.MatrixRoles), permissions: fromQuery(AdministrationQuery.Permissions), grants: fromQuery(AdministrationQuery.Grants), editPermission: 'enabled',\n focusRole: { kind: BindingSourceKind.ComponentProperty, componentId: rolesId, path: 'value' }, ...localeOfData,\n })],\n },\n displayName: 'Administration roles and permissions',\n description: 'The roles on the left and the permission matrix of the chosen role on the right.',\n metadata: administrationMetadata('AdministrationRoles', 'Workspace', [TemplateScope.Module, TemplateScope.Feature]),\n};\n"],"names":["rolesId","administrationRolesTemplate","name","fitsSlot","slots","masterDetailScreenTemplate","outlets","arrangement","content","list","component","title","subtitle","actions","withBehaviors","actionButton","opensDialog","label","rows","fromQuery","AdministrationQuery","RoleList","columns","RoleColumns","titleField","selectionMode","urlKey","localeOfData","details","roles","MatrixRoles","permissions","Permissions","grants","Grants","editPermission","focusRole","kind","BindingSourceKind","ComponentProperty","componentId","path","displayName","description","metadata","administrationMetadata","TemplateScope","Module","Feature"],"mappings":";;;;;;;AAAA;AACA;AAOA,uFACA,MAAMA,OAAAA,GAAU,0BAAA;AAEhB;;;;UAKaC,2BAAAA,GAA8C;IACvDC,IAAAA,EAAM,qBAAA;IACNC,QAAAA,EAAU,SAAA;AACVC,IAAAA,KAAAA,EAAOC,mDAA2BD,KAAK;AACvCE,IAAAA,OAAAA,EAASD,mDAA2BC,OAAO;AAC3CC,IAAAA,WAAAA,EAAaF,mDAA2BE,WAAW;IACnDC,OAAAA,EAAS;QACLC,IAAAA,EAAM;AACFC,YAAAA,iCAAAA,CAAU,8BAA8B,YAAA,EAAc;gBAAEC,KAAAA,EAAO,OAAA;gBAASC,QAAAA,EAAU;aAAsC,EAAG;gBACvHC,OAAAA,EAAS;AAACC,oBAAAA,iCAAAA,CAAcC,gCAAAA,CAAa,yBAAA,EAA2B,UAAA,EAAY,SAAA,CAAA,EAAYC,+BAAAA,CAAY,+BAAA,CAAA;AAAkC;AAC1I,aAAA,CAAA;AACAN,YAAAA,iCAAAA,CAAUV,SAAS,UAAA,EAAY;gBAC3BiB,KAAAA,EAAO,OAAA;gBAASC,IAAAA,EAAMC,+BAAAA,CAAUC,0CAAoBC,QAAQ,CAAA;gBAAGC,OAAAA,EAASH,+BAAAA,CAAUC,0CAAoBG,WAAW,CAAA;gBAAGC,UAAAA,EAAY,MAAA;gBAAQC,aAAAA,EAAe,QAAA;gBAAUC,MAAAA,EAAQ,OAAA;AAAS,gBAAA,GAAGC;AACzL,aAAA;AACH,SAAA;QACDC,OAAAA,EAAS;AAAClB,YAAAA,iCAAAA,CAAU,8BAA8B,kBAAA,EAAoB;gBAClEO,KAAAA,EAAO,aAAA;gBAAeY,KAAAA,EAAOV,+BAAAA,CAAUC,0CAAoBU,WAAW,CAAA;gBAAGC,WAAAA,EAAaZ,+BAAAA,CAAUC,0CAAoBY,WAAW,CAAA;gBAAGC,MAAAA,EAAQd,+BAAAA,CAAUC,0CAAoBc,MAAM,CAAA;gBAAGC,cAAAA,EAAgB,SAAA;gBACjMC,SAAAA,EAAW;AAAEC,oBAAAA,IAAAA,EAAMC,8BAAkBC,iBAAiB;oBAAEC,WAAAA,EAAaxC,OAAAA;oBAASyC,IAAAA,EAAM;AAAQ,iBAAA;AAAG,gBAAA,GAAGd;AACtG,aAAA;AAAG;AACP,KAAA;IACAe,WAAAA,EAAa,sCAAA;IACbC,WAAAA,EAAa,kFAAA;IACbC,QAAAA,EAAUC,0CAAAA,CAAuB,uBAAuB,WAAA,EAAa;AAACC,QAAAA,yBAAAA,CAAcC,MAAM;AAAED,QAAAA,yBAAAA,CAAcE;AAAQ,KAAA;AACtH;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../navigation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAA8C,MAAM,qBAAqB,CAAC;AAIxH,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAM5C,eAAO,MAAM,uBAAuB,EAAE,oBAgBlC,CAAC;AAML,eAAO,MAAM,wBAAwB,EAAE,eAkBtC,CAAC"}
1
+ {"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../navigation.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAgE,MAAM,qBAAqB,CAAC;AAI1I,eAAO,MAAM,oBAAoB,UAAU,CAAC;AAM5C,eAAO,MAAM,uBAAuB,EAAE,oBAgBlC,CAAC;AAML,eAAO,MAAM,wBAAwB,EAAE,eAkBtC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { NavigationRegionMode, NavigationRegionKind } from '@cratis/scene.model';
1
+ import { OutletItemKind, OutletMode, NavigationRegionKind, OutletKind } from '@cratis/scene.model';
2
2
  import { administrationScreenDefinitions } from './administrationScreenSet.js';
3
3
 
4
4
  // Copyright (c) Cratis. All rights reserved.
@@ -47,11 +47,13 @@ import { administrationScreenDefinitions } from './administrationScreenSet.js';
47
47
  image: '',
48
48
  title: 'Administration'
49
49
  },
50
- regions: [
50
+ outlets: [
51
51
  {
52
- region: NavigationRegionKind.Topbar,
53
- items: [
52
+ name: NavigationRegionKind.Topbar,
53
+ kind: OutletKind.Navigation,
54
+ defaults: [
54
55
  {
56
+ kind: OutletItemKind.Navigation,
55
57
  id: 'admin',
56
58
  title: 'Administration',
57
59
  target: {
@@ -65,12 +67,13 @@ import { administrationScreenDefinitions } from './administrationScreenSet.js';
65
67
  modules: [
66
68
  {
67
69
  module: administrationModule,
68
- regions: [
70
+ refinements: [
69
71
  {
70
- region: NavigationRegionKind.Sidebar,
71
- mode: NavigationRegionMode.Override,
72
+ outlet: NavigationRegionKind.Sidebar,
73
+ mode: OutletMode.Overrides,
72
74
  items: [
73
75
  {
76
+ kind: OutletItemKind.Navigation,
74
77
  id: 'users',
75
78
  title: 'Users',
76
79
  target: {
@@ -79,6 +82,7 @@ import { administrationScreenDefinitions } from './administrationScreenSet.js';
79
82
  }
80
83
  },
81
84
  {
85
+ kind: OutletItemKind.Navigation,
82
86
  id: 'roles',
83
87
  title: 'Roles',
84
88
  target: {
@@ -87,6 +91,7 @@ import { administrationScreenDefinitions } from './administrationScreenSet.js';
87
91
  }
88
92
  },
89
93
  {
94
+ kind: OutletItemKind.Navigation,
90
95
  id: 'settings',
91
96
  title: 'Settings',
92
97
  target: {
@@ -95,6 +100,7 @@ import { administrationScreenDefinitions } from './administrationScreenSet.js';
95
100
  }
96
101
  },
97
102
  {
103
+ kind: OutletItemKind.Navigation,
98
104
  id: 'audit',
99
105
  title: 'Audit log',
100
106
  target: {
@@ -1 +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 { administrationScreenDefinitions } from './administrationScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const administrationModule = 'admin';\n\n/**\n * The application structure the screen set implies: one module, `admin`, a feature for each screen and the sub-features beneath it (`admin.users.record` is the\n * `record` feature of `users`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const administrationStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: administrationModule, name: 'Administration', features: [], slices: [] };\n for (const screen of administrationScreenDefinitions) {\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 four places an administrator goes: Users, Roles, Settings and Audit log.\n */\nexport const administrationNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Administration' },\n regions: [{ region: NavigationRegionKind.Topbar, items: [{ id: 'admin', title: 'Administration', target: { module: administrationModule } }] }],\n },\n modules: [{\n module: administrationModule,\n regions: [{\n region: NavigationRegionKind.Sidebar,\n mode: NavigationRegionMode.Override,\n items: [\n { id: 'users', title: 'Users', target: { module: administrationModule, feature: 'users' } },\n { id: 'roles', title: 'Roles', target: { module: administrationModule, feature: 'roles' } },\n { id: 'settings', title: 'Settings', target: { module: administrationModule, feature: 'settings' } },\n { id: 'audit', title: 'Audit log', target: { module: administrationModule, feature: 'audit' } },\n ],\n }],\n }],\n};\n"],"names":["administrationModule","administrationStructure","root","id","name","features","screen","administrationScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","administrationNavigation","application","logo","image","regions","region","NavigationRegionKind","Topbar","items","target","module","Sidebar","mode","NavigationRegionMode","Override","feature"],"mappings":";;;AAAA;AACA;AAKA,8GACO,MAAMA,oBAAAA,GAAuB;AAEpC;;;AAGC,IACM,MAAMC,uBAAAA,GAAiD,CAAA,IAAA;AAE1D,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,oBAAAA;QAAsBI,IAAAA,EAAM,gBAAA;AAAkBC,QAAAA,QAAAA,EAAU,EAAe,CAAA;IAChG,KAAK,MAAMC,UAAUC,+BAAAA,CAAiC;AAClD,QAAA,IAAIC,MAAAA,GAASN,IAAAA;QACb,KAAK,MAAMC,EAAAA,IAAMG,MAAAA,CAAOF,IAAI,CAACK,KAAK,CAAC,GAAA,CAAA,CAAKC,KAAK,CAAC,CAAA,CAAA,CAAI;YAC9C,IAAIC,IAAAA,GAAOH,MAAAA,CAAOH,QAAQ,CAACO,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUV,EAAE,KAAKA,EAAAA,CAAAA;AAC9D,YAAA,IAAI,CAACQ,IAAAA,EAAM;gBACPA,IAAAA,GAAO;AAAER,oBAAAA,EAAAA;AAAIC,oBAAAA,IAAAA,EAAME,OAAOQ,KAAK;AAAET,oBAAAA,QAAAA,EAAU,EAAE;AAAEU,oBAAAA,MAAAA,EAAQ;AAAG,iBAAA;gBAC1DP,MAAAA,CAAOH,QAAQ,CAACW,IAAI,CAACL,IAAAA,CAAAA;AACzB,YAAA;YACAH,MAAAA,GAASG,IAAAA;AACb,QAAA;AACJ,IAAA;IAEA,OAAO;QAAEM,OAAAA,EAAS;AAAC,YA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A;gCAAsBiC,OAAAA,EAAS;AAAW;AAAE,yBAAA;AACnG,wBAAA;4BAAE9B,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,WAAA;4BAAaa,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ5B,oBAAAA;gCAAsBiC,OAAAA,EAAS;AAAQ;AAAE;AACjG;AACL;AAAE;AACN;AAAE;AACN;;"}
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, OutletItemKind, OutletKind, OutletMode } from '@cratis/scene.model';\nimport { administrationScreenDefinitions } from './administrationScreenSet';\n\n/** The module the blueprint's screens live in, and so the first segment of every screen's qualified name. */\nexport const administrationModule = 'admin';\n\n/**\n * The application structure the screen set implies: one module, `admin`, a feature for each screen and the sub-features beneath it (`admin.users.record` is the\n * `record` feature of `users`). Derived from the screen names, so a screen added to the set is part of the structure without a second edit.\n */\nexport const administrationStructure: ApplicationStructure = (() => {\n interface Node { id: string; name: string; features: Node[]; slices: never[] }\n const root: Node = { id: administrationModule, name: 'Administration', features: [], slices: [] };\n for (const screen of administrationScreenDefinitions) {\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 four places an administrator goes: Users, Roles, Settings and Audit log.\n */\nexport const administrationNavigation: NavigationModel = {\n application: {\n logo: { image: '', title: 'Administration' },\n outlets: [{ name: NavigationRegionKind.Topbar, kind: OutletKind.Navigation, defaults: [{ kind: OutletItemKind.Navigation, id: 'admin', title: 'Administration', target: { module: administrationModule } }] }],\n },\n modules: [{\n module: administrationModule,\n refinements: [{\n outlet: NavigationRegionKind.Sidebar,\n mode: OutletMode.Overrides,\n items: [\n { kind: OutletItemKind.Navigation, id: 'users', title: 'Users', target: { module: administrationModule, feature: 'users' } },\n { kind: OutletItemKind.Navigation, id: 'roles', title: 'Roles', target: { module: administrationModule, feature: 'roles' } },\n { kind: OutletItemKind.Navigation, id: 'settings', title: 'Settings', target: { module: administrationModule, feature: 'settings' } },\n { kind: OutletItemKind.Navigation, id: 'audit', title: 'Audit log', target: { module: administrationModule, feature: 'audit' } },\n ],\n }],\n }],\n};\n"],"names":["administrationModule","administrationStructure","root","id","name","features","screen","administrationScreenDefinitions","parent","split","slice","node","find","candidate","title","slices","push","modules","administrationNavigation","application","logo","image","outlets","NavigationRegionKind","Topbar","kind","OutletKind","Navigation","defaults","OutletItemKind","target","module","refinements","outlet","Sidebar","mode","OutletMode","Overrides","items","feature"],"mappings":";;;AAAA;AACA;AAKA,8GACO,MAAMA,oBAAAA,GAAuB;AAEpC;;;AAGC,IACM,MAAMC,uBAAAA,GAAiD,CAAA,IAAA;AAE1D,IAAA,MAAMC,IAAAA,GAAa;QAAEC,EAAAA,EAAIH,oBAAAA;QAAsBI,IAAAA,EAAM,gBAAA;AAAkBC,QAAAA,QAAAA,EAAU,EAAe,CAAA;IAChG,KAAK,MAAMC,UAAUC,+BAAAA,CAAiC;AAClD,QAAA,IAAIC,MAAAA,GAASN,IAAAA;QACb,KAAK,MAAMC,EAAAA,IAAMG,MAAAA,CAAOF,IAAI,CAACK,KAAK,CAAC,GAAA,CAAA,CAAKC,KAAK,CAAC,CAAA,CAAA,CAAI;YAC9C,IAAIC,IAAAA,GAAOH,MAAAA,CAAOH,QAAQ,CAACO,IAAI,CAACC,CAAAA,SAAAA,GAAaA,SAAAA,CAAUV,EAAE,KAAKA,EAAAA,CAAAA;AAC9D,YAAA,IAAI,CAACQ,IAAAA,EAAM;gBACPA,IAAAA,GAAO;AAAER,oBA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AA;4BAASW,KAAAA,EAAO,OAAA;4BAASgB,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ/B,oBAAAA;gCAAsBuC,OAAAA,EAAS;AAAQ;AAAE,yBAAA;AAC3H,wBAAA;AAAEd,4BAAAA,IAAAA,EAAMI,eAAeF,UAAU;4BAAExB,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,OAAA;4BAASgB,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ/B,oBAAAA;gCAAsBuC,OAAAA,EAAS;AAAQ;AAAE,yBAAA;AAC3H,wBAAA;AAAEd,4BAAAA,IAAAA,EAAMI,eAAeF,UAAU;4BAAExB,EAAAA,EAAI,UAAA;4BAAYW,KAAAA,EAAO,UAAA;4BAAYgB,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ/B,oBAAAA;gCAAsBuC,OAAAA,EAAS;AAAW;AAAE,yBAAA;AACpI,wBAAA;AAAEd,4BAAAA,IAAAA,EAAMI,eAAeF,UAAU;4BAAExB,EAAAA,EAAI,OAAA;4BAASW,KAAAA,EAAO,WAAA;4BAAagB,MAAAA,EAAQ;gCAAEC,MAAAA,EAAQ/B,oBAAAA;gCAAsBuC,OAAAA,EAAS;AAAQ;AAAE;AAClI;AACL;AAAE;AACN;AAAE;AACN;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"listTemplates.d.ts","sourceRoot":"","sources":["../../../templates/listTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkF,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAgFpJ,eAAO,MAAM,8BAA8B,gBAIzC,CAAC;AAGH,eAAO,MAAM,8BAA8B,gBAGzC,CAAC"}
1
+ {"version":3,"file":"listTemplates.d.ts","sourceRoot":"","sources":["../../../templates/listTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkF,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAiFpJ,eAAO,MAAM,8BAA8B,gBAIzC,CAAC;AAGH,eAAO,MAAM,8BAA8B,gBAGzC,CAAC"}
@@ -61,6 +61,7 @@ const listScopes = [
61
61
  name: options.name,
62
62
  fitsSlot: 'content',
63
63
  slots: listScreenTemplate.slots,
64
+ outlets: listScreenTemplate.outlets,
64
65
  arrangement: listScreenTemplate.arrangement,
65
66
  content: {
66
67
  header: [
@@ -1 +1 @@
1
- {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.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 { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationEntityKind, fromQuery, administrationQueriesOf, localeOfData } from '../administrationQueries';\nimport { actionButton, component, goesTo, administrationMetadata, opensDialog, opensRecordOnSelect, withBehaviors } from '../administrationParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: AdministrationEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to; absent for a list that is only read and exported. */\n primary?: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One Administration list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = administrationQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = options.primary && withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', imageField: options.cards.imageField } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: primary ? [exportAction(`${id}-export`), primary] : [exportAction(`${id}-export`)] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list],\n bulkBar: options.recordScreen || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: administrationMetadata(options.name, 'List', listScopes),\n };\n}\n\n/** The users: everyone with an account, with their role, status and when they were last active. Choosing a row opens the user; **Invite** opens the invitation dialog. */\nexport const administrationUserListTemplate = listTemplateOf({\n name: 'AdministrationUserList', entity: AdministrationEntityKind.User, displayName: 'Administration users', description: 'Users with name, email, role, status and last active, filtered by role, status and last active; an invite action.',\n title: 'Users', subtitle: 'Everyone with an account', searchLabel: 'Search users', urlKey: 'users', primary: { label: 'Invite user', dialog: 'AdministrationInviteUser' },\n rowActions: ['Edit', 'Suspend', 'Reset password'], bulkActions: [], titleField: 'name', recordScreen: 'admin.users.record',\n});\n\n/** The audit log: who did what to what and when, newest first. Read only - nobody edits history - and exportable. */\nexport const administrationAuditLogTemplate = listTemplateOf({\n name: 'AdministrationAuditLog', entity: AdministrationEntityKind.Audit, displayName: 'Administration audit log', description: 'Time, actor, action and target of every change, filtered by actor, action and date range; exportable.',\n title: 'Audit log', subtitle: 'Who did what, and when', searchLabel: 'Search the audit log', urlKey: 'audit', rowActions: [], bulkActions: [], titleField: 'actor', readOnly: true,\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","administrationQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","variant","imageField","toneField","fitsSlot","slots","listScreenTemplate","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","administrationMetadata","administrationUserListTemplate","AdministrationEntityKind","User","administrationAuditLogTemplate","Audit"],"mappings":";;;;;AAAA;A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AAAA,EAAa,0BAAA;IAA4BC,WAAAA,EAAa,uGAAA;IAC9HvC,KAAAA,EAAO,WAAA;IAAasB,QAAAA,EAAU,wBAAA;IAA0BG,WAAAA,EAAa,sBAAA;IAAwBlB,MAAAA,EAAQ,OAAA;AAASE,IAAAA,UAAAA,EAAY,EAAE;AAAE2B,IAAAA,WAAAA,EAAa,EAAE;IAAEhC,UAAAA,EAAY,OAAA;IAASM,QAAAA,EAAU;AAClL,CAAA;;"}
1
+ {"version":3,"file":"listTemplates.js","sources":["../../../templates/listTemplates.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 { InteractionActionKind, InteractionTriggerKind, NotificationLevel, NotifyAction, ScreenTemplate, TemplateScope } from '@cratis/scene.model';\nimport { listScreenTemplate } from '@cratis/scene.blueprint.default';\nimport { AdministrationEntityKind, fromQuery, administrationQueriesOf, localeOfData } from '../administrationQueries';\nimport { actionButton, component, goesTo, administrationMetadata, opensDialog, opensRecordOnSelect, withBehaviors } from '../administrationParts';\n\nconst listScopes = [TemplateScope.Module, TemplateScope.Feature];\n\n/** The Export button: it tells the user the export has started, which is what the shell does for a long-running action it does not wait on. */\nconst exportAction = (id: string) => withBehaviors(actionButton(id, 'Export', 'secondary'), [{\n bindings: [{\n trigger: { kind: InteractionTriggerKind.Click },\n actions: [{ kind: InteractionActionKind.Notify, level: NotificationLevel.Info, message: { text: 'The export has started.' } } as unknown as NotifyAction],\n }],\n}]);\n\ninterface ListOptions {\n name: string;\n entity: AdministrationEntityKind;\n displayName: string;\n description: string;\n title: string;\n subtitle: string;\n searchLabel: string;\n urlKey: string;\n /** The primary action of the header: a quick-create dialog to open, or a screen to go to; absent for a list that is only read and exported. */\n primary?: { label: string; dialog?: string; screen?: string };\n rowActions: string[];\n bulkActions: string[];\n titleField: string;\n /** The screen a chosen row opens; the list then selects one row at a time. Absent, rows are selected many at a time for the bulk bar. */\n recordScreen?: string;\n /** Rows are not selectable at all: a record of what happened, which nobody edits. */\n readOnly?: boolean;\n /** Show the records as cards, each with the picture its `imageField` names. */\n cards?: { imageField: string };\n /** Tint a row by the tone in this field (always beside a status column that says the same in words). */\n toneField?: string;\n}\n\n/**\n * One Administration list: the foundation `ListScreen` with its header, toolbar, filters, list and bulk bar filled for an entity. The slots, arrangement and\n * every behavior - sort, search, paging and selection in the address, the table collapsing to cards on a phone - are the foundation's.\n */\nfunction listTemplateOf(options: ListOptions): ScreenTemplate {\n const queries = administrationQueriesOf(options.entity);\n const id = options.name;\n const listId = `${id}-records`;\n const primary = options.primary && withBehaviors(actionButton(`${id}-primary`, options.primary.label, 'primary'), options.primary.dialog ? opensDialog(options.primary.dialog) : goesTo(options.primary.screen!));\n const list = component(listId, 'dataList', {\n label: options.title, rows: fromQuery(queries.rows), columns: fromQuery(queries.columns), titleField: options.titleField, pageSize: options.cards ? 12 : 10, urlKey: options.urlKey, ...localeOfData,\n rowActions: options.rowActions,\n ...(options.readOnly ? {} : { selectionMode: options.recordScreen ? 'single' : 'multiple' }),\n ...(options.cards ? { variant: 'cards', imageField: options.cards.imageField } : {}),\n ...(options.toneField ? { toneField: options.toneField } : {}),\n });\n\n return {\n name: options.name,\n fitsSlot: 'content',\n slots: listScreenTemplate.slots,\n outlets: listScreenTemplate.outlets,\n arrangement: listScreenTemplate.arrangement,\n content: {\n header: [component(`${id}-header`, 'pageHeader', { title: options.title, subtitle: options.subtitle }, { actions: primary ? [exportAction(`${id}-export`), primary] : [exportAction(`${id}-export`)] })],\n toolbar: [\n component(`${id}-search`, 'globalSearch', { placeholder: options.searchLabel, label: options.searchLabel, urlKey: `${options.urlKey}q` }),\n component(`${id}-views`, 'savedViewsMenu', { views: fromQuery(queries.views), savePermission: 'enabled', managePermission: 'enabled' }),\n component(`${id}-columns`, 'columnChooser', { columns: fromQuery(queries.columnChoices) }),\n ],\n filters: [component(`${id}-filter`, 'filterBuilder', { fields: fromQuery(queries.filterFields), ...localeOfData })],\n list: [options.recordScreen ? withBehaviors(list, opensRecordOnSelect(listId, options.recordScreen)) : list],\n bulkBar: options.recordScreen || options.readOnly ? [] : [component(`${id}-bulk`, 'bulkBar', { selection: fromQuery(queries.selection), actions: options.bulkActions })],\n footer: [],\n },\n displayName: options.displayName,\n description: options.description,\n metadata: administrationMetadata(options.name, 'List', listScopes),\n };\n}\n\n/** The users: everyone with an account, with their role, status and when they were last active. Choosing a row opens the user; **Invite** opens the invitation dialog. */\nexport const administrationUserListTemplate = listTemplateOf({\n name: 'AdministrationUserList', entity: AdministrationEntityKind.User, displayName: 'Administration users', description: 'Users with name, email, role, status and last active, filtered by role, status and last active; an invite action.',\n title: 'Users', subtitle: 'Everyone with an account', searchLabel: 'Search users', urlKey: 'users', primary: { label: 'Invite user', dialog: 'AdministrationInviteUser' },\n rowActions: ['Edit', 'Suspend', 'Reset password'], bulkActions: [], titleField: 'name', recordScreen: 'admin.users.record',\n});\n\n/** The audit log: who did what to what and when, newest first. Read only - nobody edits history - and exportable. */\nexport const administrationAuditLogTemplate = listTemplateOf({\n name: 'AdministrationAuditLog', entity: AdministrationEntityKind.Audit, displayName: 'Administration audit log', description: 'Time, actor, action and target of every change, filtered by actor, action and date range; exportable.',\n title: 'Audit log', subtitle: 'Who did what, and when', searchLabel: 'Search the audit log', urlKey: 'audit', rowActions: [], bulkActions: [], titleField: 'actor', readOnly: true,\n});\n"],"names":["listScopes","TemplateScope","Module","Feature","exportAction","id","withBehaviors","actionButton","bindings","trigger","kind","InteractionTriggerKind","Click","actions","InteractionActionKind","Notify","level","NotificationLevel","Info","message","text","listTemplateOf","options","queries","administrationQueriesOf","entity","name","listId","primary","label","dialog","opensDialog","goesTo","screen","list","component","title","rows","fromQuery","columns","titleField","pageSize","cards","urlKey","localeOfData","rowActions","readOnly","selectionMode","recordScreen","variant","imageField","toneField","fitsSlot","slots","listScreenTemplate","outlets","arrangement","content","header","subtitle","toolbar","placeholder","searchLabel","views","savePermission","managePermission","columnChoices","filters","fields","filterFields","opensRecordOnSelect","bulkBar","selection","bulkActions","footer","displayName","description","metadata","administrationMetadata","administrationUserListTemplate","AdministrationEntityKind","User","administrationAuditLogTemplate","Audit"],"mappings":";;;;;AAAA;AACA;AAOA,MAAMA,UAAAA,GAAa;AAACC,IAAAA,aAAAA,CAAcC,MAAM;AAAED,IAAAA,aAAAA,CAAcE;AAAQ,CAAA;AAEhE,gJACA,MAAMC,YAAAA,GAAe,CAACC,KAAeC,aAAAA,CAAcC,YAAAA,CAAaF,EAAAA,EAAI,QAAA,EAAU,WAAA,CAAA,EAAc;AAAC,QAAA;YACzFG,QAAAA,EAAU;AAAC,gBAAA;oBACPC,OAAAA,EAAS;AAAEC,wBAAAA,IAAAA,EAAMC,uBAAuBC;AAAM,qBAAA;oBAC9CC,OAAAA,EAAS;AAAC,wBAAA;AAAEH,4BAAAA,IAAAA,EAAMI,sBAAsBC,MAAM;AAAEC,4BAAAA,KAAAA,EAAOC,kBAAkBC,IAAI;4BAAEC,OAAAA,EAAS;gCAAEC,IAAAA,EAAM;AAA0B;AAAE;AAA6B;AAC7J;AAAE;AACN;AAAE,KAAA,CAAA;AA0BF;;;IAIA,SAASC,eAAeC,OAAoB,EAAA;IACxC,MAAMC,OAAAA,GAAUC,uBAAAA,CAAwBF,OAAAA,CAAQG,MAAM,CAAA;IACtD,MAAMpB,EAAAA,GAAKiB,QAAQI,IAAI;AACvB,IAAA,MAAMC,MAAAA,GAAS,CAAA,EAAGtB,EAAAA,CAAG,QAAQ,CAAC;AAC9B,IAAA,MAAMuB,OAAAA,GAAUN,OAAAA,CAAQM,OAAO,IAAItB,cAAcC,YAAAA,CAAa,CAAA,EAAGF,EAAAA,CAAG,QAAQ,CAAC,EAAEiB,OAAAA,CAAQM,OAAO,CAACC,KAAK,EAAE,SAAA,CAAA,EAAYP,OAAAA,CAAQM,OAAO,CAACE,MAAM,GAAGC,YAAYT,OAAAA,CAAQM,OAAO,CAACE,MAAM,CAAA,GAAIE,MAAAA,CAAOV,OAAAA,CAAQ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AQQ,YAAAA,EAAc;AAC1G,CAAA;AAEA,sHACO,MAAMkC,8BAAAA,GAAiC7D,cAAAA,CAAe;IACzDK,IAAAA,EAAM,wBAAA;AAA0BD,IAAAA,MAAAA,EAAQuD,yBAAyBG,KAAK;IAAER,WAAAA,EAAa,0BAAA;IAA4BC,WAAAA,EAAa,uGAAA;IAC9HxC,KAAAA,EAAO,WAAA;IAAauB,QAAAA,EAAU,wBAAA;IAA0BG,WAAAA,EAAa,sBAAA;IAAwBnB,MAAAA,EAAQ,OAAA;AAASE,IAAAA,UAAAA,EAAY,EAAE;AAAE4B,IAAAA,WAAAA,EAAa,EAAE;IAAEjC,UAAAA,EAAY,OAAA;IAASM,QAAAA,EAAU;AAClL,CAAA;;"}
@@ -1 +1 @@
1
- {"version":3,"file":"recordTemplates.d.ts","sourceRoot":"","sources":["../../../templates/recordTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAWpE,eAAO,MAAM,8BAA8B,EAAE,cA6B5C,CAAC"}
1
+ {"version":3,"file":"recordTemplates.d.ts","sourceRoot":"","sources":["../../../templates/recordTemplates.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAiB,MAAM,qBAAqB,CAAC;AAWpE,eAAO,MAAM,8BAA8B,EAAE,cA8B5C,CAAC"}