@bigbinary/neeto-molecules 1.0.21 → 1.0.23

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 (45) hide show
  1. package/README.md +1 -0
  2. package/dist/CustomDomain.cjs.js +1867 -225
  3. package/dist/CustomDomain.cjs.js.map +1 -1
  4. package/dist/CustomDomain.js +1874 -233
  5. package/dist/CustomDomain.js.map +1 -1
  6. package/dist/Header.cjs.js +218 -51
  7. package/dist/Header.cjs.js.map +1 -1
  8. package/dist/Header.js +220 -53
  9. package/dist/Header.js.map +1 -1
  10. package/dist/IpRestriction.cjs.js +77 -57
  11. package/dist/IpRestriction.cjs.js.map +1 -1
  12. package/dist/IpRestriction.js +79 -59
  13. package/dist/IpRestriction.js.map +1 -1
  14. package/dist/NeetoWidget.cjs.js +130 -144
  15. package/dist/NeetoWidget.cjs.js.map +1 -1
  16. package/dist/NeetoWidget.js +130 -144
  17. package/dist/NeetoWidget.js.map +1 -1
  18. package/dist/Rename.cjs.js +1314 -0
  19. package/dist/Rename.cjs.js.map +1 -0
  20. package/dist/Rename.js +1308 -0
  21. package/dist/Rename.js.map +1 -0
  22. package/dist/ResponsiveDevicePicker.cjs.js +547 -0
  23. package/dist/ResponsiveDevicePicker.cjs.js.map +1 -0
  24. package/dist/ResponsiveDevicePicker.js +541 -0
  25. package/dist/ResponsiveDevicePicker.js.map +1 -0
  26. package/dist/ShareViaEmail.cjs.js +155 -98
  27. package/dist/ShareViaEmail.cjs.js.map +1 -1
  28. package/dist/ShareViaEmail.js +155 -98
  29. package/dist/ShareViaEmail.js.map +1 -1
  30. package/dist/Sidebar.cjs.js +51 -35
  31. package/dist/Sidebar.cjs.js.map +1 -1
  32. package/dist/Sidebar.js +53 -37
  33. package/dist/Sidebar.js.map +1 -1
  34. package/dist/SubHeader.cjs.js +1683 -32
  35. package/dist/SubHeader.cjs.js.map +1 -1
  36. package/dist/SubHeader.js +1683 -33
  37. package/dist/SubHeader.js.map +1 -1
  38. package/package.json +5 -3
  39. package/src/translations/en.json +40 -33
  40. package/types/Header.d.ts +2 -0
  41. package/types/Rename.d.ts +59 -0
  42. package/types/ResponsiveDevicePicker.d.ts +30 -0
  43. package/types/ShareViaEmail.d.ts +1 -0
  44. package/types/SubHeader.d.ts +31 -1
  45. package/types/TableWrapper.d.ts +13 -5
