@wavelengthusaf/components 5.0.3 → 5.0.6

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.
@@ -92,6 +92,423 @@ WavelengthButton.displayName = "WavelengthButton";
92
92
  // src/index.ts
93
93
 
94
94
 
95
+ // src/components/buttons/WavelengthButton/WavelengthStyledButton.tsx
96
+ var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
97
+
98
+ var ButtonPresets = {
99
+ default: {
100
+ width: "130px",
101
+ height: "45px",
102
+ display: "flex",
103
+ flexDirection: "row",
104
+ alignItems: "center",
105
+ justifyContent: "center",
106
+ borderRadius: "8px",
107
+ border: "none",
108
+ fontSize: "",
109
+ fontWeight: 600,
110
+ color: "",
111
+ margin: "",
112
+ padding: "",
113
+ backgroundColor: "",
114
+ hover: {
115
+ backgroundColor: "",
116
+ color: "",
117
+ cursor: "pointer",
118
+ width: "",
119
+ height: "",
120
+ border: "",
121
+ fontSize: ""
122
+ },
123
+ disabled: {
124
+ cursor: "",
125
+ opacity: ""
126
+ },
127
+ active: {
128
+ backgroundColor: "",
129
+ boxShadow: "",
130
+ transition: "",
131
+ border: ""
132
+ }
133
+ },
134
+ ewdms_primary: {
135
+ width: "130px",
136
+ height: "45px",
137
+ display: "flex",
138
+ flexDirection: "row",
139
+ alignItems: "center",
140
+ justifyContent: "center",
141
+ borderRadius: "8px",
142
+ border: "none",
143
+ fontSize: "16px",
144
+ fontWeight: 600,
145
+ color: "white",
146
+ margin: "",
147
+ padding: "12px 32px",
148
+ backgroundColor: "rgba(26, 128, 131, 1)",
149
+ hover: {
150
+ backgroundColor: "rgba(38, 186, 190, 1)",
151
+ color: "rgba(247, 247, 249, 1)",
152
+ cursor: "pointer",
153
+ width: "",
154
+ height: "",
155
+ border: "",
156
+ fontSize: ""
157
+ },
158
+ disabled: {
159
+ cursor: "not-allowed",
160
+ opacity: "0.4"
161
+ },
162
+ active: {
163
+ backgroundColor: "#67a8aa",
164
+ boxShadow: "",
165
+ transition: "background-color 0.2s ease-in",
166
+ border: ""
167
+ }
168
+ },
169
+ ewdms_secondary: {
170
+ width: "130px",
171
+ height: "45px",
172
+ display: "flex",
173
+ flexDirection: "row",
174
+ alignItems: "center",
175
+ justifyContent: "center",
176
+ borderRadius: "8px",
177
+ border: "1px solid rgba(26, 128, 131, 1)",
178
+ fontSize: "16px",
179
+ fontWeight: 600,
180
+ margin: "",
181
+ color: "rgba(26, 128, 131, 1)",
182
+ padding: "12px 32px",
183
+ backgroundColor: "transparent",
184
+ hover: {
185
+ backgroundColor: "rgba(26, 128, 131, 0.1)",
186
+ color: "rgba(26, 128, 131, 1)",
187
+ cursor: "pointer",
188
+ width: "",
189
+ height: "",
190
+ border: "",
191
+ fontSize: ""
192
+ },
193
+ disabled: {
194
+ cursor: "not-allowed",
195
+ opacity: "0.4"
196
+ },
197
+ active: {
198
+ backgroundColor: "#bad7da",
199
+ boxShadow: "",
200
+ transition: "background-color 0.2s ease-in",
201
+ border: ""
202
+ }
203
+ },
204
+ ewdms_tertiary: {
205
+ width: "130px",
206
+ height: "45px",
207
+ display: "flex",
208
+ margin: "",
209
+ flexDirection: "row",
210
+ alignItems: "center",
211
+ justifyContent: "center",
212
+ borderRadius: "8px",
213
+ border: "none",
214
+ fontSize: "16px",
215
+ fontWeight: 600,
216
+ color: "rgba(26, 128, 131, 1)",
217
+ padding: "12px 32px",
218
+ backgroundColor: "transparent",
219
+ hover: {
220
+ backgroundColor: "rgba(26, 128, 131, 0.1)",
221
+ color: "rgba(26, 128, 131, 1)",
222
+ cursor: "pointer",
223
+ width: "",
224
+ height: "",
225
+ border: "",
226
+ fontSize: ""
227
+ },
228
+ disabled: {
229
+ cursor: "not-allowed",
230
+ opacity: "0.4"
231
+ },
232
+ active: {
233
+ backgroundColor: "#445C71",
234
+ boxShadow: "",
235
+ transition: "background-color 0.2s ease-in",
236
+ border: ""
237
+ }
238
+ },
239
+ channel_one_launch: {
240
+ width: "62px",
241
+ height: "24px",
242
+ display: "flex",
243
+ margin: "",
244
+ flexDirection: "row",
245
+ alignItems: "center",
246
+ justifyContent: "center",
247
+ borderRadius: "20px",
248
+ border: "none",
249
+ fontSize: "10px",
250
+ fontWeight: 700,
251
+ color: "white",
252
+ padding: "0px 0px",
253
+ backgroundColor: "#24A818",
254
+ hover: {
255
+ height: "28px",
256
+ border: "0.5px solid white",
257
+ fontSize: "12px",
258
+ width: "72px",
259
+ backgroundColor: "",
260
+ color: "",
261
+ cursor: "pointer"
262
+ },
263
+ disabled: {
264
+ cursor: "not-allowed",
265
+ opacity: "0.4"
266
+ },
267
+ active: {
268
+ backgroundColor: "#6FC36E",
269
+ boxShadow: "",
270
+ transition: "background-color 0.2s ease-in",
271
+ border: ""
272
+ }
273
+ },
274
+ channel_one_request: {
275
+ width: "100px",
276
+ height: "24px",
277
+ display: "flex",
278
+ flexDirection: "row",
279
+ alignItems: "center",
280
+ margin: "",
281
+ justifyContent: "center",
282
+ borderRadius: "20px",
283
+ border: "none",
284
+ fontSize: "10px",
285
+ fontWeight: 700,
286
+ color: "white",
287
+ padding: "0px 0px",
288
+ backgroundColor: "#1D31E4",
289
+ hover: {
290
+ height: "28px",
291
+ border: "0.5px solid white",
292
+ fontSize: "12px",
293
+ width: "110px",
294
+ backgroundColor: "",
295
+ color: "",
296
+ cursor: "pointer"
297
+ },
298
+ disabled: {
299
+ cursor: "not-allowed",
300
+ opacity: "0.4"
301
+ },
302
+ active: {
303
+ backgroundColor: "#5D78ED",
304
+ boxShadow: "",
305
+ transition: "background-color 0.2s ease-in",
306
+ border: ""
307
+ }
308
+ },
309
+ channel_one_pending: {
310
+ width: "62px",
311
+ height: "24px",
312
+ display: "flex",
313
+ flexDirection: "row",
314
+ alignItems: "center",
315
+ justifyContent: "center",
316
+ borderRadius: "20px",
317
+ border: "none",
318
+ fontSize: "10px",
319
+ fontWeight: 700,
320
+ color: "white",
321
+ padding: "0px 0px",
322
+ margin: "",
323
+ backgroundColor: "#F88805",
324
+ hover: {
325
+ height: "28px",
326
+ border: "0.5px solid white",
327
+ fontSize: "12px",
328
+ width: "72px",
329
+ backgroundColor: "",
330
+ color: "",
331
+ cursor: "pointer"
332
+ },
333
+ disabled: {
334
+ cursor: "not-allowed",
335
+ opacity: "0.4"
336
+ },
337
+ active: {
338
+ backgroundColor: "#FAAD68",
339
+ boxShadow: "",
340
+ transition: "background-color 0.2s ease-in",
341
+ border: ""
342
+ }
343
+ },
344
+ channel_one_disabled: {
345
+ width: "100px",
346
+ height: "24px",
347
+ display: "flex",
348
+ margin: "",
349
+ flexDirection: "row",
350
+ alignItems: "center",
351
+ justifyContent: "center",
352
+ borderRadius: "20px",
353
+ border: "none",
354
+ fontSize: "10px",
355
+ fontWeight: 700,
356
+ color: "white",
357
+ padding: "0px 0px",
358
+ backgroundColor: "#9E9E9E",
359
+ hover: {
360
+ height: "",
361
+ border: "",
362
+ fontSize: "",
363
+ width: "",
364
+ backgroundColor: "",
365
+ color: "",
366
+ cursor: ""
367
+ },
368
+ disabled: {
369
+ cursor: "not-allowed",
370
+ opacity: "0.4"
371
+ },
372
+ active: {
373
+ backgroundColor: "",
374
+ boxShadow: "",
375
+ transition: "",
376
+ border: ""
377
+ }
378
+ },
379
+ channel_one_transparent: {
380
+ width: "70px",
381
+ height: "25px",
382
+ display: "flex",
383
+ flexDirection: "row",
384
+ alignItems: "center",
385
+ margin: "",
386
+ justifyContent: "center",
387
+ borderRadius: "6px",
388
+ border: "1px solid white",
389
+ fontSize: "10px",
390
+ fontWeight: 500,
391
+ color: "white",
392
+ padding: "0px !important",
393
+ backgroundColor: "transparent",
394
+ hover: {
395
+ height: "",
396
+ border: "",
397
+ fontSize: "",
398
+ width: "",
399
+ backgroundColor: "",
400
+ color: "",
401
+ cursor: "pointer"
402
+ },
403
+ disabled: {
404
+ cursor: "",
405
+ opacity: ""
406
+ },
407
+ active: {
408
+ backgroundColor: "rgba(255, 255, 255, 0.22)",
409
+ boxShadow: "",
410
+ transition: "background-color 0.2s ease-in",
411
+ border: ""
412
+ }
413
+ },
414
+ brewery: {
415
+ width: "138px",
416
+ height: "44px",
417
+ display: "flex",
418
+ flexDirection: "row",
419
+ alignItems: "center",
420
+ justifyContent: "center",
421
+ borderRadius: "6px",
422
+ border: "none",
423
+ fontSize: "16px",
424
+ margin: "",
425
+ fontWeight: 500,
426
+ color: "white",
427
+ padding: "12px 16px",
428
+ backgroundColor: "#D16A2F",
429
+ hover: {
430
+ height: "",
431
+ border: "",
432
+ fontSize: "",
433
+ width: "",
434
+ backgroundColor: "#D16A2F",
435
+ color: "",
436
+ cursor: "pointer"
437
+ },
438
+ disabled: {
439
+ cursor: "not-allowed",
440
+ opacity: "0.4"
441
+ },
442
+ active: {
443
+ backgroundColor: "",
444
+ boxShadow: "0 0 5px black",
445
+ transition: "",
446
+ border: ""
447
+ }
448
+ }
449
+ };
450
+ var Button = _styledcomponents2.default.button`
451
+ ${({ type }) => {
452
+ const preset = ButtonPresets[type];
453
+ return `
454
+ width: ${preset.width};
455
+ height: ${preset.height};
456
+ display: ${preset.display};
457
+ flex-direction: ${preset.flexDirection};
458
+ align-items: ${preset.alignItems};
459
+ justify-content: ${preset.justifyContent};
460
+ border-radius: ${preset.borderRadius};
461
+ border: ${preset.border};
462
+ font-size: ${preset.fontSize};
463
+ font-weight: ${preset.fontWeight};
464
+ color: ${preset.color};
465
+ padding: ${preset.padding};
466
+ background-color: ${preset.backgroundColor};
467
+ margin: ${preset.margin};
468
+
469
+ &:hover {
470
+ background-color: ${preset.hover.backgroundColor};
471
+ color: ${preset.hover.color};
472
+ cursor: ${preset.hover.cursor};
473
+ width:${preset.hover.width};
474
+ height:${preset.hover.height};
475
+ border:${preset.hover.border};
476
+ font-size:${preset.hover.fontSize};
477
+ }
478
+
479
+ &:disabled {
480
+ cursor: ${preset.disabled.cursor};
481
+ opacity: ${preset.disabled.opacity};
482
+ }
483
+ &:active {
484
+ background-color: ${preset.active.backgroundColor};
485
+ box-shadow: ${preset.active.boxShadow};
486
+ border: ${preset.active.border};
487
+ transition: ${preset.active.transition};
488
+ }
489
+
490
+ `;
491
+ }}
492
+
493
+ ${({ styles }) => styles && { ...styles }}
494
+ ${({ hoverstyles }) => hoverstyles && {
495
+ "&:hover": { ...hoverstyles }
496
+ }}
497
+ ${({ activestyles }) => activestyles && {
498
+ "&:active": { ...activestyles }
499
+ }}
500
+ ${({ disabledstyles }) => disabledstyles && {
501
+ "&:disabled": { ...disabledstyles }
502
+ }}
503
+ `;
504
+ function WavelengthStyledButton({ type = "default", styles, children, disabled = false, hoverstyles, icon, onClick, disabledstyles, activestyles, id, name }) {
505
+ return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, Button, { type, styles, hoverstyles, disabledstyles, disabled, activestyles, onClick, children: [
506
+ icon,
507
+ children
508
+ ] });
509
+ }
510
+ WavelengthStyledButton.displayName = "WavelengthStyledButton";
511
+
95
512
  // src/themes/WavelengthAppTheme.tsx
