@mirai/core 0.3.9 → 0.3.11

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.
Files changed (101) hide show
  1. package/build/components/Booking/Booking.l10n.js +2 -2
  2. package/build/components/Booking/Booking.l10n.js.map +1 -1
  3. package/build/components/Booking/partials/Booking.Others.js +2 -2
  4. package/build/components/Booking/partials/Booking.Others.js.map +1 -1
  5. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap +8 -8
  6. package/build/components/Checkout/Checkout.js +2 -2
  7. package/build/components/Checkout/Checkout.js.map +1 -1
  8. package/build/components/Checkout/partials/Checkout.Form.js +3 -1
  9. package/build/components/Checkout/partials/Checkout.Form.js.map +1 -1
  10. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +32 -0
  11. package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +4 -4
  12. package/build/components/Finder/Finder.constants.js +1 -1
  13. package/build/components/Finder/Finder.constants.js.map +1 -1
  14. package/build/components/Finder/__tests__/__snapshots__/Finder.test.js.snap +7 -7
  15. package/build/components/Rates/Rates.Footer.js +135 -0
  16. package/build/components/Rates/Rates.Footer.js.map +1 -0
  17. package/build/components/Rates/Rates.constants.js +2 -0
  18. package/build/components/Rates/Rates.constants.js.map +1 -0
  19. package/build/components/Rates/Rates.js +176 -0
  20. package/build/components/Rates/Rates.js.map +1 -0
  21. package/build/components/Rates/Rates.l10n.js +15 -0
  22. package/build/components/Rates/Rates.l10n.js.map +1 -0
  23. package/build/components/Rates/Rates.module.css +142 -0
  24. package/build/components/Rates/__services__/Rates/get.js +2 -0
  25. package/build/components/Rates/__services__/Rates/get.js.map +1 -0
  26. package/build/components/Rates/components/Item/Item.js +276 -0
  27. package/build/components/Rates/components/Item/Item.js.map +1 -0
  28. package/build/components/Rates/components/Item/Item.l10n.js +64 -0
  29. package/build/components/Rates/components/Item/Item.l10n.js.map +1 -0
  30. package/build/components/Rates/components/Item/Item.module.css +135 -0
  31. package/build/components/Rates/components/Item/components/Amenities/Amenities.js +60 -0
  32. package/build/components/Rates/components/Item/components/Amenities/Amenities.js.map +1 -0
  33. package/build/components/Rates/components/Item/components/Amenities/Amenities.module.css +27 -0
  34. package/build/components/Rates/components/Item/components/Amenities/index.js +17 -0
  35. package/build/components/Rates/components/Item/components/Amenities/index.js.map +1 -0
  36. package/build/components/Rates/components/Item/components/Discount/Discount.js +88 -0
  37. package/build/components/Rates/components/Item/components/Discount/Discount.js.map +1 -0
  38. package/build/components/Rates/components/Item/components/Discount/Discount.module.css +30 -0
  39. package/build/components/Rates/components/Item/components/Discount/index.js +17 -0
  40. package/build/components/Rates/components/Item/components/Discount/index.js.map +1 -0
  41. package/build/components/Rates/components/Item/components/Features/Features.js +78 -0
  42. package/build/components/Rates/components/Item/components/Features/Features.js.map +1 -0
  43. package/build/components/Rates/components/Item/components/Features/Features.module.css +20 -0
  44. package/build/components/Rates/components/Item/components/Features/index.js +17 -0
  45. package/build/components/Rates/components/Item/components/Features/index.js.map +1 -0
  46. package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js +87 -0
  47. package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js.map +1 -0
  48. package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.module.css +23 -0
  49. package/build/components/Rates/components/Item/components/ModalInfo/index.js +17 -0
  50. package/build/components/Rates/components/Item/components/ModalInfo/index.js.map +1 -0
  51. package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js +59 -0
  52. package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js.map +1 -0
  53. package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.module.css +4 -0
  54. package/build/components/Rates/components/Item/components/ModalRateInfo/index.js +17 -0
  55. package/build/components/Rates/components/Item/components/ModalRateInfo/index.js.map +1 -0
  56. package/build/components/Rates/components/Item/components/index.js +61 -0
  57. package/build/components/Rates/components/Item/components/index.js.map +1 -0
  58. package/build/components/Rates/components/Item/index.js +35 -0
  59. package/build/components/Rates/components/Item/index.js.map +1 -0
  60. package/build/components/Rates/components/index.js +17 -0
  61. package/build/components/Rates/components/index.js.map +1 -0
  62. package/build/components/Rates/helpers/getCheckoutParams.js +56 -0
  63. package/build/components/Rates/helpers/getCheckoutParams.js.map +1 -0
  64. package/build/components/Rates/helpers/index.js +17 -0
  65. package/build/components/Rates/helpers/index.js.map +1 -0
  66. package/build/components/Rates/index.js +13 -0
  67. package/build/components/Rates/index.js.map +1 -0
  68. package/build/components/__shared__/ButtonMore/ButtonMore.js +5 -3
  69. package/build/components/__shared__/ButtonMore/ButtonMore.js.map +1 -1
  70. package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +7 -7
  71. package/build/components/helpers/ICON.AMENITIES.js +109 -0
  72. package/build/components/helpers/ICON.AMENITIES.js.map +1 -0
  73. package/build/components/helpers/ICON.js +7 -3
  74. package/build/components/helpers/ICON.js.map +1 -1
  75. package/build/components/index.js +5 -1
  76. package/build/components/index.js.map +1 -1
  77. package/build/helpers/consolidateStore.js +2 -1
  78. package/build/helpers/consolidateStore.js.map +1 -1
  79. package/build/services/Rates/__tests__/__mocks__/rates-success-boards.json +31398 -0
  80. package/build/services/Rates/__tests__/__mocks__/rates-success.json +9117 -0
  81. package/build/services/Rates/constants.js +90 -0
  82. package/build/services/Rates/constants.js.map +1 -0
  83. package/build/services/Rates/get.js +221 -0
  84. package/build/services/Rates/get.js.map +1 -0
  85. package/build/services/Rates/helpers/index.js +39 -0
  86. package/build/services/Rates/helpers/index.js.map +1 -0
  87. package/build/services/Rates/helpers/normalizePrice.js +14 -0
  88. package/build/services/Rates/helpers/normalizePrice.js.map +1 -0
  89. package/build/services/Rates/helpers/parseAmenities.js +109 -0
  90. package/build/services/Rates/helpers/parseAmenities.js.map +1 -0
  91. package/build/services/Rates/helpers/parseDiscount.js +35 -0
  92. package/build/services/Rates/helpers/parseDiscount.js.map +1 -0
  93. package/build/services/Rates/index.js +11 -0
  94. package/build/services/Rates/index.js.map +1 -0
  95. package/build/services/index.js +11 -0
  96. package/build/services/index.js.map +1 -1
  97. package/package.json +2 -1
  98. package/public/App.jsx +2 -2
  99. package/public/routes/Step2-Checkout.jsx +1 -1
  100. package/public/routes/index.js +1 -1
  101. package/public/themes/monalisa.theme.css +0 -1
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.parseDiscount = void 0;
7
+ var _normalizePrice = require("./normalizePrice");
8
+ var parseDiscount = exports.parseDiscount = function parseDiscount() {
9
+ var _ref = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {},
10
+ promoCodeValue = _ref.clientCodeDiscountPercentInCents,
11
+ promoCode = _ref.clientCodeTotal,
12
+ clubValue = _ref.clubDiscountPercentInCents,
13
+ club = _ref.clubTotal,
14
+ currency = _ref.currency,
15
+ dealValue = _ref.offerDiscountPercentInCents,
16
+ deal = _ref.offerTotal,
17
+ originalPrice = _ref.originalPrice,
18
+ totalPrice = _ref.totalPrice;
19
+ return {
20
+ percentage: +Number.parseFloat((originalPrice - totalPrice) * 100 / originalPrice).toFixed(0),
21
+ breakdown: [club ? {
22
+ type: 0,
23
+ value: (0, _normalizePrice.normalizePrice)(club.original * (clubValue / 10000), currency)
24
+ } : undefined, deal ? {
25
+ type: 1,
26
+ value: (0, _normalizePrice.normalizePrice)(deal.original * (dealValue / 10000), currency)
27
+ } : undefined, promoCode ? {
28
+ type: 2,
29
+ value: (0, _normalizePrice.normalizePrice)(promoCode.original * (promoCodeValue / 10000), currency)
30
+ } : undefined].filter(function (value) {
31
+ return !!value;
32
+ })
33
+ };
34
+ };
35
+ //# sourceMappingURL=parseDiscount.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseDiscount.js","names":["_normalizePrice","require","parseDiscount","exports","_ref","arguments","length","undefined","promoCodeValue","clientCodeDiscountPercentInCents","promoCode","clientCodeTotal","clubValue","clubDiscountPercentInCents","club","clubTotal","currency","dealValue","offerDiscountPercentInCents","deal","offerTotal","originalPrice","totalPrice","percentage","Number","parseFloat","toFixed","breakdown","type","value","normalizePrice","original","filter"],"sources":["../../../../src/services/Rates/helpers/parseDiscount.js"],"sourcesContent":["import { normalizePrice } from './normalizePrice';\n\nexport const parseDiscount = ({\n clientCodeDiscountPercentInCents: promoCodeValue,\n clientCodeTotal: promoCode,\n clubDiscountPercentInCents: clubValue,\n clubTotal: club,\n currency,\n offerDiscountPercentInCents: dealValue,\n offerTotal: deal,\n originalPrice,\n totalPrice,\n} = {}) => ({\n percentage: +Number.parseFloat(((originalPrice - totalPrice) * 100) / originalPrice).toFixed(0),\n breakdown: [\n club\n ? {\n type: 0,\n value: normalizePrice(club.original * (clubValue / 10000), currency),\n }\n : undefined,\n deal\n ? {\n type: 1,\n value: normalizePrice(deal.original * (dealValue / 10000), currency),\n }\n : undefined,\n promoCode\n ? {\n type: 2,\n value: normalizePrice(promoCode.original * (promoCodeValue / 10000), currency),\n }\n : undefined,\n ].filter((value) => !!value),\n});\n"],"mappings":";;;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAEO,IAAMC,aAAa,GAAAC,OAAA,CAAAD,aAAA,GAAG,SAAhBA,aAAaA,CAAA;EAAA,IAAAE,IAAA,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAUtB,CAAC,CAAC;IAT8BG,cAAc,GAAAJ,IAAA,CAAhDK,gCAAgC;IACfC,SAAS,GAAAN,IAAA,CAA1BO,eAAe;IACaC,SAAS,GAAAR,IAAA,CAArCS,0BAA0B;IACfC,IAAI,GAAAV,IAAA,CAAfW,SAAS;IACTC,QAAQ,GAAAZ,IAAA,CAARY,QAAQ;IACqBC,SAAS,GAAAb,IAAA,CAAtCc,2BAA2B;IACfC,IAAI,GAAAf,IAAA,CAAhBgB,UAAU;IACVC,aAAa,GAAAjB,IAAA,CAAbiB,aAAa;IACbC,UAAU,GAAAlB,IAAA,CAAVkB,UAAU;EAAA,OACA;IACVC,UAAU,EAAE,CAACC,MAAM,CAACC,UAAU,CAAE,CAACJ,aAAa,GAAGC,UAAU,IAAI,GAAG,GAAID,aAAa,CAAC,CAACK,OAAO,CAAC,CAAC,CAAC;IAC/FC,SAAS,EAAE,CACTb,IAAI,GACA;MACEc,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,IAAAC,8BAAc,EAAChB,IAAI,CAACiB,QAAQ,IAAInB,SAAS,GAAG,KAAK,CAAC,EAAEI,QAAQ;IACrE,CAAC,GACDT,SAAS,EACbY,IAAI,GACA;MACES,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,IAAAC,8BAAc,EAACX,IAAI,CAACY,QAAQ,IAAId,SAAS,GAAG,KAAK,CAAC,EAAED,QAAQ;IACrE,CAAC,GACDT,SAAS,EACbG,SAAS,GACL;MACEkB,IAAI,EAAE,CAAC;MACPC,KAAK,EAAE,IAAAC,8BAAc,EAACpB,SAAS,CAACqB,QAAQ,IAAIvB,cAAc,GAAG,KAAK,CAAC,EAAEQ,QAAQ;IAC/E,CAAC,GACDT,SAAS,CACd,CAACyB,MAAM,CAAC,UAACH,KAAK;MAAA,OAAK,CAAC,CAACA,KAAK;IAAA;EAC7B,CAAC;AAAA,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ServiceRates = void 0;
7
+ var _get = require("./get");
8
+ var ServiceRates = exports.ServiceRates = {
9
+ get: _get.get
10
+ };
11
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_get","require","ServiceRates","exports","get"],"sources":["../../../src/services/Rates/index.js"],"sourcesContent":["import { get } from './get';\n\nexport const ServiceRates = {\n get,\n};\n"],"mappings":";;;;;;AAAA,IAAAA,IAAA,GAAAC,OAAA;AAEO,IAAMC,YAAY,GAAAC,OAAA,CAAAD,YAAA,GAAG;EAC1BE,GAAG,EAAHA;AACF,CAAC"}
@@ -25,4 +25,15 @@ Object.keys(_Engine).forEach(function (key) {
25
25
  }
26
26
  });
