intelicoreact 0.0.63 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.js +6 -2
  2. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +91 -60
  3. package/dist/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +2 -1
  4. package/dist/Atomic/FormElements/Dropdown/Dropdown.js +48 -17
  5. package/dist/Atomic/FormElements/Dropdown/Dropdown.scss +21 -3
  6. package/dist/Atomic/FormElements/Dropdown/Dropdown.stories.js +22 -6
  7. package/dist/Atomic/FormElements/Input/Input.js +15 -4
  8. package/dist/Atomic/FormElements/Input/Input.stories.js +7 -1
  9. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.js +33 -50
  10. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.scss +98 -73
  11. package/dist/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +6 -2
  12. package/dist/Atomic/FormElements/InputDateRange/components/Datepicker.js +10 -7
  13. package/dist/Atomic/FormElements/InputDateRange/components/OpenedPart.js +5 -3
  14. package/dist/Atomic/FormElements/InputDateRange/components/SelectItem.js +3 -3
  15. package/dist/Atomic/FormElements/InputDateRange/dependencies.js +15 -7
  16. package/dist/Atomic/FormElements/RangeCalendar/RangeCalendar.js +7 -2
  17. package/dist/Atomic/FormElements/Table/Table.scss +1 -1
  18. package/dist/Atomic/FormElements/Textarea/Textarea.scss +1 -1
  19. package/dist/Atomic/MainMenu/MainMenu.scss +2 -2
  20. package/dist/Atomic/UI/Accordion/Accordion.scss +2 -2
  21. package/dist/Atomic/UI/Arrow/Arrow.js +7 -8
  22. package/dist/Atomic/UI/Calendar/Calendar.js +3 -2
  23. package/dist/Atomic/UI/Calendar/Calendar.stories.js +3 -2
  24. package/dist/Atomic/UI/Status/Status.scss +1 -1
  25. package/dist/Molecular/Datepicker/Datepicker.js +451 -0
  26. package/dist/Molecular/Datepicker/Datepicker.scss +8 -0
  27. package/dist/Molecular/Datepicker/Datepicker.stories.js +44 -0
  28. package/dist/Molecular/Datepicker/components/Calendar.js +156 -0
  29. package/dist/scss/_vars.scss +3 -1
  30. package/dist/scss/main.scss +1 -1
  31. package/package.json +6 -4
  32. package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.js +12 -2
  33. package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.scss +91 -60
  34. package/src/Atomic/FormElements/CheckboxInput/CheckboxInput.stories.js +4 -3
  35. package/src/Atomic/FormElements/Dropdown/Dropdown.js +53 -19
  36. package/src/Atomic/FormElements/Dropdown/Dropdown.scss +21 -3
  37. package/src/Atomic/FormElements/Dropdown/Dropdown.stories.js +28 -15
  38. package/src/Atomic/FormElements/Input/Input.js +4 -0
  39. package/src/Atomic/FormElements/Input/Input.stories.js +7 -1
  40. package/src/Atomic/FormElements/InputDateRange/InputDateRange.js +28 -48
  41. package/src/Atomic/FormElements/InputDateRange/InputDateRange.scss +98 -73
  42. package/src/Atomic/FormElements/InputDateRange/InputDateRange.stories.js +26 -23
  43. package/src/Atomic/FormElements/InputDateRange/components/Datepicker.js +6 -3
  44. package/src/Atomic/FormElements/InputDateRange/components/OpenedPart.js +4 -2
  45. package/src/Atomic/FormElements/InputDateRange/components/SelectItem.js +1 -1
  46. package/src/Atomic/FormElements/InputDateRange/dependencies.js +14 -6
  47. package/src/Atomic/FormElements/RangeCalendar/RangeCalendar.js +5 -2
  48. package/src/Atomic/FormElements/Table/Table.scss +1 -1
  49. package/src/Atomic/FormElements/Textarea/Textarea.scss +1 -1
  50. package/src/Atomic/MainMenu/MainMenu.scss +2 -2
  51. package/src/Atomic/UI/Accordion/Accordion.scss +2 -2
  52. package/src/Atomic/UI/Arrow/Arrow.js +5 -5
  53. package/src/Atomic/UI/Calendar/Calendar.js +2 -2
  54. package/src/Atomic/UI/Calendar/Calendar.stories.js +2 -1
  55. package/src/Atomic/UI/Status/Status.scss +1 -1
  56. package/src/Molecular/Datepicker/Datepicker.js +346 -0
  57. package/src/Molecular/Datepicker/Datepicker.scss +8 -0
  58. package/src/Molecular/Datepicker/Datepicker.stories.js +27 -0
  59. package/src/Molecular/Datepicker/components/Calendar.js +118 -0
  60. package/src/scss/_vars.scss +3 -1
  61. package/src/scss/main.scss +1 -1
  62. package/dist/scss/anme/_anme-bootstrap-grid.scss +0 -748
  63. package/dist/scss/anme/_anme-elements.scss +0 -269
  64. package/dist/scss/anme/_anme-grid.scss +0 -111
  65. package/dist/scss/anme/_anme-justify.scss +0 -111
  66. package/dist/scss/anme/_anme-mixins-media.scss +0 -116
  67. package/dist/scss/anme/_anme-mixins.scss +0 -166
  68. package/dist/scss/anme/_anme-normalize.scss +0 -8
  69. package/dist/scss/anme/_anme-overall.scss +0 -34
  70. package/dist/scss/anme/_anme-padding-margins.scss +0 -419
  71. package/dist/scss/anme/_anme-table.scss +0 -81
  72. package/dist/scss/anme/_anme-theme.scss +0 -275
  73. package/dist/scss/anme/_anme-vars.scss +0 -91
  74. package/dist/scss/anme/_code-styling.scss +0 -23
  75. package/dist/scss/anme/styles.scss +0 -12
  76. package/src/scss/anme/_anme-bootstrap-grid.scss +0 -748
  77. package/src/scss/anme/_anme-elements.scss +0 -269
  78. package/src/scss/anme/_anme-grid.scss +0 -111
  79. package/src/scss/anme/_anme-justify.scss +0 -111
  80. package/src/scss/anme/_anme-mixins-media.scss +0 -116
  81. package/src/scss/anme/_anme-mixins.scss +0 -166
  82. package/src/scss/anme/_anme-normalize.scss +0 -8
  83. package/src/scss/anme/_anme-overall.scss +0 -34
  84. package/src/scss/anme/_anme-padding-margins.scss +0 -419
  85. package/src/scss/anme/_anme-table.scss +0 -81
  86. package/src/scss/anme/_anme-theme.scss +0 -275
  87. package/src/scss/anme/_anme-vars.scss +0 -91
  88. package/src/scss/anme/_code-styling.scss +0 -23
  89. package/src/scss/anme/styles.scss +0 -12
