@roomstay/frontend 2.1.23 → 2.1.25
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/dist/399.bundle.js +2 -0
- package/dist/559.bundle.js +1 -1
- package/dist/760.bundle.js +1 -1
- package/dist/main.bundle.js +1 -1
- package/dist/src/components/generic/Checkbox/Checkbox.js.map +1 -1
- package/dist/src/components/generic/Select/InputSelect.d.ts +2 -2
- package/dist/src/components/generic/Select/InputSelect.js +2 -2
- package/dist/src/components/generic/Select/InputSelect.js.map +1 -1
- package/dist/src/components/generic/Text.d.ts +1 -1
- package/dist/src/components/generic/Text.js +28 -6
- package/dist/src/components/generic/Text.js.map +1 -1
- package/dist/src/components/generic/TextArea.d.ts +2 -1
- package/dist/src/components/generic/TextArea.js +9 -1
- package/dist/src/components/generic/TextArea.js.map +1 -1
- package/dist/src/components/steps/confirmation/StepConfirmationForm.js +4 -4
- package/dist/src/components/steps/confirmation/StepConfirmationForm.js.map +1 -1
- package/dist/src/contexts/ConfirmationFormContext.d.ts +3 -1
- package/dist/src/contexts/ConfirmationFormContext.js +5 -14
- package/dist/src/contexts/ConfirmationFormContext.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.js +1 -0
- package/dist/src/index.js.map +1 -1
- package/dist/src/stories/Text.stories.d.ts +3 -3
- package/dist/src/stories/TextArea.stories.d.ts +2 -2
- package/dist/test.bundle.js +1 -1
- package/dist/vendors.bundle.js +1 -1
- package/dist/vendors.bundle.js.LICENSE.txt +9 -0
- package/package.json +1 -1
- package/dist/535.bundle.js +0 -2
- /package/dist/{535.bundle.js.LICENSE.txt → 399.bundle.js.LICENSE.txt} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Checkbox.js","sourceRoot":"/","sources":["src/components/generic/Checkbox/Checkbox.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,kDAA0B;AAC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AAE,QAAQ,EAAE,QAAQ,IAAI;YAC9F,wCAAM,SAAS,EAAE,8BAAM,CAAC,eAAe,CAAC;gBACpC,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,GAAI,CAC3B;YACP,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,MAAM,UAC7B,KAAK,CAAC,KAAK,CACT,CACH,CACN,CACT,CAAC;AACN,CAAC,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport Text, { TextType } from '@/components/generic/Text';\n\nimport styles from './Checkbox.module.scss';\n\nexport interface CheckboxProps {\n label: string | JSX.Element;\n checked?: boolean;\n\n onChange?: (checked: React.ChangeEvent<HTMLInputElement>) => void;\n}\n\nexport default React.forwardRef(function Checkbox(props: CheckboxProps, ref: any) {\n const { label, checked, onChange: onCallbackChange, ...restProps } = props;\n\n const setChecked = (checked: React.ChangeEvent<HTMLInputElement>) => {\n if (onCallbackChange) {\n onCallbackChange(checked);\n }\n };\n\n const onChange: React.ChangeEventHandler<HTMLInputElement> = (e) => {\n setChecked(e);\n };\n\n return (\n <div className={styles.checkbox}>\n <label>\n <input ref={ref} checked={props.checked} type=\"checkbox\" {...restProps} onChange={onChange} />\n <span className={styles['fake-checkbox']}>\n <Icon icon={IconType.Check} />\n </span>\n <Text type={TextType.Small} inline>\n {props.label}\n </Text>\n </label>\n </div>\n );\n});\n"]}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { TextBoxProps } from '../TextBox';
|
|
3
3
|
import { Option, SelectProps } from './Select';
|
|
4
|
-
type IInputSelectProps<TOption extends Option<KeyName>, KeyName extends string> = Pick<SelectProps<TOption, KeyName>, 'value' | 'onChange' | 'keyName' | 'labelName'> & Pick<TextBoxProps, 'label' | 'placeholder' | 'required'> & {
|
|
4
|
+
type IInputSelectProps<TOption extends Option<KeyName>, KeyName extends string> = Pick<SelectProps<TOption, KeyName>, 'value' | 'onChange' | 'keyName' | 'labelName'> & Pick<TextBoxProps, 'label' | 'placeholder' | 'required' | 'validationStatus'> & {
|
|
5
5
|
options: TOption[];
|
|
6
6
|
};
|
|
7
|
-
export default function InputSelect<TOption extends Option<KeyName>, KeyName extends string>({ value, onChange, options, keyName, labelName, label, placeholder, required, }: IInputSelectProps<TOption, KeyName>): ReactElement | null;
|
|
7
|
+
export default function InputSelect<TOption extends Option<KeyName>, KeyName extends string>({ value, onChange, options, keyName, labelName, label, placeholder, required, validationStatus, }: IInputSelectProps<TOption, KeyName>): ReactElement | null;
|
|
8
8
|
export {};
|
|
@@ -30,7 +30,7 @@ const react_1 = __importStar(require("react"));
|
|
|
30
30
|
const TextBox_1 = __importDefault(require("../TextBox"));
|
|
31
31
|
const Select_1 = require("./Select");
|
|
32
32
|
const AutoFocusOnSelect_1 = require("../../../hooks/AutoFocusOnSelect");
|
|
33
|
-
function InputSelect({ value, onChange, options, keyName, labelName, label, placeholder, required, }) {
|
|
33
|
+
function InputSelect({ value, onChange, options, keyName, labelName, label, placeholder, required, validationStatus, }) {
|
|
34
34
|
var _a;
|
|
35
35
|
const [container, setContainer] = (0, react_1.useState)(null);
|
|
36
36
|
const innerRef = (0, react_1.useRef)(null);
|
|
@@ -43,7 +43,7 @@ function InputSelect({ value, onChange, options, keyName, labelName, label, plac
|
|
|
43
43
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
44
44
|
react_1.default.createElement(TextBox_1.default, { label: label, inputProps: {
|
|
45
45
|
onClick: onTriggerClicked,
|
|
46
|
-
}, value: ((_a = getOption(value)) === null || _a === void 0 ? void 0 : _a.text) || '', ref: innerRef, placeholder: placeholder, required: required }),
|
|
46
|
+
}, value: ((_a = getOption(value)) === null || _a === void 0 ? void 0 : _a.text) || '', ref: innerRef, placeholder: placeholder, required: required, validationStatus: validationStatus }),
|
|
47
47
|
react_1.default.createElement("div", { ref: setContainer }),
|
|
48
48
|
react_1.default.createElement(Select_1.Select, { keyName: keyName, labelName: labelName, options: options, target: container, onClose: onDropdownClosed, onChange: (value) => {
|
|
49
49
|
onItemSelected();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InputSelect.js","sourceRoot":"/","sources":["src/components/generic/Select/InputSelect.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,2EAAqE;AACrE,+DAAiF;AACjF,iEAAiE;AAOjE,SAAwB,WAAW,CAA0D,EACzF,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,
|
|
1
|
+
{"version":3,"file":"InputSelect.js","sourceRoot":"/","sources":["src/components/generic/Select/InputSelect.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA8D;AAC9D,2EAAqE;AACrE,+DAAiF;AACjF,iEAAiE;AAOjE,SAAwB,WAAW,CAA0D,EACzF,KAAK,EACL,QAAQ,EACR,OAAO,EACP,OAAO,EACP,SAAS,EACT,KAAK,EACL,WAAW,EACX,QAAQ,EACR,gBAAgB,GACkB;;IAClC,MAAM,CAAC,SAAS,EAAE,YAAY,CAAC,GAAG,IAAA,gBAAQ,EAAwB,IAAI,CAAC,CAAC;IACxE,MAAM,QAAQ,GAAG,IAAA,cAAM,EAAmB,IAAI,CAAC,CAAC;IAEhD,MAAM,SAAS,GAAG,CAAC,GAAsB,EAAuB,EAAE;QAC9D,OAAO,OAAO,CAAC,IAAI,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,KAAK,GAAG,CAAC,CAAC;IAC7D,CAAC,CAAC;IAEF,MAAM,EAAE,gBAAgB,EAAE,cAAc,EAAE,gBAAgB,EAAE,cAAc,EAAE,GAAG,IAAA,wCAAoB,EAAC;QAChG,GAAG,EAAE,QAAQ,CAAC,OAAO;KACxB,CAAC,CAAC;IAEH,OAAO,CACH;QACI,8BAAC,iBAAO,IACJ,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE;gBACR,OAAO,EAAE,gBAAgB;aAC5B,EACD,KAAK,EAAE,CAAA,MAAA,SAAS,CAAC,KAAK,CAAC,0CAAE,IAAI,KAAI,EAAE,EACnC,GAAG,EAAE,QAAQ,EACb,WAAW,EAAE,WAAW,EACxB,QAAQ,EAAE,QAAQ,EAClB,gBAAgB,EAAE,gBAAgB,GACpC;QACF,uCAAK,GAAG,EAAE,YAAY,GAAI;QAC1B,8BAAC,eAAM,IACH,OAAO,EAAE,OAAO,EAChB,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,SAAS,EACjB,OAAO,EAAE,gBAAgB,EACzB,QAAQ,EAAE,CAAC,KAAK,EAAE,EAAE;gBAChB,cAAc,EAAE,CAAC;gBACjB,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAG,KAAK,CAAC,CAAC;YACtB,CAAC,EACD,IAAI,EAAE,cAAc,EACpB,OAAO,EAAE;gBACL,SAAS,EAAE,OAAO;aACrB,GACH,CACH,CACN,CAAC;AACN,CAAC;AArDD,8BAqDC","sourcesContent":["import React, { ReactElement, useRef, useState } from 'react';\nimport TextBox, { TextBoxProps } from '@/components/generic/TextBox';\nimport { Option, Select, SelectProps } from '@/components/generic/Select/Select';\nimport { useAutoFocusOnSelect } from '@/hooks/AutoFocusOnSelect';\n\ntype IInputSelectProps<TOption extends Option<KeyName>, KeyName extends string> = Pick<SelectProps<TOption, KeyName>, 'value' | 'onChange' | 'keyName' | 'labelName'> &\n Pick<TextBoxProps, 'label' | 'placeholder' | 'required' | 'validationStatus'> & {\n options: TOption[];\n };\n\nexport default function InputSelect<TOption extends Option<KeyName>, KeyName extends string>({\n value,\n onChange,\n options,\n keyName,\n labelName,\n label,\n placeholder,\n required,\n validationStatus,\n}: IInputSelectProps<TOption, KeyName>): ReactElement | null {\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const innerRef = useRef<HTMLInputElement>(null);\n\n const getOption = (key?: TOption[KeyName]): TOption | undefined => {\n return options.find((option) => option[keyName] === key);\n };\n\n const { onDropdownClosed, onItemSelected, onTriggerClicked, isDropdownOpen } = useAutoFocusOnSelect({\n ref: innerRef.current,\n });\n\n return (\n <>\n <TextBox\n label={label}\n inputProps={{\n onClick: onTriggerClicked,\n }}\n value={getOption(value)?.text || ''}\n ref={innerRef}\n placeholder={placeholder}\n required={required}\n validationStatus={validationStatus}\n />\n <div ref={setContainer} />\n <Select<TOption, KeyName>\n keyName={keyName}\n labelName={labelName}\n options={options}\n target={container}\n onClose={onDropdownClosed}\n onChange={(value) => {\n onItemSelected();\n onChange?.(value);\n }}\n open={isDropdownOpen}\n overlay={{\n className: 'w-100',\n }}\n />\n </>\n );\n}\n"]}
|
|
@@ -24,5 +24,5 @@ export interface TextProps extends PropsWithChildren<any> {
|
|
|
24
24
|
style?: React.CSSProperties;
|
|
25
25
|
lineThrough?: boolean;
|
|
26
26
|
}
|
|
27
|
-
export declare
|
|
27
|
+
export declare const Text: React.ForwardRefExoticComponent<Pick<TextProps, keyof TextProps> & React.RefAttributes<HTMLParagraphElement>>;
|
|
28
28
|
export default Text;
|
|
@@ -1,10 +1,33 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
2
25
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
26
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
27
|
};
|
|
5
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
29
|
exports.Text = exports.TextTransform = exports.TextType = void 0;
|
|
7
|
-
const react_1 =
|
|
30
|
+
const react_1 = __importStar(require("react"));
|
|
8
31
|
const classnames_1 = __importDefault(require("classnames"));
|
|
9
32
|
var TextType;
|
|
10
33
|
(function (TextType) {
|
|
@@ -18,7 +41,7 @@ var TextTransform;
|
|
|
18
41
|
(function (TextTransform) {
|
|
19
42
|
TextTransform["Uppercase"] = "u-uppercase";
|
|
20
43
|
})(TextTransform = exports.TextTransform || (exports.TextTransform = {}));
|
|
21
|
-
function Text(props) {
|
|
44
|
+
exports.Text = (0, react_1.forwardRef)(function Text(props, ref) {
|
|
22
45
|
const defaultProps = Object.assign({ type: TextType.Body }, props);
|
|
23
46
|
const transformClasses = {};
|
|
24
47
|
if (props.transforms) {
|
|
@@ -33,8 +56,7 @@ function Text(props) {
|
|
|
33
56
|
if (defaultProps.color) {
|
|
34
57
|
styles.color = defaultProps.color;
|
|
35
58
|
}
|
|
36
|
-
return (react_1.default.createElement("p", { className: classes, style: styles }, props.children));
|
|
37
|
-
}
|
|
38
|
-
exports.
|
|
39
|
-
exports.default = Text;
|
|
59
|
+
return (react_1.default.createElement("p", { className: classes, style: styles, ref: ref }, props.children));
|
|
60
|
+
});
|
|
61
|
+
exports.default = exports.Text;
|
|
40
62
|
//# sourceMappingURL=Text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Text.js","sourceRoot":"/","sources":["src/components/generic/Text.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Text.js","sourceRoot":"/","sources":["src/components/generic/Text.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,+CAA0C;AAE1C,4DAAoC;AAGpC,IAAY,QAKX;AALD,WAAY,QAAQ;IAChB,yBAAa,CAAA;IACb,2BAAe,CAAA;IACf,+BAAmB,CAAA;IACnB,2BAAe,CAAA;AACnB,CAAC,EALW,QAAQ,GAAR,gBAAQ,KAAR,gBAAQ,QAKnB;AAED,yCAAyC;AACzC,IAAY,aAEX;AAFD,WAAY,aAAa;IACrB,0CAAyB,CAAA;AAC7B,CAAC,EAFW,aAAa,GAAb,qBAAa,KAAb,qBAAa,QAExB;AAgBY,QAAA,IAAI,GAAG,IAAA,kBAAU,EAAkC,SAAS,IAAI,CAAC,KAAK,EAAE,GAAG;IACpF,MAAM,YAAY,mBACd,IAAI,EAAE,QAAQ,CAAC,IAAI,IAChB,KAAK,CACX,CAAC;IAEF,MAAM,gBAAgB,GAAQ,EAAE,CAAC;IAEjC,IAAI,KAAK,CAAC,UAAU,EAAE;QAClB,KAAK,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,CAAC,gBAAgB,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;KACjF;IAED,MAAM,YAAY,GAAQ,EAAE,CAAC;IAE7B,IAAI,KAAK,CAAC,SAAS,EAAE;QACjB,KAAK,CAAC,SAAS,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,YAAY,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;KACzE;IAED,MAAM,OAAO,GAAG,IAAA,oBAAU,EAAC,KAAK,CAAC,KAAK,gCAClC,CAAC,QAAQ,YAAY,CAAC,IAAI,EAAE,CAAC,EAAE,YAAY,CAAC,IAAI,EAChD,eAAe,EAAE,KAAK,CAAC,MAAM,EAC7B,aAAa,EAAE,KAAK,CAAC,IAAI,EACzB,YAAY,EAAE,KAAK,CAAC,YAAY,EAChC,gBAAgB,EAAE,KAAK,CAAC,WAAW,IAChC,YAAY,GACZ,gBAAgB,EACrB,CAAC;IAEH,MAAM,MAAM,qBACL,CAAC,YAAY,CAAC,KAAK,IAAI,EAAE,CAAC,CAChC,CAAC;IAEF,IAAI,YAAY,CAAC,KAAK,EAAE;QACpB,MAAM,CAAC,KAAK,GAAG,YAAY,CAAC,KAAK,CAAC;KACrC;IAED,OAAO,CACH,qCAAG,SAAS,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,IACzC,KAAK,CAAC,QAAQ,CACf,CACP,CAAC;AACN,CAAC,CAAC,CAAC;AAEH,kBAAe,YAAI,CAAC","sourcesContent":["import { Color } from '@/util/Color';\nimport { TextAlign } from '@/util/TextAlignment';\nimport React, { forwardRef } from 'react';\n\nimport classNames from 'classnames';\nimport { PropsWithChildren } from 'react';\n\nexport enum TextType {\n Body = 'body',\n Small = 'small',\n Caption = 'caption',\n Label = 'label',\n}\n\n// Refactor to globalize for Headings too\nexport enum TextTransform {\n Uppercase = 'u-uppercase',\n}\n\nexport interface TextProps extends PropsWithChildren<any> {\n [x: string]: React.ReactNode;\n type?: TextType;\n color?: Color;\n align?: TextAlign;\n transforms?: TextTransform[];\n className?: string;\n inline?: boolean;\n bold?: boolean;\n preformatted?: boolean;\n style?: React.CSSProperties;\n lineThrough?: boolean;\n}\n\nexport const Text = forwardRef<HTMLParagraphElement, TextProps>(function Text(props, ref) {\n const defaultProps: TextProps = {\n type: TextType.Body,\n ...props,\n };\n\n const transformClasses: any = {};\n\n if (props.transforms) {\n props.transforms.forEach((transform) => (transformClasses[transform] = true));\n }\n\n const extraClasses: any = {};\n\n if (props.className) {\n props.className.split(' ').forEach((it) => (extraClasses[it] = true));\n }\n\n const classes = classNames(props.align, {\n [`text-${defaultProps.type}`]: defaultProps.type,\n 'u-inline-flex': props.inline,\n 'u-text-bold': props.bold,\n 'u-pre-wrap': props.preformatted,\n 'u-line-through': props.lineThrough,\n ...extraClasses,\n ...transformClasses,\n });\n\n const styles: any = {\n ...(defaultProps.style || {}),\n };\n\n if (defaultProps.color) {\n styles.color = defaultProps.color;\n }\n\n return (\n <p className={classes} style={styles} ref={ref}>\n {props.children}\n </p>\n );\n});\n\nexport default Text;\n"]}
|
|
@@ -2,6 +2,7 @@ import React, { ReactNode } from 'react';
|
|
|
2
2
|
export type TextAreaProps = JSX.IntrinsicElements['textarea'] & {
|
|
3
3
|
label?: ReactNode;
|
|
4
4
|
required?: boolean;
|
|
5
|
+
validationStatus?: 'error' | 'success';
|
|
5
6
|
};
|
|
6
|
-
declare const _default: React.ForwardRefExoticComponent<Pick<TextAreaProps, "label" | "key" | keyof React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
7
|
+
declare const _default: React.ForwardRefExoticComponent<Pick<TextAreaProps, "label" | "key" | keyof React.TextareaHTMLAttributes<HTMLTextAreaElement> | "validationStatus"> & React.RefAttributes<HTMLTextAreaElement>>;
|
|
7
8
|
export default _default;
|
|
@@ -22,14 +22,22 @@ var __importStar = (this && this.__importStar) || function (mod) {
|
|
|
22
22
|
__setModuleDefault(result, mod);
|
|
23
23
|
return result;
|
|
24
24
|
};
|
|
25
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
26
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
27
|
+
};
|
|
25
28
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
29
|
const react_1 = __importStar(require("react"));
|
|
30
|
+
const classnames_1 = __importDefault(require("classnames"));
|
|
27
31
|
const TextArea = (props, ref) => {
|
|
28
32
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
29
33
|
props.label && (react_1.default.createElement("label", { className: "u-marg-bottom--lighter text-bold d-flex" },
|
|
30
34
|
props.label,
|
|
31
35
|
(props === null || props === void 0 ? void 0 : props.required) && react_1.default.createElement("div", { style: { color: 'red' } }, "*"))),
|
|
32
|
-
react_1.default.createElement("textarea", Object.assign({}, props, {
|
|
36
|
+
react_1.default.createElement("textarea", Object.assign({}, props, { className: (0, classnames_1.default)('textbox c-input', {
|
|
37
|
+
'--success': props.validationStatus === 'success',
|
|
38
|
+
'--error': props.validationStatus === 'error',
|
|
39
|
+
'--disabled': props.disabled,
|
|
40
|
+
}, props.className), ref: ref }))));
|
|
33
41
|
};
|
|
34
42
|
exports.default = (0, react_1.forwardRef)(TextArea);
|
|
35
43
|
//# sourceMappingURL=TextArea.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"TextArea.js","sourceRoot":"/","sources":["src/components/generic/TextArea.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"TextArea.js","sourceRoot":"/","sources":["src/components/generic/TextArea.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA+E;AAC/E,4DAAoC;AAQpC,MAAM,QAAQ,GAAiE,CAAC,KAAK,EAAE,GAAG,EAAE,EAAE;IAC1F,OAAO,CACH;QACK,KAAK,CAAC,KAAK,IAAI,CACZ,yCAAO,SAAS,EAAC,yCAAyC;YACrD,KAAK,CAAC,KAAK;YACX,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,QAAQ,KAAI,uCAAK,KAAK,EAAE,EAAE,KAAK,EAAE,KAAK,EAAE,QAAS,CACrD,CACX;QACD,4DACQ,KAAK,IACT,SAAS,EAAE,IAAA,oBAAU,EACjB,iBAAiB,EACjB;gBACI,WAAW,EAAE,KAAK,CAAC,gBAAgB,KAAK,SAAS;gBACjD,SAAS,EAAE,KAAK,CAAC,gBAAgB,KAAK,OAAO;gBAC7C,YAAY,EAAE,KAAK,CAAC,QAAQ;aAC/B,EACD,KAAK,CAAC,SAAS,CAClB,EACD,GAAG,EAAE,GAAG,IACV,CACH,CACN,CAAC;AACN,CAAC,CAAC;AAEF,kBAAe,IAAA,kBAAU,EAAC,QAAQ,CAAC,CAAC","sourcesContent":["import React, { forwardRef, ForwardRefRenderFunction, ReactNode } from 'react';\nimport classNames from 'classnames';\n\nexport type TextAreaProps = JSX.IntrinsicElements['textarea'] & {\n label?: ReactNode;\n required?: boolean;\n validationStatus?: 'error' | 'success';\n};\n\nconst TextArea: ForwardRefRenderFunction<HTMLTextAreaElement, TextAreaProps> = (props, ref) => {\n return (\n <>\n {props.label && (\n <label className=\"u-marg-bottom--lighter text-bold d-flex\">\n {props.label}\n {props?.required && <div style={{ color: 'red' }}>*</div>}\n </label>\n )}\n <textarea\n {...props}\n className={classNames(\n 'textbox c-input',\n {\n '--success': props.validationStatus === 'success',\n '--error': props.validationStatus === 'error',\n '--disabled': props.disabled,\n },\n props.className\n )}\n ref={ref}\n />\n </>\n );\n};\n\nexport default forwardRef(TextArea);\n"]}
|
|
@@ -159,11 +159,11 @@ function StepConfirmationForm() {
|
|
|
159
159
|
var _a;
|
|
160
160
|
return !ConfirmationVerifyFeature_1.default.isActive() || !!((_a = confirmationPolicy === null || confirmationPolicy === void 0 ? void 0 : confirmationPolicy.current) === null || _a === void 0 ? void 0 : _a.checked);
|
|
161
161
|
};
|
|
162
|
-
const validateCustomFields = () => {
|
|
163
|
-
const adhocValid = formContext === null || formContext === void 0 ? void 0 : formContext.errorChecks.every((check) => check().validate());
|
|
162
|
+
const validateCustomFields = (scrollToInput) => {
|
|
163
|
+
const adhocValid = formContext === null || formContext === void 0 ? void 0 : formContext.errorChecks.every((check) => check().validate(scrollToInput));
|
|
164
164
|
return adhocValid === undefined ? true : adhocValid;
|
|
165
165
|
};
|
|
166
|
-
const isDisabledPlanpay = !validateConfirmationPolicy() || !validateCustomFields() || !methods.formState.isValid;
|
|
166
|
+
const isDisabledPlanpay = !validateConfirmationPolicy() || !validateCustomFields(false) || !methods.formState.isValid;
|
|
167
167
|
const handleBook = (paymentMethod, onSuccess) => __awaiter(this, void 0, void 0, function* () {
|
|
168
168
|
var _b;
|
|
169
169
|
yield (book === null || book === void 0 ? void 0 : book(() => __awaiter(this, void 0, void 0, function* () { return toPaymentPayload(paymentMethod); }), (_b = commentTextbox.current) === null || _b === void 0 ? void 0 : _b.value, () => __awaiter(this, void 0, void 0, function* () {
|
|
@@ -171,7 +171,7 @@ function StepConfirmationForm() {
|
|
|
171
171
|
setConfirmationPolicyError(true);
|
|
172
172
|
return false;
|
|
173
173
|
}
|
|
174
|
-
if (!validateCustomFields()) {
|
|
174
|
+
if (!validateCustomFields(true)) {
|
|
175
175
|
return false;
|
|
176
176
|
}
|
|
177
177
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StepConfirmationForm.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuE;AACvE,6EAAqD;AACrD,0DAAuD;AACvD,kEAA2D;AAC3D,wCAAqC;AACrC,qDAA6D;AAC7D,4GAAoF;AACpF,+EAAuD;AACvD,sIAA8G;AAC9G,iGAAyE;AACzE,iDAA+C;AAC/C,iDAA0F;AAC1F,uEAAgE;AAChE,iGAAyE;AACzE,wJAAgI;AAChI,uDAA8C;AAC9C,uFAA+D;AAC/D,8HAAsG;AAEtG,sIAA8G;AAC9G,6EAAqD;AACrD,oEAA8D;AAC9D,uGAA+E;AAC/E,+EAAuD;AACvD,8GAAsF;AACtF,2EAAmD;AACnD,0HAAkG;AAClG,iEAA8D;AAE9D,sGAA+F;AAC/F,iEAAiE;AAEjE,0FAAkE;AAClE,qHAA6F;AAC7F,yCAAwE;AACxE,8GAAsF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CAAK,SAAS,EAAC,8CAA8C;gBACzD,8BAAC,wBAAc,IACX,QAAQ,EAAE,aAAa,KAAK,4BAAqB,CAAC,OAAO,IAAI,SAAS,EACtE,IAAI,EAAE,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,YAAY,CAAC,kBAAkB,CAAC,EACzD,OAAO,EAAE,IAAI,EACb,SAAS,EAAE,SAAS,EACpB,WAAW,EAAE,0BAAgB,EAC7B,OAAO,EAAE,iBAAiB,GAC5B,CACA,CACP,CACN;QAED,8BAAC,oBAAU,IAAC,IAAI,EAAE,CAAC,CAAC,SAAS,EAAE,OAAO,EAAE,cAAc;YAClD,8BAAC,cAAI,QAAE,SAAS,CAAQ,CACf;QACb,8BAAC,kDAAwC,IACrC,WAAW,EAAE,iBAAiB,CAAC,WAAW,EAC1C,QAAQ,EAAE,iBAAiB,CAAC,QAAQ,EACpC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAS,EAAE;gBAChB,MAAM,CAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAA,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC,kBAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACxC,CAAC,CAAA,EACD,SAAS,EAAE,GAAS,EAAE;gBAClB,IAAI,aAAa,KAAK,4BAAqB,CAAC,OAAO,EAAE;oBACjD,oBAAoB,CAAC;wBACjB,WAAW,EAAE,EAAE;wBACf,QAAQ,EAAE,EAAE;qBACf,CAAC,CAAC;iBACN;qBAAM;oBACH,MAAM,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAG,aAAa,CAAC,eAAe,CAAC,CAAA,CAAC;iBAC5D;YACL,CAAC,CAAA,GACH,CACC,CACV,CAAC;AACN,CAAC;AAtVD,uCAsVC","sourcesContent":["import React, { useContext, useEffect, useRef, useState } from 'react';\nimport Headline from '@/components/generic/Headline';\nimport { Translation } from 'translations/Translation';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { Color } from '@/util/Color';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport RoomContactDetails from '@/components/steps/confirmation/RoomContactDetails';\nimport LineBreak from '@/components/generic/LineBreak';\nimport StepConfirmationPoliciesSection from '@/components/steps/confirmation/StepConfirmationPoliciesSection';\nimport NextStepButton from '@/components/generic/buttons/NextStepButton';\nimport { useTranslation } from 'react-i18next';\nimport { ConfirmationFormContext, useBasket, useBookingEngine } from '@frontend/contexts';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport SSLSecureBadge from '@/components/generic/badging/SSLSecureBadge';\nimport StepConfirmationCheckoutDifferencesModal from '@/components/steps/confirmation/StepConfirmationCheckoutDifferencesModal';\nimport { useHistory } from 'react-router-dom';\nimport ErrorModal from '@/components/generic/modal/ErrorModal';\nimport StepConfirmationPolicyBlock from '@/components/steps/confirmation/StepConfirmationPolicyBlock';\n\nimport StepConfirmationAcknowledgement from '@/components/steps/confirmation/StepConfirmationAcknowledgement';\nimport BEButton from '@/components/generic/BEButton';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport StepConfirmation from '@/pages/steps/StepConfirmation/StepConfirmation';\nimport StepRoom from '@/pages/steps/StepRoom/StepRoom';\nimport ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport TextBox from '@/components/generic/TextBox';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\nimport { PlanpayPaymentMethod } from './PlanpayPaymentMethod';\nimport { ConfirmationFormValues, FBookSuccessCallback } from '@/models/Confirmation';\nimport { useConfirmationStep } from 'contexts/ConfirmationStepContext/ConfirmationStepContext';\nimport { useConfirmationQuery } from '@/hooks/ConfirmationQuery';\nimport BasketRowDifferences from '../../../models/BasketRowDifferences';\nimport LargeLoader from '@/components/generic/loader/LargeLoader';\nimport StepConfirmationPaymentDetails from './PaymentDetails/StepConfirmationPaymentDetails';\nimport { EBookingPaymentMethod, IBookingPayment } from '@roomstay/core';\nimport RadioButtonGroup from '@/components/generic/RadioButtonGroup/RadioButtonGroup';\nimport AcceptablePaymentCard from '@/components/steps/confirmation/PaymentDetails/AcceptablePaymentCard';\nimport RoomstayThemeEngine from '@/providers/RoomstayThemeEngine';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport dayjs from 'dayjs';\nimport { StepConfirmationCommentsComponent } from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\n\nexport default function StepConfirmationForm() {\n const [differenceWarning, setDifferenceWarning] = useState<{\n differences: BasketRowDifferences[];\n warnings: string[];\n }>({\n differences: [],\n warnings: [],\n });\n const formContext = useContext(ConfirmationFormContext);\n const [source, setSource] = useState('');\n const [confirmationPolicyError, setConfirmationPolicyError] = useState(false);\n const confirmationPolicy = useRef<HTMLInputElement | null>(null);\n const commentTextbox = useRef<HTMLInputElement | HTMLTextAreaElement | null>(null);\n const { t } = useTranslation();\n const { queryPaymentMethod, queryRoomstayId, queryPlanpayCheckoutId } = useConfirmationQuery();\n const context = useBookingEngine();\n const methods = useFormContext<ConfirmationFormValues>();\n const { isBackFromPlanpay, isLoading, apiErrors, clearApiErrors, book, rollbackReservation, commitReservation } = useConfirmationStep();\n const basketContext = useBasket();\n const tokenizerRef = useRef<any | null>(null);\n const history = useHistory();\n const { hotel } = useCurrentHotel();\n\n const toPaymentPayload = async (paymentMethod: EBookingPaymentMethod): Promise<IBookingPayment> => {\n let payment: IBookingPayment;\n switch (paymentMethod) {\n case EBookingPaymentMethod.Planpay: {\n const params = new URLSearchParams(window.location.search);\n params.set('roomstayId', '{{rsId}}');\n params.set('session', context.sessionProvider.getCurrentSessionID().toString());\n params.set('paymentMethod', EBookingPaymentMethod.Planpay);\n const redirectURL = `${window.location.origin}${window.location.pathname}${window.location.search}#/step/confirmation/?${params}`;\n payment = {\n Method: EBookingPaymentMethod.Planpay,\n PlanpayCheckoutId: queryPlanpayCheckoutId || undefined,\n RedirectUrl: redirectURL,\n };\n break;\n }\n default:\n payment = {\n Method: EBookingPaymentMethod.Card,\n PaymentCard: await tokenizerRef.current?.getTokenizedCode(),\n };\n }\n\n return payment;\n };\n\n useEffect(() => {\n const validatedPaymentMethod = Object.values(EBookingPaymentMethod).includes(queryPaymentMethod as EBookingPaymentMethod)\n ? (queryPaymentMethod as EBookingPaymentMethod)\n : EBookingPaymentMethod.Card;\n methods.setValue('paymentMethod', validatedPaymentMethod);\n handleChangePaymentMethod(validatedPaymentMethod);\n if (isBackFromPlanpay) {\n if (queryRoomstayId === basketContext.reservationData?.roomstayId) {\n onPlaypayCallback(validatedPaymentMethod);\n } else {\n rollbackReservation?.();\n }\n }\n return () => {\n if (!isBackFromPlanpay) rollbackReservation?.();\n };\n }, []);\n\n const onPlaypayCallback = async (paymentMethod: EBookingPaymentMethod) => {\n await commitReservation?.(basketContext.reservationData);\n };\n\n const paymentMethod = methods.watch('paymentMethod');\n\n context.engine\n .getSessionProvider()\n .getSession()\n .then((session) => {\n setSource(session.source);\n });\n\n const returnToPickRooms = async () => {\n // TODO: What if StepRoom doesn't exist?\n history.push(StepRoom.getStepUrl());\n };\n\n const onNextStepClicked = async () => {\n await handleBook(paymentMethod, async (resData) => commitReservation?.(resData));\n return false;\n };\n\n const validateConfirmationPolicy = (): boolean => {\n return !ConfirmationVerifyFeature.isActive() || !!confirmationPolicy?.current?.checked;\n };\n\n const validateCustomFields = (): boolean => {\n const adhocValid = formContext?.errorChecks.every((check) => check().validate());\n return adhocValid === undefined ? true : adhocValid;\n };\n\n const isDisabledPlanpay = !validateConfirmationPolicy() || !validateCustomFields() || !methods.formState.isValid;\n\n const handleBook = async (paymentMethod: EBookingPaymentMethod, onSuccess?: FBookSuccessCallback): Promise<void> => {\n await book?.(\n async () => toPaymentPayload(paymentMethod),\n commentTextbox.current?.value,\n async (): Promise<boolean> => {\n if (!validateConfirmationPolicy()) {\n setConfirmationPolicyError(true);\n return false;\n }\n if (!validateCustomFields()) {\n return false;\n }\n try {\n if (paymentMethod === EBookingPaymentMethod.Card) await tokenizerRef.current.getTokenizedCode();\n return true;\n } catch (e) {\n return false;\n }\n },\n (validationResult) => {\n if (validationResult) {\n setDifferenceWarning(validationResult);\n }\n },\n onSuccess\n );\n };\n\n const handleChangePaymentMethod = async (paymentMethod: EBookingPaymentMethod) => {\n if (paymentMethod !== EBookingPaymentMethod.Planpay) {\n await rollbackReservation?.();\n }\n };\n\n return (\n <form>\n {isBackFromPlanpay ? (\n <LargeLoader />\n ) : (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--light\">\n <Headline bold>{t(Translation.Step.Confirmation.GuestDetails)}</Headline>\n </div>\n <Text type={TextType.Small} color={Color.Success}>\n <strong>{t(Translation.Step.Confirmation.AlmostDone, { required: '*' })}</strong>\n </Text>\n </div>\n <RoomContactDetails />\n {source === 'inline' ? (\n <Alert type={AlertType.Accent2} heavyPadding>\n <div className=\"u-flex u-w-100 flex-wrap flex-xl-nowrap\">\n <div>\n <Text color={Color.Accent} bold>\n {t(Translation.Step.Confirmation.WantMoreRooms)}\n </Text>\n <Text color={Color.Navy}>{t(Translation.Step.Confirmation.YouCanAddAndEditRooms)}</Text>\n </div>\n <div className=\"d-flex align-items-center u-marg-top@xl-\">\n <BEButton filled primary icon={IconType.Add} iconPosition=\"left\" onClick={returnToPickRooms}>\n {t(Translation.Step.Confirmation.AddMoreRooms)}\n </BEButton>\n </div>\n </div>\n </Alert>\n ) : (\n <></>\n )}\n {ShowIATANumberOnCheckoutFeature.isActive() && (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>Travel Agent</Headline>\n </div>\n\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Inputs.IATANumber)}</strong>\n </Text>\n </div>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>{t(Translation.Step.Confirmation.Inputs.IATANumberGuide)}</Text>\n </div>\n <TextBox placeholder={t(Translation.Step.Confirmation.Inputs.IATANumber)} wide {...methods.register('IATANumber')} />\n </div>\n <LineBreak />\n </>\n )}\n <StepConfirmationCommentsComponent inputRef={commentTextbox} />\n <LineBreak />\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>{t(Translation.Step.Confirmation.PaymentInformation)}</Headline>\n </div>\n <Controller\n control={methods.control}\n name=\"paymentMethod\"\n render={({ field: { onChange, value } }) => {\n return (\n <>\n <div>\n <RadioButtonGroup<EBookingPaymentMethod>\n options={[\n {\n value: EBookingPaymentMethod.Card,\n label: (\n <div className=\"u-flex u-flex-align-center\">\n <div className=\"u-marg-right--light\">{t(Translation.Step.Confirmation.CardLabel)}</div>\n <AcceptablePaymentCard\n isDefault={(cardKey: any) => {\n return true;\n }}\n style={{\n height: 16,\n width: 24,\n borderRadius: 2.5,\n border: '0.5px solid #DFE1E5',\n marginRight: 4,\n }}\n />\n </div>\n ),\n renderContent: () => <StepConfirmationPaymentDetails ref={tokenizerRef} />,\n },\n {\n value: EBookingPaymentMethod.Planpay,\n label: (\n <div className=\"u-flex u-flex-align-center\">\n <div>{t(Translation.Step.Confirmation.PlanpayLabel)}</div>\n <div\n className=\"u-flex u-flex-align-center u-marg-left--light\"\n style={{\n borderRadius: '24px',\n overflow: 'hidden',\n }}\n >\n <img height={16} src={RoomstayThemeEngine.getImageAssetUrl('planpay-logo-small.svg')} alt=\"\" />\n </div>\n {!methods.formState.isValid && (\n <Text\n color={Color.Graphite}\n className=\"u-flex u-flex-align-center\"\n style={{\n color: '#313131',\n fontSize: 10,\n }}\n >\n <Icon color={Color.DarkGrey} icon={IconType.Info} className=\"u-marg-right--lighter u-marg-left--light\" />\n {t(Translation.Step.Confirmation.PlanpayHelperText)}\n </Text>\n )}\n </div>\n ),\n disabled: isDisabledPlanpay,\n disabledReason: isDisabledPlanpay ? 'You must fill all the above details before proceeding with Planpay' : '',\n renderContent: () => <PlanpayPaymentMethod />,\n },\n ]\n .filter(({ value }) => hotel?.paymentMethods?.includes(value))\n .filter(\n ({ value }) =>\n value !== EBookingPaymentMethod.Planpay ||\n (hotel?.planpay?.minDaysShowPlanpay &&\n dayjs(basketContext.startDate).diff(dayjs(), 'day') > hotel?.planpay?.minDaysShowPlanpay)\n )}\n value={value}\n onChange={async (code: EBookingPaymentMethod) => {\n onChange(code);\n await handleChangePaymentMethod(code);\n if (code === EBookingPaymentMethod.Planpay) {\n await handleBook(code);\n }\n }}\n />\n </div>\n </>\n );\n }}\n />\n <div className=\"u-marg-top u-flex align-items-center\">\n <div className=\"u-flex align-items-center justify-content-start\">\n <Icon icon={IconType.Lock} color={Color.Success} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small} color={Color.Success}>\n <strong>Secured</strong>\n </Text>\n </div>\n </div>\n <SSLSecureBadge />\n </div>\n </div>\n <LineBreak />\n <StepConfirmationPoliciesSection />\n <div className=\"u-pad-top--light u-marg-bottom\">\n <StepConfirmationPolicyBlock />\n </div>\n {ConfirmationVerifyFeature.isActive() && (\n <>\n <LineBreak />\n <div>\n <StepConfirmationAcknowledgement ref={confirmationPolicy} confirmationPolicyError={confirmationPolicyError} />\n </div>\n </>\n )}\n <div className=\"u-flex u-marg-top--heavy justify-content-end\">\n <NextStepButton\n disabled={paymentMethod === EBookingPaymentMethod.Planpay || isLoading}\n text={t(Translation.Step.Confirmation.ConfirmReservation)}\n history={null}\n isLoading={isLoading}\n currentStep={StepConfirmation}\n onClick={onNextStepClicked}\n />\n </div>\n </>\n )}\n\n <ErrorModal open={!!apiErrors} onClose={clearApiErrors}>\n <Text>{apiErrors}</Text>\n </ErrorModal>\n <StepConfirmationCheckoutDifferencesModal\n differences={differenceWarning.differences}\n warnings={differenceWarning.warnings}\n isLoading={isLoading}\n onClose={async () => {\n await rollbackReservation?.();\n history.push(StepRoom.getStepUrl());\n }}\n onProceed={async () => {\n if (paymentMethod === EBookingPaymentMethod.Planpay) {\n setDifferenceWarning({\n differences: [],\n warnings: [],\n });\n } else {\n await commitReservation?.(basketContext.reservationData);\n }\n }}\n />\n </form>\n );\n}\n"]}
|
|
1
|
+
{"version":3,"file":"StepConfirmationForm.js","sourceRoot":"/","sources":["src/components/steps/confirmation/StepConfirmationForm.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAuE;AACvE,6EAAqD;AACrD,0DAAuD;AACvD,kEAA2D;AAC3D,wCAAqC;AACrC,qDAA6D;AAC7D,4GAAoF;AACpF,+EAAuD;AACvD,sIAA8G;AAC9G,iGAAyE;AACzE,iDAA+C;AAC/C,iDAA0F;AAC1F,uEAAgE;AAChE,iGAAyE;AACzE,wJAAgI;AAChI,uDAA8C;AAC9C,uFAA+D;AAC/D,8HAAsG;AAEtG,sIAA8G;AAC9G,6EAAqD;AACrD,oEAA8D;AAC9D,uGAA+E;AAC/E,+EAAuD;AACvD,8GAAsF;AACtF,2EAAmD;AACnD,0HAAkG;AAClG,iEAA8D;AAE9D,sGAA+F;AAC/F,iEAAiE;AAEjE,0FAAkE;AAClE,qHAA6F;AAC7F,yCAAwE;AACxE,8GAAsF;AACtF,iIAAyG;AACzG,0FAAkE;AAClE,2CAAkD;AAClD,kDAA0B;AAC1B,yHAAsH;AAEtH,SAAwB,oBAAoB;IACxC,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CAAC,GAAG,IAAA,gBAAQ,EAGvD;QACC,WAAW,EAAE,EAAE;QACf,QAAQ,EAAE,EAAE;KACf,CAAC,CAAC;IACH,MAAM,WAAW,GAAG,IAAA,kBAAU,EAAC,kCAAuB,CAAC,CAAC;IACxD,MAAM,CAAC,MAAM,EAAE,SAAS,CAAC,GAAG,IAAA,gBAAQ,EAAC,EAAE,CAAC,CAAC;IACzC,MAAM,CAAC,uBAAuB,EAAE,0BAA0B,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IAC9E,MAAM,kBAAkB,GAAG,IAAA,cAAM,EAA0B,IAAI,CAAC,CAAC;IACjE,MAAM,cAAc,GAAG,IAAA,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BAAiB,CAAC,QAAQ,EACpC,SAAS,EAAE,SAAS,EACpB,OAAO,EAAE,GAAS,EAAE;gBAChB,MAAM,CAAA,mBAAmB,aAAnB,mBAAmB,uBAAnB,mBAAmB,EAAI,CAAA,CAAC;gBAC9B,OAAO,CAAC,IAAI,CAAC,kBAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;YACxC,CAAC,CAAA,EACD,SAAS,EAAE,GAAS,EAAE;gBAClB,IAAI,aAAa,KAAK,4BAAqB,CAAC,OAAO,EAAE;oBACjD,oBAAoB,CAAC;wBACjB,WAAW,EAAE,EAAE;wBACf,QAAQ,EAAE,EAAE;qBACf,CAAC,CAAC;iBACN;qBAAM;oBACH,MAAM,CAAA,iBAAiB,aAAjB,iBAAiB,uBAAjB,iBAAiB,CAAG,aAAa,CAAC,eAAe,CAAC,CAAA,CAAC;iBAC5D;YACL,CAAC,CAAA,GACH,CACC,CACV,CAAC;AACN,CAAC;AAtVD,uCAsVC","sourcesContent":["import React, { useContext, useEffect, useRef, useState } from 'react';\nimport Headline from '@/components/generic/Headline';\nimport { Translation } from 'translations/Translation';\nimport Text, { TextType } from '@/components/generic/Text';\nimport { Color } from '@/util/Color';\nimport { Controller, useFormContext } from 'react-hook-form';\nimport RoomContactDetails from '@/components/steps/confirmation/RoomContactDetails';\nimport LineBreak from '@/components/generic/LineBreak';\nimport StepConfirmationPoliciesSection from '@/components/steps/confirmation/StepConfirmationPoliciesSection';\nimport NextStepButton from '@/components/generic/buttons/NextStepButton';\nimport { useTranslation } from 'react-i18next';\nimport { ConfirmationFormContext, useBasket, useBookingEngine } from '@frontend/contexts';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport SSLSecureBadge from '@/components/generic/badging/SSLSecureBadge';\nimport StepConfirmationCheckoutDifferencesModal from '@/components/steps/confirmation/StepConfirmationCheckoutDifferencesModal';\nimport { useHistory } from 'react-router-dom';\nimport ErrorModal from '@/components/generic/modal/ErrorModal';\nimport StepConfirmationPolicyBlock from '@/components/steps/confirmation/StepConfirmationPolicyBlock';\n\nimport StepConfirmationAcknowledgement from '@/components/steps/confirmation/StepConfirmationAcknowledgement';\nimport BEButton from '@/components/generic/BEButton';\nimport Alert, { AlertType } from '@/components/generic/Alert';\nimport StepConfirmation from '@/pages/steps/StepConfirmation/StepConfirmation';\nimport StepRoom from '@/pages/steps/StepRoom/StepRoom';\nimport ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport TextBox from '@/components/generic/TextBox';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\nimport { PlanpayPaymentMethod } from './PlanpayPaymentMethod';\nimport { ConfirmationFormValues, FBookSuccessCallback } from '@/models/Confirmation';\nimport { useConfirmationStep } from 'contexts/ConfirmationStepContext/ConfirmationStepContext';\nimport { useConfirmationQuery } from '@/hooks/ConfirmationQuery';\nimport BasketRowDifferences from '../../../models/BasketRowDifferences';\nimport LargeLoader from '@/components/generic/loader/LargeLoader';\nimport StepConfirmationPaymentDetails from './PaymentDetails/StepConfirmationPaymentDetails';\nimport { EBookingPaymentMethod, IBookingPayment } from '@roomstay/core';\nimport RadioButtonGroup from '@/components/generic/RadioButtonGroup/RadioButtonGroup';\nimport AcceptablePaymentCard from '@/components/steps/confirmation/PaymentDetails/AcceptablePaymentCard';\nimport RoomstayThemeEngine from '@/providers/RoomstayThemeEngine';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport dayjs from 'dayjs';\nimport { StepConfirmationCommentsComponent } from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\n\nexport default function StepConfirmationForm() {\n const [differenceWarning, setDifferenceWarning] = useState<{\n differences: BasketRowDifferences[];\n warnings: string[];\n }>({\n differences: [],\n warnings: [],\n });\n const formContext = useContext(ConfirmationFormContext);\n const [source, setSource] = useState('');\n const [confirmationPolicyError, setConfirmationPolicyError] = useState(false);\n const confirmationPolicy = useRef<HTMLInputElement | null>(null);\n const commentTextbox = useRef<HTMLInputElement | HTMLTextAreaElement | null>(null);\n const { t } = useTranslation();\n const { queryPaymentMethod, queryRoomstayId, queryPlanpayCheckoutId } = useConfirmationQuery();\n const context = useBookingEngine();\n const methods = useFormContext<ConfirmationFormValues>();\n const { isBackFromPlanpay, isLoading, apiErrors, clearApiErrors, book, rollbackReservation, commitReservation } = useConfirmationStep();\n const basketContext = useBasket();\n const tokenizerRef = useRef<any | null>(null);\n const history = useHistory();\n const { hotel } = useCurrentHotel();\n\n const toPaymentPayload = async (paymentMethod: EBookingPaymentMethod): Promise<IBookingPayment> => {\n let payment: IBookingPayment;\n switch (paymentMethod) {\n case EBookingPaymentMethod.Planpay: {\n const params = new URLSearchParams(window.location.search);\n params.set('roomstayId', '{{rsId}}');\n params.set('session', context.sessionProvider.getCurrentSessionID().toString());\n params.set('paymentMethod', EBookingPaymentMethod.Planpay);\n const redirectURL = `${window.location.origin}${window.location.pathname}${window.location.search}#/step/confirmation/?${params}`;\n payment = {\n Method: EBookingPaymentMethod.Planpay,\n PlanpayCheckoutId: queryPlanpayCheckoutId || undefined,\n RedirectUrl: redirectURL,\n };\n break;\n }\n default:\n payment = {\n Method: EBookingPaymentMethod.Card,\n PaymentCard: await tokenizerRef.current?.getTokenizedCode(),\n };\n }\n\n return payment;\n };\n\n useEffect(() => {\n const validatedPaymentMethod = Object.values(EBookingPaymentMethod).includes(queryPaymentMethod as EBookingPaymentMethod)\n ? (queryPaymentMethod as EBookingPaymentMethod)\n : EBookingPaymentMethod.Card;\n methods.setValue('paymentMethod', validatedPaymentMethod);\n handleChangePaymentMethod(validatedPaymentMethod);\n if (isBackFromPlanpay) {\n if (queryRoomstayId === basketContext.reservationData?.roomstayId) {\n onPlaypayCallback(validatedPaymentMethod);\n } else {\n rollbackReservation?.();\n }\n }\n return () => {\n if (!isBackFromPlanpay) rollbackReservation?.();\n };\n }, []);\n\n const onPlaypayCallback = async (paymentMethod: EBookingPaymentMethod) => {\n await commitReservation?.(basketContext.reservationData);\n };\n\n const paymentMethod = methods.watch('paymentMethod');\n\n context.engine\n .getSessionProvider()\n .getSession()\n .then((session) => {\n setSource(session.source);\n });\n\n const returnToPickRooms = async () => {\n // TODO: What if StepRoom doesn't exist?\n history.push(StepRoom.getStepUrl());\n };\n\n const onNextStepClicked = async () => {\n await handleBook(paymentMethod, async (resData) => commitReservation?.(resData));\n return false;\n };\n\n const validateConfirmationPolicy = (): boolean => {\n return !ConfirmationVerifyFeature.isActive() || !!confirmationPolicy?.current?.checked;\n };\n\n const validateCustomFields = (scrollToInput?: boolean): boolean => {\n const adhocValid = formContext?.errorChecks.every((check) => check().validate(scrollToInput));\n return adhocValid === undefined ? true : adhocValid;\n };\n\n const isDisabledPlanpay = !validateConfirmationPolicy() || !validateCustomFields(false) || !methods.formState.isValid;\n\n const handleBook = async (paymentMethod: EBookingPaymentMethod, onSuccess?: FBookSuccessCallback): Promise<void> => {\n await book?.(\n async () => toPaymentPayload(paymentMethod),\n commentTextbox.current?.value,\n async (): Promise<boolean> => {\n if (!validateConfirmationPolicy()) {\n setConfirmationPolicyError(true);\n return false;\n }\n if (!validateCustomFields(true)) {\n return false;\n }\n try {\n if (paymentMethod === EBookingPaymentMethod.Card) await tokenizerRef.current.getTokenizedCode();\n return true;\n } catch (e) {\n return false;\n }\n },\n (validationResult) => {\n if (validationResult) {\n setDifferenceWarning(validationResult);\n }\n },\n onSuccess\n );\n };\n\n const handleChangePaymentMethod = async (paymentMethod: EBookingPaymentMethod) => {\n if (paymentMethod !== EBookingPaymentMethod.Planpay) {\n await rollbackReservation?.();\n }\n };\n\n return (\n <form>\n {isBackFromPlanpay ? (\n <LargeLoader />\n ) : (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom--light\">\n <Headline bold>{t(Translation.Step.Confirmation.GuestDetails)}</Headline>\n </div>\n <Text type={TextType.Small} color={Color.Success}>\n <strong>{t(Translation.Step.Confirmation.AlmostDone, { required: '*' })}</strong>\n </Text>\n </div>\n <RoomContactDetails />\n {source === 'inline' ? (\n <Alert type={AlertType.Accent2} heavyPadding>\n <div className=\"u-flex u-w-100 flex-wrap flex-xl-nowrap\">\n <div>\n <Text color={Color.Accent} bold>\n {t(Translation.Step.Confirmation.WantMoreRooms)}\n </Text>\n <Text color={Color.Navy}>{t(Translation.Step.Confirmation.YouCanAddAndEditRooms)}</Text>\n </div>\n <div className=\"d-flex align-items-center u-marg-top@xl-\">\n <BEButton filled primary icon={IconType.Add} iconPosition=\"left\" onClick={returnToPickRooms}>\n {t(Translation.Step.Confirmation.AddMoreRooms)}\n </BEButton>\n </div>\n </div>\n </Alert>\n ) : (\n <></>\n )}\n {ShowIATANumberOnCheckoutFeature.isActive() && (\n <>\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>Travel Agent</Headline>\n </div>\n\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>\n <strong>{t(Translation.Step.Confirmation.Inputs.IATANumber)}</strong>\n </Text>\n </div>\n <div className=\"u-marg-bottom--light\">\n <Text type={TextType.Small}>{t(Translation.Step.Confirmation.Inputs.IATANumberGuide)}</Text>\n </div>\n <TextBox placeholder={t(Translation.Step.Confirmation.Inputs.IATANumber)} wide {...methods.register('IATANumber')} />\n </div>\n <LineBreak />\n </>\n )}\n <StepConfirmationCommentsComponent inputRef={commentTextbox} />\n <LineBreak />\n <div className=\"u-marg-bottom--heavy\">\n <div className=\"u-marg-bottom\">\n <Headline bold>{t(Translation.Step.Confirmation.PaymentInformation)}</Headline>\n </div>\n <Controller\n control={methods.control}\n name=\"paymentMethod\"\n render={({ field: { onChange, value } }) => {\n return (\n <>\n <div>\n <RadioButtonGroup<EBookingPaymentMethod>\n options={[\n {\n value: EBookingPaymentMethod.Card,\n label: (\n <div className=\"u-flex u-flex-align-center\">\n <div className=\"u-marg-right--light\">{t(Translation.Step.Confirmation.CardLabel)}</div>\n <AcceptablePaymentCard\n isDefault={(cardKey: any) => {\n return true;\n }}\n style={{\n height: 16,\n width: 24,\n borderRadius: 2.5,\n border: '0.5px solid #DFE1E5',\n marginRight: 4,\n }}\n />\n </div>\n ),\n renderContent: () => <StepConfirmationPaymentDetails ref={tokenizerRef} />,\n },\n {\n value: EBookingPaymentMethod.Planpay,\n label: (\n <div className=\"u-flex u-flex-align-center\">\n <div>{t(Translation.Step.Confirmation.PlanpayLabel)}</div>\n <div\n className=\"u-flex u-flex-align-center u-marg-left--light\"\n style={{\n borderRadius: '24px',\n overflow: 'hidden',\n }}\n >\n <img height={16} src={RoomstayThemeEngine.getImageAssetUrl('planpay-logo-small.svg')} alt=\"\" />\n </div>\n {!methods.formState.isValid && (\n <Text\n color={Color.Graphite}\n className=\"u-flex u-flex-align-center\"\n style={{\n color: '#313131',\n fontSize: 10,\n }}\n >\n <Icon color={Color.DarkGrey} icon={IconType.Info} className=\"u-marg-right--lighter u-marg-left--light\" />\n {t(Translation.Step.Confirmation.PlanpayHelperText)}\n </Text>\n )}\n </div>\n ),\n disabled: isDisabledPlanpay,\n disabledReason: isDisabledPlanpay ? 'You must fill all the above details before proceeding with Planpay' : '',\n renderContent: () => <PlanpayPaymentMethod />,\n },\n ]\n .filter(({ value }) => hotel?.paymentMethods?.includes(value))\n .filter(\n ({ value }) =>\n value !== EBookingPaymentMethod.Planpay ||\n (hotel?.planpay?.minDaysShowPlanpay &&\n dayjs(basketContext.startDate).diff(dayjs(), 'day') > hotel?.planpay?.minDaysShowPlanpay)\n )}\n value={value}\n onChange={async (code: EBookingPaymentMethod) => {\n onChange(code);\n await handleChangePaymentMethod(code);\n if (code === EBookingPaymentMethod.Planpay) {\n await handleBook(code);\n }\n }}\n />\n </div>\n </>\n );\n }}\n />\n <div className=\"u-marg-top u-flex align-items-center\">\n <div className=\"u-flex align-items-center justify-content-start\">\n <Icon icon={IconType.Lock} color={Color.Success} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small} color={Color.Success}>\n <strong>Secured</strong>\n </Text>\n </div>\n </div>\n <SSLSecureBadge />\n </div>\n </div>\n <LineBreak />\n <StepConfirmationPoliciesSection />\n <div className=\"u-pad-top--light u-marg-bottom\">\n <StepConfirmationPolicyBlock />\n </div>\n {ConfirmationVerifyFeature.isActive() && (\n <>\n <LineBreak />\n <div>\n <StepConfirmationAcknowledgement ref={confirmationPolicy} confirmationPolicyError={confirmationPolicyError} />\n </div>\n </>\n )}\n <div className=\"u-flex u-marg-top--heavy justify-content-end\">\n <NextStepButton\n disabled={paymentMethod === EBookingPaymentMethod.Planpay || isLoading}\n text={t(Translation.Step.Confirmation.ConfirmReservation)}\n history={null}\n isLoading={isLoading}\n currentStep={StepConfirmation}\n onClick={onNextStepClicked}\n />\n </div>\n </>\n )}\n\n <ErrorModal open={!!apiErrors} onClose={clearApiErrors}>\n <Text>{apiErrors}</Text>\n </ErrorModal>\n <StepConfirmationCheckoutDifferencesModal\n differences={differenceWarning.differences}\n warnings={differenceWarning.warnings}\n isLoading={isLoading}\n onClose={async () => {\n await rollbackReservation?.();\n history.push(StepRoom.getStepUrl());\n }}\n onProceed={async () => {\n if (paymentMethod === EBookingPaymentMethod.Planpay) {\n setDifferenceWarning({\n differences: [],\n warnings: [],\n });\n } else {\n await commitReservation?.(basketContext.reservationData);\n }\n }}\n />\n </form>\n );\n}\n"]}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
interface ConfirmationFormContextType {
|
|
3
3
|
errorChecks: (() => ConfirmationValidator)[];
|
|
4
|
+
/** @deprecated */
|
|
4
5
|
addErrorCheck: (check: () => ConfirmationValidator) => void;
|
|
6
|
+
addErrorChecks: (...checks: (() => ConfirmationValidator)[]) => void;
|
|
5
7
|
}
|
|
6
8
|
export declare const ConfirmationFormContext: React.Context<ConfirmationFormContextType | null>;
|
|
7
9
|
interface ConfirmationFormContextWrapperProps {
|
|
@@ -10,7 +12,7 @@ interface ConfirmationFormContextWrapperProps {
|
|
|
10
12
|
type ConfirmationValidator = {
|
|
11
13
|
message: string;
|
|
12
14
|
name: string;
|
|
13
|
-
validate: () => boolean;
|
|
15
|
+
validate: (scrollToInput?: boolean) => boolean;
|
|
14
16
|
};
|
|
15
17
|
export declare function ConfirmationFormContextWrapper(props: ConfirmationFormContextWrapperProps): JSX.Element;
|
|
16
18
|
export {};
|
|
@@ -6,26 +6,17 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
exports.ConfirmationFormContextWrapper = exports.ConfirmationFormContext = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
8
|
const react_2 = require("react");
|
|
9
|
+
const lodash_1 = require("lodash");
|
|
9
10
|
exports.ConfirmationFormContext = react_1.default.createContext(null);
|
|
10
11
|
function ConfirmationFormContextWrapper(props) {
|
|
11
12
|
const [errorChecks, setErrorChecks] = (0, react_2.useState)([]);
|
|
12
13
|
const context = {
|
|
13
14
|
errorChecks,
|
|
14
15
|
addErrorCheck: (check) => {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
replaced = true;
|
|
20
|
-
return check;
|
|
21
|
-
}
|
|
22
|
-
return oldErrorValidator;
|
|
23
|
-
});
|
|
24
|
-
if (!replaced) {
|
|
25
|
-
return [...oldErrors, check];
|
|
26
|
-
}
|
|
27
|
-
return newErrors;
|
|
28
|
-
});
|
|
16
|
+
context.addErrorChecks(check);
|
|
17
|
+
},
|
|
18
|
+
addErrorChecks: (...checks) => {
|
|
19
|
+
setErrorChecks((oldErrors) => (0, lodash_1.unionBy)(checks, oldErrors, (check) => check().name));
|
|
29
20
|
},
|
|
30
21
|
};
|
|
31
22
|
return (react_1.default.createElement(react_1.default.Fragment, null,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ConfirmationFormContext.js","sourceRoot":"/","sources":["src/contexts/ConfirmationFormContext.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iCAAiC;
|
|
1
|
+
{"version":3,"file":"ConfirmationFormContext.js","sourceRoot":"/","sources":["src/contexts/ConfirmationFormContext.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,iCAAiC;AACjC,mCAAiC;AAWpB,QAAA,uBAAuB,GAAG,eAAK,CAAC,aAAa,CAAqC,IAAI,CAAC,CAAC;AAarG,SAAgB,8BAA8B,CAAC,KAA0C;IACrF,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAkC,EAAS,CAAC,CAAC;IAE3F,MAAM,OAAO,GAAgC;QACzC,WAAW;QACX,aAAa,EAAE,CAAC,KAAkC,EAAE,EAAE;YAClD,OAAO,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC;QAClC,CAAC;QACD,cAAc,EAAE,CAAC,GAAG,MAAuC,EAAE,EAAE;YAC3D,cAAc,CAAC,CAAC,SAAS,EAAE,EAAE,CAAC,IAAA,gBAAO,EAAC,MAAM,EAAE,SAAS,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC;QACvF,CAAC;KACJ,CAAC;IAEF,OAAO,CACH;QACI,8BAAC,+BAAuB,CAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,IAAG,KAAK,CAAC,QAAQ,CAAoC,CACtG,CACN,CAAC;AACN,CAAC;AAlBD,wEAkBC","sourcesContent":["import React from 'react';\nimport { useState } from 'react';\nimport { unionBy } from 'lodash';\n\ninterface ConfirmationFormContextType {\n errorChecks: (() => ConfirmationValidator)[];\n\n /** @deprecated */\n addErrorCheck: (check: () => ConfirmationValidator) => void;\n\n addErrorChecks: (...checks: (() => ConfirmationValidator)[]) => void;\n}\n\nexport const ConfirmationFormContext = React.createContext<ConfirmationFormContextType | null>(null);\n\ninterface ConfirmationFormContextWrapperProps {\n children: React.ReactNode;\n}\n\ntype ConfirmationValidator = {\n message: string;\n name: string; // TODO re-think this to make validations unique\n\n validate: (scrollToInput?: boolean) => boolean;\n};\n\nexport function ConfirmationFormContextWrapper(props: ConfirmationFormContextWrapperProps) {\n const [errorChecks, setErrorChecks] = useState<(() => ConfirmationValidator)[]>([] as any);\n\n const context: ConfirmationFormContextType = {\n errorChecks,\n addErrorCheck: (check: () => ConfirmationValidator) => {\n context.addErrorChecks(check);\n },\n addErrorChecks: (...checks: (() => ConfirmationValidator)[]) => {\n setErrorChecks((oldErrors) => unionBy(checks, oldErrors, (check) => check().name));\n },\n };\n\n return (\n <>\n <ConfirmationFormContext.Provider value={context}>{props.children}</ConfirmationFormContext.Provider>\n </>\n );\n}\n"]}
|
package/dist/src/index.d.ts
CHANGED
|
@@ -68,6 +68,7 @@ export { default as StepRoom } from './pages/steps/StepRoom/StepRoom';
|
|
|
68
68
|
export { default as StepThanks } from './pages/steps/StepThanks/StepThanks';
|
|
69
69
|
export * from './translations/Translation';
|
|
70
70
|
export * from './util/Color';
|
|
71
|
+
export * from './util/Debounce';
|
|
71
72
|
export * from './hooks/CurrentHotelHook';
|
|
72
73
|
export * from './hooks/EventHook';
|
|
73
74
|
export * from './events/index';
|
package/dist/src/index.js
CHANGED
|
@@ -146,6 +146,7 @@ Object.defineProperty(exports, "StepThanks", { enumerable: true, get: function (
|
|
|
146
146
|
__exportStar(require("./translations/Translation"), exports);
|
|
147
147
|
// Util
|
|
148
148
|
__exportStar(require("./util/Color"), exports);
|
|
149
|
+
__exportStar(require("./util/Debounce"), exports);
|
|
149
150
|
// Hooks
|
|
150
151
|
__exportStar(require("./hooks/CurrentHotelHook"), exports);
|
|
151
152
|
__exportStar(require("./hooks/EventHook"), exports);
|
package/dist/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,uGAA+E;AAC/E,+EAAuD;AACvD,+EAAuD;AACvD,qFAA6D;AAC7D,qEAA6C;AAE7C,kCAAkC;AAClC,kDAA6B;AAC7B,yFAAiE;AAEpD,QAAA,KAAK,GAAG,eAAQ,CAAC;AAE9B,+CAA+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AwB;AAE3B,QAAA,MAAM,GAAG;IAClB,EAAE,EAAE,8BAAoB,CAAC,QAAQ;IACjC,KAAK,EAAE,8BAAoB,CAAC,KAAK;CACpC,CAAC;AAGW,QAAA,OAAO,GAAG,UAAU,CAAC;AAElC,qBAAW,CAAC,YAAY,GAAG;IACvB,CAAC,EAAE,kBAAQ;IACX,EAAE,EAAE,kBAAQ;IACZ,EAAE,EAAE,0BAAgB;IACpB,EAAE,EAAE,oBAAU;CACjB,CAAC","sourcesContent":["import StepConfirmation from '@/pages/steps/StepConfirmation/StepConfirmation';\nimport StepDate from '@/pages/steps/StepDate/StepDate';\nimport StepRoom from '@/pages/steps/StepRoom/StepRoom';\nimport StepThanks from '@/pages/steps/StepThanks/StepThanks';\nimport StepManager from '@/util/StepManager';\n\n// TODO: Look into resolving this.\nimport ReactRaw from 'react';\nimport RoomstayEventManager from './events/RoomstayEventManager';\n\nexport const react = ReactRaw;\n\nexport { useTranslation } from 'react-i18next';\nexport { Link } from 'react-router-dom';\n\n// Components\nexport * from '@/engines/FullPageBookingEngine/FullPageBookingEngine';\nexport * from '@/engines/InlineRoomMiniEngine/InlineRoomMiniEngine';\nexport * from '@/engines/RecentSearchesEngine/RecentSearchesEngine';\nexport * from '@/engines/BookingWizardEngine/BookingWizardEngine';\nexport * from '@/engines/CustomEngine/CustomEngine';\n\nexport { default as Icon } from '@/components/generic/Icon/Icon';\nexport * from '@/components/generic/Icon/Icon';\nexport * from '@/components/generic/Text';\nexport * from '@/components/generic/Select/index';\n\nexport { default as TextBox } from '@/components/generic/TextBox';\nexport { default as TextArea } from '@/components/generic/TextArea';\nexport { default as InputGroup } from '@/components/generic/InputGroup/InputGroup';\nexport { default as RadioFields } from '@/components/generic/radio/RadioFields';\nexport { default as Checkbox } from '@/components/generic/Checkbox/Checkbox';\n\nexport { default as LineBreak } from '@/components/generic/LineBreak';\nexport { default as AutoAutoHeight } from '@/animations/AutoAutoHeight';\nexport { default as Headline } from '@/components/generic/Headline';\n\nexport * from '@/components/generic/Alert';\nexport { default as Alert } from '@/components/generic/Alert';\nexport { default as BEButton } from '@/components/generic/BEButton';\n\nexport { BE_NO_ROOMS_FOUND_BLOCK } from '@/components/steps/room/NoRoomsFoundBlock';\nexport { default as NoRoomsFoundBlock } from '@/components/steps/room/NoRoomsFoundBlock';\n\nexport { default as StepConfirmationCountrySelector } from '@/components/steps/confirmation/StepConfirmationCountrySelector';\n\nexport * from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nexport * from '@/components/summary/BESummaryPerkBlock';\n\nexport * from '@/components/summary/BESummary';\n\nexport * from '@/components/steps/room/StepRoomBestRateAlert';\nexport { default as StepNoRoomBestRateAlert } from '@/components/steps/room/StepRoomBestRateAlert';\n\n// Loaders\nexport { default as SmallSpinner } from '@/components/generic/loader/SmallSpinner';\n\n// Providers\nexport * from '@/providers/LanguageProvider';\nexport * from '@/providers/CurrencyProvider';\nexport { default as CurrencyProvider } from '@/providers/CurrencyProvider';\nexport { default as FeatureProvider } from '@/providers/FeatureProvider';\nexport { default as RatePillProvider } from '@/providers/RatePillProvider';\nexport * from '@/providers/PromotionProvider';\n\n// Features\n\nexport { default as ConfirmationVerifyFeature } from '@/providers/feature/ConfirmationVerifyFeature';\nexport { default as DatePickerTypeFeature } from '@/providers/feature/DatePickerTypeFeature';\nexport { default as FeaturedPromoFeature } from '@/providers/feature/FeaturedPromoFeature';\nexport { default as InlineAddonStepFeature } from '@/providers/feature/InlineAddonStepFeature';\nexport { default as RoomUpsellFeature } from '@/providers/feature/RoomUpsellFeature';\nexport { default as ShowIATANumberOnCheckoutFeature } from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\nexport { default as E164PhoneNumberFieldFeature } from '@/providers/feature/E164PhoneNumberFieldFeature';\nexport { default as FullPageEngineSmallSpacingFeature } from '@/providers/feature/FullPageEngineSmallSpacingFeature';\n\n// Contexts\nexport * from '@frontend/contexts';\nexport { useFormContext } from 'react-hook-form';\n\nexport { default as SessionProvider } from '@/providers/SessionProvider';\nexport * from '@/providers/RoomstayThemeEngine';\nexport { default as RoomstayThemeEngine } from '@/providers/RoomstayThemeEngine';\nexport { registerReplacement, withDI } from '@/providers/DIProvider';\n\nexport { default as DataLayer } from '@/util/DataLayer';\nexport * from '@/util/DataLayer';\n\n// Models\nexport * from '@/models/Client/Hotel/Hotel';\nexport * from '@/models/Client/Hotel/HotelPerk';\n\nexport * from '@/models/Client/Hotel/DistanceUnitType.types';\nexport * from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\nexport * from '@/models/Client/Hotel/Company';\n\nexport { default as API } from '@/api/BookingAPI';\n\n// Steps\nexport { default as StepManager } from '@/util/StepManager';\n\nexport { default as StepAddon } from '@/pages/steps/StepAddon/StepAddon';\nexport { default as StepDate } from '@/pages/steps/StepDate/StepDate';\nexport { default as StepConfirmation } from '@/pages/steps/StepConfirmation/StepConfirmation';\nexport { default as StepHotel } from '@/pages/steps/StepHotel/StepHotel';\nexport { default as StepRoom } from '@/pages/steps/StepRoom/StepRoom';\nexport { default as StepThanks } from '@/pages/steps/StepThanks/StepThanks';\n\nexport * from '@/translations/Translation';\n\n// Util\n\nexport * from '@/util/Color';\nexport * from '@/util/Debounce';\n\n// Hooks\n\nexport * from '@/hooks/CurrentHotelHook';\nexport * from '@/hooks/EventHook';\n\nexport * from '@/events/index';\n\n/** @deprecated use `roomstay.events` instead */\nexport { default as RoomstayEventManager } from '@/events/RoomstayEventManager';\n\nexport const events = {\n on: RoomstayEventManager.addEvent,\n raise: RoomstayEventManager.raise,\n};\n\ndeclare const RS_VERSION: string;\nexport const Version = RS_VERSION;\n\nStepManager.currentSteps = {\n 0: StepDate,\n 10: StepRoom,\n 20: StepConfirmation,\n 30: StepThanks,\n};\n"]}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
2
|
-
import
|
|
3
|
-
declare const _default: ComponentMeta<typeof Text>;
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Pick<import("../components/generic/Text").TextProps, keyof import("../components/generic/Text").TextProps> & React.RefAttributes<HTMLParagraphElement>>>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: ComponentStory<
|
|
5
|
+
export declare const Default: ComponentStory<React.ForwardRefExoticComponent<Pick<import("../components/generic/Text").TextProps, keyof import("../components/generic/Text").TextProps> & React.RefAttributes<HTMLParagraphElement>>>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { ComponentStory, ComponentMeta } from '@storybook/react';
|
|
3
|
-
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Pick<import("../components/generic/TextArea").TextAreaProps, "label" | "key" | keyof React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
3
|
+
declare const _default: ComponentMeta<React.ForwardRefExoticComponent<Pick<import("../components/generic/TextArea").TextAreaProps, "label" | "key" | keyof React.TextareaHTMLAttributes<HTMLTextAreaElement> | "validationStatus"> & React.RefAttributes<HTMLTextAreaElement>>>;
|
|
4
4
|
export default _default;
|
|
5
|
-
export declare const Default: ComponentStory<React.ForwardRefExoticComponent<Pick<import("../components/generic/TextArea").TextAreaProps, "label" | "key" | keyof React.TextareaHTMLAttributes<HTMLTextAreaElement
|
|
5
|
+
export declare const Default: ComponentStory<React.ForwardRefExoticComponent<Pick<import("../components/generic/TextArea").TextAreaProps, "label" | "key" | keyof React.TextareaHTMLAttributes<HTMLTextAreaElement> | "validationStatus"> & React.RefAttributes<HTMLTextAreaElement>>>;
|