@roomstay/frontend 2.3.20 → 2.3.21

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.
@@ -44,7 +44,7 @@ const PlanpayPrice = ({ price, checkin, currency }) => {
44
44
  }, [price, currency, checkin]);
45
45
  if (!(hotel === null || hotel === void 0 ? void 0 : hotel.planpay))
46
46
  return null;
47
- return (react_1.default.createElement("div", { style: { whiteSpace: 'nowrap', marginRight: -16, marginTop: -10, marginBottom: -8 }, "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 }));
47
+ 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 }));
48
48
  };
49
49
  exports.PlanpayPrice = PlanpayPrice;
50
50
  //# sourceMappingURL=PlanpayPrice.js.map
@@ -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,4BAC5D,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 }}\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,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"]}