@mirai/core 0.3.355 → 0.3.357

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 (89) hide show
  1. package/build/components/BannerLoyalty/__tests__/__snapshots__/BannerLoyalty.test.js.snap +34 -34
  2. package/build/components/Booking/__tests__/__snapshots__/Booking.test.js.snap +260 -260
  3. package/build/components/Booking/components/Field/__tests__/__snapshots__/Field.test.js.snap +36 -36
  4. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Menu.test.js.snap +148 -148
  5. package/build/components/Booking/partials/__tests__/__snapshots__/Booking.Modal.test.js.snap +108 -108
  6. package/build/components/BookingQuery/__tests__/__snapshots__/BookingQuery.test.js.snap +302 -302
  7. package/build/components/Chat/components/Avatar/__tests__/__snapshots__/Avatar.test.jsx.snap +30 -30
  8. package/build/components/Chat/components/Input/__tests__/__snapshots__/Input.test.jsx.snap +24 -24
  9. package/build/components/Chat/components/InputRich/__tests__/__snapshots__/InputRich.test.jsx.snap +68 -68
  10. package/build/components/Chat/components/Message/__tests__/__snapshots__/Message.test.jsx.snap +74 -74
  11. package/build/components/Chat/components/Message/components/Environment.module.css +1 -1
  12. package/build/components/Checkout/__tests__/__snapshots__/Checkout.test.js.snap +376 -376
  13. package/build/components/Checkout/components/InputRadio/__tests__/__snapshots__/InputRadio.test.js.snap +112 -112
  14. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Confirmation.test.js.snap +588 -588
  15. package/build/components/Checkout/partials/__tests__/__snapshots__/Checkout.Form.test.js.snap +788 -764
  16. package/build/components/Deals/Deals.js +2 -1
  17. package/build/components/Deals/Deals.js.map +1 -1
  18. package/build/components/Deals/Deals.module.css +1 -1
  19. package/build/components/Deals/__tests__/__snapshots__/Deals.Calendar.test.js.snap +1893 -1893
  20. package/build/components/Deals/__tests__/__snapshots__/Deals.test.js.snap +2936 -2884
  21. package/build/components/Finder/Finder.compact.js +7 -4
  22. package/build/components/Finder/Finder.compact.js.map +1 -1
  23. package/build/components/Finder/Finder.module.css +3 -3
  24. package/build/components/Finder/__tests__/__snapshots__/Finder.test.js.snap +8430 -8428
  25. package/build/components/Finder/components/Calendar/__tests__/__snapshots__/Calendar.test.js.snap +5063 -4646
  26. package/build/components/Finder/components/Places/__tests__/__snapshots__/Places.test.js.snap +115 -115
  27. package/build/components/Header/Header.js +2 -1
  28. package/build/components/Header/Header.js.map +1 -1
  29. package/build/components/Header/Header.module.css +1 -1
  30. package/build/components/Profile/components/Bookings/__tests__/__snapshots__/Bookings.test.js.snap +6 -6
  31. package/build/components/Rates/Rates.Unavailability.js +2 -1
  32. package/build/components/Rates/Rates.Unavailability.js.map +1 -1
  33. package/build/components/Rates/Rates.module.css +2 -2
  34. package/build/components/Rates/components/CardHotel/CardHotel.js +2 -1
  35. package/build/components/Rates/components/CardHotel/CardHotel.js.map +1 -1
  36. package/build/components/Rates/components/CardHotel/CardHotel.module.css +1 -1
  37. package/build/components/Rates/components/Filters/Filters.js +1 -1
  38. package/build/components/Rates/components/Filters/Filters.js.map +1 -1
  39. package/build/components/Rates/components/Item/components/RateDetails/RateDetails.module.css +1 -1
  40. package/build/components/Rates/components/Item/components/Slider/Slider.js +8 -4
  41. package/build/components/Rates/components/Item/components/Slider/Slider.js.map +1 -1
  42. package/build/components/Rates/components/Item/components/Slider/Slider.module.css +2 -2
  43. package/build/components/Rates/components/Item/components/TooltipDates/TooltipDates.module.css +2 -2
  44. package/build/components/Rates/components/ModalExtras/ModalExtras.module.css +0 -4
  45. package/build/components/Session/__tests__/__snapshots__/Session.test.js.snap +320 -315
  46. package/build/components/Signup/Signup.js +4 -2
  47. package/build/components/Signup/Signup.js.map +1 -1
  48. package/build/components/Signup/Signup.module.css +1 -1
  49. package/build/components/Signup/__tests__/__snapshots__/Signup.test.js.snap +279 -279
  50. package/build/components/__shared__/BookingDates/__tests__/__snapshots__/BookingDates.test.js.snap +74 -74
  51. package/build/components/__shared__/BookingDetails/__tests__/__snapshots__/BookingDetails.test.js.snap +991 -991
  52. package/build/components/__shared__/BookingSummary/_tests__/__snapshots__/BookingSummary.test.js.snap +316 -316
  53. package/build/components/__shared__/BookingTable/__tests__/__snapshots__/BookingTable.Row.test.js.snap +200 -200
  54. package/build/components/__shared__/BookingTable/__tests__/__snapshots__/BookingTable.test.js.snap +320 -320
  55. package/build/components/__shared__/BookingTerms/__tests__/__snapshots__/BookingTerms.test.js.snap +144 -144
  56. package/build/components/__shared__/ButtonMore/__tests__/__snapshots__/ButtonMore.test.js.snap +12 -12
  57. package/build/components/__shared__/ButtonPayment/__tests__/__snapshots__/ButtonPayment.test.js.snap +32 -32
  58. package/build/components/__shared__/ButtonPayment/components/FormAddon/__tests__/__snapshots__/FormAddon.test.js.snap +12 -12
  59. package/build/components/__shared__/ButtonPayment/components/FormCheckout/__tests__/__snapshots__/FormCheckout.test.js.snap +129 -129
  60. package/build/components/__shared__/ButtonPayment/components/FormPaycomet/__tests__/__snapshots__/FormPaycomet.test.js.snap +45 -45
  61. package/build/components/__shared__/ButtonPayment/components/FormSipay/__tests__/__snapshots__/FormSipay.test.js.snap +30 -30
  62. package/build/components/__shared__/ButtonPayment/components/InputField/__tests__/__snapshots__/InputField.test.js.snap +51 -51
  63. package/build/components/__shared__/Countdown/__tests__/__snapshots__/Countdown.test.js.snap +8 -8
  64. package/build/components/__shared__/Field/__tests__/__snapshots__/Field.test.js.snap +219 -219
  65. package/build/components/__shared__/FieldOccupation/__tests__/__snapshots__/FieldOccupation.test.js.snap +513 -513
  66. package/build/components/__shared__/FieldPromocode/FieldPromocode.js +1 -0
  67. package/build/components/__shared__/FieldPromocode/FieldPromocode.js.map +1 -1
  68. package/build/components/__shared__/FieldPromocode/__tests__/__snapshots__/FieldPromocode.test.jsx.snap +59 -59
  69. package/build/components/__shared__/Footer/Footer.js +11 -10
  70. package/build/components/__shared__/Footer/Footer.js.map +1 -1
  71. package/build/components/__shared__/Footer/Footer.module.css +2 -2
  72. package/build/components/__shared__/Footer/__tests__/__snapshots__/Footer.test.js.snap +60 -60
  73. package/build/components/__shared__/Occupation/Occupation.Group.js +2 -1
  74. package/build/components/__shared__/Occupation/Occupation.Group.js.map +1 -1
  75. package/build/components/__shared__/Occupation/Occupation.module.css +3 -3
  76. package/build/components/__shared__/Occupation/__tests__/__snapshots__/Occupation.test.js.snap +732 -732
  77. package/build/components/__shared__/Payment/__tests__/__snapshots__/Payment.test.js.snap +319 -313
  78. package/build/components/__shared__/Payment/components/Aplazame/__tests__/__snapshots__/Aplazame.test.js.snap +7 -7
  79. package/build/components/__shared__/Payment/components/Card/__tests__/__snapshots__/Card.test.js.snap +231 -231
  80. package/build/components/__shared__/Payment/components/PCI/__tests__/__snapshots__/PCI.test.js.snap +140 -140
  81. package/build/components/__shared__/Payment/components/Tpv/__tests__/__snapshots__/Tpv.test.js.snap +27 -27
  82. package/build/components/__shared__/SelectEnvironment/SelectEnvironment.js +4 -2
  83. package/build/components/__shared__/SelectEnvironment/SelectEnvironment.js.map +1 -1
  84. package/build/components/__shared__/SelectEnvironment/__tests__/__snapshots__/SelectEnvironment.test.js.snap +53 -53
  85. package/build/components/__shared__/TextRequiredFields/__tests__/__snapshots__/TextRequiredFields.test.js.snap +6 -6
  86. package/build/components/helpers/__tests__/__snapshots__/parseHtml.test.js.snap +104 -104
  87. package/build/helpers/sanitizeComponent.js +8 -4
  88. package/build/helpers/sanitizeComponent.js.map +1 -1
  89. package/package.json +1 -1
