@seatlayer/js 0.53.0 → 0.55.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 +19 -5
- package/dist/{channelsMode-BX7s9bUl.d.cts → channelsMode-1b6xBWKM.d.cts} +132 -5
- package/dist/{channelsMode-BX7s9bUl.d.ts → channelsMode-1b6xBWKM.d.ts} +132 -5
- package/dist/{channelsMode-RUNPEHKD.js → channelsMode-LDIT556C.js} +1 -1
- package/dist/{chunk-7F6RSJRL.js → chunk-MZAMI4UR.js} +8 -13
- package/dist/hostedCheckout-3Y24DB65.js +35 -0
- package/dist/index.cjs +29 -20
- package/dist/index.d.cts +96 -8
- package/dist/index.d.ts +96 -8
- package/dist/index.js +28 -19
- package/dist/manager.cjs +190 -119
- package/dist/manager.d.cts +2 -2
- package/dist/manager.d.ts +2 -2
- package/dist/manager.js +124 -48
- package/package.json +2 -2
- package/dist/hostedCheckout-3NTOVIZG.js +0 -35
package/README.md
CHANGED
|
@@ -64,6 +64,13 @@ presence, exact configured booked value, booking velocity, and a clearly explain
|
|
|
64
64
|
Block mode exposes explicit multi-select category state and a searchable,
|
|
65
65
|
section-filtered blocked-inventory list, so an organizer can put specific seats
|
|
66
66
|
back on sale without resetting the entire event.
|
|
67
|
+
Select mode supports host-owned custom operations with initial/programmatic
|
|
68
|
+
selection, availability policy, maximum and exact-count rules, and validity
|
|
69
|
+
callbacks. Capability-gated Categories and Tables modes update the event
|
|
70
|
+
snapshot without editing the reusable chart; table identity changes are refused
|
|
71
|
+
while affected inventory is held, booked, or blocked.
|
|
72
|
+
Filter Sections groups duplicate public labels, frames their combined inventory,
|
|
73
|
+
and reports the matched sections to host-owned back-office views.
|
|
67
74
|
|
|
68
75
|
```js
|
|
69
76
|
import { SeatManager } from '@seatlayer/js/manager';
|
|
@@ -216,11 +223,18 @@ designer.mount();
|
|
|
216
223
|
## API
|
|
217
224
|
|
|
218
225
|
`new SeatingChart(options)` — options: `container` (selector or element, required),
|
|
219
|
-
`event` (key, required), `apiBase?`, `maxSelection?` (default 10),
|
|
220
|
-
`
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
226
|
+
`event` (key, required), `apiBase?`, `maxSelection?` (default 10),
|
|
227
|
+
`selectedObjects?`, `selectableObjects?`, `numberOfPlacesToSelect?`,
|
|
228
|
+
`onSelectionChange?`, `onSelectionValidityChange?`, `onHold?`,
|
|
229
|
+
`onHoldRestored?`, `onError?`.
|
|
230
|
+
|
|
231
|
+
Selection methods: `getSelection()`, `selectObjects()`, `deselectObjects()`,
|
|
232
|
+
`clearSelection()`, `selectCategories()`, `deselectCategories()`,
|
|
233
|
+
`setSelectableObjects()`, `setMaxSelection()`, `getSelectionValidity()`.
|
|
234
|
+
|
|
235
|
+
Lifecycle/hold methods: `render()`, `hold()`, `bestAvailable(qty, categoryKey?)`,
|
|
236
|
+
`resumeHold(holdId)`, `getCurrentHold()`, `releaseLabels(labels)`, `release()`,
|
|
237
|
+
`destroy()`.
|
|
224
238
|
|
|
225
239
|
The full `SeatPicker` automatically restores an active hold after same-tab
|
|
226
240
|
checkout navigation and lets the buyer remove individual held tickets. Set
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartDoc, AvailabilityRule,
|
|
1
|
+
import { ChartDoc, AvailabilityRule, ExpandedSeat, ChartTheme } from '@seatlayer/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Sales-channel planning — the pure, DOM-free half of Channels mode.
|
|
@@ -608,6 +608,21 @@ interface LogPage {
|
|
|
608
608
|
entries: LogEntry[];
|
|
609
609
|
nextBefore: number | null;
|
|
610
610
|
}
|
|
611
|
+
interface EventCategoryAssignmentResult {
|
|
612
|
+
ok: true;
|
|
613
|
+
changed: boolean;
|
|
614
|
+
labels: string[];
|
|
615
|
+
categoryKey: string;
|
|
616
|
+
revision: number;
|
|
617
|
+
}
|
|
618
|
+
type EventTableBookingMode = 'individual' | 'whole' | 'variable';
|
|
619
|
+
interface EventTableBookingResult {
|
|
620
|
+
ok: true;
|
|
621
|
+
changed: boolean;
|
|
622
|
+
tableIds: string[];
|
|
623
|
+
mode: EventTableBookingMode;
|
|
624
|
+
revision: number;
|
|
625
|
+
}
|
|
611
626
|
/** Platform/SDK inventory history — deliberately unrelated to commerce Orders. */
|
|
612
627
|
type InventoryBookingState = 'booked' | 'partially_cancelled' | 'cancelled';
|
|
613
628
|
interface InventoryBookingObject {
|
|
@@ -775,6 +790,7 @@ interface PubChartResult {
|
|
|
775
790
|
startsAt?: number | null;
|
|
776
791
|
currency?: string;
|
|
777
792
|
mode?: string;
|
|
793
|
+
inventoryModelVersion?: 1 | 2;
|
|
778
794
|
};
|
|
779
795
|
doc: ChartDoc;
|
|
780
796
|
}
|
|
@@ -852,6 +868,16 @@ declare class ManageApi {
|
|
|
852
868
|
ok: true;
|
|
853
869
|
holdTtlMs: number | null;
|
|
854
870
|
}>;
|
|
871
|
+
/** Assign an event-only category to inventory labels. Existing transaction
|
|
872
|
+
* snapshots retain their original configured value; future selection uses
|
|
873
|
+
* the new category. Requires `event:categories:manage`. */
|
|
874
|
+
setCategory(key: string, labels: string[], categoryKey: string): Promise<EventCategoryAssignmentResult>;
|
|
875
|
+
/** Change event-only table booking identity. The server refuses tables with
|
|
876
|
+
* held/booked/blocked inventory or channel assignments that would be lost. */
|
|
877
|
+
setTableBooking(key: string, tableIds: string[], mode: EventTableBookingMode, bounds?: {
|
|
878
|
+
minOccupancy?: number;
|
|
879
|
+
maxOccupancy?: number;
|
|
880
|
+
}): Promise<EventTableBookingResult>;
|
|
855
881
|
/** Inventory lifecycle by stable integrator bookingRef. Absent on Managed. */
|
|
856
882
|
bookings(key: string, query?: InventoryBookingsQuery): Promise<InventoryBookingsPage>;
|
|
857
883
|
/** Exact configured-value snapshot plus book/replay/cancellation audit. */
|
|
@@ -1054,7 +1080,7 @@ declare class ManageApi {
|
|
|
1054
1080
|
* nothing here emits a byte of runtime JavaScript.
|
|
1055
1081
|
*/
|
|
1056
1082
|
|
|
1057
|
-
type SeatManagerMode = 'view' | 'inspect' | 'block' | 'sections' | 'channels';
|
|
1083
|
+
type SeatManagerMode = 'view' | 'inspect' | 'select' | 'filterSections' | 'block' | 'sections' | 'categories' | 'tables' | 'channels';
|
|
1058
1084
|
/** Short-lived, event-scoped browser credential minted by a trusted backend. */
|
|
1059
1085
|
type EventScopedManageToken = `mse_${string}`;
|
|
1060
1086
|
/**
|
|
@@ -1063,7 +1089,7 @@ type EventScopedManageToken = `mse_${string}`;
|
|
|
1063
1089
|
* view without `event:channels:manage` ⇒ read-only inspection with every
|
|
1064
1090
|
* mutation control absent, not merely disabled.
|
|
1065
1091
|
*/
|
|
1066
|
-
type SeatManagerCapability = 'event:view' | 'event:block' | 'event:cancel' | 'event:reports' | 'event:channels:view' | 'event:channels:manage';
|
|
1092
|
+
type SeatManagerCapability = 'event:view' | 'event:block' | 'event:categories:manage' | 'event:tables:manage' | 'event:cancel' | 'event:reports' | 'event:channels:view' | 'event:channels:manage';
|
|
1067
1093
|
/** DO seat status — 'blocked' has no engine analogue (→ 'not_for_sale'). */
|
|
1068
1094
|
type DoStatus = 'free' | 'held' | 'booked' | 'blocked';
|
|
1069
1095
|
/** Live KPI snapshot pushed to `onTallies` on every state change. */
|
|
@@ -1106,10 +1132,25 @@ interface SeatManagerActivity {
|
|
|
1106
1132
|
}
|
|
1107
1133
|
/** Fired after a successful organizer action, for host toasts/telemetry. */
|
|
1108
1134
|
interface SeatManagerActionResult {
|
|
1109
|
-
action: 'block' | 'unblock' | 'unblockAll' | 'cancelBooking' | 'setHoldTtl';
|
|
1135
|
+
action: 'block' | 'unblock' | 'unblockAll' | 'cancelBooking' | 'setHoldTtl' | 'setCategory' | 'setTableBooking';
|
|
1110
1136
|
labels: string[];
|
|
1111
1137
|
count: number;
|
|
1112
1138
|
}
|
|
1139
|
+
/** Exact-count state for the read-only custom Select tool. */
|
|
1140
|
+
interface SeatManagerSelectionValidity {
|
|
1141
|
+
isValid: boolean;
|
|
1142
|
+
count: number;
|
|
1143
|
+
required: number;
|
|
1144
|
+
remaining: number;
|
|
1145
|
+
objects: ExpandedSeat[];
|
|
1146
|
+
}
|
|
1147
|
+
/** One section matched by the read-only Filter Sections tool. */
|
|
1148
|
+
interface SeatManagerFilteredSection {
|
|
1149
|
+
id: string;
|
|
1150
|
+
label: string;
|
|
1151
|
+
seatCount: number;
|
|
1152
|
+
zone?: string;
|
|
1153
|
+
}
|
|
1113
1154
|
interface SeatManagerOptions {
|
|
1114
1155
|
/** CSS selector or element to mount into. */
|
|
1115
1156
|
container: string | HTMLElement;
|
|
@@ -1126,6 +1167,21 @@ interface SeatManagerOptions {
|
|
|
1126
1167
|
tokenExpiresAt?: number;
|
|
1127
1168
|
/** Initial mode. Default 'view'. */
|
|
1128
1169
|
mode?: SeatManagerMode;
|
|
1170
|
+
/** Public labels to preselect after live inventory has loaded in Select mode. */
|
|
1171
|
+
selectedObjects?: string[];
|
|
1172
|
+
/**
|
|
1173
|
+
* Labels that remain selectable even when `unavailableObjectsSelectable` is
|
|
1174
|
+
* false. This is an exception list, matching Event Manager Select semantics.
|
|
1175
|
+
*/
|
|
1176
|
+
selectableObjects?: string[];
|
|
1177
|
+
/** Allow held, booked, and blocked objects in Select mode. Default true. */
|
|
1178
|
+
unavailableObjectsSelectable?: boolean;
|
|
1179
|
+
/** Maximum objects selectable in the custom Select tool. */
|
|
1180
|
+
maxSelectedObjects?: number;
|
|
1181
|
+
/** Require exactly this many objects and cap selection at that count. */
|
|
1182
|
+
numberOfPlacesToSelect?: number;
|
|
1183
|
+
/** Final per-object Select-mode policy; overrides the default decision. */
|
|
1184
|
+
isObjectSelectable?: (object: ExpandedSeat, defaultValue: boolean) => boolean;
|
|
1129
1185
|
/**
|
|
1130
1186
|
* The capability set this token was minted with. Supply it whenever you mint
|
|
1131
1187
|
* an `mse_…` grant — it is the only way the widget can know a delegated token
|
|
@@ -1167,6 +1223,20 @@ interface SeatManagerOptions {
|
|
|
1167
1223
|
onFollowLiveChange?: (enabled: boolean) => void;
|
|
1168
1224
|
/** Block-mode selection changed (marquee / ⌘A / category / section / tap). */
|
|
1169
1225
|
onSelectionChange?: (seats: ExpandedSeat[]) => void;
|
|
1226
|
+
/** One object entered the custom Select-mode selection. */
|
|
1227
|
+
onObjectSelected?: (object: ExpandedSeat) => void;
|
|
1228
|
+
/** One object left the custom Select-mode selection. */
|
|
1229
|
+
onObjectDeselected?: (object: ExpandedSeat) => void;
|
|
1230
|
+
/** Exact-count Select-mode state after every selection change. */
|
|
1231
|
+
onSelectionValidityChange?: (state: SeatManagerSelectionValidity) => void;
|
|
1232
|
+
/** Exact-count Select-mode state transitioned to valid. */
|
|
1233
|
+
onSelectionValid?: (state: SeatManagerSelectionValidity) => void;
|
|
1234
|
+
/** Exact-count Select-mode state transitioned to invalid. */
|
|
1235
|
+
onSelectionInvalid?: (state: SeatManagerSelectionValidity) => void;
|
|
1236
|
+
/** A Select-mode attempt reached the active exact/max cap. */
|
|
1237
|
+
onSelectionLimit?: (max: number) => void;
|
|
1238
|
+
/** Filter Sections changed by map interaction or an imperative method. */
|
|
1239
|
+
onFilteredSectionChange?: (sections: SeatManagerFilteredSection[]) => void;
|
|
1170
1240
|
/** A block/unblock/cancel action completed successfully. */
|
|
1171
1241
|
onActionComplete?: (result: SeatManagerActionResult) => void;
|
|
1172
1242
|
/**
|
|
@@ -1230,6 +1300,11 @@ declare class SeatManager {
|
|
|
1230
1300
|
private renderer;
|
|
1231
1301
|
private doc;
|
|
1232
1302
|
private mode;
|
|
1303
|
+
private inventoryModelVersion;
|
|
1304
|
+
private selectableObjectLabels;
|
|
1305
|
+
private lastSelectionLabels;
|
|
1306
|
+
private selectionWasValid;
|
|
1307
|
+
private initialSelectionApplied;
|
|
1233
1308
|
private labelToId;
|
|
1234
1309
|
private labelToSeat;
|
|
1235
1310
|
private allIds;
|
|
@@ -1300,6 +1375,7 @@ declare class SeatManager {
|
|
|
1300
1375
|
private sectionByObject;
|
|
1301
1376
|
private sectionLabelById;
|
|
1302
1377
|
private sectionsBase;
|
|
1378
|
+
private filteredSectionLabel;
|
|
1303
1379
|
private availabilityRules;
|
|
1304
1380
|
private effectiveHidden;
|
|
1305
1381
|
private effectiveClosed;
|
|
@@ -1326,6 +1402,9 @@ declare class SeatManager {
|
|
|
1326
1402
|
*/
|
|
1327
1403
|
private channels;
|
|
1328
1404
|
private channelCaps;
|
|
1405
|
+
private categoryCanManage;
|
|
1406
|
+
private tableCanManage;
|
|
1407
|
+
private tableBookingSaving;
|
|
1329
1408
|
/** Supersedes an async capability probe after token/capability rotation. */
|
|
1330
1409
|
private channelCapabilityResolution;
|
|
1331
1410
|
/** In-flight `import('./channelsMode')`, so concurrent entries load once. */
|
|
@@ -1334,6 +1413,7 @@ declare class SeatManager {
|
|
|
1334
1413
|
private readonly onKeyDown;
|
|
1335
1414
|
private readonly onRailClick;
|
|
1336
1415
|
constructor(options: SeatManagerOptions);
|
|
1416
|
+
private assertSelectionOptions;
|
|
1337
1417
|
/** Build the DOM, load the chart, subscribe to realtime, mount the board. */
|
|
1338
1418
|
render(): Promise<this>;
|
|
1339
1419
|
setMode(mode: SeatManagerMode): void;
|
|
@@ -1407,9 +1487,43 @@ declare class SeatManager {
|
|
|
1407
1487
|
unblockAll(): Promise<void>;
|
|
1408
1488
|
/** Cancel bookings (BOOKED → free), guarded by the original booking ref. */
|
|
1409
1489
|
cancelBooking(labels: string[], bookingRef: string): Promise<void>;
|
|
1490
|
+
/** Assign an event-only category to labels or the current manager selection. */
|
|
1491
|
+
setCategory(categoryKey: string, labels?: string[]): Promise<void>;
|
|
1492
|
+
/** Change event-only table booking identity, then reload authoritative
|
|
1493
|
+
* geometry/inventory because individual chairs and grouped tables use
|
|
1494
|
+
* different labels. */
|
|
1495
|
+
setTableBooking(tableIds: string[], mode: EventTableBookingMode, bounds?: {
|
|
1496
|
+
minOccupancy?: number;
|
|
1497
|
+
maxOccupancy?: number;
|
|
1498
|
+
}): Promise<void>;
|
|
1499
|
+
private reloadEventChart;
|
|
1410
1500
|
selectAll(): ExpandedSeat[];
|
|
1411
1501
|
selectSection(sectionId: string): ExpandedSeat[];
|
|
1502
|
+
/** Filter every section whose public label matches, then frame their union. */
|
|
1503
|
+
setFilteredSection(label: string): SeatManagerFilteredSection[];
|
|
1504
|
+
/** Clear section filtering and restore the full event frame. */
|
|
1505
|
+
clearFilteredSection(): void;
|
|
1506
|
+
getFilteredSections(): SeatManagerFilteredSection[];
|
|
1412
1507
|
selectByLabels(labels: string[]): ExpandedSeat[];
|
|
1508
|
+
/** Select custom-operation objects by public inventory label. */
|
|
1509
|
+
selectObjects(labels: string[]): ExpandedSeat[];
|
|
1510
|
+
/** Deselect custom-operation objects by public inventory label. */
|
|
1511
|
+
deselectObjects(labels: string[]): ExpandedSeat[];
|
|
1512
|
+
/** Select every eligible object in the named chart categories. */
|
|
1513
|
+
selectCategories(keys: string[]): ExpandedSeat[];
|
|
1514
|
+
/** Deselect every selected object in the named chart categories. */
|
|
1515
|
+
deselectCategories(keys: string[]): ExpandedSeat[];
|
|
1516
|
+
/** Replace the unavailable-object exception list without remounting. */
|
|
1517
|
+
setSelectableObjects(labels: string[]): void;
|
|
1518
|
+
/** Change whether unavailable inventory participates in custom selection. */
|
|
1519
|
+
setUnavailableObjectsSelectable(enabled: boolean): void;
|
|
1520
|
+
/** Replace the final per-object selection predicate. */
|
|
1521
|
+
setObjectSelectable(predicate: SeatManagerOptions['isObjectSelectable']): void;
|
|
1522
|
+
/** Change the custom Select-mode cap without remounting. */
|
|
1523
|
+
setMaxSelectedObjects(max: number | undefined): void;
|
|
1524
|
+
/** Change or clear the exact custom-selection requirement. */
|
|
1525
|
+
setNumberOfPlacesToSelect(required: number | undefined): void;
|
|
1526
|
+
getSelectionValidity(): SeatManagerSelectionValidity | null;
|
|
1413
1527
|
clearSelection(): void;
|
|
1414
1528
|
getSelection(): ExpandedSeat[];
|
|
1415
1529
|
getReport(): Promise<ReportResult>;
|
|
@@ -1553,11 +1667,18 @@ declare class SeatManager {
|
|
|
1553
1667
|
private pushActivity;
|
|
1554
1668
|
private seedFeed;
|
|
1555
1669
|
private startFeedClock;
|
|
1670
|
+
private selectionCap;
|
|
1671
|
+
private canSelectObject;
|
|
1672
|
+
private applyInitialSelection;
|
|
1673
|
+
private trimSelectionToCap;
|
|
1674
|
+
private reconcileSelectPolicy;
|
|
1556
1675
|
private selectionLabels;
|
|
1557
1676
|
private syncSelection;
|
|
1558
1677
|
private buildChrome;
|
|
1559
1678
|
private updateContainerLayout;
|
|
1560
1679
|
private sectionOptions;
|
|
1680
|
+
private filterableSections;
|
|
1681
|
+
private applyFilteredSectionCanvas;
|
|
1561
1682
|
private buildSectionOptions;
|
|
1562
1683
|
private paintModeTabs;
|
|
1563
1684
|
private paintFollowLiveButton;
|
|
@@ -1576,6 +1697,12 @@ declare class SeatManager {
|
|
|
1576
1697
|
private presenceCounts;
|
|
1577
1698
|
private paintMonitorInsights;
|
|
1578
1699
|
private applyHeatOverlay;
|
|
1700
|
+
private renderSelectRail;
|
|
1701
|
+
private paintSelectSelection;
|
|
1702
|
+
private renderFilterSectionsRail;
|
|
1703
|
+
private renderCategoriesRail;
|
|
1704
|
+
private paintCategorySelection;
|
|
1705
|
+
private renderTablesRail;
|
|
1579
1706
|
private renderInspectRail;
|
|
1580
1707
|
/** Pull the organizer's availability rules (event:view). Called on load and on
|
|
1581
1708
|
* every WS (re)connect, mirroring how the other panels re-hydrate. `closed` is
|
|
@@ -2238,4 +2365,4 @@ declare class ChannelsMode {
|
|
|
2238
2365
|
handleBack(): boolean;
|
|
2239
2366
|
}
|
|
2240
2367
|
|
|
2241
|
-
export { type
|
|
2368
|
+
export { type ReportByStatus as $, type AccessIntentForbidsDetails as A, type BucketRow as B, type ChannelAccessIntent as C, type ChannelsClient as D, ChannelsMode as E, type ChannelsModeHost as F, type ChannelsRowView as G, type ChannelsSeatView as H, type ControlRoomActivityEntry as I, type ControlRoomSectionMetric as J, type ControlRoomSnapshot as K, type EventCategoryAssignmentResult as L, type EventScopedManageToken as M, type EventTableBookingMode as N, type EventTableBookingResult as O, type IntentSwitchBlockedDetails as P, type InventoryBooking as Q, type InventoryBookingActivity as R, type InventoryBookingDetail as S, type InventoryBookingObject as T, type InventoryBookingState as U, type InventoryBookingsPage as V, type InventoryBookingsQuery as W, type LogEntry as X, type LogPage as Y, ManageApi as Z, ManageApiError as _, type AccessLinkRecord as a, type ReportCategoryMeta as a0, type ReportCategoryRow as a1, type ReportResult as a2, SeatManager as a3, type SeatManagerActionResult as a4, type SeatManagerActivity as a5, type SeatManagerCapability as a6, type SeatManagerConnection as a7, type SeatManagerFilteredSection as a8, type SeatManagerMode as a9, stateBadge as aA, suggestMarker as aB, type SeatManagerOptions as aa, type SeatManagerSelectionValidity as ab, type SeatManagerTallies as ac, type SelectionSourceRow as ad, ACCESS_LINK_DEFAULTS as ae, PUBLIC_CHANNEL_ID as af, PUBLIC_CHANNEL_NAME as ag, accessIntentDescription as ah, accessIntentLabel as ai, accessLine as aj, accessLinkBadge as ak, accessLinkErrorCopy as al, accessLinkIsLive as am, accessLinkPolicyLines as an, bucketRows as ao, dropReviewRows as ap, intentForbidsCopy as aq, intentSwitchBlockedCopy as ar, isPublicChannelId as as, markerLetter as at, markerOf as au, mutationCount as av, needsMoveConfirmation as aw, planAssignment as ax, retryAfterCopy as ay, selectionSources as az, type AccessLinkReveal as b, type AccessLinkState as c, type AccessLinkStatus as d, type AccessLinkStatusRecord as e, type ArchiveBlockedDetails as f, type AssignmentBuckets as g, type AssignmentDropDetails as h, type AssignmentResult as i, type ChannelAccessSummary as j, type ChannelAllocationPage as k, type ChannelAttribution as l, type ChannelAuditEntry as m, type ChannelAuditPage as n, type ChannelCounts as o, type ChannelListResult as p, type ChannelPreviewProjection as q, type ChannelRecord as r, type ChannelReport as s, type ChannelReportLinkRecord as t, type ChannelReportLinkReveal as u, type ChannelReportResult as v, type ChannelReportRow as w, type ChannelSeatStatus as x, type ChannelState as y, type ChannelsCapabilities as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ChartDoc, AvailabilityRule,
|
|
1
|
+
import { ChartDoc, AvailabilityRule, ExpandedSeat, ChartTheme } from '@seatlayer/core';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Sales-channel planning — the pure, DOM-free half of Channels mode.
|
|
@@ -608,6 +608,21 @@ interface LogPage {
|
|
|
608
608
|
entries: LogEntry[];
|
|
609
609
|
nextBefore: number | null;
|
|
610
610
|
}
|
|
611
|
+
interface EventCategoryAssignmentResult {
|
|
612
|
+
ok: true;
|
|
613
|
+
changed: boolean;
|
|
614
|
+
labels: string[];
|
|
615
|
+
categoryKey: string;
|
|
616
|
+
revision: number;
|
|
617
|
+
}
|
|
618
|
+
type EventTableBookingMode = 'individual' | 'whole' | 'variable';
|
|
619
|
+
interface EventTableBookingResult {
|
|
620
|
+
ok: true;
|
|
621
|
+
changed: boolean;
|
|
622
|
+
tableIds: string[];
|
|
623
|
+
mode: EventTableBookingMode;
|
|
624
|
+
revision: number;
|
|
625
|
+
}
|
|
611
626
|
/** Platform/SDK inventory history — deliberately unrelated to commerce Orders. */
|
|
612
627
|
type InventoryBookingState = 'booked' | 'partially_cancelled' | 'cancelled';
|
|
613
628
|
interface InventoryBookingObject {
|
|
@@ -775,6 +790,7 @@ interface PubChartResult {
|
|
|
775
790
|
startsAt?: number | null;
|
|
776
791
|
currency?: string;
|
|
777
792
|
mode?: string;
|
|
793
|
+
inventoryModelVersion?: 1 | 2;
|
|
778
794
|
};
|
|
779
795
|
doc: ChartDoc;
|
|
780
796
|
}
|
|
@@ -852,6 +868,16 @@ declare class ManageApi {
|
|
|
852
868
|
ok: true;
|
|
853
869
|
holdTtlMs: number | null;
|
|
854
870
|
}>;
|
|
871
|
+
/** Assign an event-only category to inventory labels. Existing transaction
|
|
872
|
+
* snapshots retain their original configured value; future selection uses
|
|
873
|
+
* the new category. Requires `event:categories:manage`. */
|
|
874
|
+
setCategory(key: string, labels: string[], categoryKey: string): Promise<EventCategoryAssignmentResult>;
|
|
875
|
+
/** Change event-only table booking identity. The server refuses tables with
|
|
876
|
+
* held/booked/blocked inventory or channel assignments that would be lost. */
|
|
877
|
+
setTableBooking(key: string, tableIds: string[], mode: EventTableBookingMode, bounds?: {
|
|
878
|
+
minOccupancy?: number;
|
|
879
|
+
maxOccupancy?: number;
|
|
880
|
+
}): Promise<EventTableBookingResult>;
|
|
855
881
|
/** Inventory lifecycle by stable integrator bookingRef. Absent on Managed. */
|
|
856
882
|
bookings(key: string, query?: InventoryBookingsQuery): Promise<InventoryBookingsPage>;
|
|
857
883
|
/** Exact configured-value snapshot plus book/replay/cancellation audit. */
|
|
@@ -1054,7 +1080,7 @@ declare class ManageApi {
|
|
|
1054
1080
|
* nothing here emits a byte of runtime JavaScript.
|
|
1055
1081
|
*/
|
|
1056
1082
|
|
|
1057
|
-
type SeatManagerMode = 'view' | 'inspect' | 'block' | 'sections' | 'channels';
|
|
1083
|
+
type SeatManagerMode = 'view' | 'inspect' | 'select' | 'filterSections' | 'block' | 'sections' | 'categories' | 'tables' | 'channels';
|
|
1058
1084
|
/** Short-lived, event-scoped browser credential minted by a trusted backend. */
|
|
1059
1085
|
type EventScopedManageToken = `mse_${string}`;
|
|
1060
1086
|
/**
|
|
@@ -1063,7 +1089,7 @@ type EventScopedManageToken = `mse_${string}`;
|
|
|
1063
1089
|
* view without `event:channels:manage` ⇒ read-only inspection with every
|
|
1064
1090
|
* mutation control absent, not merely disabled.
|
|
1065
1091
|
*/
|
|
1066
|
-
type SeatManagerCapability = 'event:view' | 'event:block' | 'event:cancel' | 'event:reports' | 'event:channels:view' | 'event:channels:manage';
|
|
1092
|
+
type SeatManagerCapability = 'event:view' | 'event:block' | 'event:categories:manage' | 'event:tables:manage' | 'event:cancel' | 'event:reports' | 'event:channels:view' | 'event:channels:manage';
|
|
1067
1093
|
/** DO seat status — 'blocked' has no engine analogue (→ 'not_for_sale'). */
|
|
1068
1094
|
type DoStatus = 'free' | 'held' | 'booked' | 'blocked';
|
|
1069
1095
|
/** Live KPI snapshot pushed to `onTallies` on every state change. */
|
|
@@ -1106,10 +1132,25 @@ interface SeatManagerActivity {
|
|
|
1106
1132
|
}
|
|
1107
1133
|
/** Fired after a successful organizer action, for host toasts/telemetry. */
|
|
1108
1134
|
interface SeatManagerActionResult {
|
|
1109
|
-
action: 'block' | 'unblock' | 'unblockAll' | 'cancelBooking' | 'setHoldTtl';
|
|
1135
|
+
action: 'block' | 'unblock' | 'unblockAll' | 'cancelBooking' | 'setHoldTtl' | 'setCategory' | 'setTableBooking';
|
|
1110
1136
|
labels: string[];
|
|
1111
1137
|
count: number;
|
|
1112
1138
|
}
|
|
1139
|
+
/** Exact-count state for the read-only custom Select tool. */
|
|
1140
|
+
interface SeatManagerSelectionValidity {
|
|
1141
|
+
isValid: boolean;
|
|
1142
|
+
count: number;
|
|
1143
|
+
required: number;
|
|
1144
|
+
remaining: number;
|
|
1145
|
+
objects: ExpandedSeat[];
|
|
1146
|
+
}
|
|
1147
|
+
/** One section matched by the read-only Filter Sections tool. */
|
|
1148
|
+
interface SeatManagerFilteredSection {
|
|
1149
|
+
id: string;
|
|
1150
|
+
label: string;
|
|
1151
|
+
seatCount: number;
|
|
1152
|
+
zone?: string;
|
|
1153
|
+
}
|
|
1113
1154
|
interface SeatManagerOptions {
|
|
1114
1155
|
/** CSS selector or element to mount into. */
|
|
1115
1156
|
container: string | HTMLElement;
|
|
@@ -1126,6 +1167,21 @@ interface SeatManagerOptions {
|
|
|
1126
1167
|
tokenExpiresAt?: number;
|
|
1127
1168
|
/** Initial mode. Default 'view'. */
|
|
1128
1169
|
mode?: SeatManagerMode;
|
|
1170
|
+
/** Public labels to preselect after live inventory has loaded in Select mode. */
|
|
1171
|
+
selectedObjects?: string[];
|
|
1172
|
+
/**
|
|
1173
|
+
* Labels that remain selectable even when `unavailableObjectsSelectable` is
|
|
1174
|
+
* false. This is an exception list, matching Event Manager Select semantics.
|
|
1175
|
+
*/
|
|
1176
|
+
selectableObjects?: string[];
|
|
1177
|
+
/** Allow held, booked, and blocked objects in Select mode. Default true. */
|
|
1178
|
+
unavailableObjectsSelectable?: boolean;
|
|
1179
|
+
/** Maximum objects selectable in the custom Select tool. */
|
|
1180
|
+
maxSelectedObjects?: number;
|
|
1181
|
+
/** Require exactly this many objects and cap selection at that count. */
|
|
1182
|
+
numberOfPlacesToSelect?: number;
|
|
1183
|
+
/** Final per-object Select-mode policy; overrides the default decision. */
|
|
1184
|
+
isObjectSelectable?: (object: ExpandedSeat, defaultValue: boolean) => boolean;
|
|
1129
1185
|
/**
|
|
1130
1186
|
* The capability set this token was minted with. Supply it whenever you mint
|
|
1131
1187
|
* an `mse_…` grant — it is the only way the widget can know a delegated token
|
|
@@ -1167,6 +1223,20 @@ interface SeatManagerOptions {
|
|
|
1167
1223
|
onFollowLiveChange?: (enabled: boolean) => void;
|
|
1168
1224
|
/** Block-mode selection changed (marquee / ⌘A / category / section / tap). */
|
|
1169
1225
|
onSelectionChange?: (seats: ExpandedSeat[]) => void;
|
|
1226
|
+
/** One object entered the custom Select-mode selection. */
|
|
1227
|
+
onObjectSelected?: (object: ExpandedSeat) => void;
|
|
1228
|
+
/** One object left the custom Select-mode selection. */
|
|
1229
|
+
onObjectDeselected?: (object: ExpandedSeat) => void;
|
|
1230
|
+
/** Exact-count Select-mode state after every selection change. */
|
|
1231
|
+
onSelectionValidityChange?: (state: SeatManagerSelectionValidity) => void;
|
|
1232
|
+
/** Exact-count Select-mode state transitioned to valid. */
|
|
1233
|
+
onSelectionValid?: (state: SeatManagerSelectionValidity) => void;
|
|
1234
|
+
/** Exact-count Select-mode state transitioned to invalid. */
|
|
1235
|
+
onSelectionInvalid?: (state: SeatManagerSelectionValidity) => void;
|
|
1236
|
+
/** A Select-mode attempt reached the active exact/max cap. */
|
|
1237
|
+
onSelectionLimit?: (max: number) => void;
|
|
1238
|
+
/** Filter Sections changed by map interaction or an imperative method. */
|
|
1239
|
+
onFilteredSectionChange?: (sections: SeatManagerFilteredSection[]) => void;
|
|
1170
1240
|
/** A block/unblock/cancel action completed successfully. */
|
|
1171
1241
|
onActionComplete?: (result: SeatManagerActionResult) => void;
|
|
1172
1242
|
/**
|
|
@@ -1230,6 +1300,11 @@ declare class SeatManager {
|
|
|
1230
1300
|
private renderer;
|
|
1231
1301
|
private doc;
|
|
1232
1302
|
private mode;
|
|
1303
|
+
private inventoryModelVersion;
|
|
1304
|
+
private selectableObjectLabels;
|
|
1305
|
+
private lastSelectionLabels;
|
|
1306
|
+
private selectionWasValid;
|
|
1307
|
+
private initialSelectionApplied;
|
|
1233
1308
|
private labelToId;
|
|
1234
1309
|
private labelToSeat;
|
|
1235
1310
|
private allIds;
|
|
@@ -1300,6 +1375,7 @@ declare class SeatManager {
|
|
|
1300
1375
|
private sectionByObject;
|
|
1301
1376
|
private sectionLabelById;
|
|
1302
1377
|
private sectionsBase;
|
|
1378
|
+
private filteredSectionLabel;
|
|
1303
1379
|
private availabilityRules;
|
|
1304
1380
|
private effectiveHidden;
|
|
1305
1381
|
private effectiveClosed;
|
|
@@ -1326,6 +1402,9 @@ declare class SeatManager {
|
|
|
1326
1402
|
*/
|
|
1327
1403
|
private channels;
|
|
1328
1404
|
private channelCaps;
|
|
1405
|
+
private categoryCanManage;
|
|
1406
|
+
private tableCanManage;
|
|
1407
|
+
private tableBookingSaving;
|
|
1329
1408
|
/** Supersedes an async capability probe after token/capability rotation. */
|
|
1330
1409
|
private channelCapabilityResolution;
|
|
1331
1410
|
/** In-flight `import('./channelsMode')`, so concurrent entries load once. */
|
|
@@ -1334,6 +1413,7 @@ declare class SeatManager {
|
|
|
1334
1413
|
private readonly onKeyDown;
|
|
1335
1414
|
private readonly onRailClick;
|
|
1336
1415
|
constructor(options: SeatManagerOptions);
|
|
1416
|
+
private assertSelectionOptions;
|
|
1337
1417
|
/** Build the DOM, load the chart, subscribe to realtime, mount the board. */
|
|
1338
1418
|
render(): Promise<this>;
|
|
1339
1419
|
setMode(mode: SeatManagerMode): void;
|
|
@@ -1407,9 +1487,43 @@ declare class SeatManager {
|
|
|
1407
1487
|
unblockAll(): Promise<void>;
|
|
1408
1488
|
/** Cancel bookings (BOOKED → free), guarded by the original booking ref. */
|
|
1409
1489
|
cancelBooking(labels: string[], bookingRef: string): Promise<void>;
|
|
1490
|
+
/** Assign an event-only category to labels or the current manager selection. */
|
|
1491
|
+
setCategory(categoryKey: string, labels?: string[]): Promise<void>;
|
|
1492
|
+
/** Change event-only table booking identity, then reload authoritative
|
|
1493
|
+
* geometry/inventory because individual chairs and grouped tables use
|
|
1494
|
+
* different labels. */
|
|
1495
|
+
setTableBooking(tableIds: string[], mode: EventTableBookingMode, bounds?: {
|
|
1496
|
+
minOccupancy?: number;
|
|
1497
|
+
maxOccupancy?: number;
|
|
1498
|
+
}): Promise<void>;
|
|
1499
|
+
private reloadEventChart;
|
|
1410
1500
|
selectAll(): ExpandedSeat[];
|
|
1411
1501
|
selectSection(sectionId: string): ExpandedSeat[];
|
|
1502
|
+
/** Filter every section whose public label matches, then frame their union. */
|
|
1503
|
+
setFilteredSection(label: string): SeatManagerFilteredSection[];
|
|
1504
|
+
/** Clear section filtering and restore the full event frame. */
|
|
1505
|
+
clearFilteredSection(): void;
|
|
1506
|
+
getFilteredSections(): SeatManagerFilteredSection[];
|
|
1412
1507
|
selectByLabels(labels: string[]): ExpandedSeat[];
|
|
1508
|
+
/** Select custom-operation objects by public inventory label. */
|
|
1509
|
+
selectObjects(labels: string[]): ExpandedSeat[];
|
|
1510
|
+
/** Deselect custom-operation objects by public inventory label. */
|
|
1511
|
+
deselectObjects(labels: string[]): ExpandedSeat[];
|
|
1512
|
+
/** Select every eligible object in the named chart categories. */
|
|
1513
|
+
selectCategories(keys: string[]): ExpandedSeat[];
|
|
1514
|
+
/** Deselect every selected object in the named chart categories. */
|
|
1515
|
+
deselectCategories(keys: string[]): ExpandedSeat[];
|
|
1516
|
+
/** Replace the unavailable-object exception list without remounting. */
|
|
1517
|
+
setSelectableObjects(labels: string[]): void;
|
|
1518
|
+
/** Change whether unavailable inventory participates in custom selection. */
|
|
1519
|
+
setUnavailableObjectsSelectable(enabled: boolean): void;
|
|
1520
|
+
/** Replace the final per-object selection predicate. */
|
|
1521
|
+
setObjectSelectable(predicate: SeatManagerOptions['isObjectSelectable']): void;
|
|
1522
|
+
/** Change the custom Select-mode cap without remounting. */
|
|
1523
|
+
setMaxSelectedObjects(max: number | undefined): void;
|
|
1524
|
+
/** Change or clear the exact custom-selection requirement. */
|
|
1525
|
+
setNumberOfPlacesToSelect(required: number | undefined): void;
|
|
1526
|
+
getSelectionValidity(): SeatManagerSelectionValidity | null;
|
|
1413
1527
|
clearSelection(): void;
|
|
1414
1528
|
getSelection(): ExpandedSeat[];
|
|
1415
1529
|
getReport(): Promise<ReportResult>;
|
|
@@ -1553,11 +1667,18 @@ declare class SeatManager {
|
|
|
1553
1667
|
private pushActivity;
|
|
1554
1668
|
private seedFeed;
|
|
1555
1669
|
private startFeedClock;
|
|
1670
|
+
private selectionCap;
|
|
1671
|
+
private canSelectObject;
|
|
1672
|
+
private applyInitialSelection;
|
|
1673
|
+
private trimSelectionToCap;
|
|
1674
|
+
private reconcileSelectPolicy;
|
|
1556
1675
|
private selectionLabels;
|
|
1557
1676
|
private syncSelection;
|
|
1558
1677
|
private buildChrome;
|
|
1559
1678
|
private updateContainerLayout;
|
|
1560
1679
|
private sectionOptions;
|
|
1680
|
+
private filterableSections;
|
|
1681
|
+
private applyFilteredSectionCanvas;
|
|
1561
1682
|
private buildSectionOptions;
|
|
1562
1683
|
private paintModeTabs;
|
|
1563
1684
|
private paintFollowLiveButton;
|
|
@@ -1576,6 +1697,12 @@ declare class SeatManager {
|
|
|
1576
1697
|
private presenceCounts;
|
|
1577
1698
|
private paintMonitorInsights;
|
|
1578
1699
|
private applyHeatOverlay;
|
|
1700
|
+
private renderSelectRail;
|
|
1701
|
+
private paintSelectSelection;
|
|
1702
|
+
private renderFilterSectionsRail;
|
|
1703
|
+
private renderCategoriesRail;
|
|
1704
|
+
private paintCategorySelection;
|
|
1705
|
+
private renderTablesRail;
|
|
1579
1706
|
private renderInspectRail;
|
|
1580
1707
|
/** Pull the organizer's availability rules (event:view). Called on load and on
|
|
1581
1708
|
* every WS (re)connect, mirroring how the other panels re-hydrate. `closed` is
|
|
@@ -2238,4 +2365,4 @@ declare class ChannelsMode {
|
|
|
2238
2365
|
handleBack(): boolean;
|
|
2239
2366
|
}
|
|
2240
2367
|
|
|
2241
|
-
export { type
|
|
2368
|
+
export { type ReportByStatus as $, type AccessIntentForbidsDetails as A, type BucketRow as B, type ChannelAccessIntent as C, type ChannelsClient as D, ChannelsMode as E, type ChannelsModeHost as F, type ChannelsRowView as G, type ChannelsSeatView as H, type ControlRoomActivityEntry as I, type ControlRoomSectionMetric as J, type ControlRoomSnapshot as K, type EventCategoryAssignmentResult as L, type EventScopedManageToken as M, type EventTableBookingMode as N, type EventTableBookingResult as O, type IntentSwitchBlockedDetails as P, type InventoryBooking as Q, type InventoryBookingActivity as R, type InventoryBookingDetail as S, type InventoryBookingObject as T, type InventoryBookingState as U, type InventoryBookingsPage as V, type InventoryBookingsQuery as W, type LogEntry as X, type LogPage as Y, ManageApi as Z, ManageApiError as _, type AccessLinkRecord as a, type ReportCategoryMeta as a0, type ReportCategoryRow as a1, type ReportResult as a2, SeatManager as a3, type SeatManagerActionResult as a4, type SeatManagerActivity as a5, type SeatManagerCapability as a6, type SeatManagerConnection as a7, type SeatManagerFilteredSection as a8, type SeatManagerMode as a9, stateBadge as aA, suggestMarker as aB, type SeatManagerOptions as aa, type SeatManagerSelectionValidity as ab, type SeatManagerTallies as ac, type SelectionSourceRow as ad, ACCESS_LINK_DEFAULTS as ae, PUBLIC_CHANNEL_ID as af, PUBLIC_CHANNEL_NAME as ag, accessIntentDescription as ah, accessIntentLabel as ai, accessLine as aj, accessLinkBadge as ak, accessLinkErrorCopy as al, accessLinkIsLive as am, accessLinkPolicyLines as an, bucketRows as ao, dropReviewRows as ap, intentForbidsCopy as aq, intentSwitchBlockedCopy as ar, isPublicChannelId as as, markerLetter as at, markerOf as au, mutationCount as av, needsMoveConfirmation as aw, planAssignment as ax, retryAfterCopy as ay, selectionSources as az, type AccessLinkReveal as b, type AccessLinkState as c, type AccessLinkStatus as d, type AccessLinkStatusRecord as e, type ArchiveBlockedDetails as f, type AssignmentBuckets as g, type AssignmentDropDetails as h, type AssignmentResult as i, type ChannelAccessSummary as j, type ChannelAllocationPage as k, type ChannelAttribution as l, type ChannelAuditEntry as m, type ChannelAuditPage as n, type ChannelCounts as o, type ChannelListResult as p, type ChannelPreviewProjection as q, type ChannelRecord as r, type ChannelReport as s, type ChannelReportLinkRecord as t, type ChannelReportLinkReveal as u, type ChannelReportResult as v, type ChannelReportRow as w, type ChannelSeatStatus as x, type ChannelState as y, type ChannelsCapabilities as z };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{A as a,B as b,C as c}from"./chunk-
|
|
1
|
+
import{A as a,B as b,C as c}from"./chunk-MZAMI4UR.js";import"./chunk-OSZ7DOEH.js";export{b as CHANNELS_CSS,c as ChannelsMode,a as bucketRowsHtml};
|