@seatlayer/angular 0.105.1 → 0.106.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
|
@@ -29,10 +29,14 @@ also re-exports the plain JavaScript `SeatPickerWidget` class and the
|
|
|
29
29
|
`seatlayer-seating-chart` selector.
|
|
30
30
|
- `SeatLayerSeasonPickerComponent`: fixed-inclusion Season selection and
|
|
31
31
|
returning-holder intent with the `seatlayer-season-picker` selector.
|
|
32
|
+
- `SeatLayerSeatManagerComponent`: the organizer control room, for dashboards
|
|
33
|
+
that monitor and block live inventory, with the `seatlayer-seat-manager`
|
|
34
|
+
selector. It lives on its own entry, `@seatlayer/angular/manager`, so a buyer
|
|
35
|
+
app never carries it.
|
|
32
36
|
- `SeatPickerWidget`: the framework-agnostic one-call buyer modal.
|
|
33
37
|
- `attachPickerFrame`: the host-side iframe helper for embedded pickers.
|
|
34
38
|
- An Angular Package Format build (`fesm2022`) with TypeScript declarations at
|
|
35
|
-
`dist/index.d.ts
|
|
39
|
+
`dist/index.d.ts`, plus the `@seatlayer/angular/manager` entry.
|
|
36
40
|
|
|
37
41
|
## Requirements
|
|
38
42
|
|
|
@@ -207,6 +211,82 @@ throwing, so a template ref used one frame early is safe.
|
|
|
207
211
|
> `holdSelection()` rather than `hold()`: `hold` is already the name of the
|
|
208
212
|
> `@Output`, and a class cannot have both.
|
|
209
213
|
|
|
214
|
+
## Embed the live control room
|
|
215
|
+
|
|
216
|
+
Import `SeatLayerSeatManagerComponent` from `@seatlayer/angular/manager`, not
|
|
217
|
+
from the package root. That entry holds the control room and nothing else, so
|
|
218
|
+
your buyer pages stay the same size.
|
|
219
|
+
|
|
220
|
+
Pass a short-lived, event-scoped manage token minted by your backend. The
|
|
221
|
+
`token` input takes an `mse_` browser grant. Tenant `sk_` secrets do not work
|
|
222
|
+
in browser code and must stay on your server. Keep the grant in memory, never
|
|
223
|
+
in a URL, browser storage, or logs.
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
import { Component } from '@angular/core';
|
|
227
|
+
import {
|
|
228
|
+
SeatLayerSeatManagerComponent,
|
|
229
|
+
type SeatManagerMode,
|
|
230
|
+
type SeatManagerOpenOrder,
|
|
231
|
+
type SeatManagerRoomState,
|
|
232
|
+
} from '@seatlayer/angular/manager';
|
|
233
|
+
|
|
234
|
+
@Component({
|
|
235
|
+
selector: 'app-control-room',
|
|
236
|
+
standalone: true,
|
|
237
|
+
imports: [SeatLayerSeatManagerComponent],
|
|
238
|
+
template: `
|
|
239
|
+
<seatlayer-seat-manager
|
|
240
|
+
#room
|
|
241
|
+
apiBase="https://api.seatlayer.io"
|
|
242
|
+
eventKey="ev_9f3a"
|
|
243
|
+
[token]="session.token"
|
|
244
|
+
[tokenExpiresAt]="session.expiresAt"
|
|
245
|
+
[onTokenRefresh]="mintManageSession"
|
|
246
|
+
[(mode)]="mode"
|
|
247
|
+
(roomStateChange)="onRoomState($event)"
|
|
248
|
+
(openOrder)="openOrder($event)"
|
|
249
|
+
style="height: calc(100vh - 96px)"
|
|
250
|
+
/>
|
|
251
|
+
<button (click)="room.showObjects(resaleSeats, 'Resale')">Show resale seats</button>
|
|
252
|
+
`,
|
|
253
|
+
})
|
|
254
|
+
export class ControlRoomComponent {
|
|
255
|
+
mode: SeatManagerMode = 'view';
|
|
256
|
+
// session, mintManageSession, resaleSeats, onRoomState and openOrder are yours.
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The inputs are the `SeatManager` options from `@seatlayer/js/manager`, without
|
|
261
|
+
`container`. The board is rebuilt only when `eventKey` or `apiBase` changes.
|
|
262
|
+
These inputs change the running board in place, keeping the camera, selection,
|
|
263
|
+
live connection and DOM: `token`, `tokenExpiresAt`, `onTokenRefresh`,
|
|
264
|
+
`capabilities`, `currency`, `theme`, `themeMode`, `keepLiveWhileHidden`,
|
|
265
|
+
`mode`, `followLive`, `selectableObjects`, `unavailableObjectsSelectable`,
|
|
266
|
+
`unavailableObjects`, `unavailableObjectsReason`, `categoryPrices`,
|
|
267
|
+
`maxSelectedObjects`, `numberOfPlacesToSelect`, `isObjectSelectable`, `sale`
|
|
268
|
+
and `mapInsets` (the last two compared by value). The rest, such as `tools`,
|
|
269
|
+
`chrome`, `kpis`, `timeZone`, `organizationName`, `colourBy`, the `focus*`
|
|
270
|
+
inputs and `arrivedFrom`, are read once when the board opens.
|
|
271
|
+
|
|
272
|
+
Outputs: `(ready)`, `(tallies)`, `(activity)`, `(controlRoom)`,
|
|
273
|
+
`(modeChange)`, `(followLiveChange)`, `(selectionChange)`, `(objectSelected)`,
|
|
274
|
+
`(objectDeselected)`, `(selectionValidityChange)`, `(selectionValid)`,
|
|
275
|
+
`(selectionInvalid)`, `(selectionLimit)`, `(filteredSectionChange)`,
|
|
276
|
+
`(areaClick)`, `(actionComplete)`, `(connectionChange)`, `(roomStateChange)`,
|
|
277
|
+
`(errored)`, `(openOrder)` and `(openTrend)`. `mode` and `followLive` pair with
|
|
278
|
+
their change outputs, so `[(mode)]` and `[(followLive)]` work.
|
|
279
|
+
|
|
280
|
+
The room offers "Open order" and the trend link only when you bind
|
|
281
|
+
`(openOrder)` or `(openTrend)`, so it never shows a link that goes nowhere.
|
|
282
|
+
`onTokenRefresh` is a function input, like `buyerAccessTokenProvider`, because
|
|
283
|
+
the room needs the new token back.
|
|
284
|
+
|
|
285
|
+
The template ref has the same methods as the React `SeatManagerHandle`,
|
|
286
|
+
including `setMode`, `block`, `unblock`, `selectObjects`, `focusSection`,
|
|
287
|
+
`getReport`, `getConnection` and `showObjects`. The `[focusSection]` input
|
|
288
|
+
opens the room on a section; the `focusSection()` method frames one later.
|
|
289
|
+
|
|
210
290
|
## Zone behaviour
|
|
211
291
|
|
|
212
292
|
The chart runs a `requestAnimationFrame` render loop and its own pointer
|
package/dist/README.md
CHANGED
|
@@ -29,10 +29,14 @@ also re-exports the plain JavaScript `SeatPickerWidget` class and the
|
|
|
29
29
|
`seatlayer-seating-chart` selector.
|
|
30
30
|
- `SeatLayerSeasonPickerComponent`: fixed-inclusion Season selection and
|
|
31
31
|
returning-holder intent with the `seatlayer-season-picker` selector.
|
|
32
|
+
- `SeatLayerSeatManagerComponent`: the organizer control room, for dashboards
|
|
33
|
+
that monitor and block live inventory, with the `seatlayer-seat-manager`
|
|
34
|
+
selector. It lives on its own entry, `@seatlayer/angular/manager`, so a buyer
|
|
35
|
+
app never carries it.
|
|
32
36
|
- `SeatPickerWidget`: the framework-agnostic one-call buyer modal.
|
|
33
37
|
- `attachPickerFrame`: the host-side iframe helper for embedded pickers.
|
|
34
38
|
- An Angular Package Format build (`fesm2022`) with TypeScript declarations at
|
|
35
|
-
`dist/index.d.ts
|
|
39
|
+
`dist/index.d.ts`, plus the `@seatlayer/angular/manager` entry.
|
|
36
40
|
|
|
37
41
|
## Requirements
|
|
38
42
|
|
|
@@ -207,6 +211,82 @@ throwing, so a template ref used one frame early is safe.
|
|
|
207
211
|
> `holdSelection()` rather than `hold()`: `hold` is already the name of the
|
|
208
212
|
> `@Output`, and a class cannot have both.
|
|
209
213
|
|
|
214
|
+
## Embed the live control room
|
|
215
|
+
|
|
216
|
+
Import `SeatLayerSeatManagerComponent` from `@seatlayer/angular/manager`, not
|
|
217
|
+
from the package root. That entry holds the control room and nothing else, so
|
|
218
|
+
your buyer pages stay the same size.
|
|
219
|
+
|
|
220
|
+
Pass a short-lived, event-scoped manage token minted by your backend. The
|
|
221
|
+
`token` input takes an `mse_` browser grant. Tenant `sk_` secrets do not work
|
|
222
|
+
in browser code and must stay on your server. Keep the grant in memory, never
|
|
223
|
+
in a URL, browser storage, or logs.
|
|
224
|
+
|
|
225
|
+
```ts
|
|
226
|
+
import { Component } from '@angular/core';
|
|
227
|
+
import {
|
|
228
|
+
SeatLayerSeatManagerComponent,
|
|
229
|
+
type SeatManagerMode,
|
|
230
|
+
type SeatManagerOpenOrder,
|
|
231
|
+
type SeatManagerRoomState,
|
|
232
|
+
} from '@seatlayer/angular/manager';
|
|
233
|
+
|
|
234
|
+
@Component({
|
|
235
|
+
selector: 'app-control-room',
|
|
236
|
+
standalone: true,
|
|
237
|
+
imports: [SeatLayerSeatManagerComponent],
|
|
238
|
+
template: `
|
|
239
|
+
<seatlayer-seat-manager
|
|
240
|
+
#room
|
|
241
|
+
apiBase="https://api.seatlayer.io"
|
|
242
|
+
eventKey="ev_9f3a"
|
|
243
|
+
[token]="session.token"
|
|
244
|
+
[tokenExpiresAt]="session.expiresAt"
|
|
245
|
+
[onTokenRefresh]="mintManageSession"
|
|
246
|
+
[(mode)]="mode"
|
|
247
|
+
(roomStateChange)="onRoomState($event)"
|
|
248
|
+
(openOrder)="openOrder($event)"
|
|
249
|
+
style="height: calc(100vh - 96px)"
|
|
250
|
+
/>
|
|
251
|
+
<button (click)="room.showObjects(resaleSeats, 'Resale')">Show resale seats</button>
|
|
252
|
+
`,
|
|
253
|
+
})
|
|
254
|
+
export class ControlRoomComponent {
|
|
255
|
+
mode: SeatManagerMode = 'view';
|
|
256
|
+
// session, mintManageSession, resaleSeats, onRoomState and openOrder are yours.
|
|
257
|
+
}
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
The inputs are the `SeatManager` options from `@seatlayer/js/manager`, without
|
|
261
|
+
`container`. The board is rebuilt only when `eventKey` or `apiBase` changes.
|
|
262
|
+
These inputs change the running board in place, keeping the camera, selection,
|
|
263
|
+
live connection and DOM: `token`, `tokenExpiresAt`, `onTokenRefresh`,
|
|
264
|
+
`capabilities`, `currency`, `theme`, `themeMode`, `keepLiveWhileHidden`,
|
|
265
|
+
`mode`, `followLive`, `selectableObjects`, `unavailableObjectsSelectable`,
|
|
266
|
+
`unavailableObjects`, `unavailableObjectsReason`, `categoryPrices`,
|
|
267
|
+
`maxSelectedObjects`, `numberOfPlacesToSelect`, `isObjectSelectable`, `sale`
|
|
268
|
+
and `mapInsets` (the last two compared by value). The rest, such as `tools`,
|
|
269
|
+
`chrome`, `kpis`, `timeZone`, `organizationName`, `colourBy`, the `focus*`
|
|
270
|
+
inputs and `arrivedFrom`, are read once when the board opens.
|
|
271
|
+
|
|
272
|
+
Outputs: `(ready)`, `(tallies)`, `(activity)`, `(controlRoom)`,
|
|
273
|
+
`(modeChange)`, `(followLiveChange)`, `(selectionChange)`, `(objectSelected)`,
|
|
274
|
+
`(objectDeselected)`, `(selectionValidityChange)`, `(selectionValid)`,
|
|
275
|
+
`(selectionInvalid)`, `(selectionLimit)`, `(filteredSectionChange)`,
|
|
276
|
+
`(areaClick)`, `(actionComplete)`, `(connectionChange)`, `(roomStateChange)`,
|
|
277
|
+
`(errored)`, `(openOrder)` and `(openTrend)`. `mode` and `followLive` pair with
|
|
278
|
+
their change outputs, so `[(mode)]` and `[(followLive)]` work.
|
|
279
|
+
|
|
280
|
+
The room offers "Open order" and the trend link only when you bind
|
|
281
|
+
`(openOrder)` or `(openTrend)`, so it never shows a link that goes nowhere.
|
|
282
|
+
`onTokenRefresh` is a function input, like `buyerAccessTokenProvider`, because
|
|
283
|
+
the room needs the new token back.
|
|
284
|
+
|
|
285
|
+
The template ref has the same methods as the React `SeatManagerHandle`,
|
|
286
|
+
including `setMode`, `block`, `unblock`, `selectObjects`, `focusSection`,
|
|
287
|
+
`getReport`, `getConnection` and `showObjects`. The `[focusSection]` input
|
|
288
|
+
opens the room on a section; the `focusSection()` method frames one later.
|
|
289
|
+
|
|
210
290
|
## Zone behaviour
|
|
211
291
|
|
|
212
292
|
The chart runs a `requestAnimationFrame` render loop and its own pointer
|
|
@@ -0,0 +1,545 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { EventEmitter, inject, NgZone, DestroyRef, ViewChild, Output, Input, ChangeDetectionStrategy, Component } from '@angular/core';
|
|
3
|
+
import { SeatManager } from '@seatlayer/js/manager';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* True when the host bound a handler to this output. Read once, when the board
|
|
7
|
+
* is built: the room only offers "Open order" and the trend link to a host
|
|
8
|
+
* that can follow them. `observed` is rxjs 7; `observers` covers rxjs 6, which
|
|
9
|
+
* Angular 17 still accepts.
|
|
10
|
+
*/
|
|
11
|
+
function hasHandler(emitter) {
|
|
12
|
+
const subject = emitter;
|
|
13
|
+
return subject.observed ?? (subject.observers?.length ?? 0) > 0;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Angular wrapper around the organizer control room from `@seatlayer/js/manager`.
|
|
17
|
+
*
|
|
18
|
+
* Standalone, so it is imported directly rather than through an NgModule. Give
|
|
19
|
+
* the element a size (it fills its box). The board is rebuilt only when
|
|
20
|
+
* `eventKey` or `apiBase` changes. The inputs `@seatlayer/react` updates in
|
|
21
|
+
* place reach the running board through its setters, so camera, selection,
|
|
22
|
+
* live connection and DOM survive; every other input is read once when the
|
|
23
|
+
* board is built.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```html
|
|
27
|
+
* <seatlayer-seat-manager
|
|
28
|
+
* #room
|
|
29
|
+
* eventKey="ev_9f3a"
|
|
30
|
+
* [token]="session.token"
|
|
31
|
+
* [tokenExpiresAt]="session.expiresAt"
|
|
32
|
+
* [onTokenRefresh]="mintManageSession"
|
|
33
|
+
* [(mode)]="mode"
|
|
34
|
+
* (roomStateChange)="onRoomState($event)"
|
|
35
|
+
* (openOrder)="openOrder($event)"
|
|
36
|
+
* />
|
|
37
|
+
* <button (click)="room.showObjects(resaleSeats, 'Resale')">Show resale</button>
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
class SeatLayerSeatManagerComponent {
|
|
41
|
+
/** Event to manage. Changing it rebuilds the board. */
|
|
42
|
+
eventKey;
|
|
43
|
+
/** API base URL. Changing it rebuilds the board. */
|
|
44
|
+
apiBase;
|
|
45
|
+
/** Short-lived, event-scoped `mse_` grant from your backend. Live. */
|
|
46
|
+
token;
|
|
47
|
+
/** When `token` expires, epoch ms. Live. */
|
|
48
|
+
tokenExpiresAt;
|
|
49
|
+
/**
|
|
50
|
+
* Mint a fresh grant before the current one expires. Live. A function input,
|
|
51
|
+
* like `buyerAccessTokenProvider` on the seating chart, because the room
|
|
52
|
+
* needs the new token back.
|
|
53
|
+
*/
|
|
54
|
+
onTokenRefresh;
|
|
55
|
+
/** The tool the board shows. Live; pairs with `modeChange` for `[(mode)]`. */
|
|
56
|
+
mode;
|
|
57
|
+
/** Which tools the board offers. Read once. */
|
|
58
|
+
tools;
|
|
59
|
+
/** `minimal` shows just the map. Read once. */
|
|
60
|
+
chrome;
|
|
61
|
+
/** What the token may do. Live. */
|
|
62
|
+
capabilities;
|
|
63
|
+
/** Fallback currency for money. Live. */
|
|
64
|
+
currency;
|
|
65
|
+
/** Colour overrides. Live. */
|
|
66
|
+
theme;
|
|
67
|
+
/** `light`, `dark` or `auto`. Applied before first paint, then live. */
|
|
68
|
+
themeMode;
|
|
69
|
+
/** Keep the realtime link open while the tab is hidden. Live. */
|
|
70
|
+
keepLiveWhileHidden;
|
|
71
|
+
/** Follow new bookings on the map. Live; pairs with `followLiveChange`. */
|
|
72
|
+
followLive;
|
|
73
|
+
/** Seats selected once the board loads. Read once. */
|
|
74
|
+
selectedObjects;
|
|
75
|
+
/** Seats the operator may select. Live. */
|
|
76
|
+
selectableObjects;
|
|
77
|
+
/** Whether unavailable seats can be selected. Live. */
|
|
78
|
+
unavailableObjectsSelectable;
|
|
79
|
+
/** Seats shown as unavailable. Live. */
|
|
80
|
+
unavailableObjects;
|
|
81
|
+
/** The hover word for `unavailableObjects`. Live. */
|
|
82
|
+
unavailableObjectsReason;
|
|
83
|
+
/** Prices the map's hover shows: a map overrides, null hides. Live. */
|
|
84
|
+
categoryPrices;
|
|
85
|
+
/** Cap on the selection. Live. */
|
|
86
|
+
maxSelectedObjects;
|
|
87
|
+
/** Exact count a valid selection needs. Live. */
|
|
88
|
+
numberOfPlacesToSelect;
|
|
89
|
+
/** Per-seat selectability rule. Live. */
|
|
90
|
+
isObjectSelectable;
|
|
91
|
+
/** False when your own header shows the numbers. Read once. */
|
|
92
|
+
kpis;
|
|
93
|
+
/** The event's clock for every time the room shows. Read once. */
|
|
94
|
+
timeZone;
|
|
95
|
+
/** Shown in "Ask an admin of …". Read once. */
|
|
96
|
+
organizationName;
|
|
97
|
+
/** What you know about the sale. Live, compared by value. */
|
|
98
|
+
sale;
|
|
99
|
+
/** Room your own overlays take over the map, in px. Live, compared by value. */
|
|
100
|
+
mapInsets;
|
|
101
|
+
/** What the map's colours mean when the room opens. Read once. */
|
|
102
|
+
colourBy;
|
|
103
|
+
/**
|
|
104
|
+
* Open on this section. Read once. Bound as `[focusSection]`; the class
|
|
105
|
+
* field has another name because `focusSection()` is the handle method that
|
|
106
|
+
* frames a section later, as on React's handle.
|
|
107
|
+
*/
|
|
108
|
+
focusSectionOnOpen;
|
|
109
|
+
/** Open on this seat. Read once. */
|
|
110
|
+
focusSeat;
|
|
111
|
+
/** Open on these seats (an order's seats). Read once. */
|
|
112
|
+
focusSeats;
|
|
113
|
+
/** Open on this category. Read once. */
|
|
114
|
+
focusCategory;
|
|
115
|
+
/** Where the operator came from, for the way back. Read once. */
|
|
116
|
+
arrivedFrom;
|
|
117
|
+
/** The board has loaded. */
|
|
118
|
+
ready = new EventEmitter();
|
|
119
|
+
/** Live numbers changed. */
|
|
120
|
+
tallies = new EventEmitter();
|
|
121
|
+
/** Something happened on the event. */
|
|
122
|
+
activity = new EventEmitter();
|
|
123
|
+
/** A fresh control room snapshot. */
|
|
124
|
+
controlRoom = new EventEmitter();
|
|
125
|
+
/** The operator switched tools. */
|
|
126
|
+
modeChange = new EventEmitter();
|
|
127
|
+
/** Follow-live was switched on or off. */
|
|
128
|
+
followLiveChange = new EventEmitter();
|
|
129
|
+
/** The selection changed. */
|
|
130
|
+
selectionChange = new EventEmitter();
|
|
131
|
+
/** One seat was selected. */
|
|
132
|
+
objectSelected = new EventEmitter();
|
|
133
|
+
/** One seat was deselected. */
|
|
134
|
+
objectDeselected = new EventEmitter();
|
|
135
|
+
/** Exact-count state changed. */
|
|
136
|
+
selectionValidityChange = new EventEmitter();
|
|
137
|
+
/** The selection became valid. */
|
|
138
|
+
selectionValid = new EventEmitter();
|
|
139
|
+
/** The selection became invalid. */
|
|
140
|
+
selectionInvalid = new EventEmitter();
|
|
141
|
+
/** The selection cap was reached. */
|
|
142
|
+
selectionLimit = new EventEmitter();
|
|
143
|
+
/** The filtered sections changed. */
|
|
144
|
+
filteredSectionChange = new EventEmitter();
|
|
145
|
+
/** A general-admission area was clicked. */
|
|
146
|
+
areaClick = new EventEmitter();
|
|
147
|
+
/** A block, unblock or other action finished. */
|
|
148
|
+
actionComplete = new EventEmitter();
|
|
149
|
+
/** The realtime link changed state. */
|
|
150
|
+
connectionChange = new EventEmitter();
|
|
151
|
+
/** The room changed state: connecting, live, paused, offline or ended. */
|
|
152
|
+
roomStateChange = new EventEmitter();
|
|
153
|
+
/** Something failed. */
|
|
154
|
+
errored = new EventEmitter();
|
|
155
|
+
/**
|
|
156
|
+
* The operator opened one of your orders. Only when this is bound does the
|
|
157
|
+
* room offer "Open order", so it never shows a dead link.
|
|
158
|
+
*/
|
|
159
|
+
openOrder = new EventEmitter();
|
|
160
|
+
/** The operator opened your trend view for a number. Only offered when bound. */
|
|
161
|
+
openTrend = new EventEmitter();
|
|
162
|
+
/** Sections on a chart without any offers "Open the designer". Only offered when bound. */
|
|
163
|
+
openDesigner = new EventEmitter();
|
|
164
|
+
container;
|
|
165
|
+
zone = inject(NgZone);
|
|
166
|
+
manager = null;
|
|
167
|
+
constructor() {
|
|
168
|
+
inject(DestroyRef).onDestroy(() => this.destroy());
|
|
169
|
+
}
|
|
170
|
+
ngOnChanges(changes) {
|
|
171
|
+
// Identity: a new event or API is a new board. The build reads every
|
|
172
|
+
// input's current value, so nothing else needs applying on this pass.
|
|
173
|
+
if (!this.manager || 'eventKey' in changes || 'apiBase' in changes) {
|
|
174
|
+
this.build();
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
const manager = this.manager;
|
|
178
|
+
const changed = (name) => name in changes;
|
|
179
|
+
// Live inputs: the same set, the same setters and the same fallbacks as
|
|
180
|
+
// the React wrapper's effects. Outside the zone, like the board itself:
|
|
181
|
+
// a repaint must not schedule change detection for the whole app.
|
|
182
|
+
this.zone.runOutsideAngular(() => {
|
|
183
|
+
if (changed('token') || changed('tokenExpiresAt'))
|
|
184
|
+
manager.setToken(this.token, this.tokenExpiresAt);
|
|
185
|
+
if (changed('capabilities'))
|
|
186
|
+
manager.setCapabilities(this.capabilities);
|
|
187
|
+
if (changed('currency'))
|
|
188
|
+
manager.setCurrency(this.currency);
|
|
189
|
+
if (changed('theme'))
|
|
190
|
+
manager.setTheme(this.theme);
|
|
191
|
+
if (changed('sale') && saleChanged(changes['sale'].previousValue, this.sale))
|
|
192
|
+
manager.setSale(this.sale);
|
|
193
|
+
if (changed('mapInsets') && insetsChanged(changes['mapInsets'].previousValue, this.mapInsets)) {
|
|
194
|
+
manager.setMapInsets(this.mapInsets ?? null);
|
|
195
|
+
}
|
|
196
|
+
if (changed('themeMode'))
|
|
197
|
+
manager.setThemeMode(this.themeMode);
|
|
198
|
+
if (changed('keepLiveWhileHidden'))
|
|
199
|
+
manager.setKeepLiveWhileHidden(this.keepLiveWhileHidden);
|
|
200
|
+
if (changed('onTokenRefresh') && !!changes['onTokenRefresh'].previousValue !== !!this.onTokenRefresh) {
|
|
201
|
+
manager.setTokenRefresh(this.tokenRefresh());
|
|
202
|
+
}
|
|
203
|
+
if (changed('mode') && this.mode)
|
|
204
|
+
manager.setMode(this.mode);
|
|
205
|
+
if (changed('followLive') && this.followLive != null)
|
|
206
|
+
manager.setFollowLive(this.followLive);
|
|
207
|
+
if (changed('selectableObjects'))
|
|
208
|
+
manager.setSelectableObjects(this.selectableObjects ?? []);
|
|
209
|
+
if (changed('unavailableObjectsSelectable')) {
|
|
210
|
+
manager.setUnavailableObjectsSelectable(this.unavailableObjectsSelectable ?? true);
|
|
211
|
+
}
|
|
212
|
+
if (changed('unavailableObjects') || changed('unavailableObjectsReason')) {
|
|
213
|
+
manager.setUnavailableObjects(this.unavailableObjects ?? [], this.unavailableObjectsReason);
|
|
214
|
+
}
|
|
215
|
+
if (changed('categoryPrices'))
|
|
216
|
+
manager.setCategoryPrices(this.categoryPrices);
|
|
217
|
+
if (changed('maxSelectedObjects'))
|
|
218
|
+
manager.setMaxSelectedObjects(this.maxSelectedObjects);
|
|
219
|
+
if (changed('numberOfPlacesToSelect'))
|
|
220
|
+
manager.setNumberOfPlacesToSelect(this.numberOfPlacesToSelect);
|
|
221
|
+
if (changed('isObjectSelectable'))
|
|
222
|
+
manager.setObjectSelectable(this.isObjectSelectable);
|
|
223
|
+
});
|
|
224
|
+
}
|
|
225
|
+
// ---------- imperative API, for a template ref ----------
|
|
226
|
+
// The same methods as SeatManagerHandle in @seatlayer/react.
|
|
227
|
+
setMode(mode) { this.manager?.setMode(mode); }
|
|
228
|
+
setToken(token, expiresAt) { this.manager?.setToken(token, expiresAt); }
|
|
229
|
+
setHeatOverlay(enabled) { this.manager?.setHeatOverlay(enabled); }
|
|
230
|
+
setFollowLive(enabled) { this.manager?.setFollowLive(enabled); }
|
|
231
|
+
setTrendWindow(windowMinutes) {
|
|
232
|
+
return this.manager?.setTrendWindow(windowMinutes) ?? Promise.reject(new Error('not ready'));
|
|
233
|
+
}
|
|
234
|
+
enterFullscreen() { return this.manager?.enterFullscreen() ?? Promise.resolve(); }
|
|
235
|
+
exitFullscreen() { return this.manager?.exitFullscreen() ?? Promise.resolve(); }
|
|
236
|
+
isFullscreen() { return this.manager?.isFullscreen() ?? false; }
|
|
237
|
+
block(labels, opts) {
|
|
238
|
+
return this.manager?.block(labels, opts) ?? Promise.resolve();
|
|
239
|
+
}
|
|
240
|
+
unblock(labels) { return this.manager?.unblock(labels) ?? Promise.resolve(); }
|
|
241
|
+
unblockAll() { return this.manager?.unblockAll() ?? Promise.resolve(); }
|
|
242
|
+
cancelBooking(labels, bookingRef) {
|
|
243
|
+
return this.manager?.cancelBooking(labels, bookingRef) ?? Promise.resolve();
|
|
244
|
+
}
|
|
245
|
+
setCategory(categoryKey, labels) {
|
|
246
|
+
return this.manager?.setCategory(categoryKey, labels) ?? Promise.resolve();
|
|
247
|
+
}
|
|
248
|
+
setTableBooking(tableIds, mode, bounds) {
|
|
249
|
+
return this.manager?.setTableBooking(tableIds, mode, bounds) ?? Promise.resolve();
|
|
250
|
+
}
|
|
251
|
+
selectAll() { return this.manager?.selectAll() ?? []; }
|
|
252
|
+
selectSection(sectionId) { return this.manager?.selectSection(sectionId) ?? []; }
|
|
253
|
+
selectByLabels(labels) { return this.manager?.selectByLabels(labels) ?? []; }
|
|
254
|
+
selectObjects(labels) { return this.manager?.selectObjects(labels) ?? []; }
|
|
255
|
+
deselectObjects(labels) { return this.manager?.deselectObjects(labels) ?? []; }
|
|
256
|
+
selectCategories(keys) { return this.manager?.selectCategories(keys) ?? []; }
|
|
257
|
+
deselectCategories(keys) { return this.manager?.deselectCategories(keys) ?? []; }
|
|
258
|
+
setSelectableObjects(labels) { this.manager?.setSelectableObjects(labels); }
|
|
259
|
+
setUnavailableObjectsSelectable(enabled) { this.manager?.setUnavailableObjectsSelectable(enabled); }
|
|
260
|
+
/** Replace the labels shown as unavailable (and their hover word) without remounting. */
|
|
261
|
+
setUnavailableObjects(labels, reason) {
|
|
262
|
+
this.manager?.setUnavailableObjects(labels, reason);
|
|
263
|
+
}
|
|
264
|
+
/** Replace the prices the map's hover shows: a map overrides, null hides, undefined uses the chart's. */
|
|
265
|
+
setCategoryPrices(prices) {
|
|
266
|
+
this.manager?.setCategoryPrices(prices);
|
|
267
|
+
}
|
|
268
|
+
setObjectSelectable(predicate) { this.manager?.setObjectSelectable(predicate); }
|
|
269
|
+
setMaxSelectedObjects(max) { this.manager?.setMaxSelectedObjects(max); }
|
|
270
|
+
setNumberOfPlacesToSelect(required) {
|
|
271
|
+
this.manager?.setNumberOfPlacesToSelect(required);
|
|
272
|
+
}
|
|
273
|
+
getSelectionValidity() { return this.manager?.getSelectionValidity() ?? null; }
|
|
274
|
+
setFilteredSection(label) { return this.manager?.setFilteredSection(label) ?? []; }
|
|
275
|
+
clearFilteredSection() { this.manager?.clearFilteredSection(); }
|
|
276
|
+
/** Frame matching sections in any mode, without filtering or touching the selection. */
|
|
277
|
+
focusSection(label) { return this.manager?.focusSection(label) ?? []; }
|
|
278
|
+
getFilteredSections() { return this.manager?.getFilteredSections() ?? []; }
|
|
279
|
+
clearSelection() { this.manager?.clearSelection(); }
|
|
280
|
+
getSelection() { return this.manager?.getSelection() ?? []; }
|
|
281
|
+
getReport() { return this.manager?.getReport() ?? Promise.reject(new Error('not ready')); }
|
|
282
|
+
getControlRoomSnapshot(windowMinutes) {
|
|
283
|
+
return this.manager?.getControlRoomSnapshot(windowMinutes) ?? Promise.reject(new Error('not ready'));
|
|
284
|
+
}
|
|
285
|
+
getLog(opts) {
|
|
286
|
+
return this.manager?.getLog(opts) ?? Promise.resolve({ entries: [], nextBefore: null });
|
|
287
|
+
}
|
|
288
|
+
setHoldTtl(ms) { return this.manager?.setHoldTtl(ms) ?? Promise.resolve(); }
|
|
289
|
+
/**
|
|
290
|
+
* Realtime link state plus the "as of" behind the numbers on screen. Null
|
|
291
|
+
* only before the board exists. `connectionChange` gives the edges; this
|
|
292
|
+
* gives the answer on demand.
|
|
293
|
+
*/
|
|
294
|
+
getConnection() { return this.manager?.getConnection() ?? null; }
|
|
295
|
+
zoomToFit() { this.manager?.zoomToFit(); }
|
|
296
|
+
/** Light these seats and frame them, named in the legend; null clears. */
|
|
297
|
+
showObjects(labels, name) { this.manager?.showObjects(labels, name); }
|
|
298
|
+
// ---------- internals ----------
|
|
299
|
+
/** Reads the current input on every call, so a swapped handler needs no setter. */
|
|
300
|
+
tokenRefresh() {
|
|
301
|
+
return this.onTokenRefresh
|
|
302
|
+
? () => this.zone.run(() => this.onTokenRefresh())
|
|
303
|
+
: undefined;
|
|
304
|
+
}
|
|
305
|
+
build() {
|
|
306
|
+
const element = this.container?.nativeElement;
|
|
307
|
+
if (!element)
|
|
308
|
+
return;
|
|
309
|
+
this.destroy();
|
|
310
|
+
// The board runs a render loop, timers and a socket. Left inside the
|
|
311
|
+
// Angular zone, each of them would schedule change detection for the
|
|
312
|
+
// whole app — so it is built outside, and each callback re-enters the zone
|
|
313
|
+
// only to emit.
|
|
314
|
+
this.zone.runOutsideAngular(() => {
|
|
315
|
+
const emit = (emitter, value) => this.zone.run(() => emitter.emit(value));
|
|
316
|
+
const back = this.arrivedFrom?.back;
|
|
317
|
+
const instance = new SeatManager({
|
|
318
|
+
container: element,
|
|
319
|
+
apiBase: this.apiBase,
|
|
320
|
+
eventKey: this.eventKey,
|
|
321
|
+
token: this.token,
|
|
322
|
+
tokenExpiresAt: this.tokenExpiresAt,
|
|
323
|
+
mode: this.mode,
|
|
324
|
+
currency: this.currency,
|
|
325
|
+
keepLiveWhileHidden: this.keepLiveWhileHidden,
|
|
326
|
+
followLive: this.followLive,
|
|
327
|
+
capabilities: this.capabilities,
|
|
328
|
+
selectedObjects: this.selectedObjects,
|
|
329
|
+
selectableObjects: this.selectableObjects,
|
|
330
|
+
unavailableObjectsSelectable: this.unavailableObjectsSelectable,
|
|
331
|
+
unavailableObjects: this.unavailableObjects,
|
|
332
|
+
unavailableObjectsReason: this.unavailableObjectsReason,
|
|
333
|
+
categoryPrices: this.categoryPrices,
|
|
334
|
+
maxSelectedObjects: this.maxSelectedObjects,
|
|
335
|
+
numberOfPlacesToSelect: this.numberOfPlacesToSelect,
|
|
336
|
+
isObjectSelectable: this.isObjectSelectable,
|
|
337
|
+
tools: this.tools,
|
|
338
|
+
chrome: this.chrome,
|
|
339
|
+
kpis: this.kpis,
|
|
340
|
+
timeZone: this.timeZone,
|
|
341
|
+
organizationName: this.organizationName,
|
|
342
|
+
sale: this.sale,
|
|
343
|
+
mapInsets: this.mapInsets,
|
|
344
|
+
theme: this.theme,
|
|
345
|
+
// Applied before first paint, so a board asked for light never
|
|
346
|
+
// flashes dark on the way in.
|
|
347
|
+
themeMode: this.themeMode,
|
|
348
|
+
colourBy: this.colourBy,
|
|
349
|
+
focusSection: this.focusSectionOnOpen,
|
|
350
|
+
focusSeat: this.focusSeat,
|
|
351
|
+
focusSeats: this.focusSeats,
|
|
352
|
+
focusCategory: this.focusCategory,
|
|
353
|
+
// The way back runs host code (usually the router), so it re-enters the zone.
|
|
354
|
+
arrivedFrom: this.arrivedFrom && back
|
|
355
|
+
? { ...this.arrivedFrom, back: { ...back, go: () => this.zone.run(() => back.go()) } }
|
|
356
|
+
: this.arrivedFrom,
|
|
357
|
+
// Only a host that bound the output gets the link. Left unset
|
|
358
|
+
// otherwise, so the room never offers a dead one.
|
|
359
|
+
onOpenOrder: hasHandler(this.openOrder) ? (order) => emit(this.openOrder, order) : undefined,
|
|
360
|
+
onOpenTrend: hasHandler(this.openTrend) ? (focus) => emit(this.openTrend, focus) : undefined,
|
|
361
|
+
onOpenDesigner: hasHandler(this.openDesigner) ? () => emit(this.openDesigner, undefined) : undefined,
|
|
362
|
+
onTokenRefresh: this.tokenRefresh(),
|
|
363
|
+
onReady: () => this.zone.run(() => this.ready.emit()),
|
|
364
|
+
onTallies: (tallies) => emit(this.tallies, tallies),
|
|
365
|
+
onActivity: (activity) => emit(this.activity, activity),
|
|
366
|
+
onControlRoom: (snapshot) => emit(this.controlRoom, snapshot),
|
|
367
|
+
onModeChange: (nextMode) => emit(this.modeChange, nextMode),
|
|
368
|
+
onFollowLiveChange: (enabled) => emit(this.followLiveChange, enabled),
|
|
369
|
+
onSelectionChange: (seats) => emit(this.selectionChange, seats),
|
|
370
|
+
onObjectSelected: (object) => emit(this.objectSelected, object),
|
|
371
|
+
onObjectDeselected: (object) => emit(this.objectDeselected, object),
|
|
372
|
+
onSelectionValidityChange: (state) => emit(this.selectionValidityChange, state),
|
|
373
|
+
onSelectionValid: (state) => emit(this.selectionValid, state),
|
|
374
|
+
onSelectionInvalid: (state) => emit(this.selectionInvalid, state),
|
|
375
|
+
onSelectionLimit: (max) => emit(this.selectionLimit, max),
|
|
376
|
+
onFilteredSectionChange: (sections) => emit(this.filteredSectionChange, sections),
|
|
377
|
+
onAreaClick: (area) => emit(this.areaClick, area),
|
|
378
|
+
onActionComplete: (result) => emit(this.actionComplete, result),
|
|
379
|
+
onConnectionChange: (state) => emit(this.connectionChange, state),
|
|
380
|
+
onRoomStateChange: (state) => emit(this.roomStateChange, state),
|
|
381
|
+
onError: (error) => emit(this.errored, error),
|
|
382
|
+
});
|
|
383
|
+
this.manager = instance;
|
|
384
|
+
void instance.render();
|
|
385
|
+
});
|
|
386
|
+
}
|
|
387
|
+
destroy() {
|
|
388
|
+
this.manager?.destroy();
|
|
389
|
+
this.manager = null;
|
|
390
|
+
}
|
|
391
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.29", ngImport: i0, type: SeatLayerSeatManagerComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
392
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "20.3.29", type: SeatLayerSeatManagerComponent, isStandalone: true, selector: "seatlayer-seat-manager", inputs: { eventKey: "eventKey", apiBase: "apiBase", token: "token", tokenExpiresAt: "tokenExpiresAt", onTokenRefresh: "onTokenRefresh", mode: "mode", tools: "tools", chrome: "chrome", capabilities: "capabilities", currency: "currency", theme: "theme", themeMode: "themeMode", keepLiveWhileHidden: "keepLiveWhileHidden", followLive: "followLive", selectedObjects: "selectedObjects", selectableObjects: "selectableObjects", unavailableObjectsSelectable: "unavailableObjectsSelectable", unavailableObjects: "unavailableObjects", unavailableObjectsReason: "unavailableObjectsReason", categoryPrices: "categoryPrices", maxSelectedObjects: "maxSelectedObjects", numberOfPlacesToSelect: "numberOfPlacesToSelect", isObjectSelectable: "isObjectSelectable", kpis: "kpis", timeZone: "timeZone", organizationName: "organizationName", sale: "sale", mapInsets: "mapInsets", colourBy: "colourBy", focusSectionOnOpen: ["focusSection", "focusSectionOnOpen"], focusSeat: "focusSeat", focusSeats: "focusSeats", focusCategory: "focusCategory", arrivedFrom: "arrivedFrom" }, outputs: { ready: "ready", tallies: "tallies", activity: "activity", controlRoom: "controlRoom", modeChange: "modeChange", followLiveChange: "followLiveChange", selectionChange: "selectionChange", objectSelected: "objectSelected", objectDeselected: "objectDeselected", selectionValidityChange: "selectionValidityChange", selectionValid: "selectionValid", selectionInvalid: "selectionInvalid", selectionLimit: "selectionLimit", filteredSectionChange: "filteredSectionChange", areaClick: "areaClick", actionComplete: "actionComplete", connectionChange: "connectionChange", roomStateChange: "roomStateChange", errored: "errored", openOrder: "openOrder", openTrend: "openTrend", openDesigner: "openDesigner" }, viewQueries: [{ propertyName: "container", first: true, predicate: ["container"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0, template: '<div #container class="seatlayer-container"></div>', isInline: true, styles: [":host{display:block}.seatlayer-container{width:100%;height:100%}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
393
|
+
}
|
|
394
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.29", ngImport: i0, type: SeatLayerSeatManagerComponent, decorators: [{
|
|
395
|
+
type: Component,
|
|
396
|
+
args: [{ selector: 'seatlayer-seat-manager', standalone: true, template: '<div #container class="seatlayer-container"></div>', changeDetection: ChangeDetectionStrategy.OnPush, styles: [":host{display:block}.seatlayer-container{width:100%;height:100%}\n"] }]
|
|
397
|
+
}], ctorParameters: () => [], propDecorators: { eventKey: [{
|
|
398
|
+
type: Input,
|
|
399
|
+
args: [{ required: true }]
|
|
400
|
+
}], apiBase: [{
|
|
401
|
+
type: Input
|
|
402
|
+
}], token: [{
|
|
403
|
+
type: Input,
|
|
404
|
+
args: [{ required: true }]
|
|
405
|
+
}], tokenExpiresAt: [{
|
|
406
|
+
type: Input
|
|
407
|
+
}], onTokenRefresh: [{
|
|
408
|
+
type: Input
|
|
409
|
+
}], mode: [{
|
|
410
|
+
type: Input
|
|
411
|
+
}], tools: [{
|
|
412
|
+
type: Input
|
|
413
|
+
}], chrome: [{
|
|
414
|
+
type: Input
|
|
415
|
+
}], capabilities: [{
|
|
416
|
+
type: Input
|
|
417
|
+
}], currency: [{
|
|
418
|
+
type: Input
|
|
419
|
+
}], theme: [{
|
|
420
|
+
type: Input
|
|
421
|
+
}], themeMode: [{
|
|
422
|
+
type: Input
|
|
423
|
+
}], keepLiveWhileHidden: [{
|
|
424
|
+
type: Input
|
|
425
|
+
}], followLive: [{
|
|
426
|
+
type: Input
|
|
427
|
+
}], selectedObjects: [{
|
|
428
|
+
type: Input
|
|
429
|
+
}], selectableObjects: [{
|
|
430
|
+
type: Input
|
|
431
|
+
}], unavailableObjectsSelectable: [{
|
|
432
|
+
type: Input
|
|
433
|
+
}], unavailableObjects: [{
|
|
434
|
+
type: Input
|
|
435
|
+
}], unavailableObjectsReason: [{
|
|
436
|
+
type: Input
|
|
437
|
+
}], categoryPrices: [{
|
|
438
|
+
type: Input
|
|
439
|
+
}], maxSelectedObjects: [{
|
|
440
|
+
type: Input
|
|
441
|
+
}], numberOfPlacesToSelect: [{
|
|
442
|
+
type: Input
|
|
443
|
+
}], isObjectSelectable: [{
|
|
444
|
+
type: Input
|
|
445
|
+
}], kpis: [{
|
|
446
|
+
type: Input
|
|
447
|
+
}], timeZone: [{
|
|
448
|
+
type: Input
|
|
449
|
+
}], organizationName: [{
|
|
450
|
+
type: Input
|
|
451
|
+
}], sale: [{
|
|
452
|
+
type: Input
|
|
453
|
+
}], mapInsets: [{
|
|
454
|
+
type: Input
|
|
455
|
+
}], colourBy: [{
|
|
456
|
+
type: Input
|
|
457
|
+
}], focusSectionOnOpen: [{
|
|
458
|
+
type: Input,
|
|
459
|
+
args: ['focusSection']
|
|
460
|
+
}], focusSeat: [{
|
|
461
|
+
type: Input
|
|
462
|
+
}], focusSeats: [{
|
|
463
|
+
type: Input
|
|
464
|
+
}], focusCategory: [{
|
|
465
|
+
type: Input
|
|
466
|
+
}], arrivedFrom: [{
|
|
467
|
+
type: Input
|
|
468
|
+
}], ready: [{
|
|
469
|
+
type: Output
|
|
470
|
+
}], tallies: [{
|
|
471
|
+
type: Output
|
|
472
|
+
}], activity: [{
|
|
473
|
+
type: Output
|
|
474
|
+
}], controlRoom: [{
|
|
475
|
+
type: Output
|
|
476
|
+
}], modeChange: [{
|
|
477
|
+
type: Output
|
|
478
|
+
}], followLiveChange: [{
|
|
479
|
+
type: Output
|
|
480
|
+
}], selectionChange: [{
|
|
481
|
+
type: Output
|
|
482
|
+
}], objectSelected: [{
|
|
483
|
+
type: Output
|
|
484
|
+
}], objectDeselected: [{
|
|
485
|
+
type: Output
|
|
486
|
+
}], selectionValidityChange: [{
|
|
487
|
+
type: Output
|
|
488
|
+
}], selectionValid: [{
|
|
489
|
+
type: Output
|
|
490
|
+
}], selectionInvalid: [{
|
|
491
|
+
type: Output
|
|
492
|
+
}], selectionLimit: [{
|
|
493
|
+
type: Output
|
|
494
|
+
}], filteredSectionChange: [{
|
|
495
|
+
type: Output
|
|
496
|
+
}], areaClick: [{
|
|
497
|
+
type: Output
|
|
498
|
+
}], actionComplete: [{
|
|
499
|
+
type: Output
|
|
500
|
+
}], connectionChange: [{
|
|
501
|
+
type: Output
|
|
502
|
+
}], roomStateChange: [{
|
|
503
|
+
type: Output
|
|
504
|
+
}], errored: [{
|
|
505
|
+
type: Output
|
|
506
|
+
}], openOrder: [{
|
|
507
|
+
type: Output
|
|
508
|
+
}], openTrend: [{
|
|
509
|
+
type: Output
|
|
510
|
+
}], openDesigner: [{
|
|
511
|
+
type: Output
|
|
512
|
+
}], container: [{
|
|
513
|
+
type: ViewChild,
|
|
514
|
+
args: ['container', { static: true }]
|
|
515
|
+
}] } });
|
|
516
|
+
/** By value, as React compares it: a rebuilt object with the same facts is no change. */
|
|
517
|
+
function saleChanged(previous, next) {
|
|
518
|
+
return previous?.status !== next?.status || previous?.tone !== next?.tone
|
|
519
|
+
|| previous?.openedAt !== next?.openedAt || previous?.pageUrl !== next?.pageUrl;
|
|
520
|
+
}
|
|
521
|
+
function insetsChanged(previous, next) {
|
|
522
|
+
return previous?.top !== next?.top || previous?.right !== next?.right
|
|
523
|
+
|| previous?.bottom !== next?.bottom || previous?.left !== next?.left;
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
/**
|
|
527
|
+
* `@seatlayer/angular/manager` — the organizer control room, and nothing else.
|
|
528
|
+
*
|
|
529
|
+
* An ng-packagr secondary entry point, for the same reason as
|
|
530
|
+
* `@seatlayer/js/manager` and `@seatlayer/react/manager`: a buyer app that
|
|
531
|
+
* imports `@seatlayer/angular` must never carry the control room, and a control
|
|
532
|
+
* room must never carry the buyer picker. The package root does not export
|
|
533
|
+
* `SeatLayerSeatManagerComponent` at all.
|
|
534
|
+
*
|
|
535
|
+
* The one rule that makes this work: this entry imports from
|
|
536
|
+
* `@seatlayer/js/manager`, never from `@seatlayer/js`. One bare import brings
|
|
537
|
+
* the whole buyer SDK back in, and it looks like nothing at all in a diff.
|
|
538
|
+
*/
|
|
539
|
+
|
|
540
|
+
/**
|
|
541
|
+
* Generated bundle index. Do not edit.
|
|
542
|
+
*/
|
|
543
|
+
|
|
544
|
+
export { SeatLayerSeatManagerComponent };
|
|
545
|
+
//# sourceMappingURL=seatlayer-angular-manager.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seatlayer-angular-manager.mjs","sources":["../../manager/src/seat-manager.component.ts","../../manager/src/index.ts","../../manager/src/seatlayer-angular-manager.ts"],"sourcesContent":["import {\n ChangeDetectionStrategy,\n Component,\n DestroyRef,\n ElementRef,\n EventEmitter,\n Input,\n NgZone,\n OnChanges,\n Output,\n SimpleChanges,\n ViewChild,\n inject,\n} from '@angular/core';\nimport {\n SeatManager as CoreSeatManager,\n type SeatManagerOptions,\n type SeatManagerMode,\n type EventScopedManageToken,\n type SeatManagerTallies,\n type SeatManagerActivity,\n type SeatManagerActionResult,\n type SeatManagerArea,\n type SeatManagerConnection,\n type SeatManagerRoomState,\n type SeatManagerFilteredSection,\n type SeatManagerSelectionValidity,\n type SeatManagerCategoryPrice,\n type EventTableBookingMode,\n type ReportResult,\n type ControlRoomSnapshot,\n type LogEntry,\n type ExpandedSeat,\n// `@seatlayer/js/manager`, NOT the bare `@seatlayer/js` barrel. The barrel is the\n// buyer SDK and also exports the cockpit, so importing the cockpit through it\n// would pull SeatPicker, SeatingChart and the buyer engine into every bundle\n// that renders a control room. One bare import anywhere in this entry undoes\n// the split, and it looks like nothing at all in a diff.\n} from '@seatlayer/js/manager';\n\ntype Opt<K extends keyof SeatManagerOptions> = SeatManagerOptions[K];\n\n/** What the room passes when the operator opens one of your orders. */\nexport interface SeatManagerOpenOrder {\n id: string;\n displayRef: string;\n}\n\n/** What the room passes when the operator opens your trend view for a number. */\nexport interface SeatManagerOpenTrend {\n kpi: string;\n sectionId?: string;\n}\n\n/**\n * True when the host bound a handler to this output. Read once, when the board\n * is built: the room only offers \"Open order\" and the trend link to a host\n * that can follow them. `observed` is rxjs 7; `observers` covers rxjs 6, which\n * Angular 17 still accepts.\n */\nfunction hasHandler(emitter: object): boolean {\n const subject = emitter as { observed?: boolean; observers?: unknown[] };\n return subject.observed ?? (subject.observers?.length ?? 0) > 0;\n}\n\n/**\n * Angular wrapper around the organizer control room from `@seatlayer/js/manager`.\n *\n * Standalone, so it is imported directly rather than through an NgModule. Give\n * the element a size (it fills its box). The board is rebuilt only when\n * `eventKey` or `apiBase` changes. The inputs `@seatlayer/react` updates in\n * place reach the running board through its setters, so camera, selection,\n * live connection and DOM survive; every other input is read once when the\n * board is built.\n *\n * @example\n * ```html\n * <seatlayer-seat-manager\n * #room\n * eventKey=\"ev_9f3a\"\n * [token]=\"session.token\"\n * [tokenExpiresAt]=\"session.expiresAt\"\n * [onTokenRefresh]=\"mintManageSession\"\n * [(mode)]=\"mode\"\n * (roomStateChange)=\"onRoomState($event)\"\n * (openOrder)=\"openOrder($event)\"\n * />\n * <button (click)=\"room.showObjects(resaleSeats, 'Resale')\">Show resale</button>\n * ```\n */\n@Component({\n selector: 'seatlayer-seat-manager',\n standalone: true,\n template: '<div #container class=\"seatlayer-container\"></div>',\n styles: [':host { display: block; } .seatlayer-container { width: 100%; height: 100%; }'],\n changeDetection: ChangeDetectionStrategy.OnPush,\n})\nexport class SeatLayerSeatManagerComponent implements OnChanges {\n /** Event to manage. Changing it rebuilds the board. */\n @Input({ required: true }) eventKey!: string;\n /** API base URL. Changing it rebuilds the board. */\n @Input() apiBase?: string;\n /** Short-lived, event-scoped `mse_` grant from your backend. Live. */\n @Input({ required: true }) token!: EventScopedManageToken;\n /** When `token` expires, epoch ms. Live. */\n @Input() tokenExpiresAt?: number;\n /**\n * Mint a fresh grant before the current one expires. Live. A function input,\n * like `buyerAccessTokenProvider` on the seating chart, because the room\n * needs the new token back.\n */\n @Input() onTokenRefresh?: Opt<'onTokenRefresh'>;\n /** The tool the board shows. Live; pairs with `modeChange` for `[(mode)]`. */\n @Input() mode?: SeatManagerMode;\n /** Which tools the board offers. Read once. */\n @Input() tools?: SeatManagerMode[];\n /** `minimal` shows just the map. Read once. */\n @Input() chrome?: Opt<'chrome'>;\n /** What the token may do. Live. */\n @Input() capabilities?: Opt<'capabilities'>;\n /** Fallback currency for money. Live. */\n @Input() currency?: string;\n /** Colour overrides. Live. */\n @Input() theme?: Opt<'theme'>;\n /** `light`, `dark` or `auto`. Applied before first paint, then live. */\n @Input() themeMode?: Opt<'themeMode'>;\n /** Keep the realtime link open while the tab is hidden. Live. */\n @Input() keepLiveWhileHidden?: boolean;\n /** Follow new bookings on the map. Live; pairs with `followLiveChange`. */\n @Input() followLive?: boolean;\n /** Seats selected once the board loads. Read once. */\n @Input() selectedObjects?: string[];\n /** Seats the operator may select. Live. */\n @Input() selectableObjects?: string[];\n /** Whether unavailable seats can be selected. Live. */\n @Input() unavailableObjectsSelectable?: boolean;\n /** Seats shown as unavailable. Live. */\n @Input() unavailableObjects?: readonly string[];\n /** The hover word for `unavailableObjects`. Live. */\n @Input() unavailableObjectsReason?: string;\n /** Prices the map's hover shows: a map overrides, null hides. Live. */\n @Input() categoryPrices?: Record<string, SeatManagerCategoryPrice> | null;\n /** Cap on the selection. Live. */\n @Input() maxSelectedObjects?: number;\n /** Exact count a valid selection needs. Live. */\n @Input() numberOfPlacesToSelect?: number;\n /** Per-seat selectability rule. Live. */\n @Input() isObjectSelectable?: Opt<'isObjectSelectable'>;\n /** False when your own header shows the numbers. Read once. */\n @Input() kpis?: boolean;\n /** The event's clock for every time the room shows. Read once. */\n @Input() timeZone?: string;\n /** Shown in \"Ask an admin of …\". Read once. */\n @Input() organizationName?: string;\n /** What you know about the sale. Live, compared by value. */\n @Input() sale?: Opt<'sale'>;\n /** Room your own overlays take over the map, in px. Live, compared by value. */\n @Input() mapInsets?: Opt<'mapInsets'>;\n /** What the map's colours mean when the room opens. Read once. */\n @Input() colourBy?: Opt<'colourBy'>;\n /**\n * Open on this section. Read once. Bound as `[focusSection]`; the class\n * field has another name because `focusSection()` is the handle method that\n * frames a section later, as on React's handle.\n */\n @Input('focusSection') focusSectionOnOpen?: string;\n /** Open on this seat. Read once. */\n @Input() focusSeat?: string;\n /** Open on these seats (an order's seats). Read once. */\n @Input() focusSeats?: string[];\n /** Open on this category. Read once. */\n @Input() focusCategory?: string;\n /** Where the operator came from, for the way back. Read once. */\n @Input() arrivedFrom?: Opt<'arrivedFrom'>;\n\n /** The board has loaded. */\n @Output() readonly ready: EventEmitter<void> = new EventEmitter<void>();\n /** Live numbers changed. */\n @Output() readonly tallies: EventEmitter<SeatManagerTallies> = new EventEmitter<SeatManagerTallies>();\n /** Something happened on the event. */\n @Output() readonly activity: EventEmitter<SeatManagerActivity> = new EventEmitter<SeatManagerActivity>();\n /** A fresh control room snapshot. */\n @Output() readonly controlRoom: EventEmitter<ControlRoomSnapshot> = new EventEmitter<ControlRoomSnapshot>();\n /** The operator switched tools. */\n @Output() readonly modeChange: EventEmitter<SeatManagerMode> = new EventEmitter<SeatManagerMode>();\n /** Follow-live was switched on or off. */\n @Output() readonly followLiveChange: EventEmitter<boolean> = new EventEmitter<boolean>();\n /** The selection changed. */\n @Output() readonly selectionChange: EventEmitter<ExpandedSeat[]> = new EventEmitter<ExpandedSeat[]>();\n /** One seat was selected. */\n @Output() readonly objectSelected: EventEmitter<ExpandedSeat> = new EventEmitter<ExpandedSeat>();\n /** One seat was deselected. */\n @Output() readonly objectDeselected: EventEmitter<ExpandedSeat> = new EventEmitter<ExpandedSeat>();\n /** Exact-count state changed. */\n @Output() readonly selectionValidityChange: EventEmitter<SeatManagerSelectionValidity> =\n new EventEmitter<SeatManagerSelectionValidity>();\n /** The selection became valid. */\n @Output() readonly selectionValid: EventEmitter<SeatManagerSelectionValidity> =\n new EventEmitter<SeatManagerSelectionValidity>();\n /** The selection became invalid. */\n @Output() readonly selectionInvalid: EventEmitter<SeatManagerSelectionValidity> =\n new EventEmitter<SeatManagerSelectionValidity>();\n /** The selection cap was reached. */\n @Output() readonly selectionLimit: EventEmitter<number> = new EventEmitter<number>();\n /** The filtered sections changed. */\n @Output() readonly filteredSectionChange: EventEmitter<SeatManagerFilteredSection[]> =\n new EventEmitter<SeatManagerFilteredSection[]>();\n /** A general-admission area was clicked. */\n @Output() readonly areaClick: EventEmitter<SeatManagerArea> = new EventEmitter<SeatManagerArea>();\n /** A block, unblock or other action finished. */\n @Output() readonly actionComplete: EventEmitter<SeatManagerActionResult> =\n new EventEmitter<SeatManagerActionResult>();\n /** The realtime link changed state. */\n @Output() readonly connectionChange: EventEmitter<SeatManagerConnection> =\n new EventEmitter<SeatManagerConnection>();\n /** The room changed state: connecting, live, paused, offline or ended. */\n @Output() readonly roomStateChange: EventEmitter<SeatManagerRoomState> =\n new EventEmitter<SeatManagerRoomState>();\n /** Something failed. */\n @Output() readonly errored: EventEmitter<unknown> = new EventEmitter<unknown>();\n /**\n * The operator opened one of your orders. Only when this is bound does the\n * room offer \"Open order\", so it never shows a dead link.\n */\n @Output() readonly openOrder: EventEmitter<SeatManagerOpenOrder> = new EventEmitter<SeatManagerOpenOrder>();\n /** The operator opened your trend view for a number. Only offered when bound. */\n @Output() readonly openTrend: EventEmitter<SeatManagerOpenTrend> = new EventEmitter<SeatManagerOpenTrend>();\n /** Sections on a chart without any offers \"Open the designer\". Only offered when bound. */\n @Output() readonly openDesigner: EventEmitter<void> = new EventEmitter<void>();\n\n @ViewChild('container', { static: true })\n private readonly container!: ElementRef<HTMLDivElement>;\n\n private readonly zone = inject(NgZone);\n private manager: CoreSeatManager | null = null;\n\n constructor() {\n inject(DestroyRef).onDestroy(() => this.destroy());\n }\n\n ngOnChanges(changes: SimpleChanges): void {\n // Identity: a new event or API is a new board. The build reads every\n // input's current value, so nothing else needs applying on this pass.\n if (!this.manager || 'eventKey' in changes || 'apiBase' in changes) {\n this.build();\n return;\n }\n const manager = this.manager;\n const changed = (name: string) => name in changes;\n\n // Live inputs: the same set, the same setters and the same fallbacks as\n // the React wrapper's effects. Outside the zone, like the board itself:\n // a repaint must not schedule change detection for the whole app.\n this.zone.runOutsideAngular(() => {\n if (changed('token') || changed('tokenExpiresAt')) manager.setToken(this.token, this.tokenExpiresAt);\n if (changed('capabilities')) manager.setCapabilities(this.capabilities);\n if (changed('currency')) manager.setCurrency(this.currency);\n if (changed('theme')) manager.setTheme(this.theme);\n if (changed('sale') && saleChanged(changes['sale']!.previousValue, this.sale)) manager.setSale(this.sale);\n if (changed('mapInsets') && insetsChanged(changes['mapInsets']!.previousValue, this.mapInsets)) {\n manager.setMapInsets(this.mapInsets ?? null);\n }\n if (changed('themeMode')) manager.setThemeMode(this.themeMode);\n if (changed('keepLiveWhileHidden')) manager.setKeepLiveWhileHidden(this.keepLiveWhileHidden);\n if (changed('onTokenRefresh') && !!changes['onTokenRefresh']!.previousValue !== !!this.onTokenRefresh) {\n manager.setTokenRefresh(this.tokenRefresh());\n }\n if (changed('mode') && this.mode) manager.setMode(this.mode);\n if (changed('followLive') && this.followLive != null) manager.setFollowLive(this.followLive);\n if (changed('selectableObjects')) manager.setSelectableObjects(this.selectableObjects ?? []);\n if (changed('unavailableObjectsSelectable')) {\n manager.setUnavailableObjectsSelectable(this.unavailableObjectsSelectable ?? true);\n }\n if (changed('unavailableObjects') || changed('unavailableObjectsReason')) {\n manager.setUnavailableObjects(this.unavailableObjects ?? [], this.unavailableObjectsReason);\n }\n if (changed('categoryPrices')) manager.setCategoryPrices(this.categoryPrices);\n if (changed('maxSelectedObjects')) manager.setMaxSelectedObjects(this.maxSelectedObjects);\n if (changed('numberOfPlacesToSelect')) manager.setNumberOfPlacesToSelect(this.numberOfPlacesToSelect);\n if (changed('isObjectSelectable')) manager.setObjectSelectable(this.isObjectSelectable);\n });\n }\n\n // ---------- imperative API, for a template ref ----------\n // The same methods as SeatManagerHandle in @seatlayer/react.\n\n setMode(mode: SeatManagerMode): void { this.manager?.setMode(mode); }\n setToken(token: EventScopedManageToken, expiresAt?: number): void { this.manager?.setToken(token, expiresAt); }\n setHeatOverlay(enabled: boolean): void { this.manager?.setHeatOverlay(enabled); }\n setFollowLive(enabled: boolean): void { this.manager?.setFollowLive(enabled); }\n setTrendWindow(windowMinutes: number): Promise<ControlRoomSnapshot> {\n return this.manager?.setTrendWindow(windowMinutes) ?? Promise.reject(new Error('not ready'));\n }\n enterFullscreen(): Promise<void> { return this.manager?.enterFullscreen() ?? Promise.resolve(); }\n exitFullscreen(): Promise<void> { return this.manager?.exitFullscreen() ?? Promise.resolve(); }\n isFullscreen(): boolean { return this.manager?.isFullscreen() ?? false; }\n block(labels?: string[], opts?: { releaseAt?: number; reason?: string }): Promise<void> {\n return this.manager?.block(labels, opts) ?? Promise.resolve();\n }\n unblock(labels?: string[]): Promise<void> { return this.manager?.unblock(labels) ?? Promise.resolve(); }\n unblockAll(): Promise<void> { return this.manager?.unblockAll() ?? Promise.resolve(); }\n cancelBooking(labels: string[], bookingRef: string): Promise<void> {\n return this.manager?.cancelBooking(labels, bookingRef) ?? Promise.resolve();\n }\n setCategory(categoryKey: string, labels?: string[]): Promise<void> {\n return this.manager?.setCategory(categoryKey, labels) ?? Promise.resolve();\n }\n setTableBooking(\n tableIds: string[],\n mode: EventTableBookingMode,\n bounds?: { minOccupancy?: number; maxOccupancy?: number },\n ): Promise<void> {\n return this.manager?.setTableBooking(tableIds, mode, bounds) ?? Promise.resolve();\n }\n selectAll(): ExpandedSeat[] { return this.manager?.selectAll() ?? []; }\n selectSection(sectionId: string): ExpandedSeat[] { return this.manager?.selectSection(sectionId) ?? []; }\n selectByLabels(labels: string[]): ExpandedSeat[] { return this.manager?.selectByLabels(labels) ?? []; }\n selectObjects(labels: string[]): ExpandedSeat[] { return this.manager?.selectObjects(labels) ?? []; }\n deselectObjects(labels: string[]): ExpandedSeat[] { return this.manager?.deselectObjects(labels) ?? []; }\n selectCategories(keys: string[]): ExpandedSeat[] { return this.manager?.selectCategories(keys) ?? []; }\n deselectCategories(keys: string[]): ExpandedSeat[] { return this.manager?.deselectCategories(keys) ?? []; }\n setSelectableObjects(labels: string[]): void { this.manager?.setSelectableObjects(labels); }\n setUnavailableObjectsSelectable(enabled: boolean): void { this.manager?.setUnavailableObjectsSelectable(enabled); }\n /** Replace the labels shown as unavailable (and their hover word) without remounting. */\n setUnavailableObjects(labels: readonly string[], reason?: string): void {\n this.manager?.setUnavailableObjects(labels, reason);\n }\n /** Replace the prices the map's hover shows: a map overrides, null hides, undefined uses the chart's. */\n setCategoryPrices(prices: Record<string, SeatManagerCategoryPrice> | null | undefined): void {\n this.manager?.setCategoryPrices(prices);\n }\n setObjectSelectable(predicate: Opt<'isObjectSelectable'>): void { this.manager?.setObjectSelectable(predicate); }\n setMaxSelectedObjects(max: number | undefined): void { this.manager?.setMaxSelectedObjects(max); }\n setNumberOfPlacesToSelect(required: number | undefined): void {\n this.manager?.setNumberOfPlacesToSelect(required);\n }\n getSelectionValidity(): SeatManagerSelectionValidity | null { return this.manager?.getSelectionValidity() ?? null; }\n setFilteredSection(label: string): SeatManagerFilteredSection[] { return this.manager?.setFilteredSection(label) ?? []; }\n clearFilteredSection(): void { this.manager?.clearFilteredSection(); }\n /** Frame matching sections in any mode, without filtering or touching the selection. */\n focusSection(label: string): SeatManagerFilteredSection[] { return this.manager?.focusSection(label) ?? []; }\n getFilteredSections(): SeatManagerFilteredSection[] { return this.manager?.getFilteredSections() ?? []; }\n clearSelection(): void { this.manager?.clearSelection(); }\n getSelection(): ExpandedSeat[] { return this.manager?.getSelection() ?? []; }\n getReport(): Promise<ReportResult> { return this.manager?.getReport() ?? Promise.reject(new Error('not ready')); }\n getControlRoomSnapshot(windowMinutes?: number): Promise<ControlRoomSnapshot> {\n return this.manager?.getControlRoomSnapshot(windowMinutes) ?? Promise.reject(new Error('not ready'));\n }\n getLog(opts?: { limit?: number; before?: number }): Promise<{ entries: LogEntry[]; nextBefore: number | null }> {\n return this.manager?.getLog(opts) ?? Promise.resolve({ entries: [], nextBefore: null });\n }\n setHoldTtl(ms: number | null): Promise<void> { return this.manager?.setHoldTtl(ms) ?? Promise.resolve(); }\n /**\n * Realtime link state plus the \"as of\" behind the numbers on screen. Null\n * only before the board exists. `connectionChange` gives the edges; this\n * gives the answer on demand.\n */\n getConnection(): SeatManagerConnection | null { return this.manager?.getConnection() ?? null; }\n zoomToFit(): void { this.manager?.zoomToFit(); }\n /** Light these seats and frame them, named in the legend; null clears. */\n showObjects(labels: readonly string[] | null, name?: string): void { this.manager?.showObjects(labels, name); }\n\n // ---------- internals ----------\n\n /** Reads the current input on every call, so a swapped handler needs no setter. */\n private tokenRefresh(): Opt<'onTokenRefresh'> {\n return this.onTokenRefresh\n ? () => this.zone.run(() => this.onTokenRefresh!())\n : undefined;\n }\n\n private build(): void {\n const element = this.container?.nativeElement;\n if (!element) return;\n\n this.destroy();\n\n // The board runs a render loop, timers and a socket. Left inside the\n // Angular zone, each of them would schedule change detection for the\n // whole app — so it is built outside, and each callback re-enters the zone\n // only to emit.\n this.zone.runOutsideAngular(() => {\n const emit = <T>(emitter: EventEmitter<T>, value: T) => this.zone.run(() => emitter.emit(value));\n const back = this.arrivedFrom?.back;\n\n const instance = new CoreSeatManager({\n container: element,\n apiBase: this.apiBase,\n eventKey: this.eventKey,\n token: this.token,\n tokenExpiresAt: this.tokenExpiresAt,\n mode: this.mode,\n currency: this.currency,\n keepLiveWhileHidden: this.keepLiveWhileHidden,\n followLive: this.followLive,\n capabilities: this.capabilities,\n selectedObjects: this.selectedObjects,\n selectableObjects: this.selectableObjects,\n unavailableObjectsSelectable: this.unavailableObjectsSelectable,\n unavailableObjects: this.unavailableObjects,\n unavailableObjectsReason: this.unavailableObjectsReason,\n categoryPrices: this.categoryPrices,\n maxSelectedObjects: this.maxSelectedObjects,\n numberOfPlacesToSelect: this.numberOfPlacesToSelect,\n isObjectSelectable: this.isObjectSelectable,\n tools: this.tools,\n chrome: this.chrome,\n kpis: this.kpis,\n timeZone: this.timeZone,\n organizationName: this.organizationName,\n sale: this.sale,\n mapInsets: this.mapInsets,\n theme: this.theme,\n // Applied before first paint, so a board asked for light never\n // flashes dark on the way in.\n themeMode: this.themeMode,\n colourBy: this.colourBy,\n focusSection: this.focusSectionOnOpen,\n focusSeat: this.focusSeat,\n focusSeats: this.focusSeats,\n focusCategory: this.focusCategory,\n // The way back runs host code (usually the router), so it re-enters the zone.\n arrivedFrom: this.arrivedFrom && back\n ? { ...this.arrivedFrom, back: { ...back, go: () => this.zone.run(() => back.go()) } }\n : this.arrivedFrom,\n // Only a host that bound the output gets the link. Left unset\n // otherwise, so the room never offers a dead one.\n onOpenOrder: hasHandler(this.openOrder) ? (order) => emit(this.openOrder, order) : undefined,\n onOpenTrend: hasHandler(this.openTrend) ? (focus) => emit(this.openTrend, focus) : undefined,\n onOpenDesigner: hasHandler(this.openDesigner) ? () => emit(this.openDesigner, undefined) : undefined,\n onTokenRefresh: this.tokenRefresh(),\n onReady: () => this.zone.run(() => this.ready.emit()),\n onTallies: (tallies) => emit(this.tallies, tallies),\n onActivity: (activity) => emit(this.activity, activity),\n onControlRoom: (snapshot) => emit(this.controlRoom, snapshot),\n onModeChange: (nextMode) => emit(this.modeChange, nextMode),\n onFollowLiveChange: (enabled) => emit(this.followLiveChange, enabled),\n onSelectionChange: (seats) => emit(this.selectionChange, seats),\n onObjectSelected: (object) => emit(this.objectSelected, object),\n onObjectDeselected: (object) => emit(this.objectDeselected, object),\n onSelectionValidityChange: (state) => emit(this.selectionValidityChange, state),\n onSelectionValid: (state) => emit(this.selectionValid, state),\n onSelectionInvalid: (state) => emit(this.selectionInvalid, state),\n onSelectionLimit: (max) => emit(this.selectionLimit, max),\n onFilteredSectionChange: (sections) => emit(this.filteredSectionChange, sections),\n onAreaClick: (area) => emit(this.areaClick, area),\n onActionComplete: (result) => emit(this.actionComplete, result),\n onConnectionChange: (state) => emit(this.connectionChange, state),\n onRoomStateChange: (state) => emit(this.roomStateChange, state),\n onError: (error) => emit(this.errored, error),\n });\n\n this.manager = instance;\n void instance.render();\n });\n }\n\n private destroy(): void {\n this.manager?.destroy();\n this.manager = null;\n }\n}\n\n/** By value, as React compares it: a rebuilt object with the same facts is no change. */\nfunction saleChanged(previous: Opt<'sale'>, next: Opt<'sale'>): boolean {\n return previous?.status !== next?.status || previous?.tone !== next?.tone\n || previous?.openedAt !== next?.openedAt || previous?.pageUrl !== next?.pageUrl;\n}\n\nfunction insetsChanged(previous: Opt<'mapInsets'>, next: Opt<'mapInsets'>): boolean {\n return previous?.top !== next?.top || previous?.right !== next?.right\n || previous?.bottom !== next?.bottom || previous?.left !== next?.left;\n}\n","/**\n * `@seatlayer/angular/manager` — the organizer control room, and nothing else.\n *\n * An ng-packagr secondary entry point, for the same reason as\n * `@seatlayer/js/manager` and `@seatlayer/react/manager`: a buyer app that\n * imports `@seatlayer/angular` must never carry the control room, and a control\n * room must never carry the buyer picker. The package root does not export\n * `SeatLayerSeatManagerComponent` at all.\n *\n * The one rule that makes this work: this entry imports from\n * `@seatlayer/js/manager`, never from `@seatlayer/js`. One bare import brings\n * the whole buyer SDK back in, and it looks like nothing at all in a diff.\n */\nexport { SeatLayerSeatManagerComponent } from './seat-manager.component';\nexport type { SeatManagerOpenOrder, SeatManagerOpenTrend } from './seat-manager.component';\nexport type {\n SeatManagerOptions,\n SeatManagerMode,\n EventScopedManageToken,\n SeatManagerTallies,\n SeatManagerSale,\n SeatManagerActivity,\n SeatManagerActionResult,\n SeatManagerConnection,\n SeatManagerRoomState,\n SeatManagerFilteredSection,\n SeatManagerSelectionValidity,\n SeatManagerCategoryPrice,\n EventTableBookingMode,\n ControlRoomActivityEntry,\n ControlRoomSectionMetric,\n ControlRoomSnapshot,\n} from '@seatlayer/js/manager';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './index';\n"],"names":["CoreSeatManager"],"mappings":";;;;AAsDA;;;;;AAKG;AACH,SAAS,UAAU,CAAC,OAAe,EAAA;IACjC,MAAM,OAAO,GAAG,OAAwD;AACxE,IAAA,OAAO,OAAO,CAAC,QAAQ,IAAI,CAAC,OAAO,CAAC,SAAS,EAAE,MAAM,IAAI,CAAC,IAAI,CAAC;AACjE;AAEA;;;;;;;;;;;;;;;;;;;;;;;;AAwBG;MAQU,6BAA6B,CAAA;;AAEb,IAAA,QAAQ;;AAE1B,IAAA,OAAO;;AAEW,IAAA,KAAK;;AAEvB,IAAA,cAAc;AACvB;;;;AAIG;AACM,IAAA,cAAc;;AAEd,IAAA,IAAI;;AAEJ,IAAA,KAAK;;AAEL,IAAA,MAAM;;AAEN,IAAA,YAAY;;AAEZ,IAAA,QAAQ;;AAER,IAAA,KAAK;;AAEL,IAAA,SAAS;;AAET,IAAA,mBAAmB;;AAEnB,IAAA,UAAU;;AAEV,IAAA,eAAe;;AAEf,IAAA,iBAAiB;;AAEjB,IAAA,4BAA4B;;AAE5B,IAAA,kBAAkB;;AAElB,IAAA,wBAAwB;;AAExB,IAAA,cAAc;;AAEd,IAAA,kBAAkB;;AAElB,IAAA,sBAAsB;;AAEtB,IAAA,kBAAkB;;AAElB,IAAA,IAAI;;AAEJ,IAAA,QAAQ;;AAER,IAAA,gBAAgB;;AAEhB,IAAA,IAAI;;AAEJ,IAAA,SAAS;;AAET,IAAA,QAAQ;AACjB;;;;AAIG;AACoB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sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAMA,KAAK;uBAAC,cAAc;;sBAEpB;;sBAEA;;sBAEA;;sBAEA;;sBAGA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAEA;;sBAGA;;sBAGA;;sBAGA;;sBAEA;;sBAGA;;sBAEA;;sBAGA;;sBAGA;;sBAGA;;sBAKA;;sBAEA;;sBAEA;;sBAEA,SAAS;AAAC,gBAAA,IAAA,EAAA,CAAA,WAAW,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE;;AAyO1C;AACA,SAAS,WAAW,CAAC,QAAqB,EAAE,IAAiB,EAAA;AAC3D,IAAA,OAAO,QAAQ,EAAE,MAAM,KAAK,IAAI,EAAE,MAAM,IAAI,QAAQ,EAAE,IAAI,KAAK,IAAI,EAAE;AAChE,WAAA,QAAQ,EAAE,QAAQ,KAAK,IAAI,EAAE,QAAQ,IAAI,QAAQ,EAAE,OAAO,KAAK,IAAI,EAAE,OAAO;AACnF;AAEA,SAAS,aAAa,CAAC,QAA0B,EAAE,IAAsB,EAAA;AACvE,IAAA,OAAO,QAAQ,EAAE,GAAG,KAAK,IAAI,EAAE,GAAG,IAAI,QAAQ,EAAE,KAAK,KAAK,IAAI,EAAE;AAC3D,WAAA,QAAQ,EAAE,MAAM,KAAK,IAAI,EAAE,MAAM,IAAI,QAAQ,EAAE,IAAI,KAAK,IAAI,EAAE,IAAI;AACzE;;ACxdA;;;;;;;;;;;;AAYG;;ACZH;;AAEG;;;;"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import * as i0 from '@angular/core';
|
|
2
|
+
import { OnChanges, EventEmitter, SimpleChanges } from '@angular/core';
|
|
3
|
+
import { EventScopedManageToken, SeatManagerOptions, SeatManagerMode, SeatManagerCategoryPrice, SeatManagerTallies, SeatManagerActivity, ControlRoomSnapshot, ExpandedSeat, SeatManagerSelectionValidity, SeatManagerFilteredSection, SeatManagerArea, SeatManagerActionResult, SeatManagerConnection, SeatManagerRoomState, EventTableBookingMode, ReportResult, LogEntry } from '@seatlayer/js/manager';
|
|
4
|
+
export { ControlRoomActivityEntry, ControlRoomSectionMetric, ControlRoomSnapshot, EventScopedManageToken, EventTableBookingMode, SeatManagerActionResult, SeatManagerActivity, SeatManagerCategoryPrice, SeatManagerConnection, SeatManagerFilteredSection, SeatManagerMode, SeatManagerOptions, SeatManagerRoomState, SeatManagerSale, SeatManagerSelectionValidity, SeatManagerTallies } from '@seatlayer/js/manager';
|
|
5
|
+
|
|
6
|
+
type Opt<K extends keyof SeatManagerOptions> = SeatManagerOptions[K];
|
|
7
|
+
/** What the room passes when the operator opens one of your orders. */
|
|
8
|
+
interface SeatManagerOpenOrder {
|
|
9
|
+
id: string;
|
|
10
|
+
displayRef: string;
|
|
11
|
+
}
|
|
12
|
+
/** What the room passes when the operator opens your trend view for a number. */
|
|
13
|
+
interface SeatManagerOpenTrend {
|
|
14
|
+
kpi: string;
|
|
15
|
+
sectionId?: string;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Angular wrapper around the organizer control room from `@seatlayer/js/manager`.
|
|
19
|
+
*
|
|
20
|
+
* Standalone, so it is imported directly rather than through an NgModule. Give
|
|
21
|
+
* the element a size (it fills its box). The board is rebuilt only when
|
|
22
|
+
* `eventKey` or `apiBase` changes. The inputs `@seatlayer/react` updates in
|
|
23
|
+
* place reach the running board through its setters, so camera, selection,
|
|
24
|
+
* live connection and DOM survive; every other input is read once when the
|
|
25
|
+
* board is built.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```html
|
|
29
|
+
* <seatlayer-seat-manager
|
|
30
|
+
* #room
|
|
31
|
+
* eventKey="ev_9f3a"
|
|
32
|
+
* [token]="session.token"
|
|
33
|
+
* [tokenExpiresAt]="session.expiresAt"
|
|
34
|
+
* [onTokenRefresh]="mintManageSession"
|
|
35
|
+
* [(mode)]="mode"
|
|
36
|
+
* (roomStateChange)="onRoomState($event)"
|
|
37
|
+
* (openOrder)="openOrder($event)"
|
|
38
|
+
* />
|
|
39
|
+
* <button (click)="room.showObjects(resaleSeats, 'Resale')">Show resale</button>
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
declare class SeatLayerSeatManagerComponent implements OnChanges {
|
|
43
|
+
/** Event to manage. Changing it rebuilds the board. */
|
|
44
|
+
eventKey: string;
|
|
45
|
+
/** API base URL. Changing it rebuilds the board. */
|
|
46
|
+
apiBase?: string;
|
|
47
|
+
/** Short-lived, event-scoped `mse_` grant from your backend. Live. */
|
|
48
|
+
token: EventScopedManageToken;
|
|
49
|
+
/** When `token` expires, epoch ms. Live. */
|
|
50
|
+
tokenExpiresAt?: number;
|
|
51
|
+
/**
|
|
52
|
+
* Mint a fresh grant before the current one expires. Live. A function input,
|
|
53
|
+
* like `buyerAccessTokenProvider` on the seating chart, because the room
|
|
54
|
+
* needs the new token back.
|
|
55
|
+
*/
|
|
56
|
+
onTokenRefresh?: Opt<'onTokenRefresh'>;
|
|
57
|
+
/** The tool the board shows. Live; pairs with `modeChange` for `[(mode)]`. */
|
|
58
|
+
mode?: SeatManagerMode;
|
|
59
|
+
/** Which tools the board offers. Read once. */
|
|
60
|
+
tools?: SeatManagerMode[];
|
|
61
|
+
/** `minimal` shows just the map. Read once. */
|
|
62
|
+
chrome?: Opt<'chrome'>;
|
|
63
|
+
/** What the token may do. Live. */
|
|
64
|
+
capabilities?: Opt<'capabilities'>;
|
|
65
|
+
/** Fallback currency for money. Live. */
|
|
66
|
+
currency?: string;
|
|
67
|
+
/** Colour overrides. Live. */
|
|
68
|
+
theme?: Opt<'theme'>;
|
|
69
|
+
/** `light`, `dark` or `auto`. Applied before first paint, then live. */
|
|
70
|
+
themeMode?: Opt<'themeMode'>;
|
|
71
|
+
/** Keep the realtime link open while the tab is hidden. Live. */
|
|
72
|
+
keepLiveWhileHidden?: boolean;
|
|
73
|
+
/** Follow new bookings on the map. Live; pairs with `followLiveChange`. */
|
|
74
|
+
followLive?: boolean;
|
|
75
|
+
/** Seats selected once the board loads. Read once. */
|
|
76
|
+
selectedObjects?: string[];
|
|
77
|
+
/** Seats the operator may select. Live. */
|
|
78
|
+
selectableObjects?: string[];
|
|
79
|
+
/** Whether unavailable seats can be selected. Live. */
|
|
80
|
+
unavailableObjectsSelectable?: boolean;
|
|
81
|
+
/** Seats shown as unavailable. Live. */
|
|
82
|
+
unavailableObjects?: readonly string[];
|
|
83
|
+
/** The hover word for `unavailableObjects`. Live. */
|
|
84
|
+
unavailableObjectsReason?: string;
|
|
85
|
+
/** Prices the map's hover shows: a map overrides, null hides. Live. */
|
|
86
|
+
categoryPrices?: Record<string, SeatManagerCategoryPrice> | null;
|
|
87
|
+
/** Cap on the selection. Live. */
|
|
88
|
+
maxSelectedObjects?: number;
|
|
89
|
+
/** Exact count a valid selection needs. Live. */
|
|
90
|
+
numberOfPlacesToSelect?: number;
|
|
91
|
+
/** Per-seat selectability rule. Live. */
|
|
92
|
+
isObjectSelectable?: Opt<'isObjectSelectable'>;
|
|
93
|
+
/** False when your own header shows the numbers. Read once. */
|
|
94
|
+
kpis?: boolean;
|
|
95
|
+
/** The event's clock for every time the room shows. Read once. */
|
|
96
|
+
timeZone?: string;
|
|
97
|
+
/** Shown in "Ask an admin of …". Read once. */
|
|
98
|
+
organizationName?: string;
|
|
99
|
+
/** What you know about the sale. Live, compared by value. */
|
|
100
|
+
sale?: Opt<'sale'>;
|
|
101
|
+
/** Room your own overlays take over the map, in px. Live, compared by value. */
|
|
102
|
+
mapInsets?: Opt<'mapInsets'>;
|
|
103
|
+
/** What the map's colours mean when the room opens. Read once. */
|
|
104
|
+
colourBy?: Opt<'colourBy'>;
|
|
105
|
+
/**
|
|
106
|
+
* Open on this section. Read once. Bound as `[focusSection]`; the class
|
|
107
|
+
* field has another name because `focusSection()` is the handle method that
|
|
108
|
+
* frames a section later, as on React's handle.
|
|
109
|
+
*/
|
|
110
|
+
focusSectionOnOpen?: string;
|
|
111
|
+
/** Open on this seat. Read once. */
|
|
112
|
+
focusSeat?: string;
|
|
113
|
+
/** Open on these seats (an order's seats). Read once. */
|
|
114
|
+
focusSeats?: string[];
|
|
115
|
+
/** Open on this category. Read once. */
|
|
116
|
+
focusCategory?: string;
|
|
117
|
+
/** Where the operator came from, for the way back. Read once. */
|
|
118
|
+
arrivedFrom?: Opt<'arrivedFrom'>;
|
|
119
|
+
/** The board has loaded. */
|
|
120
|
+
readonly ready: EventEmitter<void>;
|
|
121
|
+
/** Live numbers changed. */
|
|
122
|
+
readonly tallies: EventEmitter<SeatManagerTallies>;
|
|
123
|
+
/** Something happened on the event. */
|
|
124
|
+
readonly activity: EventEmitter<SeatManagerActivity>;
|
|
125
|
+
/** A fresh control room snapshot. */
|
|
126
|
+
readonly controlRoom: EventEmitter<ControlRoomSnapshot>;
|
|
127
|
+
/** The operator switched tools. */
|
|
128
|
+
readonly modeChange: EventEmitter<SeatManagerMode>;
|
|
129
|
+
/** Follow-live was switched on or off. */
|
|
130
|
+
readonly followLiveChange: EventEmitter<boolean>;
|
|
131
|
+
/** The selection changed. */
|
|
132
|
+
readonly selectionChange: EventEmitter<ExpandedSeat[]>;
|
|
133
|
+
/** One seat was selected. */
|
|
134
|
+
readonly objectSelected: EventEmitter<ExpandedSeat>;
|
|
135
|
+
/** One seat was deselected. */
|
|
136
|
+
readonly objectDeselected: EventEmitter<ExpandedSeat>;
|
|
137
|
+
/** Exact-count state changed. */
|
|
138
|
+
readonly selectionValidityChange: EventEmitter<SeatManagerSelectionValidity>;
|
|
139
|
+
/** The selection became valid. */
|
|
140
|
+
readonly selectionValid: EventEmitter<SeatManagerSelectionValidity>;
|
|
141
|
+
/** The selection became invalid. */
|
|
142
|
+
readonly selectionInvalid: EventEmitter<SeatManagerSelectionValidity>;
|
|
143
|
+
/** The selection cap was reached. */
|
|
144
|
+
readonly selectionLimit: EventEmitter<number>;
|
|
145
|
+
/** The filtered sections changed. */
|
|
146
|
+
readonly filteredSectionChange: EventEmitter<SeatManagerFilteredSection[]>;
|
|
147
|
+
/** A general-admission area was clicked. */
|
|
148
|
+
readonly areaClick: EventEmitter<SeatManagerArea>;
|
|
149
|
+
/** A block, unblock or other action finished. */
|
|
150
|
+
readonly actionComplete: EventEmitter<SeatManagerActionResult>;
|
|
151
|
+
/** The realtime link changed state. */
|
|
152
|
+
readonly connectionChange: EventEmitter<SeatManagerConnection>;
|
|
153
|
+
/** The room changed state: connecting, live, paused, offline or ended. */
|
|
154
|
+
readonly roomStateChange: EventEmitter<SeatManagerRoomState>;
|
|
155
|
+
/** Something failed. */
|
|
156
|
+
readonly errored: EventEmitter<unknown>;
|
|
157
|
+
/**
|
|
158
|
+
* The operator opened one of your orders. Only when this is bound does the
|
|
159
|
+
* room offer "Open order", so it never shows a dead link.
|
|
160
|
+
*/
|
|
161
|
+
readonly openOrder: EventEmitter<SeatManagerOpenOrder>;
|
|
162
|
+
/** The operator opened your trend view for a number. Only offered when bound. */
|
|
163
|
+
readonly openTrend: EventEmitter<SeatManagerOpenTrend>;
|
|
164
|
+
/** Sections on a chart without any offers "Open the designer". Only offered when bound. */
|
|
165
|
+
readonly openDesigner: EventEmitter<void>;
|
|
166
|
+
private readonly container;
|
|
167
|
+
private readonly zone;
|
|
168
|
+
private manager;
|
|
169
|
+
constructor();
|
|
170
|
+
ngOnChanges(changes: SimpleChanges): void;
|
|
171
|
+
setMode(mode: SeatManagerMode): void;
|
|
172
|
+
setToken(token: EventScopedManageToken, expiresAt?: number): void;
|
|
173
|
+
setHeatOverlay(enabled: boolean): void;
|
|
174
|
+
setFollowLive(enabled: boolean): void;
|
|
175
|
+
setTrendWindow(windowMinutes: number): Promise<ControlRoomSnapshot>;
|
|
176
|
+
enterFullscreen(): Promise<void>;
|
|
177
|
+
exitFullscreen(): Promise<void>;
|
|
178
|
+
isFullscreen(): boolean;
|
|
179
|
+
block(labels?: string[], opts?: {
|
|
180
|
+
releaseAt?: number;
|
|
181
|
+
reason?: string;
|
|
182
|
+
}): Promise<void>;
|
|
183
|
+
unblock(labels?: string[]): Promise<void>;
|
|
184
|
+
unblockAll(): Promise<void>;
|
|
185
|
+
cancelBooking(labels: string[], bookingRef: string): Promise<void>;
|
|
186
|
+
setCategory(categoryKey: string, labels?: string[]): Promise<void>;
|
|
187
|
+
setTableBooking(tableIds: string[], mode: EventTableBookingMode, bounds?: {
|
|
188
|
+
minOccupancy?: number;
|
|
189
|
+
maxOccupancy?: number;
|
|
190
|
+
}): Promise<void>;
|
|
191
|
+
selectAll(): ExpandedSeat[];
|
|
192
|
+
selectSection(sectionId: string): ExpandedSeat[];
|
|
193
|
+
selectByLabels(labels: string[]): ExpandedSeat[];
|
|
194
|
+
selectObjects(labels: string[]): ExpandedSeat[];
|
|
195
|
+
deselectObjects(labels: string[]): ExpandedSeat[];
|
|
196
|
+
selectCategories(keys: string[]): ExpandedSeat[];
|
|
197
|
+
deselectCategories(keys: string[]): ExpandedSeat[];
|
|
198
|
+
setSelectableObjects(labels: string[]): void;
|
|
199
|
+
setUnavailableObjectsSelectable(enabled: boolean): void;
|
|
200
|
+
/** Replace the labels shown as unavailable (and their hover word) without remounting. */
|
|
201
|
+
setUnavailableObjects(labels: readonly string[], reason?: string): void;
|
|
202
|
+
/** Replace the prices the map's hover shows: a map overrides, null hides, undefined uses the chart's. */
|
|
203
|
+
setCategoryPrices(prices: Record<string, SeatManagerCategoryPrice> | null | undefined): void;
|
|
204
|
+
setObjectSelectable(predicate: Opt<'isObjectSelectable'>): void;
|
|
205
|
+
setMaxSelectedObjects(max: number | undefined): void;
|
|
206
|
+
setNumberOfPlacesToSelect(required: number | undefined): void;
|
|
207
|
+
getSelectionValidity(): SeatManagerSelectionValidity | null;
|
|
208
|
+
setFilteredSection(label: string): SeatManagerFilteredSection[];
|
|
209
|
+
clearFilteredSection(): void;
|
|
210
|
+
/** Frame matching sections in any mode, without filtering or touching the selection. */
|
|
211
|
+
focusSection(label: string): SeatManagerFilteredSection[];
|
|
212
|
+
getFilteredSections(): SeatManagerFilteredSection[];
|
|
213
|
+
clearSelection(): void;
|
|
214
|
+
getSelection(): ExpandedSeat[];
|
|
215
|
+
getReport(): Promise<ReportResult>;
|
|
216
|
+
getControlRoomSnapshot(windowMinutes?: number): Promise<ControlRoomSnapshot>;
|
|
217
|
+
getLog(opts?: {
|
|
218
|
+
limit?: number;
|
|
219
|
+
before?: number;
|
|
220
|
+
}): Promise<{
|
|
221
|
+
entries: LogEntry[];
|
|
222
|
+
nextBefore: number | null;
|
|
223
|
+
}>;
|
|
224
|
+
setHoldTtl(ms: number | null): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* Realtime link state plus the "as of" behind the numbers on screen. Null
|
|
227
|
+
* only before the board exists. `connectionChange` gives the edges; this
|
|
228
|
+
* gives the answer on demand.
|
|
229
|
+
*/
|
|
230
|
+
getConnection(): SeatManagerConnection | null;
|
|
231
|
+
zoomToFit(): void;
|
|
232
|
+
/** Light these seats and frame them, named in the legend; null clears. */
|
|
233
|
+
showObjects(labels: readonly string[] | null, name?: string): void;
|
|
234
|
+
/** Reads the current input on every call, so a swapped handler needs no setter. */
|
|
235
|
+
private tokenRefresh;
|
|
236
|
+
private build;
|
|
237
|
+
private destroy;
|
|
238
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SeatLayerSeatManagerComponent, never>;
|
|
239
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SeatLayerSeatManagerComponent, "seatlayer-seat-manager", never, { "eventKey": { "alias": "eventKey"; "required": true; }; "apiBase": { "alias": "apiBase"; "required": false; }; "token": { "alias": "token"; "required": true; }; "tokenExpiresAt": { "alias": "tokenExpiresAt"; "required": false; }; "onTokenRefresh": { "alias": "onTokenRefresh"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "tools": { "alias": "tools"; "required": false; }; "chrome": { "alias": "chrome"; "required": false; }; "capabilities": { "alias": "capabilities"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "themeMode": { "alias": "themeMode"; "required": false; }; "keepLiveWhileHidden": { "alias": "keepLiveWhileHidden"; "required": false; }; "followLive": { "alias": "followLive"; "required": false; }; "selectedObjects": { "alias": "selectedObjects"; "required": false; }; "selectableObjects": { "alias": "selectableObjects"; "required": false; }; "unavailableObjectsSelectable": { "alias": "unavailableObjectsSelectable"; "required": false; }; "unavailableObjects": { "alias": "unavailableObjects"; "required": false; }; "unavailableObjectsReason": { "alias": "unavailableObjectsReason"; "required": false; }; "categoryPrices": { "alias": "categoryPrices"; "required": false; }; "maxSelectedObjects": { "alias": "maxSelectedObjects"; "required": false; }; "numberOfPlacesToSelect": { "alias": "numberOfPlacesToSelect"; "required": false; }; "isObjectSelectable": { "alias": "isObjectSelectable"; "required": false; }; "kpis": { "alias": "kpis"; "required": false; }; "timeZone": { "alias": "timeZone"; "required": false; }; "organizationName": { "alias": "organizationName"; "required": false; }; "sale": { "alias": "sale"; "required": false; }; "mapInsets": { "alias": "mapInsets"; "required": false; }; "colourBy": { "alias": "colourBy"; "required": false; }; "focusSectionOnOpen": { "alias": "focusSection"; "required": false; }; "focusSeat": { "alias": "focusSeat"; "required": false; }; "focusSeats": { "alias": "focusSeats"; "required": false; }; "focusCategory": { "alias": "focusCategory"; "required": false; }; "arrivedFrom": { "alias": "arrivedFrom"; "required": false; }; }, { "ready": "ready"; "tallies": "tallies"; "activity": "activity"; "controlRoom": "controlRoom"; "modeChange": "modeChange"; "followLiveChange": "followLiveChange"; "selectionChange": "selectionChange"; "objectSelected": "objectSelected"; "objectDeselected": "objectDeselected"; "selectionValidityChange": "selectionValidityChange"; "selectionValid": "selectionValid"; "selectionInvalid": "selectionInvalid"; "selectionLimit": "selectionLimit"; "filteredSectionChange": "filteredSectionChange"; "areaClick": "areaClick"; "actionComplete": "actionComplete"; "connectionChange": "connectionChange"; "roomStateChange": "roomStateChange"; "errored": "errored"; "openOrder": "openOrder"; "openTrend": "openTrend"; "openDesigner": "openDesigner"; }, never, never, true, never>;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export { SeatLayerSeatManagerComponent };
|
|
243
|
+
export type { SeatManagerOpenOrder, SeatManagerOpenTrend };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@seatlayer/angular",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.106.0",
|
|
4
4
|
"description": "SeatLayer's official Angular seating chart and seat map SDK: live availability, seat selection, temporary holds, and a typed TypeScript API for ticketing apps.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -36,8 +36,8 @@
|
|
|
36
36
|
"typescript"
|
|
37
37
|
],
|
|
38
38
|
"dependencies": {
|
|
39
|
-
"@seatlayer/core": "0.
|
|
40
|
-
"@seatlayer/js": "0.
|
|
39
|
+
"@seatlayer/core": "0.106.0",
|
|
40
|
+
"@seatlayer/js": "0.106.0",
|
|
41
41
|
"tslib": "^2.8.1"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
@@ -56,11 +56,23 @@
|
|
|
56
56
|
},
|
|
57
57
|
"module": "./dist/fesm2022/seatlayer-angular.mjs",
|
|
58
58
|
"types": "./dist/index.d.ts",
|
|
59
|
+
"//typesVersions": "Legacy (pre-`exports`) TypeScript resolution for the ./manager secondary entry, mirroring @seatlayer/react. `exports` alone leaves node10 consumers unable to see the types, which attw fails the release on.",
|
|
60
|
+
"typesVersions": {
|
|
61
|
+
"*": {
|
|
62
|
+
"manager": [
|
|
63
|
+
"./dist/manager/index.d.ts"
|
|
64
|
+
]
|
|
65
|
+
}
|
|
66
|
+
},
|
|
59
67
|
"exports": {
|
|
60
68
|
".": {
|
|
61
69
|
"types": "./dist/index.d.ts",
|
|
62
70
|
"default": "./dist/fesm2022/seatlayer-angular.mjs"
|
|
63
71
|
},
|
|
72
|
+
"./manager": {
|
|
73
|
+
"types": "./dist/manager/index.d.ts",
|
|
74
|
+
"default": "./dist/fesm2022/seatlayer-angular-manager.mjs"
|
|
75
|
+
},
|
|
64
76
|
"./package.json": {
|
|
65
77
|
"default": "./package.json"
|
|
66
78
|
}
|