@@ -20,141 +20,141 @@ exports[`modules: parseHtml with values & small 1`] = `
20
20
  >
21
21
   
22
22
  </a>
23
- <ui_text
23
+ <ui-text
24
24
  class="text small wide"
25
25
  >
26
26
  CONDICIONES GENERALES DE CONTRATACION
27
- </ui_text>
28
- <ui_text
27
+ </ui-text>
28
+ <ui-text
29
29
  class="text small wide"
30
30
  >
31
31
  Plataforma de resolución de litigiosEl Reglamento (UE) n.º 524/2013 del Parlamento Europeo y del Consejo, de 21 de mayo de 2013, establece como objetivo la consecución de un elevado nivel de protección del consumidor y el correcto funcionamiento del mercado interior, en particular de su dimensión digital, proporcionando una plataforma europea de resolución de litigios en línea que facilite la resolución extrajudicial de litigios entre consumidores y comerciantes en línea de forma independiente, imparcial, transparente, eficaz y equitativa.Para ello, este Sitio Web pone a disposición del Usuario, un enlace que permite un acceso a la plataforma de resolución de litigios en línea de la Unión Europea, para cualquier eventual controversia que pudiera originarse en materia de consumo: http://ec.europa.eu/consumers/odr/
32
- </ui_text>
32
+ </ui-text>
33
33
  </DocumentFragment>
34
34
  `;
