@adapttable/naive-ui 0.5.0 → 0.6.0
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/README.md +5 -5
- package/dist/{NaiveRowActions-BR140413.cjs → NaiveRowActions-DUlkorWa.cjs} +2 -2
- package/dist/NaiveRowActions-DUlkorWa.cjs.map +1 -0
- package/dist/{NaiveRowActions-DVyMXQJq.js → NaiveRowActions-DdHuWGCQ.js} +2 -2
- package/dist/NaiveRowActions-DdHuWGCQ.js.map +1 -0
- package/dist/assistant.cjs +360 -5
- package/dist/assistant.cjs.map +1 -0
- package/dist/assistant.js +356 -1
- package/dist/assistant.js.map +1 -0
- package/dist/batch-editing.cjs +1 -1
- package/dist/batch-editing.d.cts +1 -1
- package/dist/batch-editing.d.ts +1 -1
- package/dist/batch-editing.js +1 -1
- package/dist/cell-navigation.cjs.map +1 -1
- package/dist/cell-navigation.d.cts +1 -1
- package/dist/cell-navigation.d.cts.map +1 -1
- package/dist/cell-navigation.d.ts +1 -1
- package/dist/cell-navigation.d.ts.map +1 -1
- package/dist/cell-navigation.js.map +1 -1
- package/dist/column-layout.cjs +24 -0
- package/dist/column-layout.cjs.map +1 -0
- package/dist/column-layout.d.cts +12 -0
- package/dist/column-layout.d.cts.map +1 -0
- package/dist/column-layout.d.ts +12 -0
- package/dist/column-layout.d.ts.map +1 -0
- package/dist/column-layout.js +22 -0
- package/dist/column-layout.js.map +1 -0
- package/dist/{column-menu-GUeADLrH.cjs → column-menu-B-EhL5Ih.cjs} +3 -3
- package/dist/{column-menu-GUeADLrH.cjs.map → column-menu-B-EhL5Ih.cjs.map} +1 -1
- package/dist/{column-menu-BeNblq2u.js → column-menu-BwKtCGEo.js} +3 -3
- package/dist/{column-menu-BeNblq2u.js.map → column-menu-BwKtCGEo.js.map} +1 -1
- package/dist/column-menu.cjs +1 -1
- package/dist/column-menu.d.cts +24 -2
- package/dist/column-menu.d.cts.map +1 -0
- package/dist/column-menu.d.ts +24 -2
- package/dist/column-menu.d.ts.map +1 -0
- package/dist/column-menu.js +1 -1
- package/dist/command-palette.cjs +112 -2
- package/dist/command-palette.cjs.map +1 -0
- package/dist/command-palette.js +111 -1
- package/dist/command-palette.js.map +1 -0
- package/dist/context-menu.cjs +140 -2
- package/dist/context-menu.cjs.map +1 -0
- package/dist/context-menu.js +139 -1
- package/dist/context-menu.js.map +1 -0
- package/dist/{editing-DTOBwNI6.js → editing-Btr52gcG.js} +19 -5
- package/dist/{editing-DTOBwNI6.js.map → editing-Btr52gcG.js.map} +1 -1
- package/dist/{editing-BAUOl5Ox.cjs → editing-CIvf43jv.cjs} +23 -3
- package/dist/editing-CIvf43jv.cjs.map +1 -0
- package/dist/{editing-Dho3Y2RK.d.ts → editing-dN16BK0k.d.ts} +10 -2
- package/dist/{editing-Dho3Y2RK.d.ts.map → editing-dN16BK0k.d.ts.map} +1 -1
- package/dist/{editing-CdIoFGiK.d.cts → editing-xDGCcasQ.d.cts} +10 -2
- package/dist/{editing-CdIoFGiK.d.cts.map → editing-xDGCcasQ.d.cts.map} +1 -1
- package/dist/editing.cjs +4 -13
- package/dist/editing.d.cts +2 -2
- package/dist/editing.d.ts +2 -2
- package/dist/editing.js +2 -2
- package/dist/export-DLLCc4Lb.js +10 -0
- package/dist/export-DLLCc4Lb.js.map +1 -0
- package/dist/{export-csv.cjs → export-fT_9Xp5t.cjs} +7 -3
- package/dist/export-fT_9Xp5t.cjs.map +1 -0
- package/dist/export.cjs +2 -2
- package/dist/export.d.cts +9 -2
- package/dist/export.d.cts.map +1 -0
- package/dist/export.d.ts +9 -2
- package/dist/export.d.ts.map +1 -0
- package/dist/export.js +1 -1
- package/dist/filtering.cjs +22 -0
- package/dist/filtering.cjs.map +1 -0
- package/dist/filtering.d.cts +13 -0
- package/dist/filtering.d.cts.map +1 -0
- package/dist/filtering.d.ts +13 -0
- package/dist/filtering.d.ts.map +1 -0
- package/dist/filtering.js +21 -0
- package/dist/filtering.js.map +1 -0
- package/dist/{filters-Cy170_qU.js → filters-BxRu0r4j.js} +6 -5
- package/dist/filters-BxRu0r4j.js.map +1 -0
- package/dist/{filters-DIlfaXQJ.cjs → filters-U0LYOQjA.cjs} +5 -4
- package/dist/filters-U0LYOQjA.cjs.map +1 -0
- package/dist/filters.cjs +1 -1
- package/dist/filters.d.cts +90 -2
- package/dist/filters.d.cts.map +1 -0
- package/dist/filters.d.ts +90 -2
- package/dist/filters.d.ts.map +1 -0
- package/dist/filters.js +1 -1
- package/dist/grouping-panel.cjs +146 -3
- package/dist/grouping-panel.cjs.map +1 -0
- package/dist/grouping-panel.js +145 -2
- package/dist/grouping-panel.js.map +1 -0
- package/dist/header-filters.d.cts +52 -2
- package/dist/header-filters.d.cts.map +1 -0
- package/dist/header-filters.d.ts +52 -2
- package/dist/header-filters.d.ts.map +1 -0
- package/dist/index.cjs +2 -27
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -2
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -27
- package/dist/index.js.map +1 -1
- package/dist/preset.cjs +8 -9
- package/dist/preset.cjs.map +1 -1
- package/dist/preset.js +7 -8
- package/dist/preset.js.map +1 -1
- package/dist/row-actions.cjs +1 -1
- package/dist/row-actions.js +1 -1
- package/dist/row-pinning.cjs +1 -1
- package/dist/row-pinning.js +1 -1
- package/dist/row-reorder.cjs +185 -2
- package/dist/row-reorder.cjs.map +1 -0
- package/dist/row-reorder.d.cts +2 -1
- package/dist/row-reorder.d.cts.map +1 -1
- package/dist/row-reorder.d.ts +2 -1
- package/dist/row-reorder.d.ts.map +1 -1
- package/dist/row-reorder.js +185 -1
- package/dist/row-reorder.js.map +1 -0
- package/dist/selection.cjs +8 -0
- package/dist/selection.d.cts +2 -0
- package/dist/selection.d.ts +2 -0
- package/dist/selection.js +2 -0
- package/dist/side-panel.cjs +59 -2
- package/dist/side-panel.cjs.map +1 -0
- package/dist/side-panel.js +58 -1
- package/dist/side-panel.js.map +1 -0
- package/dist/styles.css +39 -39
- package/package.json +33 -23
- package/dist/NaiveRowActions-BR140413.cjs.map +0 -1
- package/dist/NaiveRowActions-DVyMXQJq.js.map +0 -1
- package/dist/assistant-DppW6EN1.cjs +0 -380
- package/dist/assistant-DppW6EN1.cjs.map +0 -1
- package/dist/assistant-_SYRZCOi.js +0 -357
- package/dist/assistant-_SYRZCOi.js.map +0 -1
- package/dist/column-menu-DdWVP1hz.d.cts +0 -23
- package/dist/column-menu-DdWVP1hz.d.cts.map +0 -1
- package/dist/column-menu-DdWVP1hz.d.ts +0 -23
- package/dist/column-menu-DdWVP1hz.d.ts.map +0 -1
- package/dist/command-palette-4qS9viir.cjs +0 -117
- package/dist/command-palette-4qS9viir.cjs.map +0 -1
- package/dist/command-palette-CSI-tgcP.js +0 -112
- package/dist/command-palette-CSI-tgcP.js.map +0 -1
- package/dist/context-menu-CsbLaMcR.js +0 -140
- package/dist/context-menu-CsbLaMcR.js.map +0 -1
- package/dist/context-menu-qVwE9S2V.cjs +0 -145
- package/dist/context-menu-qVwE9S2V.cjs.map +0 -1
- package/dist/editing-BAUOl5Ox.cjs.map +0 -1
- package/dist/export-csv-BU39yRSN.d.ts +0 -9
- package/dist/export-csv-BU39yRSN.d.ts.map +0 -1
- package/dist/export-csv-DRDjZuQj.d.cts +0 -9
- package/dist/export-csv-DRDjZuQj.d.cts.map +0 -1
- package/dist/export-csv.cjs.map +0 -1
- package/dist/export-csv.d.cts +0 -2
- package/dist/export-csv.d.ts +0 -2
- package/dist/export-csv.js +0 -10
- package/dist/export-csv.js.map +0 -1
- package/dist/features.cjs +0 -225
- package/dist/features.d.cts +0 -41
- package/dist/features.d.ts +0 -41
- package/dist/features.js +0 -37
- package/dist/filters-ClqB1_n4.d.cts +0 -90
- package/dist/filters-ClqB1_n4.d.cts.map +0 -1
- package/dist/filters-Cy170_qU.js.map +0 -1
- package/dist/filters-DIlfaXQJ.cjs.map +0 -1
- package/dist/filters-b2ZuVZPI.d.ts +0 -90
- package/dist/filters-b2ZuVZPI.d.ts.map +0 -1
- package/dist/grouping-panel-BPaPG49S.cjs +0 -151
- package/dist/grouping-panel-BPaPG49S.cjs.map +0 -1
- package/dist/grouping-panel-CYUPSa0u.js +0 -146
- package/dist/grouping-panel-CYUPSa0u.js.map +0 -1
- package/dist/header-filters-CQg6clum.d.cts +0 -52
- package/dist/header-filters-CQg6clum.d.cts.map +0 -1
- package/dist/header-filters-CQg6clum.d.ts +0 -52
- package/dist/header-filters-CQg6clum.d.ts.map +0 -1
- package/dist/row-reorder-2Ztn7QRu.cjs +0 -191
- package/dist/row-reorder-2Ztn7QRu.cjs.map +0 -1
- package/dist/row-reorder-DBzbJ20V.js +0 -186
- package/dist/row-reorder-DBzbJ20V.js.map +0 -1
- package/dist/side-panel-Bf4zBlYZ.cjs +0 -64
- package/dist/side-panel-Bf4zBlYZ.cjs.map +0 -1
- package/dist/side-panel-CLTgXUnb.js +0 -59
- package/dist/side-panel-CLTgXUnb.js.map +0 -1
package/dist/styles.css
CHANGED
|
@@ -338,45 +338,6 @@
|
|
|
338
338
|
align-items: center;
|
|
339
339
|
padding: 14px;
|
|
340
340
|
}
|
|
341
|
-
.adapttable-naive-pivot {
|
|
342
|
-
flex-wrap: wrap;
|
|
343
|
-
gap: 12px;
|
|
344
|
-
display: flex;
|
|
345
|
-
}
|
|
346
|
-
|
|
347
|
-
.adapttable-naive-pivot fieldset {
|
|
348
|
-
border: 1px solid var(--n-border-color, #e0e0e6);
|
|
349
|
-
border-radius: 4px;
|
|
350
|
-
gap: 8px;
|
|
351
|
-
min-inline-size: 0;
|
|
352
|
-
margin: 0;
|
|
353
|
-
padding: 8px 12px 12px;
|
|
354
|
-
display: grid;
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
.adapttable-naive-pivot fieldset > div {
|
|
358
|
-
flex-wrap: wrap;
|
|
359
|
-
align-items: center;
|
|
360
|
-
gap: 6px;
|
|
361
|
-
display: flex;
|
|
362
|
-
}
|
|
363
|
-
.adapttable-naive-assistant-panel, .adapttable-naive-assistant-window {
|
|
364
|
-
flex-direction: column;
|
|
365
|
-
min-inline-size: 18rem;
|
|
366
|
-
display: flex;
|
|
367
|
-
}
|
|
368
|
-
|
|
369
|
-
.adapttable-naive-assistant-input {
|
|
370
|
-
inline-size: 100%;
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
.adapttable-naive-approval-list {
|
|
374
|
-
gap: .5rem;
|
|
375
|
-
margin: 0;
|
|
376
|
-
padding: 0;
|
|
377
|
-
list-style: none;
|
|
378
|
-
display: grid;
|
|
379
|
-
}
|
|
380
341
|
|
|
381
342
|
.adapttable-naive-ui-grouping-layout > .n-card-content {
|
|
382
343
|
display: flex;
|
|
@@ -557,3 +518,42 @@
|
|
|
557
518
|
border-style: solid;
|
|
558
519
|
outline: 2px solid var(--adapttable-naive-error, #d03050);
|
|
559
520
|
}
|
|
521
|
+
.adapttable-naive-pivot {
|
|
522
|
+
flex-wrap: wrap;
|
|
523
|
+
gap: 12px;
|
|
524
|
+
display: flex;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
.adapttable-naive-pivot fieldset {
|
|
528
|
+
border: 1px solid var(--n-border-color, #e0e0e6);
|
|
529
|
+
border-radius: 4px;
|
|
530
|
+
gap: 8px;
|
|
531
|
+
min-inline-size: 0;
|
|
532
|
+
margin: 0;
|
|
533
|
+
padding: 8px 12px 12px;
|
|
534
|
+
display: grid;
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
.adapttable-naive-pivot fieldset > div {
|
|
538
|
+
flex-wrap: wrap;
|
|
539
|
+
align-items: center;
|
|
540
|
+
gap: 6px;
|
|
541
|
+
display: flex;
|
|
542
|
+
}
|
|
543
|
+
.adapttable-naive-assistant-panel, .adapttable-naive-assistant-window {
|
|
544
|
+
flex-direction: column;
|
|
545
|
+
min-inline-size: 18rem;
|
|
546
|
+
display: flex;
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
.adapttable-naive-assistant-input {
|
|
550
|
+
inline-size: 100%;
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
.adapttable-naive-approval-list {
|
|
554
|
+
gap: .5rem;
|
|
555
|
+
margin: 0;
|
|
556
|
+
padding: 0;
|
|
557
|
+
list-style: none;
|
|
558
|
+
display: grid;
|
|
559
|
+
}
|
package/package.json
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
2
|
+
"version": "0.6.0",
|
|
3
3
|
"license": "MIT",
|
|
4
4
|
"author": "Orwa Mahmoud",
|
|
5
5
|
"type": "module",
|
|
@@ -22,7 +22,7 @@
|
|
|
22
22
|
"vue": "^3.5.43",
|
|
23
23
|
"naive-ui": "2.45.3",
|
|
24
24
|
"@css-render/vue3-ssr": "0.15.14",
|
|
25
|
-
"@adapttable/i18n": "
|
|
25
|
+
"@adapttable/i18n": "4.0.0"
|
|
26
26
|
},
|
|
27
27
|
"engines": {
|
|
28
28
|
"node": ">=22.12.0"
|
|
@@ -40,7 +40,7 @@
|
|
|
40
40
|
"naive-ui"
|
|
41
41
|
],
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@adapttable/vue": "0.
|
|
43
|
+
"@adapttable/vue": "0.8.0"
|
|
44
44
|
},
|
|
45
45
|
"exports": {
|
|
46
46
|
".": {
|
|
@@ -233,6 +233,16 @@
|
|
|
233
233
|
"default": "./dist/filters.cjs"
|
|
234
234
|
}
|
|
235
235
|
},
|
|
236
|
+
"./filtering": {
|
|
237
|
+
"import": {
|
|
238
|
+
"types": "./dist/filtering.d.ts",
|
|
239
|
+
"default": "./dist/filtering.js"
|
|
240
|
+
},
|
|
241
|
+
"require": {
|
|
242
|
+
"types": "./dist/filtering.d.cts",
|
|
243
|
+
"default": "./dist/filtering.cjs"
|
|
244
|
+
}
|
|
245
|
+
},
|
|
236
246
|
"./header-filters": {
|
|
237
247
|
"import": {
|
|
238
248
|
"types": "./dist/header-filters.d.ts",
|
|
@@ -255,6 +265,16 @@
|
|
|
255
265
|
"default": "./dist/column-menu.cjs"
|
|
256
266
|
}
|
|
257
267
|
},
|
|
268
|
+
"./column-layout": {
|
|
269
|
+
"import": {
|
|
270
|
+
"types": "./dist/column-layout.d.ts",
|
|
271
|
+
"default": "./dist/column-layout.js"
|
|
272
|
+
},
|
|
273
|
+
"require": {
|
|
274
|
+
"types": "./dist/column-layout.d.cts",
|
|
275
|
+
"default": "./dist/column-layout.cjs"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
258
278
|
"./editing": {
|
|
259
279
|
"import": {
|
|
260
280
|
"types": "./dist/editing.d.ts",
|
|
@@ -315,16 +335,6 @@
|
|
|
315
335
|
"default": "./dist/export.cjs"
|
|
316
336
|
}
|
|
317
337
|
},
|
|
318
|
-
"./export-csv": {
|
|
319
|
-
"import": {
|
|
320
|
-
"types": "./dist/export-csv.d.ts",
|
|
321
|
-
"default": "./dist/export-csv.js"
|
|
322
|
-
},
|
|
323
|
-
"require": {
|
|
324
|
-
"types": "./dist/export-csv.d.cts",
|
|
325
|
-
"default": "./dist/export-csv.cjs"
|
|
326
|
-
}
|
|
327
|
-
},
|
|
328
338
|
"./export-pdf": {
|
|
329
339
|
"import": {
|
|
330
340
|
"types": "./dist/export-pdf.d.ts",
|
|
@@ -385,6 +395,16 @@
|
|
|
385
395
|
"default": "./dist/print.cjs"
|
|
386
396
|
}
|
|
387
397
|
},
|
|
398
|
+
"./selection": {
|
|
399
|
+
"import": {
|
|
400
|
+
"types": "./dist/selection.d.ts",
|
|
401
|
+
"default": "./dist/selection.js"
|
|
402
|
+
},
|
|
403
|
+
"require": {
|
|
404
|
+
"types": "./dist/selection.d.cts",
|
|
405
|
+
"default": "./dist/selection.cjs"
|
|
406
|
+
}
|
|
407
|
+
},
|
|
388
408
|
"./selection-stats": {
|
|
389
409
|
"import": {
|
|
390
410
|
"types": "./dist/selection-stats.d.ts",
|
|
@@ -504,16 +524,6 @@
|
|
|
504
524
|
"types": "./dist/columns.d.cts",
|
|
505
525
|
"default": "./dist/columns.cjs"
|
|
506
526
|
}
|
|
507
|
-
},
|
|
508
|
-
"./features": {
|
|
509
|
-
"import": {
|
|
510
|
-
"types": "./dist/features.d.ts",
|
|
511
|
-
"default": "./dist/features.js"
|
|
512
|
-
},
|
|
513
|
-
"require": {
|
|
514
|
-
"types": "./dist/features.d.cts",
|
|
515
|
-
"default": "./dist/features.cjs"
|
|
516
|
-
}
|
|
517
527
|
}
|
|
518
528
|
},
|
|
519
529
|
"repository": {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NaiveRowActions-BR140413.cjs","names":[],"sources":["../src/NaiveRowActions.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TRow\">\nimport type { Direction, RowActionControl } from \"@adapttable/vue\";\nimport {\n rowActionContent,\n type RowActionsLayout,\n scheduleTick,\n} from \"@adapttable/vue/adapter\";\nimport { NPopover } from \"naive-ui\";\nimport {\n computed,\n Fragment,\n h,\n type HTMLAttributes,\n mergeProps,\n shallowRef,\n} from \"vue\";\n\nimport { naiveButton } from \"./controls/button\";\n\ndefineOptions({ name: \"NaiveRowActions\" });\nconst props = defineProps<{\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: Direction;\n readonly classNames?: {\n readonly actionButton?: string;\n readonly rowAction?: string;\n readonly rowActionsMenu?: string;\n readonly rowActionsTrigger?: string;\n };\n}>();\nconst open = shallowRef(false);\nconst trigger = shallowRef<HTMLElement | null>(null);\nfunction dismiss(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || !open.value) return;\n event.preventDefault();\n event.stopPropagation();\n open.value = false;\n scheduleTick(() => trigger.value?.focus());\n}\n// Naive forwards these public Vue fallthrough attrs to its popover body.\nconst surfaceAttrs = computed<HTMLAttributes>(() => ({\n role: \"dialog\",\n \"aria-label\": props.label,\n dir: props.dir,\n \"data-adapttable-part\": \"row-actions-menu\",\n class: props.classNames?.rowActionsMenu,\n onKeydown: dismiss,\n onPointerdown: (event: PointerEvent) => event.stopPropagation(),\n}));\nconst Actions = () =>\n h(\n Fragment,\n null,\n props.controls.map((control) =>\n naiveButton(\n mergeProps(control.attrs, {\n key: control.key,\n class: [props.classNames?.actionButton, props.classNames?.rowAction],\n onClick: (event: MouseEvent) => {\n event.stopPropagation();\n open.value = false;\n },\n }),\n rowActionContent(control)\n )\n )\n );\nconst Trigger = () =>\n naiveButton(\n {\n ref: (element: HTMLElement | null) => {\n trigger.value = element;\n },\n \"data-adapttable-part\": \"row-actions-trigger\",\n \"aria-label\": props.label,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": open.value,\n class: props.classNames?.rowActionsTrigger,\n onClick: (event: MouseEvent) => event.stopPropagation(),\n onKeydown: dismiss,\n },\n \"⋮\"\n );\n</script>\n\n<template>\n <NPopover\n v-if=\"layout === 'menu' && controls.length\"\n v-bind=\"surfaceAttrs\"\n :show=\"open\"\n trigger=\"click\"\n :to=\"false\"\n :placement=\"dir === 'rtl' ? 'bottom-start' : 'bottom-end'\"\n :show-arrow=\"false\"\n @update:show=\"open = $event\"\n >\n <template #trigger><Trigger /></template>\n <Actions />\n </NPopover>\n <Actions v-else />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAoBA,MAAM,QAAQ;EAYd,MAAM,QAAA,GAAO,IAAA,WAAA,CAAW,KAAK;EAC7B,MAAM,WAAA,GAAU,IAAA,WAAA,CAA+B,IAAI;EACnD,SAAS,QAAQ,OAA4B;GAC3C,IAAI,MAAM,QAAQ,YAAY,CAAC,KAAK,OAAO;GAC3C,MAAM,eAAe;GACrB,MAAM,gBAAgB;GACtB,KAAK,QAAQ;GACb,CAAA,GAAA,wBAAA,aAAA,OAAmB,QAAQ,OAAO,MAAM,CAAC;EAC3C;EAEA,MAAM,gBAAA,GAAe,IAAA,SAAA,QAAgC;GACnD,MAAM;GACN,cAAc,MAAM;GACpB,KAAK,MAAM;GACX,wBAAwB;GACxB,OAA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EAAA,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"NaiveRowActions-DVyMXQJq.js","names":[],"sources":["../src/NaiveRowActions.vue"],"sourcesContent":["<script setup lang=\"ts\" generic=\"TRow\">\nimport type { Direction, RowActionControl } from \"@adapttable/vue\";\nimport {\n rowActionContent,\n type RowActionsLayout,\n scheduleTick,\n} from \"@adapttable/vue/adapter\";\nimport { NPopover } from \"naive-ui\";\nimport {\n computed,\n Fragment,\n h,\n type HTMLAttributes,\n mergeProps,\n shallowRef,\n} from \"vue\";\n\nimport { naiveButton } from \"./controls/button\";\n\ndefineOptions({ name: \"NaiveRowActions\" });\nconst props = defineProps<{\n readonly controls: readonly RowActionControl<TRow>[];\n readonly layout?: RowActionsLayout;\n readonly label: string;\n readonly dir?: Direction;\n readonly classNames?: {\n readonly actionButton?: string;\n readonly rowAction?: string;\n readonly rowActionsMenu?: string;\n readonly rowActionsTrigger?: string;\n };\n}>();\nconst open = shallowRef(false);\nconst trigger = shallowRef<HTMLElement | null>(null);\nfunction dismiss(event: KeyboardEvent): void {\n if (event.key !== \"Escape\" || !open.value) return;\n event.preventDefault();\n event.stopPropagation();\n open.value = false;\n scheduleTick(() => trigger.value?.focus());\n}\n// Naive forwards these public Vue fallthrough attrs to its popover body.\nconst surfaceAttrs = computed<HTMLAttributes>(() => ({\n role: \"dialog\",\n \"aria-label\": props.label,\n dir: props.dir,\n \"data-adapttable-part\": \"row-actions-menu\",\n class: props.classNames?.rowActionsMenu,\n onKeydown: dismiss,\n onPointerdown: (event: PointerEvent) => event.stopPropagation(),\n}));\nconst Actions = () =>\n h(\n Fragment,\n null,\n props.controls.map((control) =>\n naiveButton(\n mergeProps(control.attrs, {\n key: control.key,\n class: [props.classNames?.actionButton, props.classNames?.rowAction],\n onClick: (event: MouseEvent) => {\n event.stopPropagation();\n open.value = false;\n },\n }),\n rowActionContent(control)\n )\n )\n );\nconst Trigger = () =>\n naiveButton(\n {\n ref: (element: HTMLElement | null) => {\n trigger.value = element;\n },\n \"data-adapttable-part\": \"row-actions-trigger\",\n \"aria-label\": props.label,\n \"aria-haspopup\": \"dialog\",\n \"aria-expanded\": open.value,\n class: props.classNames?.rowActionsTrigger,\n onClick: (event: MouseEvent) => event.stopPropagation(),\n onKeydown: dismiss,\n },\n \"⋮\"\n );\n</script>\n\n<template>\n <NPopover\n v-if=\"layout === 'menu' && controls.length\"\n v-bind=\"surfaceAttrs\"\n :show=\"open\"\n trigger=\"click\"\n :to=\"false\"\n :placement=\"dir === 'rtl' ? 'bottom-start' : 'bottom-end'\"\n :show-arrow=\"false\"\n @update:show=\"open = $event\"\n >\n <template #trigger><Trigger /></template>\n <Actions />\n </NPopover>\n <Actions v-else />\n</template>\n"],"mappings":";;;;;;;;;;;;;;;;EAoBA,MAAM,QAAQ;EAYd,MAAM,OAAO,WAAW,KAAK;EAC7B,MAAM,UAAU,WAA+B,IAAI;EACnD,SAAS,QAAQ,OAA4B;GAC3C,IAAI,MAAM,QAAQ,YAAY,CAAC,KAAK,OAAO;GAC3C,MAAM,eAAe;GACrB,MAAM,gBAAgB;GACtB,KAAK,QAAQ;GACb,mBAAmB,QAAQ,OAAO,MAAM,CAAC;EAC3C;EAEA,MAAM,eAAe,gBAAgC;GACnD,MAAM;GACN,cAAc,MAAM;GACpB,KAAK,MAAM;GACX,wBAAwB;GACxB,OAAO,MAAM,YAAY;GACzB,WAAW;GACX,gBAAgB,UAAwB,MAAM,gBAAgB;EAChE,EAAE;EACF,MAAM,gBACJ,EACE,UACA,MACA,MAAM,SAAS,KAAK,YAClB,YACE,WAAW,QAAQ,OAAO;GACxB,KAAK,QAAQ;GACb,OAAO,CAAC,MAAM,YAAY,cAAc,MAAM,YAAY,SAAS;GACnE,UAAU,UAAsB;IAC9B,MAAM,gBAAgB;IACtB,KAAK,QAAQ;GACf;EACF,CAAC,GACD,iBAAiB,OAAO,CAC1B,CACF,CACF;EACF,MAAM,gBACJ,YACE;GACE,MAAM,YAAgC;IACpC,QAAQ,QAAQ;GAClB;GACA,wBAAwB;GACxB,cAAc,MAAM;GACpB,iBAAiB;GACjB,iBAAiB,KAAK;GACtB,OAAO,MAAM,YAAY;GACzB,UAAU,UAAsB,MAAM,gBAAgB;GACtD,WAAW;EACb,GACA,GACF;;GAKQ,OAAA,QAAA,WAAM,UAAe,QAAA,SAAS,UADtC,UAAA,GAAA,YAYW,MAAA,QAAA,GAZX,WAYW,EAAA,KAAA,EAAA,GAVD,aAAA,OAAY;IACnB,MAAM,KAAA;IACP,SAAQ;IACP,IAAI;IACJ,WAAW,QAAA,QAAG,QAAA,iBAAA;IACd,cAAY;IACZ,iBAAW,OAAA,OAAA,OAAA,MAAA,WAAE,KAAA,QAAO;;IAEV,SAAO,cAAY,CAAX,YAAW,OAAA,C,C;IAC9B,SAAA,cAAW,CAAX,YAAW,OAAA,C,C;;G,G,I,C,Q,W,C,MAEb,UAAA,GAAA,YAAkB,SAAA,EAAA,KAAA,EAAA,CAAA"}
|
|
@@ -1,380 +0,0 @@
|
|
|
1
|
-
const require_button = require("./button-CaakTzYM.cjs");
|
|
2
|
-
const require_input = require("./input-DZV2IoAG.cjs");
|
|
3
|
-
const require_select = require("./select-C8UKnsWO.cjs");
|
|
4
|
-
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
|
-
let vue = require("vue");
|
|
6
|
-
let naive_ui = require("naive-ui");
|
|
7
|
-
//#region src/assistant/ExamplesMenu.ts
|
|
8
|
-
/** One shortcut as a menu item: its icon, title and optional description. */
|
|
9
|
-
function shortcut(item, choose) {
|
|
10
|
-
return require_button.naiveButton({
|
|
11
|
-
key: item.id,
|
|
12
|
-
role: "menuitem",
|
|
13
|
-
tabindex: -1,
|
|
14
|
-
"data-adapttable-part": item.part,
|
|
15
|
-
class: "adapttable-naive-assistant-shortcut",
|
|
16
|
-
onClick: () => choose(item.id)
|
|
17
|
-
}, [item.icon, (0, vue.h)("span", [(0, vue.h)("strong", item.title), item.description ? (0, vue.h)("small", item.description) : null])], { text: true });
|
|
18
|
-
}
|
|
19
|
-
/** The open menu: a Naive UI card holding one menu item per shortcut. */
|
|
20
|
-
function menuCard(props, card, keydown, choose) {
|
|
21
|
-
const items = props.items.map((item) => shortcut(item, choose));
|
|
22
|
-
return (0, vue.h)(naive_ui.NCard, {
|
|
23
|
-
ref: card,
|
|
24
|
-
size: "small",
|
|
25
|
-
role: "menu",
|
|
26
|
-
"aria-label": props.label,
|
|
27
|
-
class: "adapttable-naive-assistant-menu",
|
|
28
|
-
contentStyle: {
|
|
29
|
-
display: "flex",
|
|
30
|
-
flexDirection: "column",
|
|
31
|
-
gap: "4px"
|
|
32
|
-
},
|
|
33
|
-
style: {
|
|
34
|
-
maxHeight: props.maxHeight,
|
|
35
|
-
overflowY: "auto"
|
|
36
|
-
},
|
|
37
|
-
onKeydown: keydown
|
|
38
|
-
}, { default: () => items });
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* The assistant's shortcuts in a Naive UI popover menu under its trigger.
|
|
42
|
-
* The shared menu navigation moves focus; Escape and Tab close the menu and
|
|
43
|
-
* Escape returns focus to the trigger.
|
|
44
|
-
*/
|
|
45
|
-
const NaiveExamplesMenu = (0, vue.defineComponent)((props) => {
|
|
46
|
-
const active = (0, _adapttable_vue_adapter.useScopeActivity)();
|
|
47
|
-
const open = (0, vue.shallowRef)(false);
|
|
48
|
-
const trigger = (0, vue.shallowRef)(null);
|
|
49
|
-
const card = (0, vue.shallowRef)(null);
|
|
50
|
-
const navigation = (0, _adapttable_vue_adapter.createMenuNavigation)();
|
|
51
|
-
let generation = 0;
|
|
52
|
-
(0, vue.watch)([
|
|
53
|
-
active,
|
|
54
|
-
() => props.disabled,
|
|
55
|
-
() => props.items,
|
|
56
|
-
() => props.onSelect
|
|
57
|
-
], () => {
|
|
58
|
-
generation++;
|
|
59
|
-
open.value = false;
|
|
60
|
-
}, { flush: "sync" });
|
|
61
|
-
(0, vue.watch)(open, (expanded) => {
|
|
62
|
-
navigation.reset();
|
|
63
|
-
if (!expanded) return;
|
|
64
|
-
(0, _adapttable_vue_adapter.scheduleTick)(() => {
|
|
65
|
-
(card.value ? require_button.htmlRoot(card.value) : null)?.querySelector("[role=\"menuitem\"]")?.focus({ preventScroll: true });
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
const close = (restore) => {
|
|
69
|
-
open.value = false;
|
|
70
|
-
if (restore) trigger.value?.focus({ preventScroll: true });
|
|
71
|
-
};
|
|
72
|
-
const keydown = (event) => {
|
|
73
|
-
const panel = event.currentTarget;
|
|
74
|
-
if (!(panel instanceof HTMLElement)) return;
|
|
75
|
-
const items = [...panel.querySelectorAll("[role=\"menuitem\"]")];
|
|
76
|
-
const focusTargets = items;
|
|
77
|
-
const action = navigation.key(event, items.map((item) => ({
|
|
78
|
-
label: item.textContent ?? "",
|
|
79
|
-
disabled: item.disabled
|
|
80
|
-
})), focusTargets.indexOf(panel.ownerDocument.activeElement));
|
|
81
|
-
if (!action) return;
|
|
82
|
-
if (action.kind !== "close" || action.key !== "Tab") event.preventDefault();
|
|
83
|
-
event.stopPropagation();
|
|
84
|
-
if (action.kind === "close") close(action.key === "Escape");
|
|
85
|
-
else items[action.index]?.focus({ preventScroll: true });
|
|
86
|
-
};
|
|
87
|
-
return () => {
|
|
88
|
-
if (!active.value) return null;
|
|
89
|
-
const ticket = generation;
|
|
90
|
-
const choose = (id) => {
|
|
91
|
-
if (!active.value || props.disabled || ticket !== generation || !props.items.some((item) => item.id === id)) return;
|
|
92
|
-
close(false);
|
|
93
|
-
props.onSelect(id);
|
|
94
|
-
};
|
|
95
|
-
return (0, vue.h)(naive_ui.NPopover, {
|
|
96
|
-
trigger: "manual",
|
|
97
|
-
show: open.value,
|
|
98
|
-
placement: "bottom-start",
|
|
99
|
-
showArrow: false,
|
|
100
|
-
raw: true,
|
|
101
|
-
onClickoutside: (event) => {
|
|
102
|
-
if (event.target instanceof Node && trigger.value?.contains(event.target)) return;
|
|
103
|
-
close(false);
|
|
104
|
-
}
|
|
105
|
-
}, {
|
|
106
|
-
trigger: () => require_button.naiveButton({
|
|
107
|
-
ref: (element) => {
|
|
108
|
-
trigger.value = element;
|
|
109
|
-
},
|
|
110
|
-
disabled: props.disabled,
|
|
111
|
-
"aria-label": props.label,
|
|
112
|
-
"aria-haspopup": "menu",
|
|
113
|
-
"aria-expanded": open.value,
|
|
114
|
-
title: props.label,
|
|
115
|
-
class: props.className,
|
|
116
|
-
"data-adapttable-part": props.part,
|
|
117
|
-
onClick: () => {
|
|
118
|
-
if (active.value && !props.disabled) open.value = !open.value;
|
|
119
|
-
}
|
|
120
|
-
}, [props.icon ?? props.label]),
|
|
121
|
-
default: () => menuCard(props, card, keydown, choose)
|
|
122
|
-
});
|
|
123
|
-
};
|
|
124
|
-
}, {
|
|
125
|
-
name: "NaiveExamplesMenu",
|
|
126
|
-
props: {
|
|
127
|
-
label: { type: String },
|
|
128
|
-
part: { type: String },
|
|
129
|
-
className: { type: String },
|
|
130
|
-
icon: {
|
|
131
|
-
type: [
|
|
132
|
-
String,
|
|
133
|
-
Number,
|
|
134
|
-
Boolean,
|
|
135
|
-
Array,
|
|
136
|
-
Object
|
|
137
|
-
],
|
|
138
|
-
default: void 0
|
|
139
|
-
},
|
|
140
|
-
disabled: {
|
|
141
|
-
type: Boolean,
|
|
142
|
-
default: void 0
|
|
143
|
-
},
|
|
144
|
-
items: { type: Array },
|
|
145
|
-
onSelect: { type: Function },
|
|
146
|
-
maxHeight: { type: String }
|
|
147
|
-
}
|
|
148
|
-
});
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region src/assistant/Sheet.ts
|
|
151
|
-
/**
|
|
152
|
-
* Chrome chooses initial and return focus; NDrawer contains focus and owns
|
|
153
|
-
* the portal. Escape and mask dismissal become one close request to the
|
|
154
|
-
* host, and the drawer stays open until the host closes it.
|
|
155
|
-
*/
|
|
156
|
-
const NaiveAssistantSheet = (0, vue.defineComponent)((props) => {
|
|
157
|
-
const active = (0, _adapttable_vue_adapter.useScopeActivity)();
|
|
158
|
-
const requestClose = () => {
|
|
159
|
-
if (active.value && props.open) props.onClose();
|
|
160
|
-
};
|
|
161
|
-
const keydown = (event) => {
|
|
162
|
-
if (event.key !== "Escape" || event.defaultPrevented || event.isComposing) return;
|
|
163
|
-
event.preventDefault();
|
|
164
|
-
event.stopPropagation();
|
|
165
|
-
requestClose();
|
|
166
|
-
};
|
|
167
|
-
return () => {
|
|
168
|
-
if (!active.value) return null;
|
|
169
|
-
return (0, vue.h)(naive_ui.NDrawer, {
|
|
170
|
-
show: props.open,
|
|
171
|
-
placement: props.dir === "rtl" ? "left" : "right",
|
|
172
|
-
width: "min(28rem, 100vw)",
|
|
173
|
-
autoFocus: false,
|
|
174
|
-
closeOnEsc: false,
|
|
175
|
-
maskClosable: false,
|
|
176
|
-
role: "dialog",
|
|
177
|
-
"aria-modal": "true",
|
|
178
|
-
"aria-label": props.label,
|
|
179
|
-
dir: props.dir,
|
|
180
|
-
class: ["adapttable-naive-assistant-sheet", props.className],
|
|
181
|
-
"data-adapttable-part": props.part,
|
|
182
|
-
onKeydown: keydown,
|
|
183
|
-
onMaskClick: requestClose
|
|
184
|
-
}, { default: () => (0, vue.h)(naive_ui.NDrawerContent, {}, { default: () => props.children }) });
|
|
185
|
-
};
|
|
186
|
-
}, {
|
|
187
|
-
name: "NaiveAssistantSheet",
|
|
188
|
-
props: {
|
|
189
|
-
label: { type: String },
|
|
190
|
-
part: { type: String },
|
|
191
|
-
className: { type: String },
|
|
192
|
-
dir: { type: String },
|
|
193
|
-
open: {
|
|
194
|
-
type: Boolean,
|
|
195
|
-
default: void 0
|
|
196
|
-
},
|
|
197
|
-
onClose: { type: Function },
|
|
198
|
-
children: {
|
|
199
|
-
type: [
|
|
200
|
-
String,
|
|
201
|
-
Number,
|
|
202
|
-
Boolean,
|
|
203
|
-
Array,
|
|
204
|
-
Object
|
|
205
|
-
],
|
|
206
|
-
default: void 0
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
//#endregion
|
|
211
|
-
//#region src/assistant/controls.ts
|
|
212
|
-
/** Naive UI tag types for the assistant's status tones. */
|
|
213
|
-
const TAG_TYPE = {
|
|
214
|
-
neutral: "default",
|
|
215
|
-
busy: "info",
|
|
216
|
-
warning: "warning",
|
|
217
|
-
danger: "error"
|
|
218
|
-
};
|
|
219
|
-
const surface = (props, classes) => (0, vue.h)(naive_ui.NCard, {
|
|
220
|
-
size: "small",
|
|
221
|
-
role: "region",
|
|
222
|
-
"data-adapttable-part": props.part,
|
|
223
|
-
"aria-label": props.label,
|
|
224
|
-
class: classes,
|
|
225
|
-
style: props.style,
|
|
226
|
-
contentStyle: {
|
|
227
|
-
display: "flex",
|
|
228
|
-
flexDirection: "column",
|
|
229
|
-
minHeight: 0
|
|
230
|
-
}
|
|
231
|
-
}, { default: () => props.children });
|
|
232
|
-
const naiveAssistantControls = {
|
|
233
|
-
Button: (props) => require_button.naiveButton({
|
|
234
|
-
"data-adapttable-part": props.part,
|
|
235
|
-
"aria-label": props.label,
|
|
236
|
-
"aria-expanded": props.expanded,
|
|
237
|
-
title: props.tooltip,
|
|
238
|
-
class: props.className,
|
|
239
|
-
disabled: props.disabled,
|
|
240
|
-
onClick: props.onClick
|
|
241
|
-
}, [props.icon, props.iconOnly && props.icon ? null : props.children ?? props.label], { size: props.part === "assistant-launcher" ? "medium" : "small" }),
|
|
242
|
-
Composer: (props) => require_input.naiveInput({
|
|
243
|
-
type: "textarea",
|
|
244
|
-
value: props.value,
|
|
245
|
-
themeOverrides: { placeholderColor: "var(--n-text-color)" },
|
|
246
|
-
attrs: {
|
|
247
|
-
"data-adapttable-part": props.part,
|
|
248
|
-
"aria-label": props.label,
|
|
249
|
-
placeholder: props.placeholder,
|
|
250
|
-
class: props.className,
|
|
251
|
-
disabled: props.disabled,
|
|
252
|
-
rows: 1,
|
|
253
|
-
onKeydown: props.onKeyDown
|
|
254
|
-
},
|
|
255
|
-
onChange: props.onChange
|
|
256
|
-
}),
|
|
257
|
-
Badge: (props) => (0, vue.h)(naive_ui.NTag, {
|
|
258
|
-
"data-adapttable-part": props.part,
|
|
259
|
-
"data-tone": props.tone,
|
|
260
|
-
type: TAG_TYPE[props.tone],
|
|
261
|
-
style: props.tone === "warning" ? { color: "inherit" } : void 0,
|
|
262
|
-
size: "small",
|
|
263
|
-
bordered: false,
|
|
264
|
-
class: props.className
|
|
265
|
-
}, { default: () => props.label }),
|
|
266
|
-
Panel: (props) => surface(props, ["adapttable-naive-assistant-panel", props.className]),
|
|
267
|
-
Window: (props) => surface(props, ["adapttable-naive-assistant-window", props.className]),
|
|
268
|
-
Sheet: (props) => (0, vue.h)(NaiveAssistantSheet, {
|
|
269
|
-
...props,
|
|
270
|
-
key: props.part
|
|
271
|
-
}),
|
|
272
|
-
Menu: (props) => (0, vue.h)(NaiveExamplesMenu, props),
|
|
273
|
-
LanguageChip: (props) => require_select.naiveSelect({
|
|
274
|
-
attrs: {
|
|
275
|
-
"data-adapttable-part": props.part,
|
|
276
|
-
"aria-label": props.label,
|
|
277
|
-
class: props.className,
|
|
278
|
-
disabled: props.disabled
|
|
279
|
-
},
|
|
280
|
-
value: props.value,
|
|
281
|
-
options: props.options,
|
|
282
|
-
onChange: props.onChange
|
|
283
|
-
})
|
|
284
|
-
};
|
|
285
|
-
const naiveApprovalControls = {
|
|
286
|
-
Approve: naiveAssistantControls.Button,
|
|
287
|
-
Reject: naiveAssistantControls.Button,
|
|
288
|
-
Action: naiveAssistantControls.Button,
|
|
289
|
-
List: (props) => (0, vue.h)("ul", {
|
|
290
|
-
"data-adapttable-part": props.part,
|
|
291
|
-
"aria-label": props.label,
|
|
292
|
-
class: ["adapttable-naive-approval-list", props.className]
|
|
293
|
-
}, [props.children])
|
|
294
|
-
};
|
|
295
|
-
//#endregion
|
|
296
|
-
//#region src/assistant.ts
|
|
297
|
-
const TableAssistant = (0, vue.defineComponent)((props) => {
|
|
298
|
-
const theme = (0, naive_ui.useThemeVars)();
|
|
299
|
-
return () => (0, vue.h)(_adapttable_vue_adapter.TableAssistantChrome, {
|
|
300
|
-
...props,
|
|
301
|
-
accent: props.accent ?? theme.value.primaryColor,
|
|
302
|
-
slots: naiveAssistantControls
|
|
303
|
-
});
|
|
304
|
-
}, {
|
|
305
|
-
name: "NaiveTableAssistant",
|
|
306
|
-
props: {
|
|
307
|
-
assistant: { type: Object },
|
|
308
|
-
speech: { type: Object },
|
|
309
|
-
open: {
|
|
310
|
-
type: Boolean,
|
|
311
|
-
default: void 0
|
|
312
|
-
},
|
|
313
|
-
onOpenChange: { type: Function },
|
|
314
|
-
presentation: { type: String },
|
|
315
|
-
labels: { type: Object },
|
|
316
|
-
accent: { type: String },
|
|
317
|
-
receipts: {
|
|
318
|
-
type: Boolean,
|
|
319
|
-
default: void 0
|
|
320
|
-
},
|
|
321
|
-
className: { type: String },
|
|
322
|
-
launcher: {
|
|
323
|
-
type: Boolean,
|
|
324
|
-
default: void 0
|
|
325
|
-
},
|
|
326
|
-
onSettings: { type: Function },
|
|
327
|
-
boundary: { type: [String, Object] },
|
|
328
|
-
note: { type: String },
|
|
329
|
-
greeting: { type: String },
|
|
330
|
-
avatars: { type: Object },
|
|
331
|
-
messageAction: { type: Function },
|
|
332
|
-
approval: { type: Object },
|
|
333
|
-
dir: { type: String }
|
|
334
|
-
}
|
|
335
|
-
});
|
|
336
|
-
const AgentApproval = (0, vue.defineComponent)((props) => () => (0, vue.h)(_adapttable_vue_adapter.AgentApprovalChrome, {
|
|
337
|
-
...props,
|
|
338
|
-
slots: naiveApprovalControls
|
|
339
|
-
}), {
|
|
340
|
-
name: "NaiveAgentApproval",
|
|
341
|
-
props: {
|
|
342
|
-
pending: { type: Object },
|
|
343
|
-
labels: { type: Object },
|
|
344
|
-
className: { type: String },
|
|
345
|
-
buttonClassName: { type: String }
|
|
346
|
-
}
|
|
347
|
-
});
|
|
348
|
-
function tableAssistant() {
|
|
349
|
-
return (0, _adapttable_vue_adapter.createAdapterTableAssistantFeature)((props) => (0, vue.h)(TableAssistant, props));
|
|
350
|
-
}
|
|
351
|
-
function agentApproval() {
|
|
352
|
-
return (0, _adapttable_vue_adapter.createAdapterAgentApprovalFeature)((props) => (0, vue.h)(AgentApproval, props));
|
|
353
|
-
}
|
|
354
|
-
//#endregion
|
|
355
|
-
Object.defineProperty(exports, "AgentApproval", {
|
|
356
|
-
enumerable: true,
|
|
357
|
-
get: function() {
|
|
358
|
-
return AgentApproval;
|
|
359
|
-
}
|
|
360
|
-
});
|
|
361
|
-
Object.defineProperty(exports, "TableAssistant", {
|
|
362
|
-
enumerable: true,
|
|
363
|
-
get: function() {
|
|
364
|
-
return TableAssistant;
|
|
365
|
-
}
|
|
366
|
-
});
|
|
367
|
-
Object.defineProperty(exports, "agentApproval", {
|
|
368
|
-
enumerable: true,
|
|
369
|
-
get: function() {
|
|
370
|
-
return agentApproval;
|
|
371
|
-
}
|
|
372
|
-
});
|
|
373
|
-
Object.defineProperty(exports, "tableAssistant", {
|
|
374
|
-
enumerable: true,
|
|
375
|
-
get: function() {
|
|
376
|
-
return tableAssistant;
|
|
377
|
-
}
|
|
378
|
-
});
|
|
379
|
-
|
|
380
|
-
//# sourceMappingURL=assistant-DppW6EN1.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"assistant-DppW6EN1.cjs","names":["naiveButton","h","NCard","defineComponent","useScopeActivity","shallowRef","createMenuNavigation","htmlRoot","NPopover","defineComponent","useScopeActivity","h","NDrawer","NDrawerContent","h","NCard","naiveButton","naiveInput","NTag","naiveSelect","defineComponent","useThemeVars","h","TableAssistantChrome","AgentApprovalChrome","createAdapterTableAssistantFeature","createAdapterAgentApprovalFeature"],"sources":["../src/assistant/ExamplesMenu.ts","../src/assistant/Sheet.ts","../src/assistant/controls.ts","../src/assistant.ts"],"sourcesContent":["import {\n createMenuNavigation,\n scheduleTick,\n type TableAssistantMenuProps,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { NCard, NPopover } from \"naive-ui\";\nimport {\n type ComponentPublicInstance,\n defineComponent,\n h,\n type PropType,\n type ShallowRef,\n shallowRef,\n watch,\n} from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { htmlRoot } from \"../controls/elementTarget\";\n\n/** One shortcut as a menu item: its icon, title and optional description. */\nfunction shortcut(\n item: TableAssistantMenuProps[\"items\"][number],\n choose: (id: string) => void\n) {\n return naiveButton(\n {\n key: item.id,\n role: \"menuitem\",\n tabindex: -1,\n \"data-adapttable-part\": item.part,\n class: \"adapttable-naive-assistant-shortcut\",\n onClick: () => choose(item.id),\n },\n [\n item.icon,\n h(\"span\", [\n h(\"strong\", item.title),\n item.description ? h(\"small\", item.description) : null,\n ]),\n ],\n { text: true }\n );\n}\n\n/** The open menu: a Naive UI card holding one menu item per shortcut. */\nfunction menuCard(\n props: TableAssistantMenuProps,\n card: ShallowRef<ComponentPublicInstance | null>,\n keydown: (event: KeyboardEvent) => void,\n choose: (id: string) => void\n) {\n const items = props.items.map((item) => shortcut(item, choose));\n return h(\n NCard,\n {\n ref: card,\n size: \"small\",\n role: \"menu\",\n \"aria-label\": props.label,\n class: \"adapttable-naive-assistant-menu\",\n contentStyle: { display: \"flex\", flexDirection: \"column\", gap: \"4px\" },\n style: { maxHeight: props.maxHeight, overflowY: \"auto\" },\n onKeydown: keydown,\n },\n { default: () => items }\n );\n}\n\n/**\n * The assistant's shortcuts in a Naive UI popover menu under its trigger.\n * The shared menu navigation moves focus; Escape and Tab close the menu and\n * Escape returns focus to the trigger.\n */\nexport const NaiveExamplesMenu = defineComponent(\n (props: TableAssistantMenuProps) => {\n const active = useScopeActivity();\n const open = shallowRef(false);\n const trigger = shallowRef<HTMLElement | null>(null);\n const card = shallowRef<ComponentPublicInstance | null>(null);\n const navigation = createMenuNavigation();\n let generation = 0;\n watch(\n [active, () => props.disabled, () => props.items, () => props.onSelect],\n () => {\n generation++;\n open.value = false;\n },\n { flush: \"sync\" }\n );\n watch(open, (expanded) => {\n navigation.reset();\n if (!expanded) return;\n scheduleTick(() => {\n const panel = card.value ? htmlRoot(card.value) : null;\n panel\n ?.querySelector<HTMLElement>('[role=\"menuitem\"]')\n ?.focus({ preventScroll: true });\n });\n });\n const close = (restore: boolean) => {\n open.value = false;\n if (restore) trigger.value?.focus({ preventScroll: true });\n };\n const keydown = (event: KeyboardEvent) => {\n const panel = event.currentTarget;\n if (!(panel instanceof HTMLElement)) return;\n const items = [\n ...panel.querySelectorAll<HTMLButtonElement>('[role=\"menuitem\"]'),\n ];\n const focusTargets: readonly (EventTarget | null | undefined)[] = items;\n const action = navigation.key(\n event,\n items.map((item) => ({\n label: item.textContent ?? \"\",\n disabled: item.disabled,\n })),\n focusTargets.indexOf(panel.ownerDocument.activeElement)\n );\n if (!action) return;\n if (action.kind !== \"close\" || action.key !== \"Tab\")\n event.preventDefault();\n event.stopPropagation();\n if (action.kind === \"close\") close(action.key === \"Escape\");\n else items[action.index]?.focus({ preventScroll: true });\n };\n return () => {\n if (!active.value) return null;\n const ticket = generation;\n const choose = (id: string) => {\n if (\n !active.value ||\n props.disabled ||\n ticket !== generation ||\n !props.items.some((item) => item.id === id)\n )\n return;\n close(false);\n props.onSelect(id);\n };\n return h(\n NPopover,\n {\n trigger: \"manual\",\n show: open.value,\n placement: \"bottom-start\",\n showArrow: false,\n raw: true,\n onClickoutside: (event: MouseEvent) => {\n if (\n event.target instanceof Node &&\n trigger.value?.contains(event.target)\n )\n return;\n close(false);\n },\n },\n {\n trigger: () =>\n naiveButton(\n {\n ref: (element: HTMLElement | null) => {\n trigger.value = element;\n },\n disabled: props.disabled,\n \"aria-label\": props.label,\n \"aria-haspopup\": \"menu\",\n \"aria-expanded\": open.value,\n title: props.label,\n class: props.className,\n \"data-adapttable-part\": props.part,\n onClick: () => {\n if (active.value && !props.disabled) open.value = !open.value;\n },\n },\n [props.icon ?? props.label]\n ),\n default: () => menuCard(props, card, keydown, choose),\n }\n );\n };\n },\n {\n name: \"NaiveExamplesMenu\",\n props: {\n label: { type: String as PropType<TableAssistantMenuProps[\"label\"]> },\n part: { type: String as PropType<TableAssistantMenuProps[\"part\"]> },\n className: {\n type: String as PropType<TableAssistantMenuProps[\"className\"]>,\n },\n icon: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n TableAssistantMenuProps[\"icon\"]\n >,\n default: undefined,\n },\n disabled: {\n type: Boolean as PropType<TableAssistantMenuProps[\"disabled\"]>,\n default: undefined,\n },\n items: { type: Array as PropType<TableAssistantMenuProps[\"items\"]> },\n onSelect: {\n type: Function as PropType<TableAssistantMenuProps[\"onSelect\"]>,\n },\n maxHeight: {\n type: String as PropType<TableAssistantMenuProps[\"maxHeight\"]>,\n },\n },\n }\n);\n","import {\n type TableAssistantSheetProps,\n useScopeActivity,\n} from \"@adapttable/vue/adapter\";\nimport { NDrawer, NDrawerContent } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\n/**\n * Chrome chooses initial and return focus; NDrawer contains focus and owns\n * the portal. Escape and mask dismissal become one close request to the\n * host, and the drawer stays open until the host closes it.\n */\nexport const NaiveAssistantSheet = defineComponent(\n (props: TableAssistantSheetProps) => {\n const active = useScopeActivity();\n const requestClose = () => {\n if (active.value && props.open) props.onClose();\n };\n const keydown = (event: KeyboardEvent) => {\n if (event.key !== \"Escape\" || event.defaultPrevented || event.isComposing)\n return;\n event.preventDefault();\n event.stopPropagation();\n requestClose();\n };\n return () => {\n if (!active.value) return null;\n return h(\n NDrawer,\n {\n show: props.open,\n placement: props.dir === \"rtl\" ? \"left\" : \"right\",\n width: \"min(28rem, 100vw)\",\n autoFocus: false,\n closeOnEsc: false,\n maskClosable: false,\n role: \"dialog\",\n \"aria-modal\": \"true\",\n \"aria-label\": props.label,\n dir: props.dir,\n class: [\"adapttable-naive-assistant-sheet\", props.className],\n \"data-adapttable-part\": props.part,\n onKeydown: keydown,\n onMaskClick: requestClose,\n },\n {\n default: () =>\n h(NDrawerContent, {}, { default: () => props.children }),\n }\n );\n };\n },\n {\n name: \"NaiveAssistantSheet\",\n props: {\n label: { type: String as PropType<TableAssistantSheetProps[\"label\"]> },\n part: { type: String as PropType<TableAssistantSheetProps[\"part\"]> },\n className: {\n type: String as PropType<TableAssistantSheetProps[\"className\"]>,\n },\n dir: { type: String as PropType<TableAssistantSheetProps[\"dir\"]> },\n open: {\n type: Boolean as PropType<TableAssistantSheetProps[\"open\"]>,\n default: undefined,\n },\n onClose: {\n type: Function as PropType<TableAssistantSheetProps[\"onClose\"]>,\n },\n children: {\n type: [String, Number, Boolean, Array, Object] as PropType<\n TableAssistantSheetProps[\"children\"]\n >,\n default: undefined,\n },\n },\n }\n);\n","import type {\n ApprovalReviewSlots,\n TableAssistantSlots,\n} from \"@adapttable/vue/adapter\";\nimport { NCard, NTag } from \"naive-ui\";\nimport { h, type StyleValue, type VNodeChild } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\nimport { naiveInput } from \"../controls/input\";\nimport { naiveSelect } from \"../controls/select\";\nimport { NaiveExamplesMenu } from \"./ExamplesMenu\";\nimport { NaiveAssistantSheet } from \"./Sheet\";\n\n/** Naive UI tag types for the assistant's status tones. */\nconst TAG_TYPE = {\n neutral: \"default\",\n busy: \"info\",\n warning: \"warning\",\n danger: \"error\",\n} as const;\n\nconst surface = (\n props: {\n readonly part: string;\n readonly label: string;\n readonly children: VNodeChild;\n readonly style?: StyleValue;\n },\n classes: readonly (string | undefined)[]\n) =>\n h(\n NCard,\n {\n size: \"small\",\n role: \"region\",\n \"data-adapttable-part\": props.part,\n \"aria-label\": props.label,\n class: classes,\n style: props.style,\n contentStyle: { display: \"flex\", flexDirection: \"column\", minHeight: 0 },\n },\n { default: () => props.children }\n );\n\nexport const naiveAssistantControls: TableAssistantSlots = {\n Button: (props) =>\n naiveButton(\n {\n \"data-adapttable-part\": props.part,\n \"aria-label\": props.label,\n \"aria-expanded\": props.expanded,\n title: props.tooltip,\n class: props.className,\n disabled: props.disabled,\n onClick: props.onClick,\n },\n [\n props.icon,\n props.iconOnly && props.icon ? null : (props.children ?? props.label),\n ],\n { size: props.part === \"assistant-launcher\" ? \"medium\" : \"small\" }\n ),\n Composer: (props) =>\n naiveInput({\n type: \"textarea\",\n value: props.value,\n themeOverrides: { placeholderColor: \"var(--n-text-color)\" },\n attrs: {\n \"data-adapttable-part\": props.part,\n \"aria-label\": props.label,\n placeholder: props.placeholder,\n class: props.className,\n disabled: props.disabled,\n rows: 1,\n onKeydown: props.onKeyDown,\n },\n onChange: props.onChange,\n }),\n Badge: (props) =>\n h(\n NTag,\n {\n \"data-adapttable-part\": props.part,\n \"data-tone\": props.tone,\n type: TAG_TYPE[props.tone],\n style: props.tone === \"warning\" ? { color: \"inherit\" } : undefined,\n size: \"small\",\n bordered: false,\n class: props.className,\n },\n { default: () => props.label }\n ),\n Panel: (props) =>\n surface(props, [\"adapttable-naive-assistant-panel\", props.className]),\n Window: (props) =>\n surface(props, [\"adapttable-naive-assistant-window\", props.className]),\n Sheet: (props) => h(NaiveAssistantSheet, { ...props, key: props.part }),\n Menu: (props) => h(NaiveExamplesMenu, props),\n LanguageChip: (props) =>\n naiveSelect({\n attrs: {\n \"data-adapttable-part\": props.part,\n \"aria-label\": props.label,\n class: props.className,\n disabled: props.disabled,\n },\n value: props.value,\n options: props.options,\n onChange: props.onChange,\n }),\n};\n\nexport const naiveApprovalControls: ApprovalReviewSlots = {\n Approve: naiveAssistantControls.Button,\n Reject: naiveAssistantControls.Button,\n Action: naiveAssistantControls.Button,\n List: (props) =>\n h(\n \"ul\",\n {\n \"data-adapttable-part\": props.part,\n \"aria-label\": props.label,\n class: [\"adapttable-naive-approval-list\", props.className],\n },\n [props.children]\n ),\n};\n","/** Optional assistant presentation; all conversation and approval state stays in the binding. */\nimport \"./assistant/assistant.css\";\n\nimport type { StaticTableFeature } from \"@adapttable/vue\";\nimport {\n AgentApprovalChrome,\n type AgentApprovalProps,\n createAdapterAgentApprovalFeature,\n createAdapterTableAssistantFeature,\n TableAssistantChrome,\n type TableAssistantProps,\n} from \"@adapttable/vue/adapter\";\nimport { useThemeVars } from \"naive-ui\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport {\n naiveApprovalControls,\n naiveAssistantControls,\n} from \"./assistant/controls\";\n\nexport const TableAssistant = defineComponent(\n (props: TableAssistantProps) => {\n const theme = useThemeVars();\n return () =>\n h(TableAssistantChrome, {\n ...props,\n accent: props.accent ?? theme.value.primaryColor,\n slots: naiveAssistantControls,\n });\n },\n {\n name: \"NaiveTableAssistant\",\n props: {\n assistant: { type: Object as PropType<TableAssistantProps[\"assistant\"]> },\n speech: { type: Object as PropType<TableAssistantProps[\"speech\"]> },\n open: {\n type: Boolean as PropType<TableAssistantProps[\"open\"]>,\n default: undefined,\n },\n onOpenChange: {\n type: Function as PropType<TableAssistantProps[\"onOpenChange\"]>,\n },\n presentation: {\n type: String as PropType<TableAssistantProps[\"presentation\"]>,\n },\n labels: { type: Object as PropType<TableAssistantProps[\"labels\"]> },\n accent: { type: String as PropType<TableAssistantProps[\"accent\"]> },\n receipts: {\n type: Boolean as PropType<TableAssistantProps[\"receipts\"]>,\n default: undefined,\n },\n className: { type: String as PropType<TableAssistantProps[\"className\"]> },\n launcher: {\n type: Boolean as PropType<TableAssistantProps[\"launcher\"]>,\n default: undefined,\n },\n onSettings: {\n type: Function as PropType<TableAssistantProps[\"onSettings\"]>,\n },\n boundary: {\n type: [String, Object] as PropType<TableAssistantProps[\"boundary\"]>,\n },\n note: { type: String as PropType<TableAssistantProps[\"note\"]> },\n greeting: { type: String as PropType<TableAssistantProps[\"greeting\"]> },\n avatars: { type: Object as PropType<TableAssistantProps[\"avatars\"]> },\n messageAction: {\n type: Function as PropType<TableAssistantProps[\"messageAction\"]>,\n },\n approval: { type: Object as PropType<TableAssistantProps[\"approval\"]> },\n dir: { type: String as PropType<TableAssistantProps[\"dir\"]> },\n },\n }\n);\nexport const AgentApproval = defineComponent(\n (props: AgentApprovalProps) => () =>\n h(AgentApprovalChrome, { ...props, slots: naiveApprovalControls }),\n {\n name: \"NaiveAgentApproval\",\n props: {\n pending: { type: Object as PropType<AgentApprovalProps[\"pending\"]> },\n labels: { type: Object as PropType<AgentApprovalProps[\"labels\"]> },\n className: { type: String as PropType<AgentApprovalProps[\"className\"]> },\n buttonClassName: {\n type: String as PropType<AgentApprovalProps[\"buttonClassName\"]>,\n },\n },\n }\n);\nexport function tableAssistant(): StaticTableFeature {\n return createAdapterTableAssistantFeature((props) =>\n h(TableAssistant, props)\n );\n}\nexport function agentApproval(): StaticTableFeature {\n return createAdapterAgentApprovalFeature((props) => h(AgentApproval, props));\n}\nexport type {\n AgentApprovalProps,\n TableAssistantProps,\n} from \"@adapttable/vue/adapter\";\n"],"mappings":";;;;;;;;AAqBA,SAAS,SACP,MACA,QACA;CACA,OAAOA,eAAAA,YACL;EACE,KAAK,KAAK;EACV,MAAM;EACN,UAAU;EACV,wBAAwB,KAAK;EAC7B,OAAO;EACP,eAAe,OAAO,KAAK,EAAE;CAC/B,GACA,CACE,KAAK,OAAA,GACLC,IAAAA,EAAAA,CAAE,QAAQ,EAAA,GACRA,IAAAA,EAAAA,CAAE,UAAU,KAAK,KAAK,GACtB,KAAK,eAAA,GAAcA,IAAAA,EAAAA,CAAE,SAAS,KAAK,WAAW,IAAI,IACpD,CAAC,CACH,GACA,EAAE,MAAM,KAAK,CACf;AACF;;AAGA,SAAS,SACP,OACA,MACA,SACA,QACA;CACA,MAAM,QAAQ,MAAM,MAAM,KAAK,SAAS,SAAS,MAAM,MAAM,CAAC;CAC9D,QAAA,GAAOA,IAAAA,EAAAA,CACLC,SAAAA,OACA;EACE,KAAK;EACL,MAAM;EACN,MAAM;EACN,cAAc,MAAM;EACpB,OAAO;EACP,cAAc;GAAE,SAAS;GAAQ,eAAe;GAAU,KAAK;EAAM;EACrE,OAAO;GAAE,WAAW,MAAM;GAAW,WAAW;EAAO;EACvD,WAAW;CACb,GACA,EAAE,eAAe,MAAM,CACzB;AACF;;;;;;AAOA,MAAa,qBAAA,GAAoBC,IAAAA,gBAAAA,EAC9B,UAAmC;CAClC,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