@bigbinary/neeto-molecules 1.0.23 → 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.
@@ -3,7 +3,6 @@
3
3
  var React = require('react');
4
4
  var ramda = require('ramda');
5
5
  var reactRouterDom = require('react-router-dom');
6
- var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
7
6
  var neetoIcons = require('@bigbinary/neeto-icons');
8
7
  var neetoui = require('@bigbinary/neetoui');
9
8
  var reactI18next = require('react-i18next');
@@ -32605,9 +32604,499 @@ var Portal = function Portal(_ref) {
32605
32604
  return /*#__PURE__*/reactDom.exports.createPortal(children, target.current);
32606
32605
  };
32607
32606
 
32607
+ function cov_1r2ywuxngm() {
32608
+ var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Sidebar/AppSwitcher/utils.js";
32609
+ var hash = "288fa234e84e26ed8fa5ff782656864c5f046c27";
32610
+ var global = new Function("return this")();
32611
+ var gcv = "__coverage__";
32612
+ var coverageData = {
32613
+ path: "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Sidebar/AppSwitcher/utils.js",
32614
+ statementMap: {
32615
+ "0": {
32616
+ start: {
32617
+ line: 3,
32618
+ column: 33
32619
+ },
32620
+ end: {
32621
+ line: 29,
32622
+ column: 1
32623
+ }
32624
+ },
32625
+ "1": {
32626
+ start: {
32627
+ line: 4,
32628
+ column: 2
32629
+ },
32630
+ end: {
32631
+ line: 28,
32632
+ column: 39
32633
+ }
32634
+ },
32635
+ "2": {
32636
+ start: {
32637
+ line: 5,
32638
+ column: 21
32639
+ },
32640
+ end: {
32641
+ line: 20,
32642
+ column: 5
32643
+ }
32644
+ },
32645
+ "3": {
32646
+ start: {
32647
+ line: 7,
32648
+ column: 6
32649
+ },
32650
+ end: {
32651
+ line: 9,
32652
+ column: 7
32653
+ }
32654
+ },
32655
+ "4": {
32656
+ start: {
32657
+ line: 8,
32658
+ column: 8
32659
+ },
32660
+ end: {
32661
+ line: 8,
32662
+ column: 15
32663
+ }
32664
+ },
32665
+ "5": {
32666
+ start: {
32667
+ line: 11,
32668
+ column: 6
32669
+ },
32670
+ end: {
32671
+ line: 18,
32672
+ column: 7
32673
+ }
32674
+ },
32675
+ "6": {
32676
+ start: {
32677
+ line: 13,
32678
+ column: 8
32679
+ },
32680
+ end: {
32681
+ line: 15,
32682
+ column: 9
32683
+ }
32684
+ },
32685
+ "7": {
32686
+ start: {
32687
+ line: 14,
32688
+ column: 10
32689
+ },
32690
+ end: {
32691
+ line: 14,
32692
+ column: 25
32693
+ }
32694
+ },
32695
+ "8": {
32696
+ start: {
32697
+ line: 17,
32698
+ column: 8
32699
+ },
32700
+ end: {
32701
+ line: 17,
32702
+ column: 15
32703
+ }
32704
+ },
32705
+ "9": {
32706
+ start: {
32707
+ line: 19,
32708
+ column: 6
32709
+ },
32710
+ end: {
32711
+ line: 19,
32712
+ column: 21
32713
+ }
32714
+ },
32715
+ "10": {
32716
+ start: {
32717
+ line: 21,
32718
+ column: 4
32719
+ },
32720
+ end: {
32721
+ line: 21,
32722
+ column: 53
32723
+ }
32724
+ },
32725
+ "11": {
32726
+ start: {
32727
+ line: 22,
32728
+ column: 4
32729
+ },
32730
+ end: {
32731
+ line: 22,
32732
+ column: 54
32733
+ }
32734
+ },
32735
+ "12": {
32736
+ start: {
32737
+ line: 24,
32738
+ column: 4
32739
+ },
32740
+ end: {
32741
+ line: 27,
32742
+ column: 6
32743
+ }
32744
+ },
32745
+ "13": {
32746
+ start: {
32747
+ line: 25,
32748
+ column: 6
32749
+ },
32750
+ end: {
32751
+ line: 25,
32752
+ column: 58
32753
+ }
32754
+ },
32755
+ "14": {
32756
+ start: {
32757
+ line: 26,
32758
+ column: 6
32759
+ },
32760
+ end: {
32761
+ line: 26,
32762
+ column: 59
32763
+ }
32764
+ }
32765
+ },
32766
+ fnMap: {
32767
+ "0": {
32768
+ name: "(anonymous_0)",
32769
+ decl: {
32770
+ start: {
32771
+ line: 3,
32772
+ column: 33
32773
+ },
32774
+ end: {
32775
+ line: 3,
32776
+ column: 34
32777
+ }
32778
+ },
32779
+ loc: {
32780
+ start: {
32781
+ line: 3,
32782
+ column: 69
32783
+ },
32784
+ end: {
32785
+ line: 29,
32786
+ column: 1
32787
+ }
32788
+ },
32789
+ line: 3
32790
+ },
32791
+ "1": {
32792
+ name: "(anonymous_1)",
32793
+ decl: {
32794
+ start: {
32795
+ line: 4,
32796
+ column: 12
32797
+ },
32798
+ end: {
32799
+ line: 4,
32800
+ column: 13
32801
+ }
32802
+ },
32803
+ loc: {
32804
+ start: {
32805
+ line: 4,
32806
+ column: 18
32807
+ },
32808
+ end: {
32809
+ line: 28,
32810
+ column: 3
32811
+ }
32812
+ },
32813
+ line: 4
32814
+ },
32815
+ "2": {
32816
+ name: "(anonymous_2)",
32817
+ decl: {
32818
+ start: {
32819
+ line: 5,
32820
+ column: 21
32821
+ },
32822
+ end: {
32823
+ line: 5,
32824
+ column: 22
32825
+ }
32826
+ },
32827
+ loc: {
32828
+ start: {
32829
+ line: 5,
32830
+ column: 30
32831
+ },
32832
+ end: {
32833
+ line: 20,
32834
+ column: 5
32835
+ }
32836
+ },
32837
+ line: 5
32838
+ },
32839
+ "3": {
32840
+ name: "(anonymous_3)",
32841
+ decl: {
32842
+ start: {
32843
+ line: 24,
32844
+ column: 11
32845
+ },
32846
+ end: {
32847
+ line: 24,
32848
+ column: 12
32849
+ }
32850
+ },
32851
+ loc: {
32852
+ start: {
32853
+ line: 24,
32854
+ column: 17
32855
+ },
32856
+ end: {
32857
+ line: 27,
32858
+ column: 5
32859
+ }
32860
+ },
32861
+ line: 24
32862
+ }
32863
+ },
32864
+ branchMap: {
32865
+ "0": {
32866
+ loc: {
32867
+ start: {
32868
+ line: 7,
32869
+ column: 6
32870
+ },
32871
+ end: {
32872
+ line: 9,
32873
+ column: 7
32874
+ }
32875
+ },
32876
+ type: "if",
32877
+ locations: [{
32878
+ start: {
32879
+ line: 7,
32880
+ column: 6
32881
+ },
32882
+ end: {
32883
+ line: 9,
32884
+ column: 7
32885
+ }
32886
+ }, {
32887
+ start: {
32888
+ line: undefined,
32889
+ column: undefined
32890
+ },
32891
+ end: {
32892
+ line: undefined,
32893
+ column: undefined
32894
+ }
32895
+ }],
32896
+ line: 7
32897
+ },
32898
+ "1": {
32899
+ loc: {
32900
+ start: {
32901
+ line: 7,
32902
+ column: 10
32903
+ },
32904
+ end: {
32905
+ line: 7,
32906
+ column: 72
32907
+ }
32908
+ },
32909
+ type: "binary-expr",
32910
+ locations: [{
32911
+ start: {
32912
+ line: 7,
32913
+ column: 10
32914
+ },
32915
+ end: {
32916
+ line: 7,
32917
+ column: 28
32918
+ }
32919
+ }, {
32920
+ start: {
32921
+ line: 7,
32922
+ column: 32
32923
+ },
32924
+ end: {
32925
+ line: 7,
32926
+ column: 72
32927
+ }
32928
+ }],
32929
+ line: 7
32930
+ },
32931
+ "2": {
32932
+ loc: {
32933
+ start: {
32934
+ line: 11,
32935
+ column: 6
32936
+ },
32937
+ end: {
32938
+ line: 18,
32939
+ column: 7
32940
+ }
32941
+ },
32942
+ type: "if",
32943
+ locations: [{
32944
+ start: {
32945
+ line: 11,
32946
+ column: 6
32947
+ },
32948
+ end: {
32949
+ line: 18,
32950
+ column: 7
32951
+ }
32952
+ }, {
32953
+ start: {
32954
+ line: undefined,
32955
+ column: undefined
32956
+ },
32957
+ end: {
32958
+ line: undefined,
32959
+ column: undefined
32960
+ }
32961
+ }],
32962
+ line: 11
32963
+ },
32964
+ "3": {
32965
+ loc: {
32966
+ start: {
32967
+ line: 13,
32968
+ column: 8
32969
+ },
32970
+ end: {
32971
+ line: 15,
32972
+ column: 9
32973
+ }
32974
+ },
32975
+ type: "if",
32976
+ locations: [{
32977
+ start: {
32978
+ line: 13,
32979
+ column: 8
32980
+ },
32981
+ end: {
32982
+ line: 15,
32983
+ column: 9
32984
+ }
32985
+ }, {
32986
+ start: {
32987
+ line: undefined,
32988
+ column: undefined
32989
+ },
32990
+ end: {
32991
+ line: undefined,
32992
+ column: undefined
32993
+ }
32994
+ }],
32995
+ line: 13
32996
+ }
32997
+ },
32998
+ s: {
32999
+ "0": 0,
33000
+ "1": 0,
33001
+ "2": 0,
33002
+ "3": 0,
33003
+ "4": 0,
33004
+ "5": 0,
33005
+ "6": 0,
33006
+ "7": 0,
33007
+ "8": 0,
33008
+ "9": 0,
33009
+ "10": 0,
33010
+ "11": 0,
33011
+ "12": 0,
33012
+ "13": 0,
33013
+ "14": 0
33014
+ },
33015
+ f: {
33016
+ "0": 0,
33017
+ "1": 0,
33018
+ "2": 0,
33019
+ "3": 0
33020
+ },
33021
+ b: {
33022
+ "0": [0, 0],
33023
+ "1": [0, 0],
33024
+ "2": [0, 0],
33025
+ "3": [0, 0]
33026
+ },
33027
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
33028
+ hash: "288fa234e84e26ed8fa5ff782656864c5f046c27"
33029
+ };
33030
+ var coverage = global[gcv] || (global[gcv] = {});
33031
+ if (!coverage[path] || coverage[path].hash !== hash) {
33032
+ coverage[path] = coverageData;
33033
+ }
33034
+ var actualCoverage = coverage[path];
33035
+ {
33036
+ // @ts-ignore
33037
+ cov_1r2ywuxngm = function () {
33038
+ return actualCoverage;
33039
+ };
33040
+ }
33041
+ return actualCoverage;
33042
+ }
33043
+ cov_1r2ywuxngm();
33044
+ cov_1r2ywuxngm().s[0]++;
33045
+ var useOnClickOutside = function useOnClickOutside(insideRef, outsideRef, handler) {
33046
+ cov_1r2ywuxngm().f[0]++;
33047
+ cov_1r2ywuxngm().s[1]++;
33048
+ React.useEffect(function () {
33049
+ cov_1r2ywuxngm().f[1]++;
33050
+ cov_1r2ywuxngm().s[2]++;
33051
+ var listener = function listener(event) {
33052
+ cov_1r2ywuxngm().f[2]++;
33053
+ cov_1r2ywuxngm().s[3]++;
33054
+ // Do nothing if clicking ref's element or descendent elements
33055
+ if ((cov_1r2ywuxngm().b[1][0]++, !insideRef.current) || (cov_1r2ywuxngm().b[1][1]++, insideRef.current.contains(event.target))) {
33056
+ cov_1r2ywuxngm().b[0][0]++;
33057
+ cov_1r2ywuxngm().s[4]++;
33058
+ return;
33059
+ } else {
33060
+ cov_1r2ywuxngm().b[0][1]++;
33061
+ }
33062
+ cov_1r2ywuxngm().s[5]++;
33063
+ if (outsideRef.current) {
33064
+ cov_1r2ywuxngm().b[2][0]++;
33065
+ cov_1r2ywuxngm().s[6]++;
33066
+ // If Outside ref exists, trigger the handler if it contains the event target.
33067
+ if (outsideRef.current.contains(event.target)) {
33068
+ cov_1r2ywuxngm().b[3][0]++;
33069
+ cov_1r2ywuxngm().s[7]++;
33070
+ handler(event);
33071
+ } else {
33072
+ cov_1r2ywuxngm().b[3][1]++;
33073
+ }
33074
+ cov_1r2ywuxngm().s[8]++;
33075
+ return;
33076
+ } else {
33077
+ cov_1r2ywuxngm().b[2][1]++;
33078
+ }
33079
+ cov_1r2ywuxngm().s[9]++;
33080
+ handler(event);
33081
+ };
33082
+ cov_1r2ywuxngm().s[10]++;
33083
+ document.addEventListener("mousedown", listener);
33084
+ cov_1r2ywuxngm().s[11]++;
33085
+ document.addEventListener("touchstart", listener);
33086
+ cov_1r2ywuxngm().s[12]++;
33087
+ return function () {
33088
+ cov_1r2ywuxngm().f[3]++;
33089
+ cov_1r2ywuxngm().s[13]++;
33090
+ document.removeEventListener("mousedown", listener);
33091
+ cov_1r2ywuxngm().s[14]++;
33092
+ document.removeEventListener("touchstart", listener);
33093
+ };
33094
+ }, [insideRef, outsideRef, handler]);
33095
+ };
33096
+
32608
33097
  function cov_2lck7amjw7() {
32609
33098
  var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Sidebar/AppSwitcher/index.jsx";
32610
- var hash = "9e7dfb5276cd6b4e1c47045af63d80b09e5c44ed";
33099
+ var hash = "f48177db9e544dcc6e11b963cf49f5c34e8e9e6d";
32611
33100
  var global = new Function("return this")();
32612
33101
  var gcv = "__coverage__";
32613
33102
  var coverageData = {
@@ -32650,7 +33139,7 @@ function cov_2lck7amjw7() {
32650
33139
  },
32651
33140
  end: {
32652
33141
  line: 16,
32653
- column: 42
33142
+ column: 55
32654
33143
  }
32655
33144
  },
32656
33145
  "4": {
@@ -32714,7 +33203,7 @@ function cov_2lck7amjw7() {
32714
33203
  },
32715
33204
  b: {},
32716
33205
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
32717
- hash: "9e7dfb5276cd6b4e1c47045af63d80b09e5c44ed"
33206
+ hash: "f48177db9e544dcc6e11b963cf49f5c34e8e9e6d"
32718
33207
  };
32719
33208
  var coverage = global[gcv] || (global[gcv] = {});
32720
33209
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -32738,7 +33227,7 @@ var AppSwitcher = function AppSwitcher(_ref) {
32738
33227
  var paneWrapper = (cov_2lck7amjw7().s[1]++, React.useRef(null));
32739
33228
  var backdropRef = (cov_2lck7amjw7().s[2]++, React.useRef(null));
32740
33229
  cov_2lck7amjw7().s[3]++;
32741
- reactUtils.useOnClickOutside(backdropRef, onClose);
33230
+ useOnClickOutside(paneWrapper, backdropRef, onClose);
32742
33231
  cov_2lck7amjw7().s[4]++;
32743
33232
  useHotkeys("esc", onClose);
32744
33233
  cov_2lck7amjw7().s[5]++;