@mirai/ui 2.1.67 → 2.1.69

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 (35) hide show
  1. package/build/components/Calendar/__tests__/__snapshots__/Calendar.test.jsx.snap +2802 -2802
  2. package/build/components/Form/__tests__/__snapshots__/Form.test.jsx.snap +1 -1
  3. package/build/components/InputList/InputList.Group.js +44 -0
  4. package/build/components/InputList/InputList.Group.js.map +1 -0
  5. package/build/components/InputList/InputList.Option.js +3 -1
  6. package/build/components/InputList/InputList.Option.js.map +1 -1
  7. package/build/components/InputList/InputList.js +81 -35
  8. package/build/components/InputList/InputList.js.map +1 -1
  9. package/build/components/InputList/InputList.module.css +4 -0
  10. package/build/components/InputList/InputList.stories.js +68 -0
  11. package/build/components/InputList/InputList.stories.js.map +1 -1
  12. package/build/components/InputList/__tests__/__snapshots__/InputList.test.js.snap +364 -5
  13. package/build/components/InputList/helpers/flattenOptions.js +37 -0
  14. package/build/components/InputList/helpers/flattenOptions.js.map +1 -0
  15. package/build/components/InputList/helpers/getSelectableOptions.js +41 -0
  16. package/build/components/InputList/helpers/getSelectableOptions.js.map +1 -0
  17. package/build/components/InputList/helpers/index.js +22 -0
  18. package/build/components/InputList/helpers/index.js.map +1 -1
  19. package/build/components/InputNumber/__tests__/__snapshots__/InputNumber.test.js.snap +14 -14
  20. package/build/components/InputOption/__tests__/__snapshots__/InputOption.test.js.snap +5 -5
  21. package/build/components/InputPhone/__tests__/__snapshots__/InputPhone.test.js.snap +8 -8
  22. package/build/components/InputSelect/__tests__/__snapshots__/InputSelect.test.js.snap +5 -5
  23. package/build/components/InputText/__tests__/__snapshots__/InputText.test.js.snap +5 -5
  24. package/build/components/Menu/__tests__/__snapshots__/Menu.test.jsx.snap +10 -10
  25. package/build/components/Modal/__tests__/__snapshots__/Modal.test.js.snap +1 -1
  26. package/build/components/Notification/__tests__/__snapshots__/Notification.test.js.snap +40 -40
  27. package/build/components/Slider/__tests__/__snapshots__/Slider.test.js.snap +7 -7
  28. package/build/components/Table/__tests__/__snapshots__/Table.ColumnFilter.test.js.snap +6 -6
  29. package/build/components/Table/__tests__/__snapshots__/Table.test.js.snap +10 -10
  30. package/build/components/Tooltip/__tests__/__snapshots__/Tooltip.test.jsx.snap +1 -1
  31. package/build/primitives/Layer/__tests__/__snapshots__/Layer.test.js.snap +5 -5
  32. package/build/primitives/Text/Text.js +1 -1
  33. package/build/primitives/Text/Text.js.map +1 -1
  34. package/build/primitives/Text/__tests__/__snapshots__/Text.test.js.snap +30 -30
  35. package/package.json +1 -1
@@ -1,5 +1,364 @@
1
1
  // Jest Snapshot v1, https://goo.gl/fbAQLP
2
2
 
