asma-ui-table 1.0.39 → 1.0.40
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.
- package/CHANGELOG.md +687 -0
- package/dist/asma-ui-table.es.js +1 -1
- package/dist/src/types.d.ts +1 -0
- package/package.json +117 -117
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,687 @@
|
|
|
1
|
+
# asma-ui-table
|
|
2
|
+
|
|
3
|
+
## 2.19.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- da5ffa8: richinput height fix
|
|
8
|
+
- badges-themming
|
|
9
|
+
- 583c3b7: fix/styled-input-field-variant-sdantard-styling
|
|
10
|
+
- c12d01c: fix/fretex-badge-color
|
|
11
|
+
- 583c3b7: feat/dataTests-buttons-inputs
|
|
12
|
+
- 7307b1d: data tests for styled dialog and other components
|
|
13
|
+
|
|
14
|
+
## 2.19.0
|
|
15
|
+
|
|
16
|
+
### Minor Changes
|
|
17
|
+
|
|
18
|
+
- 7c6b42d: Added styling for indeterminate state of a StyledCheckbox
|
|
19
|
+
|
|
20
|
+
### Patch Changes
|
|
21
|
+
|
|
22
|
+
- bc984c4: fix/datePicker-clearAction
|
|
23
|
+
- 688d82e: fix/ASMA-2834-StyledTable-actions-not-working-as-expected-published
|
|
24
|
+
- 1ae02c6: feat: Added styled radio button
|
|
25
|
+
- f264fc7: exporting-date-picker
|
|
26
|
+
- 8ae828f: before data-tests
|
|
27
|
+
- baed007: styledSelectAutocomplete
|
|
28
|
+
- fix/styledInputField-custom-type-to-avoit-ui-crash
|
|
29
|
+
- c694edd: feat: Time picker
|
|
30
|
+
- fde85c1: fixed props errors in StyledInputField
|
|
31
|
+
- 0e89b7c: fix/rowSelection-styledTable
|
|
32
|
+
- d19aa55: fix/select-with-label-styles
|
|
33
|
+
- 047f94e: button size medium
|
|
34
|
+
- 3b109eb: fix/DatePicker-allowCleat-as-prop
|
|
35
|
+
- 519b54b: fixed hiding column header pin in styled table
|
|
36
|
+
- 1273e77: feat: Added icons
|
|
37
|
+
- e8e77aa: 2.18.11
|
|
38
|
+
- 6653757: updated renderSubRows function in StyledTable
|
|
39
|
+
- b0f7660: Exporting-MenuProps
|
|
40
|
+
- c3f4740: fix/ASMA-2834-StyledTable-actions-not-working-as-expected
|
|
41
|
+
- eae9d9f: control the size of StyleSelect through StyledFormControl
|
|
42
|
+
- 08192fa: fix/styledSnackbarInfo
|
|
43
|
+
- 367ae6c: fixed styledtable header pin
|
|
44
|
+
|
|
45
|
+
## 2.18.11
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- 8faaa84: 2.18.10
|
|
50
|
+
|
|
51
|
+
## 2.18.10
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- bd83c68: added some more reactnode types
|
|
56
|
+
- 03fce5c: 2.18.9
|
|
57
|
+
- a00024e: add possibility to pass component besides text to inputs
|
|
58
|
+
|
|
59
|
+
## 2.18.9
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- a7c1d7b: 2.18.7
|
|
64
|
+
- a73c7cd: styles for styled select
|
|
65
|
+
- a73c7cd: styled container
|
|
66
|
+
- 62a4ba6: added label classname
|
|
67
|
+
|
|
68
|
+
## 2.18.7
|
|
69
|
+
|
|
70
|
+
### Patch Changes
|
|
71
|
+
|
|
72
|
+
- 1cc6183: Add container classname for textarea
|
|
73
|
+
- e31066e: textSize-of-select-dropdown
|
|
74
|
+
- af25d7c: StyledTabs
|
|
75
|
+
- 1be5492: 2.18.4
|
|
76
|
+
|
|
77
|
+
## 2.18.4
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- 8922f3d: 2.18.3
|
|
82
|
+
- 50c8c29: add classname to styled link
|
|
83
|
+
|
|
84
|
+
## 2.18.3
|
|
85
|
+
|
|
86
|
+
### Patch Changes
|
|
87
|
+
|
|
88
|
+
- 947c849: small fix for autoSize column
|
|
89
|
+
- 73abc45: update style table columns width
|
|
90
|
+
- 73abc45: export tanstack interfaces
|
|
91
|
+
- a89fb53: 2.18.0
|
|
92
|
+
|
|
93
|
+
## 2.18.0
|
|
94
|
+
|
|
95
|
+
### Minor Changes
|
|
96
|
+
|
|
97
|
+
- 3475f35: Added StyledLink component
|
|
98
|
+
- 62a5e65: Added EmptyPageIcon
|
|
99
|
+
- 059bdf9: removing mui style config provider
|
|
100
|
+
|
|
101
|
+
### Patch Changes
|
|
102
|
+
|
|
103
|
+
- 991ee7f: styled text area - optional props, styledInput interface fix
|
|
104
|
+
- e7bc214: fixed bg color of styled accordion to transparent
|
|
105
|
+
- 61e50f6: reflink for select
|
|
106
|
+
- da2c8cd: optimized snackbar
|
|
107
|
+
- eebb6f2: updated storybook 7.4.6
|
|
108
|
+
- e7bc214: tokens inside css
|
|
109
|
+
- 043b349: return exporting of main css
|
|
110
|
+
- 2fc0c1b: switch disabled colors
|
|
111
|
+
- f191a3c: fixed styled switch height
|
|
112
|
+
- a033535: Styled Drawer
|
|
113
|
+
- f191a3c: snackbar on DOMROOT level
|
|
114
|
+
- 8518620: Fixed some bugs related to StyledInput ans StyledTextarea
|
|
115
|
+
- a204108: styles for select
|
|
116
|
+
- bbf3a24: 2.16.13
|
|
117
|
+
- 939b7ed: fixed StyledInput background
|
|
118
|
+
- c9017e7: Fixed counter paddings in StyledTextarea
|
|
119
|
+
- 5f090ab: styling switch element
|
|
120
|
+
|
|
121
|
+
## 2.16.13
|
|
122
|
+
|
|
123
|
+
### Patch Changes
|
|
124
|
+
|
|
125
|
+
- 4a6f577: styled input
|
|
126
|
+
- 29cce0e: 2.16.10
|
|
127
|
+
- 076e5cc: Styled Table css fixes
|
|
128
|
+
|
|
129
|
+
## 2.16.10
|
|
130
|
+
|
|
131
|
+
### Patch Changes
|
|
132
|
+
|
|
133
|
+
- 15e4747: 2.16.9
|
|
134
|
+
- 042bb5f: Fix Table actions
|
|
135
|
+
|
|
136
|
+
## 2.16.9
|
|
137
|
+
|
|
138
|
+
### Patch Changes
|
|
139
|
+
|
|
140
|
+
- 91d54a7: Fix id type TData
|
|
141
|
+
- d93b53d: 2.16.8
|
|
142
|
+
|
|
143
|
+
## 2.16.8
|
|
144
|
+
|
|
145
|
+
### Patch Changes
|
|
146
|
+
|
|
147
|
+
- c5809e2: Fix Styled Table alignment
|
|
148
|
+
- c0ef21e: 2.16.6
|
|
149
|
+
|
|
150
|
+
## 2.16.7
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- 1d5a134: Add more props for table
|
|
155
|
+
- 74dcb75: updated styled button, added new variant - grey text
|
|
156
|
+
- 969eb73: 2.16.5
|
|
157
|
+
|
|
158
|
+
## 2.16.5
|
|
159
|
+
|
|
160
|
+
### Patch Changes
|
|
161
|
+
|
|
162
|
+
- 98a4a41: 2.16.3
|
|
163
|
+
- a3978ba: export for styled textarea
|
|
164
|
+
- a3978ba: Exported StyledTextarea
|
|
165
|
+
- e5283db: Exported rich-input globally
|
|
166
|
+
|
|
167
|
+
## 2.16.3
|
|
168
|
+
|
|
169
|
+
### Patch Changes
|
|
170
|
+
|
|
171
|
+
- 5ce89b5: Fix Styled Table types & styles
|
|
172
|
+
- 020b294: 2.16.2
|
|
173
|
+
|
|
174
|
+
## 2.16.2
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- 87bd4cc: Styled Table actions fix onclick
|
|
179
|
+
- 4a85a8f: 2.16.1
|
|
180
|
+
|
|
181
|
+
## 2.16.1
|
|
182
|
+
|
|
183
|
+
### Patch Changes
|
|
184
|
+
|
|
185
|
+
- 7586b47: Styled Table fixes
|
|
186
|
+
|
|
187
|
+
## 2.16.0
|
|
188
|
+
|
|
189
|
+
### Minor Changes
|
|
190
|
+
|
|
191
|
+
- fedc045: Added StyledTextarea
|
|
192
|
+
- 5226aec: New table component
|
|
193
|
+
|
|
194
|
+
### Patch Changes
|
|
195
|
+
|
|
196
|
+
- 5f3fb1d: 2.14.4
|
|
197
|
+
- 8877a50: new custom styled button
|
|
198
|
+
- fedc045: added styled textarea
|
|
199
|
+
- d554885: removed styled button paddings
|
|
200
|
+
- 6defcc1: Removed bg color on RichInput when disabled
|
|
201
|
+
- 55343ea: Added Styled Module Title
|
|
202
|
+
|
|
203
|
+
## 2.14.4
|
|
204
|
+
|
|
205
|
+
### Patch Changes
|
|
206
|
+
|
|
207
|
+
- 675d71a: Fixed chevron arrow pointing
|
|
208
|
+
- e1c943f: 2.14.3
|
|
209
|
+
|
|
210
|
+
## 2.14.3
|
|
211
|
+
|
|
212
|
+
### Patch Changes
|
|
213
|
+
|
|
214
|
+
- 54be30a: 2.14.2
|
|
215
|
+
- 1b8c038: Change default width multi line input field
|
|
216
|
+
|
|
217
|
+
## 2.14.2
|
|
218
|
+
|
|
219
|
+
### Patch Changes
|
|
220
|
+
|
|
221
|
+
- a5011c6: Fix overriding classes
|
|
222
|
+
- fe53fac: 2.14.1
|
|
223
|
+
|
|
224
|
+
## 2.14.1
|
|
225
|
+
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- e3804d6: 2.14.0
|
|
229
|
+
- 5f03390: Added multi line support for Input Field
|
|
230
|
+
|
|
231
|
+
## 2.14.0
|
|
232
|
+
|
|
233
|
+
### Minor Changes
|
|
234
|
+
|
|
235
|
+
- 4a3d94f: Redesign buttons
|
|
236
|
+
|
|
237
|
+
### Patch Changes
|
|
238
|
+
|
|
239
|
+
- 44e0a5b: 2.13.4
|
|
240
|
+
|
|
241
|
+
## 2.13.4
|
|
242
|
+
|
|
243
|
+
### Patch Changes
|
|
244
|
+
|
|
245
|
+
- 5a1b778: Fixed some datagrid styles
|
|
246
|
+
|
|
247
|
+
## 2.13.3
|
|
248
|
+
|
|
249
|
+
### Patch Changes
|
|
250
|
+
|
|
251
|
+
- 3012a02: fix snackbar props
|
|
252
|
+
|
|
253
|
+
## 2.13.2
|
|
254
|
+
|
|
255
|
+
### Patch Changes
|
|
256
|
+
|
|
257
|
+
- ecd4508: Add classname for internal alert in snackbar
|
|
258
|
+
- b8f1a0c: 2.13.1
|
|
259
|
+
|
|
260
|
+
## 2.13.1
|
|
261
|
+
|
|
262
|
+
### Patch Changes
|
|
263
|
+
|
|
264
|
+
- 5349fe5: 2.13.1
|
|
265
|
+
- 67c3f6e: fix notistack types
|
|
266
|
+
|
|
267
|
+
## 2.13.0
|
|
268
|
+
|
|
269
|
+
### Minor Changes
|
|
270
|
+
|
|
271
|
+
- 2d21b31: Added custom snackbars for provider
|
|
272
|
+
|
|
273
|
+
### Patch Changes
|
|
274
|
+
|
|
275
|
+
- 2d5871c: 2.12.1
|
|
276
|
+
|
|
277
|
+
## 2.12.1
|
|
278
|
+
|
|
279
|
+
### Patch Changes
|
|
280
|
+
|
|
281
|
+
- 84f05b8: 2.12.0
|
|
282
|
+
- b732f77: Fix some font size, padding, minor things
|
|
283
|
+
|
|
284
|
+
## 2.12.0
|
|
285
|
+
|
|
286
|
+
### Minor Changes
|
|
287
|
+
|
|
288
|
+
- 8f18554: Added TopicIcon
|
|
289
|
+
|
|
290
|
+
## 2.11.0
|
|
291
|
+
|
|
292
|
+
### Minor Changes
|
|
293
|
+
|
|
294
|
+
- 286154b: Added StyledInputField
|
|
295
|
+
|
|
296
|
+
### Patch Changes
|
|
297
|
+
|
|
298
|
+
- 2962ebf: 2.10.0
|
|
299
|
+
|
|
300
|
+
## 2.10.0
|
|
301
|
+
|
|
302
|
+
### Minor Changes
|
|
303
|
+
|
|
304
|
+
- f4be3c3: added inbox-outbox and inbox-outbox-outline icons
|
|
305
|
+
|
|
306
|
+
## 2.10.0-beta.0
|
|
307
|
+
|
|
308
|
+
### Minor Changes
|
|
309
|
+
|
|
310
|
+
- 286154b: Added StyledInputField
|
|
311
|
+
|
|
312
|
+
### Patch Changes
|
|
313
|
+
|
|
314
|
+
- 61efd74: 2.9.3
|
|
315
|
+
|
|
316
|
+
## 2.9.3
|
|
317
|
+
|
|
318
|
+
### Patch Changes
|
|
319
|
+
|
|
320
|
+
- cffcc80: comment portal elements
|
|
321
|
+
- 65487b3: 2.9.2
|
|
322
|
+
|
|
323
|
+
## 2.9.2
|
|
324
|
+
|
|
325
|
+
### Patch Changes
|
|
326
|
+
|
|
327
|
+
- c680289: 2.9.1
|
|
328
|
+
- 551d2e1: added portal elements fix
|
|
329
|
+
|
|
330
|
+
## 2.9.1
|
|
331
|
+
|
|
332
|
+
### Patch Changes
|
|
333
|
+
|
|
334
|
+
- e189975: Export grid date comparator
|
|
335
|
+
- 9f23080: 2.9.0
|
|
336
|
+
|
|
337
|
+
## 2.9.0
|
|
338
|
+
|
|
339
|
+
### Minor Changes
|
|
340
|
+
|
|
341
|
+
- 5d4a40e: Added StyledMenu
|
|
342
|
+
|
|
343
|
+
### Patch Changes
|
|
344
|
+
|
|
345
|
+
- f525dd9: 2.8.1
|
|
346
|
+
|
|
347
|
+
## 2.8.1
|
|
348
|
+
|
|
349
|
+
### Patch Changes
|
|
350
|
+
|
|
351
|
+
- a88d00d: 2.8.0
|
|
352
|
+
- 2b40bf5: Fixed StyledSelect arrow unclickable
|
|
353
|
+
|
|
354
|
+
## 2.8.0
|
|
355
|
+
|
|
356
|
+
### Minor Changes
|
|
357
|
+
|
|
358
|
+
- 1caf76a: StyledAlert according to figma design
|
|
359
|
+
|
|
360
|
+
### Patch Changes
|
|
361
|
+
|
|
362
|
+
- 14b765f: bump version
|
|
363
|
+
- 9708fb1: Fixed some StyledAlert conflicts
|
|
364
|
+
|
|
365
|
+
## 2.7.4
|
|
366
|
+
|
|
367
|
+
### Patch Changes
|
|
368
|
+
|
|
369
|
+
- 4239ef5: fixed ref in styled select
|
|
370
|
+
- 8b77eaf: reduce bundle size
|
|
371
|
+
- 622557f: added styled widget title
|
|
372
|
+
|
|
373
|
+
## 2.7.0
|
|
374
|
+
|
|
375
|
+
### Minor Changes
|
|
376
|
+
|
|
377
|
+
- 0423ecc: Remove mui date pickers
|
|
378
|
+
- 6753e14: stabilized node version to 18.17.0 and types/node to 18.0.3
|
|
379
|
+
|
|
380
|
+
### Patch Changes
|
|
381
|
+
|
|
382
|
+
- dca730f: added Roboto font to tw-configs
|
|
383
|
+
- 309fc71: Export StyledEngineProvider, Accordion, Typography
|
|
384
|
+
- dec3836: 2.5.4
|
|
385
|
+
- a5490a2: 2.6.5
|
|
386
|
+
- 342519d: 2.5.5
|
|
387
|
+
|
|
388
|
+
## 2.5.3
|
|
389
|
+
|
|
390
|
+
### Patch Changes
|
|
391
|
+
|
|
392
|
+
- 1b0c0cb: fixed slider styles
|
|
393
|
+
|
|
394
|
+
## 2.5.2
|
|
395
|
+
|
|
396
|
+
### Patch Changes
|
|
397
|
+
|
|
398
|
+
- 820b7a8: fixed core-ui dependecies
|
|
399
|
+
|
|
400
|
+
## 2.5.1
|
|
401
|
+
|
|
402
|
+
### Patch Changes
|
|
403
|
+
|
|
404
|
+
- 453a861: changed more colors to match figma
|
|
405
|
+
|
|
406
|
+
## 2.5.0
|
|
407
|
+
|
|
408
|
+
### Minor Changes
|
|
409
|
+
|
|
410
|
+
- 4defa8e: Added StyledDateCalendar
|
|
411
|
+
- 4447c64: Added StyledSlider
|
|
412
|
+
- 4defa8e: Added StyledCalendarPicker, StyledTimePicker & mobile versions for all date components
|
|
413
|
+
|
|
414
|
+
### Patch Changes
|
|
415
|
+
|
|
416
|
+
- cbdb995: updated docker file nodejs19 pnpm
|
|
417
|
+
- ad65511: Refactor StyledSlider classes
|
|
418
|
+
- 59780a8: fix onclick event for icons
|
|
419
|
+
- 4fe79ae: Fixed colors for green & blue theme
|
|
420
|
+
|
|
421
|
+
## 2.2.0
|
|
422
|
+
|
|
423
|
+
### Minor Changes
|
|
424
|
+
|
|
425
|
+
- 537750f: added new props for data-grid
|
|
426
|
+
|
|
427
|
+
## 2.1.0
|
|
428
|
+
|
|
429
|
+
### Minor Changes
|
|
430
|
+
|
|
431
|
+
- 4aba823: Extended interface data grid
|
|
432
|
+
|
|
433
|
+
### Patch Changes
|
|
434
|
+
|
|
435
|
+
- 4aba823: fixed order props for data-grid to be possible override them
|
|
436
|
+
|
|
437
|
+
## 2.0.6
|
|
438
|
+
|
|
439
|
+
### Patch Changes
|
|
440
|
+
|
|
441
|
+
- 6641ff2: fixed order props for data-grid to be possible override them
|
|
442
|
+
|
|
443
|
+
## 2.0.5
|
|
444
|
+
|
|
445
|
+
### Patch Changes
|
|
446
|
+
|
|
447
|
+
- a9b7b6a: added styled switch
|
|
448
|
+
|
|
449
|
+
## 2.0.4
|
|
450
|
+
|
|
451
|
+
### Patch Changes
|
|
452
|
+
|
|
453
|
+
- 4bbdf03: restored styled switch
|
|
454
|
+
|
|
455
|
+
## 2.0.3
|
|
456
|
+
|
|
457
|
+
### Patch Changes
|
|
458
|
+
|
|
459
|
+
- a95643e: fixed fretex tokens
|
|
460
|
+
|
|
461
|
+
## 2.0.2
|
|
462
|
+
|
|
463
|
+
### Patch Changes
|
|
464
|
+
|
|
465
|
+
- a980095: export styled textfield
|
|
466
|
+
|
|
467
|
+
## 2.0.1
|
|
468
|
+
|
|
469
|
+
### Patch Changes
|
|
470
|
+
|
|
471
|
+
- 2d2fe53: restored StyledTextField, added cspell.json
|
|
472
|
+
|
|
473
|
+
## 2.0.0
|
|
474
|
+
|
|
475
|
+
### Major Changes
|
|
476
|
+
|
|
477
|
+
- 42ae731: storybook7, pnpm, tw-configs
|
|
478
|
+
|
|
479
|
+
## 1.9.4
|
|
480
|
+
|
|
481
|
+
### Patch Changes
|
|
482
|
+
|
|
483
|
+
- 5b1f300: tailwind configs from asma-antrd to asma-ui-table
|
|
484
|
+
|
|
485
|
+
## 1.9.3
|
|
486
|
+
|
|
487
|
+
### Patch Changes
|
|
488
|
+
|
|
489
|
+
- bfb9d4f: Fix some class conflicts for StyledDialog
|
|
490
|
+
|
|
491
|
+
## 1.9.2
|
|
492
|
+
|
|
493
|
+
### Patch Changes
|
|
494
|
+
|
|
495
|
+
- f985a8a: StyledFormGroup
|
|
496
|
+
|
|
497
|
+
## 1.9.1
|
|
498
|
+
|
|
499
|
+
### Patch Changes
|
|
500
|
+
|
|
501
|
+
- d6646f3: changed the border for textField
|
|
502
|
+
|
|
503
|
+
## 1.9.0
|
|
504
|
+
|
|
505
|
+
### Minor Changes
|
|
506
|
+
|
|
507
|
+
- ee41eab: added icons from asma-antrd
|
|
508
|
+
|
|
509
|
+
## 1.8.7
|
|
510
|
+
|
|
511
|
+
### Patch Changes
|
|
512
|
+
|
|
513
|
+
- e1da358: add option to disable row actions for data grid
|
|
514
|
+
|
|
515
|
+
## 1.8.5
|
|
516
|
+
|
|
517
|
+
### Patch Changes
|
|
518
|
+
|
|
519
|
+
- 59140d5: StyledTooltip - added arrow and top placement by default
|
|
520
|
+
|
|
521
|
+
## 1.8.4
|
|
522
|
+
|
|
523
|
+
### Patch Changes
|
|
524
|
+
|
|
525
|
+
- 2212b07: Fix StyledCheckbox input size & add disabled style
|
|
526
|
+
|
|
527
|
+
## 1.8.3
|
|
528
|
+
|
|
529
|
+
### Patch Changes
|
|
530
|
+
|
|
531
|
+
- 930e646: Fixed asma-core-grid input checkbox height and width, Fixed actions columns width
|
|
532
|
+
|
|
533
|
+
## 1.8.2
|
|
534
|
+
|
|
535
|
+
### Patch Changes
|
|
536
|
+
|
|
537
|
+
- a4dcdf0: Changed StyledCheckbox classes to scss
|
|
538
|
+
|
|
539
|
+
## 1.8.1
|
|
540
|
+
|
|
541
|
+
### Patch Changes
|
|
542
|
+
|
|
543
|
+
- 306adf9: Fix StyledCheckbox export
|
|
544
|
+
|
|
545
|
+
## 1.8.0
|
|
546
|
+
|
|
547
|
+
### Minor Changes
|
|
548
|
+
|
|
549
|
+
- a0503fa: Added StyledCheckbox
|
|
550
|
+
|
|
551
|
+
## 1.7.2
|
|
552
|
+
|
|
553
|
+
### Patch Changes
|
|
554
|
+
|
|
555
|
+
- 0c21b38: Updated index ts
|
|
556
|
+
|
|
557
|
+
## 1.7.1
|
|
558
|
+
|
|
559
|
+
### Patch Changes
|
|
560
|
+
|
|
561
|
+
- 61a9d22: Extened stanckbar
|
|
562
|
+
|
|
563
|
+
## 1.7.0
|
|
564
|
+
|
|
565
|
+
### Minor Changes
|
|
566
|
+
|
|
567
|
+
- de81629: asma-grid UI fixed, added custom columns menu
|
|
568
|
+
|
|
569
|
+
## 1.6.6
|
|
570
|
+
|
|
571
|
+
### Patch Changes
|
|
572
|
+
|
|
573
|
+
- 2bc692d: On StyledDialog added style to be ovveridable
|
|
574
|
+
|
|
575
|
+
## 1.6.5
|
|
576
|
+
|
|
577
|
+
### Patch Changes
|
|
578
|
+
|
|
579
|
+
- bcc9515: restyled datagrid
|
|
580
|
+
|
|
581
|
+
## 1.6.4
|
|
582
|
+
|
|
583
|
+
### Patch Changes
|
|
584
|
+
|
|
585
|
+
- 4b6dfc8: Fixed fullscreen mode for styled modal window
|
|
586
|
+
|
|
587
|
+
## 1.6.3
|
|
588
|
+
|
|
589
|
+
### Patch Changes
|
|
590
|
+
|
|
591
|
+
- a91eb4c: remove top border datagrid, export datagrid components/types
|
|
592
|
+
|
|
593
|
+
## 1.6.2
|
|
594
|
+
|
|
595
|
+
### Patch Changes
|
|
596
|
+
|
|
597
|
+
- f53ff78: add export for data grid
|
|
598
|
+
|
|
599
|
+
## 1.6.1
|
|
600
|
+
|
|
601
|
+
### Patch Changes
|
|
602
|
+
|
|
603
|
+
- 0cb2ef9: fixed wrongly merged branches
|
|
604
|
+
|
|
605
|
+
### Patch Changes
|
|
606
|
+
|
|
607
|
+
- 37e14dc: DataGrid: Row background, custom checkbox classes
|
|
608
|
+
|
|
609
|
+
## 1.5.9
|
|
610
|
+
|
|
611
|
+
### Patch Changes
|
|
612
|
+
|
|
613
|
+
- 58f8d13: fixed height of styledDialog closeIcon
|
|
614
|
+
|
|
615
|
+
## 1.5.7
|
|
616
|
+
|
|
617
|
+
### Patch Changes
|
|
618
|
+
|
|
619
|
+
- 601522c: added showCloseIcon props to StyledDialog
|
|
620
|
+
|
|
621
|
+
## 1.5.3
|
|
622
|
+
|
|
623
|
+
### Patch Changes
|
|
624
|
+
|
|
625
|
+
- f6958e4: bump version so it's not 1 commit behind
|
|
626
|
+
|
|
627
|
+
## 1.5.2
|
|
628
|
+
|
|
629
|
+
### Patch Changes
|
|
630
|
+
|
|
631
|
+
- e1fc012: remove max width for styled dialog
|
|
632
|
+
|
|
633
|
+
## 1.5.1
|
|
634
|
+
|
|
635
|
+
### Patch Changes
|
|
636
|
+
|
|
637
|
+
- 4371a5b: add form control props for styled text field
|
|
638
|
+
|
|
639
|
+
## 1.5.0
|
|
640
|
+
|
|
641
|
+
### Minor Changes
|
|
642
|
+
|
|
643
|
+
- 9a3ce35: Updated, and created, typography classes. Created Typography Storybook story.
|
|
644
|
+
|
|
645
|
+
## 1.4.0
|
|
646
|
+
|
|
647
|
+
### Minor Changes
|
|
648
|
+
|
|
649
|
+
- bb12a0a: StyledTooltip with stories.
|
|
650
|
+
|
|
651
|
+
## 1.3.2
|
|
652
|
+
|
|
653
|
+
### Patch Changes
|
|
654
|
+
|
|
655
|
+
- ee5d00f: Pipelines: Create second step with build and publish.
|
|
656
|
+
|
|
657
|
+
## 1.3.1
|
|
658
|
+
|
|
659
|
+
### Patch Changes
|
|
660
|
+
|
|
661
|
+
- e673ff4: Fixed index files.
|
|
662
|
+
|
|
663
|
+
## 1.3.0
|
|
664
|
+
|
|
665
|
+
### Minor Changes
|
|
666
|
+
|
|
667
|
+
- 22a817a: StyledAlert, StyledAlertTitle
|
|
668
|
+
- 22a817a: StyledSnackbar
|
|
669
|
+
- e117b3c: StyledBadge
|
|
670
|
+
|
|
671
|
+
### Patch Changes
|
|
672
|
+
|
|
673
|
+
- 22a817a: StyledButton: Default variant - contained.
|
|
674
|
+
- 22a817a: Theme: Reverted default colors for error, success and warning because of faulty success colors.
|
|
675
|
+
|
|
676
|
+
## 1.2.0
|
|
677
|
+
|
|
678
|
+
### Minor Changes
|
|
679
|
+
|
|
680
|
+
- 75d39d0: Created composable components for StyledDialog; StyledDialogTitle, StyledDialogContent and StyledDialogActions.
|
|
681
|
+
- 718ad37: StyledFormControlLabel
|
|
682
|
+
- 718ad37: StyledFormHelperText
|
|
683
|
+
- 718ad37: StyledFormLabel
|
|
684
|
+
- 718ad37: StyledInput
|
|
685
|
+
- 718ad37: StyledInputLabel
|
|
686
|
+
- 718ad37: StyledSwitch
|
|
687
|
+
- 718ad37: StyledTextField
|
package/dist/asma-ui-table.es.js
CHANGED
|
@@ -38,4 +38,4 @@ import*as e from"react";import t,{useMemo as n,useLayoutEffect as o,useEffect as
|
|
|
38
38
|
*
|
|
39
39
|
* @license MIT
|
|
40
40
|
*/
|
|
41
|
-
function Ie(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const Me={"asma-ui-table-styled-table":"_asma-ui-table-styled-table_1dnyl_1","table-wrapper":"_table-wrapper_1dnyl_10","table-wrapper-fetching":"_table-wrapper-fetching_1dnyl_15","styled-table":"_styled-table_1dnyl_18",tbody:"_tbody_1dnyl_27","loading-icon":"_loading-icon_1dnyl_32","t-row":"_t-row_1dnyl_39","action-cell":"_action-cell_1dnyl_55","fixed-cell":"_fixed-cell_1dnyl_58","t-cell":"_t-cell_1dnyl_73",non_expanded_row:"_non_expanded_row_1dnyl_87",selected:"_selected_1dnyl_111",shadowed:"_shadowed_1dnyl_114","is-loading":"_is-loading_1dnyl_130","action-cell-default-background":"_action-cell-default-background_1dnyl_133","fixed-cell-default-background":"_fixed-cell-default-background_1dnyl_136","no-rows-overlay":"_no-rows-overlay_1dnyl_139","sortable-column":"_sortable-column_1dnyl_148",resizer:"_resizer_1dnyl_152",isResizing:"_isResizing_1dnyl_164","hide-table-header":"_hide-table-header_1dnyl_176","show-table-header":"_show-table-header_1dnyl_180","table-header":"_table-header_1dnyl_185","hide-header":"_hide-header_1dnyl_205","t-cell__actions":"_t-cell__actions_1dnyl_208","t-cell__fixed":"_t-cell__fixed_1dnyl_218","sort-icon":"_sort-icon_1dnyl_225","table-footer":"_table-footer_1dnyl_228"};function Ne(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ne(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Pe(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=Ne(e))&&(o&&(o+=" "),o+=t);return o}const Oe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ve(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Ae(e){return"nodeType"in e}function ke(e){var t,n;return e?Ve(e)?e:Ae(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function je(e){const{Document:t}=ke(e);return e instanceof t}function ze(e){return!Ve(e)&&e instanceof ke(e).HTMLElement}function Le(e){return e instanceof ke(e).SVGElement}function Te(e){return e?Ve(e)?e.document:Ae(e)?je(e)?e:ze(e)||Le(e)?e.ownerDocument:document:document:document}const He=Oe?o:r;function Ge(e){const t=l(e);return He((()=>{t.current=e})),i((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function Be(e,t){void 0===t&&(t=[e]);const n=l(e);return He((()=>{n.current!==e&&(n.current=e)}),t),n}function Ue(e,t){const o=l();return n((()=>{const t=e(o.current);return o.current=t,t}),[...t])}function $e(e){const t=Ge(e),n=l(null),o=i((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function qe(e){const t=l();return r((()=>{t.current=e}),[e]),t.current}let We={};function Xe(e,t){return n((()=>{if(t)return t;const n=null==We[e]?0:We[e]+1;return We[e]=n,e+"-"+n}),[e,t])}function Ye(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const Ke=Ye(1),Je=Ye(-1);function Ze(e){if(!e)return!1;const{KeyboardEvent:t}=ke(e.target);return t&&e instanceof t}function Qe(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ke(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const et=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[et.Translate.toString(e),et.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function nt(e){return e.matches(tt)?e:e.querySelector(tt)}const ot={display:"none"};function rt(e){let{id:n,value:o}=e;return t.createElement("div",{id:n,style:ot},o)}function lt(e){let{id:n,announcement:o,ariaLiveType:r="assertive"}=e;return t.createElement("div",{id:n,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},o)}const it=s(null);const at={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},st={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ut(e){let{announcements:o=st,container:l,hiddenTextDescribedById:s,screenReaderInstructions:d=at}=e;const{announce:c,announcement:g}=function(){const[e,t]=a("");return{announce:i((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=Xe("DndLiveRegion"),[f,h]=a(!1);if(r((()=>{h(!0)}),[]),function(e){const t=u(it);r((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(n((()=>({onDragStart(e){let{active:t}=e;c(o.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;o.onDragMove&&c(o.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;c(o.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;c(o.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;c(o.onDragCancel({active:t,over:n}))}})),[c,o])),!f)return null;const m=t.createElement(t.Fragment,null,t.createElement(rt,{id:s,value:d.draggable}),t.createElement(lt,{id:p,announcement:g}));return l?w(m,l):m}var dt,ct;function gt(){}(ct=dt||(dt={})).DragStart="dragStart",ct.DragMove="dragMove",ct.DragEnd="dragEnd",ct.DragCancel="dragCancel",ct.DragOver="dragOver",ct.RegisterDroppable="registerDroppable",ct.SetDroppableDisabled="setDroppableDisabled",ct.UnregisterDroppable="unregisterDroppable";const pt=Object.freeze({x:0,y:0});function ft(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ht(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function mt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function vt(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const bt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=vt(t,t.left,t.top),l=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=ft(vt(o),r);l.push({id:t,data:{droppableContainer:e,value:n}})}}return l.sort(ht)};function wt(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),i=r-o,a=l-n;if(o<r&&n<l){const n=t.width*t.height,o=e.width*e.height,r=i*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const yt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,l=n.get(o);if(l){const n=wt(l,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(mt)};function xt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pt}function Ct(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const St=Ct(1);const Rt={ignoreTransform:!1};function _t(e,t){void 0===t&&(t=Rt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=ke(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:l,x:i,y:a}=o,s=e.left-i-(1-r)*parseFloat(n),u=e.top-a-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,c=l?e.height/l:e.height;return{width:d,height:c,top:u,right:s+d,bottom:u+c,left:s}}(n,t,o))}const{top:o,left:r,width:l,height:i,bottom:a,right:s}=n;return{top:o,left:r,width:l,height:i,bottom:a,right:s}}function Et(e){return _t(e,{ignoreTransform:!0})}function Dt(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t||!r)return n;if(je(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!ze(r)||Le(r)||n.includes(r))return n;const l=ke(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=ke(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,l)&&n.push(r),function(e,t){return void 0===t&&(t=ke(e).getComputedStyle(e)),"fixed"===t.position}(r,l)?n:o(r.parentNode)}(e):n}function Ft(e){const[t]=Dt(e,1);return t??null}function It(e){return Oe&&e?Ve(e)?e:Ae(e)?je(e)||e===Te(e).scrollingElement?window:ze(e)?e:null:null:null}function Mt(e){return Ve(e)?e.scrollX:e.scrollLeft}function Nt(e){return Ve(e)?e.scrollY:e.scrollTop}function Pt(e){return{x:Mt(e),y:Nt(e)}}var Ot;function Vt(e){return!(!Oe||!e)&&e===document.scrollingElement}function At(e){const t={x:0,y:0},n=Vt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Ot||(Ot={}));const kt={x:.2,y:.2};function jt(e,t,n,o,r){let{top:l,left:i,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=kt);const{isTop:u,isBottom:d,isLeft:c,isRight:g}=At(e),p={x:0,y:0},f={x:0,y:0},h=t.height*r.y,m=t.width*r.x;return!u&&l<=t.top+h?(p.y=Ot.Backward,f.y=o*Math.abs((t.top+h-l)/h)):!d&&s>=t.bottom-h&&(p.y=Ot.Forward,f.y=o*Math.abs((t.bottom-h-s)/h)),!g&&a>=t.right-m?(p.x=Ot.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!c&&i<=t.left+m&&(p.x=Ot.Backward,f.x=o*Math.abs((t.left+m-i)/m)),{direction:p,speed:f}}function zt(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Lt(e){return e.reduce(((e,t)=>Ke(e,Pt(t))),pt)}const Tt=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Mt(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Nt(t)),0)}]];class Ht{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Dt(t),o=Lt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Tt)for(const l of t)Object.defineProperty(this,l,{get:()=>{const t=r(n),i=o[e]-t;return this.rect[l]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Gt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Bt(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Ut,$t;function qt(e){e.preventDefault()}function Wt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ut||(Ut={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}($t||($t={}));const Xt={start:[$t.Space,$t.Enter],cancel:[$t.Esc],end:[$t.Space,$t.Enter]},Yt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $t.Right:return{...n,x:n.x+25};case $t.Left:return{...n,x:n.x-25};case $t.Down:return{...n,y:n.y+25};case $t.Up:return{...n,y:n.y-25}}};class Kt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Gt(Te(t)),this.windowListeners=new Gt(ke(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ut.Resize,this.handleCancel),this.windowListeners.add(Ut.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Ut.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=_t),!e)return;const{top:n,left:o,bottom:r,right:l}=t(e);Ft(e)&&(r<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(pt)}handleKeyDown(e){if(Ze(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=Xt,coordinateGetter:l=Yt,scrollBehavior:i="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:pt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=l(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=Je(d,u),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:l,isRight:a,isLeft:s,isBottom:u,maxScroll:c,minScroll:g}=At(n),p=zt(n),f={x:Math.min(r===$t.Right?p.right-p.width/2:p.right,Math.max(r===$t.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(r===$t.Down?p.bottom-p.height/2:p.bottom,Math.max(r===$t.Down?p.top:p.top+p.height/2,d.y))},h=r===$t.Right&&!a||r===$t.Left&&!s,m=r===$t.Down&&!u||r===$t.Up&&!l;if(h&&f.x!==d.x){const e=n.scrollLeft+t.x,l=r===$t.Right&&e<=c.x||r===$t.Left&&e>=g.x;if(l&&!t.y)return void n.scrollTo({left:e,behavior:i});o.x=l?n.scrollLeft-e:r===$t.Right?n.scrollLeft-c.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:i});break}if(m&&f.y!==d.y){const e=n.scrollTop+t.y,l=r===$t.Down&&e<=c.y||r===$t.Up&&e>=g.y;if(l&&!t.x)return void n.scrollTo({top:e,behavior:i});o.y=l?n.scrollTop-e:r===$t.Down?n.scrollTop-c.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:i});break}}this.handleMove(e,Ke(Je(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Jt(e){return!(!e||!("distance"in e))}function Zt(e){return!(!e||!("delay"in e))}Kt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Xt,onActivation:r}=t,{active:l}=n;const{code:i}=e.nativeEvent;if(o.start.includes(i)){const t=l.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class Qt{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=ke(e);return e instanceof t?e:Te(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:l}=r;this.props=e,this.events=t,this.document=Te(l),this.documentListeners=new Gt(this.document),this.listeners=new Gt(n),this.windowListeners=new Gt(ke(l)),this.initialCoordinates=null!=(o=Qe(r))?o:pt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Ut.Resize,this.handleCancel),this.windowListeners.add(Ut.DragStart,qt),this.windowListeners.add(Ut.VisibilityChange,this.handleCancel),this.windowListeners.add(Ut.ContextMenu,qt),this.documentListeners.add(Ut.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Zt(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(Jt(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ut.Click,Wt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ut.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:l,options:{activationConstraint:i}}=r;if(!o)return;const a=null!=(t=Qe(e))?t:pt,s=Je(o,a);if(!n&&i){if(Jt(i)){if(null!=i.tolerance&&Bt(s,i.tolerance))return this.handleCancel();if(Bt(s,i.distance))return this.handleStart()}return Zt(i)&&Bt(s,i.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),l(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===$t.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const en={move:{name:"pointermove"},end:{name:"pointerup"}};class tn extends Qt{constructor(e){const{event:t}=e,n=Te(t.target);super(e,en,n)}}tn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const nn={move:{name:"mousemove"},end:{name:"mouseup"}};var on;!function(e){e[e.RightClick=2]="RightClick"}(on||(on={}));(class extends Qt{constructor(e){super(e,nn,Te(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==on.RightClick&&(null==o||o({event:n}),!0)}}];const rn={move:{name:"touchmove"},end:{name:"touchend"}};var ln,an;function sn(e){let{acceleration:t,activator:o=ln.Pointer,canScroll:a,draggingRect:s,enabled:u,interval:d=5,order:c=an.TreeOrder,pointerCoordinates:g,scrollableAncestors:p,scrollableAncestorRects:f,delta:h,threshold:m}=e;const v=function(e){let{delta:t,disabled:n}=e;const o=qe(t);return Ue((e=>{if(n||!o||!e)return un;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Ot.Backward]:e.x[Ot.Backward]||-1===r.x,[Ot.Forward]:e.x[Ot.Forward]||1===r.x},y:{[Ot.Backward]:e.y[Ot.Backward]||-1===r.y,[Ot.Forward]:e.y[Ot.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!u}),[b,w]=function(){const e=l(null);return[i(((t,n)=>{e.current=setInterval(t,n)}),[]),i((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),y=l({x:0,y:0}),x=l({x:0,y:0}),C=n((()=>{switch(o){case ln.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case ln.DraggableRect:return s}}),[o,s,g]),S=l(null),R=i((()=>{const e=S.current;if(!e)return;const t=y.current.x*x.current.x,n=y.current.y*x.current.y;e.scrollBy(t,n)}),[]),_=n((()=>c===an.TreeOrder?[...p].reverse():p),[c,p]);r((()=>{if(u&&p.length&&C){for(const e of _){if(!1===(null==a?void 0:a(e)))continue;const n=p.indexOf(e),o=f[n];if(!o)continue;const{direction:r,speed:l}=jt(e,o,C,t,m);for(const e of["x","y"])v[e][r[e]]||(l[e]=0,r[e]=0);if(l.x>0||l.y>0)return w(),S.current=e,b(R,d),y.current=l,void(x.current=r)}y.current={x:0,y:0},x.current={x:0,y:0},w()}else w()}),[t,R,a,w,u,d,JSON.stringify(C),JSON.stringify(v),b,p,_,f,JSON.stringify(m)])}(class extends Qt{constructor(e){super(e,rn)}static setup(){return window.addEventListener(rn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(rn.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ln||(ln={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(an||(an={}));const un={x:{[Ot.Backward]:!1,[Ot.Forward]:!1},y:{[Ot.Backward]:!1,[Ot.Forward]:!1}};var dn,cn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(dn||(dn={})),(cn||(cn={})).Optimized="optimized";const gn=new Map;function pn(e,t){return Ue((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function fn(e){let{callback:t,disabled:o}=e;const l=Ge(t),i=n((()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:e}=window;return new e(l)}),[o]);return r((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function hn(e){return new Ht(_t(e),e)}function mn(e,t,o){void 0===t&&(t=hn);const[l,i]=c((function(n){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=n??o)?r:null;const l=t(e);return JSON.stringify(n)===JSON.stringify(l)?n:l}),null),a=function(e){let{callback:t,disabled:o}=e;const l=Ge(t),i=n((()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:e}=window;return new e(l)}),[l,o]);return r((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){i();break}}}}),s=fn({callback:i});return He((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),l}const vn=[];function bn(e,t){void 0===t&&(t=[]);const n=l(null);return r((()=>{n.current=null}),t),r((()=>{const t=e!==pt;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?Je(e,n.current):pt}function wn(e){return n((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const yn=[];function xn(e){let{measure:t}=e;const[o,r]=a(null),l=fn({callback:i((e=>{for(const{target:n}of e)if(ze(n)){r((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),s=i((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ze(t)?t:e}(e);null==l||l.disconnect(),n&&(null==l||l.observe(n)),r(n?t(n):null)}),[t,l]),[u,d]=$e(s);return n((()=>({nodeRef:u,rect:o,setRef:d})),[o,u,d])}const Cn=[{sensor:tn,options:{}},{sensor:Kt,options:{}}],Sn={current:{}},Rn={draggable:{measure:Et},droppable:{measure:Et,strategy:dn.WhileDragging,frequency:cn.Optimized},dragOverlay:{measure:_t}};class _n extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const En={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new _n,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Rn,measureDroppableContainers:gt,windowRect:null,measuringScheduled:!1},Dn=s({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:gt,draggableNodes:new Map,over:null,measureDroppableContainers:gt}),Fn=s(En);function In(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new _n}}}function Mn(e,t){switch(t.type){case dt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case dt.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case dt.DragEnd:case dt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case dt.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new _n(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case dt.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,l=e.droppable.containers.get(n);if(!l||o!==l.key)return e;const i=new _n(e.droppable.containers);return i.set(n,{...l,disabled:r}),{...e,droppable:{...e.droppable,containers:i}}}case dt.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const l=new _n(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Nn(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:l}=u(Dn),i=qe(o),a=qe(null==n?void 0:n.id);return r((()=>{if(!t&&!o&&i&&null!=a){if(!Ze(i)||document.activeElement===i.target)return;const e=l.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=nt(e);if(t){t.focus();break}}}))}}),[o,t,l,a,i]),null}const Pn=s({...pt,scaleX:1,scaleY:1});var On;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(On||(On={}));const Vn=d((function(e){var o,s,u,d;let{id:g,accessibility:p,autoScroll:f=!0,children:h,sensors:m=Cn,collisionDetection:v=yt,measuring:w,modifiers:y,...x}=e;const C=c(Mn,void 0,In),[S,R]=C,[_,E]=function(){const[e]=a((()=>new Set)),t=i((t=>(e.add(t),()=>e.delete(t))),[e]);return[i((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[D,F]=a(On.Uninitialized),I=D===On.Initialized,{draggable:{active:M,nodes:N,translate:P},droppable:{containers:O}}=S,V=M?N.get(M):null,A=l({initial:null,translated:null}),k=n((()=>{var e;return null!=M?{id:M,data:null!=(e=null==V?void 0:V.data)?e:Sn,rect:A}:null}),[M,V]),j=l(null),[z,L]=a(null),[T,H]=a(null),G=Be(x,Object.values(x)),B=Xe("DndDescribedBy",g),U=n((()=>O.getEnabled()),[O]),$=function(e){return n((()=>({draggable:{...Rn.draggable,...null==e?void 0:e.draggable},droppable:{...Rn.droppable,...null==e?void 0:e.droppable},dragOverlay:{...Rn.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(w),{droppableRects:q,measureDroppableContainers:W,measuringScheduled:X}=function(e,t){let{dragging:n,dependencies:o,config:s}=t;const[u,d]=a(null),{frequency:c,measure:g,strategy:p}=s,f=l(e),h=function(){switch(p){case dn.Always:return!1;case dn.BeforeDragging:return n;default:return!n}}(),m=Be(h),v=i((function(e){void 0===e&&(e=[]),!m.current&&d((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),b=l(null),w=Ue((t=>{if(h&&!n)return gn;if(!t||t===gn||f.current!==e||null!=u){const t=new Map;for(let n of e){if(!n)continue;if(u&&u.length>0&&!u.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Ht(g(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,u,n,h,g]);return r((()=>{f.current=e}),[e]),r((()=>{h||v()}),[n,h]),r((()=>{u&&u.length>0&&d(null)}),[JSON.stringify(u)]),r((()=>{h||"number"!=typeof c||null!==b.current||(b.current=setTimeout((()=>{v(),b.current=null}),c))}),[c,h,v,...o]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:null!=u}}(U,{dragging:I,dependencies:[P.x,P.y],config:$.droppable}),Y=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return Ue((e=>{var n;return null===t?null:null!=(n=o??e)?n:null}),[o,t])}(N,M),K=n((()=>T?Qe(T):null),[T]),J=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=I&&!e&&!t;return"object"==typeof f?{...f,enabled:n}:{enabled:n}}(),Z=function(e,t){return pn(e,t)}(Y,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=l(!1),{x:a,y:s}="boolean"==typeof r?{x:r,y:r}:r;He((()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=xt(n(e),o);if(a||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=Ft(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,a,s,o,n])}({activeNode:M?N.get(M):null,config:J.layoutShiftCompensation,initialRect:Z,measure:$.draggable.measure});const Q=mn(Y,$.draggable.measure,Z),ee=mn(Y?Y.parentElement:null),te=l({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=O.getNodeFor(null==(o=te.current.over)?void 0:o.id),oe=xn({measure:$.dragOverlay.measure}),re=null!=(s=oe.nodeRef.current)?s:Y,le=I?null!=(u=oe.rect)?u:Q:null,ie=!(!oe.nodeRef.current||!oe.rect),ae=function(e){return xt(e,pn(e))}(ie?null:Q),se=wn(re?ke(re):null),ue=function(e){const t=l(e),n=Ue((n=>e?n&&n!==vn&&e&&t.current&&e.parentNode===t.current.parentNode?n:Dt(e):vn),[e]);return r((()=>{t.current=e}),[e]),n}(I?ne??Y:null),de=function(e,t){void 0===t&&(t=_t);const[n]=e,o=wn(n?ke(n):null),[r,l]=c((function(){return e.length?e.map((e=>Vt(e)?o:new Ht(t(e),e))):yn}),yn),i=fn({callback:l});return e.length>0&&r===yn&&l(),He((()=>{e.length?e.forEach((e=>null==i?void 0:i.observe(e))):(null==i||i.disconnect(),l())}),[e]),r}(ue),ce=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(y,{transform:{x:P.x-ae.x,y:P.y-ae.y,scaleX:1,scaleY:1},activatorEvent:T,active:k,activeNodeRect:Q,containerNodeRect:ee,draggingNodeRect:le,over:te.current.over,overlayNodeRect:oe.rect,scrollableAncestors:ue,scrollableAncestorRects:de,windowRect:se}),ge=K?Ke(K,P):null,pe=function(e){const[t,o]=a(null),s=l(e),u=i((e=>{const t=It(e.target);t&&o((e=>e?(e.set(t,Pt(t)),new Map(e)):null))}),[]);return r((()=>{const t=s.current;if(e!==t){n(t);const r=e.map((e=>{const t=It(e);return t?(t.addEventListener("scroll",u,{passive:!0}),[t,Pt(t)]):null})).filter((e=>null!=e));o(r.length?new Map(r):null),s.current=e}return()=>{n(e),n(t)};function n(e){e.forEach((e=>{const t=It(e);null==t||t.removeEventListener("scroll",u)}))}}),[u,e]),n((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>Ke(e,t)),pt):Lt(e):pt),[e,t])}(ue),fe=bn(pe),he=bn(pe,[Q]),me=Ke(ce,fe),ve=le?St(le,ce):null,be=k&&ve?v({active:k,collisionRect:ve,droppableRects:q,droppableContainers:U,pointerCoordinates:ge}):null,we=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(be,"id"),[ye,xe]=a(null),Ce=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ie?ce:Ke(ce,he),null!=(d=null==ye?void 0:ye.rect)?d:null,Q),Se=i(((e,t)=>{let{sensor:n,options:o}=t;if(null==j.current)return;const r=N.get(j.current);if(!r)return;const l=e.nativeEvent,i=new n({active:j.current,activeNode:r,event:l,options:o,context:te,onStart(e){const t=j.current;if(null==t)return;const n=N.get(t);if(!n)return;const{onDragStart:o}=G.current,r={active:{id:t,data:n.data,rect:A}};b((()=>{null==o||o(r),F(On.Initializing),R({type:dt.DragStart,initialCoordinates:e,active:t}),_({type:"onDragStart",event:r})}))},onMove(e){R({type:dt.DragMove,coordinates:e})},onEnd:a(dt.DragEnd),onCancel:a(dt.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=te.current;let i=null;if(t&&r){const{cancelDrop:a}=G.current;i={activatorEvent:l,active:t,collisions:n,delta:r,over:o},e===dt.DragEnd&&"function"==typeof a&&await Promise.resolve(a(i))&&(e=dt.DragCancel)}j.current=null,b((()=>{R({type:e}),F(On.Uninitialized),xe(null),L(null),H(null);const t=e===dt.DragEnd?"onDragEnd":"onDragCancel";if(i){const e=G.current[t];null==e||e(i),_({type:t,event:i})}}))}}b((()=>{L(i),H(e.nativeEvent)}))}),[N]),Re=function(e,t){return n((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,i(((e,t)=>(n,o)=>{const r=n.nativeEvent,l=N.get(o);if(null!==j.current||!l||r.dndKit||r.defaultPrevented)return;const i={active:l};!0===e(n,t.options,i)&&(r.dndKit={capturedBy:t.sensor},j.current=o,Se(n,t))}),[N,Se]));(function(e){r((()=>{if(!Oe)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))})(m),He((()=>{Q&&D===On.Initializing&&F(On.Initialized)}),[Q,D]),r((()=>{const{onDragMove:e}=G.current,{active:t,activatorEvent:n,collisions:o,over:r}=te.current;if(!t||!n)return;const l={active:t,activatorEvent:n,collisions:o,delta:{x:me.x,y:me.y},over:r};b((()=>{null==e||e(l),_({type:"onDragMove",event:l})}))}),[me.x,me.y]),r((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=te.current;if(!e||null==j.current||!t||!r)return;const{onDragOver:l}=G.current,i=o.get(we),a=i&&i.rect.current?{id:i.id,rect:i.rect.current,data:i.data,disabled:i.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};b((()=>{xe(a),null==l||l(s),_({type:"onDragOver",event:s})}))}),[we]),He((()=>{te.current={activatorEvent:T,active:k,activeNode:Y,collisionRect:ve,collisions:be,droppableRects:q,draggableNodes:N,draggingNode:re,draggingNodeRect:le,droppableContainers:O,over:ye,scrollableAncestors:ue,scrollAdjustedTranslate:me},A.current={initial:le,translated:ve}}),[k,Y,be,ve,N,re,le,q,O,ye,ue,me]),sn({...J,delta:P,draggingRect:ve,pointerCoordinates:ge,scrollableAncestors:ue,scrollableAncestorRects:de});const _e=n((()=>({active:k,activeNode:Y,activeNodeRect:Q,activatorEvent:T,collisions:be,containerNodeRect:ee,dragOverlay:oe,draggableNodes:N,droppableContainers:O,droppableRects:q,over:ye,measureDroppableContainers:W,scrollableAncestors:ue,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:X,windowRect:se})),[k,Y,Q,T,be,ee,oe,N,O,q,ye,W,ue,de,$,X,se]),Ee=n((()=>({activatorEvent:T,activators:Re,active:k,activeNodeRect:Q,ariaDescribedById:{draggable:B},dispatch:R,draggableNodes:N,over:ye,measureDroppableContainers:W})),[T,Re,k,Q,R,B,N,ye,W]);return t.createElement(it.Provider,{value:E},t.createElement(Dn.Provider,{value:Ee},t.createElement(Fn.Provider,{value:_e},t.createElement(Pn.Provider,{value:Ce},h)),t.createElement(Nn,{disabled:!1===(null==p?void 0:p.restoreFocus)})),t.createElement(ut,{...p,hiddenTextDescribedById:B}))})),An=s(null),kn="button",jn="Droppable";function zn(e){let{id:t,data:o,disabled:r=!1,attributes:l}=e;const i=Xe(jn),{activators:a,activatorEvent:s,active:d,activeNodeRect:c,ariaDescribedById:g,draggableNodes:p,over:f}=u(Dn),{role:h=kn,roleDescription:m="draggable",tabIndex:v=0}=l??{},b=(null==d?void 0:d.id)===t,w=u(b?Pn:An),[y,x]=$e(),[C,S]=$e(),R=function(e,t){return n((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(a,t),_=Be(o);He((()=>(p.set(t,{id:t,key:i,node:y,activatorNode:C,data:_}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)})),[p,t]);return{active:d,activatorEvent:s,activeNodeRect:c,attributes:n((()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||h!==kn)||void 0,"aria-roledescription":m,"aria-describedby":g.draggable})),[r,h,v,b,m,g.draggable]),isDragging:b,listeners:r?void 0:R,node:y,over:f,setNodeRef:x,setActivatorNodeRef:S,transform:w}}const Ln="Droppable",Tn={timeout:25};function Hn(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Gn(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function Bn(e){return null!==e&&e>=0}const Un=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const l=Hn(t,o,n),i=t[r],a=l[r];return a&&i?{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}:null},$n={scaleX:1,scaleY:1},qn=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:l,overIndex:i}=e;const a=null!=(t=l[n])?t:o;if(!a)return null;if(r===n){const e=l[i];return e?{x:0,y:n<i?e.top+e.height-(a.top+a.height):e.top-a.top,...$n}:null}const s=function(e,t,n){const o=e[t],r=e[t-1],l=e[t+1];return o?n<t?r?o.top-(r.top+r.height):l?l.top-(o.top+o.height):0:l?l.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(l,r,n);return r>n&&r<=i?{x:0,y:-a.height-s,...$n}:r<n&&r>=i?{x:0,y:a.height+s,...$n}:{x:0,y:0,...$n}};const Wn="Sortable",Xn=t.createContext({activeIndex:-1,containerId:Wn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Un,disabled:{draggable:!1,droppable:!1}});function Yn(e){let{children:o,id:i,items:a,strategy:s=Un,disabled:d=!1}=e;const{active:c,dragOverlay:g,droppableRects:p,over:f,measureDroppableContainers:h}=u(Fn),m=Xe(Wn,i),v=null!==g.rect,b=n((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),w=null!=c,y=c?b.indexOf(c.id):-1,x=f?b.indexOf(f.id):-1,C=l(b),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(b,C.current),R=-1!==x&&-1===y||S,_=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(d);He((()=>{S&&w&&h(b)}),[S,b,w,h]),r((()=>{C.current=b}),[b]);const E=n((()=>({activeIndex:y,containerId:m,disabled:_,disableTransforms:R,items:b,overIndex:x,useDragOverlay:v,sortedRects:Gn(b,p),strategy:s})),[y,m,_.draggable,_.droppable,R,b,x,p,v,s]);return t.createElement(Xn.Provider,{value:E},o)}const Kn=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Hn(n,o,r).indexOf(t)},Jn=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:l,newIndex:i,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!o||a!==l&&r===i)&&(!!n||i!==r&&t===s)},Zn={duration:200,easing:"ease"},Qn="transform",eo=et.Transition.toString({property:Qn,duration:0,easing:"linear"}),to={roleDescription:"sortable"};function no(e){let{animateLayoutChanges:t=Jn,attributes:o,disabled:s,data:d,getNewIndex:c=Kn,id:g,strategy:p,resizeObserverConfig:f,transition:h=Zn}=e;const{items:m,containerId:v,activeIndex:b,disabled:w,disableTransforms:y,sortedRects:x,overIndex:C,useDragOverlay:S,strategy:R}=u(Xn),_=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(s,w),E=m.indexOf(g),D=n((()=>({sortable:{containerId:v,index:E,items:m},...d})),[v,d,E,m]),F=n((()=>m.slice(m.indexOf(g))),[m,g]),{rect:I,node:M,isOver:N,setNodeRef:P}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const s=Xe(Ln),{active:d,dispatch:c,over:g,measureDroppableContainers:p}=u(Dn),f=l({disabled:n}),h=l(!1),m=l(null),v=l(null),{disabled:b,updateMeasurementsFor:w,timeout:y}={...Tn,...a},x=Be(w??o),C=fn({callback:i((()=>{h.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),v.current=null}),y)):h.current=!0}),[y]),disabled:b||!d}),S=i(((e,t)=>{C&&(t&&(C.unobserve(t),h.current=!1),e&&C.observe(e))}),[C]),[R,_]=$e(S),E=Be(t);return r((()=>{!C||!R.current||(C.disconnect(),h.current=!1,C.observe(R.current))}),[R,C]),He((()=>(c({type:dt.RegisterDroppable,element:{id:o,key:s,disabled:n,node:R,rect:m,data:E}}),()=>c({type:dt.UnregisterDroppable,key:s,id:o}))),[o]),r((()=>{n!==f.current.disabled&&(c({type:dt.SetDroppableDisabled,id:o,key:s,disabled:n}),f.current.disabled=n)}),[o,s,n,c]),{active:d,rect:m,isOver:(null==g?void 0:g.id)===o,node:R,over:g,setNodeRef:_}}({id:g,data:D,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:F,...f}}),{active:O,activatorEvent:V,activeNodeRect:A,attributes:k,setNodeRef:j,listeners:z,isDragging:L,over:T,setActivatorNodeRef:H,transform:G}=zn({id:g,data:D,attributes:{...to,...o},disabled:_.draggable}),B=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n((()=>e=>{t.forEach((t=>t(e)))}),t)}(P,j),U=!!O,$=U&&!y&&Bn(b)&&Bn(C),q=!S&&L,W=$?(q&&$?G:null)??(p??R)({rects:x,activeNodeRect:A,activeIndex:b,overIndex:C,index:E}):null,X=Bn(b)&&Bn(C)?c({id:g,items:m,activeIndex:b,overIndex:C}):E,Y=null==O?void 0:O.id,K=l({activeId:Y,items:m,newIndex:X,containerId:v}),J=m!==K.current.items,Z=t({active:O,containerId:v,isDragging:L,isSorting:U,id:g,index:E,items:m,newIndex:K.current.newIndex,previousItems:K.current.items,previousContainerId:K.current.containerId,transition:h,wasDragging:null!=K.current.activeId}),Q=function(e){let{disabled:t,index:n,node:o,rect:i}=e;const[s,u]=a(null),d=l(n);return He((()=>{if(!t&&n!==d.current&&o.current){const e=i.current;if(e){const t=_t(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==d.current&&(d.current=n)}),[t,n,o,i]),r((()=>{s&&u(null)}),[s]),s}({disabled:!Z,index:E,node:M,rect:I});return r((()=>{U&&K.current.newIndex!==X&&(K.current.newIndex=X),v!==K.current.containerId&&(K.current.containerId=v),m!==K.current.items&&(K.current.items=m)}),[U,X,v,m]),r((()=>{if(Y===K.current.activeId)return;if(Y&&!K.current.activeId)return void(K.current.activeId=Y);const e=setTimeout((()=>{K.current.activeId=Y}),50);return()=>clearTimeout(e)}),[Y]),{active:O,activeIndex:b,attributes:k,data:D,rect:I,index:E,newIndex:X,items:m,isOver:N,isSorting:U,isDragging:L,listeners:z,node:M,overIndex:C,over:T,setNodeRef:B,setActivatorNodeRef:H,setDroppableNodeRef:P,setDraggableNodeRef:j,transform:Q??W,transition:function(){if(Q||J&&K.current.newIndex===E)return eo;if((!q||Ze(V))&&h&&(U||Z))return et.Transition.toString({...h,property:Qn})}()}}$t.Down,$t.Right,$t.Up,$t.Left;const oo=s(void 0),ro=({children:e})=>{const[t,n]=a(new Set),[o,r]=a(!1);return O.jsx(oo.Provider,{value:{expandedRows:t,toggleExpand:e=>{n((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))},enableResizingFlag:()=>r(!0),disableResizingFlag:()=>r(!1),isResizing:o},children:e})},lo=()=>{const e=u(oo);if(void 0===e)throw new Error("useRootContext must be used within a RootContextProvider");return e};function io({styledTableProps:e,row:t,index:o}){const{focusable:l,loading:i,getRowClassName:a,rowHeight:s,onRowClick:u,expandArrow:d,enableDnd:c,tdClassName:p,customSubRowData:f,renderSubRows:h,defaultExpanded:m}=e,{transform:v,transition:b,setNodeRef:w,isDragging:y}=no({id:t.original.id,disabled:!c}),x={transform:et.Transform.toString(v),transition:b,opacity:y?.8:1,zIndex:y?1:0,position:"relative"},{expandedRows:C,isResizing:S,disableResizingFlag:R,toggleExpand:_}=lo();r((()=>{m&&t.getCanExpand()&&!t.getIsExpanded()&&_(t.id)}),[]);const E=t.getVisibleCells(),D=n((()=>E.map(((e,t)=>({...e,left:E.slice(0,t).reduce(((e,t)=>e+(t.column.getSize()||0)),0)})))),[E]),F=n((()=>D.some((e=>!0===e.column.columnDef.fixedLeft))),[D]);return O.jsxs(g,{children:[O.jsx("tr",{"data-index":o,"data-test":t.id,id:t.id,tabIndex:l?-1:void 0,className:Pe(Me["t-row"],i&&Me["is-loading"],(t.getIsExpanded()||t.getIsSelected())&&Me.selected,null==a?void 0:a(t)),style:{height:s?`${s}px`:"inherit",...c&&x},ref:w,onMouseUp:e=>{var n,o;if(e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName)return;t.getCanExpand()&&!d&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r="Range"===(null==(o=window.getSelection())?void 0:o.type);u&&!r&&!S&&u(e,t),R()},children:D.map((e=>{const n="actions"===e.column.id,o=e.column.columnDef.fixedLeft,r=C.has(t.original.id.toString());return O.jsx("td",{className:Pe(Me["t-cell"],p,n&&Me["action-cell"],n&&F&&Me.shadowed,n&&(t.getIsExpanded()||t.getIsSelected())&&Me.selected,n&&(null!=a&&a(t)?null==a?void 0:a(t):Me["action-cell-default-background"]),o&&Me["fixed-cell"],o&&(t.getIsExpanded()||t.getIsSelected())&&Me.selected,o&&(null!=a&&a(t)?null==a?void 0:a(t):Me["fixed-cell-default-background"]),!r&&Me.non_expanded_row),style:{left:o?e.left:void 0},children:Ie(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&O.jsx(O.Fragment,{children:f&&h&&h({rows:f.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function ao({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return O.jsx(O.Fragment,{children:n.map(((t,n)=>O.jsx(io,{styledTableProps:e,row:t,index:n},t.id)))})}const so=({colSpan:e,noRowsOverlay:t})=>O.jsx("tr",{className:Me["no-rows-overlay"],children:O.jsx("td",{colSpan:e,children:t})});function uo({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:l,enableDnd:i}=t;return O.jsx("tbody",{className:Me.tbody,children:0===o.length&&r?O.jsx(V,{colSpan:n.length}):o.length>0?O.jsx(O.Fragment,{children:i?O.jsx(Yn,{items:o,strategy:qn,children:O.jsx(ao,{table:e,styledTableProps:t})}):O.jsx(ao,{table:e,styledTableProps:t})}):O.jsx(so,{colSpan:n.length,noRowsOverlay:l})})}const co=()=>{const[e,t]=a(null),n=!!e,o=i((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:i((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};function go(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"})})}function po(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}function fo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const ho={"table-pagination":"_table-pagination_k2a41_1","table-pagination__pages-list":"_table-pagination__pages-list_k2a41_13","table-pagination__pages-list__page":"_table-pagination__pages-list__page_k2a41_18","page-selected":"_page-selected_k2a41_29","check-icon":"_check-icon_k2a41_32"};function mo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}function vo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const bo="_asma-core-ui-button_1r2np_1",wo={contained:"_contained_1r2np_27",outlined:"_outlined_1r2np_141",text:"_text_1r2np_255",textGray:"_textGray_1r2np_369",textWhite:"_textWhite_1r2np_426",large:"_large_1r2np_79",small:"_small_1r2np_74",medium:"_medium_1r2np_69",error:"_error_1r2np_84",common:"_common_1r2np_27"},yo=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:l,endIcon:i,dataTest:a,error:s,...u})=>{const d="large"===n||"medium"===n,c=s?"error":"common";return O.jsxs("button",{...u,className:Pe(bo,wo[e],wo[c],wo[n],t),ref:r,"data-test":a,children:[l,o&&O.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:d?"8px":"4px",paddingLeft:d?"8px":"4px",paddingRight:d?"8px":"4px"},children:o}),i]})};function xo({table:e,locale:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=co(),a=l(null),s="no"===t,u=Me["asma-ui-table-styled-table"],d=()=>{var e,t,n,o;null==(o=null==(n=null==(t=null==(e=null==a?void 0:a.current)?void 0:e.closest(`.${u}`))?void 0:t.querySelectorAll('[data-index="0"]'))?void 0:n[0])||o.scrollIntoView({block:"center",inline:"start"})},c=e.getPageCount()||1,g=e.getState().pagination.pageIndex+1,p=Array.from({length:c},((e,t)=>t+1));return O.jsxs("div",{ref:a,className:ho["table-pagination"],children:[O.jsx(f,{title:s?"Nåværende side":"Current Page",children:O.jsx("div",{children:O.jsxs(yo,{dataTest:"",variant:"outlined",style:{minWidth:"140px"},onClick:e=>{i(e)},endIcon:o?O.jsx(go,{height:24,width:24}):O.jsx(po,{height:24,width:24}),children:[s?"Side":"Page"," ",g," ",s?"av":"of"," ",c]})})}),O.jsx(h,{open:o,anchorEl:n,onClose:r,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:O.jsx("div",{className:ho["table-pagination__pages-list"],children:p.map((t=>O.jsxs("div",{className:Pe(ho["table-pagination__pages-list__page"],g===t&&"page-selected"),onClick:()=>{e.setPageIndex(t-1),r(),d()},children:[g===t&&O.jsx(vo,{className:ho["check-icon"],height:24,width:24}),O.jsxs("span",{children:[s?"Side":"Page"," ",t]})]},t)))})}),O.jsx(f,{title:1===g?"":s?"Forrige side":"Previous Page",children:O.jsx("div",{children:O.jsx(yo,{dataTest:"",variant:"outlined",onClick:()=>{e.previousPage(),d()},disabled:!e.getCanPreviousPage(),style:{minWidth:40,width:40},startIcon:O.jsx(mo,{height:24,width:24})})})}),O.jsx(f,{title:g===c?"":s?"Neste side":"Next Page",children:O.jsx("div",{children:O.jsx(yo,{dataTest:"",variant:"outlined",onClick:()=>{e.nextPage(),d()},disabled:!e.getCanNextPage(),style:{minWidth:40,width:40},startIcon:O.jsx(fo,{height:24,width:24})})})})]})}function Co({table:e,styledTableProps:t}){var n;return t.hideFooter?null:O.jsxs("div",{className:Me["table-footer"],children:[null==(n=t.footer)?void 0:n.call(t,e),O.jsx(xo,{table:e,locale:t.locale||"en"})]})}const So=t=>{const{columns:n,data:o,initialState:r,pageSize:l,enableRowSelection:i,tableInstanceRef:a,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:Re(n)}))),[r,l]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{l(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:l||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[C]:!1},...r},enableRowSelection:i,getCoreRowModel:e=>z((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,l){void 0===r&&(r=0);const i=[];for(let s=0;s<t.length;s++){const u=_e(e,e._getRowId(t[s],s,l),t[s],s,r,void 0,null==l?void 0:l.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,i.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return i};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>z((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?Fe(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>z((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],l=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const l=o.getFilterFn();l?r.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const i=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,d;o&&a&&s.length&&(i.push("__global__"),s.forEach((e=>{var t;l.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(l.length){for(let e=0;e<l.length;e++){d=l[e];const t=d.id;if(d.filterFn(n,t,d.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return De(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilters[i[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>z((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],l=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),i={};l.forEach((t=>{const n=e.getColumn(t.id);n&&(i[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<l.length;o+=1){var n;const r=l[o],a=i[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>z((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:l,flatRows:i,rowsById:a}=n;const s=o*r,u=s+o;let d;l=l.slice(s,u),d=e.options.paginateExpandedRows?{rows:l,flatRows:i,rowsById:a}:Fe({rows:l,flatRows:i,rowsById:a}),d.flatRows=[];const c=e=>{d.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return d.rows.forEach(c),d}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:t.enableResizing?{size:void 0}:void 0,...s});return a&&(a.current=u),{table:u}},Ro=({dataTest:e,...t})=>O.jsx(m,{...t,"data-test":e,sx:{...t.sx,"&.MuiCheckbox-root":{color:"var(--colors-delta-500) !important"},"&.MuiCheckbox-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.MuiCheckbox-indeterminate":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.Mui-disabled":{color:"var(--colors-delta-200) !important"},"&.MuiCheckbox-root .PrivateSwitchBase-input":{height:"100% !important",width:"100% !important"}}});function _o(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2"})})}const Eo=e=>{var t;return O.jsx(v,{...e,classes:{root:Pe("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})};function Do({tableData:e,actions:n}){const{anchorEl:o,open:r,handleClose:l,handleOpen:i}=co(),a=n(e.row);return O.jsx("div",{className:"flex justify-center items-center w-[40px]",children:a.length?O.jsxs("div",{className:"flex items-center justify-center",children:[O.jsx(yo,{dataTest:"",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:O.jsx(_o,{className:"text-delta-800",width:20,height:20})}),O.jsx(h,{open:r,anchorEl:o,onClose:l,onClick:l,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:n(e.row).map(((n,o)=>{if(x(n)){const r=n.component(e.row,l);return t.isValidElement(r)?O.jsx(t.Fragment,{children:r},o):null}return n.hide?null:O.jsx(Eo,{className:n.className,disabled:n.disabled,onClick:()=>{var t;null==(t=n.onClick)||t.call(n,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:n.label},o)}))})]}):null})}function Fo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 9V4h2V2H6v2h2v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1l1-1v-7H19v-2c-1.66 0-3-1.34-3-3"})})}const Io={"actions-header":"_actions-header_1bxzk_1","pin-indicator":"_pin-indicator_1bxzk_11","pin-icon":"_pin-icon_1bxzk_21"};function Mo({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=co(),l=e.table.getAllLeafColumns().some((e=>e.getCanHide()&&!e.getIsVisible()&&!D.includes(e.id)));return O.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[O.jsxs("div",{className:Io["actions-header"],onClick:r,children:[O.jsx(Fo,{className:Io["pin-icon"]}),l&&O.jsx("div",{className:Io["pin-indicator"]})]}),O.jsx(h,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 44px)",overflowY:"auto",scrollbarWidth:"thin"}},children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==C)).map((e=>e.columnDef.header?O.jsxs(Eo,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),className:"h-[44px]",children:[O.jsx(Ro,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),e.columnDef.pinnedHeaderText?e.columnDef.pinnedHeaderText:"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}function No(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:O.jsx("path",{fill:"currentColor",d:"M14 6.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0m-5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M5.5 8a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8.5 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M10.5 15a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M4 13.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0"})})}const Po=({rowId:e,rowHeight:t})=>{const{attributes:n,listeners:o}=no({id:e});return O.jsx("div",{...n,...o,style:{height:t||"auto"},children:O.jsx(No,{width:24,height:24,className:"text-delta-800"})})};function Oo({info:e,rowHeight:t}){const{expandedRows:n,toggleExpand:o}=lo(),r=n.has(e.row.id),l=e.row.getCanExpand();return O.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},onClick:()=>{l&&e.row.getToggleExpandedHandler()(),o(e.row.id)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},children:O.jsx("div",{style:{rotate:r?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},children:O.jsx(po,{width:20,height:20,color:"var(--colors-gray-700)"})})})}const Vo=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:l,expandArrow:i,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:d,customActionsColumnProps:c}=e,g=t.some((e=>!0===e.fixedLeft));!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o,rowHeight:r,customActionsColumnProps:l}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?O.jsx(Mo,{headerData:e}):null,cell:e=>n||o?O.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&O.jsx("div",{children:null==o?void 0:o(e)}),n&&O.jsx(Do,{tableData:e,actions:n})]}):null,size:50,...l}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:c})),d&&!t.find((e=>e.id===E))&&t.unshift(function(e,t){return{id:E,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>O.jsx(Oo,{info:e,rowHeight:t}),fixedLeft:e}}(g,u)),i&&!d&&!t.find((e=>e.id===S))&&t.unshift(function(e,t){return{id:S,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?O.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:O.jsx(po,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(g,u)),a&&!t.find((e=>e.id===_))&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>O.jsx(Po,{rowId:e.id,rowHeight:t}),...e,id:_}}(s,u)),l&&!t.find((e=>e.id===C))&&t.unshift(function(e,t){return{id:C,minSize:52,maxSize:52,size:52,header:({table:e})=>O.jsx(Ro,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>O.jsx("div",{className:"w-[38px] h-[38px] flex items-center",style:{height:t||"auto"},children:O.jsx(Ro,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})}),fixedLeft:e}}(g,u))};function Ao(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function ko(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const jo=e=>{const{header:t,enableResizing:n,tableWidth:o}=e;let r=t.getSize();const l=t.headerGroup.headers.reduce(((e,t)=>e+t.getSize()),0),i=t.headerGroup.headers.some((e=>e.id===R)),a=t.headerGroup.headers[t.headerGroup.headers.length-(i?2:1)],s=Number(null==a?void 0:a.getSize());if(!n){if(r&&(r=`${r}px`),a&&a.id===t.id){let e;e=o?Math.floor(o)-l+s:"100%";const n=t.column.columnDef.minSize||0;r="string"==typeof e?e:e>n?`${e}px`:`${n}px`}return{width:r||t.column.columnDef.size,maxWidth:r||t.column.columnDef.maxSize,minWidth:r||t.column.columnDef.minSize}}return{width:r||t.column.columnDef.size,maxWidth:t.column.columnDef.maxSize||r,minWidth:t.column.columnDef.minSize||r}};function zo({styledTableProps:e,header:t,tableCanResize:o=!1,left:r,hasFixedLeftColumn:i,tableWidth:a}){const{hideHeader:s=!1,enableResizing:u=!1}=e,d=l(null),{isResizing:c,enableResizingFlag:g,disableResizingFlag:p}=lo(),f=n((()=>t.headerGroup.headers.some((e=>e.id===R))),[t.headerGroup.headers]),h=n((()=>t.headerGroup.headers[t.headerGroup.headers.length-(f?2:1)]),[t.headerGroup.headers,f]);return O.jsx("th",{ref:d,colSpan:t.colSpan,className:Pe(Me["t-cell"],s&&Me["hide-header"],"actions"===t.column.id&&Me["t-cell__actions"],i&&"actions"===t.column.id&&Me.shadowed,!0===t.column.columnDef.fixedLeft&&Me["t-cell__fixed"]),style:{...jo({enableResizing:u,header:t,element:d.current,tableWidth:a}),...t.column.columnDef.fixedLeft&&{left:r}},children:O.jsxs("div",{className:Pe("flex items-center justify-left",s?Me["hide-table-header"]:Me["show-table-header"],t.column.getCanSort()&&Me["sortable-column"],t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!c&&n&&n(e),p()},children:[Ie(t.column.columnDef.header,t.getContext()),{asc:O.jsx(Ao,{className:Me["sort-icon"]}),desc:O.jsx(ko,{className:Me["sort-icon"]})}[t.column.getIsSorted()]??null,o&&(!!u||t.id!==(null==h?void 0:h.id))&&t.column.getCanResize()&&!D.includes(t.column.id)&&O.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),g(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Lo({styledTableProps:e,header:t})))},onTouchStart:n=>{n.stopPropagation(),g(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Lo({styledTableProps:e,header:t})))},className:`${Me.resizer} ${t.column.getIsResizing()?Me.isResizing:""}`})]})},t.id)}function Lo({styledTableProps:e,header:t}){if(e.uniqueKey){const n=e.uniqueKey,o=localStorage.getItem(n);let r={};if(o)try{r=JSON.parse(o)}catch{console.warn("Failed to parse stored dimensions. Resetting."),r={}}r[t.column.id]=t.column.getSize(),localStorage.setItem(n,JSON.stringify(r))}}function To({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1}=t,l=e.getHeaderGroups().some((e=>e.headers.some((e=>!0===e.column.columnDef.fixedLeft))));return O.jsx("thead",{className:Pe(Me["table-header"]),style:r&&{position:"sticky",top:-.2}||{},children:e.getHeaderGroups().map((e=>O.jsx("tr",{children:e.headers.map(((r,i)=>{const a=r.column.columnDef.fixedLeft,s=e.headers.slice(0,i).reduce(((e,t)=>e+(t.column.getSize()||0)),0);return O.jsx(zo,{styledTableProps:t,header:r,tableCanResize:n,left:a?s:0,hasFixedLeftColumn:l,tableWidth:o},r.column.id)}))},e.id)))})}const Ho=e=>{let{transform:t}=e;return{...t,x:0}};function Go(...e){return y(Pe(e))}function Bo(e){return O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),O.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:O.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const Uo=({fetching:e=!1})=>e?O.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:O.jsx(Bo,{className:Me["loading-icon"],width:50,height:50})}):null,$o=({data:e,setData:t,children:o})=>{const r=n((()=>null==e?void 0:e.map((e=>e.id))),[e]);return O.jsx(Vn,{collisionDetection:bt,modifiers:[Ho],onDragEnd:function(e){if(!t)return;const{active:n,over:o}=e;n&&o&&n.id!==o.id&&t((e=>Hn(e,r.indexOf(n.id),r.indexOf(o.id))))},children:o})},qo=({data:e,setData:t,enableDnd:n,children:o})=>n?O.jsx($o,{data:e,setData:t,children:o}):O.jsx(O.Fragment,{children:o}),Wo=e=>{const t={...e,rowHeight:e.rowHeight||48},{className:r,tableClassName:i,height:s,data:u,enableDnd:d,setData:c}=t;Vo(t);const{table:g}=So(t),p=l(null),[f,h]=a(null);o((()=>{const e=p.current;if(!e)return;const t=t=>{const n=e.getBoundingClientRect().width;h((e=>"setup"===t||n!==e?n:e))},n=new ResizeObserver((()=>t("resize")));return n.observe(e),t("setup"),()=>{n.unobserve(e)}}),[]);const m=n((()=>{var e,n;if(!t.enableColumnResizing)return;const o=g.getFlatHeaders(),r={};for(let e=0;e<o.length;e++){const t=o[e];r[`--header-${t.id}-size`]=t.getSize(),r[`--col-${t.column.id}-size`]=t.column.getSize()}return null==(e=t.getTableState)||e.call(t,g.getState()),null==(n=t.getColumnSizing)||n.call(t,g.getState().columnSizing),r}),[t.enableColumnResizing,g.getState().columnSizingInfo,g.getState().columnSizing]),v=u.length>0&&e.loading;return O.jsx(ro,{children:O.jsx(qo,{enableDnd:!!d,data:u,setData:c,children:O.jsxs("div",{className:Go(Me["asma-ui-table-styled-table"],i),children:[O.jsx("div",{className:Go(Me["table-wrapper"],v&&Me["table-wrapper-fetching"],r),style:{height:s},children:O.jsxs("table",{ref:p,className:Me["styled-table"],style:{...m},children:[O.jsx(To,{table:g,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:f}),O.jsx(Uo,{fetching:!!v}),m?O.jsx(O.Fragment,{children:g.getState().columnSizingInfo.isResizingColumn?O.jsx(Xo,{table:g,styledTableProps:t}):O.jsx(uo,{table:g,styledTableProps:t})}):O.jsx(uo,{table:g,styledTableProps:t})]})}),O.jsx(Co,{table:g,styledTableProps:t})]})})})},Xo=d(uo,((e,t)=>e.table.options.data===t.table.options.data));export{R as ACTIONS_COLUMN_ID,_ as DND_HANDLE_COLUMN_ID,S as EXPAND_COLUMN_ID,D as INTERNAL_COLUMN_IDS,Xo as MemoizedTableBody,Po as RowDragHandleCell,C as SELECT_COLUMN_ID,E as SHOW_FULL_TEXT_ID,Wo as StyledTable,Ee as createColumnHelper,x as isCustomAction};
|
|
41
|
+
function Ie(t,n){return t?function(e){return function(e){return"function"==typeof e&&(()=>{const t=Object.getPrototypeOf(e);return t.prototype&&t.prototype.isReactComponent})()}(e)||"function"==typeof e||function(e){return"object"==typeof e&&"symbol"==typeof e.$$typeof&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}(e)}(t)?e.createElement(t,n):t:null}const Me={"asma-ui-table-styled-table":"_asma-ui-table-styled-table_1dnyl_1","table-wrapper":"_table-wrapper_1dnyl_10","table-wrapper-fetching":"_table-wrapper-fetching_1dnyl_15","styled-table":"_styled-table_1dnyl_18",tbody:"_tbody_1dnyl_27","loading-icon":"_loading-icon_1dnyl_32","t-row":"_t-row_1dnyl_39","action-cell":"_action-cell_1dnyl_55","fixed-cell":"_fixed-cell_1dnyl_58","t-cell":"_t-cell_1dnyl_73",non_expanded_row:"_non_expanded_row_1dnyl_87",selected:"_selected_1dnyl_111",shadowed:"_shadowed_1dnyl_114","is-loading":"_is-loading_1dnyl_130","action-cell-default-background":"_action-cell-default-background_1dnyl_133","fixed-cell-default-background":"_fixed-cell-default-background_1dnyl_136","no-rows-overlay":"_no-rows-overlay_1dnyl_139","sortable-column":"_sortable-column_1dnyl_148",resizer:"_resizer_1dnyl_152",isResizing:"_isResizing_1dnyl_164","hide-table-header":"_hide-table-header_1dnyl_176","show-table-header":"_show-table-header_1dnyl_180","table-header":"_table-header_1dnyl_185","hide-header":"_hide-header_1dnyl_205","t-cell__actions":"_t-cell__actions_1dnyl_208","t-cell__fixed":"_t-cell__fixed_1dnyl_218","sort-icon":"_sort-icon_1dnyl_225","table-footer":"_table-footer_1dnyl_228"};function Ne(e){var t,n,o="";if("string"==typeof e||"number"==typeof e)o+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(n=Ne(e[t]))&&(o&&(o+=" "),o+=n);else for(t in e)e[t]&&(o&&(o+=" "),o+=t);return o}function Pe(){for(var e,t,n=0,o="";n<arguments.length;)(e=arguments[n++])&&(t=Ne(e))&&(o&&(o+=" "),o+=t);return o}const Oe=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Ve(e){const t=Object.prototype.toString.call(e);return"[object Window]"===t||"[object global]"===t}function Ae(e){return"nodeType"in e}function ke(e){var t,n;return e?Ve(e)?e:Ae(e)&&null!=(t=null==(n=e.ownerDocument)?void 0:n.defaultView)?t:window:window}function je(e){const{Document:t}=ke(e);return e instanceof t}function ze(e){return!Ve(e)&&e instanceof ke(e).HTMLElement}function Le(e){return e instanceof ke(e).SVGElement}function Te(e){return e?Ve(e)?e.document:Ae(e)?je(e)?e:ze(e)||Le(e)?e.ownerDocument:document:document:document}const He=Oe?o:r;function Ge(e){const t=l(e);return He((()=>{t.current=e})),i((function(){for(var e=arguments.length,n=new Array(e),o=0;o<e;o++)n[o]=arguments[o];return null==t.current?void 0:t.current(...n)}),[])}function Be(e,t){void 0===t&&(t=[e]);const n=l(e);return He((()=>{n.current!==e&&(n.current=e)}),t),n}function Ue(e,t){const o=l();return n((()=>{const t=e(o.current);return o.current=t,t}),[...t])}function $e(e){const t=Ge(e),n=l(null),o=i((e=>{e!==n.current&&(null==t||t(e,n.current)),n.current=e}),[]);return[n,o]}function qe(e){const t=l();return r((()=>{t.current=e}),[e]),t.current}let We={};function Xe(e,t){return n((()=>{if(t)return t;const n=null==We[e]?0:We[e]+1;return We[e]=n,e+"-"+n}),[e,t])}function Ye(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>{const o=Object.entries(n);for(const[n,r]of o){const o=t[n];null!=o&&(t[n]=o+e*r)}return t}),{...t})}}const Ke=Ye(1),Je=Ye(-1);function Ze(e){if(!e)return!1;const{KeyboardEvent:t}=ke(e.target);return t&&e instanceof t}function Qe(e){if(function(e){if(!e)return!1;const{TouchEvent:t}=ke(e.target);return t&&e instanceof t}(e)){if(e.touches&&e.touches.length){const{clientX:t,clientY:n}=e.touches[0];return{x:t,y:n}}if(e.changedTouches&&e.changedTouches.length){const{clientX:t,clientY:n}=e.changedTouches[0];return{x:t,y:n}}}return function(e){return"clientX"in e&&"clientY"in e}(e)?{x:e.clientX,y:e.clientY}:null}const et=Object.freeze({Translate:{toString(e){if(!e)return;const{x:t,y:n}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(n?Math.round(n):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;const{scaleX:t,scaleY:n}=e;return"scaleX("+t+") scaleY("+n+")"}},Transform:{toString(e){if(e)return[et.Translate.toString(e),et.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:n,easing:o}=e;return t+" "+n+"ms "+o}}}),tt="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function nt(e){return e.matches(tt)?e:e.querySelector(tt)}const ot={display:"none"};function rt(e){let{id:n,value:o}=e;return t.createElement("div",{id:n,style:ot},o)}function lt(e){let{id:n,announcement:o,ariaLiveType:r="assertive"}=e;return t.createElement("div",{id:n,style:{position:"fixed",width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"},role:"status","aria-live":r,"aria-atomic":!0},o)}const it=s(null);const at={draggable:"\n To pick up a draggable item, press the space bar.\n While dragging, use the arrow keys to move the item.\n Press space again to drop the item in its new position, or press escape to cancel.\n "},st={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was moved over droppable area "+n.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:n}=e;return n?"Draggable item "+t.id+" was dropped over droppable area "+n.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function ut(e){let{announcements:o=st,container:l,hiddenTextDescribedById:s,screenReaderInstructions:d=at}=e;const{announce:c,announcement:g}=function(){const[e,t]=a("");return{announce:i((e=>{null!=e&&t(e)}),[]),announcement:e}}(),p=Xe("DndLiveRegion"),[f,h]=a(!1);if(r((()=>{h(!0)}),[]),function(e){const t=u(it);r((()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)}),[e,t])}(n((()=>({onDragStart(e){let{active:t}=e;c(o.onDragStart({active:t}))},onDragMove(e){let{active:t,over:n}=e;o.onDragMove&&c(o.onDragMove({active:t,over:n}))},onDragOver(e){let{active:t,over:n}=e;c(o.onDragOver({active:t,over:n}))},onDragEnd(e){let{active:t,over:n}=e;c(o.onDragEnd({active:t,over:n}))},onDragCancel(e){let{active:t,over:n}=e;c(o.onDragCancel({active:t,over:n}))}})),[c,o])),!f)return null;const m=t.createElement(t.Fragment,null,t.createElement(rt,{id:s,value:d.draggable}),t.createElement(lt,{id:p,announcement:g}));return l?w(m,l):m}var dt,ct;function gt(){}(ct=dt||(dt={})).DragStart="dragStart",ct.DragMove="dragMove",ct.DragEnd="dragEnd",ct.DragCancel="dragCancel",ct.DragOver="dragOver",ct.RegisterDroppable="registerDroppable",ct.SetDroppableDisabled="setDroppableDisabled",ct.UnregisterDroppable="unregisterDroppable";const pt=Object.freeze({x:0,y:0});function ft(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function ht(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return n-o}function mt(e,t){let{data:{value:n}}=e,{data:{value:o}}=t;return o-n}function vt(e,t,n){return void 0===t&&(t=e.left),void 0===n&&(n=e.top),{x:t+.5*e.width,y:n+.5*e.height}}const bt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=vt(t,t.left,t.top),l=[];for(const e of o){const{id:t}=e,o=n.get(t);if(o){const n=ft(vt(o),r);l.push({id:t,data:{droppableContainer:e,value:n}})}}return l.sort(ht)};function wt(e,t){const n=Math.max(t.top,e.top),o=Math.max(t.left,e.left),r=Math.min(t.left+t.width,e.left+e.width),l=Math.min(t.top+t.height,e.top+e.height),i=r-o,a=l-n;if(o<r&&n<l){const n=t.width*t.height,o=e.width*e.height,r=i*a;return Number((r/(n+o-r)).toFixed(4))}return 0}const yt=e=>{let{collisionRect:t,droppableRects:n,droppableContainers:o}=e;const r=[];for(const e of o){const{id:o}=e,l=n.get(o);if(l){const n=wt(l,t);n>0&&r.push({id:o,data:{droppableContainer:e,value:n}})}}return r.sort(mt)};function xt(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:pt}function Ct(e){return function(t){for(var n=arguments.length,o=new Array(n>1?n-1:0),r=1;r<n;r++)o[r-1]=arguments[r];return o.reduce(((t,n)=>({...t,top:t.top+e*n.y,bottom:t.bottom+e*n.y,left:t.left+e*n.x,right:t.right+e*n.x})),{...t})}}const St=Ct(1);const Rt={ignoreTransform:!1};function _t(e,t){void 0===t&&(t=Rt);let n=e.getBoundingClientRect();if(t.ignoreTransform){const{transform:t,transformOrigin:o}=ke(e).getComputedStyle(e);t&&(n=function(e,t,n){const o=function(e){if(e.startsWith("matrix3d(")){const t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}if(e.startsWith("matrix(")){const t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}(t);if(!o)return e;const{scaleX:r,scaleY:l,x:i,y:a}=o,s=e.left-i-(1-r)*parseFloat(n),u=e.top-a-(1-l)*parseFloat(n.slice(n.indexOf(" ")+1)),d=r?e.width/r:e.width,c=l?e.height/l:e.height;return{width:d,height:c,top:u,right:s+d,bottom:u+c,left:s}}(n,t,o))}const{top:o,left:r,width:l,height:i,bottom:a,right:s}=n;return{top:o,left:r,width:l,height:i,bottom:a,right:s}}function Et(e){return _t(e,{ignoreTransform:!0})}function Dt(e,t){const n=[];return e?function o(r){if(null!=t&&n.length>=t||!r)return n;if(je(r)&&null!=r.scrollingElement&&!n.includes(r.scrollingElement))return n.push(r.scrollingElement),n;if(!ze(r)||Le(r)||n.includes(r))return n;const l=ke(e).getComputedStyle(r);return r!==e&&function(e,t){void 0===t&&(t=ke(e).getComputedStyle(e));const n=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some((e=>{const o=t[e];return"string"==typeof o&&n.test(o)}))}(r,l)&&n.push(r),function(e,t){return void 0===t&&(t=ke(e).getComputedStyle(e)),"fixed"===t.position}(r,l)?n:o(r.parentNode)}(e):n}function Ft(e){const[t]=Dt(e,1);return t??null}function It(e){return Oe&&e?Ve(e)?e:Ae(e)?je(e)||e===Te(e).scrollingElement?window:ze(e)?e:null:null:null}function Mt(e){return Ve(e)?e.scrollX:e.scrollLeft}function Nt(e){return Ve(e)?e.scrollY:e.scrollTop}function Pt(e){return{x:Mt(e),y:Nt(e)}}var Ot;function Vt(e){return!(!Oe||!e)&&e===document.scrollingElement}function At(e){const t={x:0,y:0},n=Vt(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-n.width,y:e.scrollHeight-n.height};return{isTop:e.scrollTop<=t.y,isLeft:e.scrollLeft<=t.x,isBottom:e.scrollTop>=o.y,isRight:e.scrollLeft>=o.x,maxScroll:o,minScroll:t}}!function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"}(Ot||(Ot={}));const kt={x:.2,y:.2};function jt(e,t,n,o,r){let{top:l,left:i,right:a,bottom:s}=n;void 0===o&&(o=10),void 0===r&&(r=kt);const{isTop:u,isBottom:d,isLeft:c,isRight:g}=At(e),p={x:0,y:0},f={x:0,y:0},h=t.height*r.y,m=t.width*r.x;return!u&&l<=t.top+h?(p.y=Ot.Backward,f.y=o*Math.abs((t.top+h-l)/h)):!d&&s>=t.bottom-h&&(p.y=Ot.Forward,f.y=o*Math.abs((t.bottom-h-s)/h)),!g&&a>=t.right-m?(p.x=Ot.Forward,f.x=o*Math.abs((t.right-m-a)/m)):!c&&i<=t.left+m&&(p.x=Ot.Backward,f.x=o*Math.abs((t.left+m-i)/m)),{direction:p,speed:f}}function zt(e){if(e===document.scrollingElement){const{innerWidth:e,innerHeight:t}=window;return{top:0,left:0,right:e,bottom:t,width:e,height:t}}const{top:t,left:n,right:o,bottom:r}=e.getBoundingClientRect();return{top:t,left:n,right:o,bottom:r,width:e.clientWidth,height:e.clientHeight}}function Lt(e){return e.reduce(((e,t)=>Ke(e,Pt(t))),pt)}const Tt=[["x",["left","right"],function(e){return e.reduce(((e,t)=>e+Mt(t)),0)}],["y",["top","bottom"],function(e){return e.reduce(((e,t)=>e+Nt(t)),0)}]];class Ht{constructor(e,t){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;const n=Dt(t),o=Lt(n);this.rect={...e},this.width=e.width,this.height=e.height;for(const[e,t,r]of Tt)for(const l of t)Object.defineProperty(this,l,{get:()=>{const t=r(n),i=o[e]-t;return this.rect[l]+i},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}}class Gt{constructor(e){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach((e=>{var t;return null==(t=this.target)?void 0:t.removeEventListener(...e)}))},this.target=e}add(e,t,n){var o;null==(o=this.target)||o.addEventListener(e,t,n),this.listeners.push([e,t,n])}}function Bt(e,t){const n=Math.abs(e.x),o=Math.abs(e.y);return"number"==typeof t?Math.sqrt(n**2+o**2)>t:"x"in t&&"y"in t?n>t.x&&o>t.y:"x"in t?n>t.x:"y"in t&&o>t.y}var Ut,$t;function qt(e){e.preventDefault()}function Wt(e){e.stopPropagation()}!function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"}(Ut||(Ut={})),function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter"}($t||($t={}));const Xt={start:[$t.Space,$t.Enter],cancel:[$t.Esc],end:[$t.Space,$t.Enter]},Yt=(e,t)=>{let{currentCoordinates:n}=t;switch(e.code){case $t.Right:return{...n,x:n.x+25};case $t.Left:return{...n,x:n.x-25};case $t.Down:return{...n,y:n.y+25};case $t.Up:return{...n,y:n.y-25}}};class Kt{constructor(e){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=e;const{event:{target:t}}=e;this.props=e,this.listeners=new Gt(Te(t)),this.windowListeners=new Gt(ke(t)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(Ut.Resize,this.handleCancel),this.windowListeners.add(Ut.VisibilityChange,this.handleCancel),setTimeout((()=>this.listeners.add(Ut.Keydown,this.handleKeyDown)))}handleStart(){const{activeNode:e,onStart:t}=this.props,n=e.node.current;n&&function(e,t){if(void 0===t&&(t=_t),!e)return;const{top:n,left:o,bottom:r,right:l}=t(e);Ft(e)&&(r<=0||l<=0||n>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}(n),t(pt)}handleKeyDown(e){if(Ze(e)){const{active:t,context:n,options:o}=this.props,{keyboardCodes:r=Xt,coordinateGetter:l=Yt,scrollBehavior:i="smooth"}=o,{code:a}=e;if(r.end.includes(a))return void this.handleEnd(e);if(r.cancel.includes(a))return void this.handleCancel(e);const{collisionRect:s}=n.current,u=s?{x:s.left,y:s.top}:pt;this.referenceCoordinates||(this.referenceCoordinates=u);const d=l(e,{active:t,context:n.current,currentCoordinates:u});if(d){const t=Je(d,u),o={x:0,y:0},{scrollableAncestors:r}=n.current;for(const n of r){const r=e.code,{isTop:l,isRight:a,isLeft:s,isBottom:u,maxScroll:c,minScroll:g}=At(n),p=zt(n),f={x:Math.min(r===$t.Right?p.right-p.width/2:p.right,Math.max(r===$t.Right?p.left:p.left+p.width/2,d.x)),y:Math.min(r===$t.Down?p.bottom-p.height/2:p.bottom,Math.max(r===$t.Down?p.top:p.top+p.height/2,d.y))},h=r===$t.Right&&!a||r===$t.Left&&!s,m=r===$t.Down&&!u||r===$t.Up&&!l;if(h&&f.x!==d.x){const e=n.scrollLeft+t.x,l=r===$t.Right&&e<=c.x||r===$t.Left&&e>=g.x;if(l&&!t.y)return void n.scrollTo({left:e,behavior:i});o.x=l?n.scrollLeft-e:r===$t.Right?n.scrollLeft-c.x:n.scrollLeft-g.x,o.x&&n.scrollBy({left:-o.x,behavior:i});break}if(m&&f.y!==d.y){const e=n.scrollTop+t.y,l=r===$t.Down&&e<=c.y||r===$t.Up&&e>=g.y;if(l&&!t.x)return void n.scrollTo({top:e,behavior:i});o.y=l?n.scrollTop-e:r===$t.Down?n.scrollTop-c.y:n.scrollTop-g.y,o.y&&n.scrollBy({top:-o.y,behavior:i});break}}this.handleMove(e,Ke(Je(d,this.referenceCoordinates),o))}}}handleMove(e,t){const{onMove:n}=this.props;e.preventDefault(),n(t)}handleEnd(e){const{onEnd:t}=this.props;e.preventDefault(),this.detach(),t()}handleCancel(e){const{onCancel:t}=this.props;e.preventDefault(),this.detach(),t()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}}function Jt(e){return!(!e||!("distance"in e))}function Zt(e){return!(!e||!("delay"in e))}Kt.activators=[{eventName:"onKeyDown",handler:(e,t,n)=>{let{keyboardCodes:o=Xt,onActivation:r}=t,{active:l}=n;const{code:i}=e.nativeEvent;if(o.start.includes(i)){const t=l.activatorNode.current;return(!t||e.target===t)&&(e.preventDefault(),null==r||r({event:e.nativeEvent}),!0)}return!1}}];class Qt{constructor(e,t,n){var o;void 0===n&&(n=function(e){const{EventTarget:t}=ke(e);return e instanceof t?e:Te(e)}(e.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=e,this.events=t;const{event:r}=e,{target:l}=r;this.props=e,this.events=t,this.document=Te(l),this.documentListeners=new Gt(this.document),this.listeners=new Gt(n),this.windowListeners=new Gt(ke(l)),this.initialCoordinates=null!=(o=Qe(r))?o:pt,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){const{events:e,props:{options:{activationConstraint:t,bypassActivationConstraint:n}}}=this;if(this.listeners.add(e.move.name,this.handleMove,{passive:!1}),this.listeners.add(e.end.name,this.handleEnd),this.windowListeners.add(Ut.Resize,this.handleCancel),this.windowListeners.add(Ut.DragStart,qt),this.windowListeners.add(Ut.VisibilityChange,this.handleCancel),this.windowListeners.add(Ut.ContextMenu,qt),this.documentListeners.add(Ut.Keydown,this.handleKeydown),t){if(null!=n&&n({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(Zt(t))return void(this.timeoutId=setTimeout(this.handleStart,t.delay));if(Jt(t))return}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),null!==this.timeoutId&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handleStart(){const{initialCoordinates:e}=this,{onStart:t}=this.props;e&&(this.activated=!0,this.documentListeners.add(Ut.Click,Wt,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(Ut.SelectionChange,this.removeTextSelection),t(e))}handleMove(e){var t;const{activated:n,initialCoordinates:o,props:r}=this,{onMove:l,options:{activationConstraint:i}}=r;if(!o)return;const a=null!=(t=Qe(e))?t:pt,s=Je(o,a);if(!n&&i){if(Jt(i)){if(null!=i.tolerance&&Bt(s,i.tolerance))return this.handleCancel();if(Bt(s,i.distance))return this.handleStart()}return Zt(i)&&Bt(s,i.tolerance)?this.handleCancel():void 0}e.cancelable&&e.preventDefault(),l(a)}handleEnd(){const{onEnd:e}=this.props;this.detach(),e()}handleCancel(){const{onCancel:e}=this.props;this.detach(),e()}handleKeydown(e){e.code===$t.Esc&&this.handleCancel()}removeTextSelection(){var e;null==(e=this.document.getSelection())||e.removeAllRanges()}}const en={move:{name:"pointermove"},end:{name:"pointerup"}};class tn extends Qt{constructor(e){const{event:t}=e,n=Te(t.target);super(e,en,n)}}tn.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return!(!n.isPrimary||0!==n.button)&&(null==o||o({event:n}),!0)}}];const nn={move:{name:"mousemove"},end:{name:"mouseup"}};var on;!function(e){e[e.RightClick=2]="RightClick"}(on||(on={}));(class extends Qt{constructor(e){super(e,nn,Te(e.event.target))}}).activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;return n.button!==on.RightClick&&(null==o||o({event:n}),!0)}}];const rn={move:{name:"touchmove"},end:{name:"touchend"}};var ln,an;function sn(e){let{acceleration:t,activator:o=ln.Pointer,canScroll:a,draggingRect:s,enabled:u,interval:d=5,order:c=an.TreeOrder,pointerCoordinates:g,scrollableAncestors:p,scrollableAncestorRects:f,delta:h,threshold:m}=e;const v=function(e){let{delta:t,disabled:n}=e;const o=qe(t);return Ue((e=>{if(n||!o||!e)return un;const r={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[Ot.Backward]:e.x[Ot.Backward]||-1===r.x,[Ot.Forward]:e.x[Ot.Forward]||1===r.x},y:{[Ot.Backward]:e.y[Ot.Backward]||-1===r.y,[Ot.Forward]:e.y[Ot.Forward]||1===r.y}}}),[n,t,o])}({delta:h,disabled:!u}),[b,w]=function(){const e=l(null);return[i(((t,n)=>{e.current=setInterval(t,n)}),[]),i((()=>{null!==e.current&&(clearInterval(e.current),e.current=null)}),[])]}(),y=l({x:0,y:0}),x=l({x:0,y:0}),C=n((()=>{switch(o){case ln.Pointer:return g?{top:g.y,bottom:g.y,left:g.x,right:g.x}:null;case ln.DraggableRect:return s}}),[o,s,g]),S=l(null),R=i((()=>{const e=S.current;if(!e)return;const t=y.current.x*x.current.x,n=y.current.y*x.current.y;e.scrollBy(t,n)}),[]),_=n((()=>c===an.TreeOrder?[...p].reverse():p),[c,p]);r((()=>{if(u&&p.length&&C){for(const e of _){if(!1===(null==a?void 0:a(e)))continue;const n=p.indexOf(e),o=f[n];if(!o)continue;const{direction:r,speed:l}=jt(e,o,C,t,m);for(const e of["x","y"])v[e][r[e]]||(l[e]=0,r[e]=0);if(l.x>0||l.y>0)return w(),S.current=e,b(R,d),y.current=l,void(x.current=r)}y.current={x:0,y:0},x.current={x:0,y:0},w()}else w()}),[t,R,a,w,u,d,JSON.stringify(C),JSON.stringify(v),b,p,_,f,JSON.stringify(m)])}(class extends Qt{constructor(e){super(e,rn)}static setup(){return window.addEventListener(rn.move.name,e,{capture:!1,passive:!1}),function(){window.removeEventListener(rn.move.name,e)};function e(){}}}).activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:n}=e,{onActivation:o}=t;const{touches:r}=n;return!(r.length>1)&&(null==o||o({event:n}),!0)}}],function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"}(ln||(ln={})),function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"}(an||(an={}));const un={x:{[Ot.Backward]:!1,[Ot.Forward]:!1},y:{[Ot.Backward]:!1,[Ot.Forward]:!1}};var dn,cn;!function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"}(dn||(dn={})),(cn||(cn={})).Optimized="optimized";const gn=new Map;function pn(e,t){return Ue((n=>e?n||("function"==typeof t?t(e):e):null),[t,e])}function fn(e){let{callback:t,disabled:o}=e;const l=Ge(t),i=n((()=>{if(o||typeof window>"u"||typeof window.ResizeObserver>"u")return;const{ResizeObserver:e}=window;return new e(l)}),[o]);return r((()=>()=>null==i?void 0:i.disconnect()),[i]),i}function hn(e){return new Ht(_t(e),e)}function mn(e,t,o){void 0===t&&(t=hn);const[l,i]=c((function(n){if(!e)return null;var r;if(!1===e.isConnected)return null!=(r=n??o)?r:null;const l=t(e);return JSON.stringify(n)===JSON.stringify(l)?n:l}),null),a=function(e){let{callback:t,disabled:o}=e;const l=Ge(t),i=n((()=>{if(o||typeof window>"u"||typeof window.MutationObserver>"u")return;const{MutationObserver:e}=window;return new e(l)}),[l,o]);return r((()=>()=>null==i?void 0:i.disconnect()),[i]),i}({callback(t){if(e)for(const n of t){const{type:t,target:o}=n;if("childList"===t&&o instanceof HTMLElement&&o.contains(e)){i();break}}}}),s=fn({callback:i});return He((()=>{i(),e?(null==s||s.observe(e),null==a||a.observe(document.body,{childList:!0,subtree:!0})):(null==s||s.disconnect(),null==a||a.disconnect())}),[e]),l}const vn=[];function bn(e,t){void 0===t&&(t=[]);const n=l(null);return r((()=>{n.current=null}),t),r((()=>{const t=e!==pt;t&&!n.current&&(n.current=e),!t&&n.current&&(n.current=null)}),[e]),n.current?Je(e,n.current):pt}function wn(e){return n((()=>e?function(e){const t=e.innerWidth,n=e.innerHeight;return{top:0,left:0,right:t,bottom:n,width:t,height:n}}(e):null),[e])}const yn=[];function xn(e){let{measure:t}=e;const[o,r]=a(null),l=fn({callback:i((e=>{for(const{target:n}of e)if(ze(n)){r((e=>{const o=t(n);return e?{...e,width:o.width,height:o.height}:o}));break}}),[t])}),s=i((e=>{const n=function(e){if(!e)return null;if(e.children.length>1)return e;const t=e.children[0];return ze(t)?t:e}(e);null==l||l.disconnect(),n&&(null==l||l.observe(n)),r(n?t(n):null)}),[t,l]),[u,d]=$e(s);return n((()=>({nodeRef:u,rect:o,setRef:d})),[o,u,d])}const Cn=[{sensor:tn,options:{}},{sensor:Kt,options:{}}],Sn={current:{}},Rn={draggable:{measure:Et},droppable:{measure:Et,strategy:dn.WhileDragging,frequency:cn.Optimized},dragOverlay:{measure:_t}};class _n extends Map{get(e){var t;return null!=e&&null!=(t=super.get(e))?t:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter((e=>{let{disabled:t}=e;return!t}))}getNodeFor(e){var t,n;return null!=(t=null==(n=this.get(e))?void 0:n.node.current)?t:void 0}}const En={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new _n,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:gt},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:Rn,measureDroppableContainers:gt,windowRect:null,measuringScheduled:!1},Dn=s({activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:gt,draggableNodes:new Map,over:null,measureDroppableContainers:gt}),Fn=s(En);function In(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new _n}}}function Mn(e,t){switch(t.type){case dt.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case dt.DragMove:return e.draggable.active?{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}}:e;case dt.DragEnd:case dt.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case dt.RegisterDroppable:{const{element:n}=t,{id:o}=n,r=new _n(e.droppable.containers);return r.set(o,n),{...e,droppable:{...e.droppable,containers:r}}}case dt.SetDroppableDisabled:{const{id:n,key:o,disabled:r}=t,l=e.droppable.containers.get(n);if(!l||o!==l.key)return e;const i=new _n(e.droppable.containers);return i.set(n,{...l,disabled:r}),{...e,droppable:{...e.droppable,containers:i}}}case dt.UnregisterDroppable:{const{id:n,key:o}=t,r=e.droppable.containers.get(n);if(!r||o!==r.key)return e;const l=new _n(e.droppable.containers);return l.delete(n),{...e,droppable:{...e.droppable,containers:l}}}default:return e}}function Nn(e){let{disabled:t}=e;const{active:n,activatorEvent:o,draggableNodes:l}=u(Dn),i=qe(o),a=qe(null==n?void 0:n.id);return r((()=>{if(!t&&!o&&i&&null!=a){if(!Ze(i)||document.activeElement===i.target)return;const e=l.get(a);if(!e)return;const{activatorNode:t,node:n}=e;if(!t.current&&!n.current)return;requestAnimationFrame((()=>{for(const e of[t.current,n.current]){if(!e)continue;const t=nt(e);if(t){t.focus();break}}}))}}),[o,t,l,a,i]),null}const Pn=s({...pt,scaleX:1,scaleY:1});var On;!function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"}(On||(On={}));const Vn=d((function(e){var o,s,u,d;let{id:g,accessibility:p,autoScroll:f=!0,children:h,sensors:m=Cn,collisionDetection:v=yt,measuring:w,modifiers:y,...x}=e;const C=c(Mn,void 0,In),[S,R]=C,[_,E]=function(){const[e]=a((()=>new Set)),t=i((t=>(e.add(t),()=>e.delete(t))),[e]);return[i((t=>{let{type:n,event:o}=t;e.forEach((e=>{var t;return null==(t=e[n])?void 0:t.call(e,o)}))}),[e]),t]}(),[D,F]=a(On.Uninitialized),I=D===On.Initialized,{draggable:{active:M,nodes:N,translate:P},droppable:{containers:O}}=S,V=M?N.get(M):null,A=l({initial:null,translated:null}),k=n((()=>{var e;return null!=M?{id:M,data:null!=(e=null==V?void 0:V.data)?e:Sn,rect:A}:null}),[M,V]),j=l(null),[z,L]=a(null),[T,H]=a(null),G=Be(x,Object.values(x)),B=Xe("DndDescribedBy",g),U=n((()=>O.getEnabled()),[O]),$=function(e){return n((()=>({draggable:{...Rn.draggable,...null==e?void 0:e.draggable},droppable:{...Rn.droppable,...null==e?void 0:e.droppable},dragOverlay:{...Rn.dragOverlay,...null==e?void 0:e.dragOverlay}})),[null==e?void 0:e.draggable,null==e?void 0:e.droppable,null==e?void 0:e.dragOverlay])}(w),{droppableRects:q,measureDroppableContainers:W,measuringScheduled:X}=function(e,t){let{dragging:n,dependencies:o,config:s}=t;const[u,d]=a(null),{frequency:c,measure:g,strategy:p}=s,f=l(e),h=function(){switch(p){case dn.Always:return!1;case dn.BeforeDragging:return n;default:return!n}}(),m=Be(h),v=i((function(e){void 0===e&&(e=[]),!m.current&&d((t=>null===t?e:t.concat(e.filter((e=>!t.includes(e))))))}),[m]),b=l(null),w=Ue((t=>{if(h&&!n)return gn;if(!t||t===gn||f.current!==e||null!=u){const t=new Map;for(let n of e){if(!n)continue;if(u&&u.length>0&&!u.includes(n.id)&&n.rect.current){t.set(n.id,n.rect.current);continue}const e=n.node.current,o=e?new Ht(g(e),e):null;n.rect.current=o,o&&t.set(n.id,o)}return t}return t}),[e,u,n,h,g]);return r((()=>{f.current=e}),[e]),r((()=>{h||v()}),[n,h]),r((()=>{u&&u.length>0&&d(null)}),[JSON.stringify(u)]),r((()=>{h||"number"!=typeof c||null!==b.current||(b.current=setTimeout((()=>{v(),b.current=null}),c))}),[c,h,v,...o]),{droppableRects:w,measureDroppableContainers:v,measuringScheduled:null!=u}}(U,{dragging:I,dependencies:[P.x,P.y],config:$.droppable}),Y=function(e,t){const n=null!==t?e.get(t):void 0,o=n?n.node.current:null;return Ue((e=>{var n;return null===t?null:null!=(n=o??e)?n:null}),[o,t])}(N,M),K=n((()=>T?Qe(T):null),[T]),J=function(){const e=!1===(null==z?void 0:z.autoScrollEnabled),t="object"==typeof f?!1===f.enabled:!1===f,n=I&&!e&&!t;return"object"==typeof f?{...f,enabled:n}:{enabled:n}}(),Z=function(e,t){return pn(e,t)}(Y,$.draggable.measure);!function(e){let{activeNode:t,measure:n,initialRect:o,config:r=!0}=e;const i=l(!1),{x:a,y:s}="boolean"==typeof r?{x:r,y:r}:r;He((()=>{if(!a&&!s||!t)return void(i.current=!1);if(i.current||!o)return;const e=null==t?void 0:t.node.current;if(!e||!1===e.isConnected)return;const r=xt(n(e),o);if(a||(r.x=0),s||(r.y=0),i.current=!0,Math.abs(r.x)>0||Math.abs(r.y)>0){const t=Ft(e);t&&t.scrollBy({top:r.y,left:r.x})}}),[t,a,s,o,n])}({activeNode:M?N.get(M):null,config:J.layoutShiftCompensation,initialRect:Z,measure:$.draggable.measure});const Q=mn(Y,$.draggable.measure,Z),ee=mn(Y?Y.parentElement:null),te=l({activatorEvent:null,active:null,activeNode:Y,collisionRect:null,collisions:null,droppableRects:q,draggableNodes:N,draggingNode:null,draggingNodeRect:null,droppableContainers:O,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),ne=O.getNodeFor(null==(o=te.current.over)?void 0:o.id),oe=xn({measure:$.dragOverlay.measure}),re=null!=(s=oe.nodeRef.current)?s:Y,le=I?null!=(u=oe.rect)?u:Q:null,ie=!(!oe.nodeRef.current||!oe.rect),ae=function(e){return xt(e,pn(e))}(ie?null:Q),se=wn(re?ke(re):null),ue=function(e){const t=l(e),n=Ue((n=>e?n&&n!==vn&&e&&t.current&&e.parentNode===t.current.parentNode?n:Dt(e):vn),[e]);return r((()=>{t.current=e}),[e]),n}(I?ne??Y:null),de=function(e,t){void 0===t&&(t=_t);const[n]=e,o=wn(n?ke(n):null),[r,l]=c((function(){return e.length?e.map((e=>Vt(e)?o:new Ht(t(e),e))):yn}),yn),i=fn({callback:l});return e.length>0&&r===yn&&l(),He((()=>{e.length?e.forEach((e=>null==i?void 0:i.observe(e))):(null==i||i.disconnect(),l())}),[e]),r}(ue),ce=function(e,t){let{transform:n,...o}=t;return null!=e&&e.length?e.reduce(((e,t)=>t({transform:e,...o})),n):n}(y,{transform:{x:P.x-ae.x,y:P.y-ae.y,scaleX:1,scaleY:1},activatorEvent:T,active:k,activeNodeRect:Q,containerNodeRect:ee,draggingNodeRect:le,over:te.current.over,overlayNodeRect:oe.rect,scrollableAncestors:ue,scrollableAncestorRects:de,windowRect:se}),ge=K?Ke(K,P):null,pe=function(e){const[t,o]=a(null),s=l(e),u=i((e=>{const t=It(e.target);t&&o((e=>e?(e.set(t,Pt(t)),new Map(e)):null))}),[]);return r((()=>{const t=s.current;if(e!==t){n(t);const r=e.map((e=>{const t=It(e);return t?(t.addEventListener("scroll",u,{passive:!0}),[t,Pt(t)]):null})).filter((e=>null!=e));o(r.length?new Map(r):null),s.current=e}return()=>{n(e),n(t)};function n(e){e.forEach((e=>{const t=It(e);null==t||t.removeEventListener("scroll",u)}))}}),[u,e]),n((()=>e.length?t?Array.from(t.values()).reduce(((e,t)=>Ke(e,t)),pt):Lt(e):pt),[e,t])}(ue),fe=bn(pe),he=bn(pe,[Q]),me=Ke(ce,fe),ve=le?St(le,ce):null,be=k&&ve?v({active:k,collisionRect:ve,droppableRects:q,droppableContainers:U,pointerCoordinates:ge}):null,we=function(e,t){if(!e||0===e.length)return null;const[n]=e;return t?n[t]:n}(be,"id"),[ye,xe]=a(null),Ce=function(e,t,n){return{...e,scaleX:t&&n?t.width/n.width:1,scaleY:t&&n?t.height/n.height:1}}(ie?ce:Ke(ce,he),null!=(d=null==ye?void 0:ye.rect)?d:null,Q),Se=i(((e,t)=>{let{sensor:n,options:o}=t;if(null==j.current)return;const r=N.get(j.current);if(!r)return;const l=e.nativeEvent,i=new n({active:j.current,activeNode:r,event:l,options:o,context:te,onStart(e){const t=j.current;if(null==t)return;const n=N.get(t);if(!n)return;const{onDragStart:o}=G.current,r={active:{id:t,data:n.data,rect:A}};b((()=>{null==o||o(r),F(On.Initializing),R({type:dt.DragStart,initialCoordinates:e,active:t}),_({type:"onDragStart",event:r})}))},onMove(e){R({type:dt.DragMove,coordinates:e})},onEnd:a(dt.DragEnd),onCancel:a(dt.DragCancel)});function a(e){return async function(){const{active:t,collisions:n,over:o,scrollAdjustedTranslate:r}=te.current;let i=null;if(t&&r){const{cancelDrop:a}=G.current;i={activatorEvent:l,active:t,collisions:n,delta:r,over:o},e===dt.DragEnd&&"function"==typeof a&&await Promise.resolve(a(i))&&(e=dt.DragCancel)}j.current=null,b((()=>{R({type:e}),F(On.Uninitialized),xe(null),L(null),H(null);const t=e===dt.DragEnd?"onDragEnd":"onDragCancel";if(i){const e=G.current[t];null==e||e(i),_({type:t,event:i})}}))}}b((()=>{L(i),H(e.nativeEvent)}))}),[N]),Re=function(e,t){return n((()=>e.reduce(((e,n)=>{const{sensor:o}=n;return[...e,...o.activators.map((e=>({eventName:e.eventName,handler:t(e.handler,n)})))]}),[])),[e,t])}(m,i(((e,t)=>(n,o)=>{const r=n.nativeEvent,l=N.get(o);if(null!==j.current||!l||r.dndKit||r.defaultPrevented)return;const i={active:l};!0===e(n,t.options,i)&&(r.dndKit={capturedBy:t.sensor},j.current=o,Se(n,t))}),[N,Se]));(function(e){r((()=>{if(!Oe)return;const t=e.map((e=>{let{sensor:t}=e;return null==t.setup?void 0:t.setup()}));return()=>{for(const e of t)null==e||e()}}),e.map((e=>{let{sensor:t}=e;return t})))})(m),He((()=>{Q&&D===On.Initializing&&F(On.Initialized)}),[Q,D]),r((()=>{const{onDragMove:e}=G.current,{active:t,activatorEvent:n,collisions:o,over:r}=te.current;if(!t||!n)return;const l={active:t,activatorEvent:n,collisions:o,delta:{x:me.x,y:me.y},over:r};b((()=>{null==e||e(l),_({type:"onDragMove",event:l})}))}),[me.x,me.y]),r((()=>{const{active:e,activatorEvent:t,collisions:n,droppableContainers:o,scrollAdjustedTranslate:r}=te.current;if(!e||null==j.current||!t||!r)return;const{onDragOver:l}=G.current,i=o.get(we),a=i&&i.rect.current?{id:i.id,rect:i.rect.current,data:i.data,disabled:i.disabled}:null,s={active:e,activatorEvent:t,collisions:n,delta:{x:r.x,y:r.y},over:a};b((()=>{xe(a),null==l||l(s),_({type:"onDragOver",event:s})}))}),[we]),He((()=>{te.current={activatorEvent:T,active:k,activeNode:Y,collisionRect:ve,collisions:be,droppableRects:q,draggableNodes:N,draggingNode:re,draggingNodeRect:le,droppableContainers:O,over:ye,scrollableAncestors:ue,scrollAdjustedTranslate:me},A.current={initial:le,translated:ve}}),[k,Y,be,ve,N,re,le,q,O,ye,ue,me]),sn({...J,delta:P,draggingRect:ve,pointerCoordinates:ge,scrollableAncestors:ue,scrollableAncestorRects:de});const _e=n((()=>({active:k,activeNode:Y,activeNodeRect:Q,activatorEvent:T,collisions:be,containerNodeRect:ee,dragOverlay:oe,draggableNodes:N,droppableContainers:O,droppableRects:q,over:ye,measureDroppableContainers:W,scrollableAncestors:ue,scrollableAncestorRects:de,measuringConfiguration:$,measuringScheduled:X,windowRect:se})),[k,Y,Q,T,be,ee,oe,N,O,q,ye,W,ue,de,$,X,se]),Ee=n((()=>({activatorEvent:T,activators:Re,active:k,activeNodeRect:Q,ariaDescribedById:{draggable:B},dispatch:R,draggableNodes:N,over:ye,measureDroppableContainers:W})),[T,Re,k,Q,R,B,N,ye,W]);return t.createElement(it.Provider,{value:E},t.createElement(Dn.Provider,{value:Ee},t.createElement(Fn.Provider,{value:_e},t.createElement(Pn.Provider,{value:Ce},h)),t.createElement(Nn,{disabled:!1===(null==p?void 0:p.restoreFocus)})),t.createElement(ut,{...p,hiddenTextDescribedById:B}))})),An=s(null),kn="button",jn="Droppable";function zn(e){let{id:t,data:o,disabled:r=!1,attributes:l}=e;const i=Xe(jn),{activators:a,activatorEvent:s,active:d,activeNodeRect:c,ariaDescribedById:g,draggableNodes:p,over:f}=u(Dn),{role:h=kn,roleDescription:m="draggable",tabIndex:v=0}=l??{},b=(null==d?void 0:d.id)===t,w=u(b?Pn:An),[y,x]=$e(),[C,S]=$e(),R=function(e,t){return n((()=>e.reduce(((e,n)=>{let{eventName:o,handler:r}=n;return e[o]=e=>{r(e,t)},e}),{})),[e,t])}(a,t),_=Be(o);He((()=>(p.set(t,{id:t,key:i,node:y,activatorNode:C,data:_}),()=>{const e=p.get(t);e&&e.key===i&&p.delete(t)})),[p,t]);return{active:d,activatorEvent:s,activeNodeRect:c,attributes:n((()=>({role:h,tabIndex:v,"aria-disabled":r,"aria-pressed":!(!b||h!==kn)||void 0,"aria-roledescription":m,"aria-describedby":g.draggable})),[r,h,v,b,m,g.draggable]),isDragging:b,listeners:r?void 0:R,node:y,over:f,setNodeRef:x,setActivatorNodeRef:S,transform:w}}const Ln="Droppable",Tn={timeout:25};function Hn(e,t,n){const o=e.slice();return o.splice(n<0?o.length+n:n,0,o.splice(t,1)[0]),o}function Gn(e,t){return e.reduce(((e,n,o)=>{const r=t.get(n);return r&&(e[o]=r),e}),Array(e.length))}function Bn(e){return null!==e&&e>=0}const Un=e=>{let{rects:t,activeIndex:n,overIndex:o,index:r}=e;const l=Hn(t,o,n),i=t[r],a=l[r];return a&&i?{x:a.left-i.left,y:a.top-i.top,scaleX:a.width/i.width,scaleY:a.height/i.height}:null},$n={scaleX:1,scaleY:1},qn=e=>{var t;let{activeIndex:n,activeNodeRect:o,index:r,rects:l,overIndex:i}=e;const a=null!=(t=l[n])?t:o;if(!a)return null;if(r===n){const e=l[i];return e?{x:0,y:n<i?e.top+e.height-(a.top+a.height):e.top-a.top,...$n}:null}const s=function(e,t,n){const o=e[t],r=e[t-1],l=e[t+1];return o?n<t?r?o.top-(r.top+r.height):l?l.top-(o.top+o.height):0:l?l.top-(o.top+o.height):r?o.top-(r.top+r.height):0:0}(l,r,n);return r>n&&r<=i?{x:0,y:-a.height-s,...$n}:r<n&&r>=i?{x:0,y:a.height+s,...$n}:{x:0,y:0,...$n}};const Wn="Sortable",Xn=t.createContext({activeIndex:-1,containerId:Wn,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Un,disabled:{draggable:!1,droppable:!1}});function Yn(e){let{children:o,id:i,items:a,strategy:s=Un,disabled:d=!1}=e;const{active:c,dragOverlay:g,droppableRects:p,over:f,measureDroppableContainers:h}=u(Fn),m=Xe(Wn,i),v=null!==g.rect,b=n((()=>a.map((e=>"object"==typeof e&&"id"in e?e.id:e))),[a]),w=null!=c,y=c?b.indexOf(c.id):-1,x=f?b.indexOf(f.id):-1,C=l(b),S=!function(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(b,C.current),R=-1!==x&&-1===y||S,_=function(e){return"boolean"==typeof e?{draggable:e,droppable:e}:e}(d);He((()=>{S&&w&&h(b)}),[S,b,w,h]),r((()=>{C.current=b}),[b]);const E=n((()=>({activeIndex:y,containerId:m,disabled:_,disableTransforms:R,items:b,overIndex:x,useDragOverlay:v,sortedRects:Gn(b,p),strategy:s})),[y,m,_.draggable,_.droppable,R,b,x,p,v,s]);return t.createElement(Xn.Provider,{value:E},o)}const Kn=e=>{let{id:t,items:n,activeIndex:o,overIndex:r}=e;return Hn(n,o,r).indexOf(t)},Jn=e=>{let{containerId:t,isSorting:n,wasDragging:o,index:r,items:l,newIndex:i,previousItems:a,previousContainerId:s,transition:u}=e;return!(!u||!o||a!==l&&r===i)&&(!!n||i!==r&&t===s)},Zn={duration:200,easing:"ease"},Qn="transform",eo=et.Transition.toString({property:Qn,duration:0,easing:"linear"}),to={roleDescription:"sortable"};function no(e){let{animateLayoutChanges:t=Jn,attributes:o,disabled:s,data:d,getNewIndex:c=Kn,id:g,strategy:p,resizeObserverConfig:f,transition:h=Zn}=e;const{items:m,containerId:v,activeIndex:b,disabled:w,disableTransforms:y,sortedRects:x,overIndex:C,useDragOverlay:S,strategy:R}=u(Xn),_=function(e,t){var n,o;return"boolean"==typeof e?{draggable:e,droppable:!1}:{draggable:null!=(n=null==e?void 0:e.draggable)?n:t.draggable,droppable:null!=(o=null==e?void 0:e.droppable)?o:t.droppable}}(s,w),E=m.indexOf(g),D=n((()=>({sortable:{containerId:v,index:E,items:m},...d})),[v,d,E,m]),F=n((()=>m.slice(m.indexOf(g))),[m,g]),{rect:I,node:M,isOver:N,setNodeRef:P}=function(e){let{data:t,disabled:n=!1,id:o,resizeObserverConfig:a}=e;const s=Xe(Ln),{active:d,dispatch:c,over:g,measureDroppableContainers:p}=u(Dn),f=l({disabled:n}),h=l(!1),m=l(null),v=l(null),{disabled:b,updateMeasurementsFor:w,timeout:y}={...Tn,...a},x=Be(w??o),C=fn({callback:i((()=>{h.current?(null!=v.current&&clearTimeout(v.current),v.current=setTimeout((()=>{p(Array.isArray(x.current)?x.current:[x.current]),v.current=null}),y)):h.current=!0}),[y]),disabled:b||!d}),S=i(((e,t)=>{C&&(t&&(C.unobserve(t),h.current=!1),e&&C.observe(e))}),[C]),[R,_]=$e(S),E=Be(t);return r((()=>{!C||!R.current||(C.disconnect(),h.current=!1,C.observe(R.current))}),[R,C]),He((()=>(c({type:dt.RegisterDroppable,element:{id:o,key:s,disabled:n,node:R,rect:m,data:E}}),()=>c({type:dt.UnregisterDroppable,key:s,id:o}))),[o]),r((()=>{n!==f.current.disabled&&(c({type:dt.SetDroppableDisabled,id:o,key:s,disabled:n}),f.current.disabled=n)}),[o,s,n,c]),{active:d,rect:m,isOver:(null==g?void 0:g.id)===o,node:R,over:g,setNodeRef:_}}({id:g,data:D,disabled:_.droppable,resizeObserverConfig:{updateMeasurementsFor:F,...f}}),{active:O,activatorEvent:V,activeNodeRect:A,attributes:k,setNodeRef:j,listeners:z,isDragging:L,over:T,setActivatorNodeRef:H,transform:G}=zn({id:g,data:D,attributes:{...to,...o},disabled:_.draggable}),B=function(){for(var e=arguments.length,t=new Array(e),o=0;o<e;o++)t[o]=arguments[o];return n((()=>e=>{t.forEach((t=>t(e)))}),t)}(P,j),U=!!O,$=U&&!y&&Bn(b)&&Bn(C),q=!S&&L,W=$?(q&&$?G:null)??(p??R)({rects:x,activeNodeRect:A,activeIndex:b,overIndex:C,index:E}):null,X=Bn(b)&&Bn(C)?c({id:g,items:m,activeIndex:b,overIndex:C}):E,Y=null==O?void 0:O.id,K=l({activeId:Y,items:m,newIndex:X,containerId:v}),J=m!==K.current.items,Z=t({active:O,containerId:v,isDragging:L,isSorting:U,id:g,index:E,items:m,newIndex:K.current.newIndex,previousItems:K.current.items,previousContainerId:K.current.containerId,transition:h,wasDragging:null!=K.current.activeId}),Q=function(e){let{disabled:t,index:n,node:o,rect:i}=e;const[s,u]=a(null),d=l(n);return He((()=>{if(!t&&n!==d.current&&o.current){const e=i.current;if(e){const t=_t(o.current,{ignoreTransform:!0}),n={x:e.left-t.left,y:e.top-t.top,scaleX:e.width/t.width,scaleY:e.height/t.height};(n.x||n.y)&&u(n)}}n!==d.current&&(d.current=n)}),[t,n,o,i]),r((()=>{s&&u(null)}),[s]),s}({disabled:!Z,index:E,node:M,rect:I});return r((()=>{U&&K.current.newIndex!==X&&(K.current.newIndex=X),v!==K.current.containerId&&(K.current.containerId=v),m!==K.current.items&&(K.current.items=m)}),[U,X,v,m]),r((()=>{if(Y===K.current.activeId)return;if(Y&&!K.current.activeId)return void(K.current.activeId=Y);const e=setTimeout((()=>{K.current.activeId=Y}),50);return()=>clearTimeout(e)}),[Y]),{active:O,activeIndex:b,attributes:k,data:D,rect:I,index:E,newIndex:X,items:m,isOver:N,isSorting:U,isDragging:L,listeners:z,node:M,overIndex:C,over:T,setNodeRef:B,setActivatorNodeRef:H,setDroppableNodeRef:P,setDraggableNodeRef:j,transform:Q??W,transition:function(){if(Q||J&&K.current.newIndex===E)return eo;if((!q||Ze(V))&&h&&(U||Z))return et.Transition.toString({...h,property:Qn})}()}}$t.Down,$t.Right,$t.Up,$t.Left;const oo=s(void 0),ro=({children:e})=>{const[t,n]=a(new Set),[o,r]=a(!1);return O.jsx(oo.Provider,{value:{expandedRows:t,toggleExpand:e=>{n((t=>{const n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}))},enableResizingFlag:()=>r(!0),disableResizingFlag:()=>r(!1),isResizing:o},children:e})},lo=()=>{const e=u(oo);if(void 0===e)throw new Error("useRootContext must be used within a RootContextProvider");return e};function io({styledTableProps:e,row:t,index:o}){const{focusable:l,loading:i,getRowClassName:a,rowHeight:s,onRowClick:u,expandArrow:d,enableDnd:c,tdClassName:p,customSubRowData:f,renderSubRows:h,defaultExpanded:m}=e,{transform:v,transition:b,setNodeRef:w,isDragging:y}=no({id:t.original.id,disabled:!c}),x={transform:et.Transform.toString(v),transition:b,opacity:y?.8:1,zIndex:y?1:0,position:"relative"},{expandedRows:C,isResizing:S,disableResizingFlag:R,toggleExpand:_}=lo();r((()=>{m&&t.getCanExpand()&&!t.getIsExpanded()&&_(t.id)}),[]);const E=t.getVisibleCells(),D=n((()=>E.map(((e,t)=>({...e,left:E.slice(0,t).reduce(((e,t)=>e+(t.column.getSize()||0)),0)})))),[E]),F=n((()=>D.some((e=>!0===e.column.columnDef.fixedLeft))),[D]);return O.jsxs(g,{children:[O.jsx("tr",{"data-index":o,"data-test":t.id,id:t.id,tabIndex:l?-1:void 0,className:Pe(Me["t-row"],i&&Me["is-loading"],(t.getIsExpanded()||t.getIsSelected())&&Me.selected,null==a?void 0:a(t)),style:{height:s?`${s}px`:"inherit",...c&&x},ref:w,onMouseUp:e=>{var n,o;if(e.target.classList.contains("MuiModal-backdrop")||"INPUT"===e.target.nodeName||"BUTTON"===e.target.nodeName)return;t.getCanExpand()&&!d&&t.getToggleExpandedHandler()(),null==(n=document.getElementById(t.id))||n.focus();const r="Range"===(null==(o=window.getSelection())?void 0:o.type);u&&!r&&!S&&u(e,t),R()},children:D.map((e=>{const n="actions"===e.column.id,o=e.column.columnDef.fixedLeft,r=C.has(t.original.id.toString());return O.jsx("td",{className:Pe(Me["t-cell"],p,n&&Me["action-cell"],n&&F&&Me.shadowed,n&&(t.getIsExpanded()||t.getIsSelected())&&Me.selected,n&&(null!=a&&a(t)?null==a?void 0:a(t):Me["action-cell-default-background"]),o&&Me["fixed-cell"],o&&(t.getIsExpanded()||t.getIsSelected())&&Me.selected,o&&(null!=a&&a(t)?null==a?void 0:a(t):Me["fixed-cell-default-background"]),!r&&Me.non_expanded_row),style:{left:o?e.left:void 0},children:Ie(e.column.columnDef.cell,e.getContext())},e.id)}))}),t.getIsExpanded()&&O.jsx(O.Fragment,{children:f&&h&&h({rows:f.get(t.original.id.toString())??[],row:t.original})})]},t.id)}function ao({styledTableProps:e,table:t}){const n=e.hideFooter?t.getExpandedRowModel().rows:t.getRowModel().rows;return O.jsx(O.Fragment,{children:n.map(((t,n)=>O.jsx(io,{styledTableProps:e,row:t,index:n},t.id)))})}const so=({colSpan:e,noRowsOverlay:t})=>O.jsx("tr",{className:Me["no-rows-overlay"],children:O.jsx("td",{colSpan:e,children:t})});function uo({table:e,styledTableProps:t}){const{columns:n,data:o,loading:r,noRowsOverlay:l,enableDnd:i}=t;return O.jsx("tbody",{className:Me.tbody,children:0===o.length&&r?O.jsx(V,{colSpan:n.length}):o.length>0?O.jsx(O.Fragment,{children:i?O.jsx(Yn,{items:o,strategy:qn,children:O.jsx(ao,{table:e,styledTableProps:t})}):O.jsx(ao,{table:e,styledTableProps:t})}):O.jsx(so,{colSpan:n.length,noRowsOverlay:l})})}const co=()=>{const[e,t]=a(null),n=!!e,o=i((e=>{t(e.currentTarget)}),[]);return{open:n,handleClose:i((()=>{t(null)}),[]),handleOpen:o,anchorEl:e}};function go(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M7.41 15.41L12 10.83l4.59 4.58L18 14l-6-6l-6 6z"})})}function po(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M7.41 8.58L12 13.17l4.59-4.59L18 10l-6 6l-6-6z"})})}function fo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M8.59 16.58L13.17 12L8.59 7.41L10 6l6 6l-6 6z"})})}const ho={"table-pagination":"_table-pagination_k2a41_1","table-pagination__pages-list":"_table-pagination__pages-list_k2a41_13","table-pagination__pages-list__page":"_table-pagination__pages-list__page_k2a41_18","page-selected":"_page-selected_k2a41_29","check-icon":"_check-icon_k2a41_32"};function mo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M15.41 16.58L10.83 12l4.58-4.59L14 6l-6 6l6 6z"})})}function vo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M9 16.17L4.83 12l-1.42 1.41L9 19L21 7l-1.41-1.41z"})})}const bo="_asma-core-ui-button_1r2np_1",wo={contained:"_contained_1r2np_27",outlined:"_outlined_1r2np_141",text:"_text_1r2np_255",textGray:"_textGray_1r2np_369",textWhite:"_textWhite_1r2np_426",large:"_large_1r2np_79",small:"_small_1r2np_74",medium:"_medium_1r2np_69",error:"_error_1r2np_84",common:"_common_1r2np_27"},yo=({variant:e="contained",className:t="",size:n="medium",children:o,refLink:r,startIcon:l,endIcon:i,dataTest:a,error:s,...u})=>{const d="large"===n||"medium"===n,c=s?"error":"common";return O.jsxs("button",{...u,className:Pe(bo,wo[e],wo[c],wo[n],t),ref:r,"data-test":a,children:[l,o&&O.jsx("div",{style:{overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",display:"flex",alignItems:"center",justifyContent:"center",gap:d?"8px":"4px",paddingLeft:d?"8px":"4px",paddingRight:d?"8px":"4px"},children:o}),i]})};function xo({table:e,locale:t}){const{anchorEl:n,open:o,handleClose:r,handleOpen:i}=co(),a=l(null),s="no"===t,u=Me["asma-ui-table-styled-table"],d=()=>{var e,t,n,o;null==(o=null==(n=null==(t=null==(e=null==a?void 0:a.current)?void 0:e.closest(`.${u}`))?void 0:t.querySelectorAll('[data-index="0"]'))?void 0:n[0])||o.scrollIntoView({block:"center",inline:"start"})},c=e.getPageCount()||1,g=e.getState().pagination.pageIndex+1,p=Array.from({length:c},((e,t)=>t+1));return O.jsxs("div",{ref:a,className:ho["table-pagination"],children:[O.jsx(f,{title:s?"Nåværende side":"Current Page",children:O.jsx("div",{children:O.jsxs(yo,{dataTest:"",variant:"outlined",style:{minWidth:"140px"},onClick:e=>{i(e)},endIcon:o?O.jsx(go,{height:24,width:24}):O.jsx(po,{height:24,width:24}),children:[s?"Side":"Page"," ",g," ",s?"av":"of"," ",c]})})}),O.jsx(h,{open:o,anchorEl:n,onClose:r,anchorOrigin:{vertical:-5,horizontal:"center"},transformOrigin:{vertical:"bottom",horizontal:"center"},children:O.jsx("div",{className:ho["table-pagination__pages-list"],children:p.map((t=>O.jsxs("div",{className:Pe(ho["table-pagination__pages-list__page"],g===t&&"page-selected"),onClick:()=>{e.setPageIndex(t-1),r(),d()},children:[g===t&&O.jsx(vo,{className:ho["check-icon"],height:24,width:24}),O.jsxs("span",{children:[s?"Side":"Page"," ",t]})]},t)))})}),O.jsx(f,{title:1===g?"":s?"Forrige side":"Previous Page",children:O.jsx("div",{children:O.jsx(yo,{dataTest:"",variant:"outlined",onClick:()=>{e.previousPage(),d()},disabled:!e.getCanPreviousPage(),style:{minWidth:40,width:40},startIcon:O.jsx(mo,{height:24,width:24})})})}),O.jsx(f,{title:g===c?"":s?"Neste side":"Next Page",children:O.jsx("div",{children:O.jsx(yo,{dataTest:"",variant:"outlined",onClick:()=>{e.nextPage(),d()},disabled:!e.getCanNextPage(),style:{minWidth:40,width:40},startIcon:O.jsx(fo,{height:24,width:24})})})})]})}function Co({table:e,styledTableProps:t}){var n,o;if(t.hideFooter)return null;const r=t.paginationAlignLeft;return O.jsxs("div",{className:Me["table-footer"],style:r&&{justifyContent:"flex-start"}||{},children:[!r&&(null==(n=t.footer)?void 0:n.call(t,e)),O.jsx(xo,{table:e,locale:t.locale||"en"}),r&&(null==(o=t.footer)?void 0:o.call(t,e))]})}const So=t=>{const{columns:n,data:o,initialState:r,pageSize:l,enableRowSelection:i,tableInstanceRef:a,...s}=t,u=function(t){const n={state:{},onStateChange:()=>{},renderFallbackValue:null,...t},[o]=e.useState((()=>({current:Re(n)}))),[r,l]=e.useState((()=>o.current.initialState));return o.current.setOptions((e=>({...e,...t,state:{...r,...t.state},onStateChange:e=>{l(e),null==t.onStateChange||t.onStateChange(e)}}))),o.current}({columns:n,data:o,initialState:{pagination:{pageIndex:0,pageSize:l||50},columnVisibility:{...null==r?void 0:r.columnVisibility,[C]:!1},...r},enableRowSelection:i,getCoreRowModel:e=>z((()=>[e.options.data]),(t=>{const n={rows:[],flatRows:[],rowsById:{}},o=function(t,r,l){void 0===r&&(r=0);const i=[];for(let s=0;s<t.length;s++){const u=_e(e,e._getRowId(t[s],s,l),t[s],s,r,void 0,null==l?void 0:l.id);var a;n.flatRows.push(u),n.rowsById[u.id]=u,i.push(u),e.options.getSubRows&&(u.originalSubRows=e.options.getSubRows(t[s],s),null!=(a=u.originalSubRows)&&a.length&&(u.subRows=o(u.originalSubRows,r+1,u)))}return i};return n.rows=o(t),n}),{key:"development"===process.env.NODE_ENV&&"getRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getExpandedRowModel:e=>z((()=>[e.getState().expanded,e.getPreExpandedRowModel(),e.options.paginateExpandedRows]),((e,t,n)=>t.rows.length&&(!0===e||Object.keys(e??{}).length)&&n?Fe(t):t),{key:"development"===process.env.NODE_ENV&&"getExpandedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getFilteredRowModel:e=>z((()=>[e.getPreFilteredRowModel(),e.getState().columnFilters,e.getState().globalFilter]),((t,n,o)=>{if(!t.rows.length||(null==n||!n.length)&&!o){for(let e=0;e<t.flatRows.length;e++)t.flatRows[e].columnFilters={},t.flatRows[e].columnFiltersMeta={};return t}const r=[],l=[];(n??[]).forEach((t=>{var n;const o=e.getColumn(t.id);if(!o)return;const l=o.getFilterFn();l?r.push({id:t.id,filterFn:l,resolvedValue:null!=(n=null==l.resolveFilterValue?void 0:l.resolveFilterValue(t.value))?n:t.value}):"production"!==process.env.NODE_ENV&&console.warn(`Could not find a valid 'column.filterFn' for column with the ID: ${o.id}.`)}));const i=n.map((e=>e.id)),a=e.getGlobalFilterFn(),s=e.getAllLeafColumns().filter((e=>e.getCanGlobalFilter()));let u,d;o&&a&&s.length&&(i.push("__global__"),s.forEach((e=>{var t;l.push({id:e.id,filterFn:a,resolvedValue:null!=(t=null==a.resolveFilterValue?void 0:a.resolveFilterValue(o))?t:o})})));for(let e=0;e<t.flatRows.length;e++){const n=t.flatRows[e];if(n.columnFilters={},r.length)for(let e=0;e<r.length;e++){u=r[e];const t=u.id;n.columnFilters[t]=u.filterFn(n,t,u.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))}if(l.length){for(let e=0;e<l.length;e++){d=l[e];const t=d.id;if(d.filterFn(n,t,d.resolvedValue,(e=>{n.columnFiltersMeta[t]=e}))){n.columnFilters.__global__=!0;break}}!0!==n.columnFilters.__global__&&(n.columnFilters.__global__=!1)}}return De(t.rows,(e=>{for(let t=0;t<i.length;t++)if(!1===e.columnFilters[i[t]])return!1;return!0}),e)}),{key:"development"===process.env.NODE_ENV&&"getFilteredRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getSortedRowModel:e=>z((()=>[e.getState().sorting,e.getPreSortedRowModel()]),((t,n)=>{if(!n.rows.length||null==t||!t.length)return n;const o=e.getState().sorting,r=[],l=o.filter((t=>{var n;return null==(n=e.getColumn(t.id))?void 0:n.getCanSort()})),i={};l.forEach((t=>{const n=e.getColumn(t.id);n&&(i[t.id]={sortUndefined:n.columnDef.sortUndefined,invertSorting:n.columnDef.invertSorting,sortingFn:n.getSortingFn()})}));const a=e=>{const t=[...e];return t.sort(((e,t)=>{for(let o=0;o<l.length;o+=1){var n;const r=l[o],a=i[r.id],s=null!=(n=null==r?void 0:r.desc)&&n;let u=0;if(a.sortUndefined){const n=void 0===e.getValue(r.id),o=void 0===t.getValue(r.id);(n||o)&&(u=n&&o?0:n?a.sortUndefined:-a.sortUndefined)}if(0===u&&(u=a.sortingFn(e,t,r.id)),0!==u)return s&&(u*=-1),a.invertSorting&&(u*=-1),u}return e.index-t.index})),t.forEach((e=>{var t;r.push(e),null!=(t=e.subRows)&&t.length&&(e.subRows=a(e.subRows))})),t};return{rows:a(n.rows),flatRows:r,rowsById:n.rowsById}}),{key:"development"===process.env.NODE_ENV&&"getSortedRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable},onChange:()=>{e._autoResetPageIndex()}}),getPaginationRowModel:e=>z((()=>[e.getState().pagination,e.getPrePaginationRowModel(),e.options.paginateExpandedRows?void 0:e.getState().expanded]),((t,n)=>{if(!n.rows.length)return n;const{pageSize:o,pageIndex:r}=t;let{rows:l,flatRows:i,rowsById:a}=n;const s=o*r,u=s+o;let d;l=l.slice(s,u),d=e.options.paginateExpandedRows?{rows:l,flatRows:i,rowsById:a}:Fe({rows:l,flatRows:i,rowsById:a}),d.flatRows=[];const c=e=>{d.flatRows.push(e),e.subRows.length&&e.subRows.forEach(c)};return d.rows.forEach(c),d}),{key:"development"===process.env.NODE_ENV&&"getPaginationRowModel",debug:()=>{var t;return null!=(t=e.options.debugAll)?t:e.options.debugTable}}),getRowId:s.getRowId||((e,t,n)=>n?[n.id,e.id].join("."):e.id.toString()),defaultColumn:t.enableResizing?{size:void 0}:void 0,...s});return a&&(a.current=u),{table:u}},Ro=({dataTest:e,...t})=>O.jsx(m,{...t,"data-test":e,sx:{...t.sx,"&.MuiCheckbox-root":{color:"var(--colors-delta-500) !important"},"&.MuiCheckbox-root.Mui-checked":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.MuiCheckbox-indeterminate":{color:"var(--colors-gama-500) !important"},"&.MuiCheckbox-root.Mui-disabled":{color:"var(--colors-delta-200) !important"},"&.MuiCheckbox-root .PrivateSwitchBase-input":{height:"100% !important",width:"100% !important"}}});function _o(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"M12 16a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2m0-6a2 2 0 0 1 2 2a2 2 0 0 1-2 2a2 2 0 0 1-2-2a2 2 0 0 1 2-2"})})}const Eo=e=>{var t;return O.jsx(v,{...e,classes:{root:Pe("px-3 py-2.5",null==(t=e.classes)?void 0:t.root),...e.classes}})};function Do({tableData:e,actions:n}){const{anchorEl:o,open:r,handleClose:l,handleOpen:i}=co(),a=n(e.row);return O.jsx("div",{className:"flex justify-center items-center w-[40px]",children:a.length?O.jsxs("div",{className:"flex items-center justify-center",children:[O.jsx(yo,{dataTest:"",variant:"text",size:"small",onClick:e=>{e.stopPropagation(),e.preventDefault(),i(e)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:O.jsx(_o,{className:"text-delta-800",width:20,height:20})}),O.jsx(h,{open:r,anchorEl:o,onClose:l,onClick:l,anchorOrigin:{horizontal:"center",vertical:"bottom"},transformOrigin:{vertical:"top",horizontal:"right"},children:n(e.row).map(((n,o)=>{if(x(n)){const r=n.component(e.row,l);return t.isValidElement(r)?O.jsx(t.Fragment,{children:r},o):null}return n.hide?null:O.jsx(Eo,{className:n.className,disabled:n.disabled,onClick:()=>{var t;null==(t=n.onClick)||t.call(n,e.row)},onMouseDown:e=>{e.stopPropagation(),e.preventDefault()},onMouseUp:e=>{e.stopPropagation(),e.preventDefault()},children:n.label},o)}))})]}):null})}function Fo(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",fillRule:"evenodd",d:"M16 9V4h2V2H6v2h2v5c0 1.66-1.34 3-3 3v2h5.97v7l1 1l1-1v-7H19v-2c-1.66 0-3-1.34-3-3"})})}const Io={"actions-header":"_actions-header_1bxzk_1","pin-indicator":"_pin-indicator_1bxzk_11","pin-icon":"_pin-icon_1bxzk_21"};function Mo({headerData:e}){const{anchorEl:t,open:n,handleClose:o,handleOpen:r}=co(),l=e.table.getAllLeafColumns().some((e=>e.getCanHide()&&!e.getIsVisible()&&!D.includes(e.id)));return O.jsxs("div",{className:"flex absolute-center items-center justify-end w-full",children:[O.jsxs("div",{className:Io["actions-header"],onClick:r,children:[O.jsx(Fo,{className:Io["pin-icon"]}),l&&O.jsx("div",{className:Io["pin-indicator"]})]}),O.jsx(h,{anchorEl:t,anchorOrigin:{horizontal:"left",vertical:"bottom"},open:n,onClose:o,sx:{"& .MuiPaper-root":{maxHeight:"calc(7 * 44px)",overflowY:"auto",scrollbarWidth:"thin"}},children:e.table.getAllLeafColumns().filter((e=>e.getCanHide()&&e.id!==C)).map((e=>e.columnDef.header?O.jsxs(Eo,{onClick:()=>e.toggleVisibility(!e.getIsVisible()),className:"h-[44px]",children:[O.jsx(Ro,{size:"small",dataTest:"test",disableRipple:!0,className:"p-0 pr-2",checked:e.getIsVisible()}),e.columnDef.pinnedHeaderText?e.columnDef.pinnedHeaderText:"string"==typeof e.columnDef.header?e.columnDef.header:e.id]},e.id):null))})]})}function No(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",viewBox:"0 0 20 20",...e,children:O.jsx("path",{fill:"currentColor",d:"M14 6.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0m-5 0a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M5.5 8a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3m8.5 5.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0M10.5 15a1.5 1.5 0 1 1 0-3a1.5 1.5 0 0 1 0 3M4 13.5a1.5 1.5 0 1 0 3 0a1.5 1.5 0 0 0-3 0"})})}const Po=({rowId:e,rowHeight:t})=>{const{attributes:n,listeners:o}=no({id:e});return O.jsx("div",{...n,...o,style:{height:t||"auto"},children:O.jsx(No,{width:24,height:24,className:"text-delta-800"})})};function Oo({info:e,rowHeight:t}){const{expandedRows:n,toggleExpand:o}=lo(),r=n.has(e.row.id),l=e.row.getCanExpand();return O.jsx("div",{className:"flex w-full items-center justify-center",style:{height:t||"auto"},onClick:()=>{l&&e.row.getToggleExpandedHandler()(),o(e.row.id)},onMouseDown:e=>{e.preventDefault(),e.stopPropagation()},onMouseUp:e=>{e.preventDefault(),e.stopPropagation()},children:O.jsx("div",{style:{rotate:r?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"},children:O.jsx(po,{width:20,height:20,color:"var(--colors-gray-700)"})})})}const Vo=e=>{const{columns:t,actions:n,customActionsNode:o,headerPin:r=!0,enableRowSelection:l,expandArrow:i,enableDnd:a,customDndColumnProps:s,rowHeight:u,textExpandArrow:d,customActionsColumnProps:c}=e,g=t.some((e=>!0===e.fixedLeft));!t.find((e=>"actions"===e.id))&&(n||o||r)&&t.push(function(e){const{headerPin:t,actions:n,customActionsNode:o,rowHeight:r,customActionsColumnProps:l}=e;return{id:"actions",enableHiding:!1,enableSorting:!1,accessorFn:e=>e,header:e=>t?O.jsx(Mo,{headerData:e}):null,cell:e=>n||o?O.jsxs("div",{className:"flex items-center justify-end gap-x-1",style:{height:r||"auto"},children:[o&&O.jsx("div",{children:null==o?void 0:o(e)}),n&&O.jsx(Do,{tableData:e,actions:n})]}):null,size:50,...l}}({headerPin:r,actions:n,customActionsNode:o,rowHeight:u,customActionsColumnProps:c})),d&&!t.find((e=>e.id===E))&&t.unshift(function(e,t){return{id:E,minSize:40,maxSize:40,size:40,enableHiding:!1,enableSorting:!1,header:()=>null,cell:e=>O.jsx(Oo,{info:e,rowHeight:t}),fixedLeft:e}}(g,u)),i&&!d&&!t.find((e=>e.id===S))&&t.unshift(function(e,t){return{id:S,minSize:50,maxSize:50,size:50,enableHiding:!1,enableSorting:!1,header:()=>null,cell:({cell:e})=>{const n=e.row.getIsExpanded();return e.row.getCanExpand()?O.jsx("span",{className:"flex w-full outline-none focus:outline-none items-center justify-center",onClick:()=>e.row.getToggleExpandedHandler()(),style:{height:t||"auto"},children:O.jsx(po,{width:24,height:24,style:{rotate:n?"180deg":"0deg",transitionTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)",transitionDuration:"500ms"}})}):null},fixedLeft:e}}(g,u)),a&&!t.find((e=>e.id===_))&&t.unshift(function(e,t){return{enableHiding:!1,enableSorting:!1,header:()=>null,cell:({row:e})=>O.jsx(Po,{rowId:e.id,rowHeight:t}),...e,id:_}}(s,u)),l&&!t.find((e=>e.id===C))&&t.unshift(function(e,t){return{id:C,minSize:52,maxSize:52,size:52,header:({table:e})=>O.jsx(Ro,{size:"small",dataTest:"cell-select-all",checked:e.getIsAllRowsSelected(),indeterminate:e.getIsSomeRowsSelected(),onChange:e.getToggleAllRowsSelectedHandler()}),cell:({cell:e})=>O.jsx("div",{className:"w-[38px] h-[38px] flex items-center",style:{height:t||"auto"},children:O.jsx(Ro,{size:"small",dataTest:"cell-select",checked:e.row.getIsSelected(),disabled:!e.row.getCanSelect(),onClick:e=>e.stopPropagation(),onChange:e.row.getToggleSelectedHandler()})}),fixedLeft:e}}(g,u))};function Ao(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"m7 14l5-5l5 5z"})})}function ko(e){return O.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:O.jsx("path",{fill:"currentColor",d:"m7 10l5 5l5-5z"})})}const jo=e=>{const{header:t,enableResizing:n,tableWidth:o}=e;let r=t.getSize();const l=t.headerGroup.headers.reduce(((e,t)=>e+t.getSize()),0),i=t.headerGroup.headers.some((e=>e.id===R)),a=t.headerGroup.headers[t.headerGroup.headers.length-(i?2:1)],s=Number(null==a?void 0:a.getSize());if(!n){if(r&&(r=`${r}px`),a&&a.id===t.id){let e;e=o?Math.floor(o)-l+s:"100%";const n=t.column.columnDef.minSize||0;r="string"==typeof e?e:e>n?`${e}px`:`${n}px`}return{width:r||t.column.columnDef.size,maxWidth:r||t.column.columnDef.maxSize,minWidth:r||t.column.columnDef.minSize}}return{width:r||t.column.columnDef.size,maxWidth:t.column.columnDef.maxSize||r,minWidth:t.column.columnDef.minSize||r}};function zo({styledTableProps:e,header:t,tableCanResize:o=!1,left:r,hasFixedLeftColumn:i,tableWidth:a}){const{hideHeader:s=!1,enableResizing:u=!1}=e,d=l(null),{isResizing:c,enableResizingFlag:g,disableResizingFlag:p}=lo(),f=n((()=>t.headerGroup.headers.some((e=>e.id===R))),[t.headerGroup.headers]),h=n((()=>t.headerGroup.headers[t.headerGroup.headers.length-(f?2:1)]),[t.headerGroup.headers,f]);return O.jsx("th",{ref:d,colSpan:t.colSpan,className:Pe(Me["t-cell"],s&&Me["hide-header"],"actions"===t.column.id&&Me["t-cell__actions"],i&&"actions"===t.column.id&&Me.shadowed,!0===t.column.columnDef.fixedLeft&&Me["t-cell__fixed"]),style:{...jo({enableResizing:u,header:t,element:d.current,tableWidth:a}),...t.column.columnDef.fixedLeft&&{left:r}},children:O.jsxs("div",{className:Pe("flex items-center justify-left",s?Me["hide-table-header"]:Me["show-table-header"],t.column.getCanSort()&&Me["sortable-column"],t.column.columnDef.className),onClick:e=>{const n=t.column.getToggleSortingHandler();!c&&n&&n(e),p()},children:[Ie(t.column.columnDef.header,t.getContext()),{asc:O.jsx(Ao,{className:Me["sort-icon"]}),desc:O.jsx(ko,{className:Me["sort-icon"]})}[t.column.getIsSorted()]??null,o&&(!!u||t.id!==(null==h?void 0:h.id))&&t.column.getCanResize()&&!D.includes(t.column.id)&&O.jsx("div",{onDoubleClick:()=>t.column.resetSize(),onMouseDown:n=>{n.stopPropagation(),g(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Lo({styledTableProps:e,header:t})))},onTouchStart:n=>{n.stopPropagation(),g(),t.getResizeHandler()(n),window.addEventListener("mouseup",(()=>Lo({styledTableProps:e,header:t})))},className:`${Me.resizer} ${t.column.getIsResizing()?Me.isResizing:""}`})]})},t.id)}function Lo({styledTableProps:e,header:t}){if(e.uniqueKey){const n=e.uniqueKey,o=localStorage.getItem(n);let r={};if(o)try{r=JSON.parse(o)}catch{console.warn("Failed to parse stored dimensions. Resetting."),r={}}r[t.column.id]=t.column.getSize(),localStorage.setItem(n,JSON.stringify(r))}}function To({table:e,styledTableProps:t,tableCanResize:n,tableWidth:o}){const{stickyHeader:r=!1}=t,l=e.getHeaderGroups().some((e=>e.headers.some((e=>!0===e.column.columnDef.fixedLeft))));return O.jsx("thead",{className:Pe(Me["table-header"]),style:r&&{position:"sticky",top:-.2}||{},children:e.getHeaderGroups().map((e=>O.jsx("tr",{children:e.headers.map(((r,i)=>{const a=r.column.columnDef.fixedLeft,s=e.headers.slice(0,i).reduce(((e,t)=>e+(t.column.getSize()||0)),0);return O.jsx(zo,{styledTableProps:t,header:r,tableCanResize:n,left:a?s:0,hasFixedLeftColumn:l,tableWidth:o},r.column.id)}))},e.id)))})}const Ho=e=>{let{transform:t}=e;return{...t,x:0}};function Go(...e){return y(Pe(e))}function Bo(e){return O.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1rem",height:"1rem",viewBox:"0 0 24 24",...e,children:[O.jsx("path",{fill:"currentColor",d:"M12 2A10 10 0 1 0 22 12A10 10 0 0 0 12 2Zm0 18a8 8 0 1 1 8-8A8 8 0 0 1 12 20Z",opacity:.5}),O.jsx("path",{fill:"currentColor",d:"M20 12h2A10 10 0 0 0 12 2V4A8 8 0 0 1 20 12Z",children:O.jsx("animateTransform",{attributeName:"transform",dur:"1s",from:"0 12 12",repeatCount:"indefinite",to:"360 12 12",type:"rotate"})})]})}const Uo=({fetching:e=!1})=>e?O.jsx("div",{className:"absolute z-10 bg-white/40 left-0 top-0 right-0 bottom-0 flex items-center justify-center ",children:O.jsx(Bo,{className:Me["loading-icon"],width:50,height:50})}):null,$o=({data:e,setData:t,children:o})=>{const r=n((()=>null==e?void 0:e.map((e=>e.id))),[e]);return O.jsx(Vn,{collisionDetection:bt,modifiers:[Ho],onDragEnd:function(e){if(!t)return;const{active:n,over:o}=e;n&&o&&n.id!==o.id&&t((e=>Hn(e,r.indexOf(n.id),r.indexOf(o.id))))},children:o})},qo=({data:e,setData:t,enableDnd:n,children:o})=>n?O.jsx($o,{data:e,setData:t,children:o}):O.jsx(O.Fragment,{children:o}),Wo=e=>{const t={...e,rowHeight:e.rowHeight||48},{className:r,tableClassName:i,height:s,data:u,enableDnd:d,setData:c}=t;Vo(t);const{table:g}=So(t),p=l(null),[f,h]=a(null);o((()=>{const e=p.current;if(!e)return;const t=t=>{const n=e.getBoundingClientRect().width;h((e=>"setup"===t||n!==e?n:e))},n=new ResizeObserver((()=>t("resize")));return n.observe(e),t("setup"),()=>{n.unobserve(e)}}),[]);const m=n((()=>{var e,n;if(!t.enableColumnResizing)return;const o=g.getFlatHeaders(),r={};for(let e=0;e<o.length;e++){const t=o[e];r[`--header-${t.id}-size`]=t.getSize(),r[`--col-${t.column.id}-size`]=t.column.getSize()}return null==(e=t.getTableState)||e.call(t,g.getState()),null==(n=t.getColumnSizing)||n.call(t,g.getState().columnSizing),r}),[t.enableColumnResizing,g.getState().columnSizingInfo,g.getState().columnSizing]),v=u.length>0&&e.loading;return O.jsx(ro,{children:O.jsx(qo,{enableDnd:!!d,data:u,setData:c,children:O.jsxs("div",{className:Go(Me["asma-ui-table-styled-table"],i),children:[O.jsx("div",{className:Go(Me["table-wrapper"],v&&Me["table-wrapper-fetching"],r),style:{height:s},children:O.jsxs("table",{ref:p,className:Me["styled-table"],style:{...m},children:[O.jsx(To,{table:g,styledTableProps:t,tableCanResize:!!t.enableColumnResizing,tableWidth:f}),O.jsx(Uo,{fetching:!!v}),m?O.jsx(O.Fragment,{children:g.getState().columnSizingInfo.isResizingColumn?O.jsx(Xo,{table:g,styledTableProps:t}):O.jsx(uo,{table:g,styledTableProps:t})}):O.jsx(uo,{table:g,styledTableProps:t})]})}),O.jsx(Co,{table:g,styledTableProps:t})]})})})},Xo=d(uo,((e,t)=>e.table.options.data===t.table.options.data));export{R as ACTIONS_COLUMN_ID,_ as DND_HANDLE_COLUMN_ID,S as EXPAND_COLUMN_ID,D as INTERNAL_COLUMN_IDS,Xo as MemoizedTableBody,Po as RowDragHandleCell,C as SELECT_COLUMN_ID,E as SHOW_FULL_TEXT_ID,Wo as StyledTable,Ee as createColumnHelper,x as isCustomAction};
|
package/dist/src/types.d.ts
CHANGED
|
@@ -71,6 +71,7 @@ export type StyledTableProps<TData, TCustomData> = {
|
|
|
71
71
|
customDndColumnProps?: ColumnDef<TData, unknown>;
|
|
72
72
|
textExpandArrow?: boolean;
|
|
73
73
|
customActionsColumnProps?: Partial<ColumnDef<TData, unknown>>;
|
|
74
|
+
paginationAlignLeft?: boolean;
|
|
74
75
|
/**
|
|
75
76
|
* @info A unique identifier for the table. This name is used to store the table's state in localStorage,
|
|
76
77
|
* ensuring that the table state is persisted across sessions for the specific table instance.
|
package/package.json
CHANGED
|
@@ -1,119 +1,119 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
"
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
2
|
+
"name": "asma-ui-table",
|
|
3
|
+
"publishConfig": {
|
|
4
|
+
"access": "public"
|
|
5
|
+
},
|
|
6
|
+
"version": "1.0.40",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist/**/*"
|
|
10
|
+
],
|
|
11
|
+
"keywords": [],
|
|
12
|
+
"author": "asma-team",
|
|
13
|
+
"types": "./dist/index.d.ts",
|
|
14
|
+
"main": "./dist/asma-ui-table.es.js",
|
|
15
|
+
"module": "./dist/asma-ui-table.es.js",
|
|
16
|
+
"scripts": {
|
|
17
|
+
"dev": "vite",
|
|
18
|
+
"build": "npx tsc && rm -rf ./dist && vite build",
|
|
19
|
+
"preview": "vite preview",
|
|
20
|
+
"lint": "eslint src/**/*.{js,jsx,ts,tsx}",
|
|
21
|
+
"version": "echo $npm_package_version",
|
|
22
|
+
"lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
|
|
23
|
+
"prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
|
|
24
|
+
"storybook": "storybook dev -p 6006",
|
|
25
|
+
"storybook:no-browser": "storybook dev -p 6006 --no-open",
|
|
26
|
+
"storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
|
|
27
|
+
"storybook:node18:win": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
|
|
28
|
+
"build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
|
|
29
|
+
"test-storybook": "test-storybook",
|
|
30
|
+
"changeset:pre-beta": "changeset pre enter beta",
|
|
31
|
+
"changeset:pre-exit": "changeset pre exit",
|
|
32
|
+
"changeset:version": "changeset version",
|
|
33
|
+
"changeset:publish": "changeset publish",
|
|
34
|
+
"changeset:status": "changeset status"
|
|
35
|
+
},
|
|
36
|
+
"license": "UNLICENSED",
|
|
37
|
+
"dependencies": {
|
|
38
|
+
"@dnd-kit/core": "^6.1.0",
|
|
39
|
+
"@dnd-kit/modifiers": "^7.0.0",
|
|
40
|
+
"@dnd-kit/sortable": "^8.0.0",
|
|
41
|
+
"@dnd-kit/utilities": "^3.2.2",
|
|
42
|
+
"@emotion/react": "^11.11.1",
|
|
43
|
+
"@emotion/styled": "^11.11.0",
|
|
44
|
+
"@fontsource/roboto": "^5.0.4",
|
|
45
|
+
"@mui/material": "^5.13.7",
|
|
46
|
+
"@tanstack/react-table": "^8.10.0",
|
|
47
|
+
"clsx": "^1.2.1",
|
|
48
|
+
"lodash-es": "^4.17.21",
|
|
49
|
+
"node": "18.17.0",
|
|
50
|
+
"react": "^18.2.0",
|
|
51
|
+
"react-dom": "^18.2.0"
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@changesets/cli": "^2.26.2",
|
|
55
|
+
"@faker-js/faker": "^8.0.2",
|
|
56
|
+
"@rollup/plugin-terser": "^0.4.3",
|
|
57
|
+
"@storybook/addon-a11y": "^7.6.9",
|
|
58
|
+
"@storybook/addon-essentials": "^7.6.9",
|
|
59
|
+
"@storybook/addon-interactions": "^7.6.9",
|
|
60
|
+
"@storybook/addon-links": "^7.6.9",
|
|
61
|
+
"@storybook/addon-mdx-gfm": "^7.6.9",
|
|
62
|
+
"@storybook/addon-styling": "^1.3.7",
|
|
63
|
+
"@storybook/addons": "^7.6.9",
|
|
64
|
+
"@storybook/blocks": "^7.6.9",
|
|
65
|
+
"@storybook/manager-api": "^7.6.9",
|
|
66
|
+
"@storybook/preset-create-react-app": "^7.6.9",
|
|
67
|
+
"@storybook/react": "^7.6.9",
|
|
68
|
+
"@storybook/react-vite": "^7.6.9",
|
|
69
|
+
"@storybook/test-runner": "^0.16.0",
|
|
70
|
+
"@storybook/testing-library": "^0.2.2",
|
|
71
|
+
"@storybook/theming": "^7.6.9",
|
|
72
|
+
"@types/lodash-es": "^4.17.7",
|
|
73
|
+
"@types/node": "^18.0.3",
|
|
74
|
+
"@types/react": "^18.0.37",
|
|
75
|
+
"@types/react-dom": "^18.0.11",
|
|
76
|
+
"@typescript-eslint/eslint-plugin": "^5.59.0",
|
|
77
|
+
"@typescript-eslint/parser": "^5.59.0",
|
|
78
|
+
"@vitejs/plugin-react": "^4.0.0",
|
|
79
|
+
"autoprefixer": "^10.4.14",
|
|
80
|
+
"axe-playwright": "^1.2.3",
|
|
81
|
+
"axios": "^1.6.8",
|
|
82
|
+
"eslint": "^8.38.0",
|
|
83
|
+
"eslint-plugin-react-hooks": "^4.6.0",
|
|
84
|
+
"eslint-plugin-react-refresh": "^0.3.4",
|
|
85
|
+
"eslint-plugin-storybook": "^0.6.15",
|
|
86
|
+
"postcss": "^8.4.24",
|
|
87
|
+
"prop-types": "^15.8.1",
|
|
88
|
+
"rollup-plugin-typescript2": "^0.35.0",
|
|
89
|
+
"sass": "^1.77.5",
|
|
90
|
+
"storybook": "^7.6.9",
|
|
91
|
+
"storybook-addon-themes": "^6.1.0",
|
|
92
|
+
"tailwind-merge": "^2.5.2",
|
|
93
|
+
"tailwind-scrollbar": "^3.1.0",
|
|
94
|
+
"tailwindcss": "^3.3.2",
|
|
95
|
+
"typescript": "^5.0.2",
|
|
96
|
+
"typescript-plugin-css-modules": "^5.0.1",
|
|
97
|
+
"vite": "^4.3.9",
|
|
98
|
+
"vite-plugin-css-injected-by-js": "^3.5.1",
|
|
99
|
+
"vite-plugin-dts": "^3.1.1",
|
|
100
|
+
"vite-tsconfig-paths": "^4.2.0"
|
|
101
|
+
},
|
|
102
|
+
"peerDependencies": {
|
|
103
|
+
"@emotion/react": "^11.*",
|
|
104
|
+
"@emotion/styled": "^11.*",
|
|
105
|
+
"@mui/material": "^5.*",
|
|
106
|
+
"immer": "^9.*",
|
|
107
|
+
"react": "^18.*",
|
|
108
|
+
"react-dom": "^18.*"
|
|
109
|
+
},
|
|
110
|
+
"resolutions": {
|
|
111
|
+
"@types/node": "18.0.3",
|
|
112
|
+
"node": "18.17.0"
|
|
113
|
+
},
|
|
114
|
+
"exports": {
|
|
115
|
+
".": {
|
|
116
|
+
"import": "./dist/asma-ui-table.es.js"
|
|
117
|
+
}
|
|
97
118
|
}
|
|
98
|
-
|
|
99
|
-
"scripts": {
|
|
100
|
-
"dev": "vite",
|
|
101
|
-
"build": "npx tsc && rm -rf ./dist && vite build",
|
|
102
|
-
"preview": "vite preview",
|
|
103
|
-
"lint": "eslint src/**/*.{js,jsx,ts,tsx}",
|
|
104
|
-
"version": "echo $npm_package_version",
|
|
105
|
-
"lint:fix": "eslint --fix src/**/*.{jsx,ts,tsx}",
|
|
106
|
-
"prettier": "prettier --write src//**/*.{ts,tsx,scss} --config ./.prettierrc",
|
|
107
|
-
"storybook": "storybook dev -p 6006",
|
|
108
|
-
"storybook:no-browser": "storybook dev -p 6006 --no-open",
|
|
109
|
-
"storybook:node18": "export NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
|
|
110
|
-
"storybook:node18:win": "set NODE_OPTIONS=--openssl-legacy-provider && storybook dev -p 6006",
|
|
111
|
-
"build-storybook": "export NODE_OPTIONS=--max_old_space_size=6240 && storybook build",
|
|
112
|
-
"test-storybook": "test-storybook",
|
|
113
|
-
"changeset:pre-beta": "changeset pre enter beta",
|
|
114
|
-
"changeset:pre-exit": "changeset pre exit",
|
|
115
|
-
"changeset:version": "changeset version",
|
|
116
|
-
"changeset:publish": "changeset publish",
|
|
117
|
-
"changeset:status": "changeset status"
|
|
118
|
-
}
|
|
119
|
-
}
|
|
119
|
+
}
|