35
35
 
36
36
  exports[`modules: parseHtml with values & small 2`] = `
37
37
  <DocumentFragment>
38
- <ui_text
38
+ <ui-text
39
39
  class="text small wide"
40
40
  >
41
41
  "Covid Passport Information"
42
- </ui_text>
43
- <ui_text
42
+ </ui-text>
43
+ <ui-text
44
44
  class="text small wide"
45
45
  >
46
46
  According to the resolution of 12/01/21 of the Ministry of Health and Public Health, the requirement to present a vaccination certificate, diagnostic test or COVID-19 recovery certificate, in the area of ​​the Valencian Community, is established for access to older people 12 years old, including this age, inside spaces with a capacity of more than 50 people
47
- </ui_text>
48
- <ui_text
47
+ </ui-text>
48
+ <ui-text
49
49
  class="text small wide"
50
50
  >
51
51
  * Likewise, it will be required in events and celebrations with a concentration of people and that are held in closed spaces with the attendance of more than 500 people.
52
- </ui_text>
53
- <ui_text
52
+ </ui-text>
53
+ <ui-text
54
54
  class="text small wide"
55
55
  >
56
56
  • Certificate of vaccination issued by a public health service
57
- </ui_text>
58
- <ui_text
57
+ </ui-text>
58
+ <ui-text
59
59
  class="text small wide"
60
60
  >
61
61
  • Negative diagnostic test in relation to COVID-19 carried out in the last 72 hours in the case of RT-PCR tests, and in the last 48 hours in the case of antigen tests, both issued or by a public service of health or by an authorized official laboratory (not worth self-test)
62
- </ui_text>
63
- <ui_text
62
+ </ui-text>
63
+ <ui-text
64
64
  class="text small wide"
65
65
  >
66
66
  • Certificate of recovery from COVID-19 in the last six months after a positive result obtained through a diagnostic test considered valid by the competent authority.
67
- </ui_text>
68
- <ui_text
67
+ </ui-text>
68
+ <ui-text
69
69
  class="text small wide"
70
70
  >
71
71
  "Information of interest"
72
- </ui_text>
73
- <ui_text
72
+ </ui-text>
73
+ <ui-text
74
74
  class="text small wide"
75
75
  >
76
76
  Breakfast buffet
77
- </ui_text>
78
- <ui_text
77
+ </ui-text>
78
+ <ui-text
79
79
  class="text small wide"
80
80
  >
81
81
  Half Board will be breakfast + dinner.
82
- </ui_text>
83
- <ui_text
82
+ </ui-text>
83
+ <ui-text
84
84
  class="text small wide"
85
85
  >
86
86
  The Food and Dinner Services menu served. There is a children's menu.
87
- </ui_text>
88
- <ui_text
87
+ </ui-text>
88
+ <ui-text
89
89
  class="text small wide"
90
90
  >
91
91
  Half Board and Full Board do not include drinks. Drinks for direct payment at the hotel.
92
- </ui_text>
93
- <ui_text
92
+ </ui-text>
93
+ <ui-text
94
94
  class="text small wide"
95
95
  >
96
96
  Check the lunch supplement on Saturdays, Sundays and holidays, direct payment at reception.
97
- </ui_text>
98
- <ui_text
97
+ </ui-text>
98
+ <ui-text
99
99
  class="text small wide"
100
100
  >
101
101
  The use of the mask is mandatory throughout the installation.
102
- </ui_text>
103
- <ui_text
102
+ </ui-text>
103
+ <ui-text
104
104
  class="text small wide"
105
105
  >
106
106
  Restaurant open until 23:00
107
- </ui_text>
108
- <ui_text
107
+ </ui-text>
108
+ <ui-text
109
109
  class="text small wide"
110
110
  >
111
111
  The restaurant services as well as other complementary hotel services may undergo changes. (Consult)
112
- </ui_text>
113
- <ui_text
112
+ </ui-text>
113
+ <ui-text
114
114
  class="text small wide"
115
115
  >
116
116
  * If your reservation is based on the Viatgem CV Voucher, the tourist voucher, in addition to the above conditions:
117
- </ui_text>
118
- <ui_text
117
+ </ui-text>
118
+ <ui-text
119
119
  class="text small wide"
120
120
  >
121
121
  100% of the 1st night expenses in case of cancellation after 24 hours on the day of arrival.
122
- </ui_text>
123
- <ui_text
122
+ </ui-text>
123
+ <ui-text
124
124
  class="text small wide"
125
125
  >
126
126
  100% of the 1st night expenses in case of no-show at the hotel.
127
- </ui_text>
128
- <ui_text
127
+ </ui-text>
128
+ <ui-text
129
129
  class="text small wide"
130
130
  >
131
131
  The extra services and cancellation expenses are not reimbursable, they will be invoiced to the client.
132
- </ui_text>
133
- <ui_text
132
+ </ui-text>
133
+ <ui-text
134
134
  class="text small wide"
135
135
  >
136
136
  "Special Valentine 2022"
137
- </ui_text>
138
- <ui_text
137
+ </ui-text>
138
+ <ui-text
139
139
  class="text small wide"
140
140
  >
141
141
  Mandatory use of a mask
142
- </ui_text>
143
- <ui_text
142
+ </ui-text>
143
+ <ui-text
144
144
  class="text small wide"
145
145
  >
146
146
  Discomóvil Service until 03:00hrs.
147
- </ui_text>
148
- <ui_text
147
+ </ui-text>
148
+ <ui-text
149
149
  class="text small wide"
150
150
  >
151
151
  Bar service after dinner with direct payment.
152
- </ui_text>
153
- <ui_text
152
+ </ui-text>
153
+ <ui-text
154
154
  class="text small wide"
155
155
  >
156
156
  The format and celebration of the event will be carried out under the COVID regulations and restrictions set by the health authorities at the time of the celebration.
157
- </ui_text>
157
+ </ui-text>
158
158
  </DocumentFragment>
159
159
  `;