96
513
 
97
514
  var WavelengthAppTheme = _react.createContext.call(void 0, {});
@@ -990,11 +1407,11 @@ var WavelengthFileDropZone = _react.forwardRef.call(void 0,
990
1407
  );
991
1408
  WavelengthFileDropZone.displayName = "WavelengthFileDropZone";
992
1409
 
993
- // src/components/SnackBar/WavelengthWebSnackbar.tsx
1410
+ // src/components/SnackBar/WavelengthSnackbar.tsx
994
1411
 
995
1412
 
996
1413
 
997
- var WavelengthWebSnackbar = ({
1414
+ var WavelengthSnackbar = ({
998
1415
  message,
999
1416
  duration,
1000
1417
  backgroundColor,
@@ -1161,6 +1578,75 @@ function WavelengthPermissionAlert({
1161
1578
  }
1162
1579
  WavelengthPermissionAlert.displayName = "WavelengthPermissionAlert";
1163
1580
 
1581
+ // src/components/PageComponents/WavelengthDragAndDrop.tsx
1582
+
1583
+ function WavelengthDragAndDrop({
1584
+ width = "550px",
1585
+ height = "230px",
1586
+ onFilesSelected,
1587
+ border,
1588
+ textColor,
1589
+ fontSize = "12px",
1590
+ allowedFileMIME,
1591
+ allowedFileExtensions,
1592
+ backgroundColor = "transparent",
1593
+ dataTestId,
1594
+ id
1595
+ }) {
1596
+ const handleFileChange = (event) => {
1597
+ const selectedFiles = event.target.files;
1598
+ if (selectedFiles && selectedFiles.length > 0) {
1599
+ const newFiles = Array.from(selectedFiles);
1600
+ onFilesSelected(newFiles);
1601
+ }
1602
+ };
1603
+ const handleDrop = (event) => {
1604
+ event.preventDefault();
1605
+ const droppedFiles = event.dataTransfer.files;
1606
+ if (droppedFiles.length > 0) {
1607
+ const newFiles = Array.from(droppedFiles);
1608
+ const allowedTypes = allowedFileMIME ? allowedFileMIME : "*/*";
1609
+ const validFiles = newFiles.filter((file) => allowedTypes === "*/*" || allowedTypes.includes(file.type));
1610
+ if (validFiles.length > 0) {
1611
+ onFilesSelected(validFiles);
1612
+ } else {
1613
+ alert(`Invalid file type`);
1614
+ }
1615
+ }
1616
+ };
1617
+ return /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
1618
+ "div",
1619
+ {
1620
+ id,
1621
+ "data-testid": dataTestId,
1622
+ style: {
1623
+ backgroundColor,
1624
+ border: border ? border : "1px dashed rgba(14, 178, 178, 1)",
1625
+ borderRadius: "8px",
1626
+ paddingTop: "10px",
1627
+ boxSizing: "border-box",
1628
+ width,
1629
+ height,
1630
+ cursor: "pointer",
1631
+ display: "flex",
1632
+ flexDirection: "column",
1633
+ justifyContent: "center",
1634
+ alignItems: "center",
1635
+ overflow: "scroll"
1636
+ },
1637
+ onDrop: handleDrop,
1638
+ onDragOver: (event) => event.preventDefault(),
1639
+ children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { style: { fontSize, color: textColor }, children: [
1640
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "input", { type: "file", hidden: true, multiple: true, id: "browse", onChange: handleFileChange, accept: allowedFileExtensions }),
1641
+ "Drag File here or",
1642
+ " ",
1643
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "browse", style: { textDecoration: "underline", cursor: "pointer" }, children: "select from files" })
1644
+ ] })
1645
+ }
1646
+ );
1647
+ }
1648
+ WavelengthDragAndDrop.displayName = "WavelengthDragAndDrop";
1649
+
1164
1650
  // src/components/PageComponents/WavelengthToolTip.tsx