@@ -1,23 +1,24 @@
1
1
  :root {
2
- --input-height: 26px;
2
+ --input-height: 28px;
3
3
  --label-line-height: 16px;
4
4
  // --border-color: rgba(0, 0, 0, 0.3);
5
- --border-color: #e2e5ec;
5
+ --border-color: #E2E5EC;
6
6
  --calendar-range-point-color: #6b81dd;
7
- --font-size: 12px;
7
+ --font-family: 'Roboto';
8
+ --font-size: 13px;
8
9
  --line-height: 20px;
9
- --border-radius: 4px;
10
+ --border-radius: 3px;
10
11
  }
11
12
 
12
13
  .date-range-input {
13
- position: relative;
14
- width: 430px;
15
- height: calc(var(--input-height) + var(--label-line-height));
14
+ /*position: relative;
15
+ width: 335px;
16
+ //height: calc(var(--input-height) + var(--label-line-height));
16
17
 
17
18
  display: flex;
18
19
  flex-flow: column nowrap;
19
20
  justify-content: flex-end;
20
- align-items: flex-start;
21
+ align-items: flex-start;*/
21
22
 
22
23
  input::-webkit-outer-spin-button,
23
24
  input::-webkit-inner-spin-button {
@@ -26,6 +27,7 @@
26
27
 
27
28
  &__label {
28
29
  margin-bottom: 2px;
30
+ font-family: var(--font-family);
29
31
  font-size: var(--font-size);
30
32
  line-height: var(--label-line-height);
31
33
  }
@@ -48,11 +50,11 @@
48
50
  flex-flow: column nowrap;
49
51
  justify-content: flex-start;
50
52
  align-items: flex-start;
51
-
53
+
52
54
  background: transparent;
53
55
  z-index: 1;
54
56
 
55
-
57
+
56
58
  &_right-position {
57
59
  left: auto;
58
60
  right: 0;
@@ -70,7 +72,7 @@
70
72
  flex-flow: row nowrap;
71
73
  justify-content: flex-end;
72
74
  align-items: flex-start;
73
-
75
+
74
76
  background: #FFFFFF;
75
77
  border: 1px solid var(--border-color);
76
78
  }
@@ -86,7 +88,7 @@
86
88
  width: 100%;
87
89
  height: 100%;
88
90
  padding: 0 10px;
89
-
91
+
90
92
  display: flex;
91
93
  flex-direction: row;
92
94
  flex-flow: row nowrap;
@@ -95,10 +97,10 @@
95
97
 
96
98
  cursor: pointer;
97
99
  }
98
-
100
+
99
101
  &__interval-key {
100
102
  display: inline-block;
101
- margin-right: 10px;
103
+ margin-right: 5px;
102
104
  text-transform: capitalize;
103
105
  white-space: nowrap;
104
106
  text-align: left;
@@ -224,17 +226,21 @@
224
226
 
225
227
  text-transform: capitalize;
226
228
  white-space: nowrap;
229
+ font-style: normal;
230
+ font-weight: 300;
231
+ font-family: var(--font-family);
227
232
  font-size: var(--font-size);
228
233
  line-height: var(--line-height);
229
234
  cursor: pointer;
230
-
235
+
231
236
  display: flex;
232
237
  flex-flow: row nowrap;
233
238
  justify-content: flex-start;
234
239
  align-items: center;
235
240
 
236
241
  &:hover {
237
- background-color: rgba(128, 128, 128, 0.1);
242
+ // background-color: rgba(128, 128, 128, 0.1);
243
+ background-color: #F2F2F8;
238
244
  }
239
245
 
240
246
  &-icon-active {
@@ -265,8 +271,9 @@
265
271
  box-sizing: border-box;
266
272
  width: 100%;
267
273
  height: fit-content;
268
- padding: 5px;
274
+ padding: 7.5px 15px;
269
275
  border: none;
276
+ background-color: #F7FAFC;
270
277
 
271
278
  display: flex;
272
279
  flex-flow: column nowrap;
@@ -285,6 +292,7 @@
285
292
  line-height: var(--line-height);
286
293
 
287
294
  &>div:not(.date-picker__inputs-separator) {
295
+ width: 110px;
288
296
  height: 100%;
289
297
  margin-right: 9px;
290
298
 
@@ -307,6 +315,11 @@
307
315
  }
308
316
  }
309
317
 
318
+ &>div.dropdown {
319
+ width: 80px;
320
+ border-radius: var(--border-radius);
321
+ }
322
+
310
323
  .date-picker__inputs-separator {
311
324
  margin-right: 9px;
312
325
  }
@@ -317,12 +330,13 @@
317
330
  width: fit-content;
318
331
  height: fit-content;
319
332
  padding: 3px 10px;
333
+ border-radius: var(--border-radius);
320
334
 
321
- font-family: inherit;
322
- font-style: inherit;
323
- font-weight: inherit;
324
- font-size: inherit;
325
- line-height: inherit;
335
+ font-family: var(--font-family);
336
+ font-style: normal;
337
+ font-weight: 300;
338
+ font-size: var(--font-size);
339
+ line-height: var(--input-height);
326
340
  letter-spacing: inherit;
327
341
  color: inherit;
328
342
  }
@@ -331,7 +345,7 @@
331
345
  width: 70px;
332
346
  height: fit-content;
333
347
  border-radius: var(--border-radius);
334
-
348
+
335
349
  &>.dropdown__trigger {
336
350
  width: 100%;
337
351
  height: 100%;
@@ -399,45 +413,49 @@
399
413
  box-sizing: border-box;
400
414
  width: fit-content;
401
415
  height: fit-content;
402
-
416
+
403
417
  &-header {
404
418
  height: fit-content;
405
419
  margin-bottom: 12px;
406
420
 
407
421
  font-size: calc(var(--font-size) + 2px);
408
422
  line-height: calc(var(--line-height) + 4px);
409
-
423
+
424
+ font-style: normal;
425
+ font-weight: 500;
426
+
410
427
  display: flex;
411
428
  justify-content: space-between;
412
429
  align-items: center;
413
-
430
+
414
431
  &__title {
415
432
  text-align: center;
416
433
  }
417
-
434
+
418
435
  &__next, &__prev {
436
+ background-color: transparent;
419
437
  cursor: pointer;
420
438
  }
421
439
  }
422
-
440
+
423
441
  &__week {
424
442
  display: flex;
425
-
443
+
426
444
  &-title {
427
445
  margin-bottom: 5px;
428
446
  }
429
447
  }
430
-
448
+
431
449
  &__day {
432
450
  position: relative;
433
451
  box-sizing: border-box;
434
- width: 36px;
435
- height: 24px;
452
+ width: 29px;
453
+ height: 22px;
436
454
  margin: 1px 0;
437
455
  flex-grow: 1;
438
456
  flex-basis: 0;
439
457
  user-select: none;
440
-
458
+
441
459
  display: flex;
442
460
  justify-content: center;
443
461
  align-items: center;
@@ -445,80 +463,80 @@
445
463
  font-size: var(--font-size);
446
464
  line-height: var(--line-height);
447
465
  text-align: center;
448
-
466
+
449
467
  &--clickable {
450
468
  cursor: pointer;
451
-
469
+
452
470
  &:hover {
453
471
  background: #E2E6F8;
454
472
  }
455
473
  }
456
-
474
+
457
475
  &--disabled {
458
476
  cursor: default;
459
477
  opacity: 0.2;
460
478
  pointer-events: none;
461
-
462
- &:hover {
463
- background: inherit;
464
- }
465
- }
466
-
467
- &--range-end {
468
- background: #EAF2FF;
469
- border: 1px solid #EAF2FF;
470
- border-radius: 0 24px 24px 0;
471
- color: var(--calendar-range-point-color);
472
-
473
- &::before {
474
- content: '';
475
- display: block;
476
- width: 100%;
477
- height: 100%;
478
- box-sizing: border-box;
479
- position: absolute;
480
- border: 1px solid var(--calendar-range-point-color);
481
- border-radius: 24px;
482
- pointer-events: none;
483
- }
484
479
 
485
480
  &:hover {
486
- color: #F8FBFF;
487
- background-color: var(--calendar-range-point-color);
488
- border-radius: 24px;
481
+ background: inherit;
489
482
  }
490
483
  }
491
484
 
492
- &--range-start {
485
+ // &--range-end {
486
+ // background: #EAF2FF;
487
+ // border: 1px solid #EAF2FF;
488
+ // border-radius: 0 24px 24px 0;
489
+ // color: var(--calendar-range-point-color);
490
+
491
+ // &::before {
492
+ // content: '';
493
+ // display: block;
494
+ // width: 100%;
495
+ // height: 100%;
496
+ // box-sizing: border-box;
497
+ // position: absolute;
498
+ // border: 1px solid var(--calendar-range-point-color);
499
+ // border-radius: 24px;
500
+ // pointer-events: none;
501
+ // }
502
+
503
+ // &:hover {
504
+ // color: #F8FBFF;
505
+ // background-color: var(--calendar-range-point-color);
506
+ // border-radius: 24px;
507
+ // }
508
+ // }
509
+
510
+ &--range-start, &--range-end {
493
511
  background: var(--calendar-range-point-color);
494
512
  border: 1px solid var(--calendar-range-point-color);
495
513
  box-sizing: border-box;
496
- border-radius: 24px;
514
+ border-radius: var(--border-radius);
497
515
  color: #F8FBFF;
498
-
516
+
499
517
  &:hover {
500
518
  background: var(--calendar-range-point-color);
501
519
  color: #F8FBFF;
502
520
  }
503
521
  }
504
-
522
+
505
523
  &--range-inside {
506
524
  background: #EAF2FF;
507
525
  }
508
-
526
+
509
527
  &--prev-range-end {
510
528
  background: #E2E5EC;
511
529
  border-radius: var(--border-radius);
512
530
  }
513
-
531
+
514
532
  &--prev-range-inside {
515
533
  background: #F7F8FA;
516
534
  }
517
-
535
+
518
536
  &--title {
519
- font-size: calc(var(--font-size) + 2px);
520
- line-height: calc(var(--line-height) + 4px);
521
-
537
+ font-size: var(--font-size);
538
+ line-height: var(--line-height);
539
+
522
540
  &:hover {
523
541
  background: inherit;
524
542
  }
@@ -533,6 +551,7 @@
533
551
  padding: 8px 16px;
534
552
  border-radius: 0 0 var(--border-radius) 0;
535
553
  border: none;
554
+ background-color: #F7FAFC;
536
555
 
537
556
  display: flex;
538
557
  flex-flow: row nowrap;
@@ -552,12 +571,18 @@
552
571
 
553
572
  &__button {
554
573
  text-transform: capitalize;
555
-
574
+
556
575
  &:first-child {
576
+ width: 80px;
557
577
  margin-right: 16px;
578
+ background-color: #FFFFFF;
579
+ border: 1px solid #A6ACB1;
580
+ border-radius: var(--border-radius);
558
581
  }
559
582
 
560
583
  &:last-child {
584
+ width: 110px;
585
+ border-radius: var(--border-radius);
561
586
  }
562
587
  }
563
588
 
@@ -1,5 +1,6 @@
1
- import React, { useState } from 'react';
1
+ import React, { /* useEffect, */ useState } from 'react';
2
2
  import InputDateRange from './InputDateRange';
3
+ import Table from '../Table/Table';
3
4
 
4
5
  global.lng = 'en';
5
6
 
@@ -19,6 +20,7 @@ export default {
19
20
  const Template = args => {
20
21
  const { dateRange, ...restOfProps } = args;
21
22
  const [value, setValue] = useState(dateRange);
23
+ // useEffect(() => console.log(value), [value]);
22
24
 
23
25
  // return <InputDateRange {...restOfProps} value={value} onChange={setValue} />;
24
26
  return (
@@ -33,26 +35,27 @@ const Template = args => {
33
35
  export const InputDateRangeTemplate = Template.bind({});
34
36
 
35
37
  InputDateRangeTemplate.args = {
36
- txt: {},
37
- buttonsTypes: {
38
- // apply: 'ellipse-apply',
39
- cancel: 'bark-outline'
40
- },
41
- label: 'Date Range',
42
- dateRange: { intervalKey: 'today'},
43
- id: 'anyToggleButtonId',
44
- className: 'anyExternalContainerClassName',
45
- error: false,
46
- disabled: false,
47
- isHoverable: false,
48
- // short: true,
49
- isCompact: false,
50
- // isFocused: true,
51
- isIntervalsHidden: false,
52
- isCompareHidden: true,
53
- hideArrows: false,
54
- isOptionsRight: false,
55
- // limitRange,
56
- // isUseAbs,
57
- // absTooltip
38
+ txt: {},
39
+ buttonsTypes: {
40
+ // apply: 'ellipse-apply',
41
+ cancel: 'bark-outline'
42
+ },
43
+ label: 'Date Range',
44
+ dateRange: { intervalKey: 'today' },
45
+ id: 'anyToggleButtonId',
46
+ className: 'anyExternalContainerClassName',
47
+ error: false,
48
+ disabled: false,
49
+ isHoverable: false,
50
+ // short: true,
51
+ isCompact: false,
52
+ // isFocused: true,
53
+ isIntervalsHidden: false,
54
+ isCompareHidden: true,
55
+ hideArrows: false,
56
+ isOptionsRight: false,
57
+ isShortWeekNames: false
58
+ // limitRange,
59
+ // isUseAbs,
60
+ // absTooltip
58
61
  };
@@ -40,7 +40,8 @@ const Datepicker = props => {
40
40
  isCompareHidden,
41
41
  limitRange,
42
42
  handleItemClick,
43
- setActiveInterval
43
+ setActiveInterval,
44
+ isShortWeekNames
44
45
  } = props;
45
46
  const { start = null, end = null, compare = false } = values;
46
47
  const startDateInputRef = useRef(null);
@@ -306,7 +307,7 @@ const Datepicker = props => {
306
307
  onFocus={handleStartDateFocus}
307
308
  onBlur={handleStartDateBlur}
308
309
  onKeyUp={(code, e) => handleKeyPressed(code, e, 'start')}
309
- ref={startDateInputRef}
310
+ //ref={startDateInputRef}
310
311
  // mask={moment(startDate).format('L').replace(/[0-9]/g, '9')}
311
312
  />
312
313
  <SelectInput
@@ -328,7 +329,7 @@ const Datepicker = props => {
328
329
  onFocus={handleEndDateFocus}
329
330
  onBlur={handleEndDateBlur}
330
331
  onKeyUp={(code, e) => handleKeyPressed(code, e, 'end')}
331
- ref={endDateInputRef}
332
+ //ref={endDateInputRef}
332
333
  />
333
334
  <SelectInput
334
335
  dataTest="datepicker_end-hour-select-input"
@@ -362,6 +363,7 @@ const Datepicker = props => {
362
363
  onClick={handleClick}
363
364
  onHover={handleHover}
364
365
  limitRange={limitRange}
366
+ isShortWeekNames={isShortWeekNames}
365
367
  />
366
368
  <Calendar
367
369
  className="date-picker__calendar"
@@ -374,6 +376,7 @@ const Datepicker = props => {
374
376
  endPrevDate={endPrevDate}
375
377
  onClick={handleClick}
376
378
  onHover={handleHover}
379
+ isShortWeekNames={isShortWeekNames}
377
380
  />
378
381
  </div>
379
382
  </div>
@@ -2,7 +2,7 @@ import React, {useEffect, useState} from 'react';
2
2
  import moment from 'moment-timezone';
3
3
  import cn from 'classnames';
4
4
 
5
- import {INTERVALS as intervals, CUSTOM_INTERVAL_KEY as customKey } from '../dependencies';
5
+ import {INTERVALS as intervals, CUSTOM_INTERVAL_KEY as customKey, CUSTOM_INTERVAL_KEY_TEXT } from '../dependencies';
6
6
 
7
7
  import SelectItem from './SelectItem';
8
8
  import Datepicker from './Datepicker';
@@ -25,6 +25,7 @@ const OpenedPart = React.forwardRef((props, ref) => {
25
25
  isCompare,
26
26
  setIsCompare,
27
27
  toggleOff,
28
+ isShortWeekNames
28
29
  } = props;
29
30
 
30
31
  const items = isCompact ? [...Object.keys(intervals)] : [...Object.keys(intervals), customKey];
@@ -76,7 +77,7 @@ const OpenedPart = React.forwardRef((props, ref) => {
76
77
  <SelectItem
77
78
  key={index}
78
79
  item={item}
79
- label={(txt?.labels && txt?.labels[item]) || intervals[item]?.label || item}
80
+ label={(txt?.labels && txt?.labels[item]) || intervals[item]?.label || (item === customKey ? CUSTOM_INTERVAL_KEY_TEXT : item )}
80
81
  isActive={activeInterval === item}
81
82
  onItemClick={() => handleItemClick(item.value || item)}
82
83
  disabled={item === customKey}
@@ -103,6 +104,7 @@ const OpenedPart = React.forwardRef((props, ref) => {
103
104
  isCompareHidden={isCompareHidden}
104
105
  limitRange={limitRange}
105
106
  setActiveInterval={setActiveInterval}
107
+ isShortWeekNames={isShortWeekNames}
106
108
  />
107
109
  )}
108
110
  </div>
@@ -15,7 +15,7 @@ const SelectItem = ({ item, label, isActive, onItemClick, onMouseEnter, disabled
15
15
  >
16
16
  {isActive && (
17
17
  <svg className={cn('opened-part__intervals-item-icon-active')} width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
18
- <path d="M13.3333 4L5.99999 11.3333L2.66666 8" stroke="black" stroke-width="1.33333" stroke-linecap="round" stroke-linejoin="round"/>
18
+ <path d="M13.3333 4L5.99999 11.3333L2.66666 8" stroke="black" strokeWidth="1.33333" strokeLinecap="round" strokeLinejoin="round"/>
19
19
  </svg>
20
20
  )}
21
21
  {label}
@@ -115,10 +115,9 @@ export const CUSTOM_INTERVAL_KEY_TEXT = 'Custom Date';
115
115
 
116
116
  export const getActualDateRange = inputDateRange => {
117
117
  const actualIntervalKey = (() => {
118
- if (inputDateRange.intervalKey && inputDateRange.intervalKey !== CUSTOM_INTERVAL_KEY) {
118
+ if (inputDateRange.intervalKey && Object.keys(INTERVALS).includes(inputDateRange.intervalKey)) {
119
119
  return inputDateRange.intervalKey;
120
- }
121
- if (inputDateRange.start && inputDateRange.end) {
120
+ } else if (inputDateRange.start && inputDateRange.end) {
122
121
  for (const [key, interval] of Object.entries(INTERVALS)) {
123
122
  if (
124
123
  moment(inputDateRange.start).isSame(interval.start()) &&
@@ -127,20 +126,29 @@ export const getActualDateRange = inputDateRange => {
127
126
  return key;
128
127
  }
129
128
  }
129
+ return CUSTOM_INTERVAL_KEY;
130
130
  }
131
- return null;
131
+ return ALL_TIME_KEY;
132
132
  })();
133
+ if (actualIntervalKey === ALL_TIME_KEY) return {
134
+ intervalKey: ALL_TIME_KEY,
135
+ start: null,
136
+ end: null,
137
+ compare: inputDateRange.compare,
138
+ startPrevDate: null,
139
+ endPrevDate:null
140
+ };
133
141
  const actualValues = {
134
142
  // intervalKey: inputDateRange.intervalKey || customIntervalKey,
135
143
  intervalKey: actualIntervalKey || CUSTOM_INTERVAL_KEY,
136
144
  start:
137
145
  inputDateRange.intervalKey === CUSTOM_INTERVAL_KEY
138
146
  ? inputDateRange?.start
139
- : INTERVALS[inputDateRange.intervalKey]?.start()?.toDate(),
147
+ : INTERVALS[inputDateRange.intervalKey]?.start()?.format('YYYY-MM-DDTHH:mm'),
140
148
  end:
141
149
  inputDateRange.intervalKey === CUSTOM_INTERVAL_KEY
142
150
  ? inputDateRange?.end
143
- : INTERVALS[inputDateRange.intervalKey]?.end()?.toDate(),
151
+ : INTERVALS[inputDateRange.intervalKey]?.end()?.format('YYYY-MM-DDTHH:mm'),
144
152
  compare: inputDateRange.compare,
145
153
  };
146
154
 
@@ -19,7 +19,8 @@ const RangeCalendar = props => {
19
19
  onHover = () => {},
20
20
  startPrevDate,
21
21
  endPrevDate,
22
- limitRange
22
+ limitRange,
23
+ isShortWeekNames
23
24
  } = props;
24
25
 
25
26
  const [days, setDays] = useState({});
@@ -100,6 +101,8 @@ const RangeCalendar = props => {
100
101
  setDate(moment(date).add(1, 'month').toDate());
101
102
  };
102
103
 
104
+ const getFormatedWeekName = input => isShortWeekNames ? input.charAt(0) : input;
105
+
103
106
  return (
104
107
  <div className={cn('range-calendar', className)}>
105
108
  <div className="range-calendar-header">
@@ -126,7 +129,7 @@ const RangeCalendar = props => {
126
129
  {[...Array(7).keys()].map(dayOfWeek => {
127
130
  return (
128
131
  <div key={`day-of-week_${dayOfWeek}`} className="range-calendar__day range-calendar__day--title">
129
- {moment().weekday(dayOfWeek).format('dd').charAt(0)}
132
+ {getFormatedWeekName(moment().weekday(dayOfWeek).format('dd'))}
130
133
  </div>
131
134
  );
132
135
  })}
@@ -1,4 +1,4 @@
1
- @import '../../../scss/anme/anme-vars';
1
+ @import '~anme/scss/anme-vars';
2
2
 
3
3
  .table-header {
4
4
  &--weight-actions {
@@ -1,5 +1,5 @@
1
1
  @import "../../../scss/vars";
2
- @import "../../../scss/anme/anme-mixins";
2
+ @import "~anme/scss/anme-mixins";
3
3
 
4
4
  .textarea {
5
5
  border: 1px solid #e2e5ec;
@@ -1,5 +1,5 @@
1
- @import "../../scss/anme/anme-vars";
2
- @import "../../scss/anme/anme-mixins";
1
+ @import "~anme/scss/anme-vars";
2
+ @import "~anme/scss/anme-mixins";
3
3
 
4
4
  .main-menu {
5
5
  display: flex;
@@ -1,5 +1,5 @@
1
- @import '../../../scss/anme/anme-vars';
2
- @import '../../../scss/anme/anme-mixins';
1
+ @import '~anme/scss/anme-vars';
2
+ @import '~anme/scss/anme-mixins';
3
3
 
4
4
  .accordion {
5
5
  &--item {
@@ -12,25 +12,25 @@ const Arrow = ({type, className, onClick, disabled}) => {
12
12
 
13
13
  useEffect(() => {
14
14
  if (ref.current) {
15
- setColor(getStyles(ref.current, 'color'));
15
+ //setColor(getStyles(ref.current, 'color'));
16
16
  };
17
17
  }, [ref.current]);
18
18
 
19
19
  return (
20
- <div
20
+ <div
21
21
  ref={ref}
22
22
  className={cn('arrow', `arrow_${type}`, className, {
23
23
  'arrow_disabled': disabled
24
24
  })}
25
25
  onClick={onClick} >
26
- {type !== 'right'
26
+ {type !== 'right'
27
27
  ? (
28
28
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
29
- <path d="M15 18L9 12L15 6" stroke={color} stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
29
+ <path d="M15 18L9 12L15 6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
30
30
  </svg>
31
31
  ) : (
32
32
  <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
33
- <path d="M9 18L15 12L9 6" stroke={color} stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
33
+ <path d="M9 18L15 12L9 6" stroke={color} strokeWidth="2" strokeLinecap="round" strokeLinejoin="round"/>
34
34
  </svg>
35
35
  )
36
36
  }
@@ -5,7 +5,7 @@ import { ChevronLeft, ChevronRight } from 'react-feather';
5
5
  import './Calendar.scss';
6
6
 
7
7
  export default function (props) {
8
- const { date, setDate, allowPrev = true, allowNext = true, params } = props;
8
+ const { date, setDate, allowPrev = true, allowNext = true, params, className } = props;
9
9
  const { minDate, maxDate } = params;
10
10
  const [days, setDays] = useState({});
11
11
  const [showDate, setShowDate] = useState(date);
@@ -70,7 +70,7 @@ export default function (props) {
70
70
  };
71
71
 
72
72
  return (
73
- <div className="calendar">
73
+ <div className={`calendar ${className}`}>
74
74
  <div className="calendar-header">
75
75
  <div className="calendar-header__prev">
76
76
  {allowPrev && (