3
+ exports[`component:<InputList> groups:multiple selection with groups and items 1`] = `
4
+ <DocumentFragment>
5
+ <ui-input-list
6
+ class="view"
7
+ >
8
+ <ui-menu
9
+ class="container"
10
+ data-testid="undefined-menu"
11
+ >
12
+ <ui-pressable
13
+ class="pressable"
14
+ data-testid="undefined-pressable"
15
+ style="width: 0px;"
16
+ tabindex="0"
17
+ >
18
+ <ui-input-select
19
+ class="view inputContainer"
20
+ >
21
+ <ui-view
22
+ class="view row inputBorder"
23
+ >
24
+ <ui-view
25
+ class="view wide content"
26
+ >
27
+ <select
28
+ class="select input"
29
+ name="name"
30
+ >
31
+ <option
32
+ value="3 selected"
33
+ >
34
+ 3 selected
35
+ </option>
36
+ </select>
37
+ </ui-view>
38
+ <ui-icon
39
+ class="icon headline-3 icon expand"
40
+ >
41
+ <svg
42
+ fill="currentColor"
43
+ height="1em"
44
+ stroke="currentColor"
45
+ stroke-width="0"
46
+ viewBox="0 0 24 24"
47
+ width="1em"
48
+ xmlns="http://www.w3.org/2000/svg"
49
+ >
50
+ <path
51
+ d="M24 24H0V0h24v24z"
52
+ fill="none"
53
+ opacity=".87"
54
+ />
55
+ <path
56
+ d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
57
+ />
58
+ </svg>
59
+ </ui-icon>
60
+ </ui-view>
61
+ </ui-input-select>
62
+ </ui-pressable>
63
+ </ui-menu>
64
+ </ui-input-list>
65
+ </DocumentFragment>
66
+ `;
67
+
68
+ exports[`component:<InputList> groups:renders with groups 1`] = `
69
+ <DocumentFragment>
70
+ <ui-input-list
71
+ class="view"
72
+ >
73
+ <ui-menu
74
+ class="container"
75
+ data-testid="undefined-menu"
76
+ >
77
+ <ui-pressable
78
+ class="pressable"
79
+ data-testid="undefined-pressable"
80
+ style="width: 0px;"
81
+ tabindex="0"
82
+ >
83
+ <ui-input-select
84
+ class="view inputContainer"
85
+ >
86
+ <ui-view
87
+ class="view row inputBorder"
88
+ >
89
+ <ui-view
90
+ class="view wide content"
91
+ >
92
+ <select
93
+ class="select empty input"
94
+ name="name"
95
+ >
96
+ <option />
97
+ </select>
98
+ </ui-view>
99
+ <ui-icon
100
+ class="icon headline-3 icon expand"
101
+ >
102
+ <svg
103
+ fill="currentColor"
104
+ height="1em"
105
+ stroke="currentColor"
106
+ stroke-width="0"
107
+ viewBox="0 0 24 24"
108
+ width="1em"
109
+ xmlns="http://www.w3.org/2000/svg"
110
+ >
111
+ <path
112
+ d="M24 24H0V0h24v24z"
113
+ fill="none"
114
+ opacity=".87"
115
+ />
116
+ <path
117
+ d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
118
+ />
119
+ </svg>
120
+ </ui-icon>
121
+ </ui-view>
122
+ </ui-input-select>
123
+ </ui-pressable>
124
+ </ui-menu>
125
+ </ui-input-list>
126
+ </DocumentFragment>
127
+ `;
128
+
129
+ exports[`component:<InputList> groups:search within groups 1`] = `
130
+ <DocumentFragment>
131
+ <ui-input-list
132
+ class="view"
133
+ >
134
+ <ui-menu
135
+ class="container"
136
+ data-testid="undefined-menu"
137
+ >
138
+ <ui-pressable
139
+ class="pressable"
140
+ data-testid="undefined-pressable"
141
+ style="width: 0px;"
142
+ tabindex="0"
143
+ >
144
+ <ui-input-select
145
+ class="view inputContainer"
146
+ >
147
+ <ui-view
148
+ class="view row inputBorder"
149
+ >
150
+ <ui-view
151
+ class="view wide content"
152
+ >
153
+ <select
154
+ class="select empty input"
155
+ name="name"
156
+ >
157
+ <option />
158
+ </select>
159
+ </ui-view>
160
+ <ui-icon
161
+ class="icon headline-3 icon expand"
162
+ >
163
+ <svg
164
+ fill="currentColor"
165
+ height="1em"
166
+ stroke="currentColor"
167
+ stroke-width="0"
168
+ viewBox="0 0 24 24"
169
+ width="1em"
170
+ xmlns="http://www.w3.org/2000/svg"
171
+ >
172
+ <path
173
+ d="M24 24H0V0h24v24z"
174
+ fill="none"
175
+ opacity=".87"
176
+ />
177
+ <path
178
+ d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
179
+ />
180
+ </svg>
181
+ </ui-icon>
182
+ </ui-view>
183
+ </ui-input-select>
184
+ </ui-pressable>
185
+ </ui-menu>
186
+ </ui-input-list>
187
+ </DocumentFragment>
188
+ `;
189
+
190
+ exports[`component:<InputList> groups:selects group option 1`] = `
191
+ <DocumentFragment>
192
+ <ui-input-list
193
+ class="view"
194
+ >
195
+ <ui-menu
196
+ class="container"
197
+ data-testid="undefined-menu"
198
+ >
199
+ <ui-pressable
200
+ class="pressable"
201
+ data-testid="undefined-pressable"
202
+ style="width: 0px;"
203
+ tabindex="0"
204
+ >
205
+ <ui-input-select
206
+ class="view inputContainer"
207
+ >
208
+ <ui-view
209
+ class="view row inputBorder"
210
+ >
211
+ <ui-icon
212
+ class="icon headline-3 icon left"
213
+ >
214
+ <svg
215
+ fill="currentColor"
216
+ height="1em"
217
+ stroke="currentColor"
218
+ stroke-width="0"
219
+ viewBox="0 0 24 24"
220
+ width="1em"
221
+ xmlns="http://www.w3.org/2000/svg"
222
+ >
223
+ <path
224
+ d="M0 0h24v24H0V0z"
225
+ fill="none"
226
+ />
227
+ <path
228
+ d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"
229
+ />
230
+ </svg>
231
+ </ui-icon>
232
+ <ui-view
233
+ class="view wide content"
234
+ >
235
+ <select
236
+ class="select input"
237
+ name="name"
238
+ >
239
+ <option
240
+ value="Marriott Chain"
241
+ >
242
+ Marriott Chain
243
+ </option>
244
+ </select>
245
+ </ui-view>
246
+ <ui-icon
247
+ class="icon headline-3 icon expand"
248
+ >
249
+ <svg
250
+ fill="currentColor"
251
+ height="1em"
252
+ stroke="currentColor"
253
+ stroke-width="0"
254
+ viewBox="0 0 24 24"
255
+ width="1em"
256
+ xmlns="http://www.w3.org/2000/svg"
257
+ >
258
+ <path
259
+ d="M24 24H0V0h24v24z"
260
+ fill="none"
261
+ opacity=".87"
262
+ />
263
+ <path
264
+ d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
265
+ />
266
+ </svg>
267
+ </ui-icon>
268
+ </ui-view>
269
+ </ui-input-select>
270
+ </ui-pressable>
271
+ </ui-menu>
272
+ </ui-input-list>
273
+ </DocumentFragment>
274
+ `;
275
+
276
+ exports[`component:<InputList> groups:selects individual item within group 1`] = `
277
+ <DocumentFragment>
278
+ <ui-input-list
279
+ class="view"
280
+ >
281
+ <ui-menu
282
+ class="container"
283
+ data-testid="undefined-menu"
284
+ >
285
+ <ui-pressable
286
+ class="pressable"
287
+ data-testid="undefined-pressable"
288
+ style="width: 0px;"
289
+ tabindex="0"
290
+ >
291
+ <ui-input-select
292
+ class="view inputContainer"
293
+ >
294
+ <ui-view
295
+ class="view row inputBorder"
296
+ >
297
+ <ui-icon
298
+ class="icon headline-3 icon left"
299
+ >
300
+ <svg
301
+ fill="currentColor"
302
+ height="1em"
303
+ stroke="currentColor"
304
+ stroke-width="0"
305
+ viewBox="0 0 24 24"
306
+ width="1em"
307
+ xmlns="http://www.w3.org/2000/svg"
308
+ >
309
+ <path
310
+ d="M0 0h24v24H0V0z"
311
+ fill="none"
312
+ />
313
+ <path
314
+ d="M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z"
315
+ />
316
+ </svg>
317
+ </ui-icon>
318
+ <ui-view
319
+ class="view wide content"
320
+ >
321
+ <select
322
+ class="select input"
323
+ name="name"
324
+ >
325
+ <option
326
+ value="Marriott Downtown"
327
+ >
328
+ Marriott Downtown
329
+ </option>
330
+ </select>
331
+ </ui-view>
332
+ <ui-icon
333
+ class="icon headline-3 icon expand"
334
+ >
335
+ <svg
336
+ fill="currentColor"
337
+ height="1em"
338
+ stroke="currentColor"
339
+ stroke-width="0"
340
+ viewBox="0 0 24 24"
341
+ width="1em"
342
+ xmlns="http://www.w3.org/2000/svg"
343
+ >
344
+ <path
345
+ d="M24 24H0V0h24v24z"
346
+ fill="none"
347
+ opacity=".87"
348
+ />
349
+ <path
350
+ d="M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z"
351
+ />
352
+ </svg>
353
+ </ui-icon>
354
+ </ui-view>
355
+ </ui-input-select>
356
+ </ui-pressable>
357
+ </ui-menu>
358
+ </ui-input-list>
359
+ </DocumentFragment>
360
+ `;
361
+
3
362
  exports[`component:<InputList> inherit:className 1`] = `
4
363
  <DocumentFragment>
5
364
  <ui-input-list
@@ -83,7 +442,7 @@ exports[`component:<InputList> prop:caption 1`] = `
83
442
  class="view row inputBorder"
