@mirai/core 0.1.27 → 0.1.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.
- package/build/components/__internal__/Environment.js +10 -3
- package/build/components/__internal__/Environment.js.map +1 -1
- package/build/components/__internal__/Environment.module.css +4 -0
- package/build/components/__internal__/State.js +3 -2
- package/build/components/__internal__/State.js.map +1 -1
- package/build/components/__internal__/State.module.css +15 -10
- package/build/components/index.js +1 -2
- package/build/components/index.js.map +1 -1
- package/build/helpers/fetchSession.js +38 -10
- package/build/helpers/fetchSession.js.map +1 -1
- package/build/helpers/theme.js +1 -0
- package/build/helpers/theme.js.map +1 -1
- package/package.json +5 -4
- package/public/customer.css +32 -38
- package/public/index.html +7 -48
- package/site/customer.css +106 -0
- package/site/index.html +38 -0
- package/site/profile/index.html +35 -0
- package/site/signup/index.html +31 -0
- package/build/components/__internal__/Ghost.js +0 -34
- package/build/components/__internal__/Ghost.js.map +0 -1
|
@@ -7,6 +7,9 @@ exports.default = void 0;
|
|
|
7
7
|
var _dataSources = require("@mirai/data-sources");
|
|
8
8
|
var _ui = require("@mirai/ui");
|
|
9
9
|
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var style = _interopRequireWildcard(require("./Environment.module.css"));
|
|
11
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
12
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
10
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
14
|
const LOCALES = ['es-ES', 'en-US', 'en-GB', 'ja-JP', 'de-DE', 'pt-PT'];
|
|
12
15
|
const CURRENCIES = ['EUR', 'USD', 'GBP', 'JPY'];
|
|
@@ -18,20 +21,24 @@ var _default = () => {
|
|
|
18
21
|
locale
|
|
19
22
|
}
|
|
20
23
|
} = (0, _dataSources.useStore)();
|
|
21
|
-
return /*#__PURE__*/_react.default.createElement(
|
|
24
|
+
return /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
25
|
+
row: true
|
|
26
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.InputSelect, {
|
|
22
27
|
name: "locale",
|
|
23
28
|
options: LOCALES,
|
|
24
29
|
value: locale,
|
|
25
30
|
onChange: value => set({
|
|
26
31
|
locale: value
|
|
27
|
-
})
|
|
32
|
+
}),
|
|
33
|
+
className: style.container
|
|
28
34
|
}), /*#__PURE__*/_react.default.createElement(_ui.InputSelect, {
|
|
29
35
|
name: "currency",
|
|
30
36
|
options: CURRENCIES,
|
|
31
37
|
value: currency,
|
|
32
38
|
onChange: value => set({
|
|
33
39
|
currency: value
|
|
34
|
-
})
|
|
40
|
+
}),
|
|
41
|
+
className: style.container
|
|
35
42
|
}));
|
|
36
43
|
};
|
|
37
44
|
exports.default = _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Environment.js","names":["LOCALES","CURRENCIES","set","value","currency","locale","useStore"],"sources":["../../../src/components/__internal__/Environment.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { InputSelect } from '@mirai/ui';\nimport React from 'react';\n\nconst LOCALES = ['es-ES', 'en-US', 'en-GB', 'ja-JP', 'de-DE', 'pt-PT'];\nconst CURRENCIES = ['EUR', 'USD', 'GBP', 'JPY'];\n\nexport default () => {\n const {\n set,\n value: { currency, locale },\n } = useStore();\n\n return (\n
|
|
1
|
+
{"version":3,"file":"Environment.js","names":["LOCALES","CURRENCIES","set","value","currency","locale","useStore","style","container"],"sources":["../../../src/components/__internal__/Environment.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { InputSelect, View } from '@mirai/ui';\nimport React from 'react';\n\nimport * as style from './Environment.module.css';\n\nconst LOCALES = ['es-ES', 'en-US', 'en-GB', 'ja-JP', 'de-DE', 'pt-PT'];\nconst CURRENCIES = ['EUR', 'USD', 'GBP', 'JPY'];\n\nexport default () => {\n const {\n set,\n value: { currency, locale },\n } = useStore();\n\n return (\n <View row>\n <InputSelect\n name=\"locale\"\n options={LOCALES}\n value={locale}\n onChange={(value) => set({ locale: value })}\n className={style.container}\n />\n <InputSelect\n name=\"currency\"\n options={CURRENCIES}\n value={currency}\n onChange={(value) => set({ currency: value })}\n className={style.container}\n />\n </View>\n );\n};\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAEA;AAAkD;AAAA;AAAA;AAElD,MAAMA,OAAO,GAAG,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,CAAC;AACtE,MAAMC,UAAU,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,CAAC;AAAC,eAEjC,MAAM;EACnB,MAAM;IACJC,GAAG;IACHC,KAAK,EAAE;MAAEC,QAAQ;MAAEC;IAAO;EAC5B,CAAC,GAAG,IAAAC,qBAAQ,GAAE;EAEd,oBACE,6BAAC,QAAI;IAAC,GAAG;EAAA,gBACP,6BAAC,eAAW;IACV,IAAI,EAAC,QAAQ;IACb,OAAO,EAAEN,OAAQ;IACjB,KAAK,EAAEK,MAAO;IACd,QAAQ,EAAGF,KAAK,IAAKD,GAAG,CAAC;MAAEG,MAAM,EAAEF;IAAM,CAAC,CAAE;IAC5C,SAAS,EAAEI,KAAK,CAACC;EAAU,EAC3B,eACF,6BAAC,eAAW;IACV,IAAI,EAAC,UAAU;IACf,OAAO,EAAEP,UAAW;IACpB,KAAK,EAAEG,QAAS;IAChB,QAAQ,EAAGD,KAAK,IAAKD,GAAG,CAAC;MAAEE,QAAQ,EAAED;IAAM,CAAC,CAAE;IAC9C,SAAS,EAAEI,KAAK,CAACC;EAAU,EAC3B,CACG;AAEX,CAAC;AAAA"}
|
|
@@ -34,9 +34,10 @@ var _default = () => {
|
|
|
34
34
|
} = value;
|
|
35
35
|
(0, _react.useEffect)(() => setTimestamp(new Date()), [value]);
|
|
36
36
|
return /*#__PURE__*/_react.default.createElement("div", {
|
|
37
|
-
className: style.container
|
|
37
|
+
className: style.container
|
|
38
|
+
}, /*#__PURE__*/_react.default.createElement("span", {
|
|
38
39
|
onClick: () => setExpanded(!expanded)
|
|
39
|
-
}, /*#__PURE__*/_react.default.createElement("
|
|
40
|
+
}, /*#__PURE__*/_react.default.createElement("strong", null, `${_package.name} v${_package.version}`), timestamp && /*#__PURE__*/_react.default.createElement("span", null, timestamp.toString().substring(4, 24))), expanded && /*#__PURE__*/_react.default.createElement("pre", null, JSON.stringify({
|
|
40
41
|
type,
|
|
41
42
|
//
|
|
42
43
|
region: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"State.js","names":["value","useStore","expanded","setExpanded","useState","timestamp","setTimestamp","type","currency","language","country","locale","club","hotel","session","finder","signup","useEffect","Date","style","container","name","version","toString","substring","JSON","stringify","region"],"sources":["../../../src/components/__internal__/State.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport React, { useEffect, useState } from 'react';\n\nimport { name, version } from '../../../package.json';\nimport * as style from './State.module.css';\n\nexport default () => {\n const { value } = useStore();\n\n const [expanded, setExpanded] = useState(false);\n const [timestamp, setTimestamp] = useState();\n\n const {\n //\n type,\n // region\n currency,\n language,\n country,\n locale,\n // entities\n club,\n hotel,\n session,\n // components\n finder,\n signup,\n } = value;\n\n useEffect(() => setTimestamp(new Date()), [value]);\n\n return (\n <div className={style.container} onClick={() => setExpanded(!expanded)}>\n
|
|
1
|
+
{"version":3,"file":"State.js","names":["value","useStore","expanded","setExpanded","useState","timestamp","setTimestamp","type","currency","language","country","locale","club","hotel","session","finder","signup","useEffect","Date","style","container","name","version","toString","substring","JSON","stringify","region"],"sources":["../../../src/components/__internal__/State.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport React, { useEffect, useState } from 'react';\n\nimport { name, version } from '../../../package.json';\nimport * as style from './State.module.css';\n\nexport default () => {\n const { value } = useStore();\n\n const [expanded, setExpanded] = useState(false);\n const [timestamp, setTimestamp] = useState();\n\n const {\n //\n type,\n // region\n currency,\n language,\n country,\n locale,\n // entities\n club,\n hotel,\n session,\n // components\n finder,\n signup,\n } = value;\n\n useEffect(() => setTimestamp(new Date()), [value]);\n\n return (\n <div className={style.container}>\n <span onClick={() => setExpanded(!expanded)}>\n <strong>{`${name} v${version}`}</strong>\n {timestamp && <span>{timestamp.toString().substring(4, 24)}</span>}\n </span>\n {expanded && (\n <pre>\n {JSON.stringify(\n {\n type,\n //\n region: {\n currency,\n language,\n country,\n locale,\n },\n // entities\n club,\n hotel,\n session,\n // components\n finder,\n signup,\n },\n null,\n 2,\n )}\n </pre>\n )}\n </div>\n );\n};\n"],"mappings":";;;;;;AAAA;AACA;AAEA;AACA;AAA4C;AAAA;AAAA,eAE7B,MAAM;EACnB,MAAM;IAAEA;EAAM,CAAC,GAAG,IAAAC,qBAAQ,GAAE;EAE5B,MAAM,CAACC,QAAQ,EAAEC,WAAW,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAC/C,MAAM,CAACC,SAAS,EAAEC,YAAY,CAAC,GAAG,IAAAF,eAAQ,GAAE;EAE5C,MAAM;IACJ;IACAG,IAAI;IACJ;IACAC,QAAQ;IACRC,QAAQ;IACRC,OAAO;IACPC,MAAM;IACN;IACAC,IAAI;IACJC,KAAK;IACLC,OAAO;IACP;IACAC,MAAM;IACNC;EACF,CAAC,GAAGhB,KAAK;EAET,IAAAiB,gBAAS,EAAC,MAAMX,YAAY,CAAC,IAAIY,IAAI,EAAE,CAAC,EAAE,CAAClB,KAAK,CAAC,CAAC;EAElD,oBACE;IAAK,SAAS,EAAEmB,KAAK,CAACC;EAAU,gBAC9B;IAAM,OAAO,EAAE,MAAMjB,WAAW,CAAC,CAACD,QAAQ;EAAE,gBAC1C,6CAAU,GAAEmB,aAAK,KAAIC,gBAAQ,EAAC,CAAU,EACvCjB,SAAS,iBAAI,2CAAOA,SAAS,CAACkB,QAAQ,EAAE,CAACC,SAAS,CAAC,CAAC,EAAE,EAAE,CAAC,CAAQ,CAC7D,EACNtB,QAAQ,iBACP,0CACGuB,IAAI,CAACC,SAAS,CACb;IACEnB,IAAI;IACJ;IACAoB,MAAM,EAAE;MACNnB,QAAQ;MACRC,QAAQ;MACRC,OAAO;MACPC;IACF,CAAC;IACD;IACAC,IAAI;IACJC,KAAK;IACLC,OAAO;IACP;IACAC,MAAM;IACNC;EACF,CAAC,EACD,IAAI,EACJ,CAAC,CACF,CAEJ,CACG;AAEV,CAAC;AAAA"}
|
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
.container {
|
|
2
2
|
background-color: rgba(0, 0, 0, 0.9);
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
flex-direction: column;
|
|
6
|
-
bottom: 1rem;
|
|
7
|
-
left: 1rem;
|
|
3
|
+
border-radius: 4px;
|
|
4
|
+
bottom: 16px;
|
|
8
5
|
display: flex;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
left: 16px;
|
|
8
|
+
max-width: calc(100% - 64px);
|
|
9
|
+
padding: 16px;
|
|
10
|
+
position: fixed;
|
|
9
11
|
}
|
|
10
12
|
|
|
11
13
|
.container,
|
|
12
14
|
.container * {
|
|
13
15
|
color: #fff;
|
|
14
|
-
font-size:
|
|
16
|
+
font-size: 12px;
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
.container > pre {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
+
background-color: rgba(255, 255, 255, 0.1);
|
|
21
|
+
border-radius: 4px;
|
|
22
|
+
font-size: 10px;
|
|
23
|
+
margin: 8px 0 0 0;
|
|
24
|
+
overflow: hidden;
|
|
25
|
+
padding: 8px;
|
|
20
26
|
}
|
|
21
27
|
|
|
22
28
|
.container > span {
|
|
23
|
-
|
|
29
|
+
cursor: pointer;
|
|
24
30
|
display: flex;
|
|
25
31
|
flex-direction: column;
|
|
26
|
-
align-items: flex-end;
|
|
27
32
|
}
|
|
28
33
|
|
|
29
34
|
.container > span > strong {
|
|
@@ -19,8 +19,7 @@ var _default = {
|
|
|
19
19
|
signup: /*#__PURE__*/_react.default.lazy(() => Promise.resolve().then(() => _interopRequireWildcard(require('./user/Signup')))),
|
|
20
20
|
// Internal
|
|
21
21
|
environment: /*#__PURE__*/_react.default.lazy(() => Promise.resolve().then(() => _interopRequireWildcard(require('./__internal__/Environment')))),
|
|
22
|
-
state: /*#__PURE__*/_react.default.lazy(() => Promise.resolve().then(() => _interopRequireWildcard(require('./__internal__/State'))))
|
|
23
|
-
ghost: /*#__PURE__*/_react.default.lazy(() => Promise.resolve().then(() => _interopRequireWildcard(require('./__internal__/Ghost'))))
|
|
22
|
+
state: /*#__PURE__*/_react.default.lazy(() => Promise.resolve().then(() => _interopRequireWildcard(require('./__internal__/State'))))
|
|
24
23
|
};
|
|
25
24
|
exports.default = _default;
|
|
26
25
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["deals","React","lazy","bookingQuery","profile","session","signup","environment","state"
|
|
1
|
+
{"version":3,"file":"index.js","names":["deals","React","lazy","bookingQuery","profile","session","signup","environment","state"],"sources":["../../src/components/index.js"],"sourcesContent":["import React from 'react';\n\nexport default {\n // @mirai/finder\n // finder: React.lazy(() => import('./finder/Finder')),\n deals: React.lazy(() => import('./finder/Deals')),\n\n // @mirai/user\n bookingQuery: React.lazy(() => import('./user/BookingQuery')),\n profile: React.lazy(() => import('./user/Profile')),\n session: React.lazy(() => import('./user/Session')),\n signup: React.lazy(() => import('./user/Signup')),\n\n // Internal\n environment: React.lazy(() => import('./__internal__/Environment')),\n state: React.lazy(() => import('./__internal__/State')),\n};\n"],"mappings":";;;;;;AAAA;AAA0B;AAAA;AAAA;AAAA,eAEX;EACb;EACA;EACAA,KAAK,eAAEC,cAAK,CAACC,IAAI,CAAC,mEAAa,gBAAgB,GAAC,CAAC;EAEjD;EACAC,YAAY,eAAEF,cAAK,CAACC,IAAI,CAAC,mEAAa,qBAAqB,GAAC,CAAC;EAC7DE,OAAO,eAAEH,cAAK,CAACC,IAAI,CAAC,mEAAa,gBAAgB,GAAC,CAAC;EACnDG,OAAO,eAAEJ,cAAK,CAACC,IAAI,CAAC,mEAAa,gBAAgB,GAAC,CAAC;EACnDI,MAAM,eAAEL,cAAK,CAACC,IAAI,CAAC,mEAAa,eAAe,GAAC,CAAC;EAEjD;EACAK,WAAW,eAAEN,cAAK,CAACC,IAAI,CAAC,mEAAa,4BAA4B,GAAC,CAAC;EACnEM,KAAK,eAAEP,cAAK,CAACC,IAAI,CAAC,mEAAa,sBAAsB,GAAC;AACxD,CAAC;AAAA"}
|
|
@@ -5,34 +5,62 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.fetchSession = void 0;
|
|
7
7
|
var _dataSources = require("@mirai/data-sources");
|
|
8
|
-
const
|
|
8
|
+
const CACHE_LIMIT = 1000 * 60 * 60 * 24 * 7;
|
|
9
|
+
const SESSION_STORAGE_LEGACY_ID = 'CLUB';
|
|
10
|
+
const SESSION_STORAGE_ID = 'MIRAI:SERVICE:USER:session';
|
|
9
11
|
const fetchSession = function () {
|
|
10
12
|
let urlParams = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
11
|
-
|
|
12
|
-
adapter: _dataSources.
|
|
13
|
+
let storage = new _dataSources.Storage({
|
|
14
|
+
adapter: _dataSources.LocalAdapter,
|
|
15
|
+
cache: CACHE_LIMIT
|
|
13
16
|
});
|
|
14
17
|
let session = storage.get(SESSION_STORAGE_ID);
|
|
18
|
+
if (!session) {
|
|
19
|
+
storage = new _dataSources.Storage({
|
|
20
|
+
adapter: _dataSources.SessionAdapter
|
|
21
|
+
});
|
|
22
|
+
session = storage.get(SESSION_STORAGE_LEGACY_ID);
|
|
23
|
+
}
|
|
15
24
|
if (!session && urlParams.session) {
|
|
16
25
|
try {
|
|
17
26
|
session = JSON.parse(urlParams.session);
|
|
18
27
|
} catch (error) {
|
|
28
|
+
// eslint-disable-next-line no-console
|
|
19
29
|
console.error('', error);
|
|
20
30
|
}
|
|
21
31
|
}
|
|
22
32
|
const {
|
|
23
33
|
accessToken,
|
|
34
|
+
authorization,
|
|
24
35
|
email,
|
|
25
36
|
firstName,
|
|
26
|
-
lastName
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
37
|
+
lastName,
|
|
38
|
+
country,
|
|
39
|
+
dateOfBirth,
|
|
40
|
+
club: {
|
|
41
|
+
name,
|
|
42
|
+
id,
|
|
43
|
+
level
|
|
44
|
+
} = {},
|
|
45
|
+
subscribed,
|
|
46
|
+
// ? Not sure we should get this data from legacy
|
|
47
|
+
idClub: clubId,
|
|
48
|
+
clubName,
|
|
49
|
+
level: clubLevel
|
|
30
50
|
} = session || {};
|
|
31
|
-
return accessToken ? {
|
|
32
|
-
accessToken,
|
|
51
|
+
return accessToken || authorization ? {
|
|
52
|
+
authorization: authorization || accessToken,
|
|
33
53
|
email,
|
|
34
54
|
firstName,
|
|
35
|
-
lastName
|
|
55
|
+
lastName,
|
|
56
|
+
country,
|
|
57
|
+
dateOfBirth,
|
|
58
|
+
club: {
|
|
59
|
+
name: name || clubName,
|
|
60
|
+
id: id || clubId,
|
|
61
|
+
level: level || clubLevel
|
|
62
|
+
},
|
|
63
|
+
subscribed
|
|
36
64
|
} : undefined;
|
|
37
65
|
};
|
|
38
66
|
exports.fetchSession = fetchSession;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fetchSession.js","names":["SESSION_STORAGE_ID","fetchSession","urlParams","storage","Storage","adapter","
|
|
1
|
+
{"version":3,"file":"fetchSession.js","names":["CACHE_LIMIT","SESSION_STORAGE_LEGACY_ID","SESSION_STORAGE_ID","fetchSession","urlParams","storage","Storage","adapter","LocalAdapter","cache","session","get","SessionAdapter","JSON","parse","error","console","accessToken","authorization","email","firstName","lastName","country","dateOfBirth","club","name","id","level","subscribed","idClub","clubId","clubName","clubLevel","undefined"],"sources":["../../src/helpers/fetchSession.js"],"sourcesContent":["import { LocalAdapter, SessionAdapter, Storage } from '@mirai/data-sources';\n\nconst CACHE_LIMIT = 1000 * 60 * 60 * 24 * 7;\nconst SESSION_STORAGE_LEGACY_ID = 'CLUB';\nconst SESSION_STORAGE_ID = 'MIRAI:SERVICE:USER:session';\n\nexport const fetchSession = (urlParams = {}) => {\n let storage = new Storage({ adapter: LocalAdapter, cache: CACHE_LIMIT });\n let session = storage.get(SESSION_STORAGE_ID);\n\n if (!session) {\n storage = new Storage({ adapter: SessionAdapter });\n session = storage.get(SESSION_STORAGE_LEGACY_ID);\n }\n\n if (!session && urlParams.session) {\n try {\n session = JSON.parse(urlParams.session);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error('', error);\n }\n }\n\n const {\n accessToken,\n authorization,\n email,\n firstName,\n lastName,\n country,\n dateOfBirth,\n club: { name, id, level } = {},\n subscribed,\n // ? Not sure we should get this data from legacy\n idClub: clubId,\n clubName,\n level: clubLevel,\n } = session || {};\n\n return accessToken || authorization\n ? {\n authorization: authorization || accessToken,\n email,\n firstName,\n lastName,\n country,\n dateOfBirth,\n club: { name: name || clubName, id: id || clubId, level: level || clubLevel },\n subscribed,\n }\n : undefined;\n};\n"],"mappings":";;;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;IACTC,QAAQ;IACRC,OAAO;IACPC,WAAW;IACXC,IAAI,EAAE;MAAEC,IAAI,EAAEA,IAAI,IAAIM,QAAQ;MAAEL,EAAE,EAAEA,EAAE,IAAII,MAAM;MAAEH,KAAK,EAAEA,KAAK,IAAIK;IAAU,CAAC;IAC7EJ;EACF,CAAC,GACDK,SAAS;AACf,CAAC;AAAC"}
|
package/build/helpers/theme.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"theme.js","names":["VARIABLES","SELECTORS","body","theme","processed","setVariable","key","value","includes","document","documentElement","style","setProperty","trim","push","Object","entries","forEach","variable","legacy","getComputedStyle","getPropertyValue","selector","props","query","querySelector","error","console"],"sources":["../../src/helpers/theme.js"],"sourcesContent":["const VARIABLES = {\n '--mirai-ui-accent': '--corporative-color',\n '--mirai-ui-border-radius': '--border-radius',\n};\n\nconst SELECTORS = {\n body: {\n '--mirai-ui-font': 'font-family',\n '--mirai-ui-font-bold': 'font-family',\n '--mirai-ui-input-font': 'font-family',\n },\n};\n\nexport const theme = () => {\n const processed = [];\n\n const setVariable = (key, value) => {\n if (!value || processed.includes(key)) return;\n\n document.documentElement.style.setProperty(key, value.trim());\n processed.push(key);\n };\n\n // CSS variables\n Object.entries(VARIABLES).forEach(([variable, legacy]) => {\n setVariable(variable, getComputedStyle(document.documentElement).getPropertyValue(legacy));\n });\n\n // CSS Selectors\n Object.entries(SELECTORS).forEach(([selector, props]) => {\n try {\n const query = document.querySelector(selector);\n Object.entries(props).forEach(([variable, legacy]) => {\n const value = getComputedStyle(query)[legacy];\n if (!(legacy === 'font-family' && value === 'Times')) setVariable(variable, value);\n });\n } catch (error) {\n console.error(error);\n }\n });\n};\n"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAG;EAChB,mBAAmB,EAAE,qBAAqB;EAC1C,0BAA0B,EAAE;AAC9B,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAE;IACJ,iBAAiB,EAAE,aAAa;IA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
|
1
|
+
{"version":3,"file":"theme.js","names":["VARIABLES","SELECTORS","body","theme","processed","setVariable","key","value","includes","document","documentElement","style","setProperty","trim","push","Object","entries","forEach","variable","legacy","getComputedStyle","getPropertyValue","selector","props","query","querySelector","error","console"],"sources":["../../src/helpers/theme.js"],"sourcesContent":["const VARIABLES = {\n '--mirai-ui-accent': '--corporative-color',\n '--mirai-ui-border-radius': '--border-radius',\n};\n\nconst SELECTORS = {\n body: {\n '--mirai-ui-font': 'font-family',\n '--mirai-ui-font-bold': 'font-family',\n '--mirai-ui-input-font': 'font-family',\n },\n};\n\nexport const theme = () => {\n const processed = [];\n\n const setVariable = (key, value) => {\n if (!value || processed.includes(key)) return;\n\n document.documentElement.style.setProperty(key, value.trim());\n processed.push(key);\n };\n\n // CSS variables\n Object.entries(VARIABLES).forEach(([variable, legacy]) => {\n setVariable(variable, getComputedStyle(document.documentElement).getPropertyValue(legacy));\n });\n\n // CSS Selectors\n Object.entries(SELECTORS).forEach(([selector, props]) => {\n try {\n const query = document.querySelector(selector);\n Object.entries(props).forEach(([variable, legacy]) => {\n const value = getComputedStyle(query)[legacy];\n if (!(legacy === 'font-family' && value === 'Times')) setVariable(variable, value);\n });\n } catch (error) {\n // eslint-disable-next-line no-console\n console.error(error);\n }\n });\n};\n"],"mappings":";;;;;;AAAA,MAAMA,SAAS,GAAG;EAChB,mBAAmB,EAAE,qBAAqB;EAC1C,0BAA0B,EAAE;AAC9B,CAAC;AAED,MAAMC,SAAS,GAAG;EAChBC,IAAI,EAAE;IACJ,iBAAiB,EAAE,aAAa;IAChC,sBAAsB,EAAE,aAAa;IACrC,uBAAuB,EAAE;EAC3B;AACF,CAAC;AAEM,MAAMC,KAAK,GAAG,MAAM;EACzB,MAAMC,SAAS,GAAG,EAAE;EAEpB,MAAMC,WAAW,GAAG,CAACC,GAAG,EAAEC,KAAK,KAAK;IAClC,IAAI,CAACA,KAAK,IAAIH,SAAS,CAACI,QAAQ,CAACF,GAAG,CAAC,EAAE;IA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"https://gitlab.com/miraicorp/dev/frontend/core",
|
|
6
6
|
"author": "JΛVI <hello@soyjavi.com>",
|
|
@@ -8,10 +8,11 @@
|
|
|
8
8
|
"scripts": {
|
|
9
9
|
"setup": "rm -rf node_modules && rm -rf yarn.lock && yarn install --force",
|
|
10
10
|
"start": "rm -rf dist && parcel public/index.html --port 8080 --host local.mirai.com --open",
|
|
11
|
-
"serve": "serve dist -p 8080 -u -n",
|
|
12
11
|
"build": "node scripts/build.js",
|
|
13
|
-
"build:
|
|
12
|
+
"build:local": "node scripts/bundle.js local",
|
|
14
13
|
"build:dev": "node scripts/bundle.js development",
|
|
14
|
+
"build:pro": "node scripts/bundle.js",
|
|
15
|
+
"serve": "serve dist -p 8080 -u -n",
|
|
15
16
|
"lint": "eslint --cache --fix --format codeframe --ext .jsx,.js src",
|
|
16
17
|
"test": "node scripts/test.js --watchAll=false --silent",
|
|
17
18
|
"test:coverage": "node scripts/test.js --coverage --coverageReporters=text --detectOpenHandles --forceExit --silent",
|
|
@@ -47,7 +48,7 @@
|
|
|
47
48
|
"parcel": "2.8.3",
|
|
48
49
|
"process": "0.11.10",
|
|
49
50
|
"react-scripts": "5.0.1",
|
|
50
|
-
"serve": "14.
|
|
51
|
+
"serve": "14.2.0"
|
|
51
52
|
},
|
|
52
53
|
"engines": {
|
|
53
54
|
"node": ">=16.15.0"
|
package/public/customer.css
CHANGED
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
/* --border-radius: 2px; */
|
|
5
5
|
/* theming */
|
|
6
6
|
--mirai-ui-accent: #f2a900;
|
|
7
|
+
--header-height: calc(var(--mirai-ui-space-XL) * 2);
|
|
7
8
|
}
|
|
8
9
|
|
|
9
10
|
body {
|
|
@@ -20,22 +21,22 @@ footer {
|
|
|
20
21
|
|
|
21
22
|
header {
|
|
22
23
|
align-items: center;
|
|
23
|
-
display: flex;
|
|
24
24
|
background-color: var(--mirai-ui-accent);
|
|
25
|
+
display: flex;
|
|
26
|
+
height: var(--header-height);
|
|
27
|
+
left: 0;
|
|
25
28
|
position: fixed;
|
|
26
29
|
top: 0;
|
|
27
|
-
left: 0;
|
|
28
30
|
z-index: 1;
|
|
29
|
-
height: 5rem;
|
|
30
31
|
}
|
|
31
32
|
|
|
32
33
|
header > * {
|
|
33
|
-
padding: 0
|
|
34
|
+
padding: 0 var(--mirai-ui-space-M);
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
header h1 {
|
|
37
38
|
flex: 1;
|
|
38
|
-
font-size: var(--mirai-ui-font-size-headline-
|
|
39
|
+
font-size: var(--mirai-ui-font-size-headline-2);
|
|
39
40
|
color: var(--mirai-ui-base);
|
|
40
41
|
}
|
|
41
42
|
|
|
@@ -44,69 +45,62 @@ header nav {
|
|
|
44
45
|
display: flex;
|
|
45
46
|
}
|
|
46
47
|
|
|
47
|
-
header nav >
|
|
48
|
-
|
|
48
|
+
header nav > *:not([data-mirai-component='environment']) {
|
|
49
|
+
margin-left: var(--mirai-ui-space-S);
|
|
49
50
|
}
|
|
50
51
|
|
|
51
|
-
header
|
|
52
|
-
margin-
|
|
52
|
+
header + section {
|
|
53
|
+
margin-top: var(--header-height);
|
|
53
54
|
}
|
|
54
55
|
|
|
55
56
|
section {
|
|
56
57
|
align-items: center;
|
|
57
58
|
align-content: center;
|
|
58
|
-
justify-content: center;
|
|
59
|
-
display: flex;
|
|
60
|
-
width: 100%;
|
|
61
59
|
border-bottom: solid 1px var(--mirai-ui-content-border);
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
padding: var(--mirai-ui-space-M);
|
|
63
|
+
width: calc(100% - calc(var(--mirai-ui-space-M) * 2));
|
|
66
64
|
}
|
|
67
65
|
|
|
68
66
|
section.finder {
|
|
69
|
-
align-items: center;
|
|
70
67
|
background-color: var(--mirai-ui-content-border);
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
padding: 3rem 0;
|
|
74
|
-
margin-top: 5rem;
|
|
68
|
+
padding-bottom: var(--mirai-ui-space-XL);
|
|
69
|
+
padding-top: var(--mirai-ui-space-XL);
|
|
75
70
|
}
|
|
76
71
|
|
|
77
72
|
section.deals {
|
|
78
|
-
padding: 1rem 0;
|
|
79
73
|
}
|
|
80
74
|
|
|
81
|
-
|
|
82
|
-
background-color: var(--mirai-ui-content-border);
|
|
83
|
-
display: flex;
|
|
84
|
-
justify-content: center;
|
|
75
|
+
section.signup {
|
|
85
76
|
}
|
|
86
77
|
|
|
87
|
-
|
|
88
|
-
|
|
78
|
+
section.profile > * {
|
|
79
|
+
width: 100%;
|
|
89
80
|
}
|
|
90
81
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
82
|
+
footer {
|
|
83
|
+
background-color: var(--mirai-ui-content-border);
|
|
84
|
+
color: var(--mirai-ui-content-light);
|
|
85
|
+
display: flex;
|
|
86
|
+
font-size: var(--mirai-ui-font-size-action);
|
|
87
|
+
justify-content: center;
|
|
88
|
+
padding: var(--mirai-ui-space-M) 0;
|
|
96
89
|
}
|
|
97
90
|
|
|
98
91
|
@media only screen and (max-width: 430px) {
|
|
99
|
-
section {
|
|
100
|
-
flex-direction: column;
|
|
92
|
+
section.deals > * {
|
|
101
93
|
}
|
|
102
94
|
|
|
103
|
-
section
|
|
104
|
-
|
|
95
|
+
section.profile {
|
|
96
|
+
padding-left: 0;
|
|
97
|
+
padding-right: 0;
|
|
98
|
+
width: 100%;
|
|
105
99
|
}
|
|
106
100
|
}
|
|
107
101
|
|
|
108
102
|
@media only screen and (min-width: 431px) {
|
|
109
|
-
section
|
|
103
|
+
section.signup > * {
|
|
110
104
|
width: 50%;
|
|
111
105
|
}
|
|
112
106
|
}
|
package/public/index.html
CHANGED
|
@@ -27,23 +27,14 @@
|
|
|
27
27
|
<header>
|
|
28
28
|
<h1>@mirai/core</h1>
|
|
29
29
|
<nav>
|
|
30
|
-
<div data-mirai-component="session"
|
|
31
|
-
<!-- <button class="login" data-ghost>Login</button> -->
|
|
32
|
-
|
|
33
|
-
<!-- <div class="session" data-ghost>
|
|
34
|
-
<small class="email">{{email}}</small>
|
|
35
|
-
<span>{{firstName}}</span>
|
|
36
|
-
<span>{{lastName}}</span>
|
|
37
|
-
</div> -->
|
|
38
|
-
</div>
|
|
30
|
+
<div data-mirai-component="session"></div>
|
|
39
31
|
<div data-mirai-component="bookingQuery"></div>
|
|
40
|
-
<div data-mirai-component="environment"></div>
|
|
32
|
+
<div data-mirai-component="environment" data-mobile="false"></div>
|
|
41
33
|
<div data-mirai-component="state"></div>
|
|
42
34
|
</nav>
|
|
43
35
|
</header>
|
|
44
36
|
|
|
45
37
|
<section class="finder">
|
|
46
|
-
<!-- This ones are not in our repository> -->
|
|
47
38
|
<div data-mirai-component="finder"></div>
|
|
48
39
|
</section>
|
|
49
40
|
|
|
@@ -51,47 +42,15 @@
|
|
|
51
42
|
<div data-mirai-component="deals"></div>
|
|
52
43
|
</section>
|
|
53
44
|
|
|
54
|
-
<section class="
|
|
55
|
-
<
|
|
56
|
-
<h2>Lorem ipsum dolor sit amet consectetur adipisicing elit.</h2>
|
|
57
|
-
<p>
|
|
58
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
59
|
-
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
60
|
-
explicabo rerum modi.
|
|
61
|
-
</p>
|
|
62
|
-
<p>
|
|
63
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
64
|
-
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
65
|
-
explicabo rerum modi.
|
|
66
|
-
</p>
|
|
67
|
-
<p>
|
|
68
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
69
|
-
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
70
|
-
explicabo rerum modi.
|
|
71
|
-
</p>
|
|
72
|
-
<p>
|
|
73
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
74
|
-
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
75
|
-
explicabo rerum modi.
|
|
76
|
-
</p>
|
|
77
|
-
<p>
|
|
78
|
-
Lorem ipsum dolor sit amet consectetur adipisicing elit. Molestiae laborum corrupti sapiente illo suscipit
|
|
79
|
-
nisi in, maxime natus, architecto excepturi ipsum ducimus alias eligendi repudiandae consequuntur, fuga
|
|
80
|
-
explicabo rerum modi.
|
|
81
|
-
</p>
|
|
82
|
-
</article>
|
|
83
|
-
<article>
|
|
84
|
-
<div data-mirai-component="signup"></div>
|
|
85
|
-
</article>
|
|
45
|
+
<section class="profile">
|
|
46
|
+
<div data-mirai-component="profile"></div>
|
|
86
47
|
</section>
|
|
87
48
|
|
|
88
|
-
<section class="
|
|
89
|
-
|
|
49
|
+
<section class="signup">
|
|
50
|
+
<div data-mirai-component="signup"></div>
|
|
90
51
|
</section>
|
|
91
52
|
|
|
92
|
-
<footer>
|
|
93
|
-
<small>Copyright, 2022</small>
|
|
94
|
-
</footer>
|
|
53
|
+
<footer>Mirai Tech - Copyright, 2023</footer>
|
|
95
54
|
|
|
96
55
|
<!-- <script type="module" defer src="https://static.mirai.com/core/index.js"></script> -->
|
|
97
56
|
<!-- <script type="module" defer src="https://static-pre.mirai.com/core/index.js"></script> -->
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
:root {
|
|
2
|
+
/* legacy */
|
|
3
|
+
/* --corporative-color: #f2a900; */
|
|
4
|
+
/* --border-radius: 2px; */
|
|
5
|
+
/* theming */
|
|
6
|
+
--mirai-ui-accent: #f2a900;
|
|
7
|
+
--header-height: calc(var(--mirai-ui-space-XL) * 2);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
body {
|
|
11
|
+
color: var(--mirai-ui-content);
|
|
12
|
+
font-family: 'Gill Sans', 'Gill Sans MT', Calibri, 'Trebuchet MS', sans-serif;
|
|
13
|
+
margin: 0;
|
|
14
|
+
padding: 0;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
header,
|
|
18
|
+
footer {
|
|
19
|
+
width: 100%;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
header {
|
|
23
|
+
align-items: center;
|
|
24
|
+
background-color: var(--mirai-ui-accent);
|
|
25
|
+
display: flex;
|
|
26
|
+
height: var(--header-height);
|
|
27
|
+
left: 0;
|
|
28
|
+
position: fixed;
|
|
29
|
+
top: 0;
|
|
30
|
+
z-index: 1;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
header > * {
|
|
34
|
+
padding: 0 var(--mirai-ui-space-M);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
header h1 {
|
|
38
|
+
flex: 1;
|
|
39
|
+
font-size: var(--mirai-ui-font-size-headline-2);
|
|
40
|
+
color: var(--mirai-ui-base);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
header nav {
|
|
44
|
+
align-items: center;
|
|
45
|
+
display: flex;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
header nav > *:not([data-mirai-component='environment']) {
|
|
49
|
+
margin-left: var(--mirai-ui-space-S);
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
header + section {
|
|
53
|
+
margin-top: var(--header-height);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
section {
|
|
57
|
+
align-items: center;
|
|
58
|
+
align-content: center;
|
|
59
|
+
border-bottom: solid 1px var(--mirai-ui-content-border);
|
|
60
|
+
display: flex;
|
|
61
|
+
justify-content: center;
|
|
62
|
+
padding: var(--mirai-ui-space-M);
|
|
63
|
+
width: calc(100% - calc(var(--mirai-ui-space-M) * 2));
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
section.finder {
|
|
67
|
+
background-color: var(--mirai-ui-content-border);
|
|
68
|
+
padding-bottom: var(--mirai-ui-space-XL);
|
|
69
|
+
padding-top: var(--mirai-ui-space-XL);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
section.deals {
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
section.signup {
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
section.profile > * {
|
|
79
|
+
width: 100%;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
footer {
|
|
83
|
+
background-color: var(--mirai-ui-content-border);
|
|
84
|
+
color: var(--mirai-ui-content-light);
|
|
85
|
+
display: flex;
|
|
86
|
+
font-size: var(--mirai-ui-font-size-action);
|
|
87
|
+
justify-content: center;
|
|
88
|
+
padding: var(--mirai-ui-space-M) 0;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
@media only screen and (max-width: 430px) {
|
|
92
|
+
section.deals > * {
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
section.profile {
|
|
96
|
+
padding-left: 0;
|
|
97
|
+
padding-right: 0;
|
|
98
|
+
width: 100%;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
@media only screen and (min-width: 431px) {
|
|
103
|
+
section.signup > * {
|
|
104
|
+
width: 50%;
|
|
105
|
+
}
|
|
106
|
+
}
|
package/site/index.html
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>@mirai/core</title>
|
|
7
|
+
<link rel="stylesheet" href="{url}/index.css" rel="preload" defer />
|
|
8
|
+
<link rel="stylesheet" href="{url}/site/customer.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<!-- hotel example -->
|
|
12
|
+
<!-- <div data-mirai-id="10030559" data-locale="en-GB" data-currency="GBP" hidden></div> -->
|
|
13
|
+
<!-- chain example -->
|
|
14
|
+
<div data-mirai-id="501404" data-hotel="100376545" data-type="chain" data-locale="en-GB" hidden></div>
|
|
15
|
+
|
|
16
|
+
<header>
|
|
17
|
+
<h1>@mirai/core</h1>
|
|
18
|
+
<nav>
|
|
19
|
+
<div data-mirai-component="session"></div>
|
|
20
|
+
<div data-mirai-component="bookingQuery"></div>
|
|
21
|
+
<div data-mirai-component="environment" data-mobile="false"></div>
|
|
22
|
+
<div data-mirai-component="state"></div>
|
|
23
|
+
</nav>
|
|
24
|
+
</header>
|
|
25
|
+
|
|
26
|
+
<section class="finder">
|
|
27
|
+
<div data-mirai-component="finder"></div>
|
|
28
|
+
</section>
|
|
29
|
+
|
|
30
|
+
<section class="deals">
|
|
31
|
+
<div data-mirai-component="deals"></div>
|
|
32
|
+
</section>
|
|
33
|
+
|
|
34
|
+
<footer>Mirai Tech - Copyright, 2023</footer>
|
|
35
|
+
|
|
36
|
+
<script type="module" defer src="{url}/index.js"></script>
|
|
37
|
+
</body>
|
|
38
|
+
</html>
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>@mirai/core</title>
|
|
7
|
+
<link rel="stylesheet" href="{url}/index.css" rel="preload" defer />
|
|
8
|
+
<link rel="stylesheet" href="{url}/site/customer.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div data-mirai-id="501404" data-hotel="100376545" data-type="chain" data-locale="en-GB" hidden></div>
|
|
12
|
+
|
|
13
|
+
<header>
|
|
14
|
+
<h1>@mirai/core</h1>
|
|
15
|
+
<nav>
|
|
16
|
+
<div data-mirai-component="session"></div>
|
|
17
|
+
<div data-mirai-component="bookingQuery"></div>
|
|
18
|
+
<div data-mirai-component="environment" data-mobile="false"></div>
|
|
19
|
+
<div data-mirai-component="state"></div>
|
|
20
|
+
</nav>
|
|
21
|
+
</header>
|
|
22
|
+
|
|
23
|
+
<section class="profile">
|
|
24
|
+
<div data-mirai-component="profile"></div>
|
|
25
|
+
</section>
|
|
26
|
+
|
|
27
|
+
<section class="signup">
|
|
28
|
+
<div data-mirai-component="signup"></div>
|
|
29
|
+
</section>
|
|
30
|
+
|
|
31
|
+
<footer>Mirai Tech - Copyright, 2023</footer>
|
|
32
|
+
|
|
33
|
+
<script type="module" defer src="{url}/index.js"></script>
|
|
34
|
+
</body>
|
|
35
|
+
</html>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html lang="en">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8" />
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
|
6
|
+
<title>@mirai/core</title>
|
|
7
|
+
<link rel="stylesheet" href="{url}/index.css" rel="preload" defer />
|
|
8
|
+
<link rel="stylesheet" href="{url}/site/customer.css" />
|
|
9
|
+
</head>
|
|
10
|
+
<body>
|
|
11
|
+
<div data-mirai-id="501404" data-hotel="100376545" data-type="chain" data-locale="en-GB" hidden></div>
|
|
12
|
+
|
|
13
|
+
<header>
|
|
14
|
+
<h1>@mirai/core</h1>
|
|
15
|
+
<nav>
|
|
16
|
+
<div data-mirai-component="session"></div>
|
|
17
|
+
<div data-mirai-component="bookingQuery"></div>
|
|
18
|
+
<div data-mirai-component="environment" data-mobile="false"></div>
|
|
19
|
+
<div data-mirai-component="state"></div>
|
|
20
|
+
</nav>
|
|
21
|
+
</header>
|
|
22
|
+
|
|
23
|
+
<section class="signup">
|
|
24
|
+
<div data-mirai-component="signup"></div>
|
|
25
|
+
</section>
|
|
26
|
+
|
|
27
|
+
<footer>Mirai Tech - Copyright, 2023</footer>
|
|
28
|
+
|
|
29
|
+
<script type="module" defer src="{url}/index.js"></script>
|
|
30
|
+
</body>
|
|
31
|
+
</html>
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _ui = require("@mirai/ui");
|
|
8
|
-
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
9
|
-
var _react = _interopRequireDefault(require("react"));
|
|
10
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
11
|
-
const Ghost = _ref => {
|
|
12
|
-
let {
|
|
13
|
-
ghost
|
|
14
|
-
} = _ref;
|
|
15
|
-
const handlePress = () => {
|
|
16
|
-
console.log('<Ghost>:handlePress');
|
|
17
|
-
};
|
|
18
|
-
return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, ghost ? /*#__PURE__*/_react.default.createElement(_ui.Pressable, {
|
|
19
|
-
onPress: handlePress,
|
|
20
|
-
dangerouslySetInnerHTML: {
|
|
21
|
-
__html: ghost.outerHTML
|
|
22
|
-
}
|
|
23
|
-
}) : /*#__PURE__*/_react.default.createElement(_ui.Button, {
|
|
24
|
-
onPress: handlePress
|
|
25
|
-
}, "Ghost.jsx"), /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
26
|
-
tag: "p"
|
|
27
|
-
}, "Lorem ipsum dolor sit amet consectetur adipisicing elit."));
|
|
28
|
-
};
|
|
29
|
-
Ghost.propTypes = {
|
|
30
|
-
ghost: _propTypes.default.any
|
|
31
|
-
};
|
|
32
|
-
var _default = Ghost;
|
|
33
|
-
exports.default = _default;
|
|
34
|
-
//# sourceMappingURL=Ghost.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"Ghost.js","names":["Ghost","ghost","handlePress","console","log","__html","outerHTML","propTypes","PropTypes","any"],"sources":["../../../src/components/__internal__/Ghost.jsx"],"sourcesContent":["import { Button, Pressable, Text } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nconst Ghost = ({ ghost }) => {\n const handlePress = () => {\n console.log('<Ghost>:handlePress');\n };\n\n return (\n <>\n {ghost ? (\n <Pressable onPress={handlePress} dangerouslySetInnerHTML={{ __html: ghost.outerHTML }} />\n ) : (\n <Button onPress={handlePress}>Ghost.jsx</Button>\n )}\n\n <Text tag=\"p\">Lorem ipsum dolor sit amet consectetur adipisicing elit.</Text>\n </>\n );\n};\n\nGhost.propTypes = {\n ghost: PropTypes.any,\n};\n\nexport default Ghost;\n"],"mappings":";;;;;;AAAA;AACA;AACA;AAA0B;AAE1B,MAAMA,KAAK,GAAG,QAAe;EAAA,IAAd;IAAEC;EAAM,CAAC;EACtB,MAAMC,WAAW,GAAG,MAAM;IACxBC,OAAO,CAACC,GAAG,CAAC,qBAAqB,CAAC;EACpC,CAAC;EAED,oBACE,4DACGH,KAAK,gBACJ,6BAAC,aAAS;IAAC,OAAO,EAAEC,WAAY;IAAC,uBAAuB,EAAE;MAAEG,MAAM,EAAEJ,KAAK,CAACK;IAAU;EAAE,EAAG,gBAEzF,6BAAC,UAAM;IAAC,OAAO,EAAEJ;EAAY,eAC9B,eAED,6BAAC,QAAI;IAAC,GAAG,EAAC;EAAG,8DAAgE,CAC5E;AAEP,CAAC;AAEDF,KAAK,CAACO,SAAS,GAAG;EAChBN,KAAK,EAAEO,kBAAS,CAACC;AACnB,CAAC;AAAC,eAEaT,KAAK;AAAA"}
|