@qite/tide-booking-component 1.3.4 → 1.3.5
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/build/build-cjs/booking-wizard/features/sidebar/sidebar-util.d.ts +3 -3
- package/build/build-cjs/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +5 -5
- package/build/build-cjs/booking-wizard/types.d.ts +6 -0
- package/build/build-cjs/index.js +223 -147
- package/build/build-cjs/shared/utils/localization-util.d.ts +2 -0
- package/build/build-esm/booking-wizard/features/sidebar/sidebar-util.d.ts +3 -3
- package/build/build-esm/booking-wizard/features/travelers-form/travelers-form-slice.d.ts +5 -5
- package/build/build-esm/booking-wizard/types.d.ts +6 -0
- package/build/build-esm/index.js +223 -147
- package/build/build-esm/shared/utils/localization-util.d.ts +2 -0
- package/package.json +75 -75
- package/src/booking-wizard/components/print-offer-button.tsx +63 -63
- package/src/booking-wizard/features/booking/booking-self-contained.tsx +389 -389
- package/src/booking-wizard/features/booking/booking-slice.ts +663 -663
- package/src/booking-wizard/features/booking/booking.tsx +361 -361
- package/src/booking-wizard/features/flight-options/flight-utils.ts +522 -522
- package/src/booking-wizard/features/product-options/options-form.tsx +481 -481
- package/src/booking-wizard/features/sidebar/sidebar-util.ts +177 -177
- package/src/booking-wizard/features/summary/summary-booking-option-pax.tsx +25 -25
- package/src/booking-wizard/features/summary/summary.tsx +674 -674
- package/src/booking-wizard/features/travelers-form/travelers-form-slice.ts +164 -164
- package/src/booking-wizard/features/travelers-form/travelers-form.tsx +888 -754
- package/src/booking-wizard/settings-context.ts +62 -62
- package/src/booking-wizard/types.ts +286 -279
- package/src/booking-wizard/use-offer-printer.ts +117 -117
- package/src/shared/translations/en-GB.json +239 -237
- package/src/shared/translations/fr-BE.json +239 -238
- package/src/shared/translations/nl-BE.json +239 -237
- package/src/shared/utils/tide-api-utils.ts +36 -36
- package/styles/booking-wizard-variables.scss +873 -873
- package/styles/components/_booking.scss +879 -879
- package/styles/components/_dropdown.scss +72 -72
- package/styles/components/_form.scss +1583 -1583
package/package.json
CHANGED
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@qite/tide-booking-component",
|
|
3
|
-
"version": "1.3.
|
|
4
|
-
"description": "React Booking wizard & Booking product 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
|
-
"@popperjs/core": "^2.10.2",
|
|
29
|
-
"@reach/router": "^1.3.4",
|
|
30
|
-
"@reduxjs/toolkit": "^1.6.0",
|
|
31
|
-
"@rollup/plugin-commonjs": "^19.0.1",
|
|
32
|
-
"@rollup/plugin-json": "^4.1.0",
|
|
33
|
-
"@rollup/plugin-node-resolve": "^13.0.2",
|
|
34
|
-
"@types/flat": "^5.0.2",
|
|
35
|
-
"@types/lodash": "^4.14.171",
|
|
36
|
-
"@types/reach__router": "^1.3.9",
|
|
37
|
-
"@types/react": "^17.0.2",
|
|
38
|
-
"@types/react-dom": "^17.0.2",
|
|
39
|
-
"@types/uuid": "^8.3.1",
|
|
40
|
-
"date-fns": "^2.22.1",
|
|
41
|
-
"flat": "^5.0.2",
|
|
42
|
-
"formik": "^2.2.9",
|
|
43
|
-
"lodash": "^4.17.21",
|
|
44
|
-
"prettier": "^2.3.2",
|
|
45
|
-
"react-popper": "^2.2.5",
|
|
46
|
-
"react-redux": "^7.2.4",
|
|
47
|
-
"rollup": "^2.53.2",
|
|
48
|
-
"rollup-plugin-delete": "^2.0.0",
|
|
49
|
-
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
50
|
-
"rollup-plugin-typescript2": "0.36.0",
|
|
51
|
-
"tslib": "^2.3.1",
|
|
52
|
-
"typescript": "^4.3.5",
|
|
53
|
-
"uuid": "^8.3.2"
|
|
54
|
-
},
|
|
55
|
-
"peerDependencies": {
|
|
56
|
-
"@jsonurl/jsonurl": "^1.1.4",
|
|
57
|
-
"@popperjs/core": "^2.10.2",
|
|
58
|
-
"@reach/router": "^1.3.4",
|
|
59
|
-
"@reduxjs/toolkit": "^1.6.0",
|
|
60
|
-
"date-fns": "^2.22.1",
|
|
61
|
-
"flat": "^5.0.2",
|
|
62
|
-
"formik": "^2.2.9",
|
|
63
|
-
"immer": "^9.0.5",
|
|
64
|
-
"lodash": "^4.17.21",
|
|
65
|
-
"react": "^17.0.2",
|
|
66
|
-
"react-dom": "^17.0.2",
|
|
67
|
-
"react-popper": "^2.2.5",
|
|
68
|
-
"react-redux": "^7.2.4",
|
|
69
|
-
"uuid": "^8.3.2"
|
|
70
|
-
},
|
|
71
|
-
"dependencies": {
|
|
72
|
-
"@qite/tide-client": "^1.1.64",
|
|
73
|
-
"react-html-comment": "^2.0.16"
|
|
74
|
-
}
|
|
75
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@qite/tide-booking-component",
|
|
3
|
+
"version": "1.3.5",
|
|
4
|
+
"description": "React Booking wizard & Booking product 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
|
+
"@popperjs/core": "^2.10.2",
|
|
29
|
+
"@reach/router": "^1.3.4",
|
|
30
|
+
"@reduxjs/toolkit": "^1.6.0",
|
|
31
|
+
"@rollup/plugin-commonjs": "^19.0.1",
|
|
32
|
+
"@rollup/plugin-json": "^4.1.0",
|
|
33
|
+
"@rollup/plugin-node-resolve": "^13.0.2",
|
|
34
|
+
"@types/flat": "^5.0.2",
|
|
35
|
+
"@types/lodash": "^4.14.171",
|
|
36
|
+
"@types/reach__router": "^1.3.9",
|
|
37
|
+
"@types/react": "^17.0.2",
|
|
38
|
+
"@types/react-dom": "^17.0.2",
|
|
39
|
+
"@types/uuid": "^8.3.1",
|
|
40
|
+
"date-fns": "^2.22.1",
|
|
41
|
+
"flat": "^5.0.2",
|
|
42
|
+
"formik": "^2.2.9",
|
|
43
|
+
"lodash": "^4.17.21",
|
|
44
|
+
"prettier": "^2.3.2",
|
|
45
|
+
"react-popper": "^2.2.5",
|
|
46
|
+
"react-redux": "^7.2.4",
|
|
47
|
+
"rollup": "^2.53.2",
|
|
48
|
+
"rollup-plugin-delete": "^2.0.0",
|
|
49
|
+
"rollup-plugin-peer-deps-external": "^2.2.4",
|
|
50
|
+
"rollup-plugin-typescript2": "0.36.0",
|
|
51
|
+
"tslib": "^2.3.1",
|
|
52
|
+
"typescript": "^4.3.5",
|
|
53
|
+
"uuid": "^8.3.2"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"@jsonurl/jsonurl": "^1.1.4",
|
|
57
|
+
"@popperjs/core": "^2.10.2",
|
|
58
|
+
"@reach/router": "^1.3.4",
|
|
59
|
+
"@reduxjs/toolkit": "^1.6.0",
|
|
60
|
+
"date-fns": "^2.22.1",
|
|
61
|
+
"flat": "^5.0.2",
|
|
62
|
+
"formik": "^2.2.9",
|
|
63
|
+
"immer": "^9.0.5",
|
|
64
|
+
"lodash": "^4.17.21",
|
|
65
|
+
"react": "^17.0.2",
|
|
66
|
+
"react-dom": "^17.0.2",
|
|
67
|
+
"react-popper": "^2.2.5",
|
|
68
|
+
"react-redux": "^7.2.4",
|
|
69
|
+
"uuid": "^8.3.2"
|
|
70
|
+
},
|
|
71
|
+
"dependencies": {
|
|
72
|
+
"@qite/tide-client": "^1.1.64",
|
|
73
|
+
"react-html-comment": "^2.0.16"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -1,63 +1,63 @@
|
|
|
1
|
-
import React from "react";
|
|
2
|
-
import { BookingPackage, Pax } from "@qite/tide-client/build/types";
|
|
3
|
-
import { useOfferPrinter } from "../use-offer-printer";
|
|
4
|
-
|
|
5
|
-
interface PrintOfferButtonProps {
|
|
6
|
-
bookingPackage?: BookingPackage;
|
|
7
|
-
|
|
8
|
-
getPax: () => Pax[] | undefined;
|
|
9
|
-
|
|
10
|
-
tagIds?: number[];
|
|
11
|
-
|
|
12
|
-
printActionId?: number | null;
|
|
13
|
-
|
|
14
|
-
onPrinted?: (pdfUrl: string) => void;
|
|
15
|
-
|
|
16
|
-
labelIdle?: string;
|
|
17
|
-
labelCreating?: string;
|
|
18
|
-
labelPrinting?: string;
|
|
19
|
-
disabled?: boolean;
|
|
20
|
-
className?: string;
|
|
21
|
-
loader?: React.ReactNode;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
const PrintOfferButton: React.FC<PrintOfferButtonProps> = ({
|
|
25
|
-
bookingPackage,
|
|
26
|
-
getPax,
|
|
27
|
-
tagIds,
|
|
28
|
-
printActionId = null,
|
|
29
|
-
onPrinted,
|
|
30
|
-
labelIdle = "Print offer",
|
|
31
|
-
labelCreating = "Generating offer…",
|
|
32
|
-
labelPrinting = "Generating PDF…",
|
|
33
|
-
disabled = false,
|
|
34
|
-
className,
|
|
35
|
-
}) => {
|
|
36
|
-
const { handlePrint, stage, loading } = useOfferPrinter({
|
|
37
|
-
bookingPackage,
|
|
38
|
-
getPax,
|
|
39
|
-
tagIds,
|
|
40
|
-
onPrinted,
|
|
41
|
-
printActionId,
|
|
42
|
-
});
|
|
43
|
-
|
|
44
|
-
const label =
|
|
45
|
-
stage === "creating"
|
|
46
|
-
? labelCreating
|
|
47
|
-
: stage === "printing"
|
|
48
|
-
? labelPrinting
|
|
49
|
-
: labelIdle;
|
|
50
|
-
|
|
51
|
-
return (
|
|
52
|
-
<button
|
|
53
|
-
type="button"
|
|
54
|
-
onClick={handlePrint}
|
|
55
|
-
disabled={disabled || loading}
|
|
56
|
-
className={className}
|
|
57
|
-
>
|
|
58
|
-
{label}
|
|
59
|
-
</button>
|
|
60
|
-
);
|
|
61
|
-
};
|
|
62
|
-
|
|
63
|
-
export default PrintOfferButton;
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { BookingPackage, Pax } from "@qite/tide-client/build/types";
|
|
3
|
+
import { useOfferPrinter } from "../use-offer-printer";
|
|
4
|
+
|
|
5
|
+
interface PrintOfferButtonProps {
|
|
6
|
+
bookingPackage?: BookingPackage;
|
|
7
|
+
|
|
8
|
+
getPax: () => Pax[] | undefined;
|
|
9
|
+
|
|
10
|
+
tagIds?: number[];
|
|
11
|
+
|
|
12
|
+
printActionId?: number | null;
|
|
13
|
+
|
|
14
|
+
onPrinted?: (pdfUrl: string) => void;
|
|
15
|
+
|
|
16
|
+
labelIdle?: string;
|
|
17
|
+
labelCreating?: string;
|
|
18
|
+
labelPrinting?: string;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
className?: string;
|
|
21
|
+
loader?: React.ReactNode;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const PrintOfferButton: React.FC<PrintOfferButtonProps> = ({
|
|
25
|
+
bookingPackage,
|
|
26
|
+
getPax,
|
|
27
|
+
tagIds,
|
|
28
|
+
printActionId = null,
|
|
29
|
+
onPrinted,
|
|
30
|
+
labelIdle = "Print offer",
|
|
31
|
+
labelCreating = "Generating offer…",
|
|
32
|
+
labelPrinting = "Generating PDF…",
|
|
33
|
+
disabled = false,
|
|
34
|
+
className,
|
|
35
|
+
}) => {
|
|
36
|
+
const { handlePrint, stage, loading } = useOfferPrinter({
|
|
37
|
+
bookingPackage,
|
|
38
|
+
getPax,
|
|
39
|
+
tagIds,
|
|
40
|
+
onPrinted,
|
|
41
|
+
printActionId,
|
|
42
|
+
});
|
|
43
|
+
|
|
44
|
+
const label =
|
|
45
|
+
stage === "creating"
|
|
46
|
+
? labelCreating
|
|
47
|
+
: stage === "printing"
|
|
48
|
+
? labelPrinting
|
|
49
|
+
: labelIdle;
|
|
50
|
+
|
|
51
|
+
return (
|
|
52
|
+
<button
|
|
53
|
+
type="button"
|
|
54
|
+
onClick={handlePrint}
|
|
55
|
+
disabled={disabled || loading}
|
|
56
|
+
className={className}
|
|
57
|
+
>
|
|
58
|
+
{label}
|
|
59
|
+
</button>
|
|
60
|
+
);
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
export default PrintOfferButton;
|