84
443
  >
85
444
  <ui-text
86
- class="text light action caption"
445
+ class="text light action notranslate caption"
87
446
  >
88
447
  caption
89
448
  </ui-text>
@@ -283,7 +642,7 @@ exports[`component:<InputList> prop:hint 1`] = `
283
642
  </ui-icon>
284
643
  </ui-view>
285
644
  <ui-text
286
- class="text small text hint"
645
+ class="text small notranslate text hint"
287
646
  >
288
647
  hint
289
648
  </ui-text>
@@ -401,7 +760,7 @@ exports[`component:<InputList> prop:label 1`] = `
401
760
  class="view wide content"
402
761
  >
403
762
  <ui-label
404
- class="text paragraph text label"
763
+ class="text paragraph notranslate text label"
405
764
  htmlfor="name"
406
765
  >
407
766
  label
@@ -469,7 +828,7 @@ exports[`component:<InputList> prop:required & prop:showRequired (true) 1`] = `
469
828
  class="view wide content"
470
829
  >
471
830
  <ui-label
472
- class="text paragraph text label"
831
+ class="text paragraph notranslate text label"
473
832
  htmlfor="name"
474
833
  >
475
834
  label
@@ -543,7 +902,7 @@ exports[`component:<InputList> prop:required 1`] = `
543
902
  class="view wide content"