160
160
 
@@ -178,140 +178,140 @@ exports[`modules: parseHtml with values 1`] = `
178
178
  >
179
179
   
180
180
  </a>
181
- <ui_text
181
+ <ui-text
182
182
  class="text paragraph wide"
183
183
  >
184
184
  CONDICIONES GENERALES DE CONTRATACION
185
- </ui_text>
186
- <ui_text
185
+ </ui-text>
186
+ <ui-text
187
187
  class="text paragraph wide"
188
188
  >
189
189
  Plataforma de resolución de litigiosEl Reglamento (UE) n.º 524/2013 del Parlamento Europeo y del Consejo, de 21 de mayo de 2013, establece como objetivo la consecución de un elevado nivel de protección del consumidor y el correcto funcionamiento del mercado interior, en particular de su dimensión digital, proporcionando una plataforma europea de resolución de litigios en línea que facilite la resolución extrajudicial de litigios entre consumidores y comerciantes en línea de forma independiente, imparcial, transparente, eficaz y equitativa.Para ello, este Sitio Web pone a disposición del Usuario, un enlace que permite un acceso a la plataforma de resolución de litigios en línea de la Unión Europea, para cualquier eventual controversia que pudiera originarse en materia de consumo: http://ec.europa.eu/consumers/odr/
190
- </ui_text>
190
+ </ui-text>
191
191
  </DocumentFragment>
192
192
  `;