1165
1651
 
1166
1652
 
@@ -2205,35 +2691,41 @@ WavelengthInput.displayName = "WavelengthInput";
2205
2691
 
2206
2692
  // src/components/DataTable/WavelengthDataTable.tsx
2207
2693
 
2208
- var _styledcomponents = require('styled-components'); var _styledcomponents2 = _interopRequireDefault(_styledcomponents);
2694
+
2209
2695
 
2210
2696
  var ModalInputDiv = _styledcomponents2.default.div`
2211
2697
  display: flex;
2212
- flex-direction: column; /* Corrected this line */
2213
- gap: 3px;
2214
- margin: 3px;
2698
+ flex-direction: column;
2699
+ gap: 5px;
2700
+ margin: 10px;
2215
2701
 
2216
2702
  label {
2217
2703
  align-self: flex-start;
2218
- color: #c6c7cc;
2704
+ color: #304359;
2705
+ font-weight: 600;
2706
+ font-family: Montserrat, sans-serif;
2219
2707
  }
2220
2708
 
2221
2709
  input,
2222
2710
  select {
2223
2711
  width: 100%;
2224
- padding: 12px 20px;
2225
- margin: 8px 0;
2712
+ padding: 10px 15px;
2713
+ margin: 4px 0 12px 0;
2226
2714
  box-sizing: border-box;
2227
- border: none;
2715
+ border: 1px solid #c6c7cc;
2716
+ border-radius: 4px;
2228
2717
  outline: none;
2229
- border-bottom: 2px solid #c6c7cc;
2718
+ background-color: #ffffff;
2719
+ color: #000000;
2720
+ font-family: Montserrat, sans-serif;
2230
2721
 
2231
2722
  &:hover {
2232
- border-bottom: 2px solid black;
2723
+ border-color: #304359;
2233
2724
  }
2234
2725
 
2235
2726
  &:focus {
2236
- border-bottom: 2px solid #8fd8ff;
2727
+ border-color: #8fd8ff;
2728
+ box-shadow: 0 0 0 2px rgba(143, 216, 255, 0.3);
2237
2729
  }
2238
2730
  }
2239
2731
  `;
