@mirai/core 0.3.175 → 0.3.176
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/.env +7 -4
- package/build/components/Booking/Booking.js +1 -1
- package/build/components/Booking/Booking.js.map +1 -1
- package/build/components/Booking/Booking.l10n.js +0 -15
- package/build/components/Booking/Booking.l10n.js.map +1 -1
- package/build/components/Booking/Booking.module.css +0 -9
- package/build/components/Booking/components/Hotelverse/Hotelverse.js +1 -1
- package/build/components/Booking/components/Hotelverse/Hotelverse.js.map +1 -1
- package/build/components/Booking/partials/index.js +2 -13
- package/build/components/Booking/partials/index.js.map +1 -1
- package/build/components/Chat/Chat.constants.js +28 -0
- package/build/components/Chat/Chat.constants.js.map +1 -0
- package/build/components/Chat/Chat.js +231 -0
- package/build/components/Chat/Chat.js.map +1 -0
- package/build/components/Chat/Chat.l10n.js +24 -0
- package/build/components/Chat/Chat.l10n.js.map +1 -0
- package/build/components/Chat/Chat.module.css +90 -0
- package/build/components/Chat/Chat.theme.module.css +49 -0
- package/build/components/Chat/components/Avatar/Avatar.js +68 -0
- package/build/components/Chat/components/Avatar/Avatar.js.map +1 -0
- package/build/components/Chat/components/Avatar/Avatar.module.css +81 -0
- package/build/components/Chat/components/Avatar/__tests__/__snapshots__/Avatar.test.jsx.snap +97 -0
- package/build/components/Chat/components/Avatar/index.js +17 -0
- package/build/components/Chat/components/Avatar/index.js.map +1 -0
- package/build/components/Chat/components/Input/Input.js +72 -0
- package/build/components/Chat/components/Input/Input.js.map +1 -0
- package/build/components/Chat/components/Input/Input.l10n.js +15 -0
- package/build/components/Chat/components/Input/Input.l10n.js.map +1 -0
- package/build/components/Chat/components/Input/Input.module.css +19 -0
- package/build/components/Chat/components/Input/__tests__/__snapshots__/Input.test.jsx.snap +175 -0
- package/build/components/Chat/components/Input/index.js +17 -0
- package/build/components/Chat/components/Input/index.js.map +1 -0
- package/build/components/Chat/components/InputRich/InputRich.List.js +52 -0
- package/build/components/Chat/components/InputRich/InputRich.List.js.map +1 -0
- package/build/components/Chat/components/InputRich/InputRich.js +182 -0
- package/build/components/Chat/components/InputRich/InputRich.js.map +1 -0
- package/build/components/Chat/components/InputRich/InputRich.l10n.js +12 -0
- package/build/components/Chat/components/InputRich/InputRich.l10n.js.map +1 -0
- package/build/components/Chat/components/InputRich/InputRich.module.css +73 -0
- package/build/components/Chat/components/InputRich/__tests__/__snapshots__/InputRich.test.jsx.snap +275 -0
- package/build/components/Chat/components/InputRich/helpers/getVerboseList.js +20 -0
- package/build/components/Chat/components/InputRich/helpers/getVerboseList.js.map +1 -0
- package/build/components/Chat/components/InputRich/helpers/getVerboseOccupation.js +27 -0
- package/build/components/Chat/components/InputRich/helpers/getVerboseOccupation.js.map +1 -0
- package/build/components/Chat/components/InputRich/helpers/index.js +28 -0
- package/build/components/Chat/components/InputRich/helpers/index.js.map +1 -0
- package/build/components/Chat/components/InputRich/index.js +17 -0
- package/build/components/Chat/components/InputRich/index.js.map +1 -0
- package/build/components/Chat/components/Message/Message.constants.js +18 -0
- package/build/components/Chat/components/Message/Message.constants.js.map +1 -0
- package/build/components/Chat/components/Message/Message.js +104 -0
- package/build/components/Chat/components/Message/Message.js.map +1 -0
- package/build/components/Chat/components/Message/Message.module.css +126 -0
- package/build/components/Chat/components/Message/__tests__/__snapshots__/Message.test.jsx.snap +211 -0
- package/build/components/Chat/components/Message/components/Booking.js +63 -0
- package/build/components/Chat/components/Message/components/Booking.js.map +1 -0
- package/build/components/Chat/components/Message/components/Card.js +67 -0
- package/build/components/Chat/components/Message/components/Card.js.map +1 -0
- package/build/components/Chat/components/Message/components/Card.module.css +41 -0
- package/build/components/Chat/components/Message/components/Environment.js +58 -0
- package/build/components/Chat/components/Message/components/Environment.js.map +1 -0
- package/build/components/Chat/components/Message/components/Environment.module.css +22 -0
- package/build/components/Chat/components/Message/components/index.js +39 -0
- package/build/components/Chat/components/Message/components/index.js.map +1 -0
- package/build/components/Chat/components/Message/helpers/getActionIcon.js +13 -0
- package/build/components/Chat/components/Message/helpers/getActionIcon.js.map +1 -0
- package/build/components/Chat/components/Message/helpers/getTime.js +28 -0
- package/build/components/Chat/components/Message/helpers/getTime.js.map +1 -0
- package/build/components/Chat/components/Message/helpers/index.js +28 -0
- package/build/components/Chat/components/Message/helpers/index.js.map +1 -0
- package/build/components/Chat/components/Message/index.js +17 -0
- package/build/components/Chat/components/Message/index.js.map +1 -0
- package/build/components/Chat/components/Message/intents/BookingQuery.js +66 -0
- package/build/components/Chat/components/Message/intents/BookingQuery.js.map +1 -0
- package/build/components/Chat/components/Message/intents/HotelInfo.js +73 -0
- package/build/components/Chat/components/Message/intents/HotelInfo.js.map +1 -0
- package/build/components/Chat/components/Message/intents/Offers.js +57 -0
- package/build/components/Chat/components/Message/intents/Offers.js.map +1 -0
- package/build/components/Chat/components/Message/intents/Unknown.js +67 -0
- package/build/components/Chat/components/Message/intents/Unknown.js.map +1 -0
- package/build/components/Chat/components/Message/intents/index.js +50 -0
- package/build/components/Chat/components/Message/intents/index.js.map +1 -0
- package/build/components/Chat/components/Offline/Offline.js +22 -0
- package/build/components/Chat/components/Offline/Offline.js.map +1 -0
- package/build/components/Chat/components/Offline/Offline.module.css +3 -0
- package/build/components/Chat/components/Offline/index.js +17 -0
- package/build/components/Chat/components/Offline/index.js.map +1 -0
- package/build/components/Chat/components/index.js +61 -0
- package/build/components/Chat/components/index.js.map +1 -0
- package/build/components/Chat/helpers/getVerboseDate.js +18 -0
- package/build/components/Chat/helpers/getVerboseDate.js.map +1 -0
- package/build/components/Chat/helpers/index.js +17 -0
- package/build/components/Chat/helpers/index.js.map +1 -0
- package/build/components/Chat/index.js +17 -0
- package/build/components/Chat/index.js.map +1 -0
- package/build/components/Checkout/Checkout.js +20 -5
- package/build/components/Checkout/Checkout.js.map +1 -1
- package/build/components/Checkout/Checkout.module.css +14 -0
- package/build/components/Checkout/helpers/getFieldProps.js +3 -1
- package/build/components/Checkout/helpers/getFieldProps.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Confirmation.js +11 -7
- package/build/components/Checkout/partials/Checkout.Confirmation.js.map +1 -1
- package/build/components/Checkout/partials/Checkout.Form.js +23 -4
- package/build/components/Checkout/partials/Checkout.Form.js.map +1 -1
- package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +932 -16
- package/build/components/Profile/components/Settings/Settings.Account.js +26 -8
- package/build/components/Profile/components/Settings/Settings.Account.js.map +1 -1
- package/build/components/Profile/components/Settings/Settings.module.css +4 -0
- package/build/components/Rates/Rates.constants.js +1 -0
- package/build/components/Rates/Rates.constants.js.map +1 -1
- package/build/components/Rates/Rates.js +2 -0
- package/build/components/Rates/Rates.js.map +1 -1
- package/build/components/Rates/components/Hotelverse/Hotelverse.js +1 -1
- package/build/components/Rates/components/Hotelverse/Hotelverse.js.map +1 -1
- package/build/components/Rates/components/Item/components/Features/Features.js +27 -2
- package/build/components/Rates/components/Item/components/Features/Features.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js +5 -1
- package/build/components/Rates/components/Item/components/ModalInfo/ModalInfo.js.map +1 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js +1 -1
- package/build/components/Rates/components/Item/components/ModalRateInfo/ModalRateInfo.js.map +1 -1
- package/build/components/Signup/Signup.js +24 -6
- package/build/components/Signup/Signup.js.map +1 -1
- package/build/components/Signup/Signup.module.css +4 -0
- package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +24 -9
- package/build/components/{Booking/partials/Booking.Others.js → __shared__/BookingTerms/BookingTerms.js} +17 -18
- package/build/components/__shared__/BookingTerms/BookingTerms.js.map +1 -0
- package/build/components/__shared__/BookingTerms/BookingTerms.l10n.js +27 -0
- package/build/components/__shared__/BookingTerms/BookingTerms.l10n.js.map +1 -0
- package/build/components/__shared__/BookingTerms/BookingTerms.module.css +42 -0
- package/build/components/{Booking/partials/__tests__/__snapshots__/Booking.Others.test.js.snap → __shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap} +4 -8
- package/build/components/__shared__/BookingTerms/index.js +17 -0
- package/build/components/__shared__/BookingTerms/index.js.map +1 -0
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.js +52 -0
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.js.map +1 -0
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.l10n.js +62 -0
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.l10n.js.map +1 -0
- package/build/components/__shared__/NotificationRequiredFields/NotificationRequiredFields.module.css +8 -0
- package/build/components/__shared__/NotificationRequiredFields/index.js +17 -0
- package/build/components/__shared__/NotificationRequiredFields/index.js.map +1 -0
- package/build/components/__shared__/Payment/Payment.js +1 -1
- package/build/components/__shared__/Payment/Payment.js.map +1 -1
- package/build/components/__shared__/Payment/__tests__/__snapshots__/Payment.test.js.snap +302 -8
- package/build/components/__shared__/Payment/components/Card/Card.js +4 -0
- package/build/components/__shared__/Payment/components/Card/Card.js.map +1 -1
- package/build/components/__shared__/Payment/components/Card/__tests__/__snapshots__/Card.test.js.snap +23 -0
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js +2 -0
- package/build/components/__shared__/Payment/components/Card/helpers/formatValues.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js +1 -2
- package/build/components/__shared__/Payment/components/PCI/PCI.constants.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/PCI.js +59 -56
- package/build/components/__shared__/Payment/components/PCI/PCI.js.map +1 -1
- package/build/components/__shared__/Payment/components/PCI/__tests__/__snapshots__/PCI.test.js.snap +15 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js +2 -0
- package/build/components/__shared__/Payment/components/PCI/helpers/formatValues.js.map +1 -1
- package/build/components/__shared__/Payment/helpers/formatExpire.js +15 -0
- package/build/components/__shared__/Payment/helpers/formatExpire.js.map +1 -0
- package/build/components/__shared__/Payment/helpers/index.js +11 -0
- package/build/components/__shared__/Payment/helpers/index.js.map +1 -1
- package/build/components/__shared__/index.js +22 -0
- package/build/components/__shared__/index.js.map +1 -1
- package/build/components/helpers/ICON.js +13 -0
- package/build/components/helpers/ICON.js.map +1 -1
- package/build/components/index.js +2 -0
- package/build/components/index.js.map +1 -1
- package/build/services/Lisa/action.js +28 -0
- package/build/services/Lisa/action.js.map +1 -0
- package/build/services/Lisa/index.js +17 -0
- package/build/services/Lisa/index.js.map +1 -0
- package/build/services/Lisa/message.js +26 -0
- package/build/services/Lisa/message.js.map +1 -0
- package/build/services/Lisa/status.js +13 -0
- package/build/services/Lisa/status.js.map +1 -0
- package/build/services/Lisa/welcome.js +25 -0
- package/build/services/Lisa/welcome.js.map +1 -0
- package/build/services/Rates/__tests__/__mocks__/rates-response-cancel-types.json +21 -0
- package/build/services/Rates/__tests__/__mocks__/rates-response-no-taxes-no-local.json +6 -0
- package/build/services/Rates/__tests__/__mocks__/rates-response-no-taxes.json +4 -0
- package/build/services/Rates/__tests__/__mocks__/rates-response.json +6 -0
- package/build/services/Rates/extras.js +1 -1
- package/build/services/Rates/extras.js.map +1 -1
- package/build/services/Rates/helpers/getItems.js +1 -1
- package/build/services/Rates/helpers/getItems.js.map +1 -1
- package/build/services/Rates/helpers/parseBoards.js +1 -0
- package/build/services/Rates/helpers/parseBoards.js.map +1 -1
- package/build/services/index.js +11 -0
- package/build/services/index.js.map +1 -1
- package/package.json +1 -1
- package/public/App.Container.jsx +2 -0
- package/build/components/Booking/partials/Booking.Others.js.map +0 -1
package/build/components/Chat/components/InputRich/__tests__/__snapshots__/InputRich.test.jsx.snap
ADDED
|
@@ -0,0 +1,275 @@
|
|
|
1
|
+
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
|
2
|
+
|
|
3
|
+
exports[`component:<InputRich> inherit:className 1`] = `
|
|
4
|
+
<DocumentFragment>
|
|
5
|
+
<div
|
|
6
|
+
class="view"
|
|
7
|
+
>
|
|
8
|
+
<div
|
|
9
|
+
class="view"
|
|
10
|
+
>
|
|
11
|
+
<div
|
|
12
|
+
class="view row"
|
|
13
|
+
>
|
|
14
|
+
<div
|
|
15
|
+
class="view"
|
|
16
|
+
>
|
|
17
|
+
<div
|
|
18
|
+
class="view"
|
|
19
|
+
>
|
|
20
|
+
<div
|
|
21
|
+
class="view"
|
|
22
|
+
/>
|
|
23
|
+
<div
|
|
24
|
+
class="view"
|
|
25
|
+
/>
|
|
26
|
+
</div>
|
|
27
|
+
</div>
|
|
28
|
+
<h3
|
|
29
|
+
class="text bold headline-3 wide"
|
|
30
|
+
/>
|
|
31
|
+
<button
|
|
32
|
+
class="pressable button squared transparent"
|
|
33
|
+
>
|
|
34
|
+
<span
|
|
35
|
+
class="icon headline-3"
|
|
36
|
+
>
|
|
37
|
+
<svg
|
|
38
|
+
fill="currentColor"
|
|
39
|
+
height="1em"
|
|
40
|
+
stroke="currentColor"
|
|
41
|
+
stroke-width="0"
|
|
42
|
+
viewBox="0 0 24 24"
|
|
43
|
+
width="1em"
|
|
44
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
45
|
+
>
|
|
46
|
+
<path
|
|
47
|
+
d="M0 0h24v24H0V0z"
|
|
48
|
+
fill="none"
|
|
49
|
+
/>
|
|
50
|
+
<path
|
|
51
|
+
d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
52
|
+
/>
|
|
53
|
+
</svg>
|
|
54
|
+
</span>
|
|
55
|
+
</button>
|
|
56
|
+
</div>
|
|
57
|
+
<div
|
|
58
|
+
class="view"
|
|
59
|
+
>
|
|
60
|
+
<button
|
|
61
|
+
class="pressable button large wide"
|
|
62
|
+
>
|
|
63
|
+
common.action.apply
|
|
64
|
+
</button>
|
|
65
|
+
</div>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</DocumentFragment>
|
|
69
|
+
`;
|
|
70
|
+
|
|
71
|
+
exports[`component:<InputRich> prop:disabled 1`] = `
|
|
72
|
+
<DocumentFragment>
|
|
73
|
+
<div
|
|
74
|
+
class="view"
|
|
75
|
+
>
|
|
76
|
+
<div
|
|
77
|
+
class="view"
|
|
78
|
+
>
|
|
79
|
+
<div
|
|
80
|
+
class="view row"
|
|
81
|
+
>
|
|
82
|
+
<div
|
|
83
|
+
class="view"
|
|
84
|
+
>
|
|
85
|
+
<div
|
|
86
|
+
class="view"
|
|
87
|
+
>
|
|
88
|
+
<div
|
|
89
|
+
class="view"
|
|
90
|
+
/>
|
|
91
|
+
<div
|
|
92
|
+
class="view"
|
|
93
|
+
/>
|
|
94
|
+
</div>
|
|
95
|
+
</div>
|
|
96
|
+
<h3
|
|
97
|
+
class="text bold headline-3 wide"
|
|
98
|
+
/>
|
|
99
|
+
<button
|
|
100
|
+
class="pressable button squared transparent"
|
|
101
|
+
>
|
|
102
|
+
<span
|
|
103
|
+
class="icon headline-3"
|
|
104
|
+
>
|
|
105
|
+
<svg
|
|
106
|
+
fill="currentColor"
|
|
107
|
+
height="1em"
|
|
108
|
+
stroke="currentColor"
|
|
109
|
+
stroke-width="0"
|
|
110
|
+
viewBox="0 0 24 24"
|
|
111
|
+
width="1em"
|
|
112
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
113
|
+
>
|
|
114
|
+
<path
|
|
115
|
+
d="M0 0h24v24H0V0z"
|
|
116
|
+
fill="none"
|
|
117
|
+
/>
|
|
118
|
+
<path
|
|
119
|
+
d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
120
|
+
/>
|
|
121
|
+
</svg>
|
|
122
|
+
</span>
|
|
123
|
+
</button>
|
|
124
|
+
</div>
|
|
125
|
+
<div
|
|
126
|
+
class="view"
|
|
127
|
+
>
|
|
128
|
+
<button
|
|
129
|
+
class="pressable disabled button large disabled wide"
|
|
130
|
+
disabled=""
|
|
131
|
+
>
|
|
132
|
+
common.action.apply
|
|
133
|
+
</button>
|
|
134
|
+
</div>
|
|
135
|
+
</div>
|
|
136
|
+
</div>
|
|
137
|
+
</DocumentFragment>
|
|
138
|
+
`;
|
|
139
|
+
|
|
140
|
+
exports[`component:<InputRich> renders 1`] = `
|
|
141
|
+
<DocumentFragment>
|
|
142
|
+
<div
|
|
143
|
+
class="view"
|
|
144
|
+
>
|
|
145
|
+
<div
|
|
146
|
+
class="view"
|
|
147
|
+
>
|
|
148
|
+
<div
|
|
149
|
+
class="view row"
|
|
150
|
+
>
|
|
151
|
+
<div
|
|
152
|
+
class="view"
|
|
153
|
+
>
|
|
154
|
+
<div
|
|
155
|
+
class="view"
|
|
156
|
+
>
|
|
157
|
+
<div
|
|
158
|
+
class="view"
|
|
159
|
+
/>
|
|
160
|
+
<div
|
|
161
|
+
class="view"
|
|
162
|
+
/>
|
|
163
|
+
</div>
|
|
164
|
+
</div>
|
|
165
|
+
<h3
|
|
166
|
+
class="text bold headline-3 wide"
|
|
167
|
+
/>
|
|
168
|
+
<button
|
|
169
|
+
class="pressable button squared transparent"
|
|
170
|
+
>
|
|
171
|
+
<span
|
|
172
|
+
class="icon headline-3"
|
|
173
|
+
>
|
|
174
|
+
<svg
|
|
175
|
+
fill="currentColor"
|
|
176
|
+
height="1em"
|
|
177
|
+
stroke="currentColor"
|
|
178
|
+
stroke-width="0"
|
|
179
|
+
viewBox="0 0 24 24"
|
|
180
|
+
width="1em"
|
|
181
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
182
|
+
>
|
|
183
|
+
<path
|
|
184
|
+
d="M0 0h24v24H0V0z"
|
|
185
|
+
fill="none"
|
|
186
|
+
/>
|
|
187
|
+
<path
|
|
188
|
+
d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
189
|
+
/>
|
|
190
|
+
</svg>
|
|
191
|
+
</span>
|
|
192
|
+
</button>
|
|
193
|
+
</div>
|
|
194
|
+
<div
|
|
195
|
+
class="view"
|
|
196
|
+
>
|
|
197
|
+
<button
|
|
198
|
+
class="pressable button large wide"
|
|
199
|
+
>
|
|
200
|
+
common.action.apply
|
|
201
|
+
</button>
|
|
202
|
+
</div>
|
|
203
|
+
</div>
|
|
204
|
+
</div>
|
|
205
|
+
</DocumentFragment>
|
|
206
|
+
`;
|
|
207
|
+
|
|
208
|
+
exports[`component:<InputRich> testId 1`] = `
|
|
209
|
+
<DocumentFragment>
|
|
210
|
+
<div
|
|
211
|
+
class="view"
|
|
212
|
+
data-testid="mirai"
|
|
213
|
+
>
|
|
214
|
+
<div
|
|
215
|
+
class="view"
|
|
216
|
+
>
|
|
217
|
+
<div
|
|
218
|
+
class="view row"
|
|
219
|
+
>
|
|
220
|
+
<div
|
|
221
|
+
class="view"
|
|
222
|
+
>
|
|
223
|
+
<div
|
|
224
|
+
class="view"
|
|
225
|
+
>
|
|
226
|
+
<div
|
|
227
|
+
class="view"
|
|
228
|
+
/>
|
|
229
|
+
<div
|
|
230
|
+
class="view"
|
|
231
|
+
/>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
<h3
|
|
235
|
+
class="text bold headline-3 wide"
|
|
236
|
+
/>
|
|
237
|
+
<button
|
|
238
|
+
class="pressable button squared transparent"
|
|
239
|
+
>
|
|
240
|
+
<span
|
|
241
|
+
class="icon headline-3"
|
|
242
|
+
>
|
|
243
|
+
<svg
|
|
244
|
+
fill="currentColor"
|
|
245
|
+
height="1em"
|
|
246
|
+
stroke="currentColor"
|
|
247
|
+
stroke-width="0"
|
|
248
|
+
viewBox="0 0 24 24"
|
|
249
|
+
width="1em"
|
|
250
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
251
|
+
>
|
|
252
|
+
<path
|
|
253
|
+
d="M0 0h24v24H0V0z"
|
|
254
|
+
fill="none"
|
|
255
|
+
/>
|
|
256
|
+
<path
|
|
257
|
+
d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"
|
|
258
|
+
/>
|
|
259
|
+
</svg>
|
|
260
|
+
</span>
|
|
261
|
+
</button>
|
|
262
|
+
</div>
|
|
263
|
+
<div
|
|
264
|
+
class="view"
|
|
265
|
+
>
|
|
266
|
+
<button
|
|
267
|
+
class="pressable button large wide"
|
|
268
|
+
>
|
|
269
|
+
common.action.apply
|
|
270
|
+
</button>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
</DocumentFragment>
|
|
275
|
+
`;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getVerboseList = void 0;
|
|
7
|
+
const getVerboseList = function (id) {
|
|
8
|
+
let {
|
|
9
|
+
options = []
|
|
10
|
+
} = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
11
|
+
const {
|
|
12
|
+
label
|
|
13
|
+
} = options.find(function () {
|
|
14
|
+
let item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
15
|
+
return item.id === id;
|
|
16
|
+
}) || {};
|
|
17
|
+
return label || id;
|
|
18
|
+
};
|
|
19
|
+
exports.getVerboseList = getVerboseList;
|
|
20
|
+
//# sourceMappingURL=getVerboseList.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVerboseList.js","names":["getVerboseList","id","options","arguments","length","undefined","label","find","item","exports"],"sources":["../../../../../../src/components/Chat/components/InputRich/helpers/getVerboseList.js"],"sourcesContent":["export const getVerboseList = (id, { options = [] } = {}) => {\n const { label } = options.find((item = {}) => item.id === id) || {};\n\n return label || id;\n};\n"],"mappings":";;;;;;AAAO,MAAMA,cAAc,GAAG,SAAAA,CAACC,EAAE,EAA4B;EAAA,IAA1B;IAAEC,OAAO,GAAG;EAAG,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EACtD,MAAM;IAAEG;EAAM,CAAC,GAAGJ,OAAO,CAACK,IAAI,CAAC;IAAA,IAACC,IAAI,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAAA,OAAKK,IAAI,CAACP,EAAE,KAAKA,EAAE;EAAA,EAAC,IAAI,CAAC,CAAC;EAEnE,OAAOK,KAAK,IAAIL,EAAE;AACpB,CAAC;AAACQ,OAAA,CAAAT,cAAA,GAAAA,cAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.getVerboseOccupation = void 0;
|
|
7
|
+
var _locale = require("@mirai/locale");
|
|
8
|
+
var _helpers = require("../../../../helpers");
|
|
9
|
+
const getVerboseOccupation = function () {
|
|
10
|
+
let {
|
|
11
|
+
store: {
|
|
12
|
+
config: {
|
|
13
|
+
hotels: dataSource,
|
|
14
|
+
lodgingDenomination: individual
|
|
15
|
+
} = {}
|
|
16
|
+
} = {},
|
|
17
|
+
translate = _locale.translate,
|
|
18
|
+
value
|
|
19
|
+
} = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
20
|
+
return (0, _helpers.getOccupationSummary)(value, translate, (0, _helpers.getAccommodationType)({
|
|
21
|
+
dataSource,
|
|
22
|
+
hotels: [],
|
|
23
|
+
individual
|
|
24
|
+
})).trim();
|
|
25
|
+
};
|
|
26
|
+
exports.getVerboseOccupation = getVerboseOccupation;
|
|
27
|
+
//# sourceMappingURL=getVerboseOccupation.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getVerboseOccupation.js","names":["_locale","require","_helpers","getVerboseOccupation","store","config","hotels","dataSource","lodgingDenomination","individual","translate","translateBase","value","arguments","length","undefined","getOccupationSummary","getAccommodationType","trim","exports"],"sources":["../../../../../../src/components/Chat/components/InputRich/helpers/getVerboseOccupation.js"],"sourcesContent":["import { translate as translateBase } from '@mirai/locale';\n\nimport { getAccommodationType, getOccupationSummary } from '../../../../helpers';\n\nexport const getVerboseOccupation = ({\n store: { config: { hotels: dataSource, lodgingDenomination: individual } = {} } = {},\n translate = translateBase,\n value,\n} = {}) => getOccupationSummary(value, translate, getAccommodationType({ dataSource, hotels: [], individual })).trim();\n"],"mappings":";;;;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAEO,MAAME,oBAAoB,GAAG,SAAAA,CAAA;EAAA,IAAC;IACnCC,KAAK,EAAE;MAAEC,MAAM,EAAE;QAAEC,MAAM,EAAEC,UAAU;QAAEC,mBAAmB,EAAEC;MAAW,CAAC,GAAG,CAAC;IAAE,CAAC,GAAG,CAAC,CAAC;IACpFC,SAAS,GAAGC,iBAAa;IACzBC;EACF,CAAC,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;EAAA,OAAK,IAAAG,6BAAoB,EAACJ,KAAK,EAAEF,SAAS,EAAE,IAAAO,6BAAoB,EAAC;IAAEV,UAAU;IAAED,MAAM,EAAE,EAAE;IAAEG;EAAW,CAAC,CAAC,CAAC,CAACS,IAAI,CAAC,CAAC;AAAA;AAACC,OAAA,CAAAhB,oBAAA,GAAAA,oBAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _getVerboseOccupation = require("./getVerboseOccupation");
|
|
7
|
+
Object.keys(_getVerboseOccupation).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _getVerboseOccupation[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _getVerboseOccupation[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
var _getVerboseList = require("./getVerboseList");
|
|
18
|
+
Object.keys(_getVerboseList).forEach(function (key) {
|
|
19
|
+
if (key === "default" || key === "__esModule") return;
|
|
20
|
+
if (key in exports && exports[key] === _getVerboseList[key]) return;
|
|
21
|
+
Object.defineProperty(exports, key, {
|
|
22
|
+
enumerable: true,
|
|
23
|
+
get: function () {
|
|
24
|
+
return _getVerboseList[key];
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
});
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_getVerboseOccupation","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getVerboseList"],"sources":["../../../../../../src/components/Chat/components/InputRich/helpers/index.js"],"sourcesContent":["export * from './getVerboseOccupation';\nexport * from './getVerboseList';\n"],"mappings":";;;;;AAAA,IAAAA,qBAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,qBAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,qBAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,qBAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,eAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,eAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,eAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,eAAA,CAAAL,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
var _InputRich = require("./InputRich");
|
|
7
|
+
Object.keys(_InputRich).forEach(function (key) {
|
|
8
|
+
if (key === "default" || key === "__esModule") return;
|
|
9
|
+
if (key in exports && exports[key] === _InputRich[key]) return;
|
|
10
|
+
Object.defineProperty(exports, key, {
|
|
11
|
+
enumerable: true,
|
|
12
|
+
get: function () {
|
|
13
|
+
return _InputRich[key];
|
|
14
|
+
}
|
|
15
|
+
});
|
|
16
|
+
});
|
|
17
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","names":["_InputRich","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../../src/components/Chat/components/InputRich/index.js"],"sourcesContent":["export * from './InputRich';\n"],"mappings":";;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,UAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,UAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,UAAA,CAAAK,GAAA;IAAA;EAAA;AAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.INTENT_UNKNOWN = exports.INTENT = void 0;
|
|
7
|
+
var _intents = require("./intents");
|
|
8
|
+
const INTENT = exports.INTENT = {
|
|
9
|
+
INTENT_BOOK: undefined,
|
|
10
|
+
INTENT_BOOKING_CANCEL: undefined,
|
|
11
|
+
INTENT_BOOKING_QUERY: _intents.BookingQuery,
|
|
12
|
+
INTENT_OFFERS: _intents.Offers,
|
|
13
|
+
INTENT_HOTEL_INFO: _intents.HotelInfo
|
|
14
|
+
// INTENT_GREETINGS: undefined,
|
|
15
|
+
// INTENT_FAREWELLS: undefined,
|
|
16
|
+
};
|
|
17
|
+
const INTENT_UNKNOWN = exports.INTENT_UNKNOWN = _intents.Unknown;
|
|
18
|
+
//# sourceMappingURL=Message.constants.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.constants.js","names":["_intents","require","INTENT","exports","INTENT_BOOK","undefined","INTENT_BOOKING_CANCEL","INTENT_BOOKING_QUERY","BookingQuery","INTENT_OFFERS","Offers","INTENT_HOTEL_INFO","HotelInfo","INTENT_UNKNOWN","Unknown"],"sources":["../../../../../src/components/Chat/components/Message/Message.constants.js"],"sourcesContent":["import { BookingQuery, HotelInfo, Offers, Unknown } from './intents';\n\nconst INTENT = {\n INTENT_BOOK: undefined,\n INTENT_BOOKING_CANCEL: undefined,\n INTENT_BOOKING_QUERY: BookingQuery,\n INTENT_OFFERS: Offers,\n INTENT_HOTEL_INFO: HotelInfo,\n // INTENT_GREETINGS: undefined,\n // INTENT_FAREWELLS: undefined,\n};\n\nconst INTENT_UNKNOWN = Unknown;\n\nexport { INTENT, INTENT_UNKNOWN };\n"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAEA,MAAMC,MAAM,GAAAC,OAAA,CAAAD,MAAA,GAAG;EACbE,WAAW,EAAEC,SAAS;EACtBC,qBAAqB,EAAED,SAAS;EAChCE,oBAAoB,EAAEC,qBAAY;EAClCC,aAAa,EAAEC,eAAM;EACrBC,iBAAiB,EAAEC;EACnB;EACA;AACF,CAAC;AAED,MAAMC,cAAc,GAAAV,OAAA,CAAAU,cAAA,GAAGC,gBAAO"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.Message = void 0;
|
|
7
|
+
var _dataSources = require("@mirai/data-sources");
|
|
8
|
+
var _ui = require("@mirai/ui");
|
|
9
|
+
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
10
|
+
var _react = _interopRequireDefault(require("react"));
|
|
11
|
+
var _components = require("./components");
|
|
12
|
+
var _helpers = require("./helpers");
|
|
13
|
+
var _Message = require("./Message.constants");
|
|
14
|
+
var style = _interopRequireWildcard(require("./Message.module.css"));
|
|
15
|
+
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); }
|
|
16
|
+
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; }
|
|
17
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
18
|
+
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); }
|
|
19
|
+
const Message = _ref => {
|
|
20
|
+
let {
|
|
21
|
+
auto,
|
|
22
|
+
busy = false,
|
|
23
|
+
intent,
|
|
24
|
+
response = {},
|
|
25
|
+
text,
|
|
26
|
+
timestamp,
|
|
27
|
+
...others
|
|
28
|
+
} = _ref;
|
|
29
|
+
const {
|
|
30
|
+
value: {
|
|
31
|
+
urlParams: {
|
|
32
|
+
lisa
|
|
33
|
+
} = {}
|
|
34
|
+
}
|
|
35
|
+
} = (0, _dataSources.useStore)();
|
|
36
|
+
const {
|
|
37
|
+
actions = [],
|
|
38
|
+
value
|
|
39
|
+
} = response;
|
|
40
|
+
const {
|
|
41
|
+
disabled,
|
|
42
|
+
testId,
|
|
43
|
+
onAction
|
|
44
|
+
} = others;
|
|
45
|
+
return /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
46
|
+
testId: testId,
|
|
47
|
+
wide: true
|
|
48
|
+
}, timestamp && /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
49
|
+
lighten: true,
|
|
50
|
+
small: true,
|
|
51
|
+
className: style.timestamp
|
|
52
|
+
}, (0, _helpers.getTime)(timestamp)), /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
53
|
+
row: true,
|
|
54
|
+
wide: true,
|
|
55
|
+
className: (0, _ui.styles)(style.message, auto && style.auto)
|
|
56
|
+
}, /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
57
|
+
className: (0, _ui.styles)(style.content, auto && style.auto, busy && style.busy)
|
|
58
|
+
}, !busy && auto && intent && lisa === 'environment' && /*#__PURE__*/_react.default.createElement(_components.Environment, _extends({
|
|
59
|
+
intent
|
|
60
|
+
}, others, response)), busy ? /*#__PURE__*/_react.default.createElement(_ui.View, {
|
|
61
|
+
className: style.spinner
|
|
62
|
+
}) : text ? /*#__PURE__*/_react.default.createElement(_ui.Text, {
|
|
63
|
+
action: true,
|
|
64
|
+
className: style.text
|
|
65
|
+
}, text) : ( /*#__PURE__*/_react.default.createElement(_Message.INTENT[intent] || _Message.INTENT_UNKNOWN, {
|
|
66
|
+
intent,
|
|
67
|
+
response,
|
|
68
|
+
...others
|
|
69
|
+
})), actions.map((_ref2, index) => {
|
|
70
|
+
let {
|
|
71
|
+
intent,
|
|
72
|
+
text,
|
|
73
|
+
url
|
|
74
|
+
} = _ref2;
|
|
75
|
+
return /*#__PURE__*/_react.default.createElement(_components.Card, {
|
|
76
|
+
key: index,
|
|
77
|
+
disabled: intent && disabled,
|
|
78
|
+
href: url,
|
|
79
|
+
icon: (0, _helpers.getActionIcon)(url),
|
|
80
|
+
text: text,
|
|
81
|
+
onPress: intent ? () => onAction({
|
|
82
|
+
intent,
|
|
83
|
+
context: value
|
|
84
|
+
}) : undefined
|
|
85
|
+
});
|
|
86
|
+
}))));
|
|
87
|
+
};
|
|
88
|
+
exports.Message = Message;
|
|
89
|
+
Message.propTypes = {
|
|
90
|
+
auto: _propTypes.default.bool,
|
|
91
|
+
busy: _propTypes.default.bool,
|
|
92
|
+
disabled: _propTypes.default.bool,
|
|
93
|
+
intent: _propTypes.default.string,
|
|
94
|
+
response: _propTypes.default.shape({
|
|
95
|
+
actions: _propTypes.default.arrayOf(_propTypes.default.shape({})),
|
|
96
|
+
requirements: _propTypes.default.shape({}),
|
|
97
|
+
text: _propTypes.default.string,
|
|
98
|
+
value: _propTypes.default.oneOf([_propTypes.default.array, _propTypes.default.shape({})])
|
|
99
|
+
}),
|
|
100
|
+
text: _propTypes.default.string,
|
|
101
|
+
timestamp: _propTypes.default.number,
|
|
102
|
+
onAction: _propTypes.default.func
|
|
103
|
+
};
|
|
104
|
+
//# sourceMappingURL=Message.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Message.js","names":["_dataSources","require","_ui","_propTypes","_interopRequireDefault","_react","_components","_helpers","_Message","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","Message","_ref","auto","busy","intent","response","text","timestamp","others","value","urlParams","lisa","useStore","actions","disabled","testId","onAction","createElement","View","wide","Text","lighten","small","className","getTime","row","styles","message","content","Environment","spinner","action","React","INTENT","INTENT_UNKNOWN","map","_ref2","index","url","Card","href","icon","getActionIcon","onPress","context","undefined","exports","propTypes","PropTypes","bool","string","shape","arrayOf","requirements","oneOf","array","number","func"],"sources":["../../../../../src/components/Chat/components/Message/Message.jsx"],"sourcesContent":["import { useStore } from '@mirai/data-sources';\nimport { styles, Text, View } from '@mirai/ui';\nimport PropTypes from 'prop-types';\nimport React from 'react';\n\nimport { Card, Environment } from './components';\nimport { getActionIcon, getTime } from './helpers';\nimport { INTENT, INTENT_UNKNOWN } from './Message.constants';\nimport * as style from './Message.module.css';\n\nconst Message = ({ auto, busy = false, intent, response = {}, text, timestamp, ...others }) => {\n const {\n value: { urlParams: { lisa } = {} },\n } = useStore();\n\n const { actions = [], value } = response;\n const { disabled, testId, onAction } = others;\n\n return (\n <View testId={testId} wide>\n {timestamp && (\n <Text lighten small className={style.timestamp}>\n {getTime(timestamp)}\n </Text>\n )}\n <View row wide className={styles(style.message, auto && style.auto)}>\n <View className={styles(style.content, auto && style.auto, busy && style.busy)}>\n {!busy && auto && intent && lisa === 'environment' && <Environment {...{ intent, ...others, ...response }} />}\n\n {busy ? (\n <View className={style.spinner} />\n ) : text ? (\n <Text action className={style.text}>\n {text}\n </Text>\n ) : (\n React.createElement(INTENT[intent] || INTENT_UNKNOWN, { intent, response, ...others })\n )}\n\n {actions.map(({ intent, text, url }, index) => (\n <Card\n key={index}\n disabled={intent && disabled}\n href={url}\n icon={getActionIcon(url)}\n text={text}\n onPress={intent ? () => onAction({ intent, context: value }) : undefined}\n />\n ))}\n </View>\n </View>\n </View>\n );\n};\n\nMessage.propTypes = {\n auto: PropTypes.bool,\n busy: PropTypes.bool,\n disabled: PropTypes.bool,\n intent: PropTypes.string,\n response: PropTypes.shape({\n actions: PropTypes.arrayOf(PropTypes.shape({})),\n requirements: PropTypes.shape({}),\n text: PropTypes.string,\n value: PropTypes.oneOf([PropTypes.array, PropTypes.shape({})]),\n }),\n text: PropTypes.string,\n timestamp: PropTypes.number,\n onAction: PropTypes.func,\n};\n\nexport { Message };\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,GAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,MAAA,GAAAD,sBAAA,CAAAH,OAAA;AAEA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,KAAA,GAAAC,uBAAA,CAAAT,OAAA;AAA8C,SAAAU,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAF,wBAAAE,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAA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AE4C,kBAAS,CAACE,MAAM;EACxB7C,QAAQ,EAAE2C,kBAAS,CAACG,KAAK,CAAC;IACxBtC,OAAO,EAAEmC,kBAAS,CAACI,OAAO,CAACJ,kBAAS,CAACG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;IAC/CE,YAAY,EAAEL,kBAAS,CAACG,KAAK,CAAC,CAAC,CAAC,CAAC;IACjC7C,IAAI,EAAE0C,kBAAS,CAACE,MAAM;IACtBzC,KAAK,EAAEuC,kBAAS,CAACM,KAAK,CAAC,CAACN,kBAAS,CAACO,KAAK,EAAEP,kBAAS,CAACG,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;EAC/D,CAAC,CAAC;EACF7C,IAAI,EAAE0C,kBAAS,CAACE,MAAM;EACtB3C,SAAS,EAAEyC,kBAAS,CAACQ,MAAM;EAC3BxC,QAAQ,EAAEgC,kBAAS,CAACS;AACtB,CAAC"}
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
.message {
|
|
2
|
+
align-items: flex-end;
|
|
3
|
+
animation: mirai-message-visible 200ms cubic-bezier(0.1, 0.1, 0.25, 0.9); /* ! TODO: Why variables dont' work? */
|
|
4
|
+
padding: 0 var(--mirai-chat-space);
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
@keyframes mirai-message-visible {
|
|
8
|
+
from {
|
|
9
|
+
opacity: 0;
|
|
10
|
+
transform: translateY(var(--mirai-chat-space));
|
|
11
|
+
}
|
|
12
|
+
to {
|
|
13
|
+
opacity: 1;
|
|
14
|
+
transform: translateY(0);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.message.auto {
|
|
19
|
+
justify-content: left;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.message:not(.auto) {
|
|
23
|
+
justify-content: right;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
.timestamp {
|
|
27
|
+
align-self: center;
|
|
28
|
+
margin-bottom: calc(var(--mirai-chat-space) / 4);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.content {
|
|
32
|
+
border-radius: var(--mirai-chat-border-radius);
|
|
33
|
+
max-width: 85%;
|
|
34
|
+
overflow: hidden;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
.content.auto:not(.busy) {
|
|
38
|
+
background-color: var(--mirai-chat-message-background);
|
|
39
|
+
border: solid var(--mirai-chat-border-size) var(--mirai-chat-border-color);
|
|
40
|
+
border-bottom-left-radius: 0;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.content.busy {
|
|
44
|
+
background-color: transparent;
|
|
45
|
+
overflow: visible;
|
|
46
|
+
padding: var(--mirai-ui-space-XS) 0;
|
|
47
|
+
position: relative;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
.content:not(.auto):not(.busy) {
|
|
51
|
+
background-color: var(--mirai-chat-accent);
|
|
52
|
+
border-bottom-right-radius: 0;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
.content .text {
|
|
56
|
+
font-size: var(--mirai-chat-text-font-size);
|
|
57
|
+
font-weight: var(--mirai-chat-text-font-weight);
|
|
58
|
+
line-height: var(--mirai-chat-text-line-height);
|
|
59
|
+
padding: var(--mirai-chat-message-offset);
|
|
60
|
+
width: fit-content;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.content.auto .text {
|
|
64
|
+
color: var(--mirai-chat-text-color);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.content:not(.auto) .text {
|
|
68
|
+
color: var(--mirai-chat-text-accent-color);
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.content .map {
|
|
72
|
+
background-color: var(--mirai-chat-input-background);
|
|
73
|
+
border: none;
|
|
74
|
+
height: 180px;
|
|
75
|
+
margin: 0;
|
|
76
|
+
width: 100%;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.content .address {
|
|
80
|
+
padding: var(--mirai-chat-message-offset);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
.spinner {
|
|
84
|
+
animation: mirai-message-spinner 0.8s infinite linear alternate;
|
|
85
|
+
animation-delay: 0.4s;
|
|
86
|
+
color: var(--mirai-chat-text-color);
|
|
87
|
+
margin-left: calc(var(--mirai-chat-space) * 0.75);
|
|
88
|
+
position: absolute;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.spinner,
|
|
92
|
+
.spinner::before,
|
|
93
|
+
.spinner::after {
|
|
94
|
+
background-color: var(--mirai-chat-text-color);
|
|
95
|
+
border-radius: 50%;
|
|
96
|
+
color: var(--mirai-chat-text-color);
|
|
97
|
+
height: calc(var(--mirai-chat-space) / 2.5);
|
|
98
|
+
width: calc(var(--mirai-chat-space) / 2.5);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
.spinner::before,
|
|
102
|
+
.spinner::after {
|
|
103
|
+
animation: mirai-message-spinner 0.8s infinite alternate;
|
|
104
|
+
content: '';
|
|
105
|
+
display: inline-block;
|
|
106
|
+
position: absolute;
|
|
107
|
+
top: 0;
|
|
108
|
+
}
|
|
109
|
+
.spinner::before {
|
|
110
|
+
animation-delay: 0s;
|
|
111
|
+
left: calc(var(--mirai-chat-space) * -0.65);
|
|
112
|
+
}
|
|
113
|
+
.spinner::after {
|
|
114
|
+
animation-delay: 0.8s;
|
|
115
|
+
left: calc(var(--mirai-chat-space) * 0.65);
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
@keyframes mirai-message-spinner {
|
|
119
|
+
0% {
|
|
120
|
+
background-color: var(--mirai-chat-text-color);
|
|
121
|
+
}
|
|
122
|
+
50%,
|
|
123
|
+
100% {
|
|
124
|
+
background-color: var(--mirai-chat-text-color-light);
|
|
125
|
+
}
|
|
126
|
+
}
|