@seatsio/seatsio-react 14.1.0 → 14.3.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.
@@ -0,0 +1,29 @@
1
+ import * as React from 'react';
2
+ import { SeatingChart, Region, CommonConfigOptions, Seatsio, EventManager, ChartDesigner } from '@seatsio/seatsio-types';
3
+
4
+ type EmbeddableProps<T> = {
5
+ onRenderStarted?: (chart: SeatingChart) => void;
6
+ chartJsUrl?: string;
7
+ region: Region;
8
+ } & T;
9
+ declare abstract class Embeddable<T extends CommonConfigOptions> extends React.Component<EmbeddableProps<T>> {
10
+ private container;
11
+ private rendering?;
12
+ private chart;
13
+ static defaultProps: {
14
+ chartJsUrl: string;
15
+ };
16
+ constructor(props: EmbeddableProps<T>);
17
+ abstract createChart(seatsio: Seatsio, config: T): SeatingChart | EventManager | ChartDesigner;
18
+ componentDidMount(): Promise<void>;
19
+ componentDidUpdate(prevProps: EmbeddableProps<T>): Promise<void>;
20
+ createAndRenderChart(): Promise<void>;
21
+ extractConfigFromProps(): any;
22
+ componentWillUnmount(): void;
23
+ destroyChart(): void;
24
+ getSeatsio(): Promise<any>;
25
+ loadSeatsio(): Promise<unknown>;
26
+ render(): React.ReactNode;
27
+ }
28
+
29
+ export { EmbeddableProps, Embeddable as default };
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
- import { ChartDesigner, CommonConfigOptions, EventManager, Region, SeatingChart, Seatsio } from '@seatsio/seatsio-types';
3
- export type EmbeddableProps<T> = {
2
+ import { SeatingChart, Region, CommonConfigOptions, Seatsio, EventManager, ChartDesigner } from '@seatsio/seatsio-types';
3
+
4
+ type EmbeddableProps<T> = {
4
5
  onRenderStarted?: (chart: SeatingChart) => void;
5
6
  chartJsUrl?: string;
6
7
  region: Region;
7
8
  } & T;
8
- export default abstract class Embeddable<T extends CommonConfigOptions> extends React.Component<EmbeddableProps<T>> {
9
+ declare abstract class Embeddable<T extends CommonConfigOptions> extends React.Component<EmbeddableProps<T>> {
9
10
  private container;
10
11
  private rendering?;
11
12
  private chart;
@@ -24,3 +25,5 @@ export default abstract class Embeddable<T extends CommonConfigOptions> extends
24
25
  loadSeatsio(): Promise<unknown>;
25
26
  render(): React.ReactNode;
26
27
  }
28
+
29
+ export { EmbeddableProps, Embeddable as default };
@@ -1,98 +1,124 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
9
10
  };
10
- var __rest = (this && this.__rest) || function (s, e) {
11
- var t = {};
12
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
13
- t[p] = s[p];
14
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
15
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
16
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
17
- t[p[i]] = s[p[i]];
18
- }
19
- return t;
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
20
18
  };