@@ -2263,12 +2755,17 @@ var ModalWrapper = _styledcomponents2.default.div`
2263
2755
  var ModalClose = _styledcomponents2.default.button`
2264
2756
  position: absolute;
2265
2757
  top: 10px;
2266
- right: 10px;
2267
- font-size: 20px;
2758
+ right: 15px;
2759
+ font-size: 24px;
2268
2760
  cursor: pointer;
2269
2761
  border: none;
2270
2762
  background: none;
2763
+ color: #304359;
2271
2764
  z-index: 2;
2765
+
2766
+ &:hover {
2767
+ color: #000000;
2768
+ }
2272
2769
  `;
2273
2770
  var TableHeadStyle = _styledcomponents2.default.th`
2274
2771
  position: relative;
@@ -2296,41 +2793,58 @@ var MenuOptions = _styledcomponents2.default.ul`
2296
2793
  position: absolute;
2297
2794
  right: 0;
2298
2795
  top: 100%;
2299
- background-color: #f9f9f9;
2796
+ background-color: #ffffff;
2300
2797
  min-width: 160px;
2301
2798
  box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
2302
- z-index: 1;
2799
+ z-index: 10;
2303
2800
  list-style: none;
2304
2801
  padding: 0;
2305
2802
  margin: 0;
2803
+ border-radius: 4px;
2804
+ overflow: hidden;
2306
2805
 
2307
2806
  li {
2308
- padding: 10px;
2807
+ padding: 12px 16px;
2309
2808
  text-decoration: none;
2310
2809
  display: block;
2311
2810
  cursor: pointer;
2811
+ color: #304359 !important;
2812
+ font-family: Montserrat, sans-serif;
2813
+ font-size: 14px;
2814
+ font-weight: 500;
2815
+ text-align: left;
2312
2816
 
2313
2817
  &:hover {
2314
- background-color: #ddd;
2818
+ background-color: #f0f4f8;
2819
+ color: #000000 !important;
2820
+ }
2821
+
2822
+ span {
2823
+ margin-right: 8px;
2824
+ color: #304359 !important;
2825
+ }
2826
+
2827
+ &:hover span {
2828
+ color: #000000 !important;
2315
2829
  }
2316
2830
  }
2317
2831
  `;
