@bigbinary/neeto-molecules 1.0.22 → 1.0.24

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.
@@ -1,9 +1,9 @@
1
1
  import React, { forwardRef, useRef, useState, useEffect } from 'react';
2
2
  import { removeBy, isNotEmpty, snakeToCamelCase } from '@bigbinary/neeto-commons-frontend/pure';
3
3
  import { useLocalStorage, useDebounce } from '@bigbinary/neeto-commons-frontend/react-utils';
4
- import { Typography, Button, Input, Dropdown, Label, Checkbox, Tag, Callout, Pane, Table, NoData, Alert } from '@bigbinary/neetoui';
4
+ import { Typography, Dropdown as Dropdown$1, Button, Input, Label, Checkbox, Tag, Callout, Pane, Table, NoData, Alert } from '@bigbinary/neetoui';
5
5
  import { useTranslation, Trans } from 'react-i18next';
6
- import { Right, HamburgerMenu, Search, Column, Download, Filter, MenuHorizontal, Info, Copy, Check } from '@bigbinary/neeto-icons';
6
+ import { Right, MenuVertical, HamburgerMenu, Search, Column, Download, Filter, MenuHorizontal, Info, Copy, Check } from '@bigbinary/neeto-icons';
7
7
  import { isEmpty, includes, __, filter, trim, toLower, identity, without, append } from 'ramda';
8
8
  import { Link } from 'react-router-dom';
9
9
  import { Neeto } from '@bigbinary/neeto-icons/logos';