193
193
 
194
194
  exports[`modules: parseHtml with values 2`] = `
195
195
  <DocumentFragment>
196
- <ui_text
196
+ <ui-text
197
197
  class="text paragraph wide"
198
198
  >
199
199
  "Covid Passport Information"
200
- </ui_text>
201
- <ui_text
200
+ </ui-text>
201
+ <ui-text
202
202
  class="text paragraph wide"
203
203
  >
204
204
  According to the resolution of 12/01/21 of the Ministry of Health and Public Health, the requirement to present a vaccination certificate, diagnostic test or COVID-19 recovery certificate, in the area of ​​the Valencian Community, is established for access to older people 12 years old, including this age, inside spaces with a capacity of more than 50 people
205
- </ui_text>
206
- <ui_text
205
+ </ui-text>
206
+ <ui-text
207
207
  class="text paragraph wide"
208
208
  >
209
209
  * Likewise, it will be required in events and celebrations with a concentration of people and that are held in closed spaces with the attendance of more than 500 people.
210
- </ui_text>
211
- <ui_text
210
+ </ui-text>
211
+ <ui-text
212
212
  class="text paragraph wide"
213
213
  >
214
214
  • Certificate of vaccination issued by a public health service
215
- </ui_text>
216
- <ui_text
215
+ </ui-text>
216
+ <ui-text
217
217
  class="text paragraph wide"
218
218
  >
219
219
  • Negative diagnostic test in relation to COVID-19 carried out in the last 72 hours in the case of RT-PCR tests, and in the last 48 hours in the case of antigen tests, both issued or by a public service of health or by an authorized official laboratory (not worth self-test)
220
- </ui_text>
221
- <ui_text
220
+ </ui-text>
221
+ <ui-text
222
222
  class="text paragraph wide"
223
223
  >
224
224
  • Certificate of recovery from COVID-19 in the last six months after a positive result obtained through a diagnostic test considered valid by the competent authority.
225
- </ui_text>
226
- <ui_text
225
+ </ui-text>
226
+ <ui-text
227
227
  class="text paragraph wide"
228
228
  >
229
229
  "Information of interest"
230
- </ui_text>
231
- <ui_text
230
+ </ui-text>
231
+ <ui-text
232
232
  class="text paragraph wide"
233
233
  >
234
234
  Breakfast buffet
235
- </ui_text>
236
- <ui_text
235
+ </ui-text>
236
+ <ui-text
237
237
  class="text paragraph wide"
238
238
  >
239
239
  Half Board will be breakfast + dinner.
240
- </ui_text>
241
- <ui_text
240
+ </ui-text>
241
+ <ui-text
242
242
  class="text paragraph wide"
243
243
  >
244
244
  The Food and Dinner Services menu served. There is a children's menu.
245
- </ui_text>
246
- <ui_text
245
+ </ui-text>
246
+ <ui-text
247
247
  class="text paragraph wide"
248
248
  >
249
249
  Half Board and Full Board do not include drinks. Drinks for direct payment at the hotel.
250
- </ui_text>
251
- <ui_text
250
+ </ui-text>
251
+ <ui-text
252
252
  class="text paragraph wide"
253
253
  >
254
254
  Check the lunch supplement on Saturdays, Sundays and holidays, direct payment at reception.
255
- </ui_text>
256
- <ui_text
255
+ </ui-text>
256
+ <ui-text
257
257
  class="text paragraph wide"
258
258
  >
259
259
  The use of the mask is mandatory throughout the installation.
260
- </ui_text>
261
- <ui_text
260
+ </ui-text>
261
+ <ui-text
262
262
  class="text paragraph wide"
263
263
  >
264
264
  Restaurant open until 23:00
265
- </ui_text>
266
- <ui_text
265
+ </ui-text>
266
+ <ui-text
267
267
  class="text paragraph wide"
268
268
  >
269
269
  The restaurant services as well as other complementary hotel services may undergo changes. (Consult)
270
- </ui_text>
271
- <ui_text
270
+ </ui-text>
271
+ <ui-text
272
272
  class="text paragraph wide"
273
273
  >
274
274
  * If your reservation is based on the Viatgem CV Voucher, the tourist voucher, in addition to the above conditions:
275
- </ui_text>
276
- <ui_text
275
+ </ui-text>
276
+ <ui-text
277
277
  class="text paragraph wide"
278
278
  >
279
279
  100% of the 1st night expenses in case of cancellation after 24 hours on the day of arrival.
280
- </ui_text>
281
- <ui_text
280
+ </ui-text>
281
+ <ui-text
282
282
  class="text paragraph wide"
283
283
  >
284
284
  100% of the 1st night expenses in case of no-show at the hotel.
285
- </ui_text>
286
- <ui_text
285
+ </ui-text>
286
+ <ui-text
287
287
  class="text paragraph wide"
288
288
  >
289
289
  The extra services and cancellation expenses are not reimbursable, they will be invoiced to the client.
290
- </ui_text>
291
- <ui_text
290
+ </ui-text>
291
+ <ui-text
292
292
  class="text paragraph wide"
293
293
  >
294
294
  "Special Valentine 2022"
295
- </ui_text>
296
- <ui_text
295
+ </ui-text>
296
+ <ui-text
297
297
  class="text paragraph wide"
298
298
  >
299
299
  Mandatory use of a mask
300
- </ui_text>
301
- <ui_text
300
+ </ui-text>
301
+ <ui-text
302
302
  class="text paragraph wide"
303
303
  >
304
304
  Discomóvil Service until 03:00hrs.
305
- </ui_text>
306
- <ui_text
305
+ </ui-text>
306
+ <ui-text
307
307
  class="text paragraph wide"
308
308
  >
309
309
  Bar service after dinner with direct payment.
310
- </ui_text>
311
- <ui_text
310
+ </ui-text>
311
+ <ui-text
312
312
  class="text paragraph wide"
313
313
  >
314
314
  The format and celebration of the event will be carried out under the COVID regulations and restrictions set by the health authorities at the time of the celebration.
315
- </ui_text>
315
+ </ui-text>
316
316
  </DocumentFragment>
317
317
  `;
