@mirai/core 0.3.385 → 0.3.387
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/build/Core.constants.js +29 -9
- package/build/Core.constants.js.map +1 -1
- package/build/components/BannerLoyalty/BannerLoyalty.js +2 -1
- package/build/components/BannerLoyalty/BannerLoyalty.js.map +1 -1
- package/build/components/BannerLoyalty/BannerLoyalty.module.css +0 -5
- package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +4 -4
- package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +6 -6
- package/build/components/ButtonFinder/__tests__/__snapshots__/ButtonFinder.test.js.snap +5 -5
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +6 -6
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +4 -4
- package/build/components/Session/Session.Login.js +1 -0
- package/build/components/Session/Session.Login.js.map +1 -1
- package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +9 -9
- package/build/components/__shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap +4 -4
- package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +4 -4
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js +5 -5
- package/build/components/__shared__/ButtonPayment/components/FormAddon/FormAddon.js.map +1 -1
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js +8 -7
- package/build/components/__shared__/ButtonPayment/components/FormCheckout/FormCheckout.js.map +1 -1
- package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +46 -61
- package/build/components/helpers/constants.js +8 -1
- package/build/components/helpers/constants.js.map +1 -1
- package/build/contexts/EventManager/EventManager.constants.js.map +1 -0
- package/build/{components → contexts}/EventManager/EventManager.js +1 -1
- package/build/contexts/EventManager/EventManager.js.map +1 -0
- package/build/contexts/EventManager/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/PerfomanceManager.events.js +57 -0
- package/build/contexts/PerfomanceManager/PerfomanceManager.events.js.map +1 -0
- package/build/contexts/PerfomanceManager/PerfomanceManager.js +84 -0
- package/build/contexts/PerfomanceManager/PerfomanceManager.js.map +1 -0
- package/build/contexts/PerfomanceManager/PerfomanceManager.scripts.js +111 -0
- package/build/contexts/PerfomanceManager/PerfomanceManager.scripts.js.map +1 -0
- package/build/contexts/PerfomanceManager/helpers/dataLayerPush.js +19 -0
- package/build/contexts/PerfomanceManager/helpers/dataLayerPush.js.map +1 -0
- package/build/contexts/PerfomanceManager/helpers/getPerfomanceLabel.js +16 -0
- package/build/contexts/PerfomanceManager/helpers/getPerfomanceLabel.js.map +1 -0
- package/build/contexts/PerfomanceManager/helpers/googleTagManager.js +23 -0
- package/build/contexts/PerfomanceManager/helpers/googleTagManager.js.map +1 -0
- package/build/contexts/PerfomanceManager/helpers/index.js +39 -0
- package/build/contexts/PerfomanceManager/helpers/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/index.js +17 -0
- package/build/contexts/PerfomanceManager/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/affilired/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/affilired/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/affilired/index.js +11 -0
- package/build/contexts/PerfomanceManager/providers/affilired/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/bookingCancel.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/bookingCancel.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutForm.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutForm.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/checkoutResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/finderReady.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/finderReady.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/index.js +25 -0
- package/build/contexts/PerfomanceManager/providers/analytics/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/login.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/login.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/ratesAddToCart.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/analytics/ratesResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/analytics/ratesResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/bing/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/bing/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/bing/index.js +11 -0
- package/build/contexts/PerfomanceManager/providers/bing/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/facebook/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/facebook/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/facebook/checkoutResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/facebook/index.js +17 -0
- package/build/contexts/PerfomanceManager/providers/facebook/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js +14 -0
- package/build/contexts/PerfomanceManager/providers/facebook/ratesAddToCart.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/facebook/ratesResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/facebook/ratesResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/googleAds/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/googleAds/index.js +11 -0
- package/build/contexts/PerfomanceManager/providers/googleAds/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/gtm/bookingCancel.js +14 -0
- package/build/contexts/PerfomanceManager/providers/gtm/bookingCancel.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/gtm/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/gtm/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/gtm/checkoutResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/gtm/finderReady.js +14 -0
- package/build/contexts/PerfomanceManager/providers/gtm/finderReady.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/gtm/index.js +19 -0
- package/build/contexts/PerfomanceManager/providers/gtm/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/gtm/ratesResponse.js +206 -0
- package/build/contexts/PerfomanceManager/providers/gtm/ratesResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/index.js +83 -0
- package/build/contexts/PerfomanceManager/providers/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/mirai/bookingResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/mirai/bookingResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/mirai/checkoutResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/mirai/checkoutResponse.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/mirai/finderReady.js +14 -0
- package/build/contexts/PerfomanceManager/providers/mirai/finderReady.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/mirai/index.js +17 -0
- package/build/contexts/PerfomanceManager/providers/mirai/index.js.map +1 -0
- package/build/contexts/PerfomanceManager/providers/mirai/ratesResponse.js +14 -0
- package/build/contexts/PerfomanceManager/providers/mirai/ratesResponse.js.map +1 -0
- package/build/contexts/index.js +28 -0
- package/build/contexts/index.js.map +1 -0
- package/build/helpers/consolidateStore.js +26 -3
- package/build/helpers/consolidateStore.js.map +1 -1
- package/build/helpers/index.js +11 -0
- package/build/helpers/index.js.map +1 -1
- package/build/helpers/loadScript.js +43 -0
- package/build/helpers/loadScript.js.map +1 -0
- package/build/index.js +21 -18
- package/build/index.js.map +1 -1
- package/package.json +1 -1
- package/public/App.Container.jsx +1 -1
- package/public/index.html +2 -30
- package/public/routes/Deals.jsx +1 -1
- package/public/routes/Home.constants.js +52 -0
- package/public/routes/Home.jsx +12 -14
- package/public/routes/Step1-Rates.jsx +2 -2
- package/public/routes/routes.module.css +5 -0
- package/public/themes/monalisa.theme.css +18 -18
- package/build/components/EventManager/EventManager.constants.js.map +0 -1
- package/build/components/EventManager/EventManager.js.map +0 -1
- package/build/components/EventManager/index.js.map +0 -1
- /package/build/{components → contexts}/EventManager/EventManager.constants.js +0 -0
- /package/build/{components → contexts}/EventManager/index.js +0 -0
package/build/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_dataSources","require","_services","_react","_interopRequireDefault","_reactDom","_EventManager","_Core","_Core2","_helpers","_package","obj","__esModule","default","window","Mirai","components","undefined","config","environment","process","env","NODE_ENV","Event","services","booking","SERVICE_BOOKING","club","SERVICE_CLUB","dictionary","SERVICE_DICTIONARY","engine","SERVICE_ENGINE","static","SERVICE_STATIC","user","SERVICE_USER","version","core","isProduction","isDevelopment","isPreproduction","log","concat","name","console","urlParams","fetchUrlParams","location","search","cookies","fetchCookies","COOKIE_CART","COOKIE_PESTANA","COOKIE_VALUES","session","fetchSession","loadEnvironment","instance","findInstance","findComponents","length","theme","IS_PLAYWRIGHT","ReactDOM","render","createElement","StrictMode","StoreProvider","value","id","getLocale","Core","skeleton","el","fetchConfig","Sentry","SENTRY","loadSentry","checkSession","setUser","store","consolidateStore","ServiceFeatures","initialize","ServiceDictionary","cache","locale","get","MetricsProvider","token","METRICS","EventManager","ready","publish","filter","component","arguments","includes","addEventListener","event","persisted"],"sources":["../src/index.js"],"sourcesContent":["/* eslint-disable no-console */\nimport { Event, MetricsProvider, StoreProvider } from '@mirai/data-sources';\nimport { ServiceDictionary, ServiceFeatures } from '@mirai/services';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { EventManager } from './components/EventManager';\nimport { Core } from './Core';\nimport { COOKIE_CART, COOKIE_PESTANA, COOKIE_VALUES } from './Core.definition';\nimport {\n checkSession,\n consolidateStore,\n fetchConfig,\n fetchCookies,\n fetchSession,\n fetchUrlParams,\n findComponents,\n findInstance,\n getLocale,\n loadEnvironment,\n loadSentry,\n theme,\n} from './helpers';\nimport { name, version } from '../package.json';\n\nwindow.Mirai = {\n ...window.Mirai,\n components: undefined,\n config: undefined,\n environment: process.env.NODE_ENV,\n Event,\n services: {\n booking: process.env.SERVICE_BOOKING,\n club: process.env.SERVICE_CLUB,\n dictionary: process.env.SERVICE_DICTIONARY,\n engine: process.env.SERVICE_ENGINE,\n static: process.env.SERVICE_STATIC,\n user: process.env.SERVICE_USER,\n },\n version,\n};\n\nwindow.Mirai.core = async () => {\n const isProduction = process.env.NODE_ENV === 'production';\n const isDevelopment = process.env.NODE_ENV === 'development';\n const isPreproduction = process.env.NODE_ENV === 'preproduction';\n const log = `${isProduction ? '🟢' : isPreproduction ? '🟡' : isDevelopment ? '🔴' : '⚫️'} ${name} v${version}`;\n\n console.log(log, 'starting...');\n\n // 1. Fetch client-side dataSources\n const urlParams = fetchUrlParams(location.search);\n const cookies = fetchCookies([COOKIE_CART, COOKIE_PESTANA, COOKIE_VALUES]);\n let session = fetchSession(urlParams);\n\n // 2. Analyze environment\n const environment = urlParams.env && isProduction ? loadEnvironment(urlParams.env) : undefined;\n if (environment) return;\n\n // 3. Find instance\n const instance = findInstance({ urlParams });\n if (!instance) return;\n\n // 4. Find components\n const components = findComponents();\n if (!components.length) return;\n window.Mirai = { ...window.Mirai, components };\n\n // 5. Theming\n theme(urlParams);\n\n // 6. 1st render\n window &&\n !window.IS_PLAYWRIGHT &&\n ReactDOM.render(\n <React.StrictMode>\n <StoreProvider value={{ id: instance.id, session, urlParams, ...getLocale(instance, urlParams) }}>\n <Core {...{ components }} skeleton />\n </StoreProvider>\n </React.StrictMode>,\n instance.el,\n );\n\n // 7. Analize id to fetch its config\n const config = await fetchConfig(instance);\n if (!config) return;\n window.Mirai.config = config;\n\n // 8. Sentry\n let Sentry = window.Mirai.Sentry;\n if (!Sentry && process.env.SENTRY) {\n Sentry = loadSentry(process.env.SENTRY, version);\n window.Mirai.Sentry = Sentry;\n }\n\n // 9. Check session\n if (session && !(await checkSession(instance.id, session, config))) session = undefined;\n if (session && Sentry) Sentry.setUser(session);\n\n // 10. Consolidate store\n const store = await consolidateStore({ components, config, cookies, instance, session, urlParams });\n\n // 11. Initialize features\n await ServiceFeatures.initialize();\n\n // 12. Initialize dictionary\n if (!ServiceDictionary.cache(store.locale)) await ServiceDictionary.get(store.locale, false);\n\n // 13. Render components\n ReactDOM.render(\n <React.StrictMode>\n <MetricsProvider token={process.env.METRICS}>\n <StoreProvider value={store}>\n <Core {...{ components }} />\n <EventManager />\n </StoreProvider>\n </MetricsProvider>\n </React.StrictMode>,\n instance.el,\n );\n\n window.Mirai.ready = true;\n Event.publish('mirai.core::ready');\n\n console.log(log, '[READY]', window.Mirai);\n};\n\n(async () => {\n await window.Mirai.core();\n\n const { components = [], ready } = window.Mirai;\n\n if (ready && components.filter(({ component } = {}) => ['booking', 'checkout', 'rates'].includes(component).length)) {\n window.addEventListener('pageshow', (event) => event.persisted && window.Mirai.core());\n }\n})();\n"],"mappings":";;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,aAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA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,CAAC,CAAC;EACxF;AACF,CAAC,EAAE,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dataSources","require","_services","_react","_interopRequireDefault","_reactDom","_contexts","_Core","_Core2","_Core3","_helpers","_package","obj","__esModule","default","window","Mirai","components","undefined","config","environment","process","env","NODE_ENV","Event","services","booking","SERVICE_BOOKING","club","SERVICE_CLUB","dictionary","SERVICE_DICTIONARY","engine","SERVICE_ENGINE","static","SERVICE_STATIC","user","SERVICE_USER","version","core","isProduction","isDevelopment","isPreproduction","log","concat","name","console","urlParams","fetchUrlParams","location","search","cookies","fetchCookies","COOKIE_CART","COOKIE_PESTANA","COOKIE_VALUES","session","fetchSession","loadEnvironment","instance","findInstance","findComponents","length","theme","IS_PLAYWRIGHT","ReactDOM","render","createElement","StrictMode","StoreProvider","value","id","getLocale","Core","skeleton","el","fetchConfig","checkSession","store","consolidateStore","ServiceFeatures","initialize","ServiceDictionary","cache","locale","get","MetricsProvider","token","METRICS","EventManager","PerfomanceManager","Sentry","SENTRY","loadSentry","setUser","ready","setTimeout","publish","EVENT","CORE_READY","filter","component","arguments","includes","addEventListener","event","persisted"],"sources":["../src/index.js"],"sourcesContent":["/* eslint-disable no-console */\nimport { Event, MetricsProvider, StoreProvider } from '@mirai/data-sources';\nimport { ServiceDictionary, ServiceFeatures } from '@mirai/services';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\n\nimport { EventManager, PerfomanceManager } from './contexts';\nimport { Core } from './Core';\nimport { EVENT } from './Core.constants';\nimport { COOKIE_CART, COOKIE_PESTANA, COOKIE_VALUES } from './Core.definition';\nimport {\n checkSession,\n consolidateStore,\n fetchConfig,\n fetchCookies,\n fetchSession,\n fetchUrlParams,\n findComponents,\n findInstance,\n getLocale,\n loadEnvironment,\n loadSentry,\n theme,\n} from './helpers';\nimport { name, version } from '../package.json';\n\nwindow.Mirai = {\n ...window.Mirai,\n components: undefined,\n config: undefined,\n environment: process.env.NODE_ENV,\n Event,\n services: {\n booking: process.env.SERVICE_BOOKING,\n club: process.env.SERVICE_CLUB,\n dictionary: process.env.SERVICE_DICTIONARY,\n engine: process.env.SERVICE_ENGINE,\n static: process.env.SERVICE_STATIC,\n user: process.env.SERVICE_USER,\n },\n version,\n};\n\nwindow.Mirai.core = async () => {\n const isProduction = process.env.NODE_ENV === 'production';\n const isDevelopment = process.env.NODE_ENV === 'development';\n const isPreproduction = process.env.NODE_ENV === 'preproduction';\n const log = `${isProduction ? '🟢' : isPreproduction ? '🟡' : isDevelopment ? '🔴' : '⚫️'} ${name} v${version}`;\n\n console.log(log, 'starting...');\n\n // 1. Fetch client-side dataSources\n const urlParams = fetchUrlParams(location.search);\n const cookies = fetchCookies([COOKIE_CART, COOKIE_PESTANA, COOKIE_VALUES]);\n let session = fetchSession(urlParams);\n\n // 2. Analyze environment\n const environment = urlParams.env && isProduction ? loadEnvironment(urlParams.env) : undefined;\n if (environment) return;\n\n // 3. Find instance\n const instance = findInstance({ urlParams });\n if (!instance) return;\n\n // 4. Find components\n const components = findComponents();\n if (!components.length) return;\n window.Mirai = { ...window.Mirai, components };\n\n // 5. Theming\n theme(urlParams);\n\n // 6. 1st render\n window &&\n !window.IS_PLAYWRIGHT &&\n ReactDOM.render(\n <React.StrictMode>\n <StoreProvider value={{ id: instance.id, session, urlParams, ...getLocale(instance, urlParams) }}>\n <Core {...{ components }} skeleton />\n </StoreProvider>\n </React.StrictMode>,\n instance.el,\n );\n\n // 7. Analize id to fetch its config\n const config = await fetchConfig(instance);\n if (!config) return;\n window.Mirai.config = config;\n\n // 8. Check session\n if (session && !(await checkSession(instance.id, session, config))) session = undefined;\n\n // 9. Consolidate store\n const store = await consolidateStore({ components, config, cookies, instance, session, urlParams });\n\n // 10. Initialize features\n await ServiceFeatures.initialize();\n\n // 11. Initialize dictionary\n if (!ServiceDictionary.cache(store.locale)) await ServiceDictionary.get(store.locale, false);\n\n // 12. Render components\n ReactDOM.render(\n <React.StrictMode>\n <MetricsProvider token={process.env.METRICS}>\n <StoreProvider value={store}>\n <Core {...{ components }} />\n <EventManager />\n <PerfomanceManager />\n </StoreProvider>\n </MetricsProvider>\n </React.StrictMode>,\n instance.el,\n );\n\n // 13. Initialize sentry\n let Sentry = window.Mirai.Sentry;\n if (!Sentry && process.env.SENTRY) {\n Sentry = loadSentry(process.env.SENTRY, version);\n window.Mirai.Sentry = Sentry;\n }\n if (session && Sentry) Sentry.setUser(session);\n\n // 14. Up & Ready\n window.Mirai.ready = true;\n setTimeout(() => Event.publish(EVENT.CORE_READY, window.Mirai), 0);\n console.log(log, '[READY]', window.Mirai);\n};\n\n(async () => {\n await window.Mirai.core();\n\n const { components = [], ready } = window.Mirai;\n\n if (ready && components.filter(({ component } = {}) => ['booking', 'checkout', 'rates'].includes(component).length)) {\n window.addEventListener('pageshow', (event) => event.persisted && window.Mirai.core());\n }\n})();\n"],"mappings":";;AACA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,SAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,SAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,SAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAcA,IAAAU,QAAA,GAAAV,OAAA;AAAgD,SAAAG,uBAAAQ,GAAA,WAAAA,GAAA,IAAAA,GAAA,CAAAC,UAAA,GAAAD,GAAA,KAAAE,OAAA,EAAAF,GAAA;AAxBhD;;AA0BAG,MAAM,CAACC,KAAK,GAAG;EACb,GAAGD,MAAM,CAACC,KAAK;EACfC,UAAU,EAAEC,SAAS;EACrBC,MAAM,EAAED,SAAS;EACjBE,WAAW,EAAEC,OAAO,CAACC,GAAG,CAACC,QAAQ;EACjCC,KAAK,EAALA,kBAAK;EACLC,QAAQ,EAAE;IACRC,OAAO,EAAEL,OAAO,C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ACC,KAAK,CAAC2E,MAAM,GAAGA,MAAM;EAC9B;EACA,IAAInC,OAAO,IAAImC,MAAM,EAAEA,MAAM,CAACG,OAAO,CAACtC,OAAO,CAAC;;EAE9C;EACAzC,MAAM,CAACC,KAAK,CAAC+E,KAAK,GAAG,IAAI;EACzBC,UAAU,CAAC,MAAMxE,kBAAK,CAACyE,OAAO,CAACC,YAAK,CAACC,UAAU,EAAEpF,MAAM,CAACC,KAAK,CAAC,EAAE,CAAC,CAAC;EAClE8B,OAAO,CAACH,GAAG,CAACA,GAAG,EAAE,SAAS,EAAE5B,MAAM,CAACC,KAAK,CAAC;AAC3C,CAAC;AAED,CAAC,YAAY;EACX,MAAMD,MAAM,CAACC,KAAK,CAACuB,IAAI,CAAC,CAAC;EAEzB,MAAM;IAAEtB,UAAU,GAAG,EAAE;IAAE8E;EAAM,CAAC,GAAGhF,MAAM,CAACC,KAAK;EAE/C,IAAI+E,KAAK,IAAI9E,UAAU,CAACmF,MAAM,CAAC;IAAA,IAAC;MAAEC;IAAU,CAAC,GAAAC,SAAA,CAAAxC,MAAA,QAAAwC,SAAA,QAAApF,SAAA,GAAAoF,SAAA,MAAG,CAAC,CAAC;IAAA,OAAK,CAAC,SAAS,EAAE,UAAU,EAAE,OAAO,CAAC,CAACC,QAAQ,CAACF,SAAS,CAAC,CAACvC,MAAM;EAAA,EAAC,EAAE;IACnH/C,MAAM,CAACyF,gBAAgB,CAAC,UAAU,EAAGC,KAAK,IAAKA,KAAK,CAACC,SAAS,IAAI3F,MAAM,CAACC,KAAK,CAACuB,IAAI,CAAC,CAAC,CAAC;EACxF;AACF,CAAC,EAAE,CAAC"}
|
package/package.json
CHANGED
package/public/App.Container.jsx
CHANGED
package/public/index.html
CHANGED
|
@@ -8,38 +8,10 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" />
|
|
10
10
|
<link rel="preconnect" href="https://reservation.mirai.com" />
|
|
11
|
+
<link rel="preconnect" href="https://i.pravatar.cc" />
|
|
11
12
|
<!-- /site -->
|
|
12
13
|
<link rel="preload" as="style" href="./themes/monalisa.theme.css" onload="this.onload=null;this.rel='stylesheet'" />
|
|
13
|
-
<script>
|
|
14
|
-
window.dataLayer = window.dataLayer || [];
|
|
15
|
-
function gtag() {
|
|
16
|
-
window.dataLayer.push(arguments);
|
|
17
|
-
|
|
18
|
-
if (window.IS_PLAYWRIGHT) {
|
|
19
|
-
cookiesAccepted = localStorage.getItem('cookiesAccepted');
|
|
20
|
-
if (!cookiesAccepted) localStorage.setItem('cookiesAccepted', 'granted');
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
gtag('consent', 'update', {
|
|
24
|
-
ad_storage: 'granted',
|
|
25
|
-
ad_user_data: 'granted',
|
|
26
|
-
ad_personalization: 'granted',
|
|
27
|
-
analytics_storage: 'granted',
|
|
28
|
-
});
|
|
29
|
-
function setId() {
|
|
30
|
-
const params = new URLSearchParams(window.location.search);
|
|
31
|
-
if (params.get('useTracking')) {
|
|
32
|
-
const time = setInterval(() => {
|
|
33
|
-
const el = document.querySelector('#mirai');
|
|
34
|
-
if (!el) return;
|
|
35
|
-
|
|
36
|
-
clearInterval(time);
|
|
37
|
-
document.querySelector('#mirai').dataset.miraiId = params.get('miraiId') || '100379008';
|
|
38
|
-
}, 100);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
setId();
|
|
42
|
-
</script>
|
|
14
|
+
<script src="./scripts/script.js"></script>
|
|
43
15
|
</head>
|
|
44
16
|
<body>
|
|
45
17
|
<div data-mirai-engine="mirai_tr" data-init="false"></div>
|
package/public/routes/Deals.jsx
CHANGED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
const TESTIMONIALS = [
|
|
2
|
+
{
|
|
3
|
+
text: 'My stay at Monalisa was spectacular. From the moment I entered, I was struck by the elegance and welcoming atmosphere. The staff was always friendly and helpful, making our visit even more special. We will definitely be back soon.',
|
|
4
|
+
rating: 5,
|
|
5
|
+
name: 'Hal Finney',
|
|
6
|
+
jobPosition: 'Marketing Manager',
|
|
7
|
+
},
|
|
8
|
+
{
|
|
9
|
+
text: 'The Monalisa Resort is simply incredible. The facilities are top-notch, and the views from my room were breathtaking. The customer service exceeded all my expectations. A perfect place to relax and unwind.',
|
|
10
|
+
rating: 5,
|
|
11
|
+
name: 'Gavin Andresen',
|
|
12
|
+
jobPosition: 'Financial Consultant',
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
text: 'I have never experienced such a level of luxury and comfort as at Monalisa. The attention to detail in every corner of the hotel was astonishing. The restaurant offered an exquisite variety of dishes, all delicious. Highly recommended!',
|
|
16
|
+
rating: 5,
|
|
17
|
+
name: 'Martti Malmi',
|
|
18
|
+
jobPosition: 'Real Estate Agent',
|
|
19
|
+
},
|
|
20
|
+
{
|
|
21
|
+
text: 'I had a wonderful weekend at the Monalisa Resort. The location is perfect, and the quality of service is unmatched. The spa was a rejuvenating experience that left me completely relaxed. I can’t wait to return!',
|
|
22
|
+
rating: 4,
|
|
23
|
+
name: 'Jeff Garzik',
|
|
24
|
+
jobPosition: 'Event Planner',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
text: 'From the moment we arrived, we were treated like royalty. The staff is exceptionally attentive and kind. The rooms are spacious and comfortable, and the decor is modern and sophisticated. An unforgettable experience.',
|
|
28
|
+
rating: 5,
|
|
29
|
+
name: 'Laszlo Hanyecz',
|
|
30
|
+
jobPosition: 'Software Engineer',
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
text: 'Monalisa - Hotel & Resort is a true paradise. The leisure areas and the surrounding landscape create a serene and peaceful environment. The breakfast buffet had a great variety and everything was delicious. We will definitely be back.',
|
|
34
|
+
rating: 4,
|
|
35
|
+
name: 'Nick Szabo',
|
|
36
|
+
jobPosition: 'Architect',
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
text: 'This is the best hotel I have ever stayed in. Everything, from check-in to check-out, was impeccable. The gardens are beautiful and the staff always made sure we had everything we needed. Highly recommended.',
|
|
40
|
+
rating: 5,
|
|
41
|
+
name: 'Adam Back',
|
|
42
|
+
jobPosition: 'Business Consultant',
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
text: 'Monalisa offers a perfect combination of luxury and comfort. The views from the pool are stunning, and the quality of service is outstanding. An ideal place for a family vacation or a romantic getaway.',
|
|
46
|
+
rating: 5,
|
|
47
|
+
name: 'Charlie Lee',
|
|
48
|
+
jobPosition: 'Graphic Designer',
|
|
49
|
+
},
|
|
50
|
+
];
|
|
51
|
+
|
|
52
|
+
export { TESTIMONIALS };
|
package/public/routes/Home.jsx
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/* eslint-disable react/no-unescaped-entities */
|
|
2
2
|
/* eslint-disable react/prop-types */
|
|
3
3
|
import { Event } from '@mirai/data-sources';
|
|
4
|
-
import {
|
|
4
|
+
import { InputOption, ScrollView, Text, useDevice, View } from '@mirai/ui';
|
|
5
5
|
import React, { useEffect, useState } from 'react';
|
|
6
6
|
|
|
7
|
+
import { TESTIMONIALS } from './Home.constants';
|
|
7
8
|
import * as style from './routes.module.css';
|
|
8
9
|
|
|
9
10
|
const EVENT_INTENT_ENVIRONMENT = 'intentEnvironment';
|
|
@@ -39,8 +40,6 @@ export const Home = () => {
|
|
|
39
40
|
<Text headline={!isMobile} level={3} className={[style.pitch, style.text]}>
|
|
40
41
|
Experience the calming atmosphere of our serene guest rooms, each designed with your comfort in mind.
|
|
41
42
|
</Text>
|
|
42
|
-
|
|
43
|
-
<View data-mirai-component="buttonFinder" />
|
|
44
43
|
</View>
|
|
45
44
|
<View className={style.backgroundImage} />
|
|
46
45
|
</View>
|
|
@@ -95,23 +94,22 @@ export const Home = () => {
|
|
|
95
94
|
</View>
|
|
96
95
|
|
|
97
96
|
<ScrollView horizontal snap={!isMobile} className={style.cards}>
|
|
98
|
-
{
|
|
97
|
+
{TESTIMONIALS.map(({ text, rating, name, jobPosition } = {}, index) => (
|
|
99
98
|
<View key={index} className={style.card}>
|
|
100
|
-
<Text action>
|
|
101
|
-
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Recusandae deleniti aliquam quam soluta! Eius,
|
|
102
|
-
necessitatibus amet? Quas tempore modi eligendi unde soluta, illo, nam eos dolore ipsa sequi, magnam
|
|
103
|
-
dicta.
|
|
104
|
-
</Text>
|
|
99
|
+
<Text action>{text}</Text>
|
|
105
100
|
<Text accent action>
|
|
106
|
-
|
|
101
|
+
{'★'.repeat(rating)}
|
|
107
102
|
</Text>
|
|
108
103
|
|
|
109
104
|
<View row>
|
|
110
|
-
<View
|
|
105
|
+
<View
|
|
106
|
+
className={style.avatar}
|
|
107
|
+
style={{ backgroundImage: `url(https://i.pravatar.cc/96?u=${index})` }}
|
|
108
|
+
/>
|
|
111
109
|
<View>
|
|
112
|
-
<Text action>
|
|
110
|
+
<Text action>{name}</Text>
|
|
113
111
|
<Text lighten small>
|
|
114
|
-
|
|
112
|
+
{jobPosition}
|
|
115
113
|
</Text>
|
|
116
114
|
</View>
|
|
117
115
|
</View>
|
|
@@ -127,7 +125,7 @@ export const Home = () => {
|
|
|
127
125
|
Find the Best Hotel in Your Next Vacation
|
|
128
126
|
</Text>
|
|
129
127
|
</View>
|
|
130
|
-
<
|
|
128
|
+
<View data-mirai-component="buttonFinder" />
|
|
131
129
|
</View>
|
|
132
130
|
</>
|
|
133
131
|
);
|
|
@@ -3,10 +3,10 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
export const Step1 = () => (
|
|
5
5
|
<View data-mirai-component="rates">
|
|
6
|
-
<span data-content-error>
|
|
6
|
+
{/* <span data-content-error>
|
|
7
7
|
Lorem ipsum dolor sit amet consectetur adipisicing elit. Ad itaque odio inventore eos et consequuntur molestias
|
|
8
8
|
doloremque temporibus accusantium laborum rem nobis nostrum, voluptatum dolorum, repellendus quasi esse eveniet
|
|
9
9
|
maxime?
|
|
10
|
-
</span>
|
|
10
|
+
</span> */}
|
|
11
11
|
</View>
|
|
12
12
|
);
|
|
@@ -15,6 +15,10 @@
|
|
|
15
15
|
background-color: var(--mirai-ui-accent);
|
|
16
16
|
}
|
|
17
17
|
|
|
18
|
+
.section.accent > * > ui-text {
|
|
19
|
+
color: var(--mirai-ui-base);
|
|
20
|
+
}
|
|
21
|
+
|
|
18
22
|
/* layout */
|
|
19
23
|
.section.centered {
|
|
20
24
|
justify-content: center;
|
|
@@ -109,6 +113,7 @@
|
|
|
109
113
|
|
|
110
114
|
.card .avatar {
|
|
111
115
|
background-color: var(--mirai-ui-content-border);
|
|
116
|
+
background-size: cover;
|
|
112
117
|
border-radius: 50%;
|
|
113
118
|
height: var(--mirai-ui-space-XL);
|
|
114
119
|
width: var(--mirai-ui-space-XL);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import url('https://fonts.googleapis.com/css2?family=
|
|
1
|
+
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&family=MuseoModerno:wght@600&display=swap');
|
|
2
2
|
|
|
3
3
|
:root {
|
|
4
4
|
/* == legacy ====================================================================================================== */
|
|
@@ -14,28 +14,28 @@
|
|
|
14
14
|
--mirai-ui-font-medium-weight: 500;
|
|
15
15
|
--mirai-ui-font-bold-weight: 600;
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
--mirai-ui-
|
|
20
|
-
--mirai-ui-
|
|
17
|
+
/* palette */
|
|
18
|
+
--mirai-ui-accent: #f7931a;
|
|
19
|
+
--mirai-ui-accent-background: #fff5e6;
|
|
20
|
+
--mirai-ui-accent-light: #ffb84d;
|
|
21
|
+
--mirai-ui-accent-border: #ffcd94;
|
|
22
|
+
--mirai-ui-accent-dark: #c66e0e;
|
|
23
|
+
|
|
24
|
+
/* text */
|
|
25
|
+
--mirai-ui-text-brand-font: 'MuseoModerno', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
|
|
26
|
+
--mirai-ui-text-brand-font-weight: 600
|
|
27
|
+
--mirai-ui-text-brand-font-medium: var(--mirai-ui-text-brand-font);
|
|
28
|
+
--mirai-ui-text-brand-font-medium-weight: var(--mirai-ui-text-brand-font-weight);
|
|
21
29
|
--mirai-ui-text-brand-font-bold: var(--mirai-ui-text-brand-font);
|
|
22
30
|
--mirai-ui-text-brand-font-bold-weight: var(--mirai-ui-text-brand-font-weight);
|
|
23
31
|
|
|
24
|
-
/*
|
|
25
|
-
--mirai-ui-
|
|
26
|
-
--mirai-ui-accent-background: #fef6ea;
|
|
27
|
-
--mirai-ui-accent-light: #f5bf6b;
|
|
28
|
-
--mirai-ui-accent-border: #f9dbaa;
|
|
29
|
-
--mirai-ui-accent-dark: #cc8b25;
|
|
30
|
-
|
|
31
|
-
/* --mirai-ui-accent: #007bff;
|
|
32
|
-
--mirai-ui-accent-background: #e6f0ff;
|
|
33
|
-
--mirai-ui-accent-light: #339dff;
|
|
34
|
-
--mirai-ui-accent-border: #99cfff;
|
|
35
|
-
--mirai-ui-accent-dark: #0056b3; */
|
|
32
|
+
/* button */
|
|
33
|
+
--mirai-ui-button-font-weight: var(--mirai-ui-font-bold-weight);
|
|
36
34
|
|
|
35
|
+
/* == @mirai/core ================================================================================================= */
|
|
37
36
|
/* Finder */
|
|
38
|
-
--mirai-finder-button-font-
|
|
37
|
+
/* --mirai-finder-button-font-family: var(--mirai-ui-text-brand-font); */
|
|
38
|
+
/* --mirai-finder-button-font-weight: var(--mirai-ui-text-brand-font-weight); */
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
body {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventManager.constants.js","names":["EVENT","exports","FINDER_CHANGE","SET_STORE"],"sources":["../../../src/components/EventManager/EventManager.constants.js"],"sourcesContent":["const EVENT = {\n FINDER_CHANGE: 'finderChange',\n SET_STORE: 'setStore',\n};\n\nexport { EVENT };\n"],"mappings":";;;;;;AAAA,MAAMA,KAAK,GAAAC,OAAA,CAAAD,KAAA,GAAG;EACZE,aAAa,EAAE,cAAc;EAC7BC,SAAS,EAAE;AACb,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"EventManager.js","names":["_dataSources","require","_react","_EventManager","_helpers","EventManager","value","finder","origin","tags","set","useStore","useEffect","Event","subscribe","CORE_EVENT","FINDER_FIELD_CHANGE","handleFinderFieldChange","EVENT","SET_STORE","handleSetStore","unsubscribe","publish","FINDER_CHANGE","_tags$options","chainSelectorValue","placeId","calendar","hsri","commissionCode","occupation","promocode","arguments","length","undefined","next","place","options","find","exports"],"sources":["../../../src/components/EventManager/EventManager.jsx"],"sourcesContent":["import { Event, useStore } from '@mirai/data-sources';\nimport { useEffect } from 'react';\n\nimport { EVENT } from './EventManager.constants';\nimport { EVENT as CORE_EVENT } from '../helpers';\n\nconst EventManager = () => {\n const { value: { finder = {}, origin = {}, tags = {} } = {}, set } = useStore();\n\n useEffect(() => {\n Event.subscribe(CORE_EVENT.FINDER_FIELD_CHANGE, handleFinderFieldChange);\n Event.subscribe(EVENT.SET_STORE, handleSetStore);\n\n return () => {\n Event.unsubscribe(CORE_EVENT.FINDER_FIELD_CHANGE, handleFinderFieldChange);\n Event.unsubscribe(EVENT.SET_STORE, handleSetStore);\n };\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [finder, origin]);\n\n const handleFinderFieldChange = (value) => Event.publish(EVENT.FINDER_CHANGE, value);\n\n const handleSetStore = ({\n chainSelectorValue: placeId,\n calendar,\n hsri: commissionCode,\n occupation,\n promocode,\n } = {}) => {\n let next = {};\n\n if (commissionCode) next.origin = { ...origin, commissionCode };\n if (calendar?.length && calendar?.length === 2) next.finder = { ...finder, calendar };\n if (occupation?.length) next.finder = { ...finder, ...next.finder, occupation };\n if (promocode !== undefined && promocode !== null) next.finder = { ...finder, ...next.finder, promocode };\n if (placeId)\n next.finder = { ...finder, ...next.finder, place: tags?.options?.find(({ value } = {}) => value === placeId) };\n\n set(next);\n };\n\n return null;\n};\n\n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defineProperty","enumerable","get"],"sources":["../../../src/components/EventManager/index.js"],"sourcesContent":["export * from './EventManager';\n"],"mappings":";;;;;AAAA,IAAAA,aAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,aAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,aAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,aAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
|
File without changes
|
|
File without changes
|