@@ -287,7 +287,7 @@ var Container = (cov_1wwtrbg59n().s[0]++, /*#__PURE__*/forwardRef(function (_ref
287
287
  cov_1wwtrbg59n().s[2]++;
288
288
  Container.displayName = "Container";
289
289
 
290
- var css$2 = ".neeto-molecules-header{align-items:center;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;justify-content:space-between;min-height:var(--neeto-ui-main-header-height);padding:24px 0;width:100%}.neeto-molecules-header--has-breadcrumbs{min-height:var(--neeto-ui-main-header-with-breadcrumbs-height)}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{display:block;width:100%}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{margin:0 4px}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;flex-direction:row;justify-content:flex-end}";
290
+ var css$2 = ".neeto-molecules-header{align-items:center;background:rgb(var(--neeto-ui-white));display:flex;flex-direction:row;justify-content:space-between;min-height:var(--neeto-ui-main-header-height);padding:24px 0;width:100%}.neeto-molecules-header--has-breadcrumbs{min-height:var(--neeto-ui-main-header-with-breadcrumbs-height)}.neeto-molecules-header .neeto-molecules-header__toggle-menubar-btn{margin-right:8px}.neeto-molecules-header .neeto-molecules-header__left{align-items:center;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start}.neeto-molecules-header .neeto-molecules-header__left-data-wrap{display:flex;flex-wrap:wrap}.neeto-molecules-header .neeto-molecules-header__page-title{display:flex;flex-direction:row;width:100%}.neeto-molecules-header .neeto-molecules-header__breadcrumbs-wrap{display:flex}.neeto-molecules-header .neeto-molecules-header__breadcrumb{align-items:center;display:flex;flex-direction:row;justify-content:flex-start;line-height:1}.neeto-molecules-header .neeto-molecules-header__breadcrumb a{text-decoration:none;transition:all .3s ease-in-out}.neeto-molecules-header .neeto-molecules-header__breadcrumb-separator{margin:0 4px}.neeto-molecules-header .neeto-molecules-header__right{align-items:center;display:flex;flex-direction:row;justify-content:flex-end}";
291
291
  n(css$2,{});
292
292
 
293
293
  function cov_2jdv1wna26() {
@@ -438,9 +438,138 @@ var Breadcrumbs = function Breadcrumbs(_ref) {
438
438
  }));
439
439
  };
440
440
 
441
+ function _objectWithoutPropertiesLoose(source, excluded) {
442
+ if (source == null) return {};
443
+ var target = {};
444
+ var sourceKeys = Object.keys(source);
445
+ var key, i;
446
+ for (i = 0; i < sourceKeys.length; i++) {
447
+ key = sourceKeys[i];
448
+ if (excluded.indexOf(key) >= 0) continue;
449
+ target[key] = source[key];
450
+ }
451
+ return target;
452
+ }
453
+
454
+ function _objectWithoutProperties(source, excluded) {
455
+ if (source == null) return {};
456
+ var target = _objectWithoutPropertiesLoose(source, excluded);
457
+ var key, i;
458
+ if (Object.getOwnPropertySymbols) {
459
+ var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
460
+ for (i = 0; i < sourceSymbolKeys.length; i++) {
461
+ key = sourceSymbolKeys[i];
462
+ if (excluded.indexOf(key) >= 0) continue;
463
+ if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
464
+ target[key] = source[key];
465
+ }
466
+ }
467
+ return target;
468
+ }
469
+
470
+ var _excluded$2 = ["children"];
471
+ function cov_1d9vaefr1a() {
472
+ var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Header/Dropdown.jsx";
473
+ var hash = "57d665dbaab5aa76c0b57bedd85469275a9f6867";
474
+ var global = new Function("return this")();
475
+ var gcv = "__coverage__";
476
+ var coverageData = {
477
+ path: "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Header/Dropdown.jsx",
478
+ statementMap: {
479
+ "0": {
480
+ start: {
481
+ line: 6,
482
+ column: 17
483
+ },
484
+ end: {
485
+ line: 17,
486
+ column: 1
487
+ }
488
+ },
489
+ "1": {
490
+ start: {
491
+ line: 7,
492
+ column: 2
493
+ },
494
+ end: {
495
+ line: 16,
496
+ column: 20
497
+ }
498
+ }
499
+ },
500
+ fnMap: {
501
+ "0": {
502
+ name: "(anonymous_0)",
503
+ decl: {
504
+ start: {
505
+ line: 6,
506
+ column: 17
507
+ },
508
+ end: {
509
+ line: 6,
510
+ column: 18
511
+ }
512
+ },
513
+ loc: {
514
+ start: {
515
+ line: 7,
516
+ column: 2
517
+ },
518
+ end: {
519
+ line: 16,
520
+ column: 20
521
+ }
522
+ },
523
+ line: 7
524
+ }
525
+ },
526
+ branchMap: {},
527
+ s: {
528
+ "0": 0,
529
+ "1": 0
530
+ },
531
+ f: {
532
+ "0": 0
533
+ },
534
+ b: {},
535
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
536
+ hash: "57d665dbaab5aa76c0b57bedd85469275a9f6867"
537
+ };
538
+ var coverage = global[gcv] || (global[gcv] = {});
539
+ if (!coverage[path] || coverage[path].hash !== hash) {
540
+ coverage[path] = coverageData;
541
+ }
542
+ var actualCoverage = coverage[path];
543
+ {
544
+ // @ts-ignore
545
+ cov_1d9vaefr1a = function () {
546
+ return actualCoverage;
547
+ };
548
+ }
549
+ return actualCoverage;
550
+ }
551
+ cov_1d9vaefr1a();
552
+ cov_1d9vaefr1a().s[0]++;
553
+ var Dropdown = function Dropdown(_ref) {
554
+ var _ref$dropdownProps = _ref.dropdownProps,
555
+ children = _ref$dropdownProps.children,
556
+ otherProps = _objectWithoutProperties(_ref$dropdownProps, _excluded$2);
557
+ cov_1d9vaefr1a().f[0]++;
558
+ cov_1d9vaefr1a().s[1]++;
559
+ return /*#__PURE__*/React.createElement(Dropdown$1, _extends({
560
+ buttonProps: {
561
+ className: "ml-1.5"
562
+ },
563
+ buttonStyle: "text",
564
+ className: "ml-3",
565
+ icon: MenuVertical,
566
+ position: "bottom-end"
567
+ }, otherProps), children);
568
+ };
569
+
441
570
  function cov_14lmkczjok() {
442
571
  var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Header/index.jsx";
443
- var hash = "5942842597a7b0320330d704f35fd6318ddbbd60";
572
+ var hash = "ffe20f4612621150120204f01a4318179de8e933";
444
573
  var global = new Function("return this")();
445
574
  var gcv = "__coverage__";
446
575
  var coverageData = {
@@ -448,31 +577,31 @@ function cov_14lmkczjok() {
448
577
  statementMap: {
449
578
  "0": {
450
579
  start: {
451
- line: 11,
580
+ line: 12,
452
581
  column: 15
453
582
  },
454
583
  end: {
455
- line: 72,
584
+ line: 76,
456
585
  column: 1
457
586
  }
458
587
  },
459
588
  "1": {
460
589
  start: {
461
- line: 19,
590
+ line: 21,
462
591
  column: 20
463
592
  },
464
593
  end: {
465
- line: 19,
594
+ line: 21,
466
595
  column: 32
467
596
  }
468
597
  },
469
598
  "2": {
470
599
  start: {
471
- line: 21,
600
+ line: 23,
472
601
  column: 2
473
602
  },
474
603
  end: {
475
- line: 71,
604
+ line: 75,
476
605
  column: 4
477
606
  }
478
607
  }
@@ -482,174 +611,207 @@ function cov_14lmkczjok() {
482
611
  name: "(anonymous_0)",
483
612
  decl: {
484
613
  start: {
485
- line: 11,
614
+ line: 12,
486
615
  column: 15
487
616
  },
488
617
  end: {
489
- line: 11,
618
+ line: 12,
490
619
  column: 16
491
620
  }
492
621
  },
493
622
  loc: {
494
623
  start: {
495
- line: 18,
624
+ line: 20,
496
625
  column: 6
497
626
  },
498
627
  end: {
499
- line: 72,
628
+ line: 76,
500
629
  column: 1
501
630
  }
502
631
  },
503
- line: 18
632
+ line: 20
504
633
  }
505
634
  },
506
635
  branchMap: {
507
636
  "0": {
508
637
  loc: {
509
638
  start: {
510
- line: 15,
639
+ line: 16,
511
640
  column: 2
512
641
  },
513
642
  end: {
514
- line: 15,
643
+ line: 16,
515
644
  column: 16
516
645
  }
517
646
  },
518
647
  type: "default-arg",
519
648
  locations: [{
520
649
  start: {
521
- line: 15,
650
+ line: 16,
522
651
  column: 14
523
652
  },
524
653
  end: {
525
- line: 15,
654
+ line: 16,
526
655
  column: 16
527
656
  }
528
657
  }],
529
- line: 15
658
+ line: 16
530
659
  },
531
660
  "1": {
532
661
  loc: {
533
662
  start: {
534
- line: 17,
663
+ line: 18,
535
664
  column: 2
536
665
  },
537
666
  end: {
538
- line: 17,
667
+ line: 18,
539
668
  column: 18
540
669
  }
541
670
  },
542
671
  type: "default-arg",
543
672
  locations: [{
544
673
  start: {
545
- line: 17,
674
+ line: 18,
546
675
  column: 16
547
676
  },
548
677
  end: {
549
- line: 17,
678
+ line: 18,
550
679
  column: 18
551
680
  }
552
681
  }],
553
- line: 17
682
+ line: 18
554
683
  },
555
684
  "2": {
556
685
  loc: {
557
686
  start: {
558
- line: 30,
687
+ line: 32,
559
688
  column: 9
560
689
  },
561
690
  end: {
562
- line: 39,
691
+ line: 41,
563
692
  column: 9
564
693
  }
565
694
  },
566
695
  type: "binary-expr",
567
696
  locations: [{
568
697
  start: {
569
- line: 30,
698
+ line: 32,
570
699
  column: 9
571
700
  },
572
701
  end: {
573
- line: 30,
702
+ line: 32,
574
703
  column: 22
575
704
  }
576
705
  }, {
577
706
  start: {
578
- line: 31,
707
+ line: 33,
579
708
  column: 10
580
709
  },
581
710
  end: {
582
- line: 38,
711
+ line: 40,
583
712
  column: 12
584
713
  }
585
714
  }],
586
- line: 30
715
+ line: 32
587
716
  },
588
717
  "3": {
589
718
  loc: {
590
719
  start: {
591
- line: 41,
720
+ line: 43,
592
721
  column: 11
593
722
  },
594
723
  end: {
595
- line: 41,
724
+ line: 43,
596
725
  column: 67
597
726
  }
598
727
  },
599
728
  type: "binary-expr",
600
729
  locations: [{
601
730
  start: {
602
- line: 41,
731
+ line: 43,
603
732
  column: 11
604
733
  },
605
734
  end: {
606
- line: 41,
735
+ line: 43,
607
736
  column: 22
608
737
  }
609
738
  }, {
610
739
  start: {
611
- line: 41,
740
+ line: 43,
612
741
  column: 26
613
742
  },
614
743
  end: {
615
- line: 41,
744
+ line: 43,
616
745
  column: 67
617
746
  }
618
747
  }],
619
- line: 41
748
+ line: 43
620
749
  },
621
750
  "4": {
622
751
  loc: {
623
752
  start: {
624
- line: 55,
753
+ line: 54,
754
+ column: 13
755
+ },
756
+ end: {
757
+ line: 54,
758
+ column: 72
759
+ }
760
+ },
761
+ type: "binary-expr",
762
+ locations: [{
763
+ start: {
764
+ line: 54,
765
+ column: 13
766
+ },
767
+ end: {
768
+ line: 54,
769
+ column: 26
770
+ }
771
+ }, {
772
+ start: {
773
+ line: 54,
774
+ column: 30
775
+ },
776
+ end: {
777
+ line: 54,
778
+ column: 72
779
+ }
780
+ }],
781
+ line: 54
782
+ },
783
+ "5": {
784
+ loc: {
785
+ start: {
786
+ line: 59,
625
787
  column: 9
626
788
  },
627
789
  end: {
628
- line: 67,
790
+ line: 71,
629
791
  column: 9
630
792
  }
631
793
  },
632
794
  type: "binary-expr",
633
795
  locations: [{
634
796
  start: {
635
- line: 55,
797
+ line: 59,
636
798
  column: 9
637
799
  },
638
800
  end: {
639
- line: 55,
801
+ line: 59,
640
802
  column: 20
641
803
  }
642
804
  }, {
643
805
  start: {
644
- line: 56,
806
+ line: 60,
645
807
  column: 10
646
808
  },
647
809
  end: {
648
- line: 66,
810
+ line: 70,
649
811
  column: 12
650
812
  }
651
813
  }],
652
- line: 55
814
+ line: 59
653
815
  }
654
816
  },
655
817
  s: {
@@ -665,10 +827,11 @@ function cov_14lmkczjok() {
665
827
  "1": [0],
666
828
  "2": [0, 0],
667
829
  "3": [0, 0],
668
- "4": [0, 0]
830
+ "4": [0, 0],
831
+ "5": [0, 0]
669
832
  },
670
833
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
671
- hash: "5942842597a7b0320330d704f35fd6318ddbbd60"
834
+ hash: "ffe20f4612621150120204f01a4318179de8e933"
672
835
  };
673
836
  var coverage = global[gcv] || (global[gcv] = {});
674
837
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -693,7 +856,8 @@ var Header = function Header(_ref) {
693
856
  className = _ref$className === void 0 ? (cov_14lmkczjok().b[0][0]++, "") : _ref$className,
694
857
  actionBlock = _ref.actionBlock,
695
858
  _ref$breadcrumbs = _ref.breadcrumbs,
696
- breadcrumbs = _ref$breadcrumbs === void 0 ? (cov_14lmkczjok().b[1][0]++, []) : _ref$breadcrumbs;
859
+ breadcrumbs = _ref$breadcrumbs === void 0 ? (cov_14lmkczjok().b[1][0]++, []) : _ref$breadcrumbs,
860
+ dropdownProps = _ref.dropdownProps;
697
861
  cov_14lmkczjok().f[0]++;
698
862
  var searchRef = (cov_14lmkczjok().s[1]++, useRef(null));
699
863
  cov_14lmkczjok().s[2]++;
@@ -714,16 +878,19 @@ var Header = function Header(_ref) {
714
878
  className: "neeto-molecules-header__left-data-wrap"
715
879
  }, (cov_14lmkczjok().b[3][0]++, breadcrumbs) && (cov_14lmkczjok().b[3][1]++, /*#__PURE__*/React.createElement(Breadcrumbs, {
716
880
  breadcrumbs: breadcrumbs
717
- })), /*#__PURE__*/React.createElement(Typography, {
718
- className: "neeto-molecules-header__page-title",
881
+ })), /*#__PURE__*/React.createElement("div", {
882
+ className: "neeto-molecules-header__page-title"
883
+ }, /*#__PURE__*/React.createElement(Typography, {
719
884
  "data-cy": "main-header",
720
885
  "data-test-id": "main-header",
721
886
  lineHeight: "tight",
722
887
  style: "h2",
723
888
  weight: "semibold"
724
- }, title))), /*#__PURE__*/React.createElement("div", {
889
+ }, title), (cov_14lmkczjok().b[4][0]++, dropdownProps) && (cov_14lmkczjok().b[4][1]++, /*#__PURE__*/React.createElement(Dropdown, {
890
+ dropdownProps: dropdownProps
891
+ }))))), /*#__PURE__*/React.createElement("div", {
725
892
  className: "neeto-ui-gap-3 neeto-molecules-header__right"
726
- }, (cov_14lmkczjok().b[4][0]++, searchProps) && (cov_14lmkczjok().b[4][1]++, /*#__PURE__*/React.createElement(Input, _extends({
893
+ }, (cov_14lmkczjok().b[5][0]++, searchProps) && (cov_14lmkczjok().b[5][1]++, /*#__PURE__*/React.createElement(Input, _extends({
727
894
  placeholder: "Search",
728
895
  prefix: /*#__PURE__*/React.createElement(Search, null),
729
896
  ref: searchRef,
@@ -732,35 +899,6 @@ var Header = function Header(_ref) {
732
899
  }, searchProps))), actionBlock));
733
900
  };
734
901
 
735
- function _objectWithoutPropertiesLoose(source, excluded) {
736
- if (source == null) return {};
737
- var target = {};
738
- var sourceKeys = Object.keys(source);
739
- var key, i;
740
- for (i = 0; i < sourceKeys.length; i++) {
741
- key = sourceKeys[i];
742
- if (excluded.indexOf(key) >= 0) continue;
743
- target[key] = source[key];
744
- }
745
- return target;
746
- }
747
-
748
- function _objectWithoutProperties(source, excluded) {
749
- if (source == null) return {};
750
- var target = _objectWithoutPropertiesLoose(source, excluded);
751
- var key, i;
752
- if (Object.getOwnPropertySymbols) {
753
- var sourceSymbolKeys = Object.getOwnPropertySymbols(source);
754
- for (i = 0; i < sourceSymbolKeys.length; i++) {
755
- key = sourceSymbolKeys[i];
756
- if (excluded.indexOf(key) >= 0) continue;
757
- if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;
758
- target[key] = source[key];
759
- }
760
- }
761
- return target;
762
- }
763
-
764
902
  var css$1 = ".neeto-molecules-pageloader__wrapper{height:100%;position:relative;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader{height:100%;left:0;position:absolute;top:0;width:100%}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__content{height:66px;margin-bottom:16px;overflow:hidden;padding:8px;position:relative;width:66px}.neeto-molecules-pageloader__wrapper .neeto-molecules-pageloader__text{color:rgb(var(--neeto-ui-gray-800));font-size:1.25rem;line-height:1.75rem;margin-bottom:4rem;text-align:center}.neeto-molecules-pageloader__spinner{display:flex;gap:2px;height:25px;left:50%;position:absolute;top:50%;transform:translate(-50%,-50%)}.neeto-molecules-pageloader__spinner>div{animation:neeto-ui-stretch-delay 1.2s ease-in-out infinite;background-color:#fff;border-radius:2px;display:inline-flex;height:100%;width:2px}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect2{animation-delay:-1.1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect3{animation-delay:-1s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect4{animation-delay:-.9s}.neeto-molecules-pageloader__spinner .neeto-molecules-pageloader__rect5{animation-delay:-.8s}@keyframes neeto-ui-stretch-delay{0%,40%,to{transform:scaleY(.4);-webkit-transform:scaleY(.4)}20%{transform:scaleY(1);-webkit-transform:scaleY(1)}}";
765
903
  n(css$1,{});
766
904
 
@@ -1882,7 +2020,7 @@ var Columns = function Columns(_ref) {
1882
2020
  _ref$searchProps = _ref.searchProps,
1883
2021
  searchProps = _ref$searchProps === void 0 ? (cov_1nk47gzsi8().b[8][0]++, {}) : _ref$searchProps;
1884
2022
  cov_1nk47gzsi8().f[0]++;
1885
- var _ref2 = (cov_1nk47gzsi8().s[1]++, Dropdown),
2023
+ var _ref2 = (cov_1nk47gzsi8().s[1]++, Dropdown$1),
1886
2024
  Divider = _ref2.Divider,
1887
2025
  Menu = _ref2.Menu,
1888
2026
  MenuItem = _ref2.MenuItem;
@@ -1925,7 +2063,7 @@ var Columns = function Columns(_ref) {
1925
2063
  cov_1nk47gzsi8().s[13]++;
1926
2064
  return /*#__PURE__*/React.createElement("div", {
1927
2065
  className: "neeto-molecules-subheader__columns"
1928
- }, /*#__PURE__*/React.createElement(Dropdown, _extends({
2066
+ }, /*#__PURE__*/React.createElement(Dropdown$1, _extends({
1929
2067
  buttonStyle: "text",
1930
2068
  closeOnSelect: false,
1931
2069
  position: "bottom-end",
@@ -3809,7 +3947,7 @@ function cov_20ap541pw6() {
3809
3947
  return actualCoverage;
3810
3948
  }
3811
3949
  cov_20ap541pw6();
3812
- var _ref = (cov_20ap541pw6().s[0]++, Dropdown),
3950
+ var _ref = (cov_20ap541pw6().s[0]++, Dropdown$1),
3813
3951
  Menu = _ref.Menu,
3814
3952
  MenuItem = _ref.MenuItem;
3815
3953
  cov_20ap541pw6().s[1]++;
@@ -3846,7 +3984,7 @@ var renderColumnData = function renderColumnData(enableManagePane, enableDeleteA
3846
3984
  cov_20ap541pw6().s[5]++;
3847
3985
  return e.stopPropagation();
3848
3986
  }
3849
- }, /*#__PURE__*/React.createElement(Dropdown, {
3987
+ }, /*#__PURE__*/React.createElement(Dropdown$1, {
3850
3988
  autoWidth: true,
3851
3989
  buttonProps: {
3852
3990
  style: "text"