2318
2832
  var StyledBoxDiv = _styledcomponents2.default.div`
2319
2833
  background-color: white;
2320
- width: 700px;
2321
- height: 480px;
2834
+ width: 100%;
2835
+ height: auto;
2836
+ min-height: 480px;
2322
2837
  position: relative;
2323
2838
  border-top-left-radius: 10px;
2324
2839
  border-top-right-radius: 10px;
2325
2840
  `;
2326
2841
  var StyledNavBoxDiv = _styledcomponents2.default.div`
2327
2842
  background-color: white;
2328
- width: 700px;
2329
- display: flex; /* Make parent a flex-container */
2843
+ width: 100%;
2844
+ display: flex;
2330
2845
  justify-content: center;
2331
2846
  border-bottom-left-radius: 10px;
2332
2847
  border-bottom-right-radius: 10px;
2333
-
2334
2848
  box-shadow: 0.5px 3px 5px black;
2335
2849
  `;
2336
2850
  var StyledTd = _styledcomponents2.default.td`
@@ -2350,18 +2864,17 @@ var StyledTableTwo = _styledcomponents2.default.table`
2350
2864
  margin-right: auto;
2351
2865
 
2352
2866
  th {
2353
- position: relative; /* Enable absolute positioning of pseudo-elements */
2867
+ position: relative;
2354
2868
  padding: 10px 15px;
2355
2869
 
2356
- /* Create the partial right border */
2357
2870
  &:not(:last-child):after {
2358
- content: ""; /* Ensure the pseudo-element is visible */
2871
+ content: "";
2359
2872
  position: absolute;
2360
- right: 0; /* Position it on the right side of the th */
2361
- top: 50%; /* Position it in the vertical center */
2362
- height: 50%; /* Set the height of the border to be half the height of th */
2873
+ right: 0;
2874
+ top: 50%;
2875
+ height: 50%;
2363
2876
  border-right: 1px solid #c6c7cc;
2364
- transform: translateY(-50%); /* Center it vertically */
2877
+ transform: translateY(-50%);
2365
2878
  }
2366
2879
  }
2367
2880
  `;
@@ -2372,7 +2885,7 @@ var StyledInput = _styledcomponents2.default.input`
2372
2885
  border: none;
2373
2886
  color: #8fd8ff;
