@mirai/core 0.3.175 → 0.3.177

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 (197) hide show
  1. package/.env +7 -4
  2. package/build/components/Booking/Booking.js +1 -1
  3. package/build/components/Booking/Booking.js.map +1 -1
  4. package/build/components/Booking/Booking.l10n.js +0 -15
  5. package/build/components/Booking/Booking.l10n.js.map +1 -1
  6. package/build/components/Booking/Booking.module.css +0 -9
  7. package/build/components/Booking/components/Hotelverse/Hotelverse.js +1 -1
  8. package/build/components/Booking/components/Hotelverse/Hotelverse.js.map +1 -1
  9. package/build/components/Booking/partials/index.js +2 -13
  10. package/build/components/Booking/partials/index.js.map +1 -1
  11. package/build/components/Chat/Chat.constants.js +28 -0
  12. package/build/components/Chat/Chat.constants.js.map +1 -0
  13. package/build/components/Chat/Chat.js +231 -0
  14. package/build/components/Chat/Chat.js.map +1 -0
  15. package/build/components/Chat/Chat.l10n.js +24 -0
  16. package/build/components/Chat/Chat.l10n.js.map +1 -0
  17. package/build/components/Chat/Chat.module.css +90 -0
  18. package/build/components/Chat/Chat.theme.module.css +49 -0
  19. package/build/components/Chat/components/Avatar/Avatar.js +68 -0
  20. package/build/components/Chat/components/Avatar/Avatar.js.map +1 -0
  21. package/build/components/Chat/components/Avatar/Avatar.module.css +81 -0
  22. package/build/components/Chat/components/Avatar/__tests__/__snapshots__/Avatar.test.jsx.snap +97 -0
  23. package/build/components/Chat/components/Avatar/index.js +17 -0
  24. package/build/components/Chat/components/Avatar/index.js.map +1 -0
  25. package/build/components/Chat/components/Input/Input.js +72 -0
  26. package/build/components/Chat/components/Input/Input.js.map +1 -0
  27. package/build/components/Chat/components/Input/Input.l10n.js +15 -0
  28. package/build/components/Chat/components/Input/Input.l10n.js.map +1 -0
  29. package/build/components/Chat/components/Input/Input.module.css +19 -0
  30. package/build/components/Chat/components/Input/__tests__/__snapshots__/Input.test.jsx.snap +175 -0
  31. package/build/components/Chat/components/Input/index.js +17 -0
  32. package/build/components/Chat/components/Input/index.js.map +1 -0
  33. package/build/components/Chat/components/InputRich/InputRich.List.js +52 -0
  34. package/build/components/Chat/components/InputRich/InputRich.List.js.map +1 -0
  35. package/build/components/Chat/components/InputRich/InputRich.js +182 -0
  36. package/build/components/Chat/components/InputRich/InputRich.js.map +1 -0
  37. package/build/components/Chat/components/InputRich/InputRich.l10n.js +12 -0
  38. package/build/components/Chat/components/InputRich/InputRich.l10n.js.map +1 -0
  39. package/build/components/Chat/components/InputRich/InputRich.module.css +73 -0
  40. package/build/components/Chat/components/InputRich/__tests__/__snapshots__/InputRich.test.jsx.snap +275 -0
  41. package/build/components/Chat/components/InputRich/helpers/getVerboseList.js +20 -0
  42. package/build/components/Chat/components/InputRich/helpers/getVerboseList.js.map +1 -0
  43. package/build/components/Chat/components/InputRich/helpers/getVerboseOccupation.js +27 -0
  44. package/build/components/Chat/components/InputRich/helpers/getVerboseOccupation.js.map +1 -0
  45. package/build/components/Chat/components/InputRich/helpers/index.js +28 -0
  46. package/build/components/Chat/components/InputRich/helpers/index.js.map +1 -0
  47. package/build/components/Chat/components/InputRich/index.js +17 -0
  48. package/build/components/Chat/components/InputRich/index.js.map +1 -0
  49. package/build/components/Chat/components/Message/Message.constants.js +18 -0
  50. package/build/components/Chat/components/Message/Message.constants.js.map +1 -0
  51. package/build/components/Chat/components/Message/Message.js +104 -0
  52. package/build/components/Chat/components/Message/Message.js.map +1 -0
  53. package/build/components/Chat/components/Message/Message.module.css +126 -0
  54. package/build/components/Chat/components/Message/__tests__/__snapshots__/Message.test.jsx.snap +211 -0
  55. package/build/components/Chat/components/Message/components/Booking.js +63 -0
  56. package/build/components/Chat/components/Message/components/Booking.js.map +1 -0
  57. package/build/components/Chat/components/Message/components/Card.js +67 -0
  58. package/build/components/Chat/components/Message/components/Card.js.map +1 -0
  59. package/build/components/Chat/components/Message/components/Card.module.css +41 -0
  60. package/build/components/Chat/components/Message/components/Environment.js +58 -0
  61. package/build/components/Chat/components/Message/components/Environment.js.map +1 -0
  62. package/build/components/Chat/components/Message/components/Environment.module.css +22 -0
  63. package/build/components/Chat/components/Message/components/index.js +39 -0
  64. package/build/components/Chat/components/Message/components/index.js.map +1 -0
  65. package/build/components/Chat/components/Message/helpers/getActionIcon.js +13 -0
  66. package/build/components/Chat/components/Message/helpers/getActionIcon.js.map +1 -0
  67. package/build/components/Chat/components/Message/helpers/getTime.js +28 -0
  68. package/build/components/Chat/components/Message/helpers/getTime.js.map +1 -0
  69. package/build/components/Chat/components/Message/helpers/index.js +28 -0
  70. package/build/components/Chat/components/Message/helpers/index.js.map +1 -0
  71. package/build/components/Chat/components/Message/index.js +17 -0
  72. package/build/components/Chat/components/Message/index.js.map +1 -0
  73. package/build/components/Chat/components/Message/intents/BookingQuery.js +66 -0
  74. package/build/components/Chat/components/Message/intents/BookingQuery.js.map +1 -0
  75. package/build/components/Chat/components/Message/intents/HotelInfo.js +73 -0
  76. package/build/components/Chat/components/Message/intents/HotelInfo.js.map +1 -0
  77. package/build/components/Chat/components/Message/intents/Offers.js +57 -0
  78. package/build/components/Chat/components/Message/intents/Offers.js.map +1 -0
  79. package/build/components/Chat/components/Message/intents/Unknown.js +67 -0
  80. package/build/components/Chat/components/Message/intents/Unknown.js.map +1 -0
  81. package/build/components/Chat/components/Message/intents/index.js +50 -0
  82. package/build/components/Chat/components/Message/intents/index.js.map +1 -0
  83. package/build/components/Chat/components/Offline/Offline.js +22 -0
  84. package/build/components/Chat/components/Offline/Offline.js.map +1 -0
  85. package/build/components/Chat/components/Offline/Offline.module.css +3 -0
  86. package/build/components/Chat/components/Offline/index.js +17 -0
  87. package/build/components/Chat/components/Offline/index.js.map +1 -0
  88. package/build/components/Chat/components/index.js +61 -0
  89. package/build/components/Chat/components/index.js.map +1 -0
  90. package/build/components/Chat/helpers/getVerboseDate.js +18 -0
  91. package/build/components/Chat/helpers/getVerboseDate.js.map +1 -0
  92. package/build/components/Chat/helpers/index.js +17 -0
  93. package/build/components/Chat/helpers/index.js.map +1 -0
  94. package/build/components/Chat/index.js +17 -0
  95. package/build/components/Chat/index.js.map +1 -0
  96. package/build/components/Checkout/Checkout.js +20 -5
  97. package/build/components/Checkout/Checkout.js.map +1 -1
  98. package/build/components/Checkout/Checkout.module.css +14 -0
  99. package/build/components/Checkout/helpers/getFieldProps.js +3 -1
  100. package/build/components/Checkout/helpers/getFieldProps.js.map +1 -1
  101. package/build/components/Checkout/partials/Checkout.Confirmation.js +11 -7
  102. package/build/components/Checkout/partials/Checkout.Confirmation.js.map +1 -1
  103. package/build/components/Checkout/partials/Checkout.Form.js +23 -4
  104. package/build/components/Checkout/partials/Checkout.Form.js.map +1 -1
  105. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +932 -16
  106. package/build/components/Header/components/BookingProcess/BookingProcess.js +10 -9
  107. package/build/components/Header/components/BookingProcess/BookingProcess.js.map +1 -1
  108. package/build/components/Profile/components/Settings/Settings.Account.js +26 -8
  109. package/build/components/Profile/components/Settings/Settings.Account.js.map +1 -1
  110. package/build/components/Profile/components/Settings/Settings.module.css +4 -0
  111. package/build/components/Rates/Rates.constants.js +1 -0
  112. package/build/components/Rates/Rates.constants.js.map +1 -1
  113. package/build/components/Rates/Rates.js +2 -0
  114. package/build/components/Rates/Rates.js.map +1 -1
  115. package/build/components/Rates/components/Hotelverse/Hotelverse.js +1 -1
  116. package/build/components/Rates/components/Hotelverse/Hotelverse.js.map +1 -1
  117. package/build/components/Rates/components/Item/components/Features/Features.js +27 -2
  118. package/build/components/Rates/components/Item/components/Features/Features.js.map +1 -1
  119. package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js +5 -1
  120. package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js.map +1 -1
  121. package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js +1 -1
  122. package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js.map +1 -1
  123. package/build/components/Signup/Signup.js +24 -6
  124. package/build/components/Signup/Signup.js.map +1 -1
  125. package/build/components/Signup/Signup.module.css +4 -0
  126. package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +24 -9
  127. package/build/components/{Booking/partials/Booking.Others.js → __shared__/BookingTerms/BookingTerms.js} +17 -18
  128. package/build/components/__shared__/BookingTerms/BookingTerms.js.map +1 -0
  129. package/build/components/__shared__/BookingTerms/BookingTerms.l10n.js +27 -0
  130. package/build/components/__shared__/BookingTerms/BookingTerms.l10n.js.map +1 -0
  131. package/build/components/__shared__/BookingTerms/BookingTerms.module.css +42 -0
  132. package/build/components/{Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap → __shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap} +4 -8
  133. package/build/components/__shared__/BookingTerms/index.js +17 -0
  134. package/build/components/__shared__/BookingTerms/index.js.map +1 -0
  135. package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.js +52 -0
  136. package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.js.map +1 -0
  137. package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.l10n.js +62 -0
  138. package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.l10n.js.map +1 -0
  139. package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.module.css +8 -0
  140. package/build/components/__shared__/NotificationRequiredFields/index.js +17 -0
  141. package/build/components/__shared__/NotificationRequiredFields/index.js.map +1 -0
  142. package/build/components/__shared__/Payment/Payment.js +1 -1
  143. package/build/components/__shared__/Payment/Payment.js.map +1 -1
  144. package/build/components/__shared__/Payment/__tests__/__snapshots__/Payment.test.js.snap +302 -8
  145. package/build/components/__shared__/Payment/components/Card/Card.js +4 -0
  146. package/build/components/__shared__/Payment/components/Card/Card.js.map +1 -1
  147. package/build/components/__shared__/Payment/components/Card/__tests__/__snapshots__/Card.test.js.snap +23 -0
  148. package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js +2 -0
  149. package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js.map +1 -1
  150. package/build/components/__shared__/Payment/components/PCI/PCI.constants.js +1 -2
  151. package/build/components/__shared__/Payment/components/PCI/PCI.constants.js.map +1 -1
  152. package/build/components/__shared__/Payment/components/PCI/PCI.js +59 -56
  153. package/build/components/__shared__/Payment/components/PCI/PCI.js.map +1 -1
  154. package/build/components/__shared__/Payment/components/PCI/__tests__/__snapshots__/PCI.test.js.snap +15 -0
  155. package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js +2 -0
  156. package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js.map +1 -1
  157. package/build/components/__shared__/Payment/helpers/formatExpire.js +15 -0
  158. package/build/components/__shared__/Payment/helpers/formatExpire.js.map +1 -0
  159. package/build/components/__shared__/Payment/helpers/index.js +11 -0
  160. package/build/components/__shared__/Payment/helpers/index.js.map +1 -1
  161. package/build/components/__shared__/index.js +22 -0
  162. package/build/components/__shared__/index.js.map +1 -1
  163. package/build/components/helpers/ICON.js +13 -0
  164. package/build/components/helpers/ICON.js.map +1 -1
  165. package/build/components/index.js +2 -0
  166. package/build/components/index.js.map +1 -1
  167. package/build/helpers/consolidateStore.js +9 -0
  168. package/build/helpers/consolidateStore.js.map +1 -1
  169. package/build/helpers/findComponents.js +3 -2
  170. package/build/helpers/findComponents.js.map +1 -1
  171. package/build/index.js +7 -0
  172. package/build/index.js.map +1 -1
  173. package/build/services/Lisa/action.js +28 -0
  174. package/build/services/Lisa/action.js.map +1 -0
  175. package/build/services/Lisa/index.js +17 -0
  176. package/build/services/Lisa/index.js.map +1 -0
  177. package/build/services/Lisa/message.js +26 -0
  178. package/build/services/Lisa/message.js.map +1 -0
  179. package/build/services/Lisa/status.js +13 -0
  180. package/build/services/Lisa/status.js.map +1 -0
  181. package/build/services/Lisa/welcome.js +25 -0
  182. package/build/services/Lisa/welcome.js.map +1 -0
  183. package/build/services/Rates/__tests__/__mocks__/rates-response-cancel-types.json +21 -0
  184. package/build/services/Rates/__tests__/__mocks__/rates-response-no-taxes-no-local.json +6 -0
  185. package/build/services/Rates/__tests__/__mocks__/rates-response-no-taxes.json +4 -0
  186. package/build/services/Rates/__tests__/__mocks__/rates-response.json +6 -0
  187. package/build/services/Rates/extras.js +1 -1
  188. package/build/services/Rates/extras.js.map +1 -1
  189. package/build/services/Rates/helpers/getItems.js +1 -1
  190. package/build/services/Rates/helpers/getItems.js.map +1 -1
  191. package/build/services/Rates/helpers/parseBoards.js +1 -0
  192. package/build/services/Rates/helpers/parseBoards.js.map +1 -1
  193. package/build/services/index.js +11 -0
  194. package/build/services/index.js.map +1 -1
  195. package/package.json +1 -1
  196. package/public/App.Container.jsx +2 -0
  197. package/build/components/Booking/partials/Booking.Others.js.map +0 -1