544
903
  >
545
904
  <ui-label
546
- class="text paragraph text label"
905
+ class="text paragraph notranslate text label"
547
906
  htmlfor="name"
548
907
  >
549
908
  label
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.flattenOptions = void 0;
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
9
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
10
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
11
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
12
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
13
+ var flattenOptions = function flattenOptions() {
14
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
15
+ var flattened = [];
16
+ options.forEach(function () {
17
+ var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
18
+ var group = option.group,
19
+ items = option.items;
20
+ if (group && items) {
21
+ flattened.push(_objectSpread({
22
+ isGroupHeader: true
23
+ }, option));
24
+ items.forEach(function () {
25
+ var item = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
26
+ flattened.push(_objectSpread(_objectSpread({}, item), {}, {
27
+ isGroupItem: true
28
+ }));
29
+ });
30
+ } else {
31
+ flattened.push(option);
32
+ }
33
+ });
34
+ return flattened;
35
+ };
36
+ exports.flattenOptions = flattenOptions;
37
+ //# sourceMappingURL=flattenOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flattenOptions.js","names":["flattenOptions","options","arguments","length","undefined","flattened","forEach","option","group","items","push","_objectSpread","isGroupHeader","item","isGroupItem","exports"],"sources":["../../../../src/components/InputList/helpers/flattenOptions.js"],"sourcesContent":["export const flattenOptions = (options = []) => {\n const flattened = [];\n\n options.forEach((option = {}) => {\n const { group, items } = option;\n if (group && items) {\n flattened.push({\n isGroupHeader: true,\n ...option,\n });\n items.forEach((item = {}) => {\n flattened.push({\n ...item,\n isGroupItem: true,\n });\n });\n } else {\n flattened.push(option);\n }\n });\n\n return flattened;\n};\n"],"mappings":";;;;;;;;;;;;AAAO,IAAMA,cAAc,GAAG,SAAjBA,cAAcA,CAAA,EAAqB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EACzC,IAAMG,SAAS,GAAG,EAAE;EAEpBJ,OAAO,CAACK,OAAO,CAAC,YAAiB;IAAA,IAAhBC,MAAM,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAC1B,IAAQM,KAAK,GAAYD,MAAM,CAAvBC,KAAK;MAAEC,KAAK,GAAKF,MAAM,CAAhBE,KAAK;IACpB,IAAID,KAAK,IAAIC,KAAK,EAAE;MAClBJ,SAAS,CAACK,IAAI,CAAAC,aAAA;QACZC,aAAa,EAAE;MAAI,GAChBL,MAAM,CACV,CAAC;MACFE,KAAK,CAACH,OAAO,CAAC,YAAe;QAAA,IAAdO,IAAI,GAAAX,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;QACtBG,SAAS,CAACK,IAAI,CAAAC,aAAA,CAAAA,aAAA,KACTE,IAAI;UACPC,WAAW,EAAE;QAAI,EAClB,CAAC;MACJ,CAAC,CAAC;IACJ,CAAC,MAAM;MACLT,SAAS,CAACK,IAAI,CAACH,MAAM,CAAC;IACxB;EACF,CAAC,CAAC;EAEF,OAAOF,SAAS;AAClB,CAAC;AAACU,OAAA,CAAAf,cAAA,GAAAA,cAAA","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.getSelectableOptions = void 0;
7
+ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
8
+ function _toConsumableArray(r) { return _arrayWithoutHoles(r) || _iterableToArray(r) || _unsupportedIterableToArray(r) || _nonIterableSpread(); }
9
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r) return _arrayLikeToArray(r, a); var t = {}.toString.call(r).slice(8, -1); return "Object" === t && r.constructor && (t = r.constructor.name), "Map" === t || "Set" === t ? Array.from(r) : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t) ? _arrayLikeToArray(r, a) : void 0; } }
11
+ function _iterableToArray(r) { if ("undefined" != typeof Symbol && null != r[Symbol.iterator] || null != r["@@iterator"]) return Array.from(r); }
12
+ function _arrayWithoutHoles(r) { if (Array.isArray(r)) return _arrayLikeToArray(r); }
13
+ function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) { n[e] = r[e]; } return n; }
14
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
+ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
17
+ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
18
+ function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
19
+ var getSelectableOptions = function getSelectableOptions() {
20
+ var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
21
+ var selectable = [];
22
+ options.forEach(function () {
23
+ var option = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
24
+ var group = option.group,
25
+ items = option.items,
26
+ value = option.value;
27
+ if (group && items) {
28
+ if (value !== undefined) {
29
+ selectable.push(_objectSpread(_objectSpread({}, option), {}, {
30
+ name: group
31
+ }));
32
+ }
33
+ selectable.push.apply(selectable, _toConsumableArray(items));
34
+ } else {
35
+ selectable.push(option);
36
+ }
37
+ });
38
+ return selectable;
39
+ };
40
+ exports.getSelectableOptions = getSelectableOptions;
41
+ //# sourceMappingURL=getSelectableOptions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getSelectableOptions.js","names":["getSelectableOptions","options","arguments","length","undefined","selectable","forEach","option","group","items","value","push","_objectSpread","name","apply","_toConsumableArray","exports"],"sources":["../../../../src/components/InputList/helpers/getSelectableOptions.js"],"sourcesContent":["export const getSelectableOptions = (options = []) => {\n const selectable = [];\n\n options.forEach((option = {}) => {\n const { group, items, value } = option;\n if (group && items) {\n if (value !== undefined) {\n selectable.push({\n ...option,\n name: group,\n });\n }\n selectable.push(...items);\n } else {\n selectable.push(option);\n }\n });\n\n return selectable;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAO,IAAMA,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAA,EAAqB;EAAA,IAAjBC,OAAO,GAAAC,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,EAAE;EAC/C,IAAMG,UAAU,GAAG,EAAE;EAErBJ,OAAO,CAACK,OAAO,CAAC,YAAiB;IAAA,IAAhBC,MAAM,GAAAL,SAAA,CAAAC,MAAA,QAAAD,SAAA,QAAAE,SAAA,GAAAF,SAAA,MAAG,CAAC,CAAC;IAC1B,IAAQM,KAAK,GAAmBD,MAAM,CAA9BC,KAAK;MAAEC,KAAK,GAAYF,MAAM,CAAvBE,KAAK;MAAEC,KAAK,GAAKH,MAAM,CAAhBG,KAAK;IAC3B,IAAIF,KAAK,IAAIC,KAAK,EAAE;MAClB,IAAIC,KAAK,KAAKN,SAAS,EAAE;QACvBC,UAAU,CAACM,IAAI,CAAAC,aAAA,CAAAA,aAAA,KACVL,MAAM;UACTM,IAAI,EAAEL;QAAK,EACZ,CAAC;MACJ;MACAH,UAAU,CAACM,IAAI,CAAAG,KAAA,CAAfT,UAAU,EAAAU,kBAAA,CAASN,KAAK,EAAC;IAC3B,CAAC,MAAM;MACLJ,UAAU,CAACM,IAAI,CAACJ,MAAM,CAAC;IACzB;EACF,CAAC,CAAC;EAEF,OAAOF,UAAU;AACnB,CAAC;AAACW,OAAA,CAAAhB,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -3,6 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ var _flattenOptions = require("./flattenOptions");
7
+ Object.keys(_flattenOptions).forEach(function (key) {
8
+ if (key === "default" || key === "__esModule") return;
9
+ if (key in exports && exports[key] === _flattenOptions[key]) return;
10
+ Object.defineProperty(exports, key, {
11
+ enumerable: true,
12
+ get: function get() {
13
+ return _flattenOptions[key];
14
+ }
15
+ });
16
+ });
6
17
  var _getCaption = require("./getCaption");
