@qite/tide-booking-component 1.0.17 → 1.0.19
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 +8 -8
- package/package.json +71 -71
- package/rollup.config.js +23 -23
- package/src/booking-wizard/components/icon.tsx +29 -29
- package/src/booking-wizard/components/labeled-input.tsx +64 -64
- package/src/booking-wizard/components/labeled-select.tsx +69 -69
- package/src/booking-wizard/components/message.tsx +34 -34
- package/src/booking-wizard/components/product-card.tsx +37 -37
- package/src/booking-wizard/components/rating.tsx +21 -21
- package/src/booking-wizard/components/step-indicator.tsx +37 -37
- package/src/booking-wizard/components/step-route.tsx +27 -27
- package/src/booking-wizard/features/booking/api.ts +44 -44
- package/src/booking-wizard/features/booking/booking-slice.ts +373 -373
- package/src/booking-wizard/features/booking/booking.tsx +297 -297
- package/src/booking-wizard/features/booking/selectors.ts +340 -340
- package/src/booking-wizard/features/confirmation/confirmation.tsx +81 -81
- package/src/booking-wizard/features/error/error.tsx +71 -71
- package/src/booking-wizard/features/price-details/price-details-api.ts +22 -22
- package/src/booking-wizard/features/price-details/price-details-slice.ts +149 -149
- package/src/booking-wizard/features/price-details/util.ts +135 -135
- package/src/booking-wizard/features/product-options/no-options.tsx +18 -18
- package/src/booking-wizard/features/product-options/none-option.tsx +118 -118
- package/src/booking-wizard/features/product-options/option-booking-group.tsx +210 -210
- package/src/booking-wizard/features/product-options/option-item.tsx +321 -321
- package/src/booking-wizard/features/product-options/option-pax-card.tsx +117 -117
- package/src/booking-wizard/features/product-options/option-pax-group.tsx +169 -169
- package/src/booking-wizard/features/product-options/option-room.tsx +314 -314
- package/src/booking-wizard/features/product-options/option-unit-group.tsx +192 -192
- package/src/booking-wizard/features/product-options/option-units-card.tsx +100 -100
- package/src/booking-wizard/features/product-options/options-form.tsx +347 -347
- package/src/booking-wizard/features/product-options/validate-form.ts +9 -9
- package/src/booking-wizard/features/sidebar/index.tsx +80 -80
- package/src/booking-wizard/features/sidebar/sidebar-flight.tsx +66 -66
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +168 -167
- package/src/booking-wizard/features/sidebar/sidebar.tsx +343 -343
- package/src/booking-wizard/features/summary/summary-booking-option-pax.tsx +25 -25
- package/src/booking-wizard/features/summary/summary-booking-option-unit.tsx +25 -25
- package/src/booking-wizard/features/summary/summary-flight.tsx +36 -35
- package/src/booking-wizard/features/summary/summary-per-booking-option-group.tsx +57 -57
- package/src/booking-wizard/features/summary/summary-per-pax-option-group.tsx +51 -51
- package/src/booking-wizard/features/summary/summary-per-unit-option-group.tsx +54 -54
- package/src/booking-wizard/features/summary/summary-slice.ts +28 -28
- package/src/booking-wizard/features/summary/summary.tsx +601 -601
- package/src/booking-wizard/features/travelers-form/travelers-form-slice.ts +139 -139
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +729 -729
- package/src/booking-wizard/features/travelers-form/type-ahead-input.tsx +101 -101
- package/src/booking-wizard/features/travelers-form/validate-form.ts +166 -166
- package/src/booking-wizard/index.tsx +36 -36
- package/src/booking-wizard/settings-context.ts +54 -54
- package/src/booking-wizard/store.ts +29 -29
- package/src/booking-wizard/translations/translations.json +135 -135
- package/src/booking-wizard/types.ts +134 -133
- package/src/booking-wizard/utils/class-util.ts +9 -9
- package/src/booking-wizard/utils/localization-util.ts +7 -7
- package/src/booking-wizard/utils/query-string-util.ts +94 -94
- package/src/booking-wizard/utils/tide-api-utils.ts +20 -20
- package/src/index.ts +3 -3
- package/tsconfig.json +24 -24
- package/build/build-cjs/booking-wizard/components/icon.d.ts +0 -7
- package/build/build-cjs/booking-wizard/components/labeled-input.d.ts +0 -18
- package/build/build-cjs/booking-wizard/components/labeled-select.d.ts +0 -21
- package/build/build-cjs/booking-wizard/components/message.d.ts +0 -9
- package/build/build-cjs/booking-wizard/components/product-card.d.ts +0 -8
- package/build/build-cjs/booking-wizard/components/rating.d.ts +0 -6
- package/build/build-cjs/booking-wizard/components/step-indicator.d.ts +0 -6
- package/build/build-cjs/booking-wizard/components/step-route.d.ts +0 -9
- package/build/build-cjs/booking-wizard/features/booking/api.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/booking/booking-slice.d.ts +0 -26
- package/build/build-cjs/booking-wizard/features/booking/booking.d.ts +0 -8
- package/build/build-cjs/booking-wizard/features/booking/selectors.d.ts +0 -94
- package/build/build-cjs/booking-wizard/features/confirmation/confirmation.d.ts +0 -5
- package/build/build-cjs/booking-wizard/features/error/error.d.ts +0 -5
- package/build/build-cjs/booking-wizard/features/price-details/price-details-api.d.ts +0 -5
- package/build/build-cjs/booking-wizard/features/price-details/price-details-slice.d.ts +0 -66
- package/build/build-cjs/booking-wizard/features/price-details/util.d.ts +0 -2
- package/build/build-cjs/booking-wizard/features/product-options/no-options.d.ts +0 -2
- package/build/build-cjs/booking-wizard/features/product-options/none-option.d.ts +0 -9
- package/build/build-cjs/booking-wizard/features/product-options/option-booking-group.d.ts +0 -12
- package/build/build-cjs/booking-wizard/features/product-options/option-item.d.ts +0 -11
- package/build/build-cjs/booking-wizard/features/product-options/option-pax-card.d.ts +0 -10
- package/build/build-cjs/booking-wizard/features/product-options/option-pax-group.d.ts +0 -13
- package/build/build-cjs/booking-wizard/features/product-options/option-room.d.ts +0 -10
- package/build/build-cjs/booking-wizard/features/product-options/option-unit-group.d.ts +0 -13
- package/build/build-cjs/booking-wizard/features/product-options/option-units-card.d.ts +0 -9
- package/build/build-cjs/booking-wizard/features/product-options/options-form.d.ts +0 -5
- package/build/build-cjs/booking-wizard/features/product-options/validate-form.d.ts +0 -2
- package/build/build-cjs/booking-wizard/features/sidebar/index.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/sidebar/sidebar-flight.d.ts +0 -8
- package/build/build-cjs/booking-wizard/features/sidebar/sidebar-util.d.ts +0 -9
- package/build/build-cjs/booking-wizard/features/sidebar/sidebar.d.ts +0 -25
- package/build/build-cjs/booking-wizard/features/summary/summary-booking-option-pax.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-booking-option-unit.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-flight.d.ts +0 -8
- package/build/build-cjs/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +0 -7
- package/build/build-cjs/booking-wizard/features/summary/summary-slice.d.ts +0 -8
- package/build/build-cjs/booking-wizard/features/summary/summary.d.ts +0 -5
- package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +0 -60
- package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form.d.ts +0 -5
- package/build/build-cjs/booking-wizard/features/travelers-form/type-ahead-input.d.ts +0 -16
- package/build/build-cjs/booking-wizard/features/travelers-form/validate-form.d.ts +0 -4
- package/build/build-cjs/booking-wizard/index.d.ts +0 -12
- package/build/build-cjs/booking-wizard/settings-context.d.ts +0 -6
- package/build/build-cjs/booking-wizard/store.d.ts +0 -21
- package/build/build-cjs/booking-wizard/types.d.ts +0 -123
- package/build/build-cjs/booking-wizard/utils/class-util.d.ts +0 -1
- package/build/build-cjs/booking-wizard/utils/localization-util.d.ts +0 -1
- package/build/build-cjs/booking-wizard/utils/query-string-util.d.ts +0 -7
- package/build/build-cjs/booking-wizard/utils/tide-api-utils.d.ts +0 -2
- package/build/build-cjs/index.d.ts +0 -2
- package/build/build-cjs/index.js +0 -9961
- package/build/build-esm/booking-wizard/components/icon.d.ts +0 -7
- package/build/build-esm/booking-wizard/components/labeled-input.d.ts +0 -18
- package/build/build-esm/booking-wizard/components/labeled-select.d.ts +0 -21
- package/build/build-esm/booking-wizard/components/message.d.ts +0 -9
- package/build/build-esm/booking-wizard/components/product-card.d.ts +0 -8
- package/build/build-esm/booking-wizard/components/rating.d.ts +0 -6
- package/build/build-esm/booking-wizard/components/step-indicator.d.ts +0 -6
- package/build/build-esm/booking-wizard/components/step-route.d.ts +0 -9
- package/build/build-esm/booking-wizard/features/booking/api.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/booking/booking-slice.d.ts +0 -26
- package/build/build-esm/booking-wizard/features/booking/booking.d.ts +0 -8
- package/build/build-esm/booking-wizard/features/booking/selectors.d.ts +0 -94
- package/build/build-esm/booking-wizard/features/confirmation/confirmation.d.ts +0 -5
- package/build/build-esm/booking-wizard/features/error/error.d.ts +0 -5
- package/build/build-esm/booking-wizard/features/price-details/price-details-api.d.ts +0 -5
- package/build/build-esm/booking-wizard/features/price-details/price-details-slice.d.ts +0 -66
- package/build/build-esm/booking-wizard/features/price-details/util.d.ts +0 -2
- package/build/build-esm/booking-wizard/features/product-options/no-options.d.ts +0 -2
- package/build/build-esm/booking-wizard/features/product-options/none-option.d.ts +0 -9
- package/build/build-esm/booking-wizard/features/product-options/option-booking-group.d.ts +0 -12
- package/build/build-esm/booking-wizard/features/product-options/option-item.d.ts +0 -11
- package/build/build-esm/booking-wizard/features/product-options/option-pax-card.d.ts +0 -10
- package/build/build-esm/booking-wizard/features/product-options/option-pax-group.d.ts +0 -13
- package/build/build-esm/booking-wizard/features/product-options/option-room.d.ts +0 -10
- package/build/build-esm/booking-wizard/features/product-options/option-unit-group.d.ts +0 -13
- package/build/build-esm/booking-wizard/features/product-options/option-units-card.d.ts +0 -9
- package/build/build-esm/booking-wizard/features/product-options/options-form.d.ts +0 -5
- package/build/build-esm/booking-wizard/features/product-options/validate-form.d.ts +0 -2
- package/build/build-esm/booking-wizard/features/sidebar/index.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/sidebar/sidebar-flight.d.ts +0 -8
- package/build/build-esm/booking-wizard/features/sidebar/sidebar-util.d.ts +0 -9
- package/build/build-esm/booking-wizard/features/sidebar/sidebar.d.ts +0 -25
- package/build/build-esm/booking-wizard/features/summary/summary-booking-option-pax.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/summary/summary-booking-option-unit.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/summary/summary-flight.d.ts +0 -8
- package/build/build-esm/booking-wizard/features/summary/summary-per-booking-option-group.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/summary/summary-per-pax-option-group.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/summary/summary-per-unit-option-group.d.ts +0 -7
- package/build/build-esm/booking-wizard/features/summary/summary-slice.d.ts +0 -8
- package/build/build-esm/booking-wizard/features/summary/summary.d.ts +0 -5
- package/build/build-esm/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +0 -60
- package/build/build-esm/booking-wizard/features/travelers-form/travelers-form.d.ts +0 -5
- package/build/build-esm/booking-wizard/features/travelers-form/type-ahead-input.d.ts +0 -16
- package/build/build-esm/booking-wizard/features/travelers-form/validate-form.d.ts +0 -4
- package/build/build-esm/booking-wizard/index.d.ts +0 -12
- package/build/build-esm/booking-wizard/settings-context.d.ts +0 -6
- package/build/build-esm/booking-wizard/store.d.ts +0 -21
- package/build/build-esm/booking-wizard/types.d.ts +0 -123
- package/build/build-esm/booking-wizard/utils/class-util.d.ts +0 -1
- package/build/build-esm/booking-wizard/utils/localization-util.d.ts +0 -1
- package/build/build-esm/booking-wizard/utils/query-string-util.d.ts +0 -7
- package/build/build-esm/booking-wizard/utils/tide-api-utils.d.ts +0 -2
- package/build/build-esm/index.d.ts +0 -2
- package/build/build-esm/index.js +0 -9950
package/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
# README
|
|
2
|
-
|
|
3
|
-
This is the unified Tide Booking Component.
|
|
4
|
-
|
|
5
|
-
## Remarks
|
|
6
|
-
|
|
7
|
-
Do not forget to sync React versions when you're doing local changes and when you try to test them in a local React project (check https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react).
|
|
8
|
-
If using the playground, after installing it's node modules execute the following command in the root folder `npm link ./playground/node_modules/react`
|
|
1
|
+
# README
|
|
2
|
+
|
|
3
|
+
This is the unified Tide Booking Component.
|
|
4
|
+
|
|
5
|
+
## Remarks
|
|
6
|
+
|
|
7
|
+
Do not forget to sync React versions when you're doing local changes and when you try to test them in a local React project (check https://reactjs.org/warnings/invalid-hook-call-warning.html#duplicate-react).
|
|
8
|
+
If using the playground, after installing it's node modules execute the following command in the root folder `npm link ./playground/node_modules/react`
|
package/package.json
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "1.0.
|
|
4
|
-
"description": "React BookingWizard component for Tide",
|
|
5
|
-
"main": "build/build-cjs/index.js",
|
|
6
|
-
"module": "build/build-esm/index.js",
|
|
7
|
-
"scripts": {
|
|
8
|
-
"start": "rollup -c -w",
|
|
9
|
-
"build": "rollup -c",
|
|
10
|
-
"tsc": "tsc --noEmit",
|
|
11
|
-
"format": "prettier --write ."
|
|
12
|
-
},
|
|
13
|
-
"repository": {
|
|
14
|
-
"type": "git",
|
|
15
|
-
"url": "git+ssh://git@bitbucket.org/qitegeneral/tide-booking-component.git"
|
|
16
|
-
},
|
|
17
|
-
"keywords": [
|
|
18
|
-
"tide",
|
|
19
|
-
"booking",
|
|
20
|
-
"react",
|
|
21
|
-
"component"
|
|
22
|
-
],
|
|
23
|
-
"author": "Kristof Colpaert <kristof.colpaert@qite.be>",
|
|
24
|
-
"license": "OBSD",
|
|
25
|
-
"homepage": "https://bitbucket.org/qitegeneral/tide-booking-component#readme",
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@jsonurl/jsonurl": "^1.1.4",
|
|
28
|
-
"@reach/router": "^1.3.4",
|
|
29
|
-
"@reduxjs/toolkit": "^1.6.0",
|
|
30
|
-
"@rollup/plugin-commonjs": "^19.0.1",
|
|
31
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
32
|
-
"@rollup/plugin-node-resolve": "^13.0.2",
|
|
33
|
-
"@types/flat": "^5.0.2",
|
|
34
|
-
"@types/lodash": "^4.14.171",
|
|
35
|
-
"@types/reach__router": "^1.3.9",
|
|
36
|
-
"@types/react-dom": "^17.0.11",
|
|
37
|
-
"@types/uuid": "^8.3.1",
|
|
38
|
-
"date-fns": "^2.22.1",
|
|
39
|
-
"flat": "^5.0.2",
|
|
40
|
-
"formik": "^2.2.9",
|
|
41
|
-
"lodash": "^4.17.21",
|
|
42
|
-
"prettier": "^2.3.2",
|
|
43
|
-
"react": "^17.0.2",
|
|
44
|
-
"react-dom": "^17.0.2",
|
|
45
|
-
"react-redux": "^7.2.4",
|
|
46
|
-
"rollup": "^2.53.2",
|
|
47
|
-
"rollup-plugin-delete": "^2.0.0",
|
|
48
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
49
|
-
"rollup-plugin-typescript2": "^0.30.0",
|
|
50
|
-
"tslib": "^2.3.1",
|
|
51
|
-
"typescript": "^4.3.5",
|
|
52
|
-
"uuid": "^8.3.2"
|
|
53
|
-
},
|
|
54
|
-
"peerDependencies": {
|
|
55
|
-
"@jsonurl/jsonurl": "^1.1.4",
|
|
56
|
-
"@reach/router": "^1.3.4",
|
|
57
|
-
"@reduxjs/toolkit": "^1.6.0",
|
|
58
|
-
"date-fns": "^2.22.1",
|
|
59
|
-
"flat": "^5.0.2",
|
|
60
|
-
"formik": "^2.2.9",
|
|
61
|
-
"immer": "^9.0.5",
|
|
62
|
-
"lodash": "^4.17.21",
|
|
63
|
-
"react": "^16.12.0",
|
|
64
|
-
"react-dom": "^16.12.0",
|
|
65
|
-
"react-redux": "^7.2.4",
|
|
66
|
-
"uuid": "^8.3.2"
|
|
67
|
-
},
|
|
68
|
-
"dependencies": {
|
|
69
|
-
"@qite/tide-client": "1.1.21"
|
|
70
|
-
}
|
|
71
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@qite/tide-booking-component",
|
|
3
|
+
"version": "1.0.19",
|
|
4
|
+
"description": "React BookingWizard component for Tide",
|
|
5
|
+
"main": "build/build-cjs/index.js",
|
|
6
|
+
"module": "build/build-esm/index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"start": "rollup -c -w",
|
|
9
|
+
"build": "rollup -c",
|
|
10
|
+
"tsc": "tsc --noEmit",
|
|
11
|
+
"format": "prettier --write ."
|
|
12
|
+
},
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+ssh://git@bitbucket.org/qitegeneral/tide-booking-component.git"
|
|
16
|
+
},
|
|
17
|
+
"keywords": [
|
|
18
|
+
"tide",
|
|
19
|
+
"booking",
|
|
20
|
+
"react",
|
|
21
|
+
"component"
|
|
22
|
+
],
|
|
23
|
+
"author": "Kristof Colpaert <kristof.colpaert@qite.be>",
|
|
24
|
+
"license": "OBSD",
|
|
25
|
+
"homepage": "https://bitbucket.org/qitegeneral/tide-booking-component#readme",
|
|
26
|
+
"devDependencies": {
|
|
27
|
+
"@jsonurl/jsonurl": "^1.1.4",
|
|
28
|
+
"@reach/router": "^1.3.4",
|
|
29
|
+
"@reduxjs/toolkit": "^1.6.0",
|
|
30
|
+
"@rollup/plugin-commonjs": "^19.0.1",
|
|
31
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
32
|
+
"@rollup/plugin-node-resolve": "^13.0.2",
|
|
33
|
+
"@types/flat": "^5.0.2",
|
|
34
|
+
"@types/lodash": "^4.14.171",
|
|
35
|
+
"@types/reach__router": "^1.3.9",
|
|
36
|
+
"@types/react-dom": "^17.0.11",
|
|
37
|
+
"@types/uuid": "^8.3.1",
|
|
38
|
+
"date-fns": "^2.22.1",
|
|
39
|
+
"flat": "^5.0.2",
|
|
40
|
+
"formik": "^2.2.9",
|
|
41
|
+
"lodash": "^4.17.21",
|
|
42
|
+
"prettier": "^2.3.2",
|
|
43
|
+
"react": "^17.0.2",
|
|
44
|
+
"react-dom": "^17.0.2",
|
|
45
|
+
"react-redux": "^7.2.4",
|
|
46
|
+
"rollup": "^2.53.2",
|
|
47
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
48
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
49
|
+
"rollup-plugin-typescript2": "^0.30.0",
|
|
50
|
+
"tslib": "^2.3.1",
|
|
51
|
+
"typescript": "^4.3.5",
|
|
52
|
+
"uuid": "^8.3.2"
|
|
53
|
+
},
|
|
54
|
+
"peerDependencies": {
|
|
55
|
+
"@jsonurl/jsonurl": "^1.1.4",
|
|
56
|
+
"@reach/router": "^1.3.4",
|
|
57
|
+
"@reduxjs/toolkit": "^1.6.0",
|
|
58
|
+
"date-fns": "^2.22.1",
|
|
59
|
+
"flat": "^5.0.2",
|
|
60
|
+
"formik": "^2.2.9",
|
|
61
|
+
"immer": "^9.0.5",
|
|
62
|
+
"lodash": "^4.17.21",
|
|
63
|
+
"react": "^16.12.0",
|
|
64
|
+
"react-dom": "^16.12.0",
|
|
65
|
+
"react-redux": "^7.2.4",
|
|
66
|
+
"uuid": "^8.3.2"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"@qite/tide-client": "1.1.21"
|
|
70
|
+
}
|
|
71
|
+
}
|
package/rollup.config.js
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
import commonjs from "@rollup/plugin-commonjs";
|
|
2
|
-
import del from "rollup-plugin-delete";
|
|
3
|
-
import json from "@rollup/plugin-json";
|
|
4
|
-
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
5
|
-
import packageJson from "./package.json";
|
|
6
|
-
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
7
|
-
import typescript from "rollup-plugin-typescript2";
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
input: "src/index.ts",
|
|
11
|
-
output: [
|
|
12
|
-
{ file: packageJson.main, format: "cjs", banner: "/* eslint-disable */" },
|
|
13
|
-
{ file: packageJson.module, format: "esm", banner: "/* eslint-disable */" },
|
|
14
|
-
],
|
|
15
|
-
plugins: [
|
|
16
|
-
peerDepsExternal(),
|
|
17
|
-
json(),
|
|
18
|
-
nodeResolve(),
|
|
19
|
-
commonjs(),
|
|
20
|
-
typescript(),
|
|
21
|
-
del({ targets: ["build/*"] }),
|
|
22
|
-
],
|
|
23
|
-
};
|
|
1
|
+
import commonjs from "@rollup/plugin-commonjs";
|
|
2
|
+
import del from "rollup-plugin-delete";
|
|
3
|
+
import json from "@rollup/plugin-json";
|
|
4
|
+
import nodeResolve from "@rollup/plugin-node-resolve";
|
|
5
|
+
import packageJson from "./package.json";
|
|
6
|
+
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
7
|
+
import typescript from "rollup-plugin-typescript2";
|
|
8
|
+
|
|
9
|
+
export default {
|
|
10
|
+
input: "src/index.ts",
|
|
11
|
+
output: [
|
|
12
|
+
{ file: packageJson.main, format: "cjs", banner: "/* eslint-disable */" },
|
|
13
|
+
{ file: packageJson.module, format: "esm", banner: "/* eslint-disable */" },
|
|
14
|
+
],
|
|
15
|
+
plugins: [
|
|
16
|
+
peerDepsExternal(),
|
|
17
|
+
json(),
|
|
18
|
+
nodeResolve(),
|
|
19
|
+
commonjs(),
|
|
20
|
+
typescript(),
|
|
21
|
+
del({ targets: ["build/*"] }),
|
|
22
|
+
],
|
|
23
|
+
};
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { isEmpty } from "lodash";
|
|
3
|
-
import { useContext } from "react";
|
|
4
|
-
import SettingsContext from "../settings-context";
|
|
5
|
-
|
|
6
|
-
interface IconProps {
|
|
7
|
-
name: string;
|
|
8
|
-
className?: string;
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
const Icon: React.FC<IconProps> = ({ name, className }) => {
|
|
12
|
-
const { icons } = useContext(SettingsContext);
|
|
13
|
-
|
|
14
|
-
if (!icons) {
|
|
15
|
-
return null;
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
return (
|
|
19
|
-
<svg
|
|
20
|
-
className={["icon", `icon--${name}`, className]
|
|
21
|
-
.filter((className) => !isEmpty(className))
|
|
22
|
-
.join(" ")}
|
|
23
|
-
>
|
|
24
|
-
<use href={`${icons}#${name}`}></use>
|
|
25
|
-
</svg>
|
|
26
|
-
);
|
|
27
|
-
};
|
|
28
|
-
|
|
29
|
-
export default Icon;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { isEmpty } from "lodash";
|
|
3
|
+
import { useContext } from "react";
|
|
4
|
+
import SettingsContext from "../settings-context";
|
|
5
|
+
|
|
6
|
+
interface IconProps {
|
|
7
|
+
name: string;
|
|
8
|
+
className?: string;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
const Icon: React.FC<IconProps> = ({ name, className }) => {
|
|
12
|
+
const { icons } = useContext(SettingsContext);
|
|
13
|
+
|
|
14
|
+
if (!icons) {
|
|
15
|
+
return null;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
return (
|
|
19
|
+
<svg
|
|
20
|
+
className={["icon", `icon--${name}`, className]
|
|
21
|
+
.filter((className) => !isEmpty(className))
|
|
22
|
+
.join(" ")}
|
|
23
|
+
>
|
|
24
|
+
<use href={`${icons}#${name}`}></use>
|
|
25
|
+
</svg>
|
|
26
|
+
);
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export default Icon;
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { buildClassName } from "../utils/class-util";
|
|
3
|
-
import { compact } from "lodash";
|
|
4
|
-
|
|
5
|
-
interface LabeledInputProps {
|
|
6
|
-
name: string;
|
|
7
|
-
type?: string;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
value?: string | number;
|
|
10
|
-
defaultValue?: string | number;
|
|
11
|
-
min?: string | number;
|
|
12
|
-
max?: string | number;
|
|
13
|
-
label?: string;
|
|
14
|
-
placeholder?: string;
|
|
15
|
-
hasError?: boolean;
|
|
16
|
-
extraClassName?: string;
|
|
17
|
-
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
18
|
-
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
const LabeledInput: React.FC<LabeledInputProps> = ({
|
|
22
|
-
name,
|
|
23
|
-
type,
|
|
24
|
-
required,
|
|
25
|
-
value,
|
|
26
|
-
defaultValue,
|
|
27
|
-
min,
|
|
28
|
-
max,
|
|
29
|
-
label,
|
|
30
|
-
placeholder,
|
|
31
|
-
extraClassName,
|
|
32
|
-
hasError,
|
|
33
|
-
onChange,
|
|
34
|
-
onBlur,
|
|
35
|
-
}) => {
|
|
36
|
-
return (
|
|
37
|
-
<label
|
|
38
|
-
className={buildClassName([
|
|
39
|
-
"form__group",
|
|
40
|
-
extraClassName,
|
|
41
|
-
hasError && "form__group--error",
|
|
42
|
-
])}
|
|
43
|
-
>
|
|
44
|
-
<span className="form__label">
|
|
45
|
-
{compact([label, required && "*"]).join(" ")}
|
|
46
|
-
</span>
|
|
47
|
-
<input
|
|
48
|
-
name={name}
|
|
49
|
-
type={type ?? "text"}
|
|
50
|
-
required={required}
|
|
51
|
-
className="form__input"
|
|
52
|
-
min={min}
|
|
53
|
-
max={max}
|
|
54
|
-
placeholder={placeholder}
|
|
55
|
-
onChange={onChange}
|
|
56
|
-
onBlur={onBlur}
|
|
57
|
-
value={value}
|
|
58
|
-
defaultValue={defaultValue}
|
|
59
|
-
/>
|
|
60
|
-
</label>
|
|
61
|
-
);
|
|
62
|
-
};
|
|
63
|
-
|
|
64
|
-
export default LabeledInput;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { buildClassName } from "../utils/class-util";
|
|
3
|
+
import { compact } from "lodash";
|
|
4
|
+
|
|
5
|
+
interface LabeledInputProps {
|
|
6
|
+
name: string;
|
|
7
|
+
type?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
defaultValue?: string | number;
|
|
11
|
+
min?: string | number;
|
|
12
|
+
max?: string | number;
|
|
13
|
+
label?: string;
|
|
14
|
+
placeholder?: string;
|
|
15
|
+
hasError?: boolean;
|
|
16
|
+
extraClassName?: string;
|
|
17
|
+
onChange?: React.ChangeEventHandler<HTMLInputElement>;
|
|
18
|
+
onBlur?: React.FocusEventHandler<HTMLInputElement>;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const LabeledInput: React.FC<LabeledInputProps> = ({
|
|
22
|
+
name,
|
|
23
|
+
type,
|
|
24
|
+
required,
|
|
25
|
+
value,
|
|
26
|
+
defaultValue,
|
|
27
|
+
min,
|
|
28
|
+
max,
|
|
29
|
+
label,
|
|
30
|
+
placeholder,
|
|
31
|
+
extraClassName,
|
|
32
|
+
hasError,
|
|
33
|
+
onChange,
|
|
34
|
+
onBlur,
|
|
35
|
+
}) => {
|
|
36
|
+
return (
|
|
37
|
+
<label
|
|
38
|
+
className={buildClassName([
|
|
39
|
+
"form__group",
|
|
40
|
+
extraClassName,
|
|
41
|
+
hasError && "form__group--error",
|
|
42
|
+
])}
|
|
43
|
+
>
|
|
44
|
+
<span className="form__label">
|
|
45
|
+
{compact([label, required && "*"]).join(" ")}
|
|
46
|
+
</span>
|
|
47
|
+
<input
|
|
48
|
+
name={name}
|
|
49
|
+
type={type ?? "text"}
|
|
50
|
+
required={required}
|
|
51
|
+
className="form__input"
|
|
52
|
+
min={min}
|
|
53
|
+
max={max}
|
|
54
|
+
placeholder={placeholder}
|
|
55
|
+
onChange={onChange}
|
|
56
|
+
onBlur={onBlur}
|
|
57
|
+
value={value}
|
|
58
|
+
defaultValue={defaultValue}
|
|
59
|
+
/>
|
|
60
|
+
</label>
|
|
61
|
+
);
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
export default LabeledInput;
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { buildClassName } from "../utils/class-util";
|
|
3
|
-
import { compact } from "lodash";
|
|
4
|
-
|
|
5
|
-
interface LabeledSelectProps {
|
|
6
|
-
name: string;
|
|
7
|
-
id?: string;
|
|
8
|
-
required?: boolean;
|
|
9
|
-
value?: string | number;
|
|
10
|
-
defaultValue?: string | number;
|
|
11
|
-
label?: string;
|
|
12
|
-
hasError?: boolean;
|
|
13
|
-
extraClassName?: string;
|
|
14
|
-
extraDropdownClassName?: string;
|
|
15
|
-
options?: {
|
|
16
|
-
key: string;
|
|
17
|
-
value: string | number | undefined;
|
|
18
|
-
label: string;
|
|
19
|
-
}[];
|
|
20
|
-
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
21
|
-
onBlur?: React.FocusEventHandler<HTMLSelectElement>;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const LabeledSelect: React.FC<LabeledSelectProps> = ({
|
|
25
|
-
name,
|
|
26
|
-
id,
|
|
27
|
-
required,
|
|
28
|
-
value,
|
|
29
|
-
defaultValue,
|
|
30
|
-
label,
|
|
31
|
-
extraClassName,
|
|
32
|
-
extraDropdownClassName,
|
|
33
|
-
hasError,
|
|
34
|
-
options,
|
|
35
|
-
onChange,
|
|
36
|
-
onBlur,
|
|
37
|
-
}) => {
|
|
38
|
-
return (
|
|
39
|
-
<label
|
|
40
|
-
className={buildClassName([
|
|
41
|
-
"form__group",
|
|
42
|
-
extraClassName,
|
|
43
|
-
hasError && "form__group--error",
|
|
44
|
-
])}
|
|
45
|
-
>
|
|
46
|
-
<span className="form__label">
|
|
47
|
-
{compact([label, required && "*"]).join(" ")}
|
|
48
|
-
</span>
|
|
49
|
-
<div className={buildClassName(["dropdown", extraDropdownClassName])}>
|
|
50
|
-
<select
|
|
51
|
-
name={name}
|
|
52
|
-
id={id}
|
|
53
|
-
defaultValue={defaultValue}
|
|
54
|
-
value={value}
|
|
55
|
-
onBlur={onBlur}
|
|
56
|
-
onChange={onChange}
|
|
57
|
-
>
|
|
58
|
-
{options?.map((option) => (
|
|
59
|
-
<option key={option.key} value={option.value}>
|
|
60
|
-
{option.label}
|
|
61
|
-
</option>
|
|
62
|
-
))}
|
|
63
|
-
</select>
|
|
64
|
-
</div>
|
|
65
|
-
</label>
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export default LabeledSelect;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { buildClassName } from "../utils/class-util";
|
|
3
|
+
import { compact } from "lodash";
|
|
4
|
+
|
|
5
|
+
interface LabeledSelectProps {
|
|
6
|
+
name: string;
|
|
7
|
+
id?: string;
|
|
8
|
+
required?: boolean;
|
|
9
|
+
value?: string | number;
|
|
10
|
+
defaultValue?: string | number;
|
|
11
|
+
label?: string;
|
|
12
|
+
hasError?: boolean;
|
|
13
|
+
extraClassName?: string;
|
|
14
|
+
extraDropdownClassName?: string;
|
|
15
|
+
options?: {
|
|
16
|
+
key: string;
|
|
17
|
+
value: string | number | undefined;
|
|
18
|
+
label: string;
|
|
19
|
+
}[];
|
|
20
|
+
onChange?: React.ChangeEventHandler<HTMLSelectElement>;
|
|
21
|
+
onBlur?: React.FocusEventHandler<HTMLSelectElement>;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const LabeledSelect: React.FC<LabeledSelectProps> = ({
|
|
25
|
+
name,
|
|
26
|
+
id,
|
|
27
|
+
required,
|
|
28
|
+
value,
|
|
29
|
+
defaultValue,
|
|
30
|
+
label,
|
|
31
|
+
extraClassName,
|
|
32
|
+
extraDropdownClassName,
|
|
33
|
+
hasError,
|
|
34
|
+
options,
|
|
35
|
+
onChange,
|
|
36
|
+
onBlur,
|
|
37
|
+
}) => {
|
|
38
|
+
return (
|
|
39
|
+
<label
|
|
40
|
+
className={buildClassName([
|
|
41
|
+
"form__group",
|
|
42
|
+
extraClassName,
|
|
43
|
+
hasError && "form__group--error",
|
|
44
|
+
])}
|
|
45
|
+
>
|
|
46
|
+
<span className="form__label">
|
|
47
|
+
{compact([label, required && "*"]).join(" ")}
|
|
48
|
+
</span>
|
|
49
|
+
<div className={buildClassName(["dropdown", extraDropdownClassName])}>
|
|
50
|
+
<select
|
|
51
|
+
name={name}
|
|
52
|
+
id={id}
|
|
53
|
+
defaultValue={defaultValue}
|
|
54
|
+
value={value}
|
|
55
|
+
onBlur={onBlur}
|
|
56
|
+
onChange={onChange}
|
|
57
|
+
>
|
|
58
|
+
{options?.map((option) => (
|
|
59
|
+
<option key={option.key} value={option.value}>
|
|
60
|
+
{option.label}
|
|
61
|
+
</option>
|
|
62
|
+
))}
|
|
63
|
+
</select>
|
|
64
|
+
</div>
|
|
65
|
+
</label>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
68
|
+
|
|
69
|
+
export default LabeledSelect;
|
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
import Icon from "./icon";
|
|
2
|
-
import React from "react";
|
|
3
|
-
import { buildClassName } from "../utils/class-util";
|
|
4
|
-
|
|
5
|
-
interface MessageProps {
|
|
6
|
-
type: "error" | "success";
|
|
7
|
-
title: string;
|
|
8
|
-
actionComponent?: JSX.Element;
|
|
9
|
-
children?: JSX.Element | JSX.Element[];
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const Message: React.FC<MessageProps> = ({
|
|
13
|
-
type,
|
|
14
|
-
title,
|
|
15
|
-
actionComponent,
|
|
16
|
-
children,
|
|
17
|
-
}) => (
|
|
18
|
-
<div
|
|
19
|
-
className={buildClassName([
|
|
20
|
-
"booking-message",
|
|
21
|
-
type === "error" && "booking-message--error",
|
|
22
|
-
type === "success" && "booking-message--success",
|
|
23
|
-
])}
|
|
24
|
-
>
|
|
25
|
-
{type === "error" && <Icon name="ui-error" />}
|
|
26
|
-
<h4 className="booking-message__heading">{title}</h4>
|
|
27
|
-
<div className="booking-message__text">{children}</div>
|
|
28
|
-
{actionComponent && (
|
|
29
|
-
<div className="booking-message__actions">{actionComponent}</div>
|
|
30
|
-
)}
|
|
31
|
-
</div>
|
|
32
|
-
);
|
|
33
|
-
|
|
34
|
-
export default Message;
|
|
1
|
+
import Icon from "./icon";
|
|
2
|
+
import React from "react";
|
|
3
|
+
import { buildClassName } from "../utils/class-util";
|
|
4
|
+
|
|
5
|
+
interface MessageProps {
|
|
6
|
+
type: "error" | "success";
|
|
7
|
+
title: string;
|
|
8
|
+
actionComponent?: JSX.Element;
|
|
9
|
+
children?: JSX.Element | JSX.Element[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
const Message: React.FC<MessageProps> = ({
|
|
13
|
+
type,
|
|
14
|
+
title,
|
|
15
|
+
actionComponent,
|
|
16
|
+
children,
|
|
17
|
+
}) => (
|
|
18
|
+
<div
|
|
19
|
+
className={buildClassName([
|
|
20
|
+
"booking-message",
|
|
21
|
+
type === "error" && "booking-message--error",
|
|
22
|
+
type === "success" && "booking-message--success",
|
|
23
|
+
])}
|
|
24
|
+
>
|
|
25
|
+
{type === "error" && <Icon name="ui-error" />}
|
|
26
|
+
<h4 className="booking-message__heading">{title}</h4>
|
|
27
|
+
<div className="booking-message__text">{children}</div>
|
|
28
|
+
{actionComponent && (
|
|
29
|
+
<div className="booking-message__actions">{actionComponent}</div>
|
|
30
|
+
)}
|
|
31
|
+
</div>
|
|
32
|
+
);
|
|
33
|
+
|
|
34
|
+
export default Message;
|