@roomstay/frontend 2.3.27 → 2.3.29

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.
@@ -22,11 +22,15 @@ 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
  exports.PlanpayPrice = void 0;
27
30
  const hooks_1 = require("../../../hooks/index.js");
28
31
  const web_1 = require("@planpay/web");
29
32
  const react_1 = __importStar(require("react"));
33
+ const PlanPayPricePreviewFeature_1 = __importDefault(require("../../../providers/feature/PlanPayPricePreviewFeature"));
30
34
  const Debounce_1 = require("../../../util/Debounce");
31
35
  web_1.planpay.init({
32
36
  // environment: hotel.planpay.env,
@@ -42,6 +46,8 @@ const PlanpayPrice = ({ price, checkin, currency }) => {
42
46
  (0, react_1.useEffect)(() => {
43
47
  debounceReload();
44
48
  }, [price, currency, checkin]);
49
+ if (!PlanPayPricePreviewFeature_1.default.isActive())
50
+ return null;
45
51
  if (!(hotel === null || hotel === void 0 ? void 0 : hotel.planpay))
46
52
  return null;
47
53
  return (react_1.default.createElement("div", { style: { whiteSpace: 'nowrap', marginRight: -16, marginTop: -10, marginBottom: -8, marginLeft: -12 }, "data-planpay-data-type": "price-preview", "data-planpay-total-cost": price, "data-planpay-currency-code": currency, "data-planpay-redemption-date": checkin, "data-planpay-payment-deadline": "0", "data-planpay-total-minimum-deposit": "0", "data-planpay-merchant-id": (_a = hotel === null || hotel === void 0 ? void 0 : hotel.planpay) === null || _a === void 0 ? void 0 : _a.username }));
@@ -1 +1 @@
1
- {"version":3,"file":"PlanpayPrice.js","sourceRoot":"/","sources":["src/components/generic/PlanpayPrice/PlanpayPrice.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAkD;AAClD,sCAAuC;AACvC,+CAAgE;AAEhE,8CAA2C;AAE3C,aAAO,CAAC,IAAI,CAAC;IACT,kCAAkC;IAClC,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,IAAA,mBAAQ,EAAC,GAAG,EAAE;IACjC,aAAO,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACrC,CAAC,EAAE,GAAG,CAAC,CAAC;AAQD,MAAM,YAAY,GAA0B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;;IAChF,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAEpC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,cAAc,EAAE,CAAC;IACrB,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAE/B,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA;QAAE,OAAO,IAAI,CAAC;IAEjC,OAAO,CACH,uCACI,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,4BAC7E,eAAe,6BACb,KAAK,gCACF,QAAQ,kCACN,OAAO,mCACP,GAAG,wCACE,GAAG,8BACZ,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAE,QAAQ,GACpD,CACL,CAAC;AACN,CAAC,CAAC;AArBW,QAAA,YAAY,gBAqBvB","sourcesContent":["import { useCurrentHotel } from '@frontend/hooks';\nimport { planpay } from '@planpay/web';\nimport React, { FC, PropsWithChildren, useEffect } from 'react';\n\nimport { debounce } from '@/util/Debounce';\n\nplanpay.init({\n // environment: hotel.planpay.env,\n environment: 'prod',\n showDebug: false,\n});\n\nconst debounceReload = debounce(() => {\n planpay.pricePreview.refresh({});\n}, 150);\n\nexport interface PlanpayPriceProps extends PropsWithChildren<any> {\n price: number;\n checkin: string;\n currency: string;\n}\n\nexport const PlanpayPrice: FC<PlanpayPriceProps> = ({ price, checkin, currency }) => {\n const { hotel } = useCurrentHotel();\n\n useEffect(() => {\n debounceReload();\n }, [price, currency, checkin]);\n\n if (!hotel?.planpay) return null;\n\n return (\n <div\n style={{ whiteSpace: 'nowrap', marginRight: -16, marginTop: -10, marginBottom: -8, marginLeft: -12 }}\n data-planpay-data-type=\"price-preview\"\n data-planpay-total-cost={price}\n data-planpay-currency-code={currency}\n data-planpay-redemption-date={checkin}\n data-planpay-payment-deadline=\"0\"\n data-planpay-total-minimum-deposit=\"0\"\n data-planpay-merchant-id={hotel?.planpay?.username}\n />\n );\n};\n"]}
1
+ {"version":3,"file":"PlanpayPrice.js","sourceRoot":"/","sources":["src/components/generic/PlanpayPrice/PlanpayPrice.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,2CAAkD;AAClD,sCAAuC;AACvC,+CAAgE;AAEhE,gHAAwF;AACxF,8CAA2C;AAE3C,aAAO,CAAC,IAAI,CAAC;IACT,kCAAkC;IAClC,WAAW,EAAE,MAAM;IACnB,SAAS,EAAE,KAAK;CACnB,CAAC,CAAC;AAEH,MAAM,cAAc,GAAG,IAAA,mBAAQ,EAAC,GAAG,EAAE;IACjC,aAAO,CAAC,YAAY,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC;AACrC,CAAC,EAAE,GAAG,CAAC,CAAC;AAQD,MAAM,YAAY,GAA0B,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE;;IAChF,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IAEpC,IAAA,iBAAS,EAAC,GAAG,EAAE;QACX,cAAc,EAAE,CAAC;IACrB,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,CAAC;IAE/B,IAAI,CAAC,oCAA0B,CAAC,QAAQ,EAAE;QAAE,OAAO,IAAI,CAAC;IAExD,IAAI,CAAC,CAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,CAAA;QAAE,OAAO,IAAI,CAAC;IAEjC,OAAO,CACH,uCACI,KAAK,EAAE,EAAE,UAAU,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC,EAAE,EAAE,SAAS,EAAE,CAAC,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC,EAAE,UAAU,EAAE,CAAC,EAAE,EAAE,4BAC7E,eAAe,6BACb,KAAK,gCACF,QAAQ,kCACN,OAAO,mCACP,GAAG,wCACE,GAAG,8BACZ,MAAA,KAAK,aAAL,KAAK,uBAAL,KAAK,CAAE,OAAO,0CAAE,QAAQ,GACpD,CACL,CAAC;AACN,CAAC,CAAC;AAvBW,QAAA,YAAY,gBAuBvB","sourcesContent":["import { useCurrentHotel } from '@frontend/hooks';\nimport { planpay } from '@planpay/web';\nimport React, { FC, PropsWithChildren, useEffect } from 'react';\n\nimport PlanPayPricePreviewFeature from '@/providers/feature/PlanPayPricePreviewFeature';\nimport { debounce } from '@/util/Debounce';\n\nplanpay.init({\n // environment: hotel.planpay.env,\n environment: 'prod',\n showDebug: false,\n});\n\nconst debounceReload = debounce(() => {\n planpay.pricePreview.refresh({});\n}, 150);\n\nexport interface PlanpayPriceProps extends PropsWithChildren<any> {\n price: number;\n checkin: string;\n currency: string;\n}\n\nexport const PlanpayPrice: FC<PlanpayPriceProps> = ({ price, checkin, currency }) => {\n const { hotel } = useCurrentHotel();\n\n useEffect(() => {\n debounceReload();\n }, [price, currency, checkin]);\n\n if (!PlanPayPricePreviewFeature.isActive()) return null;\n\n if (!hotel?.planpay) return null;\n\n return (\n <div\n style={{ whiteSpace: 'nowrap', marginRight: -16, marginTop: -10, marginBottom: -8, marginLeft: -12 }}\n data-planpay-data-type=\"price-preview\"\n data-planpay-total-cost={price}\n data-planpay-currency-code={currency}\n data-planpay-redemption-date={checkin}\n data-planpay-payment-deadline=\"0\"\n data-planpay-total-minimum-deposit=\"0\"\n data-planpay-merchant-id={hotel?.planpay?.username}\n />\n );\n};\n"]}
@@ -0,0 +1,7 @@
1
+ import { RoomstayEvent } from '../RoomstayEvent';
2
+ export declare class CancelledBookingEvent extends RoomstayEvent {
3
+ id: string;
4
+ email: string;
5
+ constructor(id: string, email: string);
6
+ static getLabel(): string;
7
+ }
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.CancelledBookingEvent = void 0;
4
+ const RoomstayEvent_1 = require("../RoomstayEvent");
5
+ class CancelledBookingEvent extends RoomstayEvent_1.RoomstayEvent {
6
+ constructor(id, email) {
7
+ super();
8
+ this.id = id;
9
+ this.email = email;
10
+ }
11
+ static getLabel() {
12
+ return 'Booking/Cancelled';
13
+ }
14
+ }
15
+ exports.CancelledBookingEvent = CancelledBookingEvent;
16
+ //# sourceMappingURL=CancelledBookingEvent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CancelledBookingEvent.js","sourceRoot":"/","sources":["src/events/views/CancelledBookingEvent.ts"],"names":[],"mappings":";;;AAAA,oDAAiD;AAEjD,MAAa,qBAAsB,SAAQ,6BAAa;IAIpD,YAAmB,EAAU,EAAE,KAAa;QACxC,KAAK,EAAE,CAAC;QACR,IAAI,CAAC,EAAE,GAAG,EAAE,CAAC;QACb,IAAI,CAAC,KAAK,GAAG,KAAK,CAAC;IACvB,CAAC;IAED,MAAM,CAAC,QAAQ;QACX,OAAO,mBAAmB,CAAC;IAC/B,CAAC;CACJ;AAbD,sDAaC","sourcesContent":["import { RoomstayEvent } from '../RoomstayEvent';\n\nexport class CancelledBookingEvent extends RoomstayEvent {\n public id: string;\n public email: string;\n\n public constructor(id: string, email: string) {\n super();\n this.id = id;\n this.email = email;\n }\n\n static getLabel(): string {\n return 'Booking/Cancelled';\n }\n}\n"]}
@@ -43,6 +43,7 @@ export { default as E164PhoneNumberFieldFeature } from './providers/feature/E164
43
43
  export { default as FeaturedPromoFeature } from './providers/feature/FeaturedPromoFeature';
44
44
  export { default as FullPageEngineSmallSpacingFeature } from './providers/feature/FullPageEngineSmallSpacingFeature';
45
45
  export { default as InlineAddonStepFeature } from './providers/feature/InlineAddonStepFeature';
46
+ export { default as PlanPayPricePreviewFeature } from './providers/feature/PlanPayPricePreviewFeature';
46
47
  export { default as RoomUpsellFeature } from './providers/feature/RoomUpsellFeature';
47
48
  export { default as ShowIATANumberOnCheckoutFeature } from './providers/feature/ShowIATANumberOnCheckoutFeature';
48
49
  export { registerReplacement, withDI } from './providers/DIProvider';
package/dist/src/index.js CHANGED
@@ -17,7 +17,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
17
17
  return (mod && mod.__esModule) ? mod : { "default": mod };
18
18
  };
19
19
  Object.defineProperty(exports, "__esModule", { value: true });
20
- exports.Version = exports.events = exports.RoomstayEventManager = exports.StepManager = exports.StepThanks = exports.StepRoom = exports.StepHotel = exports.StepGroupedRoom = exports.StepDate = exports.StepConfirmation = exports.StepAddon = exports.HotelDataSource = exports.API = exports.useFormContext = exports.DataLayer = exports.SessionProvider = exports.RoomstayThemeEngine = exports.withDI = exports.registerReplacement = exports.ShowIATANumberOnCheckoutFeature = exports.RoomUpsellFeature = exports.InlineAddonStepFeature = exports.FullPageEngineSmallSpacingFeature = exports.FeaturedPromoFeature = exports.E164PhoneNumberFieldFeature = exports.DatePickerTypeFeature = exports.ConfirmationVerifyFeature = exports.RatePillProvider = exports.FeatureProvider = exports.CurrencyProvider = exports.SmallSpinner = exports.StepNoRoomBestRateAlert = exports.NoRoomsFoundBlock = exports.BE_NO_ROOMS_FOUND_BLOCK = exports.StepConfirmationCountrySelector = exports.TextBox = exports.TextArea = exports.RadioFields = exports.LineBreak = exports.InputGroup = exports.Icon = exports.Headline = exports.Checkbox = exports.BEButton = exports.Alert = exports.AutoAutoHeight = exports.Link = exports.useTranslation = exports.react = void 0;
20
+ exports.Version = exports.events = exports.RoomstayEventManager = exports.StepManager = exports.StepThanks = exports.StepRoom = exports.StepHotel = exports.StepGroupedRoom = exports.StepDate = exports.StepConfirmation = exports.StepAddon = exports.HotelDataSource = exports.API = exports.useFormContext = exports.DataLayer = exports.SessionProvider = exports.RoomstayThemeEngine = exports.withDI = exports.registerReplacement = exports.ShowIATANumberOnCheckoutFeature = exports.RoomUpsellFeature = exports.PlanPayPricePreviewFeature = exports.InlineAddonStepFeature = exports.FullPageEngineSmallSpacingFeature = exports.FeaturedPromoFeature = exports.E164PhoneNumberFieldFeature = exports.DatePickerTypeFeature = exports.ConfirmationVerifyFeature = exports.RatePillProvider = exports.FeatureProvider = exports.CurrencyProvider = exports.SmallSpinner = exports.StepNoRoomBestRateAlert = exports.NoRoomsFoundBlock = exports.BE_NO_ROOMS_FOUND_BLOCK = exports.StepConfirmationCountrySelector = exports.TextBox = exports.TextArea = exports.RadioFields = exports.LineBreak = exports.InputGroup = exports.Icon = exports.Headline = exports.Checkbox = exports.BEButton = exports.Alert = exports.AutoAutoHeight = exports.Link = exports.useTranslation = exports.react = void 0;
21
21
  // TODO: Look into resolving this.
22
22
  const react_1 = __importDefault(require("react"));
23
23
  const StepConfirmation_1 = __importDefault(require("./pages/steps/StepConfirmation/StepConfirmation"));
@@ -101,6 +101,8 @@ var FullPageEngineSmallSpacingFeature_1 = require("./providers/feature/FullPageE
101
101
  Object.defineProperty(exports, "FullPageEngineSmallSpacingFeature", { enumerable: true, get: function () { return __importDefault(FullPageEngineSmallSpacingFeature_1).default; } });
102
102
  var InlineAddonStepFeature_1 = require("./providers/feature/InlineAddonStepFeature");
103
103
  Object.defineProperty(exports, "InlineAddonStepFeature", { enumerable: true, get: function () { return __importDefault(InlineAddonStepFeature_1).default; } });
104
+ var PlanPayPricePreviewFeature_1 = require("./providers/feature/PlanPayPricePreviewFeature");
105
+ Object.defineProperty(exports, "PlanPayPricePreviewFeature", { enumerable: true, get: function () { return __importDefault(PlanPayPricePreviewFeature_1).default; } });
104
106
  var RoomUpsellFeature_1 = require("./providers/feature/RoomUpsellFeature");
105
107
  Object.defineProperty(exports, "RoomUpsellFeature", { enumerable: true, get: function () { return __importDefault(RoomUpsellFeature_1).default; } });
106
108
  var ShowIATANumberOnCheckoutFeature_1 = require("./providers/feature/ShowIATANumberOnCheckoutFeature");
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,kDAA6B;AAE7B,uGAA+E;AAC/E,+EAAuD;AACvD,+EAAuD;AACvD,qFAA6D;AAC7D,qEAA6C;AAE7C,yFAAiE;AAEpD,QAAA,KAAK,GAAG,eAAQ,CAAC;AAE9B,+CAA+C;AAAtC,+GAAA,cAAc,OAAA;AACvB,qDAAwC;AAA/B,wGAAA,IAAI,OAAA;AAEb,aAAa;AACb,8DAAwE;AAA/D,iIAAA,OAAO,OAAkB;AAClC,6DAA2C;AAC3C,oDAA8D;AAArD,+GAAA,OAAO,OAAS;AACzB,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,mEAA6E;AAApE,qHAAA,OAAO,OAAY;AAC5B,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,uDAAiE;AAAxD,6GAAA,OAAO,OAAQ;AACxB,iEAA+C;AAC/C,yEAAmF;AAA1E,yHAAA,OAAO,OAAc;AAC9B,4DAAsE;AAA7D,uHAAA,OAAO,OAAa;AAC7B,sEAAgF;AAAvE,2HAAA,OAAO,OAAe;AAC/B,oEAAkD;AAClD,4DAA0C;AAC1C,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,wDAAkE;AAAzD,mHAAA,OAAO,OAAW;AAC3B,oGAAkF;AAClF,mHAA6H;AAApH,mKAAA,OAAO,OAAmC;AACnD,+EAA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AAC9C,gEAA8C;AAC9C,+EAA6D;AAC7D,8DAA4C;AAC5C,qFAA8E;AAArE,wHAAA,eAAe,OAAA;AACxB,kEAAgD;AAChD,8EAA4D;AAE5D,QAAQ;AACR,+DAAyE;AAAhE,uHAAA,OAAO,OAAa;AAC7B,oFAA8F;AAArF,qIAAA,OAAO,OAAoB;AACpC,4DAAsE;AAA7D,qHAAA,OAAO,OAAY;AAC5B,iFAA2F;AAAlF,mIAAA,OAAO,OAAmB;AACnC,+DAAyE;AAAhE,uHAAA,OAAO,OAAa;AAC7B,4DAAsE;AAA7D,qHAAA,OAAO,OAAY;AAC5B,kEAA4E;AAAnE,yHAAA,OAAO,OAAc;AAC9B,6DAA2C;AAC3C,kDAA4D;AAAnD,2HAAA,OAAO,OAAe;AAK/B,+CAA6B;AAC7B,kDAAgC;AAEhC,QAAQ;AAER,iDAA+B;AAC/B,2DAAyC;AACzC,oDAAkC;AAElC,gDAAgD;AAChD,sEAAgF;AAAvE,6IAAA,OAAO,OAAwB;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":["// TODO: Look into resolving this.\nimport ReactRaw from 'react';\n\nimport 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\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 { default as AutoAutoHeight } from '@/animations/AutoAutoHeight';\nexport * from '@/components/generic/Alert';\nexport { default as Alert } from '@/components/generic/Alert';\nexport { default as BEButton } from '@/components/generic/BEButton';\nexport { default as Checkbox } from '@/components/generic/Checkbox/Checkbox';\nexport { default as Headline } from '@/components/generic/Headline';\nexport { default as Icon } from '@/components/generic/Icon/Icon';\nexport * from '@/components/generic/Icon/Icon';\nexport { default as InputGroup } from '@/components/generic/InputGroup/InputGroup';\nexport { default as LineBreak } from '@/components/generic/LineBreak';\nexport { default as RadioFields } from '@/components/generic/radio/RadioFields';\nexport * from '@/components/generic/Select/index';\nexport * from '@/components/generic/Text';\nexport { default as TextArea } from '@/components/generic/TextArea';\nexport { default as TextBox } from '@/components/generic/TextBox';\nexport * from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nexport { default as StepConfirmationCountrySelector } from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nexport { BE_NO_ROOMS_FOUND_BLOCK } from '@/components/steps/room/NoRoomsFoundBlock';\nexport { default as NoRoomsFoundBlock } from '@/components/steps/room/NoRoomsFoundBlock';\nexport * from '@/components/steps/room/StepRoomBestRateAlert';\nexport { default as StepNoRoomBestRateAlert } from '@/components/steps/room/StepRoomBestRateAlert';\nexport * from '@/components/summary/BESummary';\nexport * from '@/components/summary/BESummaryPerkBlock';\nexport * from '@/engines/BookingWizardEngine/BookingWizardEngine';\nexport * from '@/engines/CustomEngine/CustomEngine';\nexport * from '@/engines/FullPageBookingEngine/FullPageBookingEngine';\nexport * from '@/engines/InlineRoomMiniEngine/InlineRoomMiniEngine';\nexport * from '@/engines/RecentSearchesEngine/RecentSearchesEngine';\n\n// Loaders\nexport { default as SmallSpinner } from '@/components/generic/loader/SmallSpinner';\n\n// Providers\nexport * from '@/providers/CurrencyProvider';\nexport { default as CurrencyProvider } from '@/providers/CurrencyProvider';\nexport { default as FeatureProvider } from '@/providers/FeatureProvider';\nexport * from '@/providers/LanguageProvider';\nexport * from '@/providers/PromotionProvider';\nexport { default as RatePillProvider } from '@/providers/RatePillProvider';\n\n// Features\n\nexport { default as ConfirmationVerifyFeature } from '@/providers/feature/ConfirmationVerifyFeature';\nexport { default as DatePickerTypeFeature } from '@/providers/feature/DatePickerTypeFeature';\nexport { default as E164PhoneNumberFieldFeature } from '@/providers/feature/E164PhoneNumberFieldFeature';\nexport { default as FeaturedPromoFeature } from '@/providers/feature/FeaturedPromoFeature';\nexport { default as FullPageEngineSmallSpacingFeature } from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nexport { default as InlineAddonStepFeature } from '@/providers/feature/InlineAddonStepFeature';\nexport { default as RoomUpsellFeature } from '@/providers/feature/RoomUpsellFeature';\nexport { default as ShowIATANumberOnCheckoutFeature } from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\n// Contexts\nexport { registerReplacement, withDI } from '@/providers/DIProvider';\nexport * from '@/providers/RoomstayThemeEngine';\nexport { default as RoomstayThemeEngine } from '@/providers/RoomstayThemeEngine';\nexport { default as SessionProvider } from '@/providers/SessionProvider';\nexport { default as DataLayer } from '@/util/DataLayer';\nexport * from '@/util/DataLayer';\nexport * from '@/util/DefaultValueManager';\nexport * from '@/util/RouteManager';\nexport * from '@frontend/contexts';\nexport { useFormContext } from 'react-hook-form';\n\n// Models\nexport { default as API } from '@/api/BookingAPI';\nexport * from '@/models/Api/HotelDTO';\nexport * from '@/models/Api/HotelOverrideDTO';\nexport * from '@/models/Client/Hotel/Company';\nexport * from '@/models/Client/Hotel/DistanceUnitType.types';\nexport * from '@/models/Client/Hotel/Hotel';\nexport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nexport * from '@/models/Client/Hotel/HotelPerk';\nexport * from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\n// Steps\nexport { default as StepAddon } from '@/pages/steps/StepAddon/StepAddon';\nexport { default as StepConfirmation } from '@/pages/steps/StepConfirmation/StepConfirmation';\nexport { default as StepDate } from '@/pages/steps/StepDate/StepDate';\nexport { default as StepGroupedRoom } from '@/pages/steps/StepGroupedRoom/StepGroupedRoom';\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';\nexport * from '@/translations/Translation';\nexport { default as StepManager } from '@/util/StepManager';\n\n// Util\n\nexport type { default as ColorProfile } from '@/models/Client/Hotel/ColorProfile';\nexport * from '@/util/Color';\nexport * from '@/util/Debounce';\n\n// Hooks\n\nexport * from '@/events/index';\nexport * from '@/hooks/CurrentHotelHook';\nexport * from '@/hooks/EventHook';\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
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["src/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA,kCAAkC;AAClC,kDAA6B;AAE7B,uGAA+E;AAC/E,+EAAuD;AACvD,+EAAuD;AACvD,qFAA6D;AAC7D,qEAA6C;AAE7C,yFAAiE;AAEpD,QAAA,KAAK,GAAG,eAAQ,CAAC;AAE9B,+CAA+C;AAAtC,+GAAA,cAAc,OAAA;AACvB,qDAAwC;AAA/B,wGAAA,IAAI,OAAA;AAEb,aAAa;AACb,8DAAwE;AAA/D,iIAAA,OAAO,OAAkB;AAClC,6DAA2C;AAC3C,oDAA8D;AAArD,+GAAA,OAAO,OAAS;AACzB,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,mEAA6E;AAApE,qHAAA,OAAO,OAAY;AAC5B,0DAAoE;AAA3D,qHAAA,OAAO,OAAY;AAC5B,uD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;IACX,EAAE,EAAE,kBAAQ;IACZ,EAAE,EAAE,0BAAgB;IACpB,EAAE,EAAE,oBAAU;CACjB,CAAC","sourcesContent":["// TODO: Look into resolving this.\nimport ReactRaw from 'react';\n\nimport 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\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 { default as AutoAutoHeight } from '@/animations/AutoAutoHeight';\nexport * from '@/components/generic/Alert';\nexport { default as Alert } from '@/components/generic/Alert';\nexport { default as BEButton } from '@/components/generic/BEButton';\nexport { default as Checkbox } from '@/components/generic/Checkbox/Checkbox';\nexport { default as Headline } from '@/components/generic/Headline';\nexport { default as Icon } from '@/components/generic/Icon/Icon';\nexport * from '@/components/generic/Icon/Icon';\nexport { default as InputGroup } from '@/components/generic/InputGroup/InputGroup';\nexport { default as LineBreak } from '@/components/generic/LineBreak';\nexport { default as RadioFields } from '@/components/generic/radio/RadioFields';\nexport * from '@/components/generic/Select/index';\nexport * from '@/components/generic/Text';\nexport { default as TextArea } from '@/components/generic/TextArea';\nexport { default as TextBox } from '@/components/generic/TextBox';\nexport * from '@/components/steps/confirmation/StepConfirmationCommentsComponent';\nexport { default as StepConfirmationCountrySelector } from '@/components/steps/confirmation/StepConfirmationCountrySelector';\nexport { BE_NO_ROOMS_FOUND_BLOCK } from '@/components/steps/room/NoRoomsFoundBlock';\nexport { default as NoRoomsFoundBlock } from '@/components/steps/room/NoRoomsFoundBlock';\nexport * from '@/components/steps/room/StepRoomBestRateAlert';\nexport { default as StepNoRoomBestRateAlert } from '@/components/steps/room/StepRoomBestRateAlert';\nexport * from '@/components/summary/BESummary';\nexport * from '@/components/summary/BESummaryPerkBlock';\nexport * from '@/engines/BookingWizardEngine/BookingWizardEngine';\nexport * from '@/engines/CustomEngine/CustomEngine';\nexport * from '@/engines/FullPageBookingEngine/FullPageBookingEngine';\nexport * from '@/engines/InlineRoomMiniEngine/InlineRoomMiniEngine';\nexport * from '@/engines/RecentSearchesEngine/RecentSearchesEngine';\n\n// Loaders\nexport { default as SmallSpinner } from '@/components/generic/loader/SmallSpinner';\n\n// Providers\nexport * from '@/providers/CurrencyProvider';\nexport { default as CurrencyProvider } from '@/providers/CurrencyProvider';\nexport { default as FeatureProvider } from '@/providers/FeatureProvider';\nexport * from '@/providers/LanguageProvider';\nexport * from '@/providers/PromotionProvider';\nexport { default as RatePillProvider } from '@/providers/RatePillProvider';\n\n// Features\n\nexport { default as ConfirmationVerifyFeature } from '@/providers/feature/ConfirmationVerifyFeature';\nexport { default as DatePickerTypeFeature } from '@/providers/feature/DatePickerTypeFeature';\nexport { default as E164PhoneNumberFieldFeature } from '@/providers/feature/E164PhoneNumberFieldFeature';\nexport { default as FeaturedPromoFeature } from '@/providers/feature/FeaturedPromoFeature';\nexport { default as FullPageEngineSmallSpacingFeature } from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nexport { default as InlineAddonStepFeature } from '@/providers/feature/InlineAddonStepFeature';\nexport { default as PlanPayPricePreviewFeature } from '@/providers/feature/PlanPayPricePreviewFeature';\nexport { default as RoomUpsellFeature } from '@/providers/feature/RoomUpsellFeature';\nexport { default as ShowIATANumberOnCheckoutFeature } from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\n// Contexts\nexport { registerReplacement, withDI } from '@/providers/DIProvider';\nexport * from '@/providers/RoomstayThemeEngine';\nexport { default as RoomstayThemeEngine } from '@/providers/RoomstayThemeEngine';\nexport { default as SessionProvider } from '@/providers/SessionProvider';\nexport { default as DataLayer } from '@/util/DataLayer';\nexport * from '@/util/DataLayer';\nexport * from '@/util/DefaultValueManager';\nexport * from '@/util/RouteManager';\nexport * from '@frontend/contexts';\nexport { useFormContext } from 'react-hook-form';\n\n// Models\nexport { default as API } from '@/api/BookingAPI';\nexport * from '@/models/Api/HotelDTO';\nexport * from '@/models/Api/HotelOverrideDTO';\nexport * from '@/models/Client/Hotel/Company';\nexport * from '@/models/Client/Hotel/DistanceUnitType.types';\nexport * from '@/models/Client/Hotel/Hotel';\nexport { HotelDataSource } from '@/models/Client/Hotel/HotelDataSource.types';\nexport * from '@/models/Client/Hotel/HotelPerk';\nexport * from '@/models/Client/Hotel/WeekdayStartsOn.types';\n\n// Steps\nexport { default as StepAddon } from '@/pages/steps/StepAddon/StepAddon';\nexport { default as StepConfirmation } from '@/pages/steps/StepConfirmation/StepConfirmation';\nexport { default as StepDate } from '@/pages/steps/StepDate/StepDate';\nexport { default as StepGroupedRoom } from '@/pages/steps/StepGroupedRoom/StepGroupedRoom';\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';\nexport * from '@/translations/Translation';\nexport { default as StepManager } from '@/util/StepManager';\n\n// Util\n\nexport type { default as ColorProfile } from '@/models/Client/Hotel/ColorProfile';\nexport * from '@/util/Color';\nexport * from '@/util/Debounce';\n\n// Hooks\n\nexport * from '@/events/index';\nexport * from '@/hooks/CurrentHotelHook';\nexport * from '@/hooks/EventHook';\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"]}
@@ -40,6 +40,7 @@ const Icon_1 = __importStar(require("../../components/generic/Icon/Icon"));
40
40
  const ConfirmationModal_1 = __importDefault(require("../../components/generic/modal/ConfirmationModal"));
41
41
  const Text_1 = __importStar(require("../../components/generic/Text"));
42
42
  const ImageGallerySlider_1 = __importDefault(require("../../components/steps/room/ImageGallerySlider"));
43
+ const CancelledBookingEvent_1 = require("../../events/views/CancelledBookingEvent");
43
44
  const ReservationRowModal_1 = __importDefault(require("./ReservationRowModal"));
44
45
  const Color_1 = require("../../util/Color");
45
46
  const DataLayer_1 = __importDefault(require("../../util/DataLayer"));
@@ -48,6 +49,7 @@ function ReservationRow(props) {
48
49
  var _a, _b, _c, _d, _e, _f;
49
50
  const { t } = (0, react_i18next_1.useTranslation)();
50
51
  const { hotel } = (0, hooks_1.useCurrentHotel)();
52
+ const { raise } = (0, hooks_1.useEvent)();
51
53
  const obj = props.reservation;
52
54
  const [isModalOpen, setIsModalOpen] = (0, react_1.useState)(false);
53
55
  const [isCancelled, setIsCancelled] = (0, react_1.useState)(obj.status === 'Cancelled');
@@ -85,6 +87,7 @@ function ReservationRow(props) {
85
87
  BookingAPI_1.default.Reservation.cancelReservation(obj.reservationNumber, obj.guest.email, hotel === null || hotel === void 0 ? void 0 : hotel.hotelID)
86
88
  .then(() => {
87
89
  DataLayer_1.default.instance.sendCancellation(obj.reservationNumber);
90
+ raise(new CancelledBookingEvent_1.CancelledBookingEvent(obj.reservationNumber, obj.guest.email));
88
91
  setIsCancelled(true);
89
92
  setIsCancelLoading(false);
90
93
  if (props.onCancelled) {
@@ -1 +1 @@
1
- {"version":3,"file":"ReservationRow.js","sourceRoot":"/","sources":["src/pages/findReservation/ReservationRow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkD;AAClD,2CAAkD;AAClD,yCAAuD;AACvD,kDAA0B;AAC1B,+CAAwC;AACxC,iDAA+C;AAC/C,0DAAuD;AAEvD,kEAAmC;AACnC,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,qGAA6E;AAC7E,kEAA2D;AAC3D,oGAA4E;AAE5E,sGAA8E;AAC9E,wCAAqC;AACrC,i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C,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,uBAAuB,GAAI,CACpK,CACN,CAAC;AACN,CAAC;AAjMD,iCAiMC","sourcesContent":["import { ErrorHandler } from '@frontend/contexts';\nimport { useCurrentHotel } from '@frontend/hooks';\nimport { EBookingPaymentMethod } from '@roomstay/core';\nimport dayjs from 'dayjs';\nimport React, { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport API from '@/api/BookingAPI';\nimport BEButton from '@/components/generic/BEButton';\nimport Currency from '@/components/generic/Currency';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport ConfirmationModal from '@/components/generic/modal/ConfirmationModal';\nimport Text, { TextType } from '@/components/generic/Text';\nimport ImageGallerySlider from '@/components/steps/room/ImageGallerySlider';\nimport { ReservationDTO } from '@/models/Api/ReservationsDTO';\nimport ReservationRowModal from '@/pages/findReservation/ReservationRowModal';\nimport { Color } from '@/util/Color';\nimport DataLayer from '@/util/DataLayer';\nimport StringHelper from '@/util/StringHelper';\n\ninterface ReservationRowProps {\n reservation: ReservationDTO;\n onCancelled?: () => void;\n}\n\nexport default function ReservationRow(props: ReservationRowProps) {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n\n const obj = props.reservation;\n\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isCancelled, setIsCancelled] = useState(obj.status === 'Cancelled');\n const [isCancelLoading, setIsCancelLoading] = useState(false);\n\n const [confirmOpen, setConfirmOpen] = useState(false);\n\n let adultsAndChildren = StringHelper.pluralWithDictAndCount(obj.guestCounts.adults, Translation.Step.Date.Adult, t);\n\n if (obj.guestCounts.children) {\n adultsAndChildren += ', ' + StringHelper.pluralWithDictAndCount(obj.guestCounts.children, Translation.Step.Date.Child, t);\n }\n\n const nightKeys = Object.keys(obj.nights);\n\n const openModalOnClick = () => {\n setIsModalOpen(true);\n };\n const closeModalOnClick = () => {\n setIsModalOpen(false);\n };\n const confirmModalOnClick = () => {\n setConfirmOpen(true);\n };\n const onConfirmHandler = () => {\n cancelRow();\n setConfirmOpen(false);\n };\n const openConfirmationHandler = () => {\n setConfirmOpen(false);\n };\n\n const firstNight = dayjs(nightKeys[0]);\n const lastNight = dayjs(nightKeys[nightKeys.length - 1]).add(1, 'day');\n\n let images: string[] = obj.images;\n\n if ((!images || !images.length) && hotel?.rooms[obj.roomCode]) {\n images = hotel?.rooms[obj.roomCode].images;\n }\n\n const cancelRow = () => {\n setIsCancelLoading(true);\n\n API.Reservation.cancelReservation(obj.reservationNumber, obj.guest.email, hotel?.hotelID as string)\n .then(() => {\n DataLayer.instance.sendCancellation(obj.reservationNumber);\n\n setIsCancelled(true);\n setIsCancelLoading(false);\n\n if (props.onCancelled) {\n props.onCancelled();\n }\n })\n .catch((ex) => {\n ErrorHandler.add({\n title: t(Translation.Step.Thanks.Errors.CancelFailed),\n message: ex.Message,\n });\n });\n };\n\n const roomName = obj.roomType ? obj.roomType : hotel?.rooms[obj.roomCode]?.name;\n\n return (\n <>\n <div className=\"reservation-row\">\n <div className=\"room-details +is-open \">\n <div className=\"room-details--image\">\n <ImageGallerySlider images={images} />\n </div>\n <div className=\"room-details--content u-pad--heavy u-pad@m-\">\n <div className=\"u-marg-bottom\">\n <div className=\"room-details--content-title u-marg-bottom--light\">\n {!isCancelled ? (\n <Text>\n <strong>{roomName}</strong>\n <small style={{ color: Color.Grey }}> #{obj.reservationNumber}</small>\n </Text>\n ) : (\n <Text>\n <del>\n <strong>{roomName}</strong>\n </del>\n <small style={{ color: Color.Alert }}> {t(Translation.Misc.Cancelled)}</small>\n </Text>\n )}\n </div>\n <div className=\"room-details--content-description u-marg-bottom--light\">\n <Text color={Color.DarkGrey} type={TextType.Small}>\n <>\n {hotel?.name} - {hotel?.address?.line1}\n </>\n </Text>\n </div>\n </div>\n\n <div className=\"\">\n <ul>\n <li className=\"u-flex justify-content-start u-marg-bottom--light\">\n <Icon color={Color.Grey} icon={IconType.Person} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>\n {obj.guest.firstName} {obj.guest.lastName} <span style={{ color: Color.DarkGrey }}>- {adultsAndChildren}</span>\n </Text>\n </div>\n </li>\n <li className=\"u-flex justify-content-start u-marg-bottom--light\">\n <Icon icon={IconType.Email} color={Color.Grey} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>{obj.guest.email}</Text>\n </div>\n </li>\n <li className=\"u-flex justify-content-start u-marg-bottom--light\">\n <Icon icon={IconType.Calendar} color={Color.Grey} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>{firstNight.format('dddd, MMM D, YYYY')}</Text>\n <Text type={TextType.Small}>{lastNight.format('dddd, MMM D, YYYY')}</Text>\n </div>\n </li>\n <li className=\"u-flex justify-content-start\">\n <Icon icon={IconType.CreditCard} color={Color.Grey} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>\n {obj?.paymentMethod === EBookingPaymentMethod.Planpay ? (\n t(Translation.Step.Confirmation.PaidWithPlanpay)\n ) : (\n <>\n •••• •••• •••• {obj.paymentCard?.last4 ?? 'N/A'}{' '}\n <span style={{ color: Color.DarkGrey }}>({obj.paymentCard?.type ?? 'N/A'})</span>\n </>\n )}\n </Text>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n <div className=\"reservation-row--actions\">\n <div className=\"u-flex justify-content-start align-items-center\">\n <div className=\"u-marg-right--heavy u-inline-flex\">\n <BEButton icon={IconType.ArrowRight2} isText primary size=\"tiny\" iconPosition=\"right\" onClick={openModalOnClick}>\n {t(Translation.Step.Room.RoomInfo.MoreDetails)}\n </BEButton>\n </div>\n <div className=\"u-inline-flex\">\n <BEButton\n isText\n size=\"tiny\"\n isLoading={isCancelLoading}\n disabled={!obj.isCancelable || isCancelled}\n textColor={Color.DarkGrey}\n onClick={confirmModalOnClick}\n >\n {t(Translation.Misc.Cancel)}\n </BEButton>\n </div>\n </div>\n <div className=\"u-flex u-flex-direction-row align-items-center\">\n <Text type={TextType.Small} color={Color.DarkGrey}>\n {t(Translation.Misc.Total)}\n </Text>\n <div className=\"u-marg-left\">\n {!isCancelled ? (\n <Text color={Color.Navy}>\n <strong>\n <Currency>{obj.total.afterTax}</Currency>\n </strong>\n </Text>\n ) : (\n <Text color={Color.Navy}>\n <del>\n <strong className=\"u-flex u-flex-direction-row align-items-center\">\n <Currency>{obj.total.afterTax}</Currency>\n </strong>\n </del>\n </Text>\n )}\n </div>\n </div>\n </div>\n </div>\n <ReservationRowModal open={isModalOpen} onClose={closeModalOnClick} reservation={props.reservation} images={images} />\n <ConfirmationModal open={confirmOpen} message=\"Are you sure you want to cancel this reservation?\" onConfirm={onConfirmHandler} onClose={openConfirmationHandler} />\n </>\n );\n}\n"]}
1
+ {"version":3,"file":"ReservationRow.js","sourceRoot":"/","sources":["src/pages/findReservation/ReservationRow.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,iDAAkD;AAClD,2CAA4D;AAC5D,yCAAuD;AACvD,kDAA0B;AAC1B,+CAAwC;AACxC,iDAA+C;AAC/C,0DAAuD;AAEvD,kEAAmC;AACnC,6EAAqD;AACrD,6EAAqD;AACrD,uEAAgE;AAChE,qGAA6E;AAC7E,kEAA2D;AAC3D,oGAA4E;AAC5E,gFAA6E;AAE7E,sGAA8E;AAC9E,wCAAqC;AACrC,iEAAyC;AACzC,uEAA+C;AAO/C,SAAwB,cAAc,CAAC,KAA0B;;IAC7D,MAAM,EAAE,CAAC,EAAE,GAAG,IAAA,8BAAc,GAAE,CAAC;IAC/B,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,uBAAe,GAAE,CAAC;IACpC,MAAM,EAAE,KAAK,EAAE,GAAG,IAAA,gBAAQ,GAAE,CAAC;IAE7B,MAAM,GAAG,GAAG,KAAK,CAAC,WAAW,CAAC;IAE9B,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,IAAA,gBAAQ,EAAC,KAAK,CAAC,CAAC;IACtD,MAAM,CAAC,WAAW,EAAE,c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AAY,IAAI,WAAW,EAC1C,SAAS,EAAE,aAAK,CAAC,QAAQ,EACzB,OAAO,EAAE,mBAAmB,IAE3B,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,MAAM,CAAC,CACpB,CACT,CACJ;gBACN,uCAAK,SAAS,EAAC,gDAAgD;oBAC3D,8BAAC,cAAI,IAAC,IAAI,EAAE,eAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,aAAK,CAAC,QAAQ,IAC5C,CAAC,CAAC,yBAAW,CAAC,IAAI,CAAC,KAAK,CAAC,CACvB;oBACP,uCAAK,SAAS,EAAC,aAAa,IACvB,CAAC,WAAW,CAAC,CAAC,CAAC,CACZ,8BAAC,cAAI,IAAC,KAAK,EAAE,aAAK,CAAC,IAAI;wBACnB;4BACI,8BAAC,kBAAQ,QAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAY,CACpC,CACN,CACV,CAAC,CAAC,CAAC,CACA,8BAAC,cAAI,IAAC,KAAK,EAAE,aAAK,CAAC,IAAI;wBACnB;4BACI,0CAAQ,SAAS,EAAC,gDAAgD;gCAC9D,8BAAC,kBAAQ,QAAE,GAAG,CAAC,KAAK,CAAC,QAAQ,CAAY,CACpC,CACP,CACH,CACV,CACC,CACJ,CACJ,CACJ;QACN,8BAAC,6BAAmB,IAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,iBAAiB,EAAE,WAAW,EAAE,KAAK,CAAC,WAAW,EAAE,MAAM,EAAE,MAAM,GAAI;QACtH,8BAAC,2BAAiB,IAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAC,mDAAmD,EAAC,SAAS,EAAE,gBAAgB,EAAE,OAAO,EAAE,uBAAuB,GAAI,CACpK,CACN,CAAC;AACN,CAAC;AAnMD,iCAmMC","sourcesContent":["import { ErrorHandler } from '@frontend/contexts';\nimport { useCurrentHotel, useEvent } from '@frontend/hooks';\nimport { EBookingPaymentMethod } from '@roomstay/core';\nimport dayjs from 'dayjs';\nimport React, { useState } from 'react';\nimport { useTranslation } from 'react-i18next';\nimport { Translation } from 'translations/Translation';\n\nimport API from '@/api/BookingAPI';\nimport BEButton from '@/components/generic/BEButton';\nimport Currency from '@/components/generic/Currency';\nimport Icon, { IconType } from '@/components/generic/Icon/Icon';\nimport ConfirmationModal from '@/components/generic/modal/ConfirmationModal';\nimport Text, { TextType } from '@/components/generic/Text';\nimport ImageGallerySlider from '@/components/steps/room/ImageGallerySlider';\nimport { CancelledBookingEvent } from '@/events/views/CancelledBookingEvent';\nimport { ReservationDTO } from '@/models/Api/ReservationsDTO';\nimport ReservationRowModal from '@/pages/findReservation/ReservationRowModal';\nimport { Color } from '@/util/Color';\nimport DataLayer from '@/util/DataLayer';\nimport StringHelper from '@/util/StringHelper';\n\ninterface ReservationRowProps {\n reservation: ReservationDTO;\n onCancelled?: () => void;\n}\n\nexport default function ReservationRow(props: ReservationRowProps) {\n const { t } = useTranslation();\n const { hotel } = useCurrentHotel();\n const { raise } = useEvent();\n\n const obj = props.reservation;\n\n const [isModalOpen, setIsModalOpen] = useState(false);\n const [isCancelled, setIsCancelled] = useState(obj.status === 'Cancelled');\n const [isCancelLoading, setIsCancelLoading] = useState(false);\n\n const [confirmOpen, setConfirmOpen] = useState(false);\n\n let adultsAndChildren = StringHelper.pluralWithDictAndCount(obj.guestCounts.adults, Translation.Step.Date.Adult, t);\n\n if (obj.guestCounts.children) {\n adultsAndChildren += ', ' + StringHelper.pluralWithDictAndCount(obj.guestCounts.children, Translation.Step.Date.Child, t);\n }\n\n const nightKeys = Object.keys(obj.nights);\n\n const openModalOnClick = () => {\n setIsModalOpen(true);\n };\n const closeModalOnClick = () => {\n setIsModalOpen(false);\n };\n const confirmModalOnClick = () => {\n setConfirmOpen(true);\n };\n const onConfirmHandler = () => {\n cancelRow();\n setConfirmOpen(false);\n };\n const openConfirmationHandler = () => {\n setConfirmOpen(false);\n };\n\n const firstNight = dayjs(nightKeys[0]);\n const lastNight = dayjs(nightKeys[nightKeys.length - 1]).add(1, 'day');\n\n let images: string[] = obj.images;\n\n if ((!images || !images.length) && hotel?.rooms[obj.roomCode]) {\n images = hotel?.rooms[obj.roomCode].images;\n }\n\n const cancelRow = () => {\n setIsCancelLoading(true);\n\n API.Reservation.cancelReservation(obj.reservationNumber, obj.guest.email, hotel?.hotelID as string)\n .then(() => {\n DataLayer.instance.sendCancellation(obj.reservationNumber);\n raise(new CancelledBookingEvent(obj.reservationNumber, obj.guest.email));\n\n setIsCancelled(true);\n setIsCancelLoading(false);\n\n if (props.onCancelled) {\n props.onCancelled();\n }\n })\n .catch((ex) => {\n ErrorHandler.add({\n title: t(Translation.Step.Thanks.Errors.CancelFailed),\n message: ex.Message,\n });\n });\n };\n\n const roomName = obj.roomType ? obj.roomType : hotel?.rooms[obj.roomCode]?.name;\n\n return (\n <>\n <div className=\"reservation-row\">\n <div className=\"room-details +is-open \">\n <div className=\"room-details--image\">\n <ImageGallerySlider images={images} />\n </div>\n <div className=\"room-details--content u-pad--heavy u-pad@m-\">\n <div className=\"u-marg-bottom\">\n <div className=\"room-details--content-title u-marg-bottom--light\">\n {!isCancelled ? (\n <Text>\n <strong>{roomName}</strong>\n <small style={{ color: Color.Grey }}> #{obj.reservationNumber}</small>\n </Text>\n ) : (\n <Text>\n <del>\n <strong>{roomName}</strong>\n </del>\n <small style={{ color: Color.Alert }}> {t(Translation.Misc.Cancelled)}</small>\n </Text>\n )}\n </div>\n <div className=\"room-details--content-description u-marg-bottom--light\">\n <Text color={Color.DarkGrey} type={TextType.Small}>\n <>\n {hotel?.name} - {hotel?.address?.line1}\n </>\n </Text>\n </div>\n </div>\n\n <div className=\"\">\n <ul>\n <li className=\"u-flex justify-content-start u-marg-bottom--light\">\n <Icon color={Color.Grey} icon={IconType.Person} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>\n {obj.guest.firstName} {obj.guest.lastName} <span style={{ color: Color.DarkGrey }}>- {adultsAndChildren}</span>\n </Text>\n </div>\n </li>\n <li className=\"u-flex justify-content-start u-marg-bottom--light\">\n <Icon icon={IconType.Email} color={Color.Grey} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>{obj.guest.email}</Text>\n </div>\n </li>\n <li className=\"u-flex justify-content-start u-marg-bottom--light\">\n <Icon icon={IconType.Calendar} color={Color.Grey} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>{firstNight.format('dddd, MMM D, YYYY')}</Text>\n <Text type={TextType.Small}>{lastNight.format('dddd, MMM D, YYYY')}</Text>\n </div>\n </li>\n <li className=\"u-flex justify-content-start\">\n <Icon icon={IconType.CreditCard} color={Color.Grey} />\n <div className=\"u-marg-left--light\">\n <Text type={TextType.Small}>\n {obj?.paymentMethod === EBookingPaymentMethod.Planpay ? (\n t(Translation.Step.Confirmation.PaidWithPlanpay)\n ) : (\n <>\n •••• •••• •••• {obj.paymentCard?.last4 ?? 'N/A'}{' '}\n <span style={{ color: Color.DarkGrey }}>({obj.paymentCard?.type ?? 'N/A'})</span>\n </>\n )}\n </Text>\n </div>\n </li>\n </ul>\n </div>\n </div>\n </div>\n <div className=\"reservation-row--actions\">\n <div className=\"u-flex justify-content-start align-items-center\">\n <div className=\"u-marg-right--heavy u-inline-flex\">\n <BEButton icon={IconType.ArrowRight2} isText primary size=\"tiny\" iconPosition=\"right\" onClick={openModalOnClick}>\n {t(Translation.Step.Room.RoomInfo.MoreDetails)}\n </BEButton>\n </div>\n <div className=\"u-inline-flex\">\n <BEButton\n isText\n size=\"tiny\"\n isLoading={isCancelLoading}\n disabled={!obj.isCancelable || isCancelled}\n textColor={Color.DarkGrey}\n onClick={confirmModalOnClick}\n >\n {t(Translation.Misc.Cancel)}\n </BEButton>\n </div>\n </div>\n <div className=\"u-flex u-flex-direction-row align-items-center\">\n <Text type={TextType.Small} color={Color.DarkGrey}>\n {t(Translation.Misc.Total)}\n </Text>\n <div className=\"u-marg-left\">\n {!isCancelled ? (\n <Text color={Color.Navy}>\n <strong>\n <Currency>{obj.total.afterTax}</Currency>\n </strong>\n </Text>\n ) : (\n <Text color={Color.Navy}>\n <del>\n <strong className=\"u-flex u-flex-direction-row align-items-center\">\n <Currency>{obj.total.afterTax}</Currency>\n </strong>\n </del>\n </Text>\n )}\n </div>\n </div>\n </div>\n </div>\n <ReservationRowModal open={isModalOpen} onClose={closeModalOnClick} reservation={props.reservation} images={images} />\n <ConfirmationModal open={confirmOpen} message=\"Are you sure you want to cancel this reservation?\" onConfirm={onConfirmHandler} onClose={openConfirmationHandler} />\n </>\n );\n}\n"]}
@@ -12,6 +12,7 @@ const InlineAddonStepFeature_1 = __importDefault(require("./feature/InlineAddonS
12
12
  const MemberPortalFeature_1 = __importDefault(require("./feature/MemberPortalFeature"));
13
13
  const ModifyBookingFeature_1 = __importDefault(require("./feature/ModifyBookingFeature"));
14
14
  const NumberOfPeopleBookedPillFeature_1 = __importDefault(require("./feature/NumberOfPeopleBookedPillFeature"));
15
+ const PlanPayPricePreviewFeature_1 = __importDefault(require("./feature/PlanPayPricePreviewFeature"));
15
16
  const RoomUpsellFeature_1 = __importDefault(require("./feature/RoomUpsellFeature"));
16
17
  const ShowIATANumberOnCheckoutFeature_1 = __importDefault(require("./feature/ShowIATANumberOnCheckoutFeature"));
17
18
  class FeatureProvider {
@@ -43,5 +44,6 @@ FeatureProvider.features = [
43
44
  NumberOfPeopleBookedPillFeature_1.default,
44
45
  FullPageEngineSmallSpacingFeature_1.default,
45
46
  ModifyBookingFeature_1.default,
47
+ PlanPayPricePreviewFeature_1.default,
46
48
  ];
47
49
  //# sourceMappingURL=FeatureProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FeatureProvider.js","sourceRoot":"/","sources":["src/providers/FeatureProvider.ts"],"names":[],"mappings":";;;;;AAAA,8GAAsF;AACtF,sGAA8E;AAC9E,kHAA0F;AAC1F,oGAA4E;AAC5E,8HAAsG;AACtG,wGAAgF;AAChF,kGAA0E;AAC1E,oGAA4E;AAC5E,0HAAkG;AAClG,8FAAsE;AACtE,0HAAkG;AAElG,MAAqB,eAAe;IAezB,MAAM,CAAC,IAAI,CAAC,IAAuF;QACtG,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,EAAE;gBAChD,OAAO,CAAC,IAAI,EAAE,CAAC;aAClB;SACJ;IACL,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,IAAuF;QACxG,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,EAAE;gBAChD,OAAO,CAAC,MAAM,EAAE,CAAC;aACpB;SACJ;IACL,CAAC;;AA7BL,kCA8BC;AA7BkB,wBAAQ,GAAG;IACtB,gCAAsB;IACtB,+BAAqB;IACrB,2BAAiB;IACjB,8BAAoB;IACpB,mCAAyB;IACzB,yCAA+B;IAC/B,qCAA2B;IAC3B,6BAAmB;IACnB,yCAA+B;IAC/B,2CAAiC;IACjC,8BAAoB;CACvB,CAAC","sourcesContent":["import ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport DatePickerTypeFeature from '@/providers/feature/DatePickerTypeFeature';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport FeaturedPromoFeature from '@/providers/feature/FeaturedPromoFeature';\nimport FullPageEngineSmallSpacingFeature from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport MemberPortalFeature from '@/providers/feature/MemberPortalFeature';\nimport ModifyBookingFeature from '@/providers/feature/ModifyBookingFeature';\nimport NumberOfPeopleBookedPillFeature from '@/providers/feature/NumberOfPeopleBookedPillFeature';\nimport RoomUpsellFeature from '@/providers/feature/RoomUpsellFeature';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\nexport default class FeatureProvider {\n private static features = [\n InlineAddonStepFeature,\n DatePickerTypeFeature,\n RoomUpsellFeature,\n FeaturedPromoFeature,\n ConfirmationVerifyFeature,\n ShowIATANumberOnCheckoutFeature,\n E164PhoneNumberFieldFeature,\n MemberPortalFeature,\n NumberOfPeopleBookedPillFeature,\n FullPageEngineSmallSpacingFeature,\n ModifyBookingFeature,\n ];\n\n public static load(name: string | (typeof FeatureProvider.features)[keyof typeof FeatureProvider.features]) {\n for (const feature of this.features) {\n if (feature.getName() === name || name === feature) {\n feature.load();\n }\n }\n }\n\n public static unLoad(name: string | (typeof FeatureProvider.features)[keyof typeof FeatureProvider.features]) {\n for (const feature of this.features) {\n if (feature.getName() === name || name === feature) {\n feature.unLoad();\n }\n }\n }\n}\n"]}
1
+ {"version":3,"file":"FeatureProvider.js","sourceRoot":"/","sources":["src/providers/FeatureProvider.ts"],"names":[],"mappings":";;;;;AAAA,8GAAsF;AACtF,sGAA8E;AAC9E,kHAA0F;AAC1F,oGAA4E;AAC5E,8HAAsG;AACtG,wGAAgF;AAChF,kGAA0E;AAC1E,oGAA4E;AAC5E,0HAAkG;AAClG,gHAAwF;AACxF,8FAAsE;AACtE,0HAAkG;AAElG,MAAqB,eAAe;IAgBzB,MAAM,CAAC,IAAI,CAAC,IAAuF;QACtG,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,EAAE;gBAChD,OAAO,CAAC,IAAI,EAAE,CAAC;aAClB;SACJ;IACL,CAAC;IAEM,MAAM,CAAC,MAAM,CAAC,IAAuF;QACxG,KAAK,MAAM,OAAO,IAAI,IAAI,CAAC,QAAQ,EAAE;YACjC,IAAI,OAAO,CAAC,OAAO,EAAE,KAAK,IAAI,IAAI,IAAI,KAAK,OAAO,EAAE;gBAChD,OAAO,CAAC,MAAM,EAAE,CAAC;aACpB;SACJ;IACL,CAAC;;AA9BL,kCA+BC;AA9BkB,wBAAQ,GAAG;IACtB,gCAAsB;IACtB,+BAAqB;IACrB,2BAAiB;IACjB,8BAAoB;IACpB,mCAAyB;IACzB,yCAA+B;IAC/B,qCAA2B;IAC3B,6BAAmB;IACnB,yCAA+B;IAC/B,2CAAiC;IACjC,8BAAoB;IACpB,oCAA0B;CAC7B,CAAC","sourcesContent":["import ConfirmationVerifyFeature from '@/providers/feature/ConfirmationVerifyFeature';\nimport DatePickerTypeFeature from '@/providers/feature/DatePickerTypeFeature';\nimport E164PhoneNumberFieldFeature from '@/providers/feature/E164PhoneNumberFieldFeature';\nimport FeaturedPromoFeature from '@/providers/feature/FeaturedPromoFeature';\nimport FullPageEngineSmallSpacingFeature from '@/providers/feature/FullPageEngineSmallSpacingFeature';\nimport InlineAddonStepFeature from '@/providers/feature/InlineAddonStepFeature';\nimport MemberPortalFeature from '@/providers/feature/MemberPortalFeature';\nimport ModifyBookingFeature from '@/providers/feature/ModifyBookingFeature';\nimport NumberOfPeopleBookedPillFeature from '@/providers/feature/NumberOfPeopleBookedPillFeature';\nimport PlanPayPricePreviewFeature from '@/providers/feature/PlanPayPricePreviewFeature';\nimport RoomUpsellFeature from '@/providers/feature/RoomUpsellFeature';\nimport ShowIATANumberOnCheckoutFeature from '@/providers/feature/ShowIATANumberOnCheckoutFeature';\n\nexport default class FeatureProvider {\n private static features = [\n InlineAddonStepFeature,\n DatePickerTypeFeature,\n RoomUpsellFeature,\n FeaturedPromoFeature,\n ConfirmationVerifyFeature,\n ShowIATANumberOnCheckoutFeature,\n E164PhoneNumberFieldFeature,\n MemberPortalFeature,\n NumberOfPeopleBookedPillFeature,\n FullPageEngineSmallSpacingFeature,\n ModifyBookingFeature,\n PlanPayPricePreviewFeature,\n ];\n\n public static load(name: string | (typeof FeatureProvider.features)[keyof typeof FeatureProvider.features]) {\n for (const feature of this.features) {\n if (feature.getName() === name || name === feature) {\n feature.load();\n }\n }\n }\n\n public static unLoad(name: string | (typeof FeatureProvider.features)[keyof typeof FeatureProvider.features]) {\n for (const feature of this.features) {\n if (feature.getName() === name || name === feature) {\n feature.unLoad();\n }\n }\n }\n}\n"]}
@@ -0,0 +1,7 @@
1
+ import { Feature } from './Feature';
2
+ declare class PlanPayPricePreviewFeature extends Feature {
3
+ constructor();
4
+ protected onLoad(): void;
5
+ }
6
+ declare const _default: PlanPayPricePreviewFeature;
7
+ export default _default;
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const Feature_1 = require("./Feature");
4
+ class PlanPayPricePreviewFeature extends Feature_1.Feature {
5
+ constructor() {
6
+ super('FeaturedPromoFeature');
7
+ }
8
+ onLoad() {
9
+ // OnLoad check is enough. No need for triggers
10
+ }
11
+ }
12
+ exports.default = new PlanPayPricePreviewFeature();
13
+ //# sourceMappingURL=PlanPayPricePreviewFeature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PlanPayPricePreviewFeature.js","sourceRoot":"/","sources":["src/providers/feature/PlanPayPricePreviewFeature.ts"],"names":[],"mappings":";;AAAA,yDAAsD;AAEtD,MAAM,0BAA2B,SAAQ,iBAAO;IAC5C;QACI,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAClC,CAAC;IAES,MAAM;QACZ,+CAA+C;IACnD,CAAC;CACJ;AAED,kBAAe,IAAI,0BAA0B,EAAE,CAAC","sourcesContent":["import { Feature } from '@/providers/feature/Feature';\n\nclass PlanPayPricePreviewFeature extends Feature {\n public constructor() {\n super('FeaturedPromoFeature');\n }\n\n protected onLoad() {\n // OnLoad check is enough. No need for triggers\n }\n}\n\nexport default new PlanPayPricePreviewFeature();\n"]}