7
18
  Object.keys(_getCaption).forEach(function (key) {
8
19
  if (key === "default" || key === "__esModule") return;
@@ -14,4 +25,15 @@ Object.keys(_getCaption).forEach(function (key) {
14
25
  }
15
26
  });
16
27
  });
28
+ var _getSelectableOptions = require("./getSelectableOptions");
29
+ Object.keys(_getSelectableOptions).forEach(function (key) {
30
+ if (key === "default" || key === "__esModule") return;
31
+ if (key in exports && exports[key] === _getSelectableOptions[key]) return;
32
+ Object.defineProperty(exports, key, {
33
+ enumerable: true,
34
+ get: function get() {
35
+ return _getSelectableOptions[key];
36
+ }
37
+ });
38
+ });
17
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["_getCaption","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get"],"sources":["../../../../src/components/InputList/helpers/index.js"],"sourcesContent":["export * from './getCaption';\n"],"mappings":";;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,WAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,WAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,WAAA,CAAAK,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"file":"index.js","names":["_flattenOptions","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_getCaption","_getSelectableOptions"],"sources":["../../../../src/components/InputList/helpers/index.js"],"sourcesContent":["export * from './flattenOptions';\nexport * from './getCaption';\nexport * from './getSelectableOptions';\n"],"mappings":";;;;;AAAA,IAAAA,eAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,eAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,eAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAT,eAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,WAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,WAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,WAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAC,WAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,qBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,qBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAM,qBAAA,CAAAN,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,IAAA;MAAA,OAAAE,qBAAA,CAAAN,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
@@ -36,7 +36,7 @@ exports[`component:<InputNumber> inherit:className 1`] = `
36
36
  </ui-icon>
37
37
  </ui-button>
38
38
  <ui-text
39
- class="text paragraph value"
39
+ class="text paragraph notranslate value"
40
40
  >
41
41
  0
42
42
  </ui-text>
@@ -107,7 +107,7 @@ exports[`component:<InputNumber> prop:disabled 1`] = `
107
107
  </ui-icon>