@@ -9,11 +9,15 @@ const sanitizeComponent = el => {
9
9
  let ghost;
10
10
  Array.from(el.children).forEach(child => {
11
11
  const dataset = Object.keys(child.dataset);
12
- if (child.dataset['content']) content.push(child.cloneNode(true));else if (!ghost && child.dataset['ghost']) ghost = child.cloneNode(true);else if (!dataset.includes('role')) {
13
- if (child.parentNode === el) {
12
+ if (child.dataset['content']) content.push(child.cloneNode(true));else if (!ghost && child.dataset['ghost']) ghost = child.cloneNode(true);else if (!dataset.includes('role') && child.parentNode === el) {
13
+ try {
14
14
  el.removeChild(child);
15
- } else {
16
- console.warn('The parentNode does not exists for child:', child);
15
+ } catch (error) {
16
+ // eslint-disable-next-line no-console
17
+ console.warn("WARNING: parentNode can not remove child.", {
18
+ el,
19
+ child
20
+ });
17
21
  }
18
22
  }
19
23
  });
@@ -1 +1 @@
1
- {"version":3,"file":"sanitizeComponent.js","names":["sanitizeComponent","el","content","ghost","Array","from","children","forEach","child","dataset","Object","keys","push","cloneNode","includes","parentNode","removeChild","console","warn","length","dangerousChildren","exports"],"sources":["../../src/helpers/sanitizeComponent.js"],"sourcesContent":["export const sanitizeComponent = (el) => {\n const content = [];\n let ghost;\n\n Array.from(el.children).forEach((child) => {\n const dataset = Object.keys(child.dataset);\n\n if (child.dataset['content']) content.push(child.cloneNode(true));\n else if (!ghost && child.dataset['ghost']) ghost = child.cloneNode(true);\n else if (!dataset.includes('role')) {\n if (child.parentNode === el) {\n el.removeChild(child);\n } else {\n console.warn('The parentNode does not exists for child:', child);\n }\n }\n });\n\n return content.length > 0\n ? {\n dangerousChildren: Array.from(content),\n el,\n ghost,\n }\n : {};\n};\n"],"mappings":";;;;;;AAAO,MAAMA,iBAAiB,GAAIC,EAAE,IAAK;EACvC,MAAMC,OAAO,GAAG,EAAE;EAClB,IAAIC,KAAK;EAETC,KAAK,CAACC,IAAI,CAACJ,EAAE,CAACK,QAAQ,CAAC,CAACC,OAAO,CAAEC,KAAK,IAAK;IACzC,MAAMC,OAAO,GAAGC,MAAM,CAACC,IAAI,CAACH,KAAK,CAACC,OAAO,CAAC;IAE1C,IAAID,KAAK,CAACC,OAAO,CAAC,SAAS,CAAC,EAAEP,OAAO,CAACU,IAAI,CAACJ,KAAK,CAACK,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAC7D,IAAI,CAACV,KAAK,IAAIK,KAAK,CAACC,OAAO,CAAC,OAAO,CAAC,EAAEN,KAAK,GAAGK,KAAK,CAACK,SAAS,CAAC,IAAI,CAAC,CAAC,KACpE,IAAI,CAACJ,OAAO,CAACK,QAAQ,CAAC,MAAM,CAAC,EAAE;MAClC,IAAIN,KAAK,CAACO,UAAU,KAAKd,EAAE,EAAE;QAC3BA,EAAE,CAACe,WAAW,CAACR,KAAK,CAAC;MACvB,CAAC,MAAM;QACLS,OAAO,CAACC,IAAI,CAAC,2CAA2C,EAAEV,KAAK,CAAC;MAClE;IACF;EACF,CAAC,CAAC;EAEF,OAAON,OAAO,CAACiB,MAAM,GAAG,CAAC,GACrB;IACEC,iBAAiB,EAAEhB,KAAK,CAACC,IAAI,CAACH,OAAO,CAAC;IACtCD,EAAE;IACFE;EACF,CAAC,GACD,CAAC,CAAC;AACR,CAAC;AAACkB,OAAA,CAAArB,iBAAA,GAAAA,iBAAA"}
1
+ {"version":3,"file":"sanitizeComponent.js","names":["sanitizeComponent","el","content","ghost","Array","from","children","forEach","child","dataset","Object","keys","push","cloneNode","includes","parentNode","removeChild","error","console","warn","length","dangerousChildren","exports"],"sources":["../../src/helpers/sanitizeComponent.js"],"sourcesContent":["export const sanitizeComponent = (el) => {\n const content = [];\n let ghost;\n\n Array.from(el.children).forEach((child) => {\n const dataset = Object.keys(child.dataset);\n\n if (child.dataset['content']) content.push(child.cloneNode(true));\n else if (!ghost && child.dataset['ghost']) ghost = child.cloneNode(true);\n else if (!dataset.includes('role') && child.parentNode === el) {\n try {\n el.removeChild(child);\n } catch (error) {\n // eslint-disable-next-line no-console\n console.warn(`WARNING: parentNode can not remove child.`, { el, child });\n }\n }\n });\n\n return content.length > 0\n ? {\n dangerousChildren: Array.from(content),\n el,\n ghost,\n }\n : {};\n};\n"],"mappings":";;;;;;AAAO,MAAMA,iBAAiB,GAAIC,EAAE,IAAK;EACvC,MAAMC,OAAO,GAAG,EAAE;EAClB,IAAIC,KAAK;EAETC,KAAK,CAACC,IAAI,CAACJ,EAAE,CAACK,QAAQ,CAAC,CAACC,OAAO,CAAEC,KAAK,IAAK;IACzC,MAAMC,OAAO,GAAGC,MAAM,CAACC,IAAI,CAACH,KAAK,CAACC,OAAO,CAAC;IAE1C,IAAID,KAAK,CAACC,OAAO,CAAC,SAAS,CAAC,EAAEP,OAAO,CAACU,IAAI,CAACJ,KAAK,CAACK,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,KAC7D,IAAI,CAACV,KAAK,IAAIK,KAAK,CAACC,OAAO,CAAC,OAAO,CAAC,EAAEN,KAAK,GAAGK,KAAK,CAACK,SAAS,CAAC,IAAI,CAAC,CAAC,KACpE,IAAI,CAACJ,OAAO,CAACK,QAAQ,CAAC,MAAM,CAAC,IAAIN,KAAK,CAACO,UAAU,KAAKd,EAAE,EAAE;MAC7D,IAAI;QACFA,EAAE,CAACe,WAAW,CAACR,KAAK,CAAC;MACvB,CAAC,CAAC,OAAOS,KAAK,EAAE;QACd;QACAC,OAAO,CAACC,IAAI,8CAA8C;UAAElB,EAAE;UAAEO;QAAM,CAAC,CAAC;MAC1E;IACF;EACF,CAAC,CAAC;EAEF,OAAON,OAAO,CAACkB,MAAM,GAAG,CAAC,GACrB;IACEC,iBAAiB,EAAEjB,KAAK,CAACC,IAAI,CAACH,OAAO,CAAC;IACtCD,EAAE;IACFE;EACF,CAAC,GACD,CAAC,CAAC;AACR,CAAC;AAACmB,OAAA,CAAAtB,iBAAA,GAAAA,iBAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mirai/core",
3
- "version": "0.3.355",
3
+ "version": "0.3.357",
4
4
  "source": "src/index.js",
5
5
  "repository": "https://gitlab.com/miraicorp/dev/frontend/core",
6
6
  "author": "JΛVI <hello@soyjavi.com>",