@mirai/core 0.3.146 → 0.3.148

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 (66) hide show
  1. package/build/components/Booking/components/Field/Field.module.css +1 -1
  2. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Menu.test.js.snap +4 -4
  3. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +8 -8
  4. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap +8 -8
  5. package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +12 -12
  6. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +6 -6
  7. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +4 -4
  8. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Session.test.js.snap +8 -8
  9. package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +1 -1
  10. package/build/components/Profile/Profile.constants.js +8 -5
  11. package/build/components/Profile/Profile.constants.js.map +1 -1
  12. package/build/components/Profile/Profile.js +10 -42
  13. package/build/components/Profile/Profile.js.map +1 -1
  14. package/build/components/Profile/Profile.module.css +1 -67
  15. package/build/components/Profile/components/Bookings/Bookings.js +15 -24
  16. package/build/components/Profile/components/Bookings/Bookings.js.map +1 -1
  17. package/build/components/Profile/components/Bookings/Bookings.l10n.js +3 -0
  18. package/build/components/Profile/components/Bookings/Bookings.l10n.js.map +1 -1
  19. package/build/components/Profile/components/Bookings/Bookings.module.css +7 -2
  20. package/build/components/Profile/components/Bookings/__tests__/__snapshots__/Bookings.test.js.snap +11 -1
  21. package/build/components/Profile/{Profile.Account.js → components/Settings/Settings.Account.js} +22 -23
  22. package/build/components/Profile/components/Settings/Settings.Account.js.map +1 -0
  23. package/build/components/Profile/{Profile.Password.js → components/Settings/Settings.Password.js} +16 -15
  24. package/build/components/Profile/components/Settings/Settings.Password.js.map +1 -0
  25. package/build/components/Profile/{Profile.Signout.js → components/Settings/Settings.Signout.js} +18 -22
  26. package/build/components/Profile/components/Settings/Settings.Signout.js.map +1 -0
  27. package/build/components/Profile/components/Settings/Settings.constants.js +24 -0
  28. package/build/components/Profile/components/Settings/Settings.constants.js.map +1 -0
  29. package/build/components/Profile/components/Settings/Settings.js +61 -0
  30. package/build/components/Profile/components/Settings/Settings.js.map +1 -0
  31. package/build/components/Profile/{Profile.l10n.js → components/Settings/Settings.l10n.js} +9 -9
  32. package/build/components/Profile/components/Settings/Settings.l10n.js.map +1 -0
  33. package/build/components/Profile/components/Settings/Settings.module.css +70 -0
  34. package/build/components/Profile/components/Settings/index.js +17 -0
  35. package/build/components/Profile/components/Settings/index.js.map +1 -0
  36. package/build/components/Profile/components/index.js +11 -0
  37. package/build/components/Profile/components/index.js.map +1 -1
  38. package/build/components/Session/Session.Account.js +28 -25
  39. package/build/components/Session/Session.Account.js.map +1 -1
  40. package/build/components/Session/Session.Login.js +9 -9
  41. package/build/components/Session/Session.Login.js.map +1 -1
  42. package/build/components/Session/Session.l10n.js +11 -13
  43. package/build/components/Session/Session.l10n.js.map +1 -1
  44. package/build/components/Session/Session.module.css +32 -7
  45. package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +30 -36
  46. package/build/components/Session/helpers/template.js +1 -1
  47. package/build/components/Session/helpers/template.js.map +1 -1
  48. package/build/components/Signup/Signup.js +6 -2
  49. package/build/components/Signup/Signup.js.map +1 -1
  50. package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +9 -9
  51. package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +4 -4
  52. package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +15 -15
  53. package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +1 -1
  54. package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap +6 -6
  55. package/build/components/helpers/ICON.js +2 -0
  56. package/build/components/helpers/ICON.js.map +1 -1
  57. package/build/components/helpers/__tests__/__snapshots__/parseHtml.test.js.snap +30 -30
  58. package/build/components/helpers/parseHtml.js +2 -2
  59. package/build/components/helpers/parseHtml.js.map +1 -1
  60. package/package.json +1 -1
  61. package/public/App.Container.jsx +0 -7
  62. package/public/App.module.css +0 -21
  63. package/build/components/Profile/Profile.Account.js.map +0 -1
  64. package/build/components/Profile/Profile.Password.js.map +0 -1
  65. package/build/components/Profile/Profile.Signout.js.map +0 -1
  66. package/build/components/Profile/Profile.l10n.js.map +0 -1