108
108
  </ui-button>
109
109
  <ui-text
110
- class="text paragraph value disabled"
110
+ class="text paragraph notranslate value disabled"
111
111
  >
112
112
  0
113
113
  </ui-text>
@@ -151,7 +151,7 @@ exports[`component:<InputNumber> prop:hint 1`] = `
151
151
  class="view texts"
152
152
  >
153
153
  <ui-text
154
- class="text small text hint hint"
154
+ class="text small notranslate text hint hint"
155
155
  >
156
156
  hint
157
157
  </ui-text>
@@ -184,7 +184,7 @@ exports[`component:<InputNumber> prop:hint 1`] = `
184
184
  </ui-icon>
185
185
  </ui-button>
186
186
  <ui-text
187
- class="text paragraph value"
187
+ class="text paragraph notranslate value"
188
188
  >
189
189
  0
190
190
  </ui-text>
@@ -228,7 +228,7 @@ exports[`component:<InputNumber> prop:label 1`] = `
228
228
  class="view texts"
229
229
  >
230
230
  <ui-label
231
- class="text paragraph text label withValue"
231
+ class="text paragraph notranslate text label withValue"
232
232
  >
233
233
  label
234
234
  </ui-label>
@@ -261,7 +261,7 @@ exports[`component:<InputNumber> prop:label 1`] = `
261
261
  </ui-icon>
