@zohodesk/components 1.2.61 → 1.2.63
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/.cli/propValidation_report.html +1 -1
- package/README.md +11 -0
- package/assets/Appearance/dark/mode/Component_DarkMode.module.css +8 -0
- package/assets/Appearance/light/mode/Component_LightMode.module.css +8 -0
- package/assets/Appearance/pureDark/mode/Component_PureDarkMode.module.css +8 -0
- package/es/Button/__tests__/__snapshots__/Button.spec.js.snap +2 -2
- package/es/Button/css/Button.module.css +57 -10
- package/es/Button/css/cssJSLogic.js +1 -1
- package/es/Button/props/propTypes.js +1 -1
- package/es/MultiSelect/AdvancedGroupMultiSelect.js +12 -4
- package/es/MultiSelect/AdvancedMultiSelect.js +12 -6
- package/es/MultiSelect/MultiSelect.js +10 -4
- package/es/MultiSelect/MultiSelectWithAvatar.js +4 -2
- package/es/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +28 -0
- package/es/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +390 -0
- package/es/MultiSelect/props/defaultProps.js +8 -4
- package/es/MultiSelect/props/propTypes.js +4 -2
- package/es/RippleEffect/RippleEffect.module.css +16 -0
- package/es/RippleEffect/props/propTypes.js +1 -1
- package/es/Select/GroupSelect.js +4 -2
- package/es/Select/Select.js +3 -1
- package/es/Select/SelectWithAvatar.js +4 -2
- package/es/Select/props/defaultProps.js +4 -2
- package/es/Select/props/propTypes.js +4 -2
- package/es/Tag/Tag.js +1 -1
- package/es/utils/dropDownUtils.js +10 -6
- package/lib/Button/__tests__/__snapshots__/Button.spec.js.snap +2 -2
- package/lib/Button/css/Button.module.css +57 -10
- package/lib/Button/css/cssJSLogic.js +1 -1
- package/lib/Button/props/propTypes.js +1 -1
- package/lib/MultiSelect/AdvancedGroupMultiSelect.js +11 -5
- package/lib/MultiSelect/AdvancedMultiSelect.js +12 -6
- package/lib/MultiSelect/MultiSelect.js +8 -4
- package/lib/MultiSelect/MultiSelectWithAvatar.js +4 -2
- package/lib/MultiSelect/__tests__/AdvancedMultiSelect.spec.js +28 -0
- package/lib/MultiSelect/__tests__/__snapshots__/AdvancedMultiSelect.spec.js.snap +390 -0
- package/lib/MultiSelect/props/defaultProps.js +8 -4
- package/lib/MultiSelect/props/propTypes.js +3 -2
- package/lib/RippleEffect/RippleEffect.module.css +16 -0
- package/lib/RippleEffect/props/propTypes.js +1 -1
- package/lib/Select/GroupSelect.js +4 -2
- package/lib/Select/Select.js +3 -1
- package/lib/Select/SelectWithAvatar.js +4 -2
- package/lib/Select/props/defaultProps.js +4 -2
- package/lib/Select/props/propTypes.js +4 -2
- package/lib/Tag/Tag.js +1 -1
- package/lib/utils/dropDownUtils.js +12 -6
- package/package.json +1 -1
- package/result.json +1 -1
|
@@ -72,3 +72,393 @@ exports[`AdvancedMultiSelect rendering the defult props 1`] = `
|
|
|
72
72
|
</div>
|
|
73
73
|
</DocumentFragment>
|
|
74
74
|
`;
|
|
75
|
+
|
|
76
|
+
exports[`AdvancedMultiSelect rendering the options array with objects and string 1`] = `
|
|
77
|
+
<DocumentFragment>
|
|
78
|
+
<div
|
|
79
|
+
class="wrapper effect "
|
|
80
|
+
data-id="multiSelectComp"
|
|
81
|
+
data-selector-id="advancedMultiSelect"
|
|
82
|
+
data-test-id="multiSelectComp"
|
|
83
|
+
>
|
|
84
|
+
<div
|
|
85
|
+
class="container medium hasBorder borderColor_default flex cover rowdir wrap vCenter"
|
|
86
|
+
data-id="containerComponent"
|
|
87
|
+
data-selector-id="container"
|
|
88
|
+
data-test-id="containerComponent"
|
|
89
|
+
>
|
|
90
|
+
<div
|
|
91
|
+
class="wrapper grow basisAuto shrinkOn"
|
|
92
|
+
data-id="multiSelectComp_textBox"
|
|
93
|
+
data-selector-id="box"
|
|
94
|
+
data-test-id="multiSelectComp_textBox"
|
|
95
|
+
>
|
|
96
|
+
<span
|
|
97
|
+
class=" custmSpan custmSpanMedium
|
|
98
|
+
"
|
|
99
|
+
/>
|
|
100
|
+
<div
|
|
101
|
+
class="container effect custmInputWrapper flex rowdir"
|
|
102
|
+
data-id="containerComponent"
|
|
103
|
+
data-selector-id="textBoxIcon"
|
|
104
|
+
data-test-id="containerComponent"
|
|
105
|
+
>
|
|
106
|
+
<div
|
|
107
|
+
class="grow basis shrinkOff"
|
|
108
|
+
data-id="boxComponent"
|
|
109
|
+
data-selector-id="box"
|
|
110
|
+
data-test-id="boxComponent"
|
|
111
|
+
>
|
|
112
|
+
<input
|
|
113
|
+
aria-controls="1"
|
|
114
|
+
aria-describedby="2"
|
|
115
|
+
aria-expanded="true"
|
|
116
|
+
aria-haspopup="true"
|
|
117
|
+
aria-owns="1"
|
|
118
|
+
autocomplete="off"
|
|
119
|
+
class=" container medium default effect borderColor_default "
|
|
120
|
+
data-id="textBoxIcon"
|
|
121
|
+
data-selector-id="textBoxIcon"
|
|
122
|
+
data-test-id="textBoxIcon"
|
|
123
|
+
maxlength="250"
|
|
124
|
+
role="combobox"
|
|
125
|
+
type="text"
|
|
126
|
+
value=""
|
|
127
|
+
/>
|
|
128
|
+
</div>
|
|
129
|
+
<div
|
|
130
|
+
class="iconContainer shrinkOff"
|
|
131
|
+
data-id="boxComponent"
|
|
132
|
+
data-selector-id="box"
|
|
133
|
+
data-test-id="boxComponent"
|
|
134
|
+
>
|
|
135
|
+
<div
|
|
136
|
+
class="flex cover rowdir"
|
|
137
|
+
data-id="containerComponent"
|
|
138
|
+
data-selector-id="container"
|
|
139
|
+
data-test-id="containerComponent"
|
|
140
|
+
/>
|
|
141
|
+
</div>
|
|
142
|
+
</div>
|
|
143
|
+
</div>
|
|
144
|
+
</div>
|
|
145
|
+
<div
|
|
146
|
+
aria-multiselectable="true"
|
|
147
|
+
class="main container bottomMid default"
|
|
148
|
+
data-a11y-focus-main-area="true"
|
|
149
|
+
data-arrow-position="mid"
|
|
150
|
+
data-box-direction="bottom"
|
|
151
|
+
data-id="multiSelectComp_dropbox"
|
|
152
|
+
data-position="bottomMid"
|
|
153
|
+
data-selector-id="dropBox"
|
|
154
|
+
data-test-id="multiSelectComp_dropbox"
|
|
155
|
+
dot-ui-element="dropbox"
|
|
156
|
+
id="1"
|
|
157
|
+
role="listbox"
|
|
158
|
+
style="z-index: 4;"
|
|
159
|
+
>
|
|
160
|
+
<div
|
|
161
|
+
class="subContainer shadow boxPadding radius bounce defaultPalette"
|
|
162
|
+
data-id="multiSelectComp_dropbox_subcontainer"
|
|
163
|
+
data-selector-id="dropBox_subcontainer"
|
|
164
|
+
data-test-id="multiSelectComp_dropbox_subcontainer"
|
|
165
|
+
tabindex="-1"
|
|
166
|
+
>
|
|
167
|
+
<div
|
|
168
|
+
class="flex rowdir"
|
|
169
|
+
data-id="containerComponent"
|
|
170
|
+
data-selector-id="container"
|
|
171
|
+
data-test-id="containerComponent"
|
|
172
|
+
>
|
|
173
|
+
<div
|
|
174
|
+
class="grow basis shrinkOff"
|
|
175
|
+
data-id="boxComponent"
|
|
176
|
+
data-selector-id="box"
|
|
177
|
+
data-test-id="boxComponent"
|
|
178
|
+
>
|
|
179
|
+
<div
|
|
180
|
+
class="box flex cover coldir"
|
|
181
|
+
data-id="containerComponent"
|
|
182
|
+
data-selector-id="container"
|
|
183
|
+
data-test-id="containerComponent"
|
|
184
|
+
>
|
|
185
|
+
<div
|
|
186
|
+
class="small grow basis shrinkOn scrolly"
|
|
187
|
+
data-id="CardContent"
|
|
188
|
+
data-selector-id="cardContent"
|
|
189
|
+
data-test-id="CardContent"
|
|
190
|
+
>
|
|
191
|
+
<div
|
|
192
|
+
class="flex coldir"
|
|
193
|
+
data-id="containerComponent"
|
|
194
|
+
data-selector-id="container"
|
|
195
|
+
data-test-id="containerComponent"
|
|
196
|
+
tabindex="0"
|
|
197
|
+
>
|
|
198
|
+
<div
|
|
199
|
+
class="shrinkOff"
|
|
200
|
+
data-id="multiSelectComp_Options"
|
|
201
|
+
data-selector-id="box"
|
|
202
|
+
data-test-id="multiSelectComp_Options"
|
|
203
|
+
>
|
|
204
|
+
<li
|
|
205
|
+
aria-label="Apple"
|
|
206
|
+
aria-selected="false"
|
|
207
|
+
class="list medium default defaultHover mediumwithTick withBorder flex rowdir vCenter"
|
|
208
|
+
data-a11y-inset-focus="true"
|
|
209
|
+
data-a11y-list-active="true"
|
|
210
|
+
data-id="Apple"
|
|
211
|
+
data-selector-id="listItem"
|
|
212
|
+
data-test-id="Apple"
|
|
213
|
+
data-title="Apple"
|
|
214
|
+
role="option"
|
|
215
|
+
tabindex="0"
|
|
216
|
+
>
|
|
217
|
+
<div
|
|
218
|
+
class="value basisAuto shrinkOn"
|
|
219
|
+
data-id="boxComponent"
|
|
220
|
+
data-selector-id="box"
|
|
221
|
+
data-test-id="boxComponent"
|
|
222
|
+
>
|
|
223
|
+
Apple
|
|
224
|
+
</div>
|
|
225
|
+
</li>
|
|
226
|
+
<li
|
|
227
|
+
aria-label="Orange"
|
|
228
|
+
aria-selected="false"
|
|
229
|
+
class="list medium default mediumwithTick withBorder flex rowdir vCenter"
|
|
230
|
+
data-a11y-inset-focus="true"
|
|
231
|
+
data-a11y-list-active="false"
|
|
232
|
+
data-id="Orange"
|
|
233
|
+
data-selector-id="listItem"
|
|
234
|
+
data-test-id="Orange"
|
|
235
|
+
data-title="Orange"
|
|
236
|
+
role="option"
|
|
237
|
+
tabindex="0"
|
|
238
|
+
>
|
|
239
|
+
<div
|
|
240
|
+
class="value basisAuto shrinkOn"
|
|
241
|
+
data-id="boxComponent"
|
|
242
|
+
data-selector-id="box"
|
|
243
|
+
data-test-id="boxComponent"
|
|
244
|
+
>
|
|
245
|
+
Orange
|
|
246
|
+
</div>
|
|
247
|
+
</li>
|
|
248
|
+
<li
|
|
249
|
+
aria-label="string test"
|
|
250
|
+
aria-selected="false"
|
|
251
|
+
class="list medium default mediumwithTick withBorder flex rowdir vCenter"
|
|
252
|
+
data-a11y-inset-focus="true"
|
|
253
|
+
data-a11y-list-active="false"
|
|
254
|
+
data-id="string test"
|
|
255
|
+
data-selector-id="listItem"
|
|
256
|
+
data-test-id="string test"
|
|
257
|
+
data-title="string test"
|
|
258
|
+
role="option"
|
|
259
|
+
tabindex="0"
|
|
260
|
+
>
|
|
261
|
+
<div
|
|
262
|
+
class="value basisAuto shrinkOn"
|
|
263
|
+
data-id="boxComponent"
|
|
264
|
+
data-selector-id="box"
|
|
265
|
+
data-test-id="boxComponent"
|
|
266
|
+
>
|
|
267
|
+
string test
|
|
268
|
+
</div>
|
|
269
|
+
</li>
|
|
270
|
+
</div>
|
|
271
|
+
</div>
|
|
272
|
+
</div>
|
|
273
|
+
</div>
|
|
274
|
+
</div>
|
|
275
|
+
</div>
|
|
276
|
+
</div>
|
|
277
|
+
</div>
|
|
278
|
+
</div>
|
|
279
|
+
</DocumentFragment>
|
|
280
|
+
`;
|
|
281
|
+
|
|
282
|
+
exports[`AdvancedMultiSelect rendering the options array with only objects using allowValueFallback 1`] = `
|
|
283
|
+
<DocumentFragment>
|
|
284
|
+
<div
|
|
285
|
+
class="wrapper effect "
|
|
286
|
+
data-id="multiSelectComp"
|
|
287
|
+
data-selector-id="advancedMultiSelect"
|
|
288
|
+
data-test-id="multiSelectComp"
|
|
289
|
+
>
|
|
290
|
+
<div
|
|
291
|
+
class="container medium hasBorder borderColor_default flex cover rowdir wrap vCenter"
|
|
292
|
+
data-id="containerComponent"
|
|
293
|
+
data-selector-id="container"
|
|
294
|
+
data-test-id="containerComponent"
|
|
295
|
+
>
|
|
296
|
+
<div
|
|
297
|
+
class="wrapper grow basisAuto shrinkOn"
|
|
298
|
+
data-id="multiSelectComp_textBox"
|
|
299
|
+
data-selector-id="box"
|
|
300
|
+
data-test-id="multiSelectComp_textBox"
|
|
301
|
+
>
|
|
302
|
+
<span
|
|
303
|
+
class=" custmSpan custmSpanMedium
|
|
304
|
+
"
|
|
305
|
+
/>
|
|
306
|
+
<div
|
|
307
|
+
class="container effect custmInputWrapper flex rowdir"
|
|
308
|
+
data-id="containerComponent"
|
|
309
|
+
data-selector-id="textBoxIcon"
|
|
310
|
+
data-test-id="containerComponent"
|
|
311
|
+
>
|
|
312
|
+
<div
|
|
313
|
+
class="grow basis shrinkOff"
|
|
314
|
+
data-id="boxComponent"
|
|
315
|
+
data-selector-id="box"
|
|
316
|
+
data-test-id="boxComponent"
|
|
317
|
+
>
|
|
318
|
+
<input
|
|
319
|
+
aria-controls="1"
|
|
320
|
+
aria-describedby="2"
|
|
321
|
+
aria-expanded="true"
|
|
322
|
+
aria-haspopup="true"
|
|
323
|
+
aria-owns="1"
|
|
324
|
+
autocomplete="off"
|
|
325
|
+
class=" container medium default effect borderColor_default "
|
|
326
|
+
data-id="textBoxIcon"
|
|
327
|
+
data-selector-id="textBoxIcon"
|
|
328
|
+
data-test-id="textBoxIcon"
|
|
329
|
+
maxlength="250"
|
|
330
|
+
role="combobox"
|
|
331
|
+
type="text"
|
|
332
|
+
value=""
|
|
333
|
+
/>
|
|
334
|
+
</div>
|
|
335
|
+
<div
|
|
336
|
+
class="iconContainer shrinkOff"
|
|
337
|
+
data-id="boxComponent"
|
|
338
|
+
data-selector-id="box"
|
|
339
|
+
data-test-id="boxComponent"
|
|
340
|
+
>
|
|
341
|
+
<div
|
|
342
|
+
class="flex cover rowdir"
|
|
343
|
+
data-id="containerComponent"
|
|
344
|
+
data-selector-id="container"
|
|
345
|
+
data-test-id="containerComponent"
|
|
346
|
+
/>
|
|
347
|
+
</div>
|
|
348
|
+
</div>
|
|
349
|
+
</div>
|
|
350
|
+
</div>
|
|
351
|
+
<div
|
|
352
|
+
aria-multiselectable="true"
|
|
353
|
+
class="main container bottomMid default"
|
|
354
|
+
data-a11y-focus-main-area="true"
|
|
355
|
+
data-arrow-position="mid"
|
|
356
|
+
data-box-direction="bottom"
|
|
357
|
+
data-id="multiSelectComp_dropbox"
|
|
358
|
+
data-position="bottomMid"
|
|
359
|
+
data-selector-id="dropBox"
|
|
360
|
+
data-test-id="multiSelectComp_dropbox"
|
|
361
|
+
dot-ui-element="dropbox"
|
|
362
|
+
id="1"
|
|
363
|
+
role="listbox"
|
|
364
|
+
style="z-index: 4;"
|
|
365
|
+
>
|
|
366
|
+
<div
|
|
367
|
+
class="subContainer shadow boxPadding radius bounce defaultPalette"
|
|
368
|
+
data-id="multiSelectComp_dropbox_subcontainer"
|
|
369
|
+
data-selector-id="dropBox_subcontainer"
|
|
370
|
+
data-test-id="multiSelectComp_dropbox_subcontainer"
|
|
371
|
+
tabindex="-1"
|
|
372
|
+
>
|
|
373
|
+
<div
|
|
374
|
+
class="flex rowdir"
|
|
375
|
+
data-id="containerComponent"
|
|
376
|
+
data-selector-id="container"
|
|
377
|
+
data-test-id="containerComponent"
|
|
378
|
+
>
|
|
379
|
+
<div
|
|
380
|
+
class="grow basis shrinkOff"
|
|
381
|
+
data-id="boxComponent"
|
|
382
|
+
data-selector-id="box"
|
|
383
|
+
data-test-id="boxComponent"
|
|
384
|
+
>
|
|
385
|
+
<div
|
|
386
|
+
class="box flex cover coldir"
|
|
387
|
+
data-id="containerComponent"
|
|
388
|
+
data-selector-id="container"
|
|
389
|
+
data-test-id="containerComponent"
|
|
390
|
+
>
|
|
391
|
+
<div
|
|
392
|
+
class="small grow basis shrinkOn scrolly"
|
|
393
|
+
data-id="CardContent"
|
|
394
|
+
data-selector-id="cardContent"
|
|
395
|
+
data-test-id="CardContent"
|
|
396
|
+
>
|
|
397
|
+
<div
|
|
398
|
+
class="flex coldir"
|
|
399
|
+
data-id="containerComponent"
|
|
400
|
+
data-selector-id="container"
|
|
401
|
+
data-test-id="containerComponent"
|
|
402
|
+
tabindex="0"
|
|
403
|
+
>
|
|
404
|
+
<div
|
|
405
|
+
class="shrinkOff"
|
|
406
|
+
data-id="multiSelectComp_Options"
|
|
407
|
+
data-selector-id="box"
|
|
408
|
+
data-test-id="multiSelectComp_Options"
|
|
409
|
+
>
|
|
410
|
+
<li
|
|
411
|
+
aria-label="Apple"
|
|
412
|
+
aria-selected="false"
|
|
413
|
+
class="list medium default defaultHover mediumwithTick withBorder flex rowdir vCenter"
|
|
414
|
+
data-a11y-inset-focus="true"
|
|
415
|
+
data-a11y-list-active="true"
|
|
416
|
+
data-id="Apple"
|
|
417
|
+
data-selector-id="listItem"
|
|
418
|
+
data-test-id="Apple"
|
|
419
|
+
data-title="Apple"
|
|
420
|
+
role="option"
|
|
421
|
+
tabindex="0"
|
|
422
|
+
>
|
|
423
|
+
<div
|
|
424
|
+
class="value basisAuto shrinkOn"
|
|
425
|
+
data-id="boxComponent"
|
|
426
|
+
data-selector-id="box"
|
|
427
|
+
data-test-id="boxComponent"
|
|
428
|
+
>
|
|
429
|
+
Apple
|
|
430
|
+
</div>
|
|
431
|
+
</li>
|
|
432
|
+
<li
|
|
433
|
+
aria-label="Orange"
|
|
434
|
+
aria-selected="false"
|
|
435
|
+
class="list medium default mediumwithTick withBorder flex rowdir vCenter"
|
|
436
|
+
data-a11y-inset-focus="true"
|
|
437
|
+
data-a11y-list-active="false"
|
|
438
|
+
data-id="Orange"
|
|
439
|
+
data-selector-id="listItem"
|
|
440
|
+
data-test-id="Orange"
|
|
441
|
+
data-title="Orange"
|
|
442
|
+
role="option"
|
|
443
|
+
tabindex="0"
|
|
444
|
+
>
|
|
445
|
+
<div
|
|
446
|
+
class="value basisAuto shrinkOn"
|
|
447
|
+
data-id="boxComponent"
|
|
448
|
+
data-selector-id="box"
|
|
449
|
+
data-test-id="boxComponent"
|
|
450
|
+
>
|
|
451
|
+
Orange
|
|
452
|
+
</div>
|
|
453
|
+
</li>
|
|
454
|
+
</div>
|
|
455
|
+
</div>
|
|
456
|
+
</div>
|
|
457
|
+
</div>
|
|
458
|
+
</div>
|
|
459
|
+
</div>
|
|
460
|
+
</div>
|
|
461
|
+
</div>
|
|
462
|
+
</div>
|
|
463
|
+
</DocumentFragment>
|
|
464
|
+
`;
|
|
@@ -37,7 +37,8 @@ export const AdvancedGroupMultiSelect_defaultProps = {
|
|
|
37
37
|
needEffect: true,
|
|
38
38
|
palette: 'default',
|
|
39
39
|
isLoading: false,
|
|
40
|
-
dataSelectorId: 'advancedGroupMultiSelect'
|
|
40
|
+
dataSelectorId: 'advancedGroupMultiSelect',
|
|
41
|
+
allowValueFallback: true
|
|
41
42
|
};
|
|
42
43
|
export const AdvancedMultiSelect_defaultProps = {
|
|
43
44
|
animationStyle: 'bounce',
|
|
@@ -71,7 +72,8 @@ export const AdvancedMultiSelect_defaultProps = {
|
|
|
71
72
|
dataSelectorId: 'advancedMultiSelect',
|
|
72
73
|
customClass: {},
|
|
73
74
|
isAbsolutePositioningNeeded: true,
|
|
74
|
-
isRestrictScroll: false
|
|
75
|
+
isRestrictScroll: false,
|
|
76
|
+
allowValueFallback: true
|
|
75
77
|
};
|
|
76
78
|
export const EmptyState_defaultProps = {
|
|
77
79
|
dataId: 'empty',
|
|
@@ -118,7 +120,8 @@ export const MultiSelect_defaultProps = {
|
|
|
118
120
|
selectedOptionsCount: 0,
|
|
119
121
|
cardHeaderName: '',
|
|
120
122
|
needResponsive: true,
|
|
121
|
-
customProps: {}
|
|
123
|
+
customProps: {},
|
|
124
|
+
allowValueFallback: true
|
|
122
125
|
};
|
|
123
126
|
export const MultiSelectHeader_defaultProps = {
|
|
124
127
|
dataId: 'MultiSelectHeader'
|
|
@@ -155,7 +158,8 @@ export const MultiSelectWithAvatar_defaultProps = {
|
|
|
155
158
|
dataSelectorId: 'multiSelectWithAvatar',
|
|
156
159
|
keepSelectedOptions: false,
|
|
157
160
|
customProps: {},
|
|
158
|
-
needResponsive: true
|
|
161
|
+
needResponsive: true,
|
|
162
|
+
allowValueFallback: true
|
|
159
163
|
};
|
|
160
164
|
export const SelectedOptions_defaultProps = {
|
|
161
165
|
size: 'medium',
|
|
@@ -112,7 +112,8 @@ export const MultiSelect_propTypes = {
|
|
|
112
112
|
customProps: PropTypes.shape({
|
|
113
113
|
TextBoxIconProps: PropTypes.object
|
|
114
114
|
}),
|
|
115
|
-
isFocus: PropTypes.bool
|
|
115
|
+
isFocus: PropTypes.bool,
|
|
116
|
+
allowValueFallback: PropTypes.bool
|
|
116
117
|
};
|
|
117
118
|
export const MultiSelectHeader_propTypes = {
|
|
118
119
|
dataId: PropTypes.string,
|
|
@@ -248,7 +249,8 @@ export const AdvancedGroupMultiSelect_propTypes = {
|
|
|
248
249
|
searchStr: PropTypes.string,
|
|
249
250
|
children: PropTypes.node,
|
|
250
251
|
dataSelectorId: PropTypes.string,
|
|
251
|
-
isFocus: PropTypes.bool
|
|
252
|
+
isFocus: PropTypes.bool,
|
|
253
|
+
allowValueFallback: PropTypes.bool
|
|
252
254
|
};
|
|
253
255
|
export const AdvancedMultiSelect_propTypes = { ...MultiSelect_propTypes,
|
|
254
256
|
selectedOptionDetails: PropTypes.string,
|
|
@@ -90,3 +90,19 @@
|
|
|
90
90
|
.notAllowed {
|
|
91
91
|
cursor: not-allowed;
|
|
92
92
|
}
|
|
93
|
+
.secondary.defaultHover, .hoverEffect:hover.secondary.borderHover
|
|
94
|
+
/* .hoverEffect:focus.secondary.borderHover */
|
|
95
|
+
{
|
|
96
|
+
border-color: var(--zdt_rippleeffect_secondary_border);
|
|
97
|
+
}
|
|
98
|
+
.hoverEffect:hover.secondary.bgHover
|
|
99
|
+
/* .hoverEffect:focus.secondary.bgHover */
|
|
100
|
+
{
|
|
101
|
+
background-color: var(--zdt_rippleeffect_secondary_bg);
|
|
102
|
+
}
|
|
103
|
+
.secondary.active {
|
|
104
|
+
background-color: var(--zdt_rippleeffect_secondary_active_bg);
|
|
105
|
+
}
|
|
106
|
+
.secondary.active.border {
|
|
107
|
+
border-color: var(--zdt_rippleeffect_secondary_active_border);
|
|
108
|
+
}
|
|
@@ -6,7 +6,7 @@ export const propTypes = {
|
|
|
6
6
|
isDisabled: PropTypes.bool,
|
|
7
7
|
isNeedEffect: PropTypes.bool,
|
|
8
8
|
needBorder: PropTypes.bool,
|
|
9
|
-
palette: PropTypes.oneOf(['default', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger']),
|
|
9
|
+
palette: PropTypes.oneOf(['default', 'secondary', 'primary', 'primaryLight', 'primaryFilled', 'primaryDark', 'green', 'danger']),
|
|
10
10
|
cssClassPropOfChild: PropTypes.string,
|
|
11
11
|
isCopyTextEnabled: PropTypes.bool
|
|
12
12
|
};
|
package/es/Select/GroupSelect.js
CHANGED
|
@@ -170,10 +170,12 @@ export class GroupSelectComponent extends PureComponent {
|
|
|
170
170
|
|
|
171
171
|
handleGetGroupSelectOptions(props) {
|
|
172
172
|
let {
|
|
173
|
-
groupedOptions
|
|
173
|
+
groupedOptions,
|
|
174
|
+
allowValueFallback
|
|
174
175
|
} = props;
|
|
175
176
|
return this.getGroupSelectOptions({
|
|
176
|
-
groupedOptions
|
|
177
|
+
groupedOptions,
|
|
178
|
+
allowValueFallback
|
|
177
179
|
});
|
|
178
180
|
}
|
|
179
181
|
|
package/es/Select/Select.js
CHANGED
|
@@ -250,6 +250,7 @@ export class SelectComponent extends Component {
|
|
|
250
250
|
options,
|
|
251
251
|
valueField,
|
|
252
252
|
textField,
|
|
253
|
+
allowValueFallback,
|
|
253
254
|
customProps = {}
|
|
254
255
|
} = props;
|
|
255
256
|
let {
|
|
@@ -259,7 +260,8 @@ export class SelectComponent extends Component {
|
|
|
259
260
|
options,
|
|
260
261
|
valueField,
|
|
261
262
|
textField,
|
|
262
|
-
listItemProps
|
|
263
|
+
listItemProps,
|
|
264
|
+
allowValueFallback
|
|
263
265
|
});
|
|
264
266
|
}
|
|
265
267
|
|
|
@@ -40,14 +40,16 @@ class SelectWithAvatarComponent extends SelectComponent {
|
|
|
40
40
|
options,
|
|
41
41
|
valueField,
|
|
42
42
|
textField,
|
|
43
|
-
imageField
|
|
43
|
+
imageField,
|
|
44
|
+
allowValueFallback
|
|
44
45
|
} = props;
|
|
45
46
|
return this.formatOptions({
|
|
46
47
|
options,
|
|
47
48
|
valueField,
|
|
48
49
|
textField,
|
|
49
50
|
imageField,
|
|
50
|
-
optionType: 'avatar'
|
|
51
|
+
optionType: 'avatar',
|
|
52
|
+
allowValueFallback
|
|
51
53
|
});
|
|
52
54
|
}
|
|
53
55
|
|
|
@@ -33,7 +33,8 @@ export const Select_defaultProps = {
|
|
|
33
33
|
iconOnHover: false,
|
|
34
34
|
customProps: {},
|
|
35
35
|
isLoading: false,
|
|
36
|
-
isAbsolutePositioningNeeded: true
|
|
36
|
+
isAbsolutePositioningNeeded: true,
|
|
37
|
+
allowValueFallback: true
|
|
37
38
|
};
|
|
38
39
|
export const GroupSelect_defaultProps = {
|
|
39
40
|
animationStyle: 'bounce',
|
|
@@ -70,7 +71,8 @@ export const GroupSelect_defaultProps = {
|
|
|
70
71
|
i18nKeys: {},
|
|
71
72
|
iconOnHover: false,
|
|
72
73
|
isLoading: false,
|
|
73
|
-
customProps: {}
|
|
74
|
+
customProps: {},
|
|
75
|
+
allowValueFallback: true
|
|
74
76
|
};
|
|
75
77
|
export const SelectWithAvatar_defaultProps = {
|
|
76
78
|
animationStyle: 'bounce',
|
|
@@ -93,7 +93,8 @@ export const Select_propTypes = {
|
|
|
93
93
|
positionsOffset: PropTypes.object,
|
|
94
94
|
targetOffset: PropTypes.object,
|
|
95
95
|
isRestrictScroll: PropTypes.bool,
|
|
96
|
-
dropBoxPortalId: PropTypes.string
|
|
96
|
+
dropBoxPortalId: PropTypes.string,
|
|
97
|
+
allowValueFallback: PropTypes.bool
|
|
97
98
|
};
|
|
98
99
|
export const GroupSelect_propTypes = {
|
|
99
100
|
groupedOptions: PropTypes.arrayOf(PropTypes.shape({
|
|
@@ -178,7 +179,8 @@ export const GroupSelect_propTypes = {
|
|
|
178
179
|
customProps: PropTypes.shape({
|
|
179
180
|
TextBoxProps: PropTypes.object,
|
|
180
181
|
TextBoxIconProps: PropTypes.object
|
|
181
|
-
})
|
|
182
|
+
}),
|
|
183
|
+
allowValueFallback: PropTypes.bool
|
|
182
184
|
};
|
|
183
185
|
export const SelectWithAvatar_propTypes = { ...Select_propTypes,
|
|
184
186
|
textBoxClass: PropTypes.string,
|
package/es/Tag/Tag.js
CHANGED
|
@@ -47,7 +47,7 @@ export default class Tag extends PureComponent {
|
|
|
47
47
|
e && e.preventDefault();
|
|
48
48
|
e.stopPropagation && e.stopPropagation();
|
|
49
49
|
e.nativeEvent.stopImmediatePropagation && e.nativeEvent.stopImmediatePropagation();
|
|
50
|
-
onRemove && onRemove(id);
|
|
50
|
+
onRemove && onRemove(id, e);
|
|
51
51
|
}
|
|
52
52
|
|
|
53
53
|
getRef(el) {
|
|
@@ -40,6 +40,8 @@ const getDisabledOptions = props => props.disabledOptions || dummyArray;
|
|
|
40
40
|
|
|
41
41
|
const getListItemProps = props => props.listItemProps || '';
|
|
42
42
|
|
|
43
|
+
const getAllowValueFallback = props => props.allowValueFallback !== false;
|
|
44
|
+
|
|
43
45
|
export const makeGetMultiSelectFilterSuggestions = () => createSelector([getOptions, getSelectedOptionsSel, getSearchStr, getNeedSearch, getIsStartWithSearch, getKeepSelectedOptions], (options, selectedOptions, searchStr, needSearch, isStartsWithSearch, keepSelectedOptions) => {
|
|
44
46
|
const suggestions = [];
|
|
45
47
|
const suggestionIds = [];
|
|
@@ -105,7 +107,7 @@ export const extractOptionId = id => {
|
|
|
105
107
|
}
|
|
106
108
|
};
|
|
107
109
|
export const extractOptionIdFromJson = (id, localData) => localData[id] || {};
|
|
108
|
-
export const makeFormatOptions = () => createSelector([getOptions, getValueField, getTextField, getImageField, getPrefixText, getIconName, getIconSize, getOptionType, getDisabledOptions, getListItemProps], (options, valueField, textField, imageField, prefixText, iconName, iconSize, optionType, disabledOptions, listItemProps) => {
|
|
110
|
+
export const makeFormatOptions = () => createSelector([getOptions, getValueField, getTextField, getImageField, getPrefixText, getIconName, getIconSize, getOptionType, getDisabledOptions, getListItemProps, getAllowValueFallback], (options, valueField, textField, imageField, prefixText, iconName, iconSize, optionType, disabledOptions, listItemProps, allowValueFallback) => {
|
|
109
111
|
const revampOptions = [];
|
|
110
112
|
const remvampOptionIds = [];
|
|
111
113
|
const normalizedAllOptions = {};
|
|
@@ -123,7 +125,7 @@ export const makeFormatOptions = () => createSelector([getOptions, getValueField
|
|
|
123
125
|
listItemProps: listStyle
|
|
124
126
|
} = option;
|
|
125
127
|
let id = typeof option === 'object' ? option[impValueField || valueField] : option;
|
|
126
|
-
const value = typeof option === 'object' ? option[impTextField || textField] : option;
|
|
128
|
+
const value = typeof option === 'object' ? option[impTextField || textField] : allowValueFallback ? option : '';
|
|
127
129
|
const photoURL = typeof option === 'object' ? option[impImageField || imageField] : ''; // grouping options (group select/MultiSelect)
|
|
128
130
|
|
|
129
131
|
id = !getIsEmptyValue(id) ? optionIdGrouping(id, prefixText) : '';
|
|
@@ -171,7 +173,7 @@ export const makeFormatOptions = () => createSelector([getOptions, getValueField
|
|
|
171
173
|
optionsOrder: remvampOptionIds
|
|
172
174
|
};
|
|
173
175
|
});
|
|
174
|
-
export const makeGetMultiSelectSelectedOptions = () => createSelector([getSelectedOptionsSel, getNormalizedFormatOptions, getSelectedOptionsLength], (selectedOptions, normalizedFormatOptions, selectedOptionsLength) => {
|
|
176
|
+
export const makeGetMultiSelectSelectedOptions = () => createSelector([getSelectedOptionsSel, getNormalizedFormatOptions, getSelectedOptionsLength, getAllowValueFallback], (selectedOptions, normalizedFormatOptions, selectedOptionsLength, allowValueFallback) => {
|
|
175
177
|
const output = [];
|
|
176
178
|
const revampSelectedOptions = [];
|
|
177
179
|
const normalizedSelectedOptions = {};
|
|
@@ -187,7 +189,8 @@ export const makeGetMultiSelectSelectedOptions = () => createSelector([getSelect
|
|
|
187
189
|
revampSelectedOptions.push(id);
|
|
188
190
|
output.push(normalizedFormatOptions[option]);
|
|
189
191
|
normalizedSelectedOptions[id] = normalizedFormatOptions[option];
|
|
190
|
-
} else if (getIsEmptyValue(id) && !getIsEmptyValue(option) && revampSelectedOptions.indexOf(option) === -1) {
|
|
192
|
+
} else if (allowValueFallback && getIsEmptyValue(id) && !getIsEmptyValue(option) && revampSelectedOptions.indexOf(option) === -1) {
|
|
193
|
+
//fallback case
|
|
191
194
|
const newObj = {
|
|
192
195
|
id: option,
|
|
193
196
|
value: option
|
|
@@ -261,7 +264,7 @@ export const makeObjectConcat = () => createSelector([getObj1, getObj2], (obj1,
|
|
|
261
264
|
const getGroupedOptions = props => props.groupedOptions || dummyArray;
|
|
262
265
|
|
|
263
266
|
const getFormatOptions = makeFormatOptions();
|
|
264
|
-
export const makeGetGroupSelectOptions = () => createSelector([getGroupedOptions], groupedOptions => {
|
|
267
|
+
export const makeGetGroupSelectOptions = () => createSelector([getGroupedOptions, getAllowValueFallback], (groupedOptions, allowValueFallback) => {
|
|
265
268
|
const revampedGroups = [];
|
|
266
269
|
let allOptionIds = [];
|
|
267
270
|
let allNormalizedOptions = {}; //all group normalized options
|
|
@@ -290,7 +293,8 @@ export const makeGetGroupSelectOptions = () => createSelector([getGroupedOptions
|
|
|
290
293
|
options,
|
|
291
294
|
valueField,
|
|
292
295
|
textField,
|
|
293
|
-
prefixText: groupId
|
|
296
|
+
prefixText: groupId,
|
|
297
|
+
allowValueFallback
|
|
294
298
|
});
|
|
295
299
|
|
|
296
300
|
if (optionsOrder.length) {
|
|
@@ -139,7 +139,7 @@ exports[`Button component Should render CustomStatusclassname of buttons - succe
|
|
|
139
139
|
class="overlay"
|
|
140
140
|
>
|
|
141
141
|
<div
|
|
142
|
-
class="
|
|
142
|
+
class="successstate"
|
|
143
143
|
>
|
|
144
144
|
<div
|
|
145
145
|
class="customStautusClassName successelement primarysuccess"
|
|
@@ -260,7 +260,7 @@ exports[`Button component Should render Status of buttons - success 1`] = `
|
|
|
260
260
|
class="overlay"
|
|
261
261
|
>
|
|
262
262
|
<div
|
|
263
|
-
class="
|
|
263
|
+
class="successstate"
|
|
264
264
|
>
|
|
265
265
|
<div
|
|
266
266
|
class="successelement primarysuccess"
|