21
- import * as React from 'react';
22
- import { didPropsChange } from './util';
23
- class Embeddable extends React.Component {
24
- constructor(props) {
25
- super(props);
26
- this.container = React.createRef();
27
- }
28
- componentDidMount() {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- if (!this.rendering) {
31
- this.rendering = this.createAndRenderChart();
32
- }
33
- });
34
- }
35
- componentDidUpdate(prevProps) {
36
- return __awaiter(this, void 0, void 0, function* () {
37
- if (didPropsChange(this.props, prevProps) && this.chart) {
38
- this.destroyChart();
39
- this.createAndRenderChart();
40
- }
41
- });
42
- }
43
- createAndRenderChart() {
44
- return __awaiter(this, void 0, void 0, function* () {
45
- const seatsio = yield this.getSeatsio();
46
- const config = this.extractConfigFromProps();
47
- config.container = this.container.current;
48
- this.chart = this.createChart(seatsio, config).render();
49
- if (this.props.onRenderStarted) {
50
- this.props.onRenderStarted(this.chart);
51
- }
52
- });
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/main/Embeddable.tsx
30
+ var Embeddable_exports = {};
31
+ __export(Embeddable_exports, {
32
+ default: () => Embeddable
33
+ });
34
+ module.exports = __toCommonJS(Embeddable_exports);
35
+ var React = __toESM(require("react"));
36
+
37
+ // src/main/util.ts
38
+ var didPropsChange = (prevProps, nextProps) => {
39
+ if (Object.keys(prevProps).length !== Object.keys(nextProps).length) {
40
+ return true;
41
+ }
42
+ return Object.keys(nextProps).some((propName) => {
43
+ let prevValue = prevProps[propName];
44
+ let nextValue = nextProps[propName];
45
+ if (prevValue && nextValue) {
46
+ if (typeof prevValue === "function" && typeof nextValue === "function") {
47
+ return prevValue.toString() !== nextValue.toString();
48
+ }
49
+ if (typeof prevValue === "object" && typeof nextValue === "object") {
50
+ return didPropsChange(prevValue, nextValue);
51
+ }
53
52
  }
54
- extractConfigFromProps() {
55
- // noinspection JSUnusedLocalSymbols
56
- let _a = this.props, { chartJsUrl, divId, onRenderStarted, region } = _a, config = __rest(_a, ["chartJsUrl", "divId", "onRenderStarted", "region"]);
57
- return config;
58
- }
59
- componentWillUnmount() {
60
- this.destroyChart();
53
+ return prevValue !== nextValue;
54
+ });
55
+ };
56
+
57
+ // src/main/Embeddable.tsx
58
+ var Embeddable = class extends React.Component {
59
+ constructor(props) {
60
+ super(props);
61
+ this.container = React.createRef();
62
+ }
63
+ async componentDidMount() {
64
+ if (!this.rendering) {
65
+ this.rendering = this.createAndRenderChart();
61
66
  }
62
- destroyChart() {
63
- if (this.chart && this.chart.state !== 'DESTROYED') {
64
- this.chart.destroy();
65
- }
67
+ }
68
+ async componentDidUpdate(prevProps) {
69
+ if (didPropsChange(this.props, prevProps) && this.chart) {
70
+ this.destroyChart();
71
+ this.createAndRenderChart();
66
72
  }
67
- getSeatsio() {
68
- if (typeof seatsio === 'undefined') {
69
- return this.loadSeatsio();
70
- }
71
- else if (seatsio.region !== this.props.region) {
72
- seatsio = undefined;
73
- return this.loadSeatsio();
74
- }
75
- else {
76
- return Promise.resolve(seatsio);
77
- }
73
+ }
74
+ async createAndRenderChart() {
75
+ const seatsio2 = await this.getSeatsio();
76
+ const config = this.extractConfigFromProps();
77
+ config.container = this.container.current;
78
+ this.chart = this.createChart(seatsio2, config).render();
79
+ if (this.props.onRenderStarted) {
80
+ this.props.onRenderStarted(this.chart);
78
81
  }
79
- loadSeatsio() {
80
- return new Promise((resolve, reject) => {
81
- let script = document.createElement('script');
82
- script.onload = () => {
83
- seatsio.region = this.props.region;
84
- resolve(seatsio);
85
- };
86
- script.onerror = () => reject(`Could not load ${script.src}`);
87
- script.src = this.props.chartJsUrl.replace('{region}', this.props.region);
88
- document.head.appendChild(script);
89
- });
82
+ }
83
+ extractConfigFromProps() {
84
+ let { chartJsUrl, divId, onRenderStarted, region, ...config } = this.props;
85
+ return config;
86
+ }
87
+ componentWillUnmount() {
88
+ this.destroyChart();
89
+ }
90
+ destroyChart() {
91
+ if (this.chart && this.chart.state !== "DESTROYED") {
92
+ this.chart.destroy();
90
93
  }
91
- render() {
92
- return (React.createElement("div", { ref: this.container, style: { 'height': '100%', 'width': '100%' } }));
94
+ }
95
+ getSeatsio() {
96
+ if (typeof seatsio === "undefined") {
97
+ return this.loadSeatsio();
98
+ } else if (seatsio.region !== this.props.region) {
99
+ seatsio = void 0;
100
+ return this.loadSeatsio();
101
+ } else {
102
+ return Promise.resolve(seatsio);
93
103
  }
94
- }
104
+ }
105
+ loadSeatsio() {
106
+ return new Promise((resolve, reject) => {
107
+ let script = document.createElement("script");
108
+ script.onload = () => {
109
+ seatsio.region = this.props.region;
110
+ resolve(seatsio);
111
+ };
112
+ script.onerror = () => reject(`Could not load ${script.src}`);
113
+ script.src = this.props.chartJsUrl.replace("{region}", this.props.region);
114
+ document.head.appendChild(script);
115
+ });
116
+ }
117
+ render() {
118
+ return /* @__PURE__ */ React.createElement("div", { ref: this.container, style: { "height": "100%", "width": "100%" } });
119
+ }
120
+ };
95
121
  Embeddable.defaultProps = {
96
- chartJsUrl: 'https://cdn-{region}.seatsio.net/chart.js'
122
+ chartJsUrl: "https://cdn-{region}.seatsio.net/chart.js"
97
123
  };
98
- export default Embeddable;
124
+ //# sourceMappingURL=Embeddable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/main/Embeddable.tsx","../src/main/util.ts"],"sourcesContent":["import * as React from 'react'\nimport {didPropsChange} from './util'\nimport { ChartDesigner, CommonConfigOptions, EventManager, Region, SeatingChart, Seatsio } from '@seatsio/seatsio-types'\n\nexport type EmbeddableProps<T> = {\n onRenderStarted?: (chart: SeatingChart) => void\n chartJsUrl?: string\n region: Region\n} & T\n\nexport default abstract class Embeddable<T extends CommonConfigOptions> extends React.Component<EmbeddableProps<T>> {\n private container: React.RefObject<HTMLDivElement>\n private rendering?: Promise<void>\n private chart: SeatingChart\n\n static defaultProps = {\n chartJsUrl: 'https://cdn-{region}.seatsio.net/chart.js'\n }\n\n constructor(props: EmbeddableProps<T>) {\n super(props);\n this.container = React.createRef();\n }\n\n abstract createChart (seatsio: Seatsio, config: T): SeatingChart | EventManager | ChartDesigner\n\n async componentDidMount () {\n if(!this.rendering) {\n this.rendering = this.createAndRenderChart()\n }\n }\n\n async componentDidUpdate (prevProps: EmbeddableProps<T>) {\n if (didPropsChange(this.props, prevProps) && this.chart) {\n this.destroyChart()\n this.createAndRenderChart()\n }\n }\n\n async createAndRenderChart () {\n const seatsio = await this.getSeatsio()\n const config = this.extractConfigFromProps()\n config.container = this.container.current\n this.chart = this.createChart(seatsio, config).render()\n if (this.props.onRenderStarted) {\n this.props.onRenderStarted(this.chart)\n }\n }\n\n extractConfigFromProps (): any {\n // noinspection JSUnusedLocalSymbols\n let { chartJsUrl, divId, onRenderStarted, region, ...config } = this.props\n return config\n }\n\n componentWillUnmount () {\n this.destroyChart()\n }\n\n destroyChart () {\n if (this.chart && (this.chart as any).state !== 'DESTROYED') {\n this.chart.destroy()\n }\n }\n\n getSeatsio () {\n if (typeof seatsio === 'undefined') {\n return this.loadSeatsio()\n } else if (seatsio.region !== this.props.region) {\n seatsio = undefined\n return this.loadSeatsio()\n } else {\n return Promise.resolve(seatsio)\n }\n }\n\n loadSeatsio () {\n return new Promise((resolve, reject) => {\n let script = document.createElement('script')\n script.onload = () => {\n seatsio.region = this.props.region\n resolve(seatsio)\n }\n script.onerror = () => reject(`Could not load ${script.src}`)\n script.src = this.props.chartJsUrl.replace('{region}', this.props.region)\n document.head.appendChild(script)\n })\n }\n\n render (): React.ReactNode {\n return (\n <div ref={this.container as unknown as React.RefObject<HTMLDivElement>} style={{'height': '100%', 'width': '100%'}} />\n )\n }\n}","import { BoothProps, GeneralAdmissionAreaProps, InteractiveObjectProps, InteractiveSectionProps, SeatProps, SelectableObjectProps, TableProps } from \"@seatsio/seatsio-types\"\n\nexport const didPropsChange = <P extends { [key: string]: any}>(prevProps: P, nextProps: P): boolean => {\n if (Object.keys(prevProps).length !== Object.keys(nextProps).length) {\n return true\n }\n return Object.keys(nextProps).some((propName: string) => {\n let prevValue = prevProps[propName]\n let nextValue = nextProps[propName]\n if (prevValue && nextValue) {\n if (typeof prevValue === 'function' && typeof nextValue === 'function') {\n return prevValue.toString() !== nextValue.toString()\n }\n if (typeof prevValue === 'object' && typeof nextValue === 'object') {\n return didPropsChange(prevValue, nextValue)\n }\n }\n return prevValue !== nextValue\n })\n}\n\nexport const isSeat = (obj: SelectableObjectProps): obj is SeatProps => obj.objectType === 'Seat'\nexport const isTable = (obj: SelectableObjectProps): obj is TableProps => obj.objectType === 'Table'\nexport const isSection = (obj: SelectableObjectProps): obj is InteractiveSectionProps => obj.objectType === 'section'\nexport const isBooth = (obj: SelectableObjectProps): obj is BoothProps => obj.objectType === 'Booth'\nexport const isGeneralAdmission = (obj: SelectableObjectProps): obj is GeneralAdmissionAreaProps => obj.objectType === 'GeneralAdmissionArea'"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,YAAuB;;;ACEhB,IAAM,iBAAiB,CAAkC,WAAc,cAA0B;AACpG,MAAI,OAAO,KAAK,SAAS,EAAE,WAAW,OAAO,KAAK,SAAS,EAAE,QAAQ;AACjE,WAAO;AAAA,EACX;AACA,SAAO,OAAO,KAAK,SAAS,EAAE,KAAK,CAAC,aAAqB;AACrD,QAAI,YAAY,UAAU,QAAQ;AAClC,QAAI,YAAY,UAAU,QAAQ;AAClC,QAAI,aAAa,WAAW;AACxB,UAAI,OA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AAO,KAAK,YAAY;AAAA,IAC5B,WAAW,QAAQ,WAAW,KAAK,MAAM,QAAQ;AAC7C,gBAAU;AACV,aAAO,KAAK,YAAY;AAAA,IAC5B,OAAO;AACH,aAAO,QAAQ,QAAQ,OAAO;AAAA,IAClC;AAAA,EACJ;AAAA,EAEA,cAAe;AACX,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpC,UAAI,SAAS,SAAS,cAAc,QAAQ;AAC5C,aAAO,SAAS,MAAM;AAClB,gBAAQ,SAAS,KAAK,MAAM;AAC5B,gBAAQ,OAAO;AAAA,MACnB;AACA,aAAO,UAAU,MAAM,OAAO,kBAAkB,OAAO,GAAG,EAAE;AAC5D,aAAO,MAAM,KAAK,MAAM,WAAW,QAAQ,YAAY,KAAK,MAAM,MAAM;AACxE,eAAS,KAAK,YAAY,MAAM;AAAA,IACpC,CAAC;AAAA,EACL;AAAA,EAEA,SAA2B;AACvB,WACI,oCAAC,SAAI,KAAK,KAAK,WAAyD,OAAO,EAAC,UAAU,QAAQ,SAAS,OAAM,GAAG;AAAA,EAE5H;AACJ;AApF8B,WAKnB,eAAe;AAAA,EAClB,YAAY;AAChB;","names":["seatsio"]}
@@ -0,0 +1,94 @@
1
+ // src/main/Embeddable.tsx
2
+ import * as React from "react";
3
+
4
+ // src/main/util.ts
5
+ var didPropsChange = (prevProps, nextProps) => {
6
+ if (Object.keys(prevProps).length !== Object.keys(nextProps).length) {
7
+ return true;
8
+ }
9
+ return Object.keys(nextProps).some((propName) => {
10
+ let prevValue = prevProps[propName];
11
+ let nextValue = nextProps[propName];
12
+ if (prevValue && nextValue) {
13
+ if (typeof prevValue === "function" && typeof nextValue === "function") {
14
+ return prevValue.toString() !== nextValue.toString();
15
+ }
16
+ if (typeof prevValue === "object" && typeof nextValue === "object") {
17
+ return didPropsChange(prevValue, nextValue);
18
+ }
19
+ }
20
+ return prevValue !== nextValue;
21
+ });
22
+ };
23
+
24
+ // src/main/Embeddable.tsx
25
+ var Embeddable = class extends React.Component {
26
+ constructor(props) {
27
+ super(props);
28
+ this.container = React.createRef();
29
+ }
30
+ async componentDidMount() {
31
+ if (!this.rendering) {
32
+ this.rendering = this.createAndRenderChart();
33
+ }
34
+ }
35
+ async componentDidUpdate(prevProps) {
36
+ if (didPropsChange(this.props, prevProps) && this.chart) {
37
+ this.destroyChart();
38
+ this.createAndRenderChart();
39
+ }
40
+ }
41
+ async createAndRenderChart() {
42
+ const seatsio2 = await this.getSeatsio();
43
+ const config = this.extractConfigFromProps();
44
+ config.container = this.container.current;
45
+ this.chart = this.createChart(seatsio2, config).render();
46
+ if (this.props.onRenderStarted) {
47
+ this.props.onRenderStarted(this.chart);
48
+ }
49
+ }
50
+ extractConfigFromProps() {
51
+ let { chartJsUrl, divId, onRenderStarted, region, ...config } = this.props;
52
+ return config;
53
+ }
54
+ componentWillUnmount() {
55
+ this.destroyChart();
56
+ }
57
+ destroyChart() {
58
+ if (this.chart && this.chart.state !== "DESTROYED") {
59
+ this.chart.destroy();
60
+ }
61
+ }
62
+ getSeatsio() {
63
+ if (typeof seatsio === "undefined") {
64
+ return this.loadSeatsio();
65
+ } else if (seatsio.region !== this.props.region) {
66
+ seatsio = void 0;
67
+ return this.loadSeatsio();
68
+ } else {
69
+ return Promise.resolve(seatsio);
70
+ }
71
+ }
72
+ loadSeatsio() {
73
+ return new Promise((resolve, reject) => {
74
+ let script = document.createElement("script");
75
+ script.onload = () => {
76
+ seatsio.region = this.props.region;
77
+ resolve(seatsio);
78
+ };
79
+ script.onerror = () => reject(`Could not load ${script.src}`);
80
+ script.src = this.props.chartJsUrl.replace("{region}", this.props.region);
81
+ document.head.appendChild(script);
82
+ });
83
+ }
84
+ render() {
85
+ return /* @__PURE__ */ React.createElement("div", { ref: this.container, style: { "height": "100%", "width": "100%" } });
86
+ }
87
+ };
88
+ Embeddable.defaultProps = {
89
+ chartJsUrl: "https://cdn-{region}.seatsio.net/chart.js"
90
+ };
91
+ export {
92
+ Embeddable as default
93
+ };
94
+ //# sourceMappingURL=Embeddable.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/main/Embeddable.tsx","../src/main/util.ts"],"sourcesContent":["import * as React from 'react'\nimport {didPropsChange} from './util'\nimport { ChartDesigner, CommonConfigOptions, EventManager, Region, SeatingChart, Seatsio } from '@seatsio/seatsio-types'\n\nexport type EmbeddableProps<T> = {\n onRenderStarted?: (chart: SeatingChart) => void\n chartJsUrl?: string\n region: Region\n} & T\n\nexport default abstract class Embeddable<T extends CommonConfigOptions> extends React.Component<EmbeddableProps<T>> {\n private container: React.RefObject<HTMLDivElement>\n private rendering?: Promise<void>\n private chart: SeatingChart\n\n static defaultProps = {\n chartJsUrl: 'https://cdn-{region}.seatsio.net/chart.js'\n }\n\n constructor(props: EmbeddableProps<T>) {\n super(props);\n this.container = React.createRef();\n }\n\n abstract createChart (seatsio: Seatsio, config: T): SeatingChart | EventManager | ChartDesigner\n\n async componentDidMount () {\n if(!this.rendering) {\n this.rendering = this.createAndRenderChart()\n }\n }\n\n async componentDidUpdate (prevProps: EmbeddableProps<T>) {\n if (didPropsChange(this.props, prevProps) && this.chart) {\n this.destroyChart()\n this.createAndRenderChart()\n }\n }\n\n async createAndRenderChart () {\n const seatsio = await this.getSeatsio()\n const config = this.extractConfigFromProps()\n config.container = this.container.current\n this.chart = this.createChart(seatsio, config).render()\n if (this.props.onRenderStarted) {\n this.props.onRenderStarted(this.chart)\n }\n }\n\n extractConfigFromProps (): any {\n // noinspection JSUnusedLocalSymbols\n let { chartJsUrl, divId, onRenderStarted, region, ...config } = this.props\n return config\n }\n\n componentWillUnmount () {\n this.destroyChart()\n }\n\n destroyChart () {\n if (this.chart && (this.chart as any).state !== 'DESTROYED') {\n this.chart.destroy()\n }\n }\n\n getSeatsio () {\n if (typeof seatsio === 'undefined') {\n return this.loadSeatsio()\n } else if (seatsio.region !== this.props.region) {\n seatsio = undefined\n return this.loadSeatsio()\n } else {\n return Promise.resolve(seatsio)\n }\n }\n\n loadSeatsio () {\n return new Promise((resolve, reject) => {\n let script = document.createElement('script')\n script.onload = () => {\n seatsio.region = this.props.region\n resolve(seatsio)\n }\n script.onerror = () => reject(`Could not load ${script.src}`)\n script.src = this.props.chartJsUrl.replace('{region}', this.props.region)\n document.head.appendChild(script)\n })\n }\n\n render (): React.ReactNode {\n return (\n <div ref={this.container as unknown as React.RefObject<HTMLDivElement>} style={{'height': '100%', 'width': '100%'}} />\n )\n }\n}","import { BoothProps, GeneralAdmissionAreaProps, InteractiveObjectProps, InteractiveSectionProps, SeatProps, SelectableObjectProps, TableProps } from \"@seatsio/seatsio-types\"\n\nexport const didPropsChange = <P extends { [key: string]: any}>(prevProps: P, nextProps: P): boolean => {\n if (Object.keys(prevProps).length !== Object.keys(nextProps).length) {\n return true\n }\n return Object.keys(nextProps).some((propName: string) => {\n let prevValue = prevProps[propName]\n let nextValue = nextProps[propName]\n if (prevValue && nextValue) {\n if (typeof prevValue === 'function' && typeof nextValue === 'function') {\n return prevValue.toString() !== nextValue.toString()\n }\n if (typeof prevValue === 'object' && typeof nextValue === 'object') {\n return didPropsChange(prevValue, nextValue)\n }\n }\n return prevValue !== nextValue\n })\n}\n\nexport const isSeat = (obj: SelectableObjectProps): obj is SeatProps => obj.objectType === 'Seat'\nexport const isTable = (obj: SelectableObjectProps): obj is TableProps => obj.objectType === 'Table'\nexport const isSection = (obj: SelectableObjectProps): obj is InteractiveSectionProps => obj.objectType === 'section'\nexport const isBooth = (obj: SelectableObjectProps): obj is BoothProps => obj.objectType === 'Booth'\nexport const isGeneralAdmission = (obj: SelectableObjectProps): obj is GeneralAdmissionAreaProps => obj.objectType === 'GeneralAdmissionArea'"],"mappings":";AAAA,YAAY,WAAW;;;ACEhB,IAAM,iBAAiB,CAAkC,WAAc,cAA0B;AACpG,MAAI,OAAO,KAAK,SAAS,EAAE,WAAW,OAAO,KAAK,SAAS,EAAE,QAAQ;AACjE,WAAO;AAAA,EACX;AACA,SAAO,OAAO,KAAK,SAAS,EAAE,KAAK,C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AU,aAAa;AACzD,WAAK,MAAM,QAAQ;AAAA,IACvB;AAAA,EACJ;AAAA,EAEA,aAAc;AACV,QAAI,OAAO,YAAY,aAAa;AAChC,aAAO,KAAK,YAAY;AAAA,IAC5B,WAAW,QAAQ,WAAW,KAAK,MAAM,QAAQ;AAC7C,gBAAU;AACV,aAAO,KAAK,YAAY;AAAA,IAC5B,OAAO;AACH,aAAO,QAAQ,QAAQ,OAAO;AAAA,IAClC;AAAA,EACJ;AAAA,EAEA,cAAe;AACX,WAAO,IAAI,QAAQ,CAAC,SAAS,WAAW;AACpC,UAAI,SAAS,SAAS,cAAc,QAAQ;AAC5C,aAAO,SAAS,MAAM;AAClB,gBAAQ,SAAS,KAAK,MAAM;AAC5B,gBAAQ,OAAO;AAAA,MACnB;AACA,aAAO,UAAU,MAAM,OAAO,kBAAkB,OAAO,GAAG,EAAE;AAC5D,aAAO,MAAM,KAAK,MAAM,WAAW,QAAQ,YAAY,KAAK,MAAM,MAAM;AACxE,eAAS,KAAK,YAAY,MAAM;AAAA,IACpC,CAAC;AAAA,EACL;AAAA,EAEA,SAA2B;AACvB,WACI,oCAAC,SAAI,KAAK,KAAK,WAAyD,OAAO,EAAC,UAAU,QAAQ,SAAS,OAAM,GAAG;AAAA,EAE5H;AACJ;AApF8B,WAKnB,eAAe;AAAA,EAClB,YAAY;AAChB;","names":["seatsio"]}
@@ -0,0 +1,10 @@
1
+ import * as _seatsio_seatsio_types from '@seatsio/seatsio-types';
2
+ import { ChartDesignerConfigOptions, Seatsio } from '@seatsio/seatsio-types';
3
+ import Embeddable from './Embeddable.mjs';
4
+ import 'react';
5
+
6
+ declare class SeatsioDesigner extends Embeddable<ChartDesignerConfigOptions> {
7
+ createChart(seatsio: Seatsio, config: ChartDesignerConfigOptions): _seatsio_seatsio_types.ChartDesigner;
8
+ }
9
+
10
+ export { SeatsioDesigner as default };
@@ -1,5 +1,10 @@
1
- import Embeddable from './Embeddable';
1
+ import * as _seatsio_seatsio_types from '@seatsio/seatsio-types';
2
2
  import { ChartDesignerConfigOptions, Seatsio } from '@seatsio/seatsio-types';
3
- export default class SeatsioDesigner extends Embeddable<ChartDesignerConfigOptions> {
4
- createChart(seatsio: Seatsio, config: ChartDesignerConfigOptions): import("@seatsio/seatsio-types").ChartDesigner;
3
+ import Embeddable from './Embeddable.js';
4
+ import 'react';
5
+
6
+ declare class SeatsioDesigner extends Embeddable<ChartDesignerConfigOptions> {
7
+ createChart(seatsio: Seatsio, config: ChartDesignerConfigOptions): _seatsio_seatsio_types.ChartDesigner;
5
8
  }
9
+
10
+ export { SeatsioDesigner as default };
@@ -1,6 +1,133 @@
1
- import Embeddable from './Embeddable';
2
- export default class SeatsioDesigner extends Embeddable {
3
- createChart(seatsio, config) {
4
- return new seatsio.SeatingChartDesigner(config);
1
+ var __create = Object.create;
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __getProtoOf = Object.getPrototypeOf;
6
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
7
+ var __export = (target, all) => {
8
+ for (var name in all)
9
+ __defProp(target, name, { get: all[name], enumerable: true });
10
+ };
11
+ var __copyProps = (to, from, except, desc) => {
12
+ if (from && typeof from === "object" || typeof from === "function") {
13
+ for (let key of __getOwnPropNames(from))
14
+ if (!__hasOwnProp.call(to, key) && key !== except)
15
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
16
+ }
17
+ return to;
18
+ };
19
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
20
+ // If the importer is in node compatibility mode or this is not an ESM
21
+ // file that has been converted to a CommonJS file using a Babel-
22
+ // compatible transform (i.e. "__esModule" has not been set), then set
23
+ // "default" to the CommonJS "module.exports" for node compatibility.
24
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
25
+ mod
26
+ ));
27
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
28
+
29
+ // src/main/SeatsioDesigner.tsx
30
+ var SeatsioDesigner_exports = {};
31
+ __export(SeatsioDesigner_exports, {
32
+ default: () => SeatsioDesigner
33
+ });
34
+ module.exports = __toCommonJS(SeatsioDesigner_exports);
35
+
36
+ // src/main/Embeddable.tsx
37
+ var React = __toESM(require("react"));
38
+
39
+ // src/main/util.ts
40
+ var didPropsChange = (prevProps, nextProps) => {
41
+ if (Object.keys(prevProps).length !== Object.keys(nextProps).length) {
42
+ return true;
43
+ }
44
+ return Object.keys(nextProps).some((propName) => {
45
+ let prevValue = prevProps[propName];
46
+ let nextValue = nextProps[propName];
47
+ if (prevValue && nextValue) {
48
+ if (typeof prevValue === "function" && typeof nextValue === "function") {
49
+ return prevValue.toString() !== nextValue.toString();
50
+ }
51
+ if (typeof prevValue === "object" && typeof nextValue === "object") {
52
+ return didPropsChange(prevValue, nextValue);
53
+ }
5
54
  }
6
- }
55
+ return prevValue !== nextValue;
56
+ });
57
+ };
58
+
59
+ // src/main/Embeddable.tsx
60
+ var Embeddable = class extends React.Component {
61
+ constructor(props) {
62
+ super(props);
63
+ this.container = React.createRef();
64
+ }
65
+ async componentDidMount() {
66
+ if (!this.rendering) {
67
+ this.rendering = this.createAndRenderChart();
68
+ }
69
+ }
70
+ async componentDidUpdate(prevProps) {
71
+ if (didPropsChange(this.props, prevProps) && this.chart) {
72
+ this.destroyChart();
73
+ this.createAndRenderChart();
74
+ }
75
+ }
76
+ async createAndRenderChart() {
77
+ const seatsio2 = await this.getSeatsio();
78
+ const config = this.extractConfigFromProps();
79
+ config.container = this.container.current;
80
+ this.chart = this.createChart(seatsio2, config).render();
81
+ if (this.props.onRenderStarted) {
82
+ this.props.onRenderStarted(this.chart);
83
+ }
84
+ }
85
+ extractConfigFromProps() {
86
+ let { chartJsUrl, divId, onRenderStarted, region, ...config } = this.props;
87
+ return config;
88
+ }
89
+ componentWillUnmount() {
90
+ this.destroyChart();
91
+ }
92
+ destroyChart() {
93
+ if (this.chart && this.chart.state !== "DESTROYED") {
94
+ this.chart.destroy();
95
+ }
96
+ }
97
+ getSeatsio() {
98
+ if (typeof seatsio === "undefined") {
99
+ return this.loadSeatsio();
100
+ } else if (seatsio.region !== this.props.region) {
101
+ seatsio = void 0;
102
+ return this.loadSeatsio();
103
+ } else {
104
+ return Promise.resolve(seatsio);
105
+ }
106
+ }
107
+ loadSeatsio() {
108
+ return new Promise((resolve, reject) => {
109
+ let script = document.createElement("script");
110
+ script.onload = () => {
111
+ seatsio.region = this.props.region;
112
+ resolve(seatsio);
113
+ };
114
+ script.onerror = () => reject(`Could not load ${script.src}`);
115
+ script.src = this.props.chartJsUrl.replace("{region}", this.props.region);
116
+ document.head.appendChild(script);
117
+ });
118
+ }
119
+ render() {
120
+ return /* @__PURE__ */ React.createElement("div", { ref: this.container, style: { "height": "100%", "width": "100%" } });
121
+ }
122
+ };
123
+ Embeddable.defaultProps = {
124
+ chartJsUrl: "https://cdn-{region}.seatsio.net/chart.js"
125
+ };
126
+
127
+ // src/main/SeatsioDesigner.tsx
128
+ var SeatsioDesigner = class extends Embeddable {
129
+ createChart(seatsio2, config) {
130
+ return new seatsio2.SeatingChartDesigner(config);
131
+ }
132
+ };
133
+ //# sourceMappingURL=SeatsioDesigner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/main/SeatsioDesigner.tsx","../src/main/Embeddable.tsx","../src/main/util.ts"],"sourcesContent":["import Embeddable from './Embeddable'\nimport { ChartDesignerConfigOptions, Seatsio } from '@seatsio/seatsio-types'\n\nexport default class SeatsioDesigner extends Embeddable<ChartDesignerConfigOptions> {\n createChart (seatsio: Seatsio, config: ChartDesignerConfigOptions) {\n return new seatsio.SeatingChartDesigner(config)\n }\n}","import * as React from 'react'\nimport {didPropsChange} from './util'\nimport { ChartDesigner, CommonConfigOptions, EventManager, Region, SeatingChart, Seatsio } from '@seatsio/seatsio-types'\n\nexport type EmbeddableProps<T> = {\n onRenderStarted?: (chart: SeatingChart) => void\n chartJsUrl?: string\n region: Region\n} & T\n\nexport default abstract class Embeddable<T extends CommonConfigOptions> extends React.Component<EmbeddableProps<T>> {\n private container: React.RefObject<HTMLDivElement>\n private rendering?: Promise<void>\n private chart: SeatingChart\n\n static defaultProps = {\n chartJsUrl: 'https://cdn-{region}.seatsio.net/chart.js'\n }\n\n constructor(props: EmbeddableProps<T>) {\n super(props);\n this.container = React.createRef();\n }\n\n abstract createChart (seatsio: Seatsio, config: T): SeatingChart | EventManager | ChartDesigner\n\n async componentDidMount () {\n if(!this.rendering) {\n this.rendering = this.createAndRenderChart()\n }\n }\n\n async componentDidUpdate (prevProps: EmbeddableProps<T>) {\n if (didPropsChange(this.props, prevProps) && this.chart) {\n this.destroyChart()\n this.createAndRenderChart()\n }\n }\n\n async createAndRenderChart () {\n const seatsio = await this.getSeatsio()\n const config = this.extractConfigFromProps()\n config.container = this.container.current\n this.chart = this.createChart(seatsio, config).render()\n if (this.props.onRenderStarted) {\n this.props.onRenderStarted(this.chart)\n }\n }\n\n extractConfigFromProps (): any {\n // noinspection JSUnusedLocalSymbols\n let { chartJsUrl, divId, onRenderStarted, region, ...config } = this.props\n return config\n }\n\n componentWillUnmount () {\n this.destroyChart()\n }\n\n destroyChart () {\n if (this.chart && (this.chart as any).state !== 'DESTROYED') {\n this.chart.destroy()\n }\n }\n\n getSeatsio () {\n if (typeof seatsio === 'undefined') {\n return this.loadSeatsio()\n } else if (seatsio.region !== this.props.region) {\n seatsio = undefined\n return this.loadSeatsio()\n } else {\n return Promise.resolve(seatsio)\n }\n }\n\n loadSeatsio () {\n return new Promise((resolve, reject) => {\n let script = document.createElement('script')\n script.onload = () => {\n seatsio.region = this.props.region\n resolve(seatsio)\n }\n script.onerror = () => reject(`Could not load ${script.src}`)\n script.src = this.props.chartJsUrl.replace('{region}', this.props.region)\n document.head.appendChild(script)\n })\n }\n\n render (): React.ReactNode {\n return (\n <div ref={this.container as unknown as React.RefObject<HTMLDivElement>} style={{'height': '100%', 'width': '100%'}} />\n )\n }\n}","import { BoothProps, GeneralAdmissionAreaProps, InteractiveObjectProps, InteractiveSectionProps, SeatProps, SelectableObjectProps, TableProps } from \"@seatsio/seatsio-types\"\n\nexport const didPropsChange = <P extends { [key: string]: any}>(prevProps: P, nextProps: P): boolean => {\n if (Object.keys(prevProps).length !== Object.keys(nextProps).length) {\n return true\n }\n return Object.keys(nextProps).some((propName: string) => {\n let prevValue = prevProps[propName]\n let nextValue = nextProps[propName]\n if (prevValue && nextValue) {\n if (typeof prevValue === 'function' && typeof nextValue === 'function') {\n return prevValue.toString() !== nextValue.toString()\n }\n if (typeof prevValue === 'object' && typeof nextValue === 'object') {\n return didPropsChange(prevValue, nextValue)\n }\n }\n return prevValue !== nextValue\n })\n}\n\nexport const isSeat = (obj: SelectableObjectProps): obj is SeatProps => obj.objectType === 'Seat'\nexport const isTable = (obj: SelectableObjectProps): obj is TableProps => obj.objectType === 'Table'\nexport const isSection = (obj: SelectableObjectProps): obj is InteractiveSectionProps => obj.objectType === 'section'\nexport const isBooth = (obj: SelectableObjectProps): obj is BoothProps => obj.objectType === 'Booth'\nexport const isGeneralAdmission = (obj: SelectableObjectProps): obj is GeneralAdmissionAreaProps => obj.objectType === 'GeneralAdmissionArea'"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,YAAuB;;;ACEhB,IAAM,iBAAiB,CAAkC,WAAc,cAA0B;AACpG,MAAI,OAAO,KAAK,SAAS,EAAE,WAAW,OAAO,KAAK,SAAS,EAAE,QAAQ;AACjE,WAAO;AAAA,EACX;AACA,SAAO,OAAO,KAAK,SAAS,EAAE,KAAK,CAAC,aAAqB;AACrD,QAAI,YAAY,UAAU,QAAQ;AAClC,QAAI,YAAY,UAAU,QAAQ;AAClC,QAAI,aAAa,WAAW;AACxB,UAAI,OAAO,cAAc,cAAc,OAAO,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