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