@@ -16,7 +16,7 @@
16
16
  flex-direction: row;
17
17
  }
18
18
 
19
- .field:not(.inline) > .value {
19
+ .field:not(.inline) > .value, .value > * {
20
20
  text-align: justify;
21
21
  }
22
22
 
@@ -165,7 +165,7 @@ exports[`component:<Booking> partial:<Menu> inherit:className 1`] = `
165
165
  class="view fit modal calcWidth"
166
166
  >
167
167
  <div
168
- class="view forceRow header"
168
+ class="view row header hideBack"
169
169
  >
170
170
  <button
171
171
  class="pressable button small squared transparent button"
@@ -436,7 +436,7 @@ exports[`component:<Booking> partial:<Menu> renders 1`] = `
436
436
  class="view fit modal calcWidth"
437
437
  >
438
438
  <div
439
- class="view forceRow header"
439
+ class="view row header hideBack"
440
440
  >
441
441
  <button
442
442
  class="pressable button small squared transparent button"
@@ -708,7 +708,7 @@ exports[`component:<Booking> partial:<Menu> testID 1`] = `
708
708
  class="view fit modal calcWidth"
709
709
  >
710
710
  <div
711
- class="view forceRow header"
711
+ class="view row header hideBack"
712
712
  >
713
713
  <button
714
714
  class="pressable button small squared transparent button"
@@ -979,7 +979,7 @@ exports[`component:<Booking> partial:<Menu> with a store 1`] = `
979
979
  class="view fit modal calcWidth"
980
980
  >
981
981
  <div
982
- class="view forceRow header"
982
+ class="view row header hideBack"
983
983
  >
984
984
  <button
985
985
  class="pressable button small squared transparent button"
@@ -10,10 +10,10 @@ exports[`component:<Booking> partial:<Modal> inherit:className 1`] = `
10
10
  class="view fit modal calcWidth mirai"
11
11
  >
12
12
  <div
13
- class="view forceRow header"
13
+ class="view row header hideBack"
14
14
  >
15
15
  <h3
16
- class="text headline-3 title left"
16
+ class="text headline-3 title"
17
17
  >
18
18
  user.action.resend_booking
19
19
  </h3>
@@ -109,10 +109,10 @@ exports[`component:<Booking> partial:<Modal> renders 1`] = `
109
109
  class="view fit modal calcWidth"
110
110
  >
111
111
  <div
112
- class="view forceRow header"
112
+ class="view row header hideBack"
113
113
  >
114
114
  <h3
115
- class="text headline-3 title left"
115
+ class="text headline-3 title"
116
116
  >
117
117
  user.action.resend_booking
118
118
  </h3>
@@ -210,10 +210,10 @@ exports[`component:<Booking> partial:<Modal> testID 1`] = `
210
210
  data-testid="mirai"
211
211
  >
212
212
  <div
213
- class="view forceRow header"
213
+ class="view row header hideBack"
214
214
  >
215
215
  <h3
216
- class="text headline-3 title left"
216
+ class="text headline-3 title"
217
217
  >
218
218
  user.action.resend_booking
219
219
  </h3>
@@ -310,10 +310,10 @@ exports[`component:<Booking> partial:<Modal> with a store 1`] = `
310
310
  class="view fit modal calcWidth"
311
311
  >
312
312
  <div
313
- class="view forceRow header"
313
+ class="view row header hideBack"
314
314
  >
315
315
  <h3
316
- class="text headline-3 title left"
316
+ class="text headline-3 title"
317
317
  >
318
318
  user.action.resend_booking
319
319
  </h3>
@@ -62,10 +62,10 @@ exports[`component:<Booking> partial:<Others> inherit:className 1`] = `
62
62
  class="view fit modal calcWidth"
63
63
  >
64
64
  <div
65
- class="view forceRow header"
65
+ class="view row header hideBack"
66
66
  >
67
67
  <h3
68
- class="text headline-3 title left"
68
+ class="text headline-3 title"
69
69
  >
70
70
  common.label.cancellation_policy
71
71
  </h3>
@@ -172,10 +172,10 @@ exports[`component:<Booking> partial:<Others> renders 1`] = `
172
172
  class="view fit modal calcWidth"
173
173
  >
174
174
  <div
175
- class="view forceRow header"
175
+ class="view row header hideBack"
176
176
  >
177
177
  <h3
178
- class="text headline-3 title left"
178
+ class="text headline-3 title"
179
179
  >
180
180
  common.label.cancellation_policy
181
181
  </h3>
@@ -283,10 +283,10 @@ exports[`component:<Booking> partial:<Others> testID 1`] = `
283
283
  class="view fit modal calcWidth"
284
284
  >
285
285
  <div
286
- class="view forceRow header"
286
+ class="view row header hideBack"
287
287
  >
288
288
  <h3
289
- class="text headline-3 title left"
289
+ class="text headline-3 title"
290
290
  >
291
291
  common.label.cancellation_policy
292
292
  </h3>
@@ -393,10 +393,10 @@ exports[`component:<Booking> partial:<Others> with a store 1`] = `
393
393
  class="view fit modal calcWidth"
394
394
  >
395
395
  <div
396
- class="view forceRow header"
396
+ class="view row header hideBack"
397
397
  >
398
398
  <h3
399
- class="text headline-3 title left"
399
+ class="text headline-3 title"
400
400
  >
401
401
  common.label.cancellation_policy
402
402
  </h3>
@@ -19,10 +19,10 @@ exports[`component:<BookingQuery> Using ghost feature renders 1`] = `
19
19
  class="view fit modal calcWidth"
20
20
  >
21
21
  <div
22
- class="view forceRow header"
22
+ class="view row header hideBack"
23
23
  >
24
24
  <h3
25
- class="text headline-3 title left"
25
+ class="text headline-3 title"
26
26
  >
27
27
  user.label.booking
28
28
  <span
@@ -197,10 +197,10 @@ exports[`component:<BookingQuery> Using ghost feature with a store using ghost f
197
197
  class="view fit modal calcWidth"
198
198
  >
199
199
  <div
200
- class="view forceRow header"
200
+ class="view row header hideBack"
201
201
  >
202
202
  <h3
203
- class="text headline-3 title left"
203
+ class="text headline-3 title"
204
204
  >
205
205
  user.label.booking
206
206
  <span
@@ -375,10 +375,10 @@ exports[`component:<BookingQuery> inherit:className 1`] = `
375
375
  class="view fit modal calcWidth"
376
376
  >
377
377
  <div
378
- class="view forceRow header"
378
+ class="view row header hideBack"
379
379
  >
380
380
  <h3
381
- class="text headline-3 title left"
381
+ class="text headline-3 title"
382
382
  >
383
383
  user.label.booking
384
384
  <span
@@ -553,10 +553,10 @@ exports[`component:<BookingQuery> renders 1`] = `
553
553
  class="view fit modal calcWidth"
554
554
  >
555
555
  <div
556
- class="view forceRow header"
556
+ class="view row header hideBack"
557
557
  >
558
558
  <h3
559
- class="text headline-3 title left"
559
+ class="text headline-3 title"
560
560
  >
561
561
  user.label.booking
562
562
  <span
@@ -734,10 +734,10 @@ exports[`component:<BookingQuery> testID 1`] = `
734
734
  data-testid="mirai-modal"
735
735
  >
736
736
  <div
737
- class="view forceRow header"
737
+ class="view row header hideBack"
738
738
  >
739
739
  <h3
740
- class="text headline-3 title left"
740
+ class="text headline-3 title"
741
741
  >
742
742
  user.label.booking
743
743
  <span
@@ -918,10 +918,10 @@ exports[`component:<BookingQuery> with a store 1`] = `
918
918
  class="view fit modal calcWidth"
919
919
  >
920
920
  <div
921
- class="view forceRow header"
921
+ class="view row header hideBack"
922
922
  >
923
923
  <h3
924
- class="text headline-3 title left"
924
+ class="text headline-3 title"
925
925
  >
926
926
  user.label.booking
927
927
  <span
@@ -230,7 +230,7 @@ exports[`component:<Checkout> partial:<Confirmation> Test A/B variant A 1`] = `
230
230
  class="view fit modal calcWidth"
231
231
  >
232
232
  <div
233
- class="view forceRow header"
233
+ class="view row header hideBack"
234
234
  >
235
235
  <button
236
236
  class="pressable button small squared transparent button"
@@ -499,7 +499,7 @@ exports[`component:<Checkout> partial:<Confirmation> Test A/B variant B 1`] = `
499
499
  class="view fit modal calcWidth"
500
500
  >
501
501
  <div
502
- class="view forceRow header"
502
+ class="view row header hideBack"
503
503
  >
504
504
  <button
505
505
  class="pressable button small squared transparent button"
@@ -768,7 +768,7 @@ exports[`component:<Checkout> partial:<Confirmation> inherit:className 1`] = `
768
768
  class="view fit modal calcWidth"
769
769
  >
770
770
  <div
771
- class="view forceRow header"
771
+ class="view row header hideBack"
772
772
  >
773
773
  <button
774
774
  class="pressable button small squared transparent button"
@@ -1037,7 +1037,7 @@ exports[`component:<Checkout> partial:<Confirmation> renders 1`] = `
1037
1037
  class="view fit modal calcWidth"
1038
1038
  >
1039
1039
  <div
1040
- class="view forceRow header"
1040
+ class="view row header hideBack"
1041
1041
  >
1042
1042
  <button
1043
1043
  class="pressable button small squared transparent button"
@@ -1307,7 +1307,7 @@ exports[`component:<Checkout> partial:<Confirmation> testID 1`] = `
1307
1307
  class="view fit modal calcWidth"
1308
1308
  >
1309
1309
  <div
1310
- class="view forceRow header"
1310
+ class="view row header hideBack"
1311
1311
  >
1312
1312
  <button
1313
1313
  class="pressable button small squared transparent button"
@@ -1576,7 +1576,7 @@ exports[`component:<Checkout> partial:<Confirmation> with a store 1`] = `
1576
1576
  class="view fit modal calcWidth"
1577
1577
  >
1578
1578
  <div
1579
- class="view forceRow header"
1579
+ class="view row header hideBack"
1580
1580
  >
1581
1581
  <button
1582
1582
  class="pressable button small squared transparent button"
@@ -1165,7 +1165,7 @@ exports[`component:<Checkout> partial:<Form> inherit:className 1`] = `
1165
1165
  </select>
1166
1166
  </div>
1167
1167
  <span
1168
- class="icon headline-3 icon expand expandLeft"
1168
+ class="icon headline-3 icon expand"
1169
1169
  >
1170
1170
  <svg
1171
1171
  fill="currentColor"
@@ -2580,7 +2580,7 @@ exports[`component:<Checkout> partial:<Form> renders 1`] = `
2580
2580
  </select>
2581
2581
  </div>
2582
2582
  <span
2583
- class="icon headline-3 icon expand expandLeft"
2583
+ class="icon headline-3 icon expand"
2584
2584
  >
2585
2585
  <svg
2586
2586
  fill="currentColor"
@@ -3996,7 +3996,7 @@ exports[`component:<Checkout> partial:<Form> testID 1`] = `
3996
3996
  </select>
3997
3997
  </div>
3998
3998
  <span
3999
- class="icon headline-3 icon expand expandLeft"
3999
+ class="icon headline-3 icon expand"
4000
4000
  >
4001
4001
  <svg
4002
4002
  fill="currentColor"
@@ -5411,7 +5411,7 @@ exports[`component:<Checkout> partial:<Form> with a store 1`] = `
5411
5411
  </select>
5412
5412
  </div>
5413
5413
  <span
5414
- class="icon headline-3 icon expand expandLeft"
5414
+ class="icon headline-3 icon expand"
5415
5415
  >
5416
5416
  <svg
5417
5417
  fill="currentColor"
@@ -41,10 +41,10 @@ exports[`component:<Checkout> partial:<Session> inherit:className 1`] = `
41
41
  class="view fit modal calcWidth"
42
42
  >
43
43
  <div
44
- class="view forceRow header"
44
+ class="view row header hideBack"
45
45
  >
46
46
  <h3
47
- class="text headline-3 title left"
47
+ class="text headline-3 title"
48
48
  >
49
49
  user.label.title_session
50
50
  </h3>
@@ -245,10 +245,10 @@ exports[`component:<Checkout> partial:<Session> renders 1`] = `
245
245
  class="view fit modal calcWidth"
246
246
  >
247
247
  <div
248
- class="view forceRow header"
248
+ class="view row header hideBack"
249
249
  >
250
250
  <h3
251
- class="text headline-3 title left"
251
+ class="text headline-3 title"
252
252
  >
253
253
  user.label.title_session
254
254
  </h3>
@@ -450,10 +450,10 @@ exports[`component:<Checkout> partial:<Session> testID 1`] = `
450
450
  class="view fit modal calcWidth"
451
451
  >
452
452
  <div
453
- class="view forceRow header"
453
+ class="view row header hideBack"
454
454
  >
455
455
  <h3
456
- class="text headline-3 title left"
456
+ class="text headline-3 title"
457
457
  >
458
458
  user.label.title_session
459
459
  </h3>
@@ -654,10 +654,10 @@ exports[`component:<Checkout> partial:<Session> with a store 1`] = `
654
654
  class="view fit modal calcWidth"
655
655
  >
656
656
  <div
657
- class="view forceRow header"
657
+ class="view row header hideBack"
658
658
  >
659
659
  <h3
660
- class="text headline-3 title left"
660
+ class="text headline-3 title"
661
661
  >
662
662
  user.label.title_session
663
663
  </h3>
@@ -3892,7 +3892,7 @@ exports[`component:<Deals> prop:value 1`] = `
3892
3892
  </select>
3893
3893
  </div>
3894
3894
  <span
3895
- class="icon headline-3 icon expand expandLeft"
3895
+ class="icon headline-3 icon expand"
3896
3896
  >
3897
3897
  <svg
3898
3898
  fill="currentColor"
@@ -3,11 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TRACKING = exports.CONTEXT = exports.ACCOUNT_FIELDS = void 0;
7
- const ACCOUNT_FIELDS = exports.ACCOUNT_FIELDS = ['firstName', 'lastName', 'dateOfBirth', 'subscribed'];
6
+ exports.KEY = exports.CONTEXT = void 0;
8
7
  const CONTEXT = exports.CONTEXT = {
9
- ACCOUNT: 'account',
10
- BOOKINGS: 'bookings'
8
+ SETTINGS: 1,
9
+ BOOKINGS: 2
10
+ };
11
+ const KEY = exports.KEY = {
12
+ profile: CONTEXT.SETTINGS,
13
+ account: CONTEXT.SETTINGS,
14
+ bookings: CONTEXT.BOOKINGS
11
15
  };
12
- const TRACKING = exports.TRACKING = 'PROFILE';
13
16
  //# sourceMappingURL=Profile.constants.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Profile.constants.js","names":["ACCOUNT_FIELDS","exports","CONTEXT","ACCOUNT","BOOKINGS","TRACKING"],"sources":["../../../src/components/Profile/Profile.constants.js"],"sourcesContent":["const ACCOUNT_FIELDS = ['firstName', 'lastName', 'dateOfBirth', 'subscribed'];\n\nconst CONTEXT = {\n ACCOUNT: 'account',\n BOOKINGS: 'bookings',\n};\n\nconst TRACKING = 'PROFILE';\n\nexport { ACCOUNT_FIELDS, CONTEXT, TRACKING };\n"],"mappings":";;;;;;AAAA,MAAMA,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG,CAAC,WAAW,EAAE,UAAU,EAAE,aAAa,EAAE,YAAY,CAAC;AAE7E,MAAME,OAAO,GAAAD,OAAA,CAAAC,OAAA,GAAG;EACdC,OAAO,EAAE,SAAS;EAClBC,QAAQ,EAAE;AACZ,CAAC;AAED,MAAMC,QAAQ,GAAAJ,OAAA,CAAAI,QAAA,GAAG,SAAS"}
1
+ {"version":3,"file":"Profile.constants.js","names":["CONTEXT","exports","SETTINGS","BOOKINGS","KEY","profile","account","bookings"],"sources":["../../../src/components/Profile/Profile.constants.js"],"sourcesContent":["const CONTEXT = {\n SETTINGS: 1,\n BOOKINGS: 2,\n};\n\nconst KEY = {\n profile: CONTEXT.SETTINGS,\n account: CONTEXT.SETTINGS,\n bookings: CONTEXT.BOOKINGS,\n};\n\nexport { CONTEXT, KEY };\n"],"mappings":";;;;;;AAAA,MAAMA,OAAO,GAAAC,OAAA,CAAAD,OAAA,GAAG;EACdE,QAAQ,EAAE,CAAC;EACXC,QAAQ,EAAE;AACZ,CAAC;AAED,MAAMC,GAAG,GAAAH,OAAA,CAAAG,GAAA,GAAG;EACVC,OAAO,EAAEL,OAAO,CAACE,QAAQ;EACzBI,OAAO,EAAEN,OAAO,CAACE,QAAQ;EACzBK,QAAQ,EAAEP,OAAO,CAACG;AACpB,CAAC"}
@@ -5,64 +5,32 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.Profile = void 0;
7
7
  var _dataSources = require("@mirai/data-sources");
8
- var _locale = require("@mirai/locale");
9
8
  var _ui = require("@mirai/ui");
10
9
  var _react = _interopRequireWildcard(require("react"));
11
10
  var _components = require("./components");
12
- var _Profile = require("./Profile.Account");
13
- var _Profile2 = require("./Profile.constants");
14
- var _Profile3 = require("./Profile.l10n");
11
+ var _Profile = require("./Profile.constants");
15
12
  var style = _interopRequireWildcard(require("./Profile.module.css"));
16
- var _Profile4 = require("./Profile.Password");
17
- var _Profile5 = require("./Profile.Signout");
18
13
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
19
14
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
20
15
  const Profile = _ref => {
21
16
  let {
22
17
  ...others
23
18
  } = _ref;
24
- const {
25
- translate
26
- } = (0, _locale.useLocale)();
27
19
  const {
28
20
  value: {
29
- urlParams: {
30
- context,
31
- tab
32
- } = {}
21
+ urlParams = {}
33
22
  }
34
23
  } = (0, _dataSources.useStore)();
35
- const [mode, setMode] = (0, _react.useState)(_Profile2.CONTEXT.ACCOUNT);
24
+ const [context, setContext] = (0, _react.useState)();
36
25
  (0, _react.useEffect)(() => {
37
- setMode((context || tab) === _Profile2.CONTEXT.BOOKINGS ? _Profile2.CONTEXT.BOOKINGS : _Profile2.CONTEXT.ACCOUNT);
38
- }, [context, tab]);
39
- const handleMode = next => {
40
- setMode(next);
41
- };
42
- const is = {
43
- account: mode === _Profile2.CONTEXT.ACCOUNT,
44
- bookings: mode === _Profile2.CONTEXT.BOOKINGS
45
- };
46
- return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_ui.View, {
47
- row: true,
48
- role: "profile",
26
+ const key = urlParams.context || urlParams.tab;
27
+ if (!key) return;
28
+ setContext(_Profile.KEY[key]);
29
+ }, [urlParams]);
30
+ return /*#__PURE__*/_react.default.createElement(_ui.View, {
49
31
  testId: others.testId,
50
- className: (0, _ui.styles)(style.header, others.className)
51
- }, /*#__PURE__*/_react.default.createElement(_ui.Pressable, {
52
- onPress: () => handleMode(_Profile2.CONTEXT.ACCOUNT),
53
- className: (0, _ui.styles)(style.option, is.account && style.active)
54
- }, /*#__PURE__*/_react.default.createElement(_ui.Text, {
55
- action: true,
56
- bold: true
57
- }, translate(_Profile3.L10N.ACTION_PROFILE))), /*#__PURE__*/_react.default.createElement(_ui.Pressable, {
58
- onPress: () => handleMode(_Profile2.CONTEXT.BOOKINGS),
59
- className: (0, _ui.styles)(style.option, is.bookings && style.active)
60
- }, /*#__PURE__*/_react.default.createElement(_ui.Text, {
61
- action: true,
62
- bold: true
63
- }, translate(_Profile3.L10N.ACTION_BOOKINGS)))), /*#__PURE__*/_react.default.createElement(_ui.View, {
64
- className: (0, _ui.styles)(style.content, is.account && style.account)
65
- }, is.account && /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, /*#__PURE__*/_react.default.createElement(_Profile.Account, null), /*#__PURE__*/_react.default.createElement(_Profile4.Password, null), /*#__PURE__*/_react.default.createElement(_Profile5.Signout, null)), is.bookings && /*#__PURE__*/_react.default.createElement(_components.Bookings, null)));
32
+ className: [style.container, others.className]
33
+ }, context === _Profile.CONTEXT.SETTINGS && /*#__PURE__*/_react.default.createElement(_components.Settings, null), context === _Profile.CONTEXT.BOOKINGS && /*#__PURE__*/_react.default.createElement(_components.Bookings, null));
66
34
  };
67
35
  exports.Profile = Profile;
68
36
  Profile.displayName = 'Mirai:Core:Profile';
@@ -1 +1 @@
1
- {"version":3,"file":"Profile.js","names":["_dataSources","require","_locale","_ui","_react","_interopRequireWildcard","_components","_Profile","_Profile2","_Profile3","style","_Profile4","_Profile5","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Profile","_ref","others","translate","useLocale","value","urlParams","context","tab","useStore","mode","setMode","useState","CONTEXT","ACCOUNT","useEffect","BOOKINGS","handleMode","next","is","account","bookings","createElement","Fragment","View","row","role","testId","className","styles","header","Pressable","onPress","option","active","Text","action","bold","L10N","ACTION_PROFILE","ACTION_BOOKINGS","content","Account","Password","Signout","Bookings","exports","displayName","propTypes"],"sources":["../../../src/components/Profile/Profile.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { useLocale } from '@mirai/locale';\nimport { Pressable, styles, Text, View } from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { Bookings } from './components';\nimport { Account } from './Profile.Account';\nimport { CONTEXT } from './Profile.constants';\nimport { L10N } from './Profile.l10n';\nimport * as style from './Profile.module.css';\nimport { Password } from './Profile.Password';\nimport { Signout } from './Profile.Signout';\n\nconst Profile = ({ ...others }) => {\n const { translate } = useLocale();\n const {\n value: { urlParams: { context, tab } = {} },\n } = useStore();\n\n const [mode, setMode] = useState(CONTEXT.ACCOUNT);\n\n useEffect(() => {\n setMode((context || tab) === CONTEXT.BOOKINGS ? CONTEXT.BOOKINGS : CONTEXT.ACCOUNT);\n }, [context, tab]);\n\n const handleMode = (next) => {\n setMode(next);\n };\n\n const is = { account: mode === CONTEXT.ACCOUNT, bookings: mode === CONTEXT.BOOKINGS };\n\n return (\n <>\n <View row role=\"profile\" testId={others.testId} className={styles(style.header, others.className)}>\n <Pressable\n onPress={() => handleMode(CONTEXT.ACCOUNT)}\n className={styles(style.option, is.account && style.active)}\n >\n <Text action bold>\n {translate(L10N.ACTION_PROFILE)}\n </Text>\n </Pressable>\n <Pressable\n onPress={() => handleMode(CONTEXT.BOOKINGS)}\n className={styles(style.option, is.bookings && style.active)}\n >\n <Text action bold>\n {translate(L10N.ACTION_BOOKINGS)}\n </Text>\n </Pressable>\n </View>\n\n <View className={styles(style.content, is.account && style.account)}>\n {is.account && (\n <>\n <Account />\n <Password />\n <Signout />\n </>\n )}\n {is.bookings && <Bookings />}\n </View>\n </>\n );\n};\n\nProfile.displayName = 'Mirai:Core:Profile';\n\nProfile.propTypes = {};\n\nexport { Profile };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAC,uBAAA,CAAAJ,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,SAAA,GAAAP,OAAA;AACA,IAAAQ,SAAA,GAAAR,OAAA;AACA,IAAAS,KAAA,GAAAL,uBAAA,CAAAJ,OAAA;AACA,IAAAU,SAAA,GAAAV,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AAA4C,SAAAY,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CA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AAG,oBAAoB;AAE1C/C,OAAO,CAACgD,SAAS,GAAG,CAAC,CAAC"}
1
+ {"version":3,"file":"Profile.js","names":["_dataSources","require","_ui","_react","_interopRequireWildcard","_components","_Profile","style","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","Profile","_ref","others","value","urlParams","useStore","context","setContext","useState","useEffect","key","tab","KEY","createElement","View","testId","className","container","CONTEXT","SETTINGS","Settings","BOOKINGS","Bookings","exports","displayName","propTypes"],"sources":["../../../src/components/Profile/Profile.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { View } from '@mirai/ui';\nimport React, { useEffect, useState } from 'react';\n\nimport { Bookings, Settings } from './components';\nimport { CONTEXT, KEY } from './Profile.constants';\nimport * as style from './Profile.module.css';\n\nconst Profile = ({ ...others }) => {\n const {\n value: { urlParams = {} },\n } = useStore();\n\n const [context, setContext] = useState();\n\n useEffect(() => {\n const key = urlParams.context || urlParams.tab;\n if (!key) return;\n\n setContext(KEY[key]);\n }, [urlParams]);\n\n return (\n <View testId={others.testId} className={[style.container, others.className]}>\n {context === CONTEXT.SETTINGS && <Settings />}\n {context === CONTEXT.BOOKINGS && <Bookings />}\n </View>\n );\n};\n\nProfile.displayName = 'Mirai:Core:Profile';\n\nProfile.propTypes = {};\n\nexport { Profile };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AAEA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAH,uBAAA,CAAAH,OAAA;AAA8C,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CA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,IAAAC,eAAQ,EAAC,CAAC;EAExC,IAAAC,gBAAS,EAAC,MAAM;IACd,MAAMC,GAAG,GAAGN,SAAS,CAACE,OAAO,IAAIF,SAAS,CAACO,GAAG;IAC9C,IAAI,CAACD,GAAG,EAAE;IAEVH,UAAU,CAACK,YAAG,CAACF,GAAG,CAAC,CAAC;EACtB,CAAC,EAAE,CAACN,SAAS,CAAC,CAAC;EAEf,oBACE9B,MAAA,CAAAW,OAAA,CAAA4B,aAAA,CAACxC,GAAA,CAAAyC,IAAI;IAACC,MAAM,EAAEb,MAAM,CAACa,MAAO;IAACC,SAAS,EAAE,CAACtC,KAAK,CAACuC,SAAS,EAAEf,MAAM,CAACc,SAAS;EAAE,GACzEV,OAAO,KAAKY,gBAAO,CAACC,QAAQ,iBAAI7C,MAAA,CAAAW,OAAA,CAAA4B,aAAA,CAACrC,WAAA,CAAA4C,QAAQ,MAAE,CAAC,EAC5Cd,OAAO,KAAKY,gBAAO,CAACG,QAAQ,iBAAI/C,MAAA,CAAAW,OAAA,CAAA4B,aAAA,CAACrC,WAAA,CAAA8C,QAAQ,MAAE,CACxC,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAvB,OAAA,GAAAA,OAAA;AAEFA,OAAO,CAACwB,WAAW,GAAG,oBAAoB;AAE1CxB,OAAO,CAACyB,SAAS,GAAG,CAAC,CAAC"}
@@ -1,70 +1,4 @@
1
- .button {
2
- margin-bottom: var(--mirai-ui-space-XL);
3
- }
4
-
5
- .buttons {
6
- gap: var(--mirai-ui-space-L);
7
- justify-content: flex-end;
8
- }
9
-
10
- .content {
1
+ .container {
11
2
  max-width: var(--mirai-ui-breakpoint-content);
12
3
  padding: var(--mirai-ui-space-M);
13
4
  }
14
-
15
- .content.account {
16
- max-width: calc(var(--mirai-ui-breakpoint-content) / 2.5);
17
- }
18
-
19
- .description {
20
- margin-bottom: var(--mirai-ui-space-L);
21
- margin-top: var(--mirai-ui-space-XS);
22
- }
23
-
24
- .header {
25
- border-bottom: solid var(--mirai-ui-border-width) var(--mirai-ui-content-border);
26
- padding: var(--mirai-ui-space-S) var(--mirai-ui-space-M);
27
- }
28
-
29
- .header .option {
30
- border-radius: var(--mirai-ui-border-radius);
31
- display: flex;
32
- justify-content: center;
33
- padding: var(--mirai-ui-space-S) var(--mirai-ui-space-M);
34
- }
35
-
36
- .header .option.active {
37
- background-color: var(--mirai-ui-accent);
38
- }
39
- .header .option.active > * {
40
- color: var(--mirai-ui-base);
41
- }
42
-
43
- .notification {
44
- margin-bottom: var(--mirai-ui-space-L);
45
- width: 100%;
46
- }
47
-
48
- .wide {
49
- width: 100%;
50
- }
51
-
52
- @media only screen and (max-width: 768px) {
53
- .header > .option {
54
- flex: 1;
55
- }
56
- }
57
-
58
- @media only screen and (min-width: 768px) {
59
- .header {
60
- height: calc(var(--mirai-ui-input-min-height)+ var(--mirai-ui-space-L));
61
- }
62
-
63
- .header .option {
64
- margin-right: var(--mirai-ui-space-S);
65
- }
66
-
67
- .header > .option:hover:not(.active) {
68
- background-color: var(--mirai-ui-content-background);
69
- }
70
- }