@seatschart/angular 0.0.0-stage → 0.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/LICENSE +21 -0
- package/README.md +148 -3
- package/dist/designer.component.d.ts +62 -0
- package/dist/designer.component.d.ts.map +1 -0
- package/dist/designer.component.js +92 -0
- package/dist/event-manager.component.d.ts +61 -0
- package/dist/event-manager.component.d.ts.map +1 -0
- package/dist/event-manager.component.js +83 -0
- package/dist/host-core.d.ts +125 -0
- package/dist/host-core.d.ts.map +1 -0
- package/dist/host-core.js +292 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +4 -0
- package/dist/outputs.d.ts +22 -0
- package/dist/outputs.d.ts.map +1 -0
- package/dist/outputs.js +42 -0
- package/dist/seat-chart.component.d.ts +79 -0
- package/dist/seat-chart.component.d.ts.map +1 -0
- package/dist/seat-chart.component.js +132 -0
- package/package.json +58 -4
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"host-core.d.ts","sourceRoot":"","sources":["../src/host-core.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAGL,kBAAkB,EAElB,uBAAuB,EAGvB,UAAU,EACV,kBAAkB,EAClB,sBAAsB,EAItB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,EAC7B,KAAK,4BAA4B,EAElC,MAAM,mBAAmB,CAAC;AAa3B,mGAAmG;AACnG,eAAO,MAAM,iBAAiB,szCAAuD,CAAC;AACtF,MAAM,MAAM,cAAc,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,sEAAsE;AACtE,eAAO,MAAM,eAAe,u1BAAuD,CAAC;AACpF,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,eAAe,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE,2FAA2F;AAC3F,eAAO,MAAM,gBAAgB,oFAA4I,CAAC;AAC1K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O,MAAM,kBAAkB,EAAE,SAAS,CAAC,sBAAsB,CAWhE,CAAC;AAEF,eAAO,MAAM,aAAa,EAAE,SAAS,CAAC,kBAAkB,CAWvD,CAAC"}
|
|
@@ -0,0 +1,292 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Framework-agnostic glue between a component and one `@seatschart/embed` host instance (`SeatsChart`,
|
|
3
|
+
* `SeatsChartEventManager` or `SeatsChartDesigner`). This file is identical in `@seatschart/vue` and
|
|
4
|
+
* `@seatschart/angular` (a unit test keeps the two copies in step): the wrappers only map framework props, events
|
|
5
|
+
* and lifecycle onto it, every embed behaviour (iframe, origin checks, commands, sessions) stays in the embed.
|
|
6
|
+
*
|
|
7
|
+
* Prop updates are compared by value with what the instance last received, then applied the cheapest correct way:
|
|
8
|
+
* iframe attributes in place, live keys through `changeConfig` (no reload), other keys through `rerender(config)`
|
|
9
|
+
* (the hold session / the created chart is kept), mount-only keys by re-creating the instance.
|
|
10
|
+
*/
|
|
11
|
+
import { CHART_EVENT_CALLBACKS, ChartCommandError, DESIGNER_CALLBACKS, DESIGNER_PATCH_KEYS, EVENT_MANAGER_CALLBACKS, EVENT_MANAGER_CONFIG_KEYS, HOST_CONFIG_KEYS, SeatsChart, SeatsChartDesigner, SeatsChartEventManager, } from "@seatschart/embed";
|
|
12
|
+
// --- Prop / callback names ------------------------------------------------------------------------------------
|
|
13
|
+
/** Loader options of the buyer chart that are not declarative host config keys. */
|
|
14
|
+
const CHART_LOADER_KEYS = [
|
|
15
|
+
"webBase", "event", "events", "publicKey", "workspaceKey", "token", "parentOrigin", "channel", "channelKey",
|
|
16
|
+
"channelKeys", "session", "season", "language", "multiSelectEnabled", "holdToken", "availableCategories",
|
|
17
|
+
"unavailableCategories", "currency", "theme", "statusPalette", "transparent", "backgroundColor", "pricing",
|
|
18
|
+
"defaultRenderer", "height", "title", "className", "allowFullscreen", "timeoutMs", "holdTokenInputName",
|
|
19
|
+
"selectedObjectsInputName", "form",
|
|
20
|
+
];
|
|
21
|
+
/** Every buyer chart option a component accepts as a prop / input (the host config keys first). */
|
|
22
|
+
export const CHART_CONFIG_KEYS = [...HOST_CONFIG_KEYS, ...CHART_LOADER_KEYS];
|
|
23
|
+
/** Chart callbacks (seats.io names) forwarded as component events. */
|
|
24
|
+
export const CHART_CALLBACKS = [...CHART_EVENT_CALLBACKS, "onHoldCreated"];
|
|
25
|
+
/** Host-drawn prompts: registering one switches the matching viewer prompt to the host. */
|
|
26
|
+
export const PROMPT_CALLBACKS = ["onPlacesPrompt", "onTicketTypePrompt", "onPlacesWithTicketTypesPrompt"];
|
|
27
|
+
export const EVENT_MANAGER_KEYS = [
|
|
28
|
+
...EVENT_MANAGER_CONFIG_KEYS, "webBase", "event", "eventId", "token", "mode", "language", "colorScheme",
|
|
29
|
+
"parentOrigin", "height", "title", "className", "timeoutMs",
|
|
30
|
+
];
|
|
31
|
+
export { EVENT_MANAGER_CALLBACKS };
|
|
32
|
+
export const DESIGNER_KEYS = [
|
|
33
|
+
"webBase", "chartId", "chartKey", "token", "mode", "safeModeOptions", "features", "language", "colorScheme",
|
|
34
|
+
"canvasColorScheme", "openDraftDrawing", "openLatestDrawing", "parentOrigin", "height", "title", "className",
|
|
35
|
+
"timeoutMs",
|
|
36
|
+
];
|
|
37
|
+
export { DESIGNER_CALLBACKS };
|
|
38
|
+
/** `onObjectSelected` → `objectSelected`. */
|
|
39
|
+
export function eventName(callback) {
|
|
40
|
+
const name = callback.startsWith("on") ? callback.slice(2) : callback;
|
|
41
|
+
return (name.charAt(0).toLowerCase() + name.slice(1));
|
|
42
|
+
}
|
|
43
|
+
/** Every promise command of `SeatsChart` (each waits for the chart to render; rejects with `ChartCommandError`). */
|
|
44
|
+
export const CHART_COMMANDS = [
|
|
45
|
+
"whenReady", "request", "selectObjects", "deselectObjects", "clearSelection", "listSelectedObjects",
|
|
46
|
+
"selectBestAvailable", "findObject", "listCategories", "setFilteredCategories", "clearFilteredCategories",
|
|
47
|
+
"setFilters", "clearFilters", "highlightObjects", "clearHighlights", "zoomToObjects", "zoomToSelectedObjects",
|
|
48
|
+
"zoomToSection", "zoomToFilteredCategories", "resetView", "goToFloor", "listFloors", "goToAllFloorsView",
|
|
49
|
+
"getReportBySelectability", "getReportBySelectabilityGroupedBy", "getHoldToken", "startNewSession",
|
|
50
|
+
"releaseHoldToken", "isObjectInChannel", "showViewFromSeat", "trySelectObjects", "doSelectObjects",
|
|
51
|
+
"selectCategories", "deselectCategories", "listZones", "setSpotlight", "setSpotlightObjects",
|
|
52
|
+
"setSpotlightOnSelection", "clearSpotlight", "clearSpotlightObjects", "pulse", "unpulse", "resolvePrompt",
|
|
53
|
+
"exportImage", "setPricing", "changeConfig",
|
|
54
|
+
];
|
|
55
|
+
/** Every promise command of `SeatsChartEventManager` (seats.io `EventManager` methods). */
|
|
56
|
+
export const EVENT_MANAGER_COMMANDS = [
|
|
57
|
+
"whenReady", "request", "listSelectedObjects", "selectObjects", "doSelectObjects", "trySelectObjects",
|
|
58
|
+
"deselectObjects", "clearSelection", "setHighlightedObjects", "clearHighlightedObjects", "listOrderChanges",
|
|
59
|
+
"zoomToObjects", "zoomToSelectedObjects", "changeConfig",
|
|
60
|
+
];
|
|
61
|
+
/** Every promise command of `SeatsChartDesigner`. */
|
|
62
|
+
export const DESIGNER_COMMANDS = [
|
|
63
|
+
"whenReady", "request", "save", "publish", "getState", "changeConfig",
|
|
64
|
+
];
|
|
65
|
+
/**
|
|
66
|
+
* Methods that forward to the current instance (re-created instances included). Before mount and after unmount
|
|
67
|
+
* they reject with `ChartCommandError` ("… is not mounted.") instead of throwing.
|
|
68
|
+
*/
|
|
69
|
+
export function delegateCommands(current, names, label) {
|
|
70
|
+
const out = {};
|
|
71
|
+
for (const name of names)
|
|
72
|
+
out[name] = (...args) => runCommand(current(), name, label, args);
|
|
73
|
+
return out;
|
|
74
|
+
}
|
|
75
|
+
/** Run one promise command on the instance (rejects with `ChartCommandError` without one). */
|
|
76
|
+
export function runCommand(instance, name, label, args) {
|
|
77
|
+
if (instance === null)
|
|
78
|
+
return Promise.reject(new ChartCommandError(`${label} is not mounted.`, name));
|
|
79
|
+
const method = instance[name];
|
|
80
|
+
return method.apply(instance, [...args]);
|
|
81
|
+
}
|
|
82
|
+
// --- Value comparison -------------------------------------------------------------------------------------------
|
|
83
|
+
function isPlainObject(value) {
|
|
84
|
+
const proto = Object.getPrototypeOf(value);
|
|
85
|
+
return proto === Object.prototype || proto === null;
|
|
86
|
+
}
|
|
87
|
+
const identities = new WeakMap();
|
|
88
|
+
let lastIdentity = 0;
|
|
89
|
+
/**
|
|
90
|
+
* Order-independent fingerprint of a prop value: plain objects and arrays by value (reactive proxies included),
|
|
91
|
+
* functions as "a function", other objects (a form element) by identity. `undefined` = not set.
|
|
92
|
+
*/
|
|
93
|
+
export function valueKey(value) {
|
|
94
|
+
if (value === undefined)
|
|
95
|
+
return undefined;
|
|
96
|
+
if (typeof value === "function")
|
|
97
|
+
return "ƒ";
|
|
98
|
+
if (value === null || typeof value !== "object")
|
|
99
|
+
return typeof value === "string" ? JSON.stringify(value) : String(value);
|
|
100
|
+
if (Array.isArray(value))
|
|
101
|
+
return `[${value.map((item) => valueKey(item) ?? "u").join(",")}]`;
|
|
102
|
+
if (!isPlainObject(value)) {
|
|
103
|
+
let id = identities.get(value);
|
|
104
|
+
if (id === undefined) {
|
|
105
|
+
id = ++lastIdentity;
|
|
106
|
+
identities.set(value, id);
|
|
107
|
+
}
|
|
108
|
+
return `#${id}`;
|
|
109
|
+
}
|
|
110
|
+
const record = value;
|
|
111
|
+
const parts = [];
|
|
112
|
+
for (const key of Object.keys(record).sort()) {
|
|
113
|
+
const item = valueKey(record[key]);
|
|
114
|
+
if (item !== undefined)
|
|
115
|
+
parts.push(`${JSON.stringify(key)}:${item}`);
|
|
116
|
+
}
|
|
117
|
+
return `{${parts.join(",")}}`;
|
|
118
|
+
}
|
|
119
|
+
/**
|
|
120
|
+
* Deep copy of plain objects and arrays (reactive proxies become plain data the embed can post to the iframe);
|
|
121
|
+
* functions and other objects are kept as they are.
|
|
122
|
+
*/
|
|
123
|
+
export function toPlain(value) {
|
|
124
|
+
if (value === null || typeof value !== "object")
|
|
125
|
+
return value;
|
|
126
|
+
if (Array.isArray(value))
|
|
127
|
+
return value.map((item) => toPlain(item));
|
|
128
|
+
if (!isPlainObject(value))
|
|
129
|
+
return value;
|
|
130
|
+
const out = {};
|
|
131
|
+
for (const [key, item] of Object.entries(value))
|
|
132
|
+
out[key] = toPlain(item);
|
|
133
|
+
return out;
|
|
134
|
+
}
|
|
135
|
+
/** Iframe attributes updated in place (no reload). */
|
|
136
|
+
const FRAME_KEYS = new Set(["height", "title", "className"]);
|
|
137
|
+
/** One mounted embed instance driven by component props. */
|
|
138
|
+
export class EmbedBinding {
|
|
139
|
+
constructor(kind) {
|
|
140
|
+
this.kind = kind;
|
|
141
|
+
this.instance = null;
|
|
142
|
+
this.container = null;
|
|
143
|
+
this.config = {};
|
|
144
|
+
this.applied = new Map();
|
|
145
|
+
}
|
|
146
|
+
/** The live embed instance (null before mount / after unmount). */
|
|
147
|
+
get current() {
|
|
148
|
+
return this.instance;
|
|
149
|
+
}
|
|
150
|
+
get label() {
|
|
151
|
+
return this.kind.label;
|
|
152
|
+
}
|
|
153
|
+
/** Create the instance in `container` and render it (browser only). */
|
|
154
|
+
mount(container, config) {
|
|
155
|
+
if (this.instance !== null)
|
|
156
|
+
return;
|
|
157
|
+
this.container = container;
|
|
158
|
+
this.remember(config);
|
|
159
|
+
const instance = this.kind.create({ ...this.config, container });
|
|
160
|
+
this.instance = instance;
|
|
161
|
+
instance.render();
|
|
162
|
+
}
|
|
163
|
+
/** Apply new props; returns what was done (tests and diagnostics). */
|
|
164
|
+
update(next) {
|
|
165
|
+
const previous = this.applied;
|
|
166
|
+
const before = this.config;
|
|
167
|
+
this.remember(next);
|
|
168
|
+
const instance = this.instance;
|
|
169
|
+
if (instance === null)
|
|
170
|
+
return "none";
|
|
171
|
+
const changed = [];
|
|
172
|
+
for (const key of new Set([...previous.keys(), ...this.applied.keys()])) {
|
|
173
|
+
if (previous.get(key) !== this.applied.get(key))
|
|
174
|
+
changed.push(key);
|
|
175
|
+
}
|
|
176
|
+
if (changed.length === 0)
|
|
177
|
+
return "none";
|
|
178
|
+
if (changed.some((key) => this.kind.mountKeys.has(key))) {
|
|
179
|
+
this.remount();
|
|
180
|
+
return "remount";
|
|
181
|
+
}
|
|
182
|
+
if (changed.some((key) => !this.kind.liveKeys.has(key) && !FRAME_KEYS.has(key))) {
|
|
183
|
+
// Keys that disappeared are passed as undefined so the instance forgets them.
|
|
184
|
+
const config = { ...this.config };
|
|
185
|
+
for (const key of Object.keys(before))
|
|
186
|
+
if (!(key in config))
|
|
187
|
+
config[key] = undefined;
|
|
188
|
+
this.kind.rerender(instance, config);
|
|
189
|
+
return "rerender";
|
|
190
|
+
}
|
|
191
|
+
let action = "none";
|
|
192
|
+
if (changed.some((key) => FRAME_KEYS.has(key))) {
|
|
193
|
+
this.applyFrame(instance.getIframe());
|
|
194
|
+
action = "frame";
|
|
195
|
+
}
|
|
196
|
+
const patch = {};
|
|
197
|
+
for (const key of changed)
|
|
198
|
+
if (this.kind.liveKeys.has(key))
|
|
199
|
+
patch[key] = this.config[key] ?? null;
|
|
200
|
+
if (Object.keys(patch).length > 0) {
|
|
201
|
+
void this.kind.changeConfig(instance, patch, this.config).catch((error) => {
|
|
202
|
+
// A patch still waiting when the instance goes away is moot.
|
|
203
|
+
if (this.instance === instance)
|
|
204
|
+
console.warn(`[SeatsChart] ${this.kind.label}: config not applied:`, error);
|
|
205
|
+
});
|
|
206
|
+
action = "changeConfig";
|
|
207
|
+
}
|
|
208
|
+
return action;
|
|
209
|
+
}
|
|
210
|
+
/** Re-create the iframe with the current props (seats.io `rerender()`). */
|
|
211
|
+
rerender() {
|
|
212
|
+
if (this.instance !== null)
|
|
213
|
+
this.kind.rerender(this.instance, { ...this.config });
|
|
214
|
+
}
|
|
215
|
+
/** Remove the iframe and every listener. */
|
|
216
|
+
destroy() {
|
|
217
|
+
this.instance?.destroy();
|
|
218
|
+
this.instance = null;
|
|
219
|
+
this.container = null;
|
|
220
|
+
}
|
|
221
|
+
remember(config) {
|
|
222
|
+
const plain = {};
|
|
223
|
+
const applied = new Map();
|
|
224
|
+
for (const [key, value] of Object.entries(config)) {
|
|
225
|
+
if (value === undefined)
|
|
226
|
+
continue;
|
|
227
|
+
plain[key] = toPlain(value);
|
|
228
|
+
const fingerprint = valueKey(value);
|
|
229
|
+
if (fingerprint !== undefined)
|
|
230
|
+
applied.set(key, fingerprint);
|
|
231
|
+
}
|
|
232
|
+
this.config = plain;
|
|
233
|
+
this.applied = applied;
|
|
234
|
+
}
|
|
235
|
+
remount() {
|
|
236
|
+
const container = this.container;
|
|
237
|
+
this.instance?.destroy();
|
|
238
|
+
this.instance = null;
|
|
239
|
+
if (container !== null)
|
|
240
|
+
this.mount(container, this.config);
|
|
241
|
+
}
|
|
242
|
+
applyFrame(iframe) {
|
|
243
|
+
if (iframe === null)
|
|
244
|
+
return;
|
|
245
|
+
const { height, title, className } = this.config;
|
|
246
|
+
const h = typeof height === "number" || typeof height === "string" ? height : this.kind.defaultHeight;
|
|
247
|
+
iframe.style.height = typeof h === "number" ? `${h}px` : h;
|
|
248
|
+
iframe.title = typeof title === "string" ? title : this.kind.defaultTitle;
|
|
249
|
+
iframe.className = typeof className === "string" ? className : "";
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
// --- The three embeds -------------------------------------------------------------------------------------------
|
|
253
|
+
export const CHART_KIND = {
|
|
254
|
+
label: "Seat chart",
|
|
255
|
+
create: (config) => new SeatsChart(config),
|
|
256
|
+
rerender: (chart, config) => {
|
|
257
|
+
chart.rerender(config);
|
|
258
|
+
},
|
|
259
|
+
changeConfig: (chart, patch, config) => {
|
|
260
|
+
// Host pricing follows the chart's sales channel.
|
|
261
|
+
const withChannel = "pricing" in patch && typeof config.channel === "string" ? { ...patch, channel: config.channel } : patch;
|
|
262
|
+
return chart.changeConfig(withChannel);
|
|
263
|
+
},
|
|
264
|
+
liveKeys: new Set([...HOST_CONFIG_KEYS, "pricing"]),
|
|
265
|
+
mountKeys: new Set(["timeoutMs", "holdTokenInputName", "selectedObjectsInputName", "form"]),
|
|
266
|
+
defaultHeight: 640,
|
|
267
|
+
defaultTitle: "Seat map",
|
|
268
|
+
};
|
|
269
|
+
export const EVENT_MANAGER_KIND = {
|
|
270
|
+
label: "Event Manager",
|
|
271
|
+
create: (config) => new SeatsChartEventManager(config),
|
|
272
|
+
rerender: (manager, config) => {
|
|
273
|
+
manager.rerender(config);
|
|
274
|
+
},
|
|
275
|
+
changeConfig: (manager, patch) => manager.changeConfig(patch),
|
|
276
|
+
liveKeys: new Set([...EVENT_MANAGER_CONFIG_KEYS, "language", "colorScheme"]),
|
|
277
|
+
mountKeys: new Set(["timeoutMs"]),
|
|
278
|
+
defaultHeight: 760,
|
|
279
|
+
defaultTitle: "Event Manager",
|
|
280
|
+
};
|
|
281
|
+
export const DESIGNER_KIND = {
|
|
282
|
+
label: "Designer",
|
|
283
|
+
create: (config) => new SeatsChartDesigner(config),
|
|
284
|
+
rerender: (designer, config) => {
|
|
285
|
+
designer.rerender(config);
|
|
286
|
+
},
|
|
287
|
+
changeConfig: (designer, patch) => designer.changeConfig(patch),
|
|
288
|
+
liveKeys: new Set(DESIGNER_PATCH_KEYS),
|
|
289
|
+
mountKeys: new Set(["timeoutMs"]),
|
|
290
|
+
defaultHeight: 800,
|
|
291
|
+
defaultTitle: "Seating chart designer",
|
|
292
|
+
};
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { SEAT_CHART_INPUTS, SEAT_CHART_OUTPUTS, SeatChartComponent, type SeatChartInputs, type SeatChartOutputs, type SeatChartPrompt, } from "./seat-chart.component.js";
|
|
2
|
+
export { EVENT_MANAGER_INPUTS, EVENT_MANAGER_OUTPUTS, EventManagerComponent, type EventManagerInputs, type EventManagerOutputs, } from "./event-manager.component.js";
|
|
3
|
+
export { DESIGNER_INPUTS, DESIGNER_OUTPUTS, DesignerComponent, type DesignerInputs, type DesignerOutputs, } from "./designer.component.js";
|
|
4
|
+
export { CHART_COMMANDS, DESIGNER_COMMANDS, EVENT_MANAGER_COMMANDS, EmbedBinding, type BindingAction, type ChartCommands, type DesignerCommands, type EventManagerCommands, } from "./host-core.js";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,EAClB,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACrB,KAAK,eAAe,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EACL,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,EACrB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,GACzB,MAAM,8BAA8B,CAAC;AACtC,OAAO,EACL,eAAe,EACf,gBAAgB,EAChB,iBAAiB,EACjB,KAAK,cAAc,EACnB,KAAK,eAAe,GACrB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACL,cAAc,EACd,iBAAiB,EACjB,sBAAsB,EACtB,YAAY,EACZ,KAAK,aAAa,EAClB,KAAK,aAAa,EAClB,KAAK,gBAAgB,EACrB,KAAK,oBAAoB,GAC1B,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export { SEAT_CHART_INPUTS, SEAT_CHART_OUTPUTS, SeatChartComponent, } from "./seat-chart.component.js";
|
|
2
|
+
export { EVENT_MANAGER_INPUTS, EVENT_MANAGER_OUTPUTS, EventManagerComponent, } from "./event-manager.component.js";
|
|
3
|
+
export { DESIGNER_INPUTS, DESIGNER_OUTPUTS, DesignerComponent, } from "./designer.component.js";
|
|
4
|
+
export { CHART_COMMANDS, DESIGNER_COMMANDS, EVENT_MANAGER_COMMANDS, EmbedBinding, } from "./host-core.js";
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { EventEmitter, type NgZone } from "@angular/core";
|
|
2
|
+
import { type EmbedConfig, type EventNameOf } from "./host-core.js";
|
|
3
|
+
/** The payload an output emits for a callback: its last argument (the event), or nothing. */
|
|
4
|
+
type LastArg<F> = F extends (...args: infer A) => unknown ? (A extends [...unknown[], infer L] ? L : void) : never;
|
|
5
|
+
/** `{ onObjectSelected?: (e: E) => void }` → `{ objectSelected: EventEmitter<E> }`. */
|
|
6
|
+
export type CallbackOutputs<C, K extends keyof C & string> = {
|
|
7
|
+
readonly [N in EventNameOf<K>]: EventEmitter<LastArg<NonNullable<C[`on${Capitalize<N>}` & keyof C]>>>;
|
|
8
|
+
};
|
|
9
|
+
/** Output name of a callback (`onObjectSelected` → `objectSelected`, with explicit renames). */
|
|
10
|
+
export declare function outputName(callback: string, renames?: Readonly<Record<string, string>>): string;
|
|
11
|
+
/** Create one `EventEmitter` per output on the component. */
|
|
12
|
+
export declare function createOutputs(self: object, names: readonly string[]): void;
|
|
13
|
+
export declare function emitterOf(self: object, name: string): EventEmitter<unknown>;
|
|
14
|
+
/**
|
|
15
|
+
* One stable function per callback that emits its last argument on the matching output, inside the Angular zone,
|
|
16
|
+
* and only when the output has a subscriber (unobserved chart traffic such as hover never triggers change detection).
|
|
17
|
+
*/
|
|
18
|
+
export declare function outputForwarders(self: object, callbacks: readonly string[], zone: NgZone, renames?: Readonly<Record<string, string>>): EmbedConfig;
|
|
19
|
+
/** Copy the inputs that are set. */
|
|
20
|
+
export declare function pickInputs(self: object, names: readonly string[]): EmbedConfig;
|
|
21
|
+
export {};
|
|
22
|
+
//# sourceMappingURL=outputs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"outputs.d.ts","sourceRoot":"","sources":["../src/outputs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,KAAK,MAAM,EAAE,MAAM,eAAe,CA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,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,MAAM,EAAE,GAAG,WAAW,CAQ9E"}
|
package/dist/outputs.js
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { EventEmitter } from "@angular/core";
|
|
2
|
+
import { eventName } from "./host-core.js";
|
|
3
|
+
/** Output name of a callback (`onObjectSelected` → `objectSelected`, with explicit renames). */
|
|
4
|
+
export function outputName(callback, renames = {}) {
|
|
5
|
+
return renames[callback] ?? eventName(callback);
|
|
6
|
+
}
|
|
7
|
+
/** Create one `EventEmitter` per output on the component. */
|
|
8
|
+
export function createOutputs(self, names) {
|
|
9
|
+
const target = self;
|
|
10
|
+
for (const name of names)
|
|
11
|
+
target[name] = new EventEmitter();
|
|
12
|
+
}
|
|
13
|
+
export function emitterOf(self, name) {
|
|
14
|
+
return self[name];
|
|
15
|
+
}
|
|
16
|
+
/**
|
|
17
|
+
* One stable function per callback that emits its last argument on the matching output, inside the Angular zone,
|
|
18
|
+
* and only when the output has a subscriber (unobserved chart traffic such as hover never triggers change detection).
|
|
19
|
+
*/
|
|
20
|
+
export function outputForwarders(self, callbacks, zone, renames = {}) {
|
|
21
|
+
const out = {};
|
|
22
|
+
for (const key of callbacks) {
|
|
23
|
+
const name = outputName(key, renames);
|
|
24
|
+
out[key] = (...args) => {
|
|
25
|
+
const emitter = emitterOf(self, name);
|
|
26
|
+
if (emitter.observed)
|
|
27
|
+
zone.run(() => emitter.emit(args.length > 0 ? args[args.length - 1] : undefined));
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return out;
|
|
31
|
+
}
|
|
32
|
+
/** Copy the inputs that are set. */
|
|
33
|
+
export function pickInputs(self, names) {
|
|
34
|
+
const source = self;
|
|
35
|
+
const out = {};
|
|
36
|
+
for (const name of names) {
|
|
37
|
+
const value = source[name];
|
|
38
|
+
if (value !== undefined)
|
|
39
|
+
out[name] = value;
|
|
40
|
+
}
|
|
41
|
+
return out;
|
|
42
|
+
}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
import { type AfterViewInit, type EventEmitter, type OnChanges, type OnDestroy } from "@angular/core";
|
|
2
|
+
import type { PromptParams, SeatsChart, SeatsChartConfig } from "@seatschart/embed";
|
|
3
|
+
import { type ChartCallbackKey, type ChartCommands, type ChartConfigKey } from "./host-core.js";
|
|
4
|
+
import { type CallbackOutputs } from "./outputs.js";
|
|
5
|
+
import * as i0 from "@angular/core";
|
|
6
|
+
/**
|
|
7
|
+
* `<seatschart-chart>` inputs: every `SeatsChart` option of `@seatschart/embed` (seats.io renderer names) except the
|
|
8
|
+
* container. The chart `style` option (font, corner radius, button shape) is `chartStyle`, so `style` keeps styling
|
|
9
|
+
* the host element.
|
|
10
|
+
*/
|
|
11
|
+
export type SeatChartInputs = {
|
|
12
|
+
[K in Exclude<ChartConfigKey, "style">]?: SeatsChartConfig[K];
|
|
13
|
+
} & {
|
|
14
|
+
/** The chart's `style` option (`{ font, cornerRadius, buttonShape }`), not CSS. */
|
|
15
|
+
chartStyle?: SeatsChartConfig["style"];
|
|
16
|
+
};
|
|
17
|
+
/** A host-drawn prompt: answer with `confirm(value)` or `cancel()` (once). */
|
|
18
|
+
export type SeatChartPrompt<T> = {
|
|
19
|
+
params: PromptParams;
|
|
20
|
+
confirm: (value: T) => void;
|
|
21
|
+
cancel: () => void;
|
|
22
|
+
};
|
|
23
|
+
/** Every chart callback as an output (`onObjectSelected` → `(objectSelected)`), plus the host-drawn prompts. */
|
|
24
|
+
export type SeatChartOutputs = CallbackOutputs<Pick<SeatsChartConfig, ChartCallbackKey>, ChartCallbackKey> & {
|
|
25
|
+
/** Subscribing switches the general admission quantity prompt to the host page. */
|
|
26
|
+
readonly placesPrompt: EventEmitter<SeatChartPrompt<number>>;
|
|
27
|
+
/** Subscribing switches the ticket type prompt to the host page (`confirm(ticketTypeId)`). */
|
|
28
|
+
readonly ticketTypePrompt: EventEmitter<SeatChartPrompt<string>>;
|
|
29
|
+
/** Subscribing switches the quantity-per-ticket-type prompt to the host page (`confirm({ [ticketTypeId]: quantity })`). */
|
|
30
|
+
readonly placesWithTicketTypesPrompt: EventEmitter<SeatChartPrompt<Record<string, number>>>;
|
|
31
|
+
};
|
|
32
|
+
declare const INPUTS: readonly ["objectColor", "objectLabel", "tooltip", "priceFormatter", "numberOfPlacesToSelect", "maxSelectedObjects", "showSectionContents", "showMinimap", "showSurroundings", "sessionMode", "selectionValidators", "accessibilityFilter", "mode", "prompts", "objectWithoutPricingSelectable", "fitTo", "loading", "messages", "selectedObjects", "gestureHandling", "selectionModes", "showSeatLabels", "minimumSelectedPlaces", "sectionColor", "objectIcon", "isObjectVisible", "hideSectionsNotForSale", "selectableObjects", "objectWithoutCategorySelectable", "showSectionPricingOverlay", "showObjectPopover", "showFilterControls", "showLegend", "showZoomOutButton", "showFullScreenButton", "fullScreenTarget", "canGoBack", "resaleListings", "partySize", "chartStyle", "objectPopover", "legend", "filterControls", "activeFloor", "lockActiveFloor", "showFloorElevator", "settings3d", "webBase", "event", "events", "publicKey", "workspaceKey", "token", "parentOrigin", "channel", "channelKey", "channelKeys", "session", "season", "language", "multiSelectEnabled", "holdToken", "availableCategories", "unavailableCategories", "currency", "theme", "statusPalette", "transparent", "backgroundColor", "pricing", "defaultRenderer", "height", "title", "className", "allowFullscreen", "timeoutMs", "holdTokenInputName", "selectedObjectsInputName", "form"];
|
|
33
|
+
declare const OUTPUTS: readonly ["objectSelected", "objectDeselected", "sessionHold", "holdSucceeded", "holdCallsInProgress", "holdCallsComplete", "holdConfirmed", "releaseHoldSucceeded", "releaseHoldFailed", "selectedObjectUnavailable", "chartRerenderingStarted", "promptRequest", "holdTokenExpired", "chartRendered", "chartRenderingFailed", "objectClicked", "objectHovered", "objectUnhovered", "holdFailed", "selectionInvalid", "selectionValid", "objectStatusChanged", "bestAvailableSelected", "bestAvailableFailed", "filteredCategoriesChanged", "accessibilityFilterChanged", "filtersChanged", "sessionInitialized", "floorChanged", "fullScreenOpened", "fullScreenClosed", "fullScreenRequest", "objectMouseOver", "objectMouseOut", "bestAvailableSelectionFailed", "selectedObjectBooked", "holdCreated", "placesPrompt", "ticketTypePrompt", "placesWithTicketTypesPrompt"];
|
|
34
|
+
type Assert<T extends true> = T;
|
|
35
|
+
type Same<A, B> = [Exclude<A, B> | Exclude<B, A>] extends [never] ? true : false;
|
|
36
|
+
/** Compile-time guard: the literal lists name every chart option, callback and prompt. */
|
|
37
|
+
export type SeatChartMetadataCovered = [
|
|
38
|
+
Assert<Same<(typeof INPUTS)[number], keyof SeatChartInputs>>,
|
|
39
|
+
Assert<Same<(typeof OUTPUTS)[number], keyof SeatChartOutputs>>
|
|
40
|
+
];
|
|
41
|
+
/**
|
|
42
|
+
* `<seatschart-chart>`: the SeatsChart buyer seat map (sandboxed viewer iframe). Inputs map to the `SeatsChart`
|
|
43
|
+
* loader options; changes to declarative options (colours, labels, caps, pricing, prompts, `settings3d`, …) are
|
|
44
|
+
* applied live with `changeConfig`, other changes re-render the iframe (the hold session continues). Pass new object
|
|
45
|
+
* references to change object inputs (`OnChanges`). Every chart callback is an output; every `SeatsChart` command is a
|
|
46
|
+
* method (`@ViewChild(SeatChartComponent)`), each resolving once the chart rendered. `token` is a short-lived buyer
|
|
47
|
+
* JWT from your backend — never an API key.
|
|
48
|
+
*/
|
|
49
|
+
export declare class SeatChartComponent implements AfterViewInit, OnChanges, OnDestroy {
|
|
50
|
+
private readonly host;
|
|
51
|
+
private readonly zone;
|
|
52
|
+
private readonly browser;
|
|
53
|
+
private readonly forwarders;
|
|
54
|
+
private readonly promptForwarders;
|
|
55
|
+
constructor();
|
|
56
|
+
/**
|
|
57
|
+
* The underlying `SeatsChart` instance (null before the view is ready, on the server and after destroy):
|
|
58
|
+
* `chart?.selectedObjects` and `chart?.holdToken` give the live selection and hold token synchronously (the
|
|
59
|
+
* component's `selectedObjects` / `holdToken` are the inputs).
|
|
60
|
+
*/
|
|
61
|
+
get chart(): SeatsChart | null;
|
|
62
|
+
getIframe(): HTMLIFrameElement | null;
|
|
63
|
+
/** Re-create the iframe with the current inputs; an active hold session continues. */
|
|
64
|
+
rerender(): void;
|
|
65
|
+
ngOnChanges(): void;
|
|
66
|
+
ngAfterViewInit(): void;
|
|
67
|
+
ngOnDestroy(): void;
|
|
68
|
+
private config;
|
|
69
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SeatChartComponent, never>;
|
|
70
|
+
static ɵcmp: i0.ɵɵComponentDeclaration<SeatChartComponent, "seatschart-chart", never, { "objectColor": { "alias": "objectColor"; "required": false; }; "objectLabel": { "alias": "objectLabel"; "required": false; }; "tooltip": { "alias": "tooltip"; "required": false; }; "priceFormatter": { "alias": "priceFormatter"; "required": false; }; "numberOfPlacesToSelect": { "alias": "numberOfPlacesToSelect"; "required": false; }; "maxSelectedObjects": { "alias": "maxSelectedObjects"; "required": false; }; "showSectionContents": { "alias": "showSectionContents"; "required": false; }; "showMinimap": { "alias": "showMinimap"; "required": false; }; "showSurroundings": { "alias": "showSurroundings"; "required": false; }; "sessionMode": { "alias": "sessionMode"; "required": false; }; "selectionValidators": { "alias": "selectionValidators"; "required": false; }; "accessibilityFilter": { "alias": "accessibilityFilter"; "required": false; }; "mode": { "alias": "mode"; "required": false; }; "prompts": { "alias": "prompts"; "required": false; }; "objectWithoutPricingSelectable": { "alias": "objectWithoutPricingSelectable"; "required": false; }; "fitTo": { "alias": "fitTo"; "required": false; }; "loading": { "alias": "loading"; "required": false; }; "messages": { "alias": "messages"; "required": false; }; "selectedObjects": { "alias": "selectedObjects"; "required": false; }; "gestureHandling": { "alias": "gestureHandling"; "required": false; }; "selectionModes": { "alias": "selectionModes"; "required": false; }; "showSeatLabels": { "alias": "showSeatLabels"; "required": false; }; "minimumSelectedPlaces": { "alias": "minimumSelectedPlaces"; "required": false; }; "sectionColor": { "alias": "sectionColor"; "required": false; }; "objectIcon": { "alias": "objectIcon"; "required": false; }; "isObjectVisible": { "alias": "isObjectVisible"; "required": false; }; "hideSectionsNotForSale": { "alias": "hideSectionsNotForSale"; "required": false; }; "selectableObjects": { "alias": "selectableObjects"; "required": false; }; "objectWithoutCategorySelectable": { "alias": "objectWithoutCategorySelectable"; "required": false; }; "showSectionPricingOverlay": { "alias": "showSectionPricingOverlay"; "required": false; }; "showObjectPopover": { "alias": "showObjectPopover"; "required": false; }; "showFilterControls": { "alias": "showFilterControls"; "required": false; }; "showLegend": { "alias": "showLegend"; "required": false; }; "showZoomOutButton": { "alias": "showZoomOutButton"; "required": false; }; "showFullScreenButton": { "alias": "showFullScreenButton"; "required": false; }; "fullScreenTarget": { "alias": "fullScreenTarget"; "required": false; }; "canGoBack": { "alias": "canGoBack"; "required": false; }; "resaleListings": { "alias": "resaleListings"; "required": false; }; "partySize": { "alias": "partySize"; "required": false; }; "chartStyle": { "alias": "chartStyle"; "required": false; }; "objectPopover": { "alias": "objectPopover"; "required": false; }; "legend": { "alias": "legend"; "required": false; }; "filterControls": { "alias": "filterControls"; "required": false; }; "activeFloor": { "alias": "activeFloor"; "required": false; }; "lockActiveFloor": { "alias": "lockActiveFloor"; "required": false; }; "showFloorElevator": { "alias": "showFloorElevator"; "required": false; }; "settings3d": { "alias": "settings3d"; "required": false; }; "webBase": { "alias": "webBase"; "required": false; }; "event": { "alias": "event"; "required": false; }; "events": { "alias": "events"; "required": false; }; "publicKey": { "alias": "publicKey"; "required": false; }; "workspaceKey": { "alias": "workspaceKey"; "required": false; }; "token": { "alias": "token"; "required": false; }; "parentOrigin": { "alias": "parentOrigin"; "required": false; }; "channel": { "alias": "channel"; "required": false; }; "channelKey": { "alias": "channelKey"; "required": false; }; "channelKeys": { "alias": "channelKeys"; "required": false; }; "session": { "alias": "session"; "required": false; }; "season": { "alias": "season"; "required": false; }; "language": { "alias": "language"; "required": false; }; "multiSelectEnabled": { "alias": "multiSelectEnabled"; "required": false; }; "holdToken": { "alias": "holdToken"; "required": false; }; "availableCategories": { "alias": "availableCategories"; "required": false; }; "unavailableCategories": { "alias": "unavailableCategories"; "required": false; }; "currency": { "alias": "currency"; "required": false; }; "theme": { "alias": "theme"; "required": false; }; "statusPalette": { "alias": "statusPalette"; "required": false; }; "transparent": { "alias": "transparent"; "required": false; }; "backgroundColor": { "alias": "backgroundColor"; "required": false; }; "pricing": { "alias": "pricing"; "required": false; }; "defaultRenderer": { "alias": "defaultRenderer"; "required": false; }; "height": { "alias": "height"; "required": false; }; "title": { "alias": "title"; "required": false; }; "className": { "alias": "className"; "required": false; }; "allowFullscreen": { "alias": "allowFullscreen"; "required": false; }; "timeoutMs": { "alias": "timeoutMs"; "required": false; }; "holdTokenInputName": { "alias": "holdTokenInputName"; "required": false; }; "selectedObjectsInputName": { "alias": "selectedObjectsInputName"; "required": false; }; "form": { "alias": "form"; "required": false; }; }, { "objectSelected": "objectSelected"; "objectDeselected": "objectDeselected"; "sessionHold": "sessionHold"; "holdSucceeded": "holdSucceeded"; "holdCallsInProgress": "holdCallsInProgress"; "holdCallsComplete": "holdCallsComplete"; "holdConfirmed": "holdConfirmed"; "releaseHoldSucceeded": "releaseHoldSucceeded"; "releaseHoldFailed": "releaseHoldFailed"; "selectedObjectUnavailable": "selectedObjectUnavailable"; "chartRerenderingStarted": "chartRerenderingStarted"; "promptRequest": "promptRequest"; "holdTokenExpired": "holdTokenExpired"; "chartRendered": "chartRendered"; "chartRenderingFailed": "chartRenderingFailed"; "objectClicked": "objectClicked"; "objectHovered": "objectHovered"; "objectUnhovered": "objectUnhovered"; "holdFailed": "holdFailed"; "selectionInvalid": "selectionInvalid"; "selectionValid": "selectionValid"; "objectStatusChanged": "objectStatusChanged"; "bestAvailableSelected": "bestAvailableSelected"; "bestAvailableFailed": "bestAvailableFailed"; "filteredCategoriesChanged": "filteredCategoriesChanged"; "accessibilityFilterChanged": "accessibilityFilterChanged"; "filtersChanged": "filtersChanged"; "sessionInitialized": "sessionInitialized"; "floorChanged": "floorChanged"; "fullScreenOpened": "fullScreenOpened"; "fullScreenClosed": "fullScreenClosed"; "fullScreenRequest": "fullScreenRequest"; "objectMouseOver": "objectMouseOver"; "objectMouseOut": "objectMouseOut"; "bestAvailableSelectionFailed": "bestAvailableSelectionFailed"; "selectedObjectBooked": "selectedObjectBooked"; "holdCreated": "holdCreated"; "placesPrompt": "placesPrompt"; "ticketTypePrompt": "ticketTypePrompt"; "placesWithTicketTypesPrompt": "placesWithTicketTypesPrompt"; }, never, never, true, never>;
|
|
71
|
+
}
|
|
72
|
+
export interface SeatChartComponent extends SeatChartInputs, SeatChartOutputs, ChartCommands {
|
|
73
|
+
}
|
|
74
|
+
/** `<seatschart-chart>` input names (`chartStyle` is the chart `style` option). */
|
|
75
|
+
export declare const SEAT_CHART_INPUTS: readonly string[];
|
|
76
|
+
/** `<seatschart-chart>` output names (`onObjectSelected` → `objectSelected`, plus the three prompts). */
|
|
77
|
+
export declare const SEAT_CHART_OUTPUTS: readonly string[];
|
|
78
|
+
export {};
|
|
79
|
+
//# sourceMappingURL=seat-chart.component.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"seat-chart.component.d.ts","sourceRoot":"","sources":["../src/seat-chart.component.ts"],"names":[],"mappings":"AACA,OAAO,EAOL,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,SAAS,EACd,KAAK,SAAS,EACf,MAAM,eAAe,CAAC;AACvB,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACpF,OAAO,EAML,KAAK,gBAAgB,EACrB,KAAK,aAAa,EAClB,KAAK,cAAc,EAEpB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EAA0D,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;;AAE5G;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG;KAAG,CAAC,IAAI,OAAO,CAAC,cAAc,EAAE,OAAO,CAAC,CAAC,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC;CAAE,GAAG;IAChG,mFAAmF;IACnF,UAAU,CAAC,EAAE,gBAAgB,CAAC,OAAO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