262
262
  </ui-button>
263
263
  <ui-text
264
- class="text paragraph value"
264
+ class="text paragraph notranslate value"
265
265
  >
266
266
  0
267
267
  </ui-text>
@@ -332,7 +332,7 @@ exports[`component:<InputNumber> prop:max 1`] = `
332
332
  </ui-icon>
333
333
  </ui-button>
334
334
  <ui-text
335
- class="text paragraph value"
335
+ class="text paragraph notranslate value"
336
336
  >
337
337
  10
338
338
  </ui-text>
@@ -403,7 +403,7 @@ exports[`component:<InputNumber> prop:min 1`] = `
403
403
  </ui-icon>
404
404
  </ui-button>
405
405
  <ui-text
406
- class="text paragraph value"
406
+ class="text paragraph notranslate value"
407
407
  >
408
408
  10
409
409
  </ui-text>
@@ -474,7 +474,7 @@ exports[`component:<InputNumber> prop:required & prop:showRequired (true) 1`] =
474
474
  </ui-icon>
475
475
  </ui-button>
476
476
  <ui-text
477
- class="text paragraph value"
477
+ class="text paragraph notranslate value"
478
478
  >
479
479
  10
480
480
  </ui-text>
@@ -545,7 +545,7 @@ exports[`component:<InputNumber> prop:required 1`] = `
545
545
  </ui-icon>
546
546
  </ui-button>
547
547
  <ui-text
548
- class="text paragraph value"
548
+ class="text paragraph notranslate value"
549
549
  >
550
550
  10
551
551
  </ui-text>
@@ -616,7 +616,7 @@ exports[`component:<InputNumber> prop:rounded 1`] = `
616
616
  </ui-icon>
617
617
  </ui-button>
618
618
  <ui-text
619
- class="text paragraph value"
619
+ class="text paragraph notranslate value"
620
620
  >
621
621
  10
622
622
  </ui-text>
@@ -687,7 +687,7 @@ exports[`component:<InputNumber> prop:value 1`] = `
687
687
  </ui-icon>
688
688
  </ui-button>
689
689
  <ui-text
690
- class="text paragraph value"
690
+ class="text paragraph notranslate value"
691
691
  >
692
692
  10
693
693
  </ui-text>
@@ -758,7 +758,7 @@ exports[`component:<InputNumber> renders 1`] = `
758
758
  </ui-icon>
759
759
  </ui-button>
760
760
  <ui-text
761
- class="text paragraph value"
761
+ class="text paragraph notranslate value"
762
762
  >
763
763
  0
764
764
  </ui-text>
@@ -830,7 +830,7 @@ exports[`component:<InputNumber> testId 1`] = `
830
830
  </ui-icon>
831
831
  </ui-button>
832
832
  <ui-text
833
- class="text paragraph value"
833
+ class="text paragraph notranslate value"
834
834
  >
835
835
  0
836
836
  </ui-text>