27
27
  });
28
+ var _Rates = require("./Rates");
29
+ Object.keys(_Rates).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _Rates[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _Rates[key];
36
+ }
37
+ });
38
+ });
28
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_Club","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Engine"],"sources":["../../src/services/index.js"],"sourcesContent":["export * from './Club';\nexport * from './Engine';\n"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,OAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,OAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,OAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,OAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
1
+ {"version":3,"file":"index.js","names":["_Club","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_Engine","_Rates"],"sources":["../../src/services/index.js"],"sourcesContent":["export * from './Club';\nexport * from './Engine';\nexport * from './Rates';\n"],"mappings":";;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,KAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,KAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,KAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,OAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,OAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,OAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,OAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,MAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,MAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,MAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,MAAA,CAAAN,GAAA;IAAA;EAAA;AAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.3.9",
3
+ "version": "0.3.11",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",
@@ -28,6 +28,7 @@
28
28
  "@mirai/services": "^0.2",
29
29
  "@mirai/ui": "^1.0",
30
30
  "@sentry/react": "^7.57.0",
31
+ "js-sha1": "^0.6.0",
31
32
  "prop-types": "^15.8.1",
32
33
  "react": "^17.0.2",
33
34
  "react-dom": "^17.0.2",
package/public/App.jsx CHANGED
@@ -3,7 +3,7 @@ import ReactDOM from 'react-dom';
3
3
  import { useLocation, Route, Switch } from 'wouter';
4
4
 
5
5
  import { Container } from './App.Container';
6
- import { Deals, Home, NotFound, Profile, Signup, Step2, Step3 } from './routes';
6
+ import { Deals, Home, NotFound, Profile, Signup, Step1, Step2, Step3 } from './routes';
7
7
 
8
8
  const App = () => {
9
9
  const [location] = useLocation();
@@ -21,7 +21,7 @@ const App = () => {
21
21
  <Route path={'/profile'} component={Profile} />
22
22
  <Route path={'/deals'} component={Deals} />
23
23
  <Route path={'/step0-accommodations'} component={undefined} />
24
- <Route path={'/step1-rates'} component={undefined} />
24
+ <Route path={'/step1-rates'} component={Step1} />
25
25
  <Route path={'/step2-checkout'} component={Step2} />
26
26
  <Route path={'/step3-booking'} component={Step3} />
27
27
  <Route path="/:location*">{(params) => <NotFound {...params} />}</Route>
@@ -1,4 +1,4 @@
1
1
  import { View } from '@mirai/ui';
2
2
  import React from 'react';
3
3
 
4
- export const Step2 = () => <View data-mirai-component="checkout" />;
4
+ export const Step2 = () => <View data-mirai-component="checkout" data-session="false" />;
@@ -3,7 +3,7 @@ export * from './Home';
3
3
  export * from './NotFound';
4
4
  export * from './Profile';
5
5
  // export * from './step0-accommodations';
6
- // export * from './step1-rates';
6
+ export * from './Step1-Rates';
7
7
  export * from './Step2-Checkout';
8
8
  export * from './Step3-Booking';
9
9
  export * from './Signup';
@@ -13,7 +13,6 @@
13
13
 
14
14
  /* Button */
15
15
  --mirai-ui-button-font-weight: 700;
16
- --mirai-ui-button-secondary-background: transparent;
17
16
  }
18
17
 
19
18
  body {