2374
2887
  `;
2375
- var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
2888
+ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id, onRowClick, paginationOptions }) => {
2376
2889
  const [localData, setLocalData] = _react.useState.call(void 0, data || []);
2377
2890
  const copiedArray = [...data || []];
2378
2891
  const [editingId, setEditingId] = _react.useState.call(void 0, null);
@@ -2387,6 +2900,38 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
2387
2900
  const [editingMenuKey, setEditingMenuKey] = _react.useState.call(void 0, null);
2388
2901
  const menuRef = _react.useRef.call(void 0, null);
2389
2902
  const modalRef = _react.useRef.call(void 0, null);
2903
+ const [modalPos, setModalPos] = _react.useState.call(void 0, { x: 0, y: 0 });
2904
+ const isDragging = _react.useRef.call(void 0, false);
2905
+ const dragStartPos = _react.useRef.call(void 0, { x: 0, y: 0 });
2906
+ const handleDragStart = (e) => {
2907
+ isDragging.current = true;
2908
+ dragStartPos.current = {
2909
+ x: e.clientX - modalPos.x,
2910
+ y: e.clientY - modalPos.y
2911
+ };
2912
+ };
2913
+ _react.useEffect.call(void 0, () => {
2914
+ const handleDragMove = (e) => {
2915
+ if (!isDragging.current) return;
2916
+ setModalPos({
2917
+ x: e.clientX - dragStartPos.current.x,
2918
+ y: e.clientY - dragStartPos.current.y
2919
+ });
2920
+ };
2921
+ const handleDragEnd = () => {
2922
+ isDragging.current = false;
2923
+ };
2924
+ if (isModalOpen) {
2925
+ document.addEventListener("mousemove", handleDragMove);
2926
+ document.addEventListener("mouseup", handleDragEnd);
2927
+ } else {
2928
+ setModalPos({ x: 0, y: 0 });
2929
+ }
2930
+ return () => {
2931
+ document.removeEventListener("mousemove", handleDragMove);
2932
+ document.removeEventListener("mouseup", handleDragEnd);
2933
+ };
2934
+ }, [isModalOpen]);
2390
2935
  function isNumeric(value) {
2391
2936
  return /^\d+$/.test(value);
2392
2937
  }
@@ -2506,36 +3051,47 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
2506
3051
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { children: "\u23F7" }),
2507
3052
  " Filter"
2508
3053
  ] }),
2509
- isModalOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ModalOverlay, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ModalWrapper, { ref: modalRef, children: [
2510
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ModalClose, { title: `ModalClose-${index}`, onClick: closeModal, children: "\xD7" }),
2511
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ModalInputDiv, { children: [
2512
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "filterSelectId", children: "Columns: " }),
2513
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "select", { title: `filterSelect-${index}`, id: "filterSelectId", value: selectedValue, onChange: handleChange, children: columns.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "option", { children: item.key }, item.key)) })
2514
- ] }),
2515
- /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ModalInputDiv, { children: [
2516
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "filterInputId", children: "Values: " }),
2517
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2518
- "input",
2519
- {
2520
- title: `Inputfiltertest-${index}`,
2521
- id: "filterInputId",
2522
- type: isNumeric(searchItem) ? "number" : "text",
2523
- value: searchItem,
2524
- onKeyDown: (e) => {
2525
- if (e.key === "Backspace") {
2526
- setLocalData(copiedArray);
3054
+ isModalOpen && /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ModalOverlay, { children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0,
3055
+ ModalWrapper,
3056
+ {
3057
+ ref: modalRef,
3058
+ style: {
3059
+ transform: `translate(${modalPos.x}px, ${modalPos.y}px)`,
3060
+ cursor: "grab"
3061
+ },
3062
+ onMouseDown: handleDragStart,
3063
+ children: [
3064
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, ModalClose, { title: `ModalClose-${index}`, onClick: closeModal, children: "\xD7" }),
3065
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ModalInputDiv, { children: [
3066
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "filterSelectId", children: "Columns: " }),
3067
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "select", { title: `filterSelect-${index}`, id: "filterSelectId", value: selectedValue, onChange: handleChange, children: columns.map((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "option", { children: item.key }, item.key)) })
3068
+ ] }),
3069
+ /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, ModalInputDiv, { children: [
3070
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "label", { htmlFor: "filterInputId", children: "Values: " }),
3071
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
3072
+ "input",
3073
+ {
3074
+ title: `Inputfiltertest-${index}`,
3075
+ id: "filterInputId",
3076
+ type: isNumeric(searchItem) ? "number" : "text",
3077
+ value: searchItem,
3078
+ onKeyDown: (e) => {
3079
+ if (e.key === "Backspace") {
3080
+ setLocalData(copiedArray);
3081
+ }
3082
+ },
3083
+ onChange: (e) => setSearchItem(e.target.value)
2527
3084
  }
2528
- },
2529
- onChange: (e) => setSearchItem(e.target.value)
2530
- }
2531
- )
2532
- ] })
2533
- ] }) })
3085
+ )
3086
+ ] })
3087
+ ]
3088
+ }
3089
+ ) })
2534
3090
  ] })
2535
3091
  ] }, index)
2536
3092
  ] }, `headCell-${index}`);
2537
3093
  });
2538
- const rows = !_optionalChain([currentPageData, 'optionalAccess', _44 => _44.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _45 => _45.map, 'call', _46 => _46((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: columns.map((column, index2) => {
3094
+ const rows = !_optionalChain([currentPageData, 'optionalAccess', _44 => _44.length]) || noRowsOpen ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "td", { title: "NoDataRows", colSpan: columns.length, children: "No data" }) }) : _optionalChain([currentPageData, 'optionalAccess', _45 => _45.map, 'call', _46 => _46((item) => /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { onClick: () => onRowClick && onRowClick(item), style: { cursor: onRowClick ? "pointer" : "default" }, children: columns.map((column, index2) => {
2539
3095
  return /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledTd, { children: editingId === item.id && editedColumnKey === column.key ? /* @__PURE__ */ _jsxruntime.jsx.call(void 0,
2540
3096
  StyledInput,
2541
3097
  {
@@ -2553,14 +3109,14 @@ var WavelengthDataTable = ({ data, columns, itemsPerPage, totalPages, id }) => {
2553
3109
  },
2554
3110
  autoFocus: true
2555
3111
  }
2556
- ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { title: `spanRow-${item.id}-${column.key}-${index2}`, onDoubleClick: () => handleEdit(item.id, item[column.key], column.key), children: item[column.key] }) }, index2);
3112
+ ) : /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "span", { title: `spanRow-${item.id}-${column.key}-${index2}`, onDoubleClick: () => column.editable !== false && handleEdit(item.id, item[column.key], column.key), children: column.render ? column.render(column, item) : item[column.key] }) }, index2);
2557
3113
  }) }, item.id))]);
2558
3114
  return /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, "div", { id, children: [
2559
3115
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledBoxDiv, { title: "StyledBoxDiv", children: /* @__PURE__ */ _jsxruntime.jsxs.call(void 0, StyledTableTwo, { title: "StyledTable", children: [
2560
3116
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "thead", { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tr", { children: headers }) }),
2561
3117
  /* @__PURE__ */ _jsxruntime.jsx.call(void 0, "tbody", { children: rows })
2562
3118
  ] }) }),
2563
- /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledNavBoxDiv, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WavelengthPagination, { customStyle: {}, totalPages, currentPage, onPageChange: setCurrentPage, variant: "basic" }) })
3119
+ /* @__PURE__ */ _jsxruntime.jsx.call(void 0, StyledNavBoxDiv, { children: /* @__PURE__ */ _jsxruntime.jsx.call(void 0, WavelengthPagination, { customStyle: {}, totalPages, currentPage, onPageChange: setCurrentPage, variant: "basic", ...paginationOptions || {} }) })
2564
3120
  ] });
2565
3121
  };
2566
3122
  WavelengthDataTable.displayName = "WavelengthDataTable";
@@ -3658,9 +4214,6 @@ var WavelengthNotificationPanel = ({
3658
4214
  _react.useEffect.call(void 0, () => {
3659
4215
  const el = ref.current;
3660
4216
  if (!el) return;
3661
- if (typeof rest.onSignOut === "function") {
3662
- el.onSignOut = rest.onSignOut;
3663
- }
3664
4217
  if (username !== void 0) {
3665
4218
  el.username = username;
3666
4219
  }
@@ -3796,5 +4349,7 @@ WavelengthCheckboxList.displayName = "WavelengthCheckboxList";
3796
4349
 
3797
4350
 
3798
4351
 
3799
- exports.ChildDataTable = ChildDataTable2; exports.ChildDataTableElement = _webcomponents.ChildDataTable; exports.NestedDataTable = NestedDataTable; exports.SampleComponent = SampleComponent; exports.SampleComponentElement = _webcomponents.SampleComponent; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutoComplete = WavelengthAutoComplete; exports.WavelengthBadge = WavelengthBadge; exports.WavelengthBanner = WavelengthBanner; exports.WavelengthBannerElement = _webcomponents.WavelengthBanner; exports.WavelengthButton = WavelengthButton; exports.WavelengthButtonElement = _webcomponents.WavelengthButton; exports.WavelengthCard = WavelengthCard; exports.WavelengthCheckbox = WavelengthCheckbox; exports.WavelengthCheckboxList = WavelengthCheckboxList; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataGrid = WavelengthDataGrid; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDatePicker = WavelengthDatePicker; exports.WavelengthDatePickerElement = _webcomponents.WavelengthDatePicker; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDialog = WavelengthDialog; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDropZone = WavelengthFileDropZone; exports.WavelengthForm = WavelengthForm; exports.WavelengthFormElement = _webcomponents.WavelengthForm; exports.WavelengthInput = WavelengthInput; exports.WavelengthInputElement = _webcomponents.WavelengthInput; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthMenu = WavelengthMenu; exports.WavelengthMultiSelectAutocomplete = WavelengthMultiSelectAutocomplete; exports.WavelengthMultiSelectAutocompleteElement = _webcomponents.WavelengthMultiSelectAutocomplete; exports.WavelengthNavBar = WavelengthNavBar; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthNotificationPanel = WavelengthNotificationPanel; exports.WavelengthPagination = WavelengthPagination; exports.WavelengthPaginationElement = _webcomponents.WavelengthPagination; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthProgressBarElement = _webcomponents.WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthSwitch = WavelengthSwitch; exports.WavelengthTitleBar = WavelengthTitleBar; exports.WavelengthTitleBarElement = _webcomponents.WavelengthTitleBar; exports.WavelengthToolTip = WavelengthToolTip; exports.WavelengthWebSnackbar = WavelengthWebSnackbar; exports.add = add; exports.concat = concat; exports.useThemeContext = useThemeContext;
4352
+
4353
+
4354
+ exports.ChildDataTable = ChildDataTable2; exports.ChildDataTableElement = _webcomponents.ChildDataTable; exports.NestedDataTable = NestedDataTable; exports.SampleComponent = SampleComponent; exports.SampleComponentElement = _webcomponents.SampleComponent; exports.WavelengthAppLogo = WavelengthAppLogo; exports.WavelengthAppTheme = WavelengthAppTheme; exports.WavelengthAutoComplete = WavelengthAutoComplete; exports.WavelengthBadge = WavelengthBadge; exports.WavelengthBanner = WavelengthBanner; exports.WavelengthBannerElement = _webcomponents.WavelengthBanner; exports.WavelengthButton = WavelengthButton; exports.WavelengthButtonElement = _webcomponents.WavelengthButton; exports.WavelengthCard = WavelengthCard; exports.WavelengthCheckbox = WavelengthCheckbox; exports.WavelengthCheckboxList = WavelengthCheckboxList; exports.WavelengthCommentDisplay = WavelengthCommentDisplay; exports.WavelengthConfirmationModal = WavelengthConfirmationModal; exports.WavelengthContentPlaceholder = WavelengthContentPlaceholder; exports.WavelengthDataGrid = WavelengthDataGrid; exports.WavelengthDataTable = WavelengthDataTable; exports.WavelengthDatePicker = WavelengthDatePicker; exports.WavelengthDatePickerElement = _webcomponents.WavelengthDatePicker; exports.WavelengthDefaultIcon = WavelengthDefaultIcon; exports.WavelengthDialog = WavelengthDialog; exports.WavelengthDragAndDrop = WavelengthDragAndDrop; exports.WavelengthDropdown = WavelengthDropdown; exports.WavelengthExampleComponent = WavelengthExampleComponent; exports.WavelengthFileDropZone = WavelengthFileDropZone; exports.WavelengthForm = WavelengthForm; exports.WavelengthFormElement = _webcomponents.WavelengthForm; exports.WavelengthInput = WavelengthInput; exports.WavelengthInputElement = _webcomponents.WavelengthInput; exports.WavelengthManyPlanes = WavelengthManyPlanes; exports.WavelengthMenu = WavelengthMenu; exports.WavelengthMultiSelectAutocomplete = WavelengthMultiSelectAutocomplete; exports.WavelengthMultiSelectAutocompleteElement = _webcomponents.WavelengthMultiSelectAutocomplete; exports.WavelengthNavBar = WavelengthNavBar; exports.WavelengthNotAvailablePage = WavelengthNotAvailablePage; exports.WavelengthNotificationPanel = WavelengthNotificationPanel; exports.WavelengthPagination = WavelengthPagination; exports.WavelengthPaginationElement = _webcomponents.WavelengthPagination; exports.WavelengthPermissionAlert = WavelengthPermissionAlert; exports.WavelengthPlaneTrail = WavelengthPlaneTrail; exports.WavelengthPopUpMenu = WavelengthPopUpMenu; exports.WavelengthProgressBar = WavelengthProgressBar; exports.WavelengthProgressBarElement = _webcomponents.WavelengthProgressBar; exports.WavelengthSearch = WavelengthSearch; exports.WavelengthSideBar = WavelengthSideBar; exports.WavelengthSlider = WavelengthSlider; exports.WavelengthSnackbar = WavelengthSnackbar; exports.WavelengthSpinningLogo = WavelengthSpinningLogo; exports.WavelengthStyledButton = WavelengthStyledButton; exports.WavelengthSwitch = WavelengthSwitch; exports.WavelengthTitleBar = WavelengthTitleBar; exports.WavelengthTitleBarElement = _webcomponents.WavelengthTitleBar; exports.WavelengthToolTip = WavelengthToolTip; exports.add = add; exports.concat = concat; exports.useThemeContext = useThemeContext;
3800
4355
  //# sourceMappingURL=index.cjs.map