@mirai/core 0.1.55 → 0.1.57

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.
@@ -15,6 +15,8 @@ const fetchSession = function () {
15
15
  cache: CACHE_LIMIT
16
16
  });
17
17
  let session = storage.get(SESSION_STORAGE_ID);
18
+
19
+ //TODO: it`s possible that this never occurs. Remove when don`t exists legacy CLUB
18
20
  if (!session) {
19
21
  storage = new _dataSources.Storage({
20
22
  adapter: _dataSources.SessionAdapter
@@ -32,34 +34,34 @@ const fetchSession = function () {
32
34
  const {
33
35
  accessToken,
34
36
  authorization,
35
- email,
36
- firstName,
37
- lastName,
38
- country,
39
- dateOfBirth,
40
37
  club: {
41
- name,
42
38
  id,
43
- level
39
+ name
44
40
  } = {},
45
- subscribed,
41
+ clubName,
42
+ clubLevel,
43
+ country,
44
+ dateOfBirth,
45
+ email,
46
+ firstName,
46
47
  // ? Not sure we should get this data from legacy
47
48
  idClub: clubId,
48
- clubName,
49
- level: clubLevel
49
+ lastName,
50
+ level,
51
+ subscribed
50
52
  } = session || {};
51
53
  return accessToken || authorization ? {
52
54
  authorization: authorization || accessToken,
53
- email,
54
- firstName,
55
- lastName,
56
- country,
57
- dateOfBirth,
58
55
  club: {
59
- name: name || clubName,
60
56
  id: id || clubId,
61
- level: level || clubLevel
57
+ name: name || clubName
62
58
  },
59
+ country,
60
+ dateOfBirth,
61
+ email,
62
+ firstName,
63
+ lastName,
64
+ level: level || clubLevel,
63
65
  subscribed
64
66
  } : undefined;
65
67
  };
@@ -1 +1 @@
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":";;;;;;AAAA;AAEA,MAAMA,WAAW,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC3C,MAAMC,yBAAyB,GAAG,MAAM;AACxC,MAAMC,kBAAkB,GAAG,4BAA4B;AAEhD,MAAMC,YAAY,GAAG,YAAoB;EAAA,IAAnBC,SAAS,uEAAG,CAAC,CAAC;EACzC,IAAIC,OAAO,GAAG,IAAIC,oBAAO,CAAC;IAAEC,OAAO,EAAEC,yBAAY;IAAEC,KAAK,EAAET;EAAY,CAAC,CAAC;EACxE,IAAIU,OAAO,GAAGL,OAAO,CAACM,GAAG,CAACT,kBAAkB,CAAC;EAE7C,IAAI,CAACQ,OAAO,EAAE;IACZL,OAAO,GAAG,IAAIC,oBAAO,CAAC;MAAEC,OAAO,EAAEK;IAAe,CAAC,CAAC;IAClDF,OAAO,GAAGL,OAAO,CAACM,GAAG,CAACV,yBAAyB,CAAC;EAClD;EAEA,IAAI,CAACS,OAAO,IAAIN,SAAS,CAACM,OAAO,EAAE;IACjC,IAAI;MACFA,OAAO,GAAGG,IAAI,CAACC,KAAK,CAACV,SAAS,CAACM,OAAO,CAAC;IACzC,CAAC,CAAC,OAAOK,KAAK,EAAE;MACd;MACAC,OAAO,CAACD,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC;IAC1B;EACF;EAEA,MAAM;IACJE,WAAW;IACXC,aAAa;IACbC,KAAK;IACLC,SAAS;IACTC,QAAQ;IACRC,OAAO;IACPC,WAAW;IACXC,IAAI,EAAE;MAAEC,IAAI;MAAEC,EAAE;MAAEC;IAAM,CAAC,GAAG,CAAC,CAAC;IAC9BC,UAAU;IACV;IACAC,MAAM,EAAEC,MAAM;IACdC,QAAQ;IACRJ,KAAK,EAAEK;EACT,CAAC,GAAGtB,OAAO,IAAI,CAAC,CAAC;EAEjB,OAAOO,WAAW,IAAIC,aAAa,GAC/B;IACEA,aAAa,EAAEA,aAAa,IAAID,WAAW;IAC3CE,KAAK;IACLC,SAAS;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"}
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","club","id","name","clubName","clubLevel","country","dateOfBirth","email","firstName","idClub","clubId","lastName","level","subscribed","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 //TODO: it`s possible that this never occurs. Remove when don`t exists legacy CLUB\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 club: { id, name } = {},\n clubName,\n clubLevel,\n country,\n dateOfBirth,\n email,\n firstName,\n // ? Not sure we should get this data from legacy\n idClub: clubId,\n lastName,\n level,\n subscribed,\n } = session || {};\n\n return accessToken || authorization\n ? {\n authorization: authorization || accessToken,\n club: { id: id || clubId, name: name || clubName },\n country,\n dateOfBirth,\n email,\n firstName,\n lastName,\n level: level || clubLevel,\n subscribed,\n }\n : undefined;\n};\n"],"mappings":";;;;;;AAAA;AAEA,MAAMA,WAAW,GAAG,IAAI,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;AAC3C,MAAMC,yBAAyB,GAAG,MAAM;AACxC,MAAMC,kBAAkB,GAAG,4BAA4B;AAEhD,MAAMC,YAAY,GAAG,YAAoB;EAAA,IAAnBC,SAAS,uEAAG,CAAC,CAAC;EACzC,IAAIC,OAAO,GAAG,IAAIC,oBAAO,CAAC;IAAEC,OAAO,EAAEC,yBAAY;IAAEC,KAAK,EAAET;EAAY,CAAC,CAAC;EACxE,IAAIU,OAAO,GAAGL,OAAO,CAACM,GAAG,CAACT,kBAAkB,CAAC;;EAE7C;EACA,IAAI,CAACQ,OAAO,EAAE;IACZL,OAAO,GAAG,IAAIC,oBAAO,CAAC;MAAEC,OAAO,EAAEK;IAAe,CAAC,CAAC;IAClDF,OAAO,GAAGL,OAAO,CAACM,GAAG,CAACV,yBAAyB,CAAC;EAClD;EAEA,IAAI,CAACS,OAAO,IAAIN,SAAS,CAACM,OAAO,EAAE;IACjC,IAAI;MACFA,OAAO,GAAGG,IAAI,CAACC,KAAK,CAACV,SAAS,CAACM,OAAO,CAAC;IACzC,CAAC,CAAC,OAAOK,KAAK,EAAE;MACd;MACAC,OAAO,CAACD,KAAK,CAAC,EAAE,EAAEA,KAAK,CAAC;IAC1B;EACF;EAEA,MAAM;IACJE,WAAW;IACXC,aAAa;IACbC,IAAI,EAAE;MAAEC,EAAE;MAAEC;IAAK,CAAC,GAAG,CAAC,CAAC;IACvBC,QAAQ;IACRC,SAAS;IACTC,OAAO;IACPC,WAAW;IACXC,KAAK;IACLC,SAAS;IACT;IACAC,MAAM,EAAEC,MAAM;IACdC,QAAQ;IACRC,KAAK;IACLC;EACF,CAAC,GAAGtB,OAAO,IAAI,CAAC,CAAC;EAEjB,OAAOO,WAAW,IAAIC,aAAa,GAC/B;IACEA,aAAa,EAAEA,aAAa,IAAID,WAAW;IAC3CE,IAAI,EAAE;MAAEC,EAAE,EAAEA,EAAE,IAAIS,MAAM;MAAER,IAAI,EAAEA,IAAI,IAAIC;IAAS,CAAC;IAClDE,OAAO;IACPC,WAAW;IACXC,KAAK;IACLC,SAAS;IACTG,QAAQ;IACRC,KAAK,EAAEA,KAAK,IAAIR,SAAS;IACzBS;EACF,CAAC,GACDC,SAAS;AACf,CAAC;AAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.1.55",
3
+ "version": "0.1.57",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",
@@ -89,6 +89,10 @@ footer {
89
89
  }
90
90
 
91
91
  @media only screen and (max-width: 430px) {
92
+ section.deals {
93
+ display: block;
94
+ }
95
+
92
96
  section.deals > * {
93
97
  }
94
98
 
package/site/customer.css CHANGED
@@ -99,6 +99,10 @@ footer {
99
99
  }
100
100
 
101
101
  @media only screen and (max-width: 430px) {
102
+ section.deals {
103
+ display: block;
104
+ }
105
+
102
106
  section.deals > * {
103
107
  }
104
108