@desynova-digital/components 9.1.2 → 9.1.4
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/atoms/icon/icons.json +48 -102
- package/molecules/filter/filter.js +88 -77
- package/package.json +2 -2
package/atoms/icon/icons.json
CHANGED
|
@@ -16,19 +16,23 @@
|
|
|
16
16
|
"height": 18
|
|
17
17
|
},
|
|
18
18
|
"arrow-left": {
|
|
19
|
-
"paths": [
|
|
20
|
-
"M16 7H3.83l5.59-5.59L8 0 0 8l8 8 1.41-1.41L3.83 9H16z"
|
|
21
|
-
],
|
|
19
|
+
"paths": ["M16 7H3.83l5.59-5.59L8 0 0 8l8 8 1.41-1.41L3.83 9H16z"],
|
|
22
20
|
"width": 16,
|
|
23
21
|
"height": 16
|
|
24
22
|
},
|
|
25
23
|
"double-arrow-right": {
|
|
26
|
-
"paths": [
|
|
24
|
+
"paths": [
|
|
25
|
+
"M4.78779 6.00001L0.251019 1.46324C-0.0836954 1.1285 -0.0836954 0.58579 0.251019 0.251049C0.585734 -0.083683 1.12848 -0.083683 1.46319 0.251049L6.60607 5.39391C6.9408 5.72866 6.9408 6.27137 6.60607 6.60611L1.46319 11.749C1.12848 12.0837 0.585734 12.0837 0.251019 11.749C-0.0836954 11.4142 -0.0836954 10.8715 0.251019 10.5368L4.78779 6.00001Z",
|
|
26
|
+
"M11.7878 6.00001L7.25102 1.46324C6.9163 1.1285 6.9163 0.58579 7.25102 0.251049C7.58573 -0.083683 8.12848 -0.083683 8.46319 0.251049L13.6061 5.39391C13.9408 5.72866 13.9408 6.27137 13.6061 6.60611L8.46319 11.749C8.12848 12.0837 7.58573 12.0837 7.25102 11.749C6.9163 11.4142 6.9163 10.8715 7.25102 10.5368L11.7878 6.00001Z"
|
|
27
|
+
],
|
|
27
28
|
"width": 14,
|
|
28
29
|
"height": 12
|
|
29
30
|
},
|
|
30
31
|
"double-arrow-left": {
|
|
31
|
-
"paths": [
|
|
32
|
+
"paths": [
|
|
33
|
+
"M2.07152 5.99999L6.60829 10.5368C6.94301 10.8715 6.94301 11.4142 6.60829 11.749C6.27358 12.0837 5.73084 12.0837 5.39612 11.749L0.253246 6.60609C-0.0814857 6.27134 -0.0814857 5.72863 0.253246 5.39389L5.39612 0.251037C5.73084 -0.0836782 6.27358 -0.0836782 6.60829 0.251037C6.94301 0.585752 6.94301 1.1285 6.60829 1.46321L2.07152 5.99999Z",
|
|
34
|
+
"M9.07152 5.99999L13.6083 10.5368C13.943 10.8715 13.943 11.4142 13.6083 11.749C13.2736 12.0837 12.7308 12.0837 12.3961 11.749L7.25325 6.60609C6.91851 6.27134 6.91851 5.72863 7.25325 5.39389L12.3961 0.251037C12.7308 -0.0836782 13.2736 -0.0836782 13.6083 0.251037C13.943 0.585752 13.943 1.1285 13.6083 1.46321L9.07152 5.99999Z"
|
|
35
|
+
],
|
|
32
36
|
"width": 14,
|
|
33
37
|
"height": 12
|
|
34
38
|
},
|
|
@@ -48,9 +52,7 @@
|
|
|
48
52
|
"height": 24
|
|
49
53
|
},
|
|
50
54
|
"chevron-down": {
|
|
51
|
-
"paths": [
|
|
52
|
-
"M16 0l8 8 10-10z"
|
|
53
|
-
],
|
|
55
|
+
"paths": ["M16 0l8 8 10-10z"],
|
|
54
56
|
"width": 14,
|
|
55
57
|
"height": 14,
|
|
56
58
|
"transform": "translate(-17,-2)"
|
|
@@ -162,9 +164,7 @@
|
|
|
162
164
|
"height": 17
|
|
163
165
|
},
|
|
164
166
|
"ingest-angle-right": {
|
|
165
|
-
"paths": [
|
|
166
|
-
"M.912 8.912L4.73 5.087.912 1.262 2.088.087l5 5-5 5z"
|
|
167
|
-
],
|
|
167
|
+
"paths": ["M.912 8.912L4.73 5.087.912 1.262 2.088.087l5 5-5 5z"],
|
|
168
168
|
"width": 8,
|
|
169
169
|
"height": 11
|
|
170
170
|
},
|
|
@@ -263,9 +263,7 @@
|
|
|
263
263
|
"height": 14
|
|
264
264
|
},
|
|
265
265
|
"angle-left": {
|
|
266
|
-
"paths": [
|
|
267
|
-
"M6 0 L0 6 L6 12"
|
|
268
|
-
],
|
|
266
|
+
"paths": ["M6 0 L0 6 L6 12"],
|
|
269
267
|
"width": 10,
|
|
270
268
|
"height": 20,
|
|
271
269
|
"transform": "translate(2, 2)",
|
|
@@ -273,9 +271,7 @@
|
|
|
273
271
|
"strokeWidth": 2
|
|
274
272
|
},
|
|
275
273
|
"angle-right": {
|
|
276
|
-
"paths": [
|
|
277
|
-
"M0 0 L6 6 L0 12"
|
|
278
|
-
],
|
|
274
|
+
"paths": ["M0 0 L6 6 L0 12"],
|
|
279
275
|
"width": 10,
|
|
280
276
|
"height": 20,
|
|
281
277
|
"transform": "translate(2, 2)",
|
|
@@ -283,10 +279,7 @@
|
|
|
283
279
|
"strokeWidth": 2
|
|
284
280
|
},
|
|
285
281
|
"angle-left-double": {
|
|
286
|
-
"paths": [
|
|
287
|
-
"M6 0 L0 6 L6 12",
|
|
288
|
-
"M12 0 L6 6 L12 12"
|
|
289
|
-
],
|
|
282
|
+
"paths": ["M6 0 L0 6 L6 12", "M12 0 L6 6 L12 12"],
|
|
290
283
|
"width": 20,
|
|
291
284
|
"height": 20,
|
|
292
285
|
"transform": "translate(2, 2)",
|
|
@@ -294,10 +287,7 @@
|
|
|
294
287
|
"strokeWidth": 2
|
|
295
288
|
},
|
|
296
289
|
"angle-right-double": {
|
|
297
|
-
"paths": [
|
|
298
|
-
"M0 0 L6 6 L0 12",
|
|
299
|
-
"M6 0 L12 6 L6 12"
|
|
300
|
-
],
|
|
290
|
+
"paths": ["M0 0 L6 6 L0 12", "M6 0 L12 6 L6 12"],
|
|
301
291
|
"width": 20,
|
|
302
292
|
"height": 20,
|
|
303
293
|
"transform": "translate(2, 2)",
|
|
@@ -305,30 +295,22 @@
|
|
|
305
295
|
"strokeWidth": 2
|
|
306
296
|
},
|
|
307
297
|
"angle-bottom": {
|
|
308
|
-
"paths": [
|
|
309
|
-
"M1.645 0L7 5.343 12.355 0 14 1.645l-7 7-7-7z"
|
|
310
|
-
],
|
|
298
|
+
"paths": ["M1.645 0L7 5.343 12.355 0 14 1.645l-7 7-7-7z"],
|
|
311
299
|
"width": 14,
|
|
312
300
|
"height": 9
|
|
313
301
|
},
|
|
314
302
|
"first-page": {
|
|
315
|
-
"paths": [
|
|
316
|
-
"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"
|
|
317
|
-
],
|
|
303
|
+
"paths": ["M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"],
|
|
318
304
|
"width": 24,
|
|
319
305
|
"height": 24
|
|
320
306
|
},
|
|
321
307
|
"last-page": {
|
|
322
|
-
"paths": [
|
|
323
|
-
"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"
|
|
324
|
-
],
|
|
308
|
+
"paths": ["M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"],
|
|
325
309
|
"width": 24,
|
|
326
310
|
"height": 24
|
|
327
311
|
},
|
|
328
312
|
"play": {
|
|
329
|
-
"paths": [
|
|
330
|
-
"M61 27 61 52.3333333 81 39.6666667z"
|
|
331
|
-
],
|
|
313
|
+
"paths": ["M61 27 61 52.3333333 81 39.6666667z"],
|
|
332
314
|
"width": 20,
|
|
333
315
|
"height": 26,
|
|
334
316
|
"transform": "translate(-60, -26)"
|
|
@@ -405,9 +387,7 @@
|
|
|
405
387
|
"height": 14
|
|
406
388
|
},
|
|
407
389
|
"send": {
|
|
408
|
-
"paths": [
|
|
409
|
-
"M.01 17.143L20 8.57.01 0 0 6.667 14.286 8.57 0 10.476z"
|
|
410
|
-
],
|
|
390
|
+
"paths": ["M.01 17.143L20 8.57.01 0 0 6.667 14.286 8.57 0 10.476z"],
|
|
411
391
|
"width": 20,
|
|
412
392
|
"height": 18
|
|
413
393
|
},
|
|
@@ -580,9 +560,7 @@
|
|
|
580
560
|
"height": 17
|
|
581
561
|
},
|
|
582
562
|
"check": {
|
|
583
|
-
"paths": [
|
|
584
|
-
"M5.09 9.636L1.274 5.818 0 7.091l5.09 5.09L16 1.274 14.727 0z"
|
|
585
|
-
],
|
|
563
|
+
"paths": ["M5.09 9.636L1.274 5.818 0 7.091l5.09 5.09L16 1.274 14.727 0z"],
|
|
586
564
|
"width": 16,
|
|
587
565
|
"height": 13
|
|
588
566
|
},
|
|
@@ -626,10 +604,7 @@
|
|
|
626
604
|
"fillRule": "evenodd"
|
|
627
605
|
},
|
|
628
606
|
"align_bottom": {
|
|
629
|
-
"paths": [
|
|
630
|
-
"M.5.5h23v15H.5z",
|
|
631
|
-
"M4 10v1.778h16V10z"
|
|
632
|
-
],
|
|
607
|
+
"paths": ["M.5.5h23v15H.5z", "M4 10v1.778h16V10z"],
|
|
633
608
|
"width": 24,
|
|
634
609
|
"height": 16
|
|
635
610
|
},
|
|
@@ -641,10 +616,7 @@
|
|
|
641
616
|
"height": 16
|
|
642
617
|
},
|
|
643
618
|
"align_top": {
|
|
644
|
-
"paths": [
|
|
645
|
-
"M.5.5h23v15H.5z",
|
|
646
|
-
"M4 4v1.778h16V4z"
|
|
647
|
-
],
|
|
619
|
+
"paths": ["M.5.5h23v15H.5z", "M4 4v1.778h16V4z"],
|
|
648
620
|
"width": 16,
|
|
649
621
|
"height": 16
|
|
650
622
|
},
|
|
@@ -656,10 +628,7 @@
|
|
|
656
628
|
"height": 16
|
|
657
629
|
},
|
|
658
630
|
"align_middle": {
|
|
659
|
-
"paths": [
|
|
660
|
-
"M.5.5h23v15H.5z",
|
|
661
|
-
"M4 7v1.778h16V7z"
|
|
662
|
-
],
|
|
631
|
+
"paths": ["M.5.5h23v15H.5z", "M4 7v1.778h16V7z"],
|
|
663
632
|
"width": 16,
|
|
664
633
|
"height": 16
|
|
665
634
|
},
|
|
@@ -699,9 +668,7 @@
|
|
|
699
668
|
"height": 15
|
|
700
669
|
},
|
|
701
670
|
"mute": {
|
|
702
|
-
"paths": [
|
|
703
|
-
"M0 5.556v6.666h4.444L10 17.778V0L4.444 5.556z"
|
|
704
|
-
],
|
|
671
|
+
"paths": ["M0 5.556v6.666h4.444L10 17.778V0L4.444 5.556z"],
|
|
705
672
|
"width": 10,
|
|
706
673
|
"height": 18
|
|
707
674
|
},
|
|
@@ -825,9 +792,7 @@
|
|
|
825
792
|
"height": 14
|
|
826
793
|
},
|
|
827
794
|
"expand": {
|
|
828
|
-
"paths": [
|
|
829
|
-
"M6 0 L0 6 L6 12"
|
|
830
|
-
],
|
|
795
|
+
"paths": ["M6 0 L0 6 L6 12"],
|
|
831
796
|
"width": 20,
|
|
832
797
|
"height": 14,
|
|
833
798
|
"transform": "translate(16, 4) rotate(90)",
|
|
@@ -835,9 +800,7 @@
|
|
|
835
800
|
"strokeWidth": 2
|
|
836
801
|
},
|
|
837
802
|
"collapse": {
|
|
838
|
-
"paths": [
|
|
839
|
-
"M0 0 L6 6 L0 12"
|
|
840
|
-
],
|
|
803
|
+
"paths": ["M0 0 L6 6 L0 12"],
|
|
841
804
|
"width": 20,
|
|
842
805
|
"height": 14,
|
|
843
806
|
"transform": "translate(16, 4) rotate(90)",
|
|
@@ -852,9 +815,7 @@
|
|
|
852
815
|
"height": 30
|
|
853
816
|
},
|
|
854
817
|
"filter": {
|
|
855
|
-
"paths": [
|
|
856
|
-
"M7 12h4v-2H7v2zM0 0v2h18V0H0zm3 7h12V5H3v2z"
|
|
857
|
-
],
|
|
818
|
+
"paths": ["M7 12h4v-2H7v2zM0 0v2h18V0H0zm3 7h12V5H3v2z"],
|
|
858
819
|
"width": 18,
|
|
859
820
|
"height": 12
|
|
860
821
|
},
|
|
@@ -955,9 +916,7 @@
|
|
|
955
916
|
"height": 22
|
|
956
917
|
},
|
|
957
918
|
"carousel": {
|
|
958
|
-
"paths": [
|
|
959
|
-
"M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"
|
|
960
|
-
],
|
|
919
|
+
"paths": ["M7 19h10V4H7v15zm-5-2h4V6H2v11zM18 6v11h4V6h-4z"],
|
|
961
920
|
"width": 24,
|
|
962
921
|
"height": 24
|
|
963
922
|
},
|
|
@@ -1040,9 +999,7 @@
|
|
|
1040
999
|
"height": 16
|
|
1041
1000
|
},
|
|
1042
1001
|
"long-arrow": {
|
|
1043
|
-
"paths": [
|
|
1044
|
-
"M0 5h14.17l-3.58-3.59L12 0l6 6-6 6-1.41-1.41L14.17 7H0z"
|
|
1045
|
-
],
|
|
1002
|
+
"paths": ["M0 5h14.17l-3.58-3.59L12 0l6 6-6 6-1.41-1.41L14.17 7H0z"],
|
|
1046
1003
|
"width": 18,
|
|
1047
1004
|
"height": 12
|
|
1048
1005
|
},
|
|
@@ -1076,9 +1033,7 @@
|
|
|
1076
1033
|
"height": 12
|
|
1077
1034
|
},
|
|
1078
1035
|
"delivery": {
|
|
1079
|
-
"paths": [
|
|
1080
|
-
"M.006 10.286L12 5.143.006 0 0 4l8.571 1.143L0 6.286z"
|
|
1081
|
-
],
|
|
1036
|
+
"paths": ["M.006 10.286L12 5.143.006 0 0 4l8.571 1.143L0 6.286z"],
|
|
1082
1037
|
"width": 12,
|
|
1083
1038
|
"height": 11
|
|
1084
1039
|
},
|
|
@@ -1217,25 +1172,19 @@
|
|
|
1217
1172
|
"height": 16
|
|
1218
1173
|
},
|
|
1219
1174
|
"text_position_top": {
|
|
1220
|
-
"paths": [
|
|
1221
|
-
"M0 0H24V16H0V0ZM2 2H22V14H2V2ZM4 5.77778V4H20V5.77778H4Z"
|
|
1222
|
-
],
|
|
1175
|
+
"paths": ["M0 0H24V16H0V0ZM2 2H22V14H2V2ZM4 5.77778V4H20V5.77778H4Z"],
|
|
1223
1176
|
"width": 24,
|
|
1224
1177
|
"height": 20,
|
|
1225
1178
|
"fillRule": "evenodd"
|
|
1226
1179
|
},
|
|
1227
1180
|
"text_position_center": {
|
|
1228
|
-
"paths": [
|
|
1229
|
-
"M0 0H24V16H0V0ZM2 2H22V14H2V2ZM4 8.77778V7H20V8.77778H4Z"
|
|
1230
|
-
],
|
|
1181
|
+
"paths": ["M0 0H24V16H0V0ZM2 2H22V14H2V2ZM4 8.77778V7H20V8.77778H4Z"],
|
|
1231
1182
|
"width": 24,
|
|
1232
1183
|
"height": 20,
|
|
1233
1184
|
"fillRule": "evenodd"
|
|
1234
1185
|
},
|
|
1235
1186
|
"text_position_bottom": {
|
|
1236
|
-
"paths": [
|
|
1237
|
-
"M0 0H24V16H0V0ZM2 2H22V14H2V2ZM4 11.7778V10H20V11.7778H4Z"
|
|
1238
|
-
],
|
|
1187
|
+
"paths": ["M0 0H24V16H0V0ZM2 2H22V14H2V2ZM4 11.7778V10H20V11.7778H4Z"],
|
|
1239
1188
|
"width": 24,
|
|
1240
1189
|
"height": 20,
|
|
1241
1190
|
"fillRule": "evenodd"
|
|
@@ -1387,10 +1336,7 @@
|
|
|
1387
1336
|
"height": 24
|
|
1388
1337
|
},
|
|
1389
1338
|
"publishing": {
|
|
1390
|
-
"paths": [
|
|
1391
|
-
"M15.5 5H11l5 7-5 7h4.5l5-7z",
|
|
1392
|
-
"M8.5 5H4l5 7-5 7h4.5l5-7z"
|
|
1393
|
-
],
|
|
1339
|
+
"paths": ["M15.5 5H11l5 7-5 7h4.5l5-7z", "M8.5 5H4l5 7-5 7h4.5l5-7z"],
|
|
1394
1340
|
"width": 24,
|
|
1395
1341
|
"height": 24
|
|
1396
1342
|
},
|
|
@@ -1431,9 +1377,7 @@
|
|
|
1431
1377
|
"height": 12
|
|
1432
1378
|
},
|
|
1433
1379
|
"triangle-carat": {
|
|
1434
|
-
"paths": [
|
|
1435
|
-
"M3.5 5.6001L7 9.77516e-05H0L3.5 5.6001Z"
|
|
1436
|
-
],
|
|
1380
|
+
"paths": ["M3.5 5.6001L7 9.77516e-05H0L3.5 5.6001Z"],
|
|
1437
1381
|
"width": 7,
|
|
1438
1382
|
"height": 6
|
|
1439
1383
|
},
|
|
@@ -1466,9 +1410,7 @@
|
|
|
1466
1410
|
"height": 13
|
|
1467
1411
|
},
|
|
1468
1412
|
"remove_small": {
|
|
1469
|
-
"paths": [
|
|
1470
|
-
"M6 0.929408H0V0.0722656H6V0.929408Z"
|
|
1471
|
-
],
|
|
1413
|
+
"paths": ["M6 0.929408H0V0.0722656H6V0.929408Z"],
|
|
1472
1414
|
"width": 6,
|
|
1473
1415
|
"height": 1
|
|
1474
1416
|
},
|
|
@@ -1699,18 +1641,22 @@
|
|
|
1699
1641
|
"height": 16
|
|
1700
1642
|
},
|
|
1701
1643
|
"down-chevron": {
|
|
1702
|
-
"paths": [
|
|
1703
|
-
"M5 5.83594L9.33013 1.46094H0.669873L5 5.83594Z"
|
|
1704
|
-
],
|
|
1644
|
+
"paths": ["M5 5.83594L9.33013 1.46094H0.669873L5 5.83594Z"],
|
|
1705
1645
|
"width": 10,
|
|
1706
1646
|
"height": 6
|
|
1707
1647
|
},
|
|
1708
1648
|
"home-icon": {
|
|
1709
|
-
"paths": [
|
|
1710
|
-
"M8 17V11H12V17H17V9H20L10 0L0 9H3V17H8Z"
|
|
1711
|
-
],
|
|
1649
|
+
"paths": ["M8 17V11H12V17H17V9H20L10 0L0 9H3V17H8Z"],
|
|
1712
1650
|
"width": 20,
|
|
1713
1651
|
"height": 17
|
|
1652
|
+
},
|
|
1653
|
+
"autosync-icon": {
|
|
1654
|
+
"paths": [
|
|
1655
|
+
"M2.164 4.564L1.6 4L0 5.6L1.6 7.2L2.164 6.636L1.532 6H7.6V5.2H1.532L2.164 4.564Z",
|
|
1656
|
+
"M5.83639 3.43288L6.40039 3.99688L8.00039 2.39688L6.40039 0.796875L5.83639 1.36087L6.46839 1.99688H0.400391V2.79688H6.46839L5.83639 3.43288Z"
|
|
1657
|
+
],
|
|
1658
|
+
"width": 8,
|
|
1659
|
+
"height": 8
|
|
1714
1660
|
}
|
|
1715
1661
|
}
|
|
1716
|
-
}
|
|
1662
|
+
}
|
|
@@ -33,12 +33,12 @@ function _callSuper(t, o, e) { return o = (0, _getPrototypeOf2["default"])(o), (
|
|
|
33
33
|
function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
|
|
34
34
|
var StyledFilterCompoment = _styledComponents["default"].div(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2["default"])(["\n position: relative;\n // width: 21px;\n // height: 62px;\n overflow: hidden;\n transition: width 0.6s ease;\n //z-index: 2;\n //width: 360px;\n overflow: visible;\n text-align: left;\n z-index: ", ";\n\n .filter-button {\n width: 30px;\n height: 30px;\n background: #121d28;\n border-radius: 50%;\n padding: 7px 7px;\n cursor: pointer;\n\n &.active,\n &:hover {\n path {\n transition: all 0.4s ease-out;\n }\n }\n\n &.active {\n path {\n fill: ", ";\n }\n }\n\n &:hover {\n path {\n fill: #fff;\n }\n }\n }\n\n .dashboard-filter-box {\n border-bottom: 1px #303f51 solid;\n padding: 4px 0px 0px 0;\n position: absolute;\n }\n\n .search-filter-list-box {\n display: flex;\n position: relative;\n /* padding: 10px 0px; */\n align-items: center;\n font-family: 'SFUIText-Medium';\n justify-content: flex-end;\n width: ", ";\n }\n\n .filter-message {\n font-size: 12px;\n font-family: 'SFUIText-Regular';\n color: #afb2ba;\n }\n span.chip-button {\n color: #fff;\n background: #303f51;\n color: #fff;\n margin: 5px;\n &:hover {\n color: ", ";\n }\n &.checked {\n background: ", ";\n color: #0c141d;\n &:hover {\n color: #0c141d;\n }\n }\n }\n\n .filter-list-box {\n & > span {\n color: rgb(99, 208, 199);\n font-size: 10px;\n margin-bottom: 0px;\n display: inline-block;\n }\n\n .list-holder {\n overflow: auto;\n a {\n top: 7px;\n }\n /* width */\n &::-webkit-scrollbar {\n width: 2px;\n height: 2px;\n }\n\n /* Track */\n &::-webkit-scrollbar-track {\n box-shadow: inset 0 0 5px #a6aab2;\n border-radius: 10px;\n }\n\n /* Handle */\n &::-webkit-scrollbar-thumb {\n background: ", ";\n border-radius: 10px;\n }\n\n /* Handle on hover */\n &::-webkit-scrollbar-thumb:hover {\n background: ", ";\n }\n\n & > div {\n // width: max-content;\n & > span {\n // margin-right: 5px;\n // background: ", ";\n // &:hover {\n // color: #fff;\n // }\n }\n }\n }\n }\n\n .filter-options-holder {\n margin-top: 5px;\n position: absolute;\n background: #182738;\n z-index: 2;\n font-family: 'SFUIText-Medium';\n padding: 15px;\n right: 0;\n\n .filter-group-title {\n color: #afb2ba;\n font-size: 10px;\n padding-bottom: 10px;\n color: #ffffff;\n text-transform: uppercase;\n }\n\n .filter-group-item-list {\n margin: 0px -5px 0px;\n .ardp-date-picker {\n display: inline-block;\n .label-text {\n color: #cccccc;\n font-size: 12px;\n transition: all 0.5s ease-in-out;\n cursor: pointer;\n &:hover {\n color: #fff;\n }\n }\n\n &.checked {\n .label-text {\n color: ", ";\n }\n }\n\n .calendar {\n right: -7px;\n width: 330px;\n padding: 15px;\n }\n }\n }\n\n .filter-group {\n padding: 15px 0px 10px;\n border-bottom: 1px solid #303f51;\n &:first-child {\n padding: 0px 0px 10px;\n }\n }\n\n button.filter-group-item {\n background-color: transparent;\n border: none;\n margin-right: 12px;\n cursor: pointer;\n transition: all 0.5s ease-in-out;\n color: #cccccc;\n font-size: 12px;\n padding: 3px 0px;\n &:focus {\n outline: none;\n }\n\n &:hover {\n color: #fff;\n }\n\n &.checked {\n color: ", ";\n }\n }\n\n .action-btn {\n margin: 0px;\n pointer-events: auto;\n border-radius: 999rem;\n box-shadow: none;\n padding: 0.5rem 0.7rem;\n }\n }\n"])), function (_ref) {
|
|
35
35
|
var isMenuOpen = _ref.isMenuOpen;
|
|
36
|
-
return isMenuOpen ?
|
|
36
|
+
return isMenuOpen ? "95" : "1";
|
|
37
37
|
}, function (props) {
|
|
38
38
|
return _tokens.colors[props.theme].filter.themeColor;
|
|
39
39
|
}, function (_ref2) {
|
|
40
40
|
var showSelectedFiltersAsChip = _ref2.showSelectedFiltersAsChip;
|
|
41
|
-
return showSelectedFiltersAsChip ?
|
|
41
|
+
return showSelectedFiltersAsChip ? "360px" : "30px";
|
|
42
42
|
}, function (props) {
|
|
43
43
|
return _tokens.colors[props.theme].filter.themeColor;
|
|
44
44
|
}, function (props) {
|
|
@@ -64,9 +64,9 @@ var ResetBtn = (0, _styledComponents["default"])(_button["default"])(_templateOb
|
|
|
64
64
|
});
|
|
65
65
|
var OverlayStyles = _styledComponents["default"].div(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2["default"])(["\n position: fixed;\n top: 0;\n left: 0;\n width: 100%;\n height: 100vh;\n background-color: rgba(0, 0, 0, 0.3);\n z-index: ", ";\n display: block;\n"])), function (_ref3) {
|
|
66
66
|
var isMenuOpen = _ref3.isMenuOpen;
|
|
67
|
-
return isMenuOpen ?
|
|
67
|
+
return isMenuOpen ? "94" : "0";
|
|
68
68
|
});
|
|
69
|
-
var UserIdDropdown = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n border-bottom: 1px solid #999999;\n\n .tags {\n padding-bottom: 2px;\n }\n input:focus {\n outline: none;\n }\n\n .input-filter {\n background: transparent;\n font-family:
|
|
69
|
+
var UserIdDropdown = _styledComponents["default"].div(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2["default"])(["\n border-bottom: 1px solid #999999;\n\n .tags {\n padding-bottom: 2px;\n }\n input:focus {\n outline: none;\n }\n\n .input-filter {\n background: transparent;\n font-family: \"SFUIText-Medium\";\n position: relative;\n width: 100%;\n display: block;\n border: none;\n color: #999999;\n }\n .user-dropdown {\n background-color: rgb(18, 29, 41);\n margin-top: 5px;\n border: 1px solid rgb(153, 153, 153);\n max-height: 200px;\n overflow: auto;\n position: absolute;\n width: 92%;\n z-index: 2;\n cursor: pointer;\n }\n\n .dropdown-options {\n font-family: SFUIText-Regular;\n font-size: 13px;\n line-height: normal;\n color: rgb(204, 204, 204);\n padding: 7px;\n :hover {\n background-color: ", ";\n color: rgb(255, 255, 255);\n }\n &.active {\n background-color: ", ";\n color: rgb(255, 255, 255);\n :hover {\n background-color: rgb(18, 29, 41);\n color: rgb(204, 204, 204);\n }\n }\n }\n"])), function (props) {
|
|
70
70
|
return _tokens.colors[props.theme].filter.rgbthemeColor;
|
|
71
71
|
}, function (props) {
|
|
72
72
|
return _tokens.colors[props.theme].filter.rgbthemeColor;
|
|
@@ -87,20 +87,21 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
87
87
|
label: optionItem.title // title of options inside the filters object
|
|
88
88
|
})))));
|
|
89
89
|
switch (groupItem.display_format) {
|
|
90
|
-
case
|
|
90
|
+
case "CheckboxGroup":
|
|
91
91
|
{
|
|
92
|
-
if (groupItem.select_type ===
|
|
92
|
+
if (groupItem.select_type === "select") {
|
|
93
93
|
// single select
|
|
94
94
|
var selected = selectedFiltersObj[groupItem.field] && selectedFiltersObj[groupItem.field].value === optionItem.field;
|
|
95
95
|
if (selected && groupItem.min_selection === 0) {
|
|
96
|
-
filters[groupItem.field].value =
|
|
97
|
-
filters.params[groupItem.field] =
|
|
96
|
+
filters[groupItem.field].value = "";
|
|
97
|
+
filters.params[groupItem.field] = "";
|
|
98
98
|
} else {
|
|
99
99
|
filters[groupItem.field].value = optionItem.field;
|
|
100
100
|
filters.params[groupItem.field] = optionItem.field;
|
|
101
101
|
}
|
|
102
102
|
} else {
|
|
103
103
|
// multiselect - array
|
|
104
|
+
|
|
104
105
|
var multiple = filters[groupItem.field].value || []; // initial from filters object
|
|
105
106
|
filters[groupItem.field].label = groupItem.title;
|
|
106
107
|
|
|
@@ -112,40 +113,50 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
112
113
|
var optionIndex = multiple.findIndex(function (item) {
|
|
113
114
|
return item === optionItem.field;
|
|
114
115
|
});
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
116
|
+
if (optionItem.field === "") {
|
|
117
|
+
multiple = [optionItem.field];
|
|
118
|
+
} else {
|
|
119
|
+
var maxSelection = typeof groupItem.max_selection === "number" ? groupItem.max_selection : groupItem.options.length;
|
|
120
|
+
if (optionIndex < 0 && multiple.length < maxSelection) {
|
|
121
|
+
multiple.push(optionItem.field);
|
|
122
|
+
} else if (optionIndex > -1 && !(groupItem.required && multiple.length === 1)) {
|
|
123
|
+
multiple.splice(optionIndex, 1);
|
|
124
|
+
}
|
|
125
|
+
var allIndex = multiple.findIndex(function (item) {
|
|
126
|
+
return item === "";
|
|
127
|
+
});
|
|
128
|
+
if (allIndex > -1) {
|
|
129
|
+
multiple.splice(allIndex, 1);
|
|
130
|
+
}
|
|
120
131
|
}
|
|
121
132
|
filters[groupItem.field].value = multiple;
|
|
122
133
|
}
|
|
123
134
|
break;
|
|
124
135
|
}
|
|
125
|
-
case
|
|
136
|
+
case "datepicker":
|
|
126
137
|
{
|
|
127
138
|
filters[groupItem.field].value.key = optionItem.field; // in date, this needs to be added for highlighting the selected filters
|
|
128
|
-
if (optionItem.field ===
|
|
139
|
+
if (optionItem.field === "date_range") {
|
|
129
140
|
_this.setState({
|
|
130
141
|
isSelectRangeSelected: true
|
|
131
142
|
}, function () {
|
|
132
143
|
filters[groupItem.field].value.fromDate = selectedFiltersObj[groupItem.field].value.fromDate;
|
|
133
144
|
filters[groupItem.field].value.toDate = selectedFiltersObj[groupItem.field].value.toDate;
|
|
134
145
|
});
|
|
135
|
-
} else if (optionItem.field ===
|
|
146
|
+
} else if (optionItem.field === "date") {
|
|
136
147
|
_this.setState({
|
|
137
148
|
isSelectDateSelected: true
|
|
138
149
|
}, function () {
|
|
139
150
|
filters[groupItem.field].value.fromDate = selectedFiltersObj[groupItem.field].value.fromDate;
|
|
140
151
|
filters[groupItem.field].value.toDate = selectedFiltersObj[groupItem.field].value.toDate;
|
|
141
152
|
});
|
|
142
|
-
} else if (optionItem.field ===
|
|
153
|
+
} else if (optionItem.field === "week") {
|
|
143
154
|
filters[groupItem.field].value.fromDate = _constants.WEEK_DATE;
|
|
144
155
|
filters[groupItem.field].value.toDate = _constants.CURRENT_DATE;
|
|
145
|
-
} else if (optionItem.field ===
|
|
156
|
+
} else if (optionItem.field === "month") {
|
|
146
157
|
filters[groupItem.field].value.fromDate = _constants.MONTH_DATE;
|
|
147
158
|
filters[groupItem.field].value.toDate = _constants.CURRENT_DATE;
|
|
148
|
-
} else if (optionItem.field ===
|
|
159
|
+
} else if (optionItem.field === "three_month") {
|
|
149
160
|
filters[groupItem.field].value.fromDate = _constants.THREE_MONTHS;
|
|
150
161
|
filters[groupItem.field].value.toDate = _constants.CURRENT_DATE;
|
|
151
162
|
} else {
|
|
@@ -155,7 +166,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
155
166
|
}
|
|
156
167
|
break;
|
|
157
168
|
}
|
|
158
|
-
case
|
|
169
|
+
case "input":
|
|
159
170
|
{
|
|
160
171
|
var selectedUserIds = _this.state.selectedUserIds;
|
|
161
172
|
var selectedUserIndex = selectedUserIds.findIndex(function (user) {
|
|
@@ -169,15 +180,15 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
169
180
|
});
|
|
170
181
|
var updatedUserid = updatedUserIds.reduce(function (updatedUserid, user) {
|
|
171
182
|
return "".concat(user.email_id, ", ").concat(updatedUserid);
|
|
172
|
-
},
|
|
183
|
+
}, "");
|
|
173
184
|
filters[groupItem.field] = updatedUserIds;
|
|
174
185
|
filters.params[groupItem.field] = updatedUserid;
|
|
175
|
-
_this._userFilterInput.current.value =
|
|
186
|
+
_this._userFilterInput.current.value = "";
|
|
176
187
|
}
|
|
177
188
|
default:
|
|
178
189
|
break;
|
|
179
190
|
}
|
|
180
|
-
_this.changeFilters(
|
|
191
|
+
_this.changeFilters("selected", filters);
|
|
181
192
|
});
|
|
182
193
|
/**
|
|
183
194
|
* This function performs action based on forAction on filters object
|
|
@@ -187,11 +198,11 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
187
198
|
(0, _defineProperty2["default"])(_this, "changeFilters", function (forAction, filters) {
|
|
188
199
|
var initialFilters = _this.props.initialFilters;
|
|
189
200
|
var newFilters = null;
|
|
190
|
-
if (forAction ===
|
|
201
|
+
if (forAction === "reset") {
|
|
191
202
|
newFilters = initialFilters;
|
|
192
|
-
} else if (forAction ===
|
|
203
|
+
} else if (forAction === "selected") {
|
|
193
204
|
newFilters = filters;
|
|
194
|
-
} else if (forAction ===
|
|
205
|
+
} else if (forAction === "previous") {
|
|
195
206
|
newFilters = _this.props.selectedFilters;
|
|
196
207
|
}
|
|
197
208
|
_this.setState({
|
|
@@ -199,7 +210,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
199
210
|
selectedFiltersFor: forAction,
|
|
200
211
|
autoSelectIndex: -1
|
|
201
212
|
}, function () {
|
|
202
|
-
if (forAction ===
|
|
213
|
+
if (forAction === "reset" || forAction === "previous") {
|
|
203
214
|
_this.applyFilters();
|
|
204
215
|
}
|
|
205
216
|
});
|
|
@@ -215,53 +226,53 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
215
226
|
// to highlight selected filters
|
|
216
227
|
(0, _defineProperty2["default"])(_this, "highlightSelectedFilters", function (element, option) {
|
|
217
228
|
var selectedFiltersObj = _this.state.selectedFiltersObj;
|
|
218
|
-
var selectedStyle =
|
|
229
|
+
var selectedStyle = "";
|
|
219
230
|
if (selectedFiltersObj[element.field]) {
|
|
220
|
-
if (element.select_type ===
|
|
221
|
-
if (element.field ===
|
|
231
|
+
if (element.select_type === "select") {
|
|
232
|
+
if (element.field === "date") {
|
|
222
233
|
/*
|
|
223
234
|
* for date we have value as Object which contains fromDate and toDate
|
|
224
235
|
* so we add "key" in that object and check based on that key
|
|
225
236
|
* key is nothing but the value of selected label
|
|
226
237
|
*/
|
|
227
|
-
selectedStyle = selectedFiltersObj[element.field].value.key === option.field ?
|
|
238
|
+
selectedStyle = selectedFiltersObj[element.field].value.key === option.field ? "checked" : "";
|
|
228
239
|
} else {
|
|
229
|
-
selectedStyle = selectedFiltersObj[element.field].value === option.field ?
|
|
240
|
+
selectedStyle = selectedFiltersObj[element.field].value === option.field ? "checked" : "";
|
|
230
241
|
}
|
|
231
|
-
} else if (element.select_type ===
|
|
232
|
-
selectedStyle = selectedFiltersObj[element.field].value.includes(option.field) ?
|
|
242
|
+
} else if (element.select_type === "multiselect") {
|
|
243
|
+
selectedStyle = selectedFiltersObj[element.field].value.includes(option.field) ? "checked" : "";
|
|
233
244
|
}
|
|
234
245
|
}
|
|
235
|
-
return
|
|
246
|
+
return "filter-group-item " + selectedStyle;
|
|
236
247
|
});
|
|
237
248
|
// this to render filter label based on selectedFiltersObj
|
|
238
249
|
(0, _defineProperty2["default"])(_this, "renderFilterDisplayLabels", function (element) {
|
|
239
250
|
var selectedFiltersObj = _this.state.selectedFiltersObj;
|
|
240
|
-
var label =
|
|
251
|
+
var label = "";
|
|
241
252
|
if (selectedFiltersObj && selectedFiltersObj[element.field]) {
|
|
242
|
-
if (element.select_type ===
|
|
243
|
-
label = selectedFiltersObj[element.field].value ? selectedFiltersObj[element.field].label :
|
|
253
|
+
if (element.select_type === "select") {
|
|
254
|
+
label = selectedFiltersObj[element.field].value ? selectedFiltersObj[element.field].label : "All"; // normal label - single select
|
|
244
255
|
|
|
245
|
-
if (element.field ===
|
|
256
|
+
if (element.field === "date") {
|
|
246
257
|
// eg. display like this Jan 10
|
|
247
258
|
var value = selectedFiltersObj[element.field].value;
|
|
248
259
|
var from = new Date(value ? value.fromDate : _constants.CURRENT_DATE);
|
|
249
260
|
var end = new Date(value ? value.toDate : _constants.CURRENT_DATE);
|
|
250
261
|
var fromattedFrom = "".concat(_constants.MONTHS[from.getMonth()], " ").concat(from.getDate());
|
|
251
262
|
var fromattedEnd = "".concat(_constants.MONTHS[end.getMonth()], " ").concat(end.getDate());
|
|
252
|
-
if (value.key ===
|
|
253
|
-
label =
|
|
254
|
-
} else if (value.key ===
|
|
263
|
+
if (value.key === "date_range" && !value.toDate && !value.fromDate) {
|
|
264
|
+
label = " - ";
|
|
265
|
+
} else if (value.key === "date_range" || value.key === "week" || value.key === "month" || value.key === "three_month") {
|
|
255
266
|
label = "".concat(fromattedFrom, " - ").concat(fromattedEnd);
|
|
256
267
|
} else {
|
|
257
268
|
label = fromattedEnd;
|
|
258
269
|
}
|
|
259
270
|
}
|
|
260
|
-
} else if (element.select_type ===
|
|
271
|
+
} else if (element.select_type === "multiselect") {
|
|
261
272
|
label = selectedFiltersObj[element.field].value.length;
|
|
262
273
|
}
|
|
263
274
|
}
|
|
264
|
-
return "".concat(element.title ===
|
|
275
|
+
return "".concat(element.title === "Date" ? "" : "".concat(element.title, ": ")).concat(label);
|
|
265
276
|
});
|
|
266
277
|
/**
|
|
267
278
|
* This function toggle filters menu - show & hide.
|
|
@@ -281,7 +292,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
281
292
|
}
|
|
282
293
|
});
|
|
283
294
|
(0, _defineProperty2["default"])(_this, "componentDidUpdate", function (prevProps, prevState, snapshot) {
|
|
284
|
-
if (_this.state.selectedFiltersFor ==
|
|
295
|
+
if (_this.state.selectedFiltersFor == "reset") {} else if (_this.state.selectedFiltersFor == "selected") {} else if (prevProps.selectedFilters && _this.state.selectedFiltersObj == null) {
|
|
285
296
|
_this.setState({
|
|
286
297
|
selectedFiltersObj: _this.props.selectedFilters
|
|
287
298
|
});
|
|
@@ -327,7 +338,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
327
338
|
refreshDashboard = _this$props.refreshDashboard,
|
|
328
339
|
tableLoadingActionFunc = _this$props.tableLoadingActionFunc;
|
|
329
340
|
_this.toggleFiltersMenu(false);
|
|
330
|
-
if (forData ===
|
|
341
|
+
if (forData === "reset") {
|
|
331
342
|
if (refreshDashboard && tableLoadingActionFunc) {
|
|
332
343
|
tableLoadingActionFunc(true);
|
|
333
344
|
refreshDashboard();
|
|
@@ -337,10 +348,10 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
337
348
|
showDropDownOptions: false,
|
|
338
349
|
selectedUserIds: []
|
|
339
350
|
}, function () {
|
|
340
|
-
applyFilters(_this.state.selectedFiltersObj,
|
|
351
|
+
applyFilters(_this.state.selectedFiltersObj, "reset");
|
|
341
352
|
});
|
|
342
353
|
}
|
|
343
|
-
} else if (forData ===
|
|
354
|
+
} else if (forData === "cancel") {
|
|
344
355
|
_this.setState({
|
|
345
356
|
selectedFiltersObj: _this.props.selectedFilters,
|
|
346
357
|
showDropDownOptions: false,
|
|
@@ -349,7 +360,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
349
360
|
// applyFilters(this.state.selectedFiltersObj);
|
|
350
361
|
});
|
|
351
362
|
} else {
|
|
352
|
-
applyFilters(selectedFiltersObj,
|
|
363
|
+
applyFilters(selectedFiltersObj, "apply");
|
|
353
364
|
}
|
|
354
365
|
});
|
|
355
366
|
/**
|
|
@@ -361,11 +372,11 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
361
372
|
var _this$state2 = _this.state,
|
|
362
373
|
selectedUserIds = _this$state2.selectedUserIds,
|
|
363
374
|
autoSelectIndex = _this$state2.autoSelectIndex;
|
|
364
|
-
if (autoSelectIndex === indx) return
|
|
375
|
+
if (autoSelectIndex === indx) return "dropdown-options active";else {
|
|
365
376
|
var index = selectedUserIds.findIndex(function (userObj) {
|
|
366
377
|
return userObj.user_id === user.user_id;
|
|
367
378
|
});
|
|
368
|
-
return index >= 0 ?
|
|
379
|
+
return index >= 0 ? "dropdown-options active" : "dropdown-options";
|
|
369
380
|
}
|
|
370
381
|
});
|
|
371
382
|
/**
|
|
@@ -384,7 +395,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
384
395
|
isSelectRangeSelected = _this$state3.isSelectRangeSelected;
|
|
385
396
|
var maxDate = _constants.CURRENT_DATE;
|
|
386
397
|
if (option.future_date_available) {
|
|
387
|
-
maxDate = new Date(
|
|
398
|
+
maxDate = new Date("12/31/2099").getTime() * _constants.CONVERT;
|
|
388
399
|
} else if (!isSelectRangeSelected && selectedFiltersObj[groupItem.field].value.fromDate + option.max_days * _constants.CONVERT < _constants.CURRENT_DATE) {
|
|
389
400
|
maxDate = selectedFiltersObj[groupItem.field].value.fromDate + option.max_days * _constants.CONVERT;
|
|
390
401
|
}
|
|
@@ -417,15 +428,15 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
417
428
|
className: "search-filter-list-box",
|
|
418
429
|
onClick: function onClick() {
|
|
419
430
|
_this.toggleFiltersMenu(!(isMenuOpen && !showSelectedFiltersAsChip));
|
|
420
|
-
_this.applyFilters(
|
|
431
|
+
_this.applyFilters("cancel");
|
|
421
432
|
if (isMenuOpen && !showSelectedFiltersAsChip) {
|
|
422
|
-
_this.applyFilters(
|
|
433
|
+
_this.applyFilters("cancel");
|
|
423
434
|
} else {
|
|
424
435
|
_this.toggleFiltersMenu(true);
|
|
425
436
|
}
|
|
426
437
|
}
|
|
427
438
|
}, !showSelectedFiltersAsChip && /*#__PURE__*/_react["default"].createElement("div", {
|
|
428
|
-
className: isMenuOpen ?
|
|
439
|
+
className: isMenuOpen ? "filter-button active" : "filter-button"
|
|
429
440
|
}, /*#__PURE__*/_react["default"].createElement(_icon["default"], {
|
|
430
441
|
name: "filter",
|
|
431
442
|
width: 16,
|
|
@@ -444,7 +455,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
444
455
|
key: item.text,
|
|
445
456
|
theme: _this.props.theme,
|
|
446
457
|
style: {
|
|
447
|
-
cursor:
|
|
458
|
+
cursor: "pointer"
|
|
448
459
|
},
|
|
449
460
|
className: "chip-button checked"
|
|
450
461
|
}, _this.renderFilterDisplayLabels(item));
|
|
@@ -459,7 +470,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
459
470
|
}, filterMessage && /*#__PURE__*/_react["default"].createElement("div", {
|
|
460
471
|
className: "filter-message"
|
|
461
472
|
}, filterMessage), filtersStructure && selectedFiltersObj ? filtersStructure.map(function (groupItem) {
|
|
462
|
-
if (groupItem.display_format ===
|
|
473
|
+
if (groupItem.display_format === "input") {
|
|
463
474
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
464
475
|
className: "filter-group",
|
|
465
476
|
key: groupItem.field
|
|
@@ -513,13 +524,13 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
513
524
|
}, groupItem.title), /*#__PURE__*/_react["default"].createElement("div", {
|
|
514
525
|
className: "filter-group-item-list"
|
|
515
526
|
}, groupItem.options.map(function (option) {
|
|
516
|
-
if (option.field ===
|
|
527
|
+
if (option.field === "date") {
|
|
517
528
|
return /*#__PURE__*/_react["default"].createElement(_datePicker["default"], {
|
|
518
529
|
theme: _this.props.theme,
|
|
519
530
|
label: /*#__PURE__*/_react["default"].createElement(_tag["default"], {
|
|
520
531
|
key: option.field,
|
|
521
532
|
theme: _this.props.theme,
|
|
522
|
-
className:
|
|
533
|
+
className: "chip-button " + _this.highlightSelectedFilters(groupItem, option)
|
|
523
534
|
}, option.title),
|
|
524
535
|
className: _this.highlightSelectedFilters(groupItem, option),
|
|
525
536
|
labelAsText: true,
|
|
@@ -538,25 +549,25 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
538
549
|
|
|
539
550
|
filters[groupItem.field].value.fromDate = date;
|
|
540
551
|
filters[groupItem.field].value.toDate = date;
|
|
541
|
-
filters[groupItem.field].value.key =
|
|
542
|
-
filters[groupItem.field].label = date ? "".concat(_constants.MONTHS[formattedFrom.getMonth()], " ").concat(formattedFrom.getDate(), " ") :
|
|
552
|
+
filters[groupItem.field].value.key = "date";
|
|
553
|
+
filters[groupItem.field].label = date ? "".concat(_constants.MONTHS[formattedFrom.getMonth()], " ").concat(formattedFrom.getDate(), " ") : "no selection";
|
|
543
554
|
_this.setState({
|
|
544
555
|
isSelectDateSelected: false
|
|
545
556
|
}, function () {
|
|
546
|
-
_this.changeFilters(
|
|
557
|
+
_this.changeFilters("selected", filters);
|
|
547
558
|
});
|
|
548
559
|
},
|
|
549
560
|
onCalendarOpen: function onCalendarOpen() {
|
|
550
561
|
_this.onSelection(groupItem, option);
|
|
551
562
|
}
|
|
552
563
|
});
|
|
553
|
-
} else if (option.field ===
|
|
564
|
+
} else if (option.field === "date_range") {
|
|
554
565
|
return /*#__PURE__*/_react["default"].createElement(_datePicker["default"], {
|
|
555
566
|
theme: _this.props.theme,
|
|
556
567
|
label: /*#__PURE__*/_react["default"].createElement(_tag["default"], {
|
|
557
568
|
key: option.field,
|
|
558
569
|
theme: _this.props.theme,
|
|
559
|
-
className:
|
|
570
|
+
className: "chip-button " + _this.highlightSelectedFilters(groupItem, option)
|
|
560
571
|
}, option.title),
|
|
561
572
|
className: _this.highlightSelectedFilters(groupItem, option),
|
|
562
573
|
labelAsText: true,
|
|
@@ -575,12 +586,12 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
575
586
|
var formattedEnd = date.to ? new Date(date.to) : null; // new Date(date.to || CURRENT_DATE);
|
|
576
587
|
filters[groupItem.field].value.fromDate = date.from;
|
|
577
588
|
filters[groupItem.field].value.toDate = date.to; // || CURRENT_DATE;
|
|
578
|
-
filters[groupItem.field].value.key =
|
|
579
|
-
filters[groupItem.field].label = date.from && date.to ? "".concat(_constants.MONTHS[formattedFrom.getMonth()], " ").concat(formattedFrom.getDate(), " - ").concat(_constants.MONTHS[formattedEnd.getMonth()], " ").concat(formattedEnd.getDate()) :
|
|
589
|
+
filters[groupItem.field].value.key = "date_range";
|
|
590
|
+
filters[groupItem.field].label = date.from && date.to ? "".concat(_constants.MONTHS[formattedFrom.getMonth()], " ").concat(formattedFrom.getDate(), " - ").concat(_constants.MONTHS[formattedEnd.getMonth()], " ").concat(formattedEnd.getDate()) : "no selection";
|
|
580
591
|
_this.setState({
|
|
581
592
|
isSelectRangeSelected: false
|
|
582
593
|
}, function () {
|
|
583
|
-
_this.changeFilters(
|
|
594
|
+
_this.changeFilters("selected", filters);
|
|
584
595
|
});
|
|
585
596
|
},
|
|
586
597
|
onCalendarOpen: function onCalendarOpen() {
|
|
@@ -591,7 +602,7 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
591
602
|
return /*#__PURE__*/_react["default"].createElement(_tag["default"], {
|
|
592
603
|
key: option.field,
|
|
593
604
|
theme: _this.props.theme,
|
|
594
|
-
className:
|
|
605
|
+
className: "chip-button " + _this.highlightSelectedFilters(groupItem, option),
|
|
595
606
|
onClick: function onClick() {
|
|
596
607
|
// first range picker false then
|
|
597
608
|
_this.setState({
|
|
@@ -605,16 +616,16 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
605
616
|
})));
|
|
606
617
|
}) : null, /*#__PURE__*/_react["default"].createElement("div", {
|
|
607
618
|
style: {
|
|
608
|
-
margin:
|
|
609
|
-
textAlign:
|
|
610
|
-
display:
|
|
619
|
+
margin: "15px 0px 0px",
|
|
620
|
+
textAlign: "center",
|
|
621
|
+
display: "flex"
|
|
611
622
|
}
|
|
612
623
|
}, /*#__PURE__*/_react["default"].createElement(ResetBtn, {
|
|
613
624
|
theme: _this.props.theme,
|
|
614
625
|
appearance: "cta",
|
|
615
626
|
onClick: function onClick() {
|
|
616
627
|
// this.toggleFiltersMenu(false);
|
|
617
|
-
_this.applyFilters(
|
|
628
|
+
_this.applyFilters("reset");
|
|
618
629
|
// this.changeFilters('reset', null);
|
|
619
630
|
}
|
|
620
631
|
}, "Reset"), /*#__PURE__*/_react["default"].createElement(ApplyBtn, {
|
|
@@ -686,19 +697,19 @@ var Filter = /*#__PURE__*/function (_Component) {
|
|
|
686
697
|
break;
|
|
687
698
|
default:
|
|
688
699
|
// eslint-disable-next-line no-console
|
|
689
|
-
console.log(
|
|
700
|
+
console.log("Default Case");
|
|
690
701
|
}
|
|
691
702
|
}
|
|
692
703
|
}
|
|
693
704
|
}, {
|
|
694
705
|
key: "componentDidMount",
|
|
695
706
|
value: function componentDidMount() {
|
|
696
|
-
document.body.addEventListener(
|
|
707
|
+
document.body.addEventListener("click", this.toggleDropDown);
|
|
697
708
|
}
|
|
698
709
|
}]);
|
|
699
710
|
}(_react.Component);
|
|
700
711
|
Filter.propTypes = {
|
|
701
|
-
theme: _propTypes["default"].oneOf([
|
|
712
|
+
theme: _propTypes["default"].oneOf(["light", "dark", "nexc"]),
|
|
702
713
|
applyFilters: _propTypes["default"].func,
|
|
703
714
|
refreshDashboard: _propTypes["default"].func,
|
|
704
715
|
tableLoadingActionFunc: _propTypes["default"].func,
|
|
@@ -710,7 +721,7 @@ Filter.propTypes = {
|
|
|
710
721
|
showSelectedFiltersAsChip: _propTypes["default"].bool
|
|
711
722
|
};
|
|
712
723
|
Filter.defaultProps = {
|
|
713
|
-
width:
|
|
714
|
-
theme:
|
|
724
|
+
width: "360px",
|
|
725
|
+
theme: "dark"
|
|
715
726
|
};
|
|
716
727
|
var _default = exports["default"] = Filter;
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@desynova-digital/components",
|
|
3
|
-
"version": "9.1.
|
|
3
|
+
"version": "9.1.4",
|
|
4
4
|
"description": "Components for Desynova Digital",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"author": "desynova-digital",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"repository": "desynova-digital",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"@desynova-digital/tokens": "9.1.
|
|
10
|
+
"@desynova-digital/tokens": "9.1.4",
|
|
11
11
|
"prop-types": "^15.7.2",
|
|
12
12
|
"styled-components": "^4.3.2"
|
|
13
13
|
},
|