package/dist/Rename.js ADDED
@@ -0,0 +1,1308 @@
1
+ import React, { useState, useRef, Fragment } from 'react';
2
+ import { noop } from '@bigbinary/neeto-commons-frontend/pure';
3
+ import { useOnClickOutside, useHotKeys } from '@bigbinary/neeto-commons-frontend/react-utils';
4
+ import { Check, Close, MenuHorizontal } from '@bigbinary/neeto-icons';
5
+ import { Dropdown, Typography, Input, Button } from '@bigbinary/neetoui';
6
+ import { isEmpty } from 'ramda';
7
+ import { Link } from 'react-router-dom';
8
+
9
+ function _extends() {
10
+ _extends = Object.assign ? Object.assign.bind() : function (target) {
11
+ for (var i = 1; i < arguments.length; i++) {
12
+ var source = arguments[i];
13
+ for (var key in source) {
14
+ if (Object.prototype.hasOwnProperty.call(source, key)) {
15
+ target[key] = source[key];
16
+ }
17
+ }
18
+ }
19
+ return target;
20
+ };
21
+ return _extends.apply(this, arguments);
22
+ }
23
+
24
+ function _arrayWithHoles(arr) {
25
+ if (Array.isArray(arr)) return arr;
26
+ }
27
+
28
+ function _iterableToArrayLimit(arr, i) {
29
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
30
+ if (null != _i) {
31
+ var _s,
32
+ _e,
33
+ _x,
34
+ _r,
35
+ _arr = [],
36
+ _n = !0,
37
+ _d = !1;
38
+ try {
39
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
40
+ if (Object(_i) !== _i) return;
41
+ _n = !1;
42
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
43
+ } catch (err) {
44
+ _d = !0, _e = err;
45
+ } finally {
46
+ try {
47
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
48
+ } finally {
49
+ if (_d) throw _e;
50
+ }
51
+ }
52
+ return _arr;
53
+ }
54
+ }
55
+
56
+ function _arrayLikeToArray(arr, len) {
57
+ if (len == null || len > arr.length) len = arr.length;
58
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
59
+ return arr2;
60
+ }
61
+
62
+ function _unsupportedIterableToArray(o, minLen) {
63
+ if (!o) return;
64
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
65
+ var n = Object.prototype.toString.call(o).slice(8, -1);
66
+ if (n === "Object" && o.constructor) n = o.constructor.name;
67
+ if (n === "Map" || n === "Set") return Array.from(o);
68
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
69
+ }
70
+
71
+ function _nonIterableRest() {
72
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
73
+ }
74
+
75
+ function _slicedToArray(arr, i) {
76
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
77
+ }
78
+
79
+ var classnames$1 = {exports: {}};
80
+
81
+ /*!
82
+ Copyright (c) 2018 Jed Watson.
83
+ Licensed under the MIT License (MIT), see
84
+ http://jedwatson.github.io/classnames
85
+ */
86
+
87
+ (function (module) {
88
+ /* global define */
89
+
90
+ (function () {
91
+
92
+ var hasOwn = {}.hasOwnProperty;
93
+
94
+ function classNames() {
95
+ var classes = [];
96
+
97
+ for (var i = 0; i < arguments.length; i++) {
98
+ var arg = arguments[i];
99
+ if (!arg) continue;
100
+
101
+ var argType = typeof arg;
102
+
103
+ if (argType === 'string' || argType === 'number') {
104
+ classes.push(arg);
105
+ } else if (Array.isArray(arg)) {
106
+ if (arg.length) {
107
+ var inner = classNames.apply(null, arg);
108
+ if (inner) {
109
+ classes.push(inner);
110
+ }
111
+ }
112
+ } else if (argType === 'object') {
113
+ if (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {
114
+ classes.push(arg.toString());
115
+ continue;
116
+ }
117
+
118
+ for (var key in arg) {
119
+ if (hasOwn.call(arg, key) && arg[key]) {
120
+ classes.push(key);
121
+ }
122
+ }
123
+ }
124
+ }
125
+
126
+ return classes.join(' ');
127
+ }
128
+
129
+ if (module.exports) {
130
+ classNames.default = classNames;
131
+ module.exports = classNames;
132
+ } else {
133
+ window.classNames = classNames;
134
+ }
135
+ }());
136
+ } (classnames$1));
137
+
138
+ var classnames = classnames$1.exports;
139
+
140
+ var e=[],t=[];function n(n,r){if(n&&"undefined"!=typeof document){var a,s=!0===r.prepend?"prepend":"append",d=!0===r.singleTag,i="string"==typeof r.container?document.querySelector(r.container):document.getElementsByTagName("head")[0];if(d){var u=e.indexOf(i);-1===u&&(u=e.push(i)-1,t[u]={}),a=t[u]&&t[u][s]?t[u][s]:t[u][s]=c();}else a=c();65279===n.charCodeAt(0)&&(n=n.substring(1)),a.styleSheet?a.styleSheet.cssText+=n:a.appendChild(document.createTextNode(n));}function c(){var e=document.createElement("style");if(e.setAttribute("type","text/css"),r.attributes)for(var t=Object.keys(r.attributes),n=0;n<t.length;n++)e.setAttribute(t[n],r.attributes[t[n]]);var a="prepend"===s?"afterbegin":"beforeend";return i.insertAdjacentElement(a,e),e}}
141
+
142
+ var css = ".neeto-molecules-rename__input{height:32px;margin-left:4px;position:relative;width:-moz-max-content;width:max-content}.neeto-molecules-rename__input .neeto-ui-input{border-color:transparent}.neeto-molecules-rename__input .neeto-ui-input:focus-within{border-color:rgb(var(--neeto-ui-primary-500))}.neeto-molecules-rename__input .neeto-ui-input .neeto-ui-input__suffix{margin-right:0!important}.neeto-molecules-rename__input .neeto-ui-input input{min-width:72px}.neeto-molecules-rename__text{background-color:rgb(var(--neeto-ui-white));border:thin solid rgb(var(--neeto-ui-white));border-radius:var(--neeto-ui-rounded);cursor:pointer;font-size:var(--neeto-ui-text-sm);font-weight:400;letter-spacing:.005em;line-height:1;margin:0 1px;max-height:32px;padding:8px 5px;transition:var(--neeto-ui-transition)}.neeto-molecules-rename__breadcrumb-text{color:rgb(var(--neeto-ui-gray-500))}.neeto-molecules-rename__breadcrumb-text:hover,.neeto-molecules-rename__display-text{color:rgb(var(--neeto-ui-gray-800))}.neeto-molecules-rename__display-text:hover{border:thin solid rgb(var(--neeto-ui-gray-300))}.neeto-molecules-breadcrumb__divider{font-weight:400;letter-spacing:.005em;line-height:16px;max-height:32px;padding:0;pointer-events:none}";
143
+ n(css,{});
144
+
145
+ function cov_11r4x10h1y() {
146
+ var path = "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Rename/index.jsx";
147
+ var hash = "a5d543739cd1e5afeed656dba3a035f8120ece77";
148
+ var global = new Function("return this")();
149
+ var gcv = "__coverage__";
150
+ var coverageData = {
151
+ path: "/home/runner/work/neeto-molecules/neeto-molecules/src/components/Rename/index.jsx",
152
+ statementMap: {
153
+ "0": {
154
+ start: {
155
+ line: 13,
156
+ column: 27
157
+ },
158
+ end: {
159
+ line: 13,
160
+ column: 35
161
+ }
162
+ },
163
+ "1": {
164
+ start: {
165
+ line: 15,
166
+ column: 15
167
+ },
168
+ end: {
169
+ line: 145,
170
+ column: 1
171
+ }
172
+ },
173
+ "2": {
174
+ start: {
175
+ line: 28,
176
+ column: 26
177
+ },
178
+ end: {
179
+ line: 28,
180
+ column: 41
181
+ }
182
+ },
183
+ "3": {
184
+ start: {
185
+ line: 29,
186
+ column: 34
187
+ },
188
+ end: {
189
+ line: 29,
190
+ column: 50
191
+ }
192
+ },
193
+ "4": {
194
+ start: {
195
+ line: 31,
196
+ column: 20
197
+ },
198
+ end: {
199
+ line: 31,
200
+ column: 32
201
+ }
202
+ },
203
+ "5": {
204
+ start: {
205
+ line: 33,
206
+ column: 2
207
+ },
208
+ end: {
209
+ line: 33,
210
+ column: 52
211
+ }
212
+ },
213
+ "6": {
214
+ start: {
215
+ line: 33,
216
+ column: 37
217
+ },
218
+ end: {
219
+ line: 33,
220
+ column: 50
221
+ }
222
+ },
223
+ "7": {
224
+ start: {
225
+ line: 35,
226
+ column: 23
227
+ },
228
+ end: {
229
+ line: 38,
230
+ column: 3
231
+ }
232
+ },
233
+ "8": {
234
+ start: {
235
+ line: 36,
236
+ column: 4
237
+ },
238
+ end: {
239
+ line: 36,
240
+ column: 19
241
+ }
242
+ },
243
+ "9": {
244
+ start: {
245
+ line: 37,
246
+ column: 4
247
+ },
248
+ end: {
249
+ line: 37,
250
+ column: 23
251
+ }
252
+ },
253
+ "10": {
254
+ start: {
255
+ line: 40,
256
+ column: 22
257
+ },
258
+ end: {
259
+ line: 43,
260
+ column: 3
261
+ }
262
+ },
263
+ "11": {
264
+ start: {
265
+ line: 41,
266
+ column: 4
267
+ },
268
+ end: {
269
+ line: 41,
270
+ column: 19
271
+ }
272
+ },
273
+ "12": {
274
+ start: {
275
+ line: 42,
276
+ column: 4
277
+ },
278
+ end: {
279
+ line: 42,
280
+ column: 23
281
+ }
282
+ },
283
+ "13": {
284
+ start: {
285
+ line: 45,
286
+ column: 2
287
+ },
288
+ end: {
289
+ line: 45,
290
+ column: 56
291
+ }
292
+ },
293
+ "14": {
294
+ start: {
295
+ line: 46,
296
+ column: 2
297
+ },
298
+ end: {
299
+ line: 46,
300
+ column: 77
301
+ }
302
+ },
303
+ "15": {
304
+ start: {
305
+ line: 46,
306
+ column: 37
307
+ },
308
+ end: {
309
+ line: 46,
310
+ column: 55
311
+ }
312
+ },
313
+ "16": {
314
+ start: {
315
+ line: 48,
316
+ column: 2
317
+ },
318
+ end: {
319
+ line: 144,
320
+ column: 4
321
+ }
322
+ },
323
+ "17": {
324
+ start: {
325
+ line: 51,
326
+ column: 8
327
+ },
328
+ end: {
329
+ line: 66,
330
+ column: 19
331
+ }
332
+ },
333
+ "18": {
334
+ start: {
335
+ line: 85,
336
+ column: 31
337
+ },
338
+ end: {
339
+ line: 85,
340
+ column: 49
341
+ }
342
+ },
343
+ "19": {
344
+ start: {
345
+ line: 97,
346
+ column: 29
347
+ },
348
+ end: {
349
+ line: 97,
350
+ column: 56
351
+ }
352
+ },
353
+ "20": {
354
+ start: {
355
+ line: 113,
356
+ column: 27
357
+ },
358
+ end: {
359
+ line: 113,
360
+ column: 62
361
+ }
362
+ },
363
+ "21": {
364
+ start: {
365
+ line: 129,
366
+ column: 50
367
+ },
368
+ end: {
369
+ line: 129,
370
+ column: 67
371
+ }
372
+ },
373
+ "22": {
374
+ start: {
375
+ line: 134,
376
+ column: 18
377
+ },
378
+ end: {
379
+ line: 136,
380
+ column: 36
381
+ }
382
+ }
383
+ },
384
+ fnMap: {
385
+ "0": {
386
+ name: "(anonymous_0)",
387
+ decl: {
388
+ start: {
389
+ line: 15,
390
+ column: 15
391
+ },
392
+ end: {
393
+ line: 15,
394
+ column: 16
395
+ }
396
+ },
397
+ loc: {
398
+ start: {
399
+ line: 27,
400
+ column: 6
401
+ },
402
+ end: {
403
+ line: 145,
404
+ column: 1
405
+ }
406
+ },
407
+ line: 27
408
+ },
409
+ "1": {
410
+ name: "(anonymous_1)",
411
+ decl: {
412
+ start: {
413
+ line: 33,
414
+ column: 31
415
+ },
416
+ end: {
417
+ line: 33,
418
+ column: 32
419
+ }
420
+ },
421
+ loc: {
422
+ start: {
423
+ line: 33,
424
+ column: 37
425
+ },
426
+ end: {
427
+ line: 33,
428
+ column: 50
429
+ }
430
+ },
431
+ line: 33
432
+ },
433
+ "2": {
434
+ name: "(anonymous_2)",
435
+ decl: {
436
+ start: {
437
+ line: 35,
438
+ column: 23
439
+ },
440
+ end: {
441
+ line: 35,
442
+ column: 24
443
+ }
444
+ },
445
+ loc: {
446
+ start: {
447
+ line: 35,
448
+ column: 31
449
+ },
450
+ end: {
451
+ line: 38,
452
+ column: 3
453
+ }
454
+ },
455
+ line: 35
456
+ },
457
+ "3": {
458
+ name: "(anonymous_3)",
459
+ decl: {
460
+ start: {
461
+ line: 40,
462
+ column: 22
463
+ },
464
+ end: {
465
+ line: 40,
466
+ column: 23
467
+ }
468
+ },
469
+ loc: {
470
+ start: {
471
+ line: 40,
472
+ column: 28
473
+ },
474
+ end: {
475
+ line: 43,
476
+ column: 3
477
+ }
478
+ },
479
+ line: 40
480
+ },
481
+ "4": {
482
+ name: "(anonymous_4)",
483
+ decl: {
484
+ start: {
485
+ line: 46,
486
+ column: 31
487
+ },
488
+ end: {
489
+ line: 46,
490
+ column: 32
491
+ }
492
+ },
493
+ loc: {
494
+ start: {
495
+ line: 46,
496
+ column: 37
497
+ },
498
+ end: {
499
+ line: 46,
500
+ column: 55
501
+ }
502
+ },
503
+ line: 46
504
+ },
505
+ "5": {
506
+ name: "(anonymous_5)",
507
+ decl: {
508
+ start: {
509
+ line: 50,
510
+ column: 23
511
+ },
512
+ end: {
513
+ line: 50,
514
+ column: 24
515
+ }
516
+ },
517
+ loc: {
518
+ start: {
519
+ line: 51,
520
+ column: 8
521
+ },
522
+ end: {
523
+ line: 66,
524
+ column: 19
525
+ }
526
+ },
527
+ line: 51
528
+ },
529
+ "6": {
530
+ name: "(anonymous_6)",
531
+ decl: {
532
+ start: {
533
+ line: 85,
534
+ column: 25
535
+ },
536
+ end: {
537
+ line: 85,
538
+ column: 26
539
+ }
540
+ },
541
+ loc: {
542
+ start: {
543
+ line: 85,
544
+ column: 31
545
+ },
546
+ end: {
547
+ line: 85,
548
+ column: 49
549
+ }
550
+ },
551
+ line: 85
552
+ },
553
+ "7": {
554
+ name: "(anonymous_7)",
555
+ decl: {
556
+ start: {
557
+ line: 97,
558
+ column: 20
559
+ },
560
+ end: {
561
+ line: 97,
562
+ column: 21
563
+ }
564
+ },
565
+ loc: {
566
+ start: {
567
+ line: 97,
568
+ column: 29
569
+ },
570
+ end: {
571
+ line: 97,
572
+ column: 56
573
+ }
574
+ },
575
+ line: 97
576
+ },
577
+ "8": {
578
+ name: "(anonymous_8)",
579
+ decl: {
580
+ start: {
581
+ line: 113,
582
+ column: 21
583
+ },
584
+ end: {
585
+ line: 113,
586
+ column: 22
587
+ }
588
+ },
589
+ loc: {
590
+ start: {
591
+ line: 113,
592
+ column: 27
593
+ },
594
+ end: {
595
+ line: 113,
596
+ column: 62
597
+ }
598
+ },
599
+ line: 113
600
+ },
601
+ "9": {
602
+ name: "(anonymous_9)",
603
+ decl: {
604
+ start: {
605
+ line: 129,
606
+ column: 44
607
+ },
608
+ end: {
609
+ line: 129,
610
+ column: 45
611
+ }
612
+ },
613
+ loc: {
614
+ start: {
615
+ line: 129,
616
+ column: 50
617
+ },
618
+ end: {
619
+ line: 129,
620
+ column: 67
621
+ }
622
+ },
623
+ line: 129
624
+ },
625
+ "10": {
626
+ name: "(anonymous_10)",
627
+ decl: {
628
+ start: {
629
+ line: 133,
630
+ column: 35
631
+ },
632
+ end: {
633
+ line: 133,
634
+ column: 36
635
+ }
636
+ },
637
+ loc: {
638
+ start: {
639
+ line: 134,
640
+ column: 18
641
+ },
642
+ end: {
643
+ line: 136,
644
+ column: 36
645
+ }
646
+ },
647
+ line: 134
648
+ }
649
+ },
650
+ branchMap: {
651
+ "0": {
652
+ loc: {
653
+ start: {
654
+ line: 17,
655
+ column: 2
656
+ },
657
+ end: {
658
+ line: 17,
659
+ column: 17
660
+ }
661
+ },
662
+ type: "default-arg",
663
+ locations: [{
664
+ start: {
665
+ line: 17,
666
+ column: 13
667
+ },
668
+ end: {
669
+ line: 17,
670
+ column: 17
671
+ }
672
+ }],
673
+ line: 17
674
+ },
675
+ "1": {
676
+ loc: {
677
+ start: {
678
+ line: 18,
679
+ column: 2
680
+ },
681
+ end: {
682
+ line: 18,
683
+ column: 16
684
+ }
685
+ },
686
+ type: "default-arg",
687
+ locations: [{
688
+ start: {
689
+ line: 18,
690
+ column: 11
691
+ },
692
+ end: {
693
+ line: 18,
694
+ column: 16
695
+ }
696
+ }],
697
+ line: 18
698
+ },
699
+ "2": {
700
+ loc: {
701
+ start: {
702
+ line: 19,
703
+ column: 2
704
+ },
705
+ end: {
706
+ line: 19,
707
+ column: 19
708
+ }
709
+ },
710
+ type: "default-arg",
711
+ locations: [{
712
+ start: {
713
+ line: 19,
714
+ column: 14
715
+ },
716
+ end: {
717
+ line: 19,
718
+ column: 19
719
+ }
720
+ }],
721
+ line: 19
722
+ },
723
+ "3": {
724
+ loc: {
725
+ start: {
726
+ line: 20,
727
+ column: 2
728
+ },
729
+ end: {
730
+ line: 20,
731
+ column: 18
732
+ }
733
+ },
734
+ type: "default-arg",
735
+ locations: [{
736
+ start: {
737
+ line: 20,
738
+ column: 16
739
+ },
740
+ end: {
741
+ line: 20,
742
+ column: 18
743
+ }
744
+ }],
745
+ line: 20
746
+ },
747
+ "4": {
748
+ loc: {
749
+ start: {
750
+ line: 21,
751
+ column: 2
752
+ },
753
+ end: {
754
+ line: 21,
755
+ column: 18
756
+ }
757
+ },
758
+ type: "default-arg",
759
+ locations: [{
760
+ start: {
761
+ line: 21,
762
+ column: 13
763
+ },
764
+ end: {
765
+ line: 21,
766
+ column: 18
767
+ }
768
+ }],
769
+ line: 21
770
+ },
771
+ "5": {
772
+ loc: {
773
+ start: {
774
+ line: 22,
775
+ column: 2
776
+ },
777
+ end: {
778
+ line: 22,
779
+ column: 18
780
+ }
781
+ },
782
+ type: "default-arg",
783
+ locations: [{
784
+ start: {
785
+ line: 22,
786
+ column: 13
787
+ },
788
+ end: {
789
+ line: 22,
790
+ column: 18
791
+ }
792
+ }],
793
+ line: 22
794
+ },
795
+ "6": {
796
+ loc: {
797
+ start: {
798
+ line: 23,
799
+ column: 2
800
+ },
801
+ end: {
802
+ line: 23,
803
+ column: 20
804
+ }
805
+ },
806
+ type: "default-arg",
807
+ locations: [{
808
+ start: {
809
+ line: 23,
810
+ column: 18
811
+ },
812
+ end: {
813
+ line: 23,
814
+ column: 20
815
+ }
816
+ }],
817
+ line: 23
818
+ },
819
+ "7": {
820
+ loc: {
821
+ start: {
822
+ line: 24,
823
+ column: 2
824
+ },
825
+ end: {
826
+ line: 24,
827
+ column: 18
828
+ }
829
+ },
830
+ type: "default-arg",
831
+ locations: [{
832
+ start: {
833
+ line: 24,
834
+ column: 16
835
+ },
836
+ end: {
837
+ line: 24,
838
+ column: 18
839
+ }
840
+ }],
841
+ line: 24
842
+ },
843
+ "8": {
844
+ loc: {
845
+ start: {
846
+ line: 25,
847
+ column: 2
848
+ },
849
+ end: {
850
+ line: 25,
851
+ column: 16
852
+ }
853
+ },
854
+ type: "default-arg",
855
+ locations: [{
856
+ start: {
857
+ line: 25,
858
+ column: 14
859
+ },
860
+ end: {
861
+ line: 25,
862
+ column: 16
863
+ }
864
+ }],
865
+ line: 25
866
+ },
867
+ "9": {
868
+ loc: {
869
+ start: {
870
+ line: 26,
871
+ column: 2
872
+ },
873
+ end: {
874
+ line: 26,
875
+ column: 17
876
+ }
877
+ },
878
+ type: "default-arg",
879
+ locations: [{
880
+ start: {
881
+ line: 26,
882
+ column: 15
883
+ },
884
+ end: {
885
+ line: 26,
886
+ column: 17
887
+ }
888
+ }],
889
+ line: 26
890
+ },
891
+ "10": {
892
+ loc: {
893
+ start: {
894
+ line: 68,
895
+ column: 7
896
+ },
897
+ end: {
898
+ line: 142,
899
+ column: 7
900
+ }
901
+ },
902
+ type: "cond-expr",
903
+ locations: [{
904
+ start: {
905
+ line: 69,
906
+ column: 8
907
+ },
908
+ end: {
909
+ line: 99,
910
+ column: 10
911
+ }
912
+ }, {
913
+ start: {
914
+ line: 101,
915
+ column: 8
916
+ },
917
+ end: {
918
+ line: 141,
919
+ column: 11
920
+ }
921
+ }],
922
+ line: 68
923
+ },
924
+ "11": {
925
+ loc: {
926
+ start: {
927
+ line: 81,
928
+ column: 26
929
+ },
930
+ end: {
931
+ line: 81,
932
+ column: 52
933
+ }
934
+ },
935
+ type: "binary-expr",
936
+ locations: [{
937
+ start: {
938
+ line: 81,
939
+ column: 26
940
+ },
941
+ end: {
942
+ line: 81,
943
+ column: 39
944
+ }
945
+ }, {
946
+ start: {
947
+ line: 81,
948
+ column: 43
949
+ },
950
+ end: {
951
+ line: 81,
952
+ column: 52
953
+ }
954
+ }],
955
+ line: 81
956
+ },
957
+ "12": {
958
+ loc: {
959
+ start: {
960
+ line: 113,
961
+ column: 27
962
+ },
963
+ end: {
964
+ line: 113,
965
+ column: 62
966
+ }
967
+ },
968
+ type: "binary-expr",
969
+ locations: [{
970
+ start: {
971
+ line: 113,
972
+ column: 27
973
+ },
974
+ end: {
975
+ line: 113,
976
+ column: 36
977
+ }
978
+ }, {
979
+ start: {
980
+ line: 113,
981
+ column: 40
982
+ },
983
+ end: {
984
+ line: 113,
985
+ column: 62
986
+ }
987
+ }],
988
+ line: 113
989
+ },
990
+ "13": {
991
+ loc: {
992
+ start: {
993
+ line: 118,
994
+ column: 11
995
+ },
996
+ end: {
997
+ line: 140,
998
+ column: 11
999
+ }
1000
+ },
1001
+ type: "binary-expr",
1002
+ locations: [{
1003
+ start: {
1004
+ line: 118,
1005
+ column: 11
1006
+ },
1007
+ end: {
1008
+ line: 118,
1009
+ column: 20
1010
+ }
1011
+ }, {
1012
+ start: {
1013
+ line: 118,
1014
+ column: 25
1015
+ },
1016
+ end: {
1017
+ line: 118,
1018
+ column: 49
1019
+ }
1020
+ }, {
1021
+ start: {
1022
+ line: 118,
1023
+ column: 53
1024
+ },
1025
+ end: {
1026
+ line: 118,
1027
+ column: 62
1028
+ }
1029
+ }, {
1030
+ start: {
1031
+ line: 119,
1032
+ column: 12
1033
+ },
1034
+ end: {
1035
+ line: 139,
1036
+ column: 23
1037
+ }
1038
+ }],
1039
+ line: 118
1040
+ },
1041
+ "14": {
1042
+ loc: {
1043
+ start: {
1044
+ line: 128,
1045
+ column: 17
1046
+ },
1047
+ end: {
1048
+ line: 132,
1049
+ column: 17
1050
+ }
1051
+ },
1052
+ type: "binary-expr",
1053
+ locations: [{
1054
+ start: {
1055
+ line: 128,
1056
+ column: 17
1057
+ },
1058
+ end: {
1059
+ line: 128,
1060
+ column: 26
1061
+ }
1062
+ }, {
1063
+ start: {
1064
+ line: 129,
1065
+ column: 18
1066
+ },
1067
+ end: {
1068
+ line: 131,
1069
+ column: 36
1070
+ }
1071
+ }],
1072
+ line: 128
1073
+ }
1074
+ },
1075
+ s: {
1076
+ "0": 0,
1077
+ "1": 0,
1078
+ "2": 0,
1079
+ "3": 0,
1080
+ "4": 0,
1081
+ "5": 0,
1082
+ "6": 0,
1083
+ "7": 0,
1084
+ "8": 0,
1085
+ "9": 0,
1086
+ "10": 0,
1087
+ "11": 0,
1088
+ "12": 0,
1089
+ "13": 0,
1090
+ "14": 0,
1091
+ "15": 0,
1092
+ "16": 0,
1093
+ "17": 0,
1094
+ "18": 0,
1095
+ "19": 0,
1096
+ "20": 0,
1097
+ "21": 0,
1098
+ "22": 0
1099
+ },
1100
+ f: {
1101
+ "0": 0,
1102
+ "1": 0,
1103
+ "2": 0,
1104
+ "3": 0,
1105
+ "4": 0,
1106
+ "5": 0,
1107
+ "6": 0,
1108
+ "7": 0,
1109
+ "8": 0,
1110
+ "9": 0,
1111
+ "10": 0
1112
+ },
1113
+ b: {
1114
+ "0": [0],
1115
+ "1": [0],
1116
+ "2": [0],
1117
+ "3": [0],
1118
+ "4": [0],
1119
+ "5": [0],
1120
+ "6": [0],
1121
+ "7": [0],
1122
+ "8": [0],
1123
+ "9": [0],
1124
+ "10": [0, 0],
1125
+ "11": [0, 0],
1126
+ "12": [0, 0],
1127
+ "13": [0, 0, 0, 0],
1128
+ "14": [0, 0]
1129
+ },
1130
+ _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
1131
+ hash: "a5d543739cd1e5afeed656dba3a035f8120ece77"
1132
+ };
1133
+ var coverage = global[gcv] || (global[gcv] = {});
1134
+ if (!coverage[path] || coverage[path].hash !== hash) {
1135
+ coverage[path] = coverageData;
1136
+ }
1137
+ var actualCoverage = coverage[path];
1138
+ {
1139
+ // @ts-ignore
1140
+ cov_11r4x10h1y = function () {
1141
+ return actualCoverage;
1142
+ };
1143
+ }
1144
+ return actualCoverage;
1145
+ }
1146
+ cov_11r4x10h1y();
1147
+ var _ref = (cov_11r4x10h1y().s[0]++, Dropdown),
1148
+ Menu = _ref.Menu,
1149
+ MenuItem = _ref.MenuItem;
1150
+ cov_11r4x10h1y().s[1]++;
1151
+ var Rename = function Rename(_ref2) {
1152
+ var value = _ref2.value,
1153
+ _ref2$onRename = _ref2.onRename,
1154
+ onRename = _ref2$onRename === void 0 ? (cov_11r4x10h1y().b[0][0]++, noop) : _ref2$onRename,
1155
+ _ref2$isOpen = _ref2.isOpen,
1156
+ isOpen = _ref2$isOpen === void 0 ? (cov_11r4x10h1y().b[1][0]++, false) : _ref2$isOpen,
1157
+ _ref2$isLoading = _ref2.isLoading,
1158
+ isLoading = _ref2$isLoading === void 0 ? (cov_11r4x10h1y().b[2][0]++, false) : _ref2$isLoading,
1159
+ _ref2$placeholder = _ref2.placeholder,
1160
+ placeholder = _ref2$placeholder === void 0 ? (cov_11r4x10h1y().b[3][0]++, "") : _ref2$placeholder,
1161
+ _ref2$hideMenu = _ref2.hideMenu,
1162
+ hideMenu = _ref2$hideMenu === void 0 ? (cov_11r4x10h1y().b[4][0]++, false) : _ref2$hideMenu,
1163
+ _ref2$disabled = _ref2.disabled,
1164
+ disabled = _ref2$disabled === void 0 ? (cov_11r4x10h1y().b[5][0]++, false) : _ref2$disabled,
1165
+ _ref2$dropdownItems = _ref2.dropdownItems,
1166
+ dropdownItems = _ref2$dropdownItems === void 0 ? (cov_11r4x10h1y().b[6][0]++, []) : _ref2$dropdownItems,
1167
+ _ref2$breadcrumbs = _ref2.breadcrumbs,
1168
+ breadcrumbs = _ref2$breadcrumbs === void 0 ? (cov_11r4x10h1y().b[7][0]++, []) : _ref2$breadcrumbs,
1169
+ _ref2$textProps = _ref2.textProps,
1170
+ textProps = _ref2$textProps === void 0 ? (cov_11r4x10h1y().b[8][0]++, {}) : _ref2$textProps,
1171
+ _ref2$inputProps = _ref2.inputProps,
1172
+ inputProps = _ref2$inputProps === void 0 ? (cov_11r4x10h1y().b[9][0]++, {}) : _ref2$inputProps;
1173
+ cov_11r4x10h1y().f[0]++;
1174
+ var _ref3 = (cov_11r4x10h1y().s[2]++, useState(value)),
1175
+ _ref4 = _slicedToArray(_ref3, 2),
1176
+ name = _ref4[0],
1177
+ setName = _ref4[1];
1178
+ var _ref5 = (cov_11r4x10h1y().s[3]++, useState(isOpen)),
1179
+ _ref6 = _slicedToArray(_ref5, 2),
1180
+ editMode = _ref6[0],
1181
+ setEditMode = _ref6[1];
1182
+ var renameRef = (cov_11r4x10h1y().s[4]++, useRef(null));
1183
+ cov_11r4x10h1y().s[5]++;
1184
+ useOnClickOutside(renameRef, function () {
1185
+ cov_11r4x10h1y().f[1]++;
1186
+ cov_11r4x10h1y().s[6]++;
1187
+ return handleClose();
1188
+ });
1189
+ cov_11r4x10h1y().s[7]++;
1190
+ var handleRename = function handleRename(name) {
1191
+ cov_11r4x10h1y().f[2]++;
1192
+ cov_11r4x10h1y().s[8]++;
1193
+ onRename(name);
1194
+ cov_11r4x10h1y().s[9]++;
1195
+ setEditMode(false);
1196
+ };
1197
+ cov_11r4x10h1y().s[10]++;
1198
+ var handleClose = function handleClose() {
1199
+ cov_11r4x10h1y().f[3]++;
1200
+ cov_11r4x10h1y().s[11]++;
1201
+ setName(value);
1202
+ cov_11r4x10h1y().s[12]++;
1203
+ setEditMode(false);
1204
+ };
1205
+ cov_11r4x10h1y().s[13]++;
1206
+ useHotKeys("escape", handleClose, {
1207
+ mode: "global"
1208
+ });
1209
+ cov_11r4x10h1y().s[14]++;
1210
+ useHotKeys("command+return", function () {
1211
+ cov_11r4x10h1y().f[4]++;
1212
+ cov_11r4x10h1y().s[15]++;
1213
+ return handleRename(name);
1214
+ }, {
1215
+ mode: "global"
1216
+ });
1217
+ cov_11r4x10h1y().s[16]++;
1218
+ return /*#__PURE__*/React.createElement("div", {
1219
+ className: "flex w-max flex-row items-center",
1220
+ ref: renameRef
1221
+ }, breadcrumbs.map(function (_ref7) {
1222
+ var text = _ref7.text,
1223
+ link = _ref7.link;
1224
+ cov_11r4x10h1y().f[5]++;
1225
+ cov_11r4x10h1y().s[17]++;
1226
+ return /*#__PURE__*/React.createElement(Fragment, {
1227
+ key: text
1228
+ }, /*#__PURE__*/React.createElement(Link, _extends({
1229
+ className: "neeto-molecules-rename__text neeto-molecules-rename__breadcrumb-text",
1230
+ "data-testid": "neeto-molecules-value-display",
1231
+ to: link
1232
+ }, textProps), text), /*#__PURE__*/React.createElement(Typography, {
1233
+ className: "neeto-molecules-rename__breadcrumb-text neeto-molecules-breadcrumb__divider",
1234
+ component: "span"
1235
+ }, "/"));
1236
+ }), editMode ? (cov_11r4x10h1y().b[10][0]++, /*#__PURE__*/React.createElement(Input, _extends({
1237
+ autoFocus: true,
1238
+ className: "neeto-molecules-rename__input",
1239
+ "data-testid": "neeto-molecules-name-input",
1240
+ placeholder: placeholder,
1241
+ style: {
1242
+ width: "".concat(Math.min(Math.max(name.length, 2), 50), "ch")
1243
+ },
1244
+ value: name,
1245
+ suffix: /*#__PURE__*/React.createElement("div", {
1246
+ className: "flex items-center justify-end"
1247
+ }, /*#__PURE__*/React.createElement(Button, {
1248
+ className: "rounded-none",
1249
+ "data-testid": "neeto-molecules-rename-button",
1250
+ disabled: (cov_11r4x10h1y().b[11][0]++, isEmpty(name)) || (cov_11r4x10h1y().b[11][1]++, isLoading),
1251
+ icon: Check,
1252
+ loading: isLoading,
1253
+ style: "text",
1254
+ onClick: function onClick() {
1255
+ cov_11r4x10h1y().f[6]++;
1256
+ cov_11r4x10h1y().s[18]++;
1257
+ return handleRename(name);
1258
+ }
1259
+ }), /*#__PURE__*/React.createElement(Button, {
1260
+ className: "rounded-none",
1261
+ "data-testid": "neeto-molecules-cancel-button",
1262
+ disabled: isLoading,
1263
+ icon: Close,
1264
+ style: "text",
1265
+ onClick: handleClose
1266
+ })),
1267
+ onChange: function onChange(event) {
1268
+ cov_11r4x10h1y().f[7]++;
1269
+ cov_11r4x10h1y().s[19]++;
1270
+ return setName(event.target.value);
1271
+ }
1272
+ }, inputProps))) : (cov_11r4x10h1y().b[10][1]++, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(Typography, _extends({
1273
+ component: "p",
1274
+ "data-testid": "neeto-molecules-value-display",
1275
+ style: "body2",
1276
+ className: classnames("neeto-molecules-rename__text neeto-molecules-rename__display-text", {
1277
+ "cursor-pointer": !disabled,
1278
+ "pointer-events-none cursor-text": disabled
1279
+ }),
1280
+ onClick: function onClick() {
1281
+ cov_11r4x10h1y().f[8]++;
1282
+ cov_11r4x10h1y().s[20]++;
1283
+ return (cov_11r4x10h1y().b[12][0]++, !disabled) && (cov_11r4x10h1y().b[12][1]++, setEditMode(!editMode));
1284
+ }
1285
+ }, textProps), value), (cov_11r4x10h1y().b[13][0]++, !hideMenu) && ((cov_11r4x10h1y().b[13][1]++, dropdownItems.length > 0) || (cov_11r4x10h1y().b[13][2]++, !disabled)) && (cov_11r4x10h1y().b[13][3]++, /*#__PURE__*/React.createElement(Dropdown, {
1286
+ buttonStyle: "text",
1287
+ icon: MenuHorizontal,
1288
+ position: "bottom-start",
1289
+ buttonProps: {
1290
+ "data-testid": "neeto-molecules-menu-button"
1291
+ }
1292
+ }, /*#__PURE__*/React.createElement(Menu, null, (cov_11r4x10h1y().b[14][0]++, !disabled) && (cov_11r4x10h1y().b[14][1]++, /*#__PURE__*/React.createElement(MenuItem.Button, {
1293
+ onClick: function onClick() {
1294
+ cov_11r4x10h1y().f[9]++;
1295
+ cov_11r4x10h1y().s[21]++;
1296
+ return setEditMode(true);
1297
+ }
1298
+ }, "Rename")), dropdownItems.map(function (item) {
1299
+ cov_11r4x10h1y().f[10]++;
1300
+ cov_11r4x10h1y().s[22]++;
1301
+ return /*#__PURE__*/React.createElement(MenuItem.Button, _extends({
1302
+ key: item.label
1303
+ }, item), item.label);
1304
+ })))))));
1305
+ };
1306
+
1307
+ export { Rename as default };
1308
+ //# sourceMappingURL=Rename.js.map