iticket-seatingplan-dev 1.3.6 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,75 +1,75 @@
1
- # iticket-seatingplan docs
2
-
3
- Installing the package:
4
-
5
- npm install iticket-seatingplan
6
-
7
- Importing **SeatingPlan** module in your component:
8
-
9
- import { SeatingPlan } from 'iticket-seatingplan'
10
-
11
- Using the **SeatingPlan** component
12
-
13
- <SeatingPlan
14
- eventId={eventId}
15
- showingUid={showingUid}
16
- sessionId={sessionId}
17
- showingId={showingId}
18
- priceAgeId={priceAgeId}
19
- quantity={quantity}
20
- price={price}
21
- callbackFunction={callbackFunction}
22
- apiKey={apiKey}
23
- />
24
-
25
- ## SeatingPlan
26
-
27
- | Prop | Type | Description |
28
- | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
- | eventId | integer | eventId of event.<br />_required_ |
30
- | showingUid | string | showingUid of the selected showing.<br />_required_ |
31
- | showingId | integer | showingId of the selected showing.<br />_required_ |
32
- | sessionId | string | sessionId from the initial CreateBasket endpoint.<br />_required_ |
33
- | priceAgeId | integer | priceAgeId selected by user.<br />_required_ |
34
- | quantity | integer | quantity specified by user.<br />_required_ |
35
- | price | float | price specified by user if it is dynamically priced. Must be >= **priceMinimum** and <= **priceMaximum**. If not supplied, default price will be applied.<br />_optional_ |
36
- | apiKey | string | API key provided by iTICKET.<br />_required_ |
37
- | callbackFunction | function | callbackFunction to listen for **SeatingPlan** events.<br />_required_ |
38
-
39
- ## callbackFunction
40
-
41
- This function will be triggered any time there is an update to the basket or an error has occurred. Below is a sample callbackFunction that just `console.logs` an event:
42
-
43
- const callbackFunction = (e) => {
44
- console.log('event', e)
45
- }
46
-
47
- Sample callback results are as follows:
48
-
49
- - A seat has been added to cart:
50
-
51
- {
52
- "type":"cart-change",
53
- "details":[
54
- {
55
- "showingSeatId":4158647,
56
- "showingId": 84164,
57
- "rowName":"I",
58
- "columnName":"13",
59
- "price": 51,
60
- "priceAgeName": "ADULT",
61
- }
62
- ]
63
- }
64
-
65
- - An error has occurred, \*e.g. price specified is greater than or less than the set **priceMinimum** and/or **priceMaximum\***
66
-
67
- {
68
- "type":"error",
69
- "details":{
70
- "error":{
71
- "code":403,
72
- "message":"Price specified not allowed."
73
- }
74
- }
75
- }
1
+ # iticket-seatingplan docs
2
+
3
+ Installing the package:
4
+
5
+ npm install iticket-seatingplan
6
+
7
+ Importing **SeatingPlan** module in your component:
8
+
9
+ import { SeatingPlan } from 'iticket-seatingplan'
10
+
11
+ Using the **SeatingPlan** component
12
+
13
+ <SeatingPlan
14
+ eventId={eventId}
15
+ showingUid={showingUid}
16
+ sessionId={sessionId}
17
+ showingId={showingId}
18
+ priceAgeId={priceAgeId}
19
+ quantity={quantity}
20
+ price={price}
21
+ callbackFunction={callbackFunction}
22
+ apiKey={apiKey}
23
+ />
24
+
25
+ ## SeatingPlan
26
+
27
+ | Prop | Type | Description |
28
+ | ---------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
29
+ | eventId | integer | eventId of event.<br />_required_ |
30
+ | showingUid | string | showingUid of the selected showing.<br />_required_ |
31
+ | showingId | integer | showingId of the selected showing.<br />_required_ |
32
+ | sessionId | string | sessionId from the initial CreateBasket endpoint.<br />_required_ |
33
+ | priceAgeId | integer | priceAgeId selected by user.<br />_required_ |
34
+ | quantity | integer | quantity specified by user.<br />_required_ |
35
+ | price | float | price specified by user if it is dynamically priced. Must be >= **priceMinimum** and <= **priceMaximum**. If not supplied, default price will be applied.<br />_optional_ |
36
+ | apiKey | string | API key provided by iTICKET.<br />_required_ |
37
+ | callbackFunction | function | callbackFunction to listen for **SeatingPlan** events.<br />_required_ |
38
+
39
+ ## callbackFunction
40
+
41
+ This function will be triggered any time there is an update to the basket or an error has occurred. Below is a sample callbackFunction that just `console.logs` an event:
42
+
43
+ const callbackFunction = (e) => {
44
+ console.log('event', e)
45
+ }
46
+
47
+ Sample callback results are as follows:
48
+
49
+ - A seat has been added to cart:
50
+
51
+ {
52
+ "type":"cart-change",
53
+ "details":[
54
+ {
55
+ "showingSeatId":4158647,
56
+ "showingId": 84164,
57
+ "rowName":"I",
58
+ "columnName":"13",
59
+ "price": 51,
60
+ "priceAgeName": "ADULT",
61
+ }
62
+ ]
63
+ }
64
+
65
+ - An error has occurred, \*e.g. price specified is greater than or less than the set **priceMinimum** and/or **priceMaximum\***
66
+
67
+ {
68
+ "type":"error",
69
+ "details":{
70
+ "error":{
71
+ "code":403,
72
+ "message":"Price specified not allowed."
73
+ }
74
+ }
75
+ }
package/package.json CHANGED
@@ -1,50 +1,53 @@
1
- {
2
- "name": "iticket-seatingplan-dev",
3
- "description": "Seating plan with FLEXi pricing",
4
- "author": "gedwyne",
5
- "version": "1.3.6",
6
- "private": false,
7
- "keywords": [
8
- "iticket",
9
- "seatingplan"
10
- ],
11
- "main": "dist/index.js",
12
- "module": "dist/index.js",
13
- "files": [
14
- "dist",
15
- "README.md"
16
- ],
17
- "dependencies": {
18
- "@babel/polyfill": "^7.12.1",
19
- "leaflet": "^1.9.3",
20
- "react-leaflet": "^4.2.1",
21
- "react-leaflet-custom-control": "^1.3.5"
22
- },
23
- "codependencies": {
24
- "@babel/polyfill": "^7.12.1",
25
- "leaflet": "^1.9.3",
26
- "react-leaflet": "^4.2.1"
27
- },
28
- "scripts": {
29
- "build": "rm -rf dist && NODE_ENV=production babel src/lib --out-dir dist --copy-files",
30
- "start": "react-scripts start"
31
- },
32
- "browserslist": {
33
- "production": [
34
- ">0.2%",
35
- "not dead",
36
- "not op_mini all"
37
- ],
38
- "development": [
39
- "last 1 chrome version",
40
- "last 1 firefox version",
41
- "last 1 safari version"
42
- ]
43
- },
44
- "devDependencies": {
45
- "@babel/cli": "^7.22.5",
46
- "@babel/core": "^7.22.5",
47
- "@babel/preset-env": "^7.22.5",
48
- "@babel/preset-react": "^7.22.5"
49
- }
50
- }
1
+ {
2
+ "name": "iticket-seatingplan-dev",
3
+ "description": "Seating plan with FLEXi pricing",
4
+ "author": "gedwyne",
5
+ "version": "1.3.7",
6
+ "private": false,
7
+ "keywords": [
8
+ "iticket",
9
+ "seatingplan"
10
+ ],
11
+ "main": "dist/index.js",
12
+ "module": "dist/index.js",
13
+ "files": [
14
+ "dist",
15
+ "README.md"
16
+ ],
17
+ "dependencies": {
18
+ "@babel/polyfill": "^7.12.1",
19
+ "leaflet": "^1.9.3",
20
+ "react": "^18.3.1",
21
+ "react-dom": "^18.3.1",
22
+ "react-leaflet": "^4.2.1",
23
+ "react-leaflet-custom-control": "^1.3.5",
24
+ "react-scripts": "^5.0.1"
25
+ },
26
+ "codependencies": {
27
+ "@babel/polyfill": "^7.12.1",
28
+ "leaflet": "^1.9.3",
29
+ "react-leaflet": "^4.2.1"
30
+ },
31
+ "scripts": {
32
+ "build": "rm -rf dist && NODE_ENV=production babel src/lib --out-dir dist --copy-files",
33
+ "start": "react-scripts start"
34
+ },
35
+ "browserslist": {
36
+ "production": [
37
+ ">0.2%",
38
+ "not dead",
39
+ "not op_mini all"
40
+ ],
41
+ "development": [
42
+ "last 1 chrome version",
43
+ "last 1 firefox version",
44
+ "last 1 safari version"
45
+ ]
46
+ },
47
+ "devDependencies": {
48
+ "@babel/cli": "^7.22.5",
49
+ "@babel/core": "^7.22.5",
50
+ "@babel/preset-env": "^7.22.5",
51
+ "@babel/preset-react": "^7.22.5"
52
+ }
53
+ }
@@ -1,17 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- const Badge = props => {
10
- return /*#__PURE__*/_react.default.createElement("div", {
11
- className: "badge ".concat(!props.value ? 'badge--none' : '', " ")
12
- }, /*#__PURE__*/_react.default.createElement("h4", {
13
- className: "heavy"
14
- }, props.value || 0));
15
- };
16
- var _default = Badge;
17
- exports.default = _default;
@@ -1,21 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.default = void 0;
7
- var _react = _interopRequireDefault(require("react"));
8
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
9
- const Button = props => {
10
- return /*#__PURE__*/_react.default.createElement("button", {
11
- className: "btn btn--".concat(props.kind, " CTA"),
12
- "data-id": props.id,
13
- type: props.type,
14
- name: props.name,
15
- value: props.value,
16
- disabled: props.disabled,
17
- onClick: props.handleClick
18
- }, /*#__PURE__*/_react.default.createElement("h4", null, props.label));
19
- };
20
- var _default = Button;
21
- exports.default = _default;