@@ -0,0 +1,175 @@
1
+ // Jest Snapshot v1, https://goo.gl/fbAQLP
2
+
3
+ exports[`component:<Input> inherit:className 1`] = `
4
+ <DocumentFragment>
5
+ <div
6
+ class="view row"
7
+ >
8
+ <textarea
9
+ class="input autoResize"
10
+ name="input"
11
+ placeholder="lisa.label.send_message"
12
+ />
13
+ <span
14
+ class="container"
15
+ >
16
+ <button
17
+ class="pressable dispatcher button small squared transparent"
18
+ >
19
+ <span
20
+ class="icon headline-3 lighten"
21
+ >
22
+ <svg
23
+ fill="currentColor"
24
+ height="1em"
25
+ stroke="currentColor"
26
+ stroke-width="0"
27
+ viewBox="0 0 24 24"
28
+ width="1em"
29
+ xmlns="http://www.w3.org/2000/svg"
30
+ >
31
+ <path
32
+ d="M0 0h24v24H0z"
33
+ fill="none"
34
+ />
35
+ <path
36
+ d="M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
37
+ />
38
+ </svg>
39
+ </span>
40
+ </button>
41
+ </span>
42
+ </div>
43
+ </DocumentFragment>
44
+ `;
45
+
46
+ exports[`component:<Input> prop:disabled 1`] = `
47
+ <DocumentFragment>
48
+ <div
49
+ class="view row"
50
+ >
51
+ <textarea
52
+ class="input autoResize"
53
+ name="input"
54
+ placeholder="lisa.label.send_message"
55
+ />
56
+ <span
57
+ class="container"
58
+ >
59
+ <button
60
+ class="pressable disabled dispatcher button small squared transparent disabled"
61
+ disabled=""
62
+ >
63
+ <span
64
+ class="icon headline-3 lighten"
65
+ >
66
+ <svg
67
+ fill="currentColor"
68
+ height="1em"
69
+ stroke="currentColor"
70
+ stroke-width="0"
71
+ viewBox="0 0 24 24"
72
+ width="1em"
73
+ xmlns="http://www.w3.org/2000/svg"
74
+ >
75
+ <path
76
+ d="M0 0h24v24H0z"
77
+ fill="none"
78
+ />
79
+ <path
80
+ d="M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
81
+ />
82
+ </svg>
83
+ </span>
84
+ </button>
85
+ </span>
86
+ </div>
87
+ </DocumentFragment>
88
+ `;
89
+
90
+ exports[`component:<Input> renders 1`] = `
91
+ <DocumentFragment>
92
+ <div
93
+ class="view row"
94
+ >
95
+ <textarea
96
+ class="input autoResize"
97
+ name="input"
98
+ placeholder="lisa.label.send_message"
99
+ />
100
+ <span
101
+ class="container"
102
+ >
103
+ <button
104
+ class="pressable dispatcher button small squared transparent"
105
+ >
106
+ <span
107
+ class="icon headline-3 lighten"
108
+ >
109
+ <svg
110
+ fill="currentColor"
111
+ height="1em"
112
+ stroke="currentColor"
113
+ stroke-width="0"
114
+ viewBox="0 0 24 24"
115
+ width="1em"
116
+ xmlns="http://www.w3.org/2000/svg"
117
+ >
118
+ <path
119
+ d="M0 0h24v24H0z"
120
+ fill="none"
121
+ />
122
+ <path
123
+ d="M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
124
+ />
125
+ </svg>
126
+ </span>
127
+ </button>
128
+ </span>
129
+ </div>
130
+ </DocumentFragment>
131
+ `;
132
+
133
+ exports[`component:<Input> testId 1`] = `
134
+ <DocumentFragment>
135
+ <div
136
+ class="view row"
137
+ data-testid="mirai"
138
+ >
139
+ <textarea
140
+ class="input autoResize"
141
+ name="input"
142
+ placeholder="lisa.label.send_message"
143
+ />
144
+ <span
145
+ class="container"
146
+ >
147
+ <button
148
+ class="pressable dispatcher button small squared transparent"
149
+ >
150
+ <span
151
+ class="icon headline-3 lighten"
152
+ >
153
+ <svg
154
+ fill="currentColor"
155
+ height="1em"
156
+ stroke="currentColor"
157
+ stroke-width="0"
158
+ viewBox="0 0 24 24"
159
+ width="1em"
160
+ xmlns="http://www.w3.org/2000/svg"
161
+ >
162
+ <path
163
+ d="M0 0h24v24H0z"
164
+ fill="none"
165
+ />
166
+ <path
167
+ d="M2.01 21 23 12 2.01 3 2 10l15 2-15 2z"
168
+ />
169
+ </svg>
170
+ </span>
171
+ </button>
172
+ </span>
173
+ </div>
174
+ </DocumentFragment>
175
+ `;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ var _Input = require("./Input");
7
+ Object.keys(_Input).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _Input[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function () {
13
+ return _Input[key];
14
+ }
15
+ });
16
+ });
17
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":["_Input","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../../src/components/Chat/components/Input/index.js"],"sourcesContent":["export * from './Input';\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,MAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,MAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,MAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
@@ -0,0 +1,52 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.List = void 0;
7
+ var _ui = require("@mirai/ui");
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var style = _interopRequireWildcard(require("./InputRich.module.css"));
11
+ 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); }
12
+ 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; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
15
+ const List = _ref => {
16
+ let {
17
+ options = [],
18
+ value,
19
+ onChange = () => {},
20
+ onValid = () => {},
21
+ ...others
22
+ } = _ref;
23
+ const handlePress = id => {
24
+ onChange(id);
25
+ onValid(true);
26
+ };
27
+ return /*#__PURE__*/_react.default.createElement(_ui.ScrollView, _extends({}, others, {
28
+ height: 128,
29
+ className: (0, _ui.styles)(style.list, others.className)
30
+ }), options.map(function () {
31
+ let {
32
+ id,
33
+ label
34
+ } = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
35
+ return /*#__PURE__*/_react.default.createElement(_ui.Pressable, {
36
+ key: id,
37
+ onPress: () => handlePress(id),
38
+ className: (0, _ui.styles)(style.item, value === id && style.selected)
39
+ }, /*#__PURE__*/_react.default.createElement(_ui.Text, null, label));
40
+ }));
41
+ };
42
+ exports.List = List;
43
+ List.propTypes = {
44
+ options: _propTypes.default.arrayOf(_propTypes.default.shape({
45
+ id: _propTypes.default.string,
46
+ label: _propTypes.default.label
47
+ })),
48
+ value: _propTypes.default.string,
49
+ onChange: _propTypes.default.func,
50
+ onValid: _propTypes.default.func
51
+ };
52
+ //# sourceMappingURL=InputRich.List.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputRich.List.js","names":["_ui","require","_propTypes","_interopRequireDefault","_react","style","_interopRequireWildcard","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_extends","assign","bind","target","arguments","length","source","key","apply","List","_ref","options","value","onChange","onValid","others","handlePress","id","createElement","ScrollView","height","className","styles","list","map","label","undefined","Pressable","onPress","item","selected","Text","exports","propTypes","PropTypes","arrayOf","shape","string","func"],"sources":["../../../../../src/components/Chat/components/InputRich/InputRich.List.jsx"],"sourcesContent":["import { Pressable, ScrollView, styles, Text } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport * as style from './InputRich.module.css';\n\nconst List = ({ options = [], value, onChange = () => {}, onValid = () => {}, ...others }) => {\n const handlePress = (id) => {\n onChange(id);\n onValid(true);\n };\n\n return (\n <ScrollView {...others} height={128} className={styles(style.list, others.className)}>\n {options.map(({ id, label } = {}) => (\n <Pressable\n key={id}\n onPress={() => handlePress(id)}\n className={styles(style.item, value === id && style.selected)}\n >\n <Text>{label}</Text>\n </Pressable>\n ))}\n </ScrollView>\n );\n};\n\nList.propTypes = {\n options: PropTypes.arrayOf(\n PropTypes.shape({\n id: PropTypes.string,\n label: PropTypes.label,\n }),\n ),\n value: PropTypes.string,\n onChange: Prop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IAAA,IAAC;MAAEP,EAAE;MAAEQ;IAAM,CAAC,GAAArB,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAsB,SAAA,GAAAtB,SAAA,MAAG,CAAC,CAAC;IAAA,oBAC9B7B,MAAA,CAAAS,OAAA,CAAAkC,aAAA,CAAC/C,GAAA,CAAAwD,SAAS;MACRpB,GAAG,EAAEU,EAAG;MACRW,OAAO,EAAEA,CAAA,KAAMZ,WAAW,CAACC,EAAE,CAAE;MAC/BI,SAAS,EAAE,IAAAC,UAAM,EAAC9C,KAAK,CAACqD,IAAI,EAAEjB,KAAK,KAAKK,EAAE,IAAIzC,KAAK,CAACsD,QAAQ;IAAE,gBAE9DvD,MAAA,CAAAS,OAAA,CAAAkC,aAAA,CAAC/C,GAAA,CAAA4D,IAAI,QAAEN,KAAY,CACV,CAAC;EAAA,CACb,CACS,CAAC;AAEjB,CAAC;AAACO,OAAA,CAAAvB,IAAA,GAAAA,IAAA;AAEFA,IAAI,CAACwB,SAAS,GAAG;EACftB,OAAO,EAAEuB,kBAAS,CAACC,OAAO,CACxBD,kBAAS,CAACE,KAAK,CAAC;IACdnB,EAAE,EAAEiB,kBAAS,CAACG,MAAM;IACpBZ,KAAK,EAAES,kBAAS,CAACT;EACnB,CAAC,CACH,CAAC;EACDb,KAAK,EAAEsB,kBAAS,CAACG,MAAM;EACvBxB,QAAQ,EAAEqB,kBAAS,CAACI,IAAI;EACxBxB,OAAO,EAAEoB,kBAAS,CAACI;AACrB,CAAC"}
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.InputRich = void 0;
7
+ var _dataSources = require("@mirai/data-sources");
8
+ var _locale = require("@mirai/locale");
9
+ var _ui = require("@mirai/ui");
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+ var _react = _interopRequireWildcard(require("react"));
12
+ var _helpers = require("./helpers");
13
+ var _InputRich = require("./InputRich.l10n");
14
+ var _InputRich2 = require("./InputRich.List");
15
+ var style = _interopRequireWildcard(require("./InputRich.module.css"));
16
+ var _shared__ = require("../../../__shared__");
17
+ var _helpers2 = require("../../../helpers");
18
+ var _Chat = require("../../Chat.constants");
19
+ var _helpers3 = require("../../helpers");
20
+ var _Avatar = require("../Avatar");
21
+ 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); }
22
+ 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; }
23
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
24
+ function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
25
+ const CALENDAR_PROPS = {
26
+ format: 'DD/MM/YYYY',
27
+ months: 12,
28
+ range: true,
29
+ vertical: true
30
+ };
31
+ const INPUT_TEXT_TYPES = ['text', 'password', 'email', 'number'];
32
+ const InputRich = _ref => {
33
+ let {
34
+ disabled = false,
35
+ onValue = () => {},
36
+ ...others
37
+ } = _ref;
38
+ const {
39
+ dateFormat,
40
+ translate
41
+ } = (0, _locale.useLocale)();
42
+ const {
43
+ value: {
44
+ lisa,
45
+ locale,
46
+ ...store
47
+ }
48
+ } = (0, _dataSources.useStore)();
49
+ const [dataSource, setDataSource] = (0, _react.useState)();
50
+ const [value, setValue] = (0, _react.useState)();
51
+ const [valid, setValid] = (0, _react.useState)();
52
+ const [visible, setVisible] = (0, _react.useState)();
53
+ (0, _react.useEffect)(() => {
54
+ const callback = function () {
55
+ let props = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
56
+ const {
57
+ response: {
58
+ requirements = {}
59
+ } = {}
60
+ } = lisa;
61
+ const [name] = Object.keys(requirements);
62
+ if (!name) return;
63
+ const next = {
64
+ ...props,
65
+ name,
66
+ ...requirements[name]
67
+ };
68
+ setDataSource(next);
69
+ setValid(); // ! TODO: In some cases (occupation & promocode) we should set "something"
70
+ setValue();
71
+ setVisible(true);
72
+ };
73
+ _dataSources.Event.subscribe(_Chat.EVENT.INPUT_COMPONENT, callback);
74
+ return _dataSources.Event.unsubscribe(_Chat.EVENT.INPUT_COMPONENT, callback);
75
+ }, [lisa, setDataSource]);
76
+ const handleClose = () => {
77
+ setVisible(false);
78
+ };
79
+ const handleChange = value => {
80
+ const {
81
+ type
82
+ } = dataSource;
83
+ let next = value;
84
+ if (type === 'calendar') {
85
+ const [from, to] = value || [];
86
+ next = [from ? dateFormat(from, CALENDAR_PROPS) : undefined, to ? dateFormat(to, CALENDAR_PROPS) : undefined];
87
+ setValid(!!from && !!to);
88
+ }
89
+ setValue(next);
90
+ };
91
+ const handleSubmit = () => {
92
+ const {
93
+ intent,
94
+ response: {
95
+ form = {},
96
+ value: context = {}
97
+ } = {}
98
+ } = lisa;
99
+ const {
100
+ name,
101
+ required,
102
+ onSubmit,
103
+ ...component
104
+ } = dataSource;
105
+ if (onSubmit) {
106
+ const text = is.calendar ? (0, _helpers3.getVerboseDate)(value, locale) : is.occupation ? (0, _helpers.getVerboseOccupation)({
107
+ store,
108
+ translate,
109
+ value
110
+ }) : is.list ? (0, _helpers.getVerboseList)(value, component) : value;
111
+ onSubmit({
112
+ text,
113
+ value
114
+ });
115
+ }
116
+ onValue({
117
+ intent,
118
+ context,
119
+ form: {
120
+ ...form,
121
+ [name]: is.text && !required && !value ? ' ' : value
122
+ }
123
+ });
124
+ setVisible(false);
125
+ };
126
+ const {
127
+ required,
128
+ text,
129
+ type,
130
+ ...component
131
+ } = dataSource || {};
132
+ const is = {
133
+ calendar: type === 'calendar',
134
+ list: type === 'list',
135
+ occupation: type === 'occupation',
136
+ text: INPUT_TEXT_TYPES.includes(type)
137
+ };
138
+ return /*#__PURE__*/_react.default.createElement(_ui.View, _extends({}, others, {
139
+ className: [style.container, visible && style.visible]
140
+ }), /*#__PURE__*/_react.default.createElement(_ui.View, {
141
+ className: [style.content, visible && style.visible]
142
+ }, /*#__PURE__*/_react.default.createElement(_ui.View, {
143
+ row: true,
144
+ className: style.header
145
+ }, /*#__PURE__*/_react.default.createElement(_Avatar.Avatar, {
146
+ small: true
147
+ }), /*#__PURE__*/_react.default.createElement(_ui.Text, {
148
+ bold: true,
149
+ headline: true,
150
+ wide: true
151
+ }, text), /*#__PURE__*/_react.default.createElement(_ui.Button, {
152
+ squared: true,
153
+ transparent: true,
154
+ onPress: handleClose
155
+ }, /*#__PURE__*/_react.default.createElement(_ui.Icon, {
156
+ headline: true,
157
+ value: _helpers2.ICON.CLOSE
158
+ }))), type && /*#__PURE__*/_react.default.createElement(is.calendar ? _ui.Calendar : is.occupation ? _shared__.Occupation : is.list ? _InputRich2.List : _ui.InputText, {
159
+ ...component,
160
+ ...(type === 'calendar' ? CALENDAR_PROPS : {}),
161
+ locale,
162
+ value,
163
+ onChange: handleChange,
164
+ onError: () => setValid(false),
165
+ onValid: () => setValid(true),
166
+ onSubmit: undefined,
167
+ className: (0, _ui.styles)(style.component, is.text && style.inputText, component.className)
168
+ }), /*#__PURE__*/_react.default.createElement(_ui.View, {
169
+ className: style.footer
170
+ }, /*#__PURE__*/_react.default.createElement(_ui.Button, {
171
+ disabled: disabled || required && !valid,
172
+ large: true,
173
+ wide: true,
174
+ onPress: handleSubmit
175
+ }, translate(_InputRich.L10N.ACTION_APPLY)))));
176
+ };
177
+ exports.InputRich = InputRich;
178
+ InputRich.propTypes = {
179
+ disabled: _propTypes.default.bool,
180
+ onValue: _propTypes.default.func
181
+ };
182
+ //# sourceMappingURL=InputRich.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputRich.js","names":["_dataSources","require","_locale","_ui","_propTypes","_interopRequireDefault","_react","_interopRequireWildcard","_helpers","_InputRich","_InputRich2","style","_shared__","_helpers2","_Chat","_helpers3","_Avatar","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","prototype","hasOwnProperty","call","i","set","obj","_extends","assign","bind","target","arguments","length","source","key","apply","CALENDAR_PROPS","format","months","range","vertical","INPUT_TEXT_TYPES","InputRich","_ref","disabled","onValue","others","dateFormat","translate","useLocale","value","lisa","locale","store","useStore","dataSource","setDataSource","useState","setValue","valid","setValid","visible","setVisible","useEffect","callback","props","undefined","response","requirements","name","keys","next","Event","subscribe","EVENT","INPUT_COMPONENT","unsubscribe","handleClose","handleChange","type","from","to","handleSubmit","intent","form","context","required","onSubmit","component","text","is","calendar","getVerboseDate","occupation","getVerboseOccupation","list","getVerboseList","includes","createElement","View","className","container","content","row","header","Avatar","small","Text","bold","headline","wide","Button","squared","transparent","onPress","Icon","ICON","CLOSE","React","Calendar","Occupation","List","InputText","onChange","onError","onValid","styles","inputText","footer","large","L10N","ACTION_APPLY","exports","propTypes","PropTypes","bool","func"],"sources":["../../../../../src/components/Chat/components/InputRich/InputRich.jsx"],"sourcesContent":["import { Event, useStore } from '@mirai/data-sources';\nimport { useLocale } from '@mirai/locale';\nimport { Button, Calendar, Icon, InputText, styles, Text, View } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React, { useEffect, useState } from 'react';\n\nimport { getVerboseList, getVerboseOccupation } from './helpers';\nimport { L10N } from './InputRich.l10n';\nimport { List } from './InputRich.List';\nimport * as style from './InputRich.module.css';\nimport { Occupation } from '../../../__shared__';\nimport { ICON } from '../../../helpers';\nimport { EVENT } from '../../Chat.constants';\nimport { getVerboseDate } from '../../helpers';\nimport { Avatar } from '../Avatar';\n\nconst CALENDAR_PROPS = { format: 'DD/MM/YYYY', months: 12, range: true, vertical: true };\nconst INPUT_TEXT_TYPES = ['text', 'password', 'email', 'number'];\n\nconst InputRich = ({ disabled = false, onValue = () => {}, ...others }) => {\n const { dateFormat, translate } = useLocale();\n const {\n value: { lisa, locale, ...store },\n } = useStore();\n\n const [dataSource, setDataSource] = useState();\n const [value, setValue] = useState();\n const [valid, setValid] = useState();\n const [visible, setVisible] = useState();\n\n useEffect(() => {\n const callback = (props = {}) => {\n const { response: { requirements = {} } = {} } = lisa;\n const [name] = Object.keys(requirements);\n if (!name) return;\n\n const next = { ...props, name, ...requirements[name] };\n setDataSource(next);\n\n setValid(); // ! TODO: In some cases (occupation & promocode) we should set \"something\"\n setValue();\n setVisible(true);\n };\n\n Event.subscribe(EVENT.INPUT_COMPONENT, callback);\n return Event.unsubscribe(EVENT.INPUT_COMPONENT, callback);\n }, [lisa, setDataSource]);\n\n const handleClose = () => {\n setVisible(false);\n };\n\n const handleChange = (value) => {\n const { type } = dataSource;\n let next = value;\n\n if (type === 'calendar') {\n const [from, to] = value || [];\n next = [from ? dateFormat(from, CALENDAR_PROPS) : undefined, to ? dateFormat(to, CALENDAR_PROPS) : undefined];\n setValid(!!from && !!to);\n }\n\n setValue(next);\n };\n\n const handleSubmit = () => {\n const { intent, response: { form = {}, value: context = {} } = {} } = lisa;\n const { name, required, onSubmit, ...component } = dataSource;\n\n if (onSubmit) {\n const text = is.calendar\n ? getVerboseDate(value, locale)\n : is.occupation\n ? getVerboseOccupation({ store, translate, value })\n : is.list\n ? getVerboseList(value, component)\n : value;\n onSubmit({ text, value });\n }\n onValue({\n intent,\n context,\n form: { ...form, [name]: is.text && !required && !value ? ' ' : value },\n });\n setVisible(false);\n };\n\n const { required, text, type, ...component } = dataSource || {};\n const is = {\n calendar: type === 'calendar',\n list: type === 'list',\n occupation: type === 'occupation',\n text: INPUT_TEXT_TYPES.includes(type),\n };\n\n return (\n <View {...others} className={[style.container, visible && style.visible]}>\n <View className={[style.content, visible && style.visible]}>\n <View row className={style.header}>\n <Avatar small />\n\n <Text bold headline wide>\n {text}\n </Text>\n\n <Button squared transparent onPress={handleClose}>\n <Icon headline value={ICON.CLOSE} />\n </Button>\n </View>\n\n {type &&\n React.createElement(is.calendar ? Calendar : is.occupation ? Occupation : is.list ? List : InputText, {\n ...component,\n ...(type === 'calendar' ? CALENDAR_PROPS : {}),\n locale,\n value,\n onChange: handleChange,\n onError: () => setValid(false),\n onValid: () => setValid(true),\n onSubmit: undefined,\n className: styles(style.component, is.text && style.inputText, component.className),\n })}\n\n <View className={style.footer}>\n <Button disabled={disabled || (required && !valid)} large wide onPress={handleSubmit}>\n {translate(L10N.ACTION_APPLY)}\n </Button>\n </View>\n </View>\n </View>\n );\n};\n\nInputRich.propTypes = {\n disabled: PropTypes.bool,\n onValue: PropTypes.func,\n};\n\nexport { InputRich };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,GAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAC,sBAAA,CAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAC,uBAAA,CAAAN,OAAA;AAEA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,WAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAJ,uBAAA,CAAAN,OAAA;AACA,IAAAW,SAAA,GAAAX,OAAA;AACA,IAAAY,SAAA,GAAAZ,OAAA;AACA,IAAAa,KAAA,GAAAb,OAAA;AACA,IAAAc,SAAA,GAAAd,OAAA;AACA,IAAAe,OAAA,GAAAf,OAAA;AAAmC,SAAAgB,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAA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strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.L10N = void 0;
7
+ const L10N = exports.L10N = {
8
+ ACTION_APPLY: {
9
+ id: 'common.action.apply'
10
+ }
11
+ };
12
+ //# sourceMappingURL=InputRich.l10n.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"InputRich.l10n.js","names":["L10N","exports","ACTION_APPLY","id"],"sources":["../../../../../src/components/Chat/components/InputRich/InputRich.l10n.js"],"sourcesContent":["export const L10N = {\n ACTION_APPLY: { id: 'common.action.apply' },\n};\n"],"mappings":";;;;;;AAAO,MAAMA,IAAI,GAAAC,OAAA,CAAAD,IAAA,GAAG;EAClBE,YAAY,EAAE;IAAEC,EAAE,EAAE;EAAsB;AAC5C,CAAC"}
@@ -0,0 +1,73 @@
1
+ .container {
2
+ backdrop-filter: blur(8px);
3
+ background-color: var(--mirai-chat-base-opacity);
4
+ bottom: 0;
5
+ height: 100%;
6
+ justify-content: flex-end;
7
+ left: 0;
8
+ pointer-events: none;
9
+ position: absolute;
10
+ opacity: 0;
11
+ transition: opacity var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
12
+ transition-delay: var(--mirai-ui-motion-expand);
13
+ width: 100%;
14
+ z-index: 0;
15
+ }
16
+
17
+ .container.visible {
18
+ opacity: 1;
19
+ pointer-events: all;
20
+ transition-delay: var(--mirai-ui-motion-expand);
21
+ }
22
+
23
+ .content {
24
+ transform: translateY(100%);
25
+ transition: transform var(--mirai-ui-motion-expand) var(--mirai-ui-motion-easing);
26
+ transition-delay: 0;
27
+ }
28
+
29
+ .content.visible {
30
+ transform: translateY(0%);
31
+ transition-delay: var(--mirai-ui-motion-expand);
32
+ }
33
+
34
+ .content .header {
35
+ gap: calc(var(--mirai-chat-space) / 2);
36
+ height: var(--mirai-chat-header-height);
37
+ padding: 0 var(--mirai-chat-space);
38
+ }
39
+
40
+ .content .component {
41
+ width: 100%;
42
+ }
43
+
44
+ .content .component.inputText {
45
+ margin: 0 var(--mirai-chat-space);
46
+ width: auto;
47
+ }
48
+
49
+ .content .footer {
50
+ padding: var(--mirai-chat-space);
51
+ }
52
+
53
+ /* -- InputRich.List.jsx */
54
+ .list {
55
+ flex: 1;
56
+ max-height: 75svh;
57
+ }
58
+
59
+ .list .item {
60
+ padding: var(--mirai-ui-space-XS) var(--mirai-chat-space);
61
+ width: 100%;
62
+ min-height: var(--mirai-ui-space-L);
63
+ }
64
+
65
+ .list .item.selected,
66
+ .list .item:hover {
67
+ background-color: var(--mirai-chat-accent);
68
+ }
69
+
70
+ .list .item.selected *,
71
+ .list .item:hover * {
72
+ color: var(--mirai-chat-text-accent-color);
73
+ }