pixel-react-excel-sheet 1.0.32 → 1.0.33
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/lib/components/Accordion/Accordion.d.ts +1 -1
- package/lib/components/Accordion/types.d.ts +4 -0
- package/lib/components/AllProjectsDropdown/types.d.ts +2 -0
- package/lib/components/Button/Button.d.ts +2 -2
- package/lib/components/Button/types.d.ts +17 -0
- package/lib/components/Charts/DashboardDonutChart/types.d.ts +1 -0
- package/lib/components/Charts/MultiRadialChart/types.d.ts +3 -0
- package/lib/components/ChooseFile/ChooseFile.d.ts +3 -0
- package/lib/components/ChooseFile/types.d.ts +68 -0
- package/lib/components/ConditionalDropdown/ConditionalDropdown.d.ts +1 -2
- package/lib/components/ConditionalDropdown/types.d.ts +3 -3
- package/lib/components/LabelEditTextField/types.d.ts +3 -1
- package/lib/components/ScriptSwitchButton/ScriptSwitchButton.d.ts +9 -0
- package/lib/components/ScriptSwitchButton/index.d.ts +1 -0
- package/lib/components/StatusCard/types.d.ts +2 -0
- package/lib/components/TableTree/Components/TableCell.d.ts +1 -1
- package/lib/components/TableTree/Components/TableRow.d.ts +1 -1
- package/lib/components/TableTree/data.d.ts +115 -1
- package/lib/components/TableTree/types.d.ts +4 -0
- package/lib/index.d.ts +218 -65
- package/lib/index.esm.js +721 -419
- package/lib/index.esm.js.map +1 -1
- package/lib/index.js +767 -418
- package/lib/index.js.map +1 -1
- package/lib/tsconfig.tsbuildinfo +1 -1
- package/lib/validations/regex.d.ts +46 -0
- package/package.json +1 -1
- package/src/StyleGuide/ColorPalette/colorPaletteList.ts +5 -0
- package/src/assets/Themes/BaseTheme.scss +1 -1
- package/src/assets/Themes/BlueTheme.scss +1 -1
- package/src/assets/Themes/DarkTheme.scss +1 -1
- package/src/assets/icons/failed_status_icon.svg +1 -1
- package/src/assets/icons/flaky_status_icon.svg +1 -1
- package/src/assets/icons/settings.svg +3 -0
- package/src/assets/icons/skipped_status_icon.svg +1 -1
- package/src/assets/icons/warning_status_icon.svg +1 -1
- package/src/components/Accordion/Accordion.stories.tsx +13 -0
- package/src/components/Accordion/Accordion.tsx +2 -1
- package/src/components/Accordion/types.ts +4 -0
- package/src/components/AllProjectsDropdown/types.ts +2 -0
- package/src/components/AppHeader/AppHeader.scss +6 -2
- package/src/components/Button/Button.scss +12 -0
- package/src/components/Button/Button.tsx +29 -11
- package/src/components/Button/types.ts +21 -0
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.scss +83 -30
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.stories.tsx +2 -0
- package/src/components/Charts/DashboardDonutChart/DashboardDonutChart.tsx +38 -17
- package/src/components/Charts/DashboardDonutChart/types.ts +1 -0
- package/src/components/Charts/MultiRadialChart/MultiRadialChart.scss +0 -1
- package/src/components/Charts/MultiRadialChart/MultiRadialChart.stories.tsx +2 -1
- package/src/components/Charts/MultiRadialChart/MultiRadialChart.tsx +18 -4
- package/src/components/Charts/MultiRadialChart/types.ts +4 -1
- package/src/components/ChooseFile/ChooseFile.stories.tsx +190 -0
- package/src/components/ChooseFile/ChooseFile.tsx +46 -0
- package/src/components/ChooseFile/types.ts +78 -0
- package/src/components/ConditionalDropdown/ConditionalDropdown.stories.tsx +8 -5
- package/src/components/ConditionalDropdown/ConditionalDropdown.tsx +133 -135
- package/src/components/ConditionalDropdown/types.ts +8 -8
- package/src/components/ConnectingBranch/ConnectingBranch.scss +171 -169
- package/src/components/ConnectingBranch/ConnectingBranch.tsx +108 -107
- package/src/components/DatePicker/DatePicker.scss +310 -0
- package/src/components/Excel/ExcelFile/ExcelFile.tsx +4 -4
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ActiveCell.tsx +22 -12
- package/src/components/Excel/ExcelFile/ExcelFileComponents/ColumnIndicator.tsx +2 -2
- package/src/components/Excel/ExcelFile/ExcelFileComponents/DataEditor.tsx +4 -1
- package/src/components/Excel/ExcelFile/ExcelFileComponents/RowIndicator.tsx +2 -2
- package/src/components/Excel/ExcelFile/ExcelFileComponents/reducerFunctions.ts +77 -10
- package/src/components/Icon/iconList.ts +2 -0
- package/src/components/LabelEditTextField/LabelEditTextField.scss +4 -0
- package/src/components/LabelEditTextField/LabelEditTextField.stories.tsx +8 -3
- package/src/components/LabelEditTextField/LabelEditTextField.tsx +42 -18
- package/src/components/LabelEditTextField/types.ts +3 -1
- package/src/components/MachineInputField/MachineInputField.tsx +2 -2
- package/src/components/NLPInput/components/NlpDropDown/NlpDropdown.scss +1 -1
- package/src/components/ScriptSwitchButton/ScriptSwitchButton.scss +33 -0
- package/src/components/ScriptSwitchButton/ScriptSwitchButton.stories.tsx +48 -0
- package/src/components/ScriptSwitchButton/ScriptSwitchButton.tsx +65 -0
- package/src/components/ScriptSwitchButton/index.ts +1 -0
- package/src/components/Select/Select.tsx +4 -4
- package/src/components/StatusCard/StatusCard.scss +2 -1
- package/src/components/StatusCard/StatusCard.stories.tsx +59 -1
- package/src/components/StatusCard/StatusCard.tsx +10 -2
- package/src/components/StatusCard/types.ts +2 -0
- package/src/components/TableTree/Components/TableBody.tsx +20 -16
- package/src/components/TableTree/Components/TableCell.tsx +47 -31
- package/src/components/TableTree/Components/TableRow.tsx +4 -0
- package/src/components/TableTree/TableTree.scss +121 -109
- package/src/components/TableTree/data.ts +48 -2
- package/src/components/TableTree/types.ts +4 -0
- package/src/index.ts +97 -0
- package/src/validations/regex.stories.tsx +362 -0
- package/src/validations/regex.ts +194 -0
|
@@ -411,3 +411,313 @@
|
|
|
411
411
|
}
|
|
412
412
|
}
|
|
413
413
|
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
|
|
418
|
+
// Adding react day picker library node modules css here to get the css style available in platform
|
|
419
|
+
|
|
420
|
+
/* Variables declaration */
|
|
421
|
+
/* prettier-ignore */
|
|
422
|
+
.rdp-root {
|
|
423
|
+
--rdp-accent-color: blue; /* The accent color used for selected days and UI elements. */
|
|
424
|
+
--rdp-accent-background-color: #f0f0ff; /* The accent background color used for selected days and UI elements. */
|
|
425
|
+
--rdp-font-family: system-ui; /* The font family used by the calendar. Note that `inherit`does not work here. */
|
|
426
|
+
|
|
427
|
+
--rdp-day-font: inherit; /* The font used for the day cells. */
|
|
428
|
+
--rdp-day-height: 2.75rem; /* The height of the day cells. */
|
|
429
|
+
--rdp-day-width: 2.75rem; /* The width of the day cells. */
|
|
430
|
+
|
|
431
|
+
--rdp-day_button-border-radius: 100%; /* The border radius of the day cells. */
|
|
432
|
+
--rdp-day_button-border: 2px solid transparent; /* The border of the day cells. */
|
|
433
|
+
--rdp-day_button-height: var(--rdp-day-height); /* The height of the day cells. */
|
|
434
|
+
--rdp-day_button-width: var(--rdp-day-width); /* The width of the day cells. */
|
|
435
|
+
|
|
436
|
+
--rdp-selected-border: 2px solid var(--rdp-accent-color); /* The border of the selected days. */
|
|
437
|
+
--rdp-selected-font: bold large var(--rdp-font-family); /* The font of the selected days. */
|
|
438
|
+
--rdp-disabled-opacity: 0.5; /* The opacity of the disabled days. */
|
|
439
|
+
--rdp-outside-opacity: 0.75; /* The opacity of the days outside the current month. */
|
|
440
|
+
--rdp-today-color: var(--rdp-accent-color); /* The color of the today's date. */
|
|
441
|
+
|
|
442
|
+
--rdp-dropdown-gap: 0.5rem;/* The gap between the dropdowns used in the month captons. */
|
|
443
|
+
|
|
444
|
+
--rdp-month_caption-font: bold larger var(--rdp-font-family); /* The font of the month caption. */
|
|
445
|
+
--rdp-months-gap: 2rem; /* The gap between the months in the multi-month view. */
|
|
446
|
+
|
|
447
|
+
--rdp-nav_button-disabled-opacity: 0.5; /* The opacity of the disabled navigation buttons. */
|
|
448
|
+
--rdp-nav_button-height: 2.25rem; /* The height of the navigation buttons. */
|
|
449
|
+
--rdp-nav_button-width: 2.25rem; /* The width of the navigation buttons. */
|
|
450
|
+
--rdp-nav-height: 2.75rem; /* The height of the navigation bar. */
|
|
451
|
+
|
|
452
|
+
--rdp-range_middle-background-color: var(--rdp-accent-background-color); /* The color of the background for days in the middle of a range. */
|
|
453
|
+
--rdp-range_middle-font: normal medium var(--rdp-font-family); /* The font for days in the middle of a range. */
|
|
454
|
+
--rdp-range_middle-foreground-color: white; /* The font for days in the middle of a range. */
|
|
455
|
+
--rdp-range_middle-color: inherit;/* The color of the range text. */
|
|
456
|
+
|
|
457
|
+
--rdp-range_start-color: white; /* The color of the range text. */
|
|
458
|
+
--rdp-range_start-background: linear-gradient(var(--rdp-gradient-direction), transparent 50%, var(--rdp-range_middle-background-color) 50%); /* Used for the background of the start of the selected range. */
|
|
459
|
+
--rdp-range_start-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the start of the selected range. */
|
|
460
|
+
|
|
461
|
+
--rdp-range_end-background: linear-gradient(var(--rdp-gradient-direction), var(--rdp-range_middle-background-color) 50%, transparent 50%); /* Used for the background of the end of the selected range. */
|
|
462
|
+
--rdp-range_end-color: white;/* The color of the range text. */
|
|
463
|
+
--rdp-range_end-date-background-color: var(--rdp-accent-color); /* The background color of the date when at the end of the selected range. */
|
|
464
|
+
|
|
465
|
+
--rdp-week_number-border-radius: 100%; /* The border radius of the week number. */
|
|
466
|
+
--rdp-week_number-border: 2px solid transparent; /* The border of the week number. */
|
|
467
|
+
--rdp-week_number-font: 400 small var(--rdp-font-family); /* The font of the week number cells. */
|
|
468
|
+
--rdp-week_number-height: var(--rdp-day-height); /* The height of the week number cells. */
|
|
469
|
+
--rdp-week_number-opacity: 0.75; /* The opacity of the week number. */
|
|
470
|
+
--rdp-week_number-width: var(--rdp-day-width); /* The width of the week number cells. */
|
|
471
|
+
--rdp-weeknumber-text-align: center; /* The text alignment of the weekday cells. */
|
|
472
|
+
|
|
473
|
+
--rdp-weekday-font: 500 smaller var(--rdp-font-family); /* The font of the weekday. */
|
|
474
|
+
--rdp-weekday-opacity: 0.75; /* The opacity of the weekday. */
|
|
475
|
+
--rdp-weekday-padding: 0.5rem 0rem; /* The padding of the weekday. */
|
|
476
|
+
--rdp-weekday-text-align: center; /* The text alignment of the weekday cells. */
|
|
477
|
+
|
|
478
|
+
--rdp-gradient-direction: 90deg;
|
|
479
|
+
}
|
|
480
|
+
|
|
481
|
+
.rdp-root[dir="rtl"] {
|
|
482
|
+
--rdp-gradient-direction: -90deg;
|
|
483
|
+
}
|
|
484
|
+
|
|
485
|
+
/* Root of the component. */
|
|
486
|
+
.rdp-root {
|
|
487
|
+
position: relative; /* Required to position the navigation toolbar. */
|
|
488
|
+
box-sizing: border-box;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.rdp-root * {
|
|
492
|
+
box-sizing: border-box;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.rdp-day {
|
|
496
|
+
width: var(--rdp-day-width);
|
|
497
|
+
height: var(--rdp-day-height);
|
|
498
|
+
font: var(--rdp-day-font);
|
|
499
|
+
text-align: center;
|
|
500
|
+
}
|
|
501
|
+
|
|
502
|
+
.rdp-day_button {
|
|
503
|
+
background: none;
|
|
504
|
+
padding: 0;
|
|
505
|
+
margin: 0;
|
|
506
|
+
cursor: pointer;
|
|
507
|
+
font: inherit;
|
|
508
|
+
color: inherit;
|
|
509
|
+
justify-content: center;
|
|
510
|
+
align-items: center;
|
|
511
|
+
display: flex;
|
|
512
|
+
|
|
513
|
+
width: var(--rdp-day_button-width);
|
|
514
|
+
height: var(--rdp-day_button-height);
|
|
515
|
+
border: var(--rdp-day_button-border);
|
|
516
|
+
border-radius: var(--rdp-day_button-border-radius);
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
.rdp-day_button:disabled {
|
|
520
|
+
cursor: revert;
|
|
521
|
+
}
|
|
522
|
+
|
|
523
|
+
.rdp-caption_label {
|
|
524
|
+
z-index: 1;
|
|
525
|
+
|
|
526
|
+
position: relative;
|
|
527
|
+
display: inline-flex;
|
|
528
|
+
align-items: center;
|
|
529
|
+
|
|
530
|
+
white-space: nowrap;
|
|
531
|
+
border: 0;
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
.rdp-button_next,
|
|
535
|
+
.rdp-button_previous {
|
|
536
|
+
border: none;
|
|
537
|
+
background: none;
|
|
538
|
+
padding: 0;
|
|
539
|
+
margin: 0;
|
|
540
|
+
cursor: pointer;
|
|
541
|
+
font: inherit;
|
|
542
|
+
color: inherit;
|
|
543
|
+
-moz-appearance: none;
|
|
544
|
+
-webkit-appearance: none;
|
|
545
|
+
display: inline-flex;
|
|
546
|
+
align-items: center;
|
|
547
|
+
justify-content: center;
|
|
548
|
+
position: relative;
|
|
549
|
+
appearance: none;
|
|
550
|
+
|
|
551
|
+
width: var(--rdp-nav_button-width);
|
|
552
|
+
height: var(--rdp-nav_button-height);
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
.rdp-button_next:disabled,
|
|
556
|
+
.rdp-button_previous:disabled {
|
|
557
|
+
cursor: revert;
|
|
558
|
+
|
|
559
|
+
opacity: var(--rdp-nav_button-disabled-opacity);
|
|
560
|
+
}
|
|
561
|
+
|
|
562
|
+
.rdp-chevron {
|
|
563
|
+
display: inline-block;
|
|
564
|
+
fill: var(--rdp-accent-color);
|
|
565
|
+
}
|
|
566
|
+
|
|
567
|
+
.rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {
|
|
568
|
+
transform: rotate(180deg);
|
|
569
|
+
}
|
|
570
|
+
|
|
571
|
+
.rdp-root[dir="rtl"] .rdp-nav .rdp-chevron {
|
|
572
|
+
transform: rotate(180deg);
|
|
573
|
+
transform-origin: 50%;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
.rdp-dropdowns {
|
|
577
|
+
position: relative;
|
|
578
|
+
display: inline-flex;
|
|
579
|
+
align-items: center;
|
|
580
|
+
gap: var(--rdp-dropdown-gap);
|
|
581
|
+
}
|
|
582
|
+
.rdp-dropdown {
|
|
583
|
+
z-index: 2;
|
|
584
|
+
|
|
585
|
+
/* Reset */
|
|
586
|
+
opacity: 0;
|
|
587
|
+
appearance: none;
|
|
588
|
+
position: absolute;
|
|
589
|
+
inset-block-start: 0;
|
|
590
|
+
inset-block-end: 0;
|
|
591
|
+
inset-inline-start: 0;
|
|
592
|
+
width: 100%;
|
|
593
|
+
margin: 0;
|
|
594
|
+
padding: 0;
|
|
595
|
+
cursor: inherit;
|
|
596
|
+
border: none;
|
|
597
|
+
line-height: inherit;
|
|
598
|
+
}
|
|
599
|
+
|
|
600
|
+
.rdp-dropdown_root {
|
|
601
|
+
position: relative;
|
|
602
|
+
display: inline-flex;
|
|
603
|
+
align-items: center;
|
|
604
|
+
}
|
|
605
|
+
|
|
606
|
+
.rdp-dropdown_root[data-disabled="true"] .rdp-chevron {
|
|
607
|
+
opacity: var(--rdp-disabled-opacity);
|
|
608
|
+
}
|
|
609
|
+
|
|
610
|
+
.rdp-month_caption {
|
|
611
|
+
display: flex;
|
|
612
|
+
align-content: center;
|
|
613
|
+
height: var(--rdp-nav-height);
|
|
614
|
+
font: var(--rdp-month_caption-font);
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
.rdp-months {
|
|
618
|
+
position: relative;
|
|
619
|
+
display: flex;
|
|
620
|
+
flex-wrap: wrap;
|
|
621
|
+
gap: var(--rdp-months-gap);
|
|
622
|
+
max-width: fit-content;
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
.rdp-month_grid {
|
|
626
|
+
border-collapse: collapse;
|
|
627
|
+
}
|
|
628
|
+
|
|
629
|
+
.rdp-nav {
|
|
630
|
+
position: absolute;
|
|
631
|
+
inset-block-start: 0;
|
|
632
|
+
inset-inline-end: 0;
|
|
633
|
+
|
|
634
|
+
display: flex;
|
|
635
|
+
align-items: center;
|
|
636
|
+
|
|
637
|
+
height: var(--rdp-nav-height);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
.rdp-weekday {
|
|
641
|
+
opacity: var(--rdp-weekday-opacity);
|
|
642
|
+
padding: var(--rdp-weekday-padding);
|
|
643
|
+
font: var(--rdp-weekday-font);
|
|
644
|
+
text-align: var(--rdp-weekday-text-align);
|
|
645
|
+
text-transform: var(--rdp-weekday-text-transform);
|
|
646
|
+
}
|
|
647
|
+
|
|
648
|
+
.rdp-week_number {
|
|
649
|
+
opacity: var(--rdp-week_number-opacity);
|
|
650
|
+
font: var(--rdp-week_number-font);
|
|
651
|
+
height: var(--rdp-week_number-height);
|
|
652
|
+
width: var(--rdp-week_number-width);
|
|
653
|
+
border: var(--rdp-week_number-border);
|
|
654
|
+
border-radius: var(--rdp-week_number-border-radius);
|
|
655
|
+
text-align: var(--rdp-weeknumber-text-align);
|
|
656
|
+
}
|
|
657
|
+
|
|
658
|
+
/* DAY MODIFIERS */
|
|
659
|
+
.rdp-today:not(.rdp-outside) {
|
|
660
|
+
color: var(--rdp-today-color);
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
.rdp-selected {
|
|
664
|
+
font: var(--rdp-selected-font);
|
|
665
|
+
}
|
|
666
|
+
|
|
667
|
+
.rdp-selected .rdp-day_button {
|
|
668
|
+
border: var(--rdp-selected-border);
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
.rdp-outside {
|
|
672
|
+
opacity: var(--rdp-outside-opacity);
|
|
673
|
+
}
|
|
674
|
+
|
|
675
|
+
.rdp-disabled {
|
|
676
|
+
opacity: var(--rdp-disabled-opacity);
|
|
677
|
+
}
|
|
678
|
+
|
|
679
|
+
.rdp-hidden {
|
|
680
|
+
visibility: hidden;
|
|
681
|
+
color: var(--rdp-range_start-color);
|
|
682
|
+
}
|
|
683
|
+
|
|
684
|
+
.rdp-range_start {
|
|
685
|
+
background: var(--rdp-range_start-background);
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
.rdp-range_start .rdp-day_button {
|
|
689
|
+
background-color: var(--rdp-range_start-date-background-color);
|
|
690
|
+
color: var(--rdp-range_start-color);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
.rdp-range_middle {
|
|
694
|
+
background-color: var(--rdp-range_middle-background-color);
|
|
695
|
+
font: var(--rdp-range_middle-font);
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
.rdp-range_middle .rdp-day_button {
|
|
699
|
+
border-color: transparent;
|
|
700
|
+
border: unset;
|
|
701
|
+
border-radius: unset;
|
|
702
|
+
color: var(--rdp-range_middle-color);
|
|
703
|
+
}
|
|
704
|
+
|
|
705
|
+
.rdp-range_end {
|
|
706
|
+
background: var(--rdp-range_end-background);
|
|
707
|
+
color: var(--rdp-range_end-color);
|
|
708
|
+
}
|
|
709
|
+
|
|
710
|
+
.rdp-range_end .rdp-day_button {
|
|
711
|
+
color: var(--rdp-range_start-color);
|
|
712
|
+
background-color: var(--rdp-range_end-date-background-color);
|
|
713
|
+
}
|
|
714
|
+
|
|
715
|
+
.rdp-range_start.rdp-range_end {
|
|
716
|
+
background: revert;
|
|
717
|
+
}
|
|
718
|
+
|
|
719
|
+
.rdp-focusable {
|
|
720
|
+
cursor: pointer;
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
|
|
@@ -430,8 +430,8 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
|
|
|
430
430
|
setContextMenu({
|
|
431
431
|
open: true,
|
|
432
432
|
position: {
|
|
433
|
-
x: event.pageX
|
|
434
|
-
y: event.pageY
|
|
433
|
+
x: event.pageX,
|
|
434
|
+
y: event.pageY,
|
|
435
435
|
},
|
|
436
436
|
options: options,
|
|
437
437
|
});
|
|
@@ -440,7 +440,7 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
|
|
|
440
440
|
return (
|
|
441
441
|
<>
|
|
442
442
|
{sheetNames.length > 0 && (
|
|
443
|
-
|
|
443
|
+
<div style={{position:"relative"}}>
|
|
444
444
|
<div ref={sheetRef} className="ff-excel-sheet">
|
|
445
445
|
<Spreadsheet
|
|
446
446
|
sheetHeight={sheetHeight}
|
|
@@ -503,7 +503,7 @@ const ExcelFile: React.FC<ExcelFileProps> = ({
|
|
|
503
503
|
</div>
|
|
504
504
|
{contextMenu.open && <ExcelContextMenu contextMenu={contextMenu} />}
|
|
505
505
|
<Toastify />
|
|
506
|
-
|
|
506
|
+
</div>
|
|
507
507
|
)}
|
|
508
508
|
</>
|
|
509
509
|
);
|
|
@@ -20,6 +20,10 @@ const ActiveCell: React.FC<Props> = (props) => {
|
|
|
20
20
|
dispatch(Actions.setCellData(active, data)),
|
|
21
21
|
[dispatch]
|
|
22
22
|
);
|
|
23
|
+
const activate = React.useCallback(
|
|
24
|
+
(point: Point.Point) => dispatch(Actions.activate(point)),
|
|
25
|
+
[dispatch]
|
|
26
|
+
);
|
|
23
27
|
const edit = React.useCallback(() => dispatch(Actions.edit()), [dispatch]);
|
|
24
28
|
const autoFill = React.useCallback(
|
|
25
29
|
(value: boolean) => dispatch(Actions.autoFill(value)),
|
|
@@ -38,11 +42,19 @@ const ActiveCell: React.FC<Props> = (props) => {
|
|
|
38
42
|
const cell = useSelector((state) =>
|
|
39
43
|
state.active ? Matrix.get(state.active, state.model.data) : undefined
|
|
40
44
|
);
|
|
41
|
-
const dimensions = useSelector((state) =>
|
|
42
|
-
active
|
|
45
|
+
const dimensions = useSelector((state) => {
|
|
46
|
+
let dimensionValue = active
|
|
43
47
|
? getCellDimensions(active, state.rowDimensions, state.columnDimensions)
|
|
44
|
-
: undefined
|
|
45
|
-
|
|
48
|
+
: undefined;
|
|
49
|
+
dimensionValue = {
|
|
50
|
+
top: dimensionValue?.top ?? 0,
|
|
51
|
+
height: (dimensionValue?.height ?? 0) + 1,
|
|
52
|
+
left: dimensionValue?.left ?? 0,
|
|
53
|
+
width: (dimensionValue?.width ?? 0) + 1,
|
|
54
|
+
};
|
|
55
|
+
return dimensionValue;
|
|
56
|
+
});
|
|
57
|
+
|
|
46
58
|
const hidden = React.useMemo(
|
|
47
59
|
() => !active || !dimensions,
|
|
48
60
|
[active, dimensions]
|
|
@@ -108,8 +120,11 @@ const ActiveCell: React.FC<Props> = (props) => {
|
|
|
108
120
|
const readOnly = cell && cell.readOnly;
|
|
109
121
|
|
|
110
122
|
const handleMouseDown = React.useCallback(() => {
|
|
111
|
-
|
|
112
|
-
|
|
123
|
+
if (active) {
|
|
124
|
+
autoFill(true);
|
|
125
|
+
activate(active);
|
|
126
|
+
}
|
|
127
|
+
}, [activate, autoFill, active]);
|
|
113
128
|
|
|
114
129
|
return hidden ? null : (
|
|
115
130
|
<div
|
|
@@ -118,12 +133,7 @@ const ActiveCell: React.FC<Props> = (props) => {
|
|
|
118
133
|
'ff-spreadsheet-active-cell',
|
|
119
134
|
`ff-spreadsheet-active-cell--${mode}`
|
|
120
135
|
)}
|
|
121
|
-
style={
|
|
122
|
-
top: dimensions?.top || 0,
|
|
123
|
-
height: (dimensions?.height ?? 0) + 1,
|
|
124
|
-
left: dimensions?.left || 0,
|
|
125
|
-
width: (dimensions?.width ?? 0) + 1,
|
|
126
|
-
}}
|
|
136
|
+
style={dimensions}
|
|
127
137
|
onClick={mode === 'view' && !readOnly ? edit : undefined}
|
|
128
138
|
tabIndex={0}
|
|
129
139
|
>
|
|
@@ -22,7 +22,10 @@ const DataEditor: React.FC<Types.DataEditorProps> = ({ onChange, cell }) => {
|
|
|
22
22
|
const value = cell?.value ?? '';
|
|
23
23
|
|
|
24
24
|
return (
|
|
25
|
-
<div
|
|
25
|
+
<div
|
|
26
|
+
className="ff-spreadsheet-data-editor"
|
|
27
|
+
style={{ ...cell?.style, border: 'none' }} //Inline Styling needed for border:none
|
|
28
|
+
>
|
|
26
29
|
<input
|
|
27
30
|
ref={inputRef}
|
|
28
31
|
type="text"
|
|
@@ -190,10 +190,12 @@ export function applyBorderToCells(
|
|
|
190
190
|
return currentData;
|
|
191
191
|
}
|
|
192
192
|
|
|
193
|
-
const { start, end } = selectedRange;
|
|
194
|
-
|
|
195
193
|
let updatedData = currentData;
|
|
196
194
|
|
|
195
|
+
const { start, end } = selectedRange;
|
|
196
|
+
const startRow = start.row;
|
|
197
|
+
const startCol = start.column;
|
|
198
|
+
|
|
197
199
|
for (let row = start.row; row <= end.row; row++) {
|
|
198
200
|
for (let col = start.column; col <= end.column; col++) {
|
|
199
201
|
const currentCell = Matrix.get({ row, column: col }, updatedData);
|
|
@@ -202,17 +204,47 @@ export function applyBorderToCells(
|
|
|
202
204
|
continue;
|
|
203
205
|
}
|
|
204
206
|
|
|
207
|
+
const adjacentCell = (
|
|
208
|
+
row: number,
|
|
209
|
+
col: number,
|
|
210
|
+
borderType: string,
|
|
211
|
+
borderColor: string
|
|
212
|
+
) => {
|
|
213
|
+
const adjacentCell = Matrix.get({ row: row, column: col }, updatedData);
|
|
214
|
+
if (adjacentCell) {
|
|
215
|
+
let updatedCell = { ...adjacentCell };
|
|
216
|
+
updatedCell.style = {
|
|
217
|
+
...adjacentCell.style,
|
|
218
|
+
[borderType]: `1px solid ${borderColor}`,
|
|
219
|
+
};
|
|
220
|
+
console.log(updatedCell);
|
|
221
|
+
updatedData = Matrix.set(
|
|
222
|
+
{ row: row, column: col },
|
|
223
|
+
updatedCell,
|
|
224
|
+
updatedData
|
|
225
|
+
);
|
|
226
|
+
}
|
|
227
|
+
};
|
|
228
|
+
|
|
205
229
|
let updatedCell = { ...currentCell };
|
|
206
230
|
|
|
207
231
|
switch (value) {
|
|
208
232
|
case 'border-all-sides':
|
|
209
233
|
updatedCell.style = {
|
|
210
234
|
...currentCell.style,
|
|
211
|
-
borderRight: `
|
|
212
|
-
borderLeft: `
|
|
213
|
-
borderTop: `
|
|
214
|
-
borderBottom: `
|
|
235
|
+
borderRight: `1px solid ${color}`,
|
|
236
|
+
borderLeft: `1px solid ${color}`,
|
|
237
|
+
borderTop: `1px solid ${color}`,
|
|
238
|
+
borderBottom: `1px solid ${color}`,
|
|
215
239
|
};
|
|
240
|
+
|
|
241
|
+
if (row === startRow) {
|
|
242
|
+
adjacentCell(row - 1, col, 'borderBottom', color);
|
|
243
|
+
}
|
|
244
|
+
if (col === startCol) {
|
|
245
|
+
adjacentCell(row, col - 1, 'borderRight', color);
|
|
246
|
+
}
|
|
247
|
+
|
|
216
248
|
break;
|
|
217
249
|
case 'border-none':
|
|
218
250
|
updatedCell.style = {
|
|
@@ -222,29 +254,64 @@ export function applyBorderToCells(
|
|
|
222
254
|
borderTop: `1px solid var(--excel-sheet-border)`,
|
|
223
255
|
borderBottom: `1px solid var(--excel-sheet-border)`,
|
|
224
256
|
};
|
|
257
|
+
|
|
258
|
+
if (row === startRow) {
|
|
259
|
+
adjacentCell(
|
|
260
|
+
row - 1,
|
|
261
|
+
col,
|
|
262
|
+
'borderBottom',
|
|
263
|
+
'var(--excel-sheet-border)'
|
|
264
|
+
);
|
|
265
|
+
}
|
|
266
|
+
if (col === startCol) {
|
|
267
|
+
adjacentCell(
|
|
268
|
+
row,
|
|
269
|
+
col - 1,
|
|
270
|
+
'borderRight',
|
|
271
|
+
'var(--excel-sheet-border)'
|
|
272
|
+
);
|
|
273
|
+
}
|
|
225
274
|
break;
|
|
275
|
+
|
|
226
276
|
case 'border-right':
|
|
227
277
|
updatedCell.style = {
|
|
228
278
|
...currentCell.style,
|
|
229
|
-
borderRight: `
|
|
279
|
+
borderRight: `1px solid ${color}`,
|
|
230
280
|
};
|
|
231
281
|
break;
|
|
282
|
+
|
|
232
283
|
case 'border-left':
|
|
233
284
|
updatedCell.style = {
|
|
234
285
|
...currentCell.style,
|
|
235
|
-
borderLeft: `
|
|
286
|
+
borderLeft: `1px solid ${color}`,
|
|
236
287
|
};
|
|
288
|
+
if (col === startCol) {
|
|
289
|
+
adjacentCell(
|
|
290
|
+
row,
|
|
291
|
+
col - 1,
|
|
292
|
+
'borderRight',
|
|
293
|
+
'var(--excel-sheet-border)'
|
|
294
|
+
);
|
|
295
|
+
}
|
|
237
296
|
break;
|
|
238
297
|
case 'border-top':
|
|
239
298
|
updatedCell.style = {
|
|
240
299
|
...currentCell.style,
|
|
241
|
-
borderTop: `
|
|
300
|
+
borderTop: `1px solid ${color}`,
|
|
242
301
|
};
|
|
302
|
+
if (row === startRow) {
|
|
303
|
+
adjacentCell(
|
|
304
|
+
row - 1,
|
|
305
|
+
col,
|
|
306
|
+
'borderBottom',
|
|
307
|
+
'var(--excel-sheet-border)'
|
|
308
|
+
);
|
|
309
|
+
}
|
|
243
310
|
break;
|
|
244
311
|
case 'border-bottom':
|
|
245
312
|
updatedCell.style = {
|
|
246
313
|
...currentCell.style,
|
|
247
|
-
borderBottom: `
|
|
314
|
+
borderBottom: `1px solid ${color}`,
|
|
248
315
|
};
|
|
249
316
|
break;
|
|
250
317
|
default:
|
|
@@ -252,6 +252,7 @@ import machineDisableIcon from '../../assets/icons/machine_disable_icon.svg?reac
|
|
|
252
252
|
import suitesIcon from '../../assets/icons/suites_icon.svg?react';
|
|
253
253
|
import executionsIcon from '../../assets/icons/executions_icon.svg?react';
|
|
254
254
|
import ImportIcon from '../../assets/icons/import_icon.svg?react';
|
|
255
|
+
import Settings from '../../assets/icons/settings.svg?react';
|
|
255
256
|
|
|
256
257
|
Components['success'] = ToastSuccessIcon;
|
|
257
258
|
Components['alert'] = Alert;
|
|
@@ -499,5 +500,6 @@ Components['machine_disable_icon'] = machineDisableIcon;
|
|
|
499
500
|
Components['executions_icon'] = executionsIcon;
|
|
500
501
|
Components['suites_icon'] = suitesIcon;
|
|
501
502
|
Components['import_icon'] = ImportIcon;
|
|
503
|
+
Components['settings'] = Settings
|
|
502
504
|
|
|
503
505
|
export default Components;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
2
|
import type { Meta, StoryObj } from '@storybook/react';
|
|
3
3
|
import LabelEditTextField from './LabelEditTextField';
|
|
4
4
|
import '../../assets/styles/_colors.scss';
|
|
@@ -155,16 +155,20 @@ export const textFieldWithHighlight: Story = {
|
|
|
155
155
|
};
|
|
156
156
|
export const openLabelEditTextField: Story = {
|
|
157
157
|
render: () => {
|
|
158
|
+
const [demoText, setDemoText] = useState('Verify The');
|
|
158
159
|
const handleConfirmAction = (inputValue: string, dropdownValue: string) => {
|
|
159
160
|
//DEMO: we are getting that value from LabelEditTextField
|
|
160
|
-
|
|
161
|
+
setDemoText(inputValue);
|
|
161
162
|
console.info(
|
|
162
163
|
'Confirmed input value and dropdown value:',
|
|
163
164
|
inputValue,
|
|
164
165
|
dropdownValue
|
|
165
166
|
);
|
|
166
167
|
};
|
|
167
|
-
|
|
168
|
+
const handleInputChange = (newInputValue: string) => {
|
|
169
|
+
setDemoText(newInputValue); // Update parent state
|
|
170
|
+
};
|
|
171
|
+
console.log('demoText: ', demoText);
|
|
168
172
|
return (
|
|
169
173
|
<LabelEditTextField
|
|
170
174
|
label="Add Module"
|
|
@@ -181,6 +185,7 @@ export const openLabelEditTextField: Story = {
|
|
|
181
185
|
width="400px"
|
|
182
186
|
height="22px"
|
|
183
187
|
confirmAction={handleConfirmAction}
|
|
188
|
+
onInputChange={handleInputChange}
|
|
184
189
|
isOpen={true}
|
|
185
190
|
customError="text is too long"
|
|
186
191
|
customErrorCondition={demoText?.length > 10}
|