@adapttable/naive-ui 0.1.3 → 0.2.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 +14 -0
- package/dist/assistant-Cv8df2ti.js +355 -0
- package/dist/assistant-Cv8df2ti.js.map +1 -0
- package/dist/assistant-D6mc-LJl.cjs +378 -0
- package/dist/assistant-D6mc-LJl.cjs.map +1 -0
- package/dist/assistant.cjs +5 -358
- package/dist/assistant.js +1 -354
- package/dist/column-menu-DdWVP1hz.d.cts +23 -0
- package/dist/column-menu-DdWVP1hz.d.cts.map +1 -0
- package/dist/column-menu-DdWVP1hz.d.ts +23 -0
- package/dist/column-menu-DdWVP1hz.d.ts.map +1 -0
- package/dist/column-menu.d.cts +2 -23
- package/dist/column-menu.d.ts +2 -23
- package/dist/command-palette-vIegnqVo.js +112 -0
- package/dist/command-palette-vIegnqVo.js.map +1 -0
- package/dist/command-palette-ztI3qI2V.cjs +117 -0
- package/dist/command-palette-ztI3qI2V.cjs.map +1 -0
- package/dist/command-palette.cjs +2 -112
- package/dist/command-palette.js +1 -111
- package/dist/context-menu-BbhrjTZr.cjs +145 -0
- package/dist/context-menu-BbhrjTZr.cjs.map +1 -0
- package/dist/context-menu-DjYIQXhY.js +140 -0
- package/dist/context-menu-DjYIQXhY.js.map +1 -0
- package/dist/context-menu.cjs +2 -140
- package/dist/context-menu.js +1 -139
- package/dist/features.cjs +217 -0
- package/dist/features.d.cts +40 -0
- package/dist/features.d.ts +40 -0
- package/dist/features.js +36 -0
- package/dist/filters-BJ48GzqJ.d.ts +66 -0
- package/dist/filters-BJ48GzqJ.d.ts.map +1 -0
- package/dist/filters-C6DvAZ_T.d.cts +66 -0
- package/dist/filters-C6DvAZ_T.d.cts.map +1 -0
- package/dist/filters.d.cts +2 -66
- package/dist/filters.d.ts +2 -66
- package/dist/grouping-panel-BPaPG49S.cjs +151 -0
- package/dist/grouping-panel-BPaPG49S.cjs.map +1 -0
- package/dist/grouping-panel-CYUPSa0u.js +146 -0
- package/dist/grouping-panel-CYUPSa0u.js.map +1 -0
- package/dist/grouping-panel.cjs +3 -146
- package/dist/grouping-panel.js +2 -145
- package/dist/header-filters-CQg6clum.d.cts +52 -0
- package/dist/header-filters-CQg6clum.d.cts.map +1 -0
- package/dist/header-filters-CQg6clum.d.ts +52 -0
- package/dist/header-filters-CQg6clum.d.ts.map +1 -0
- package/dist/header-filters.d.cts +2 -52
- package/dist/header-filters.d.ts +2 -52
- package/dist/index.cjs +1 -1
- package/dist/index.js +1 -1
- package/dist/{mobile-Bc3-31-b.cjs → mobile-C2JUs6b_.cjs} +3 -2
- package/dist/mobile-C2JUs6b_.cjs.map +1 -0
- package/dist/{mobile-Dlwq8dB7.js → mobile-CC3NeIRK.js} +4 -3
- package/dist/mobile-CC3NeIRK.js.map +1 -0
- package/dist/preset.cjs +5 -5
- package/dist/preset.js +5 -5
- package/dist/renderers.cjs +1 -1
- package/dist/renderers.d.cts.map +1 -1
- package/dist/renderers.d.ts.map +1 -1
- package/dist/renderers.js +1 -1
- package/dist/row-reorder-BNYYEL8w.js +186 -0
- package/dist/row-reorder-BNYYEL8w.js.map +1 -0
- package/dist/row-reorder-BRySq2FF.cjs +191 -0
- package/dist/row-reorder-BRySq2FF.cjs.map +1 -0
- package/dist/row-reorder.cjs +2 -185
- package/dist/row-reorder.js +1 -185
- package/dist/side-panel-Bf4zBlYZ.cjs +64 -0
- package/dist/side-panel-Bf4zBlYZ.cjs.map +1 -0
- package/dist/side-panel-CLTgXUnb.js +59 -0
- package/dist/side-panel-CLTgXUnb.js.map +1 -0
- package/dist/side-panel.cjs +2 -59
- package/dist/side-panel.js +1 -58
- package/dist/styles.css +39 -39
- package/package.json +14 -3
- package/dist/assistant.cjs.map +0 -1
- package/dist/assistant.js.map +0 -1
- package/dist/column-menu.d.cts.map +0 -1
- package/dist/column-menu.d.ts.map +0 -1
- package/dist/command-palette.cjs.map +0 -1
- package/dist/command-palette.js.map +0 -1
- package/dist/context-menu.cjs.map +0 -1
- package/dist/context-menu.js.map +0 -1
- package/dist/filters.d.cts.map +0 -1
- package/dist/filters.d.ts.map +0 -1
- package/dist/grouping-panel.cjs.map +0 -1
- package/dist/grouping-panel.js.map +0 -1
- package/dist/header-filters.d.cts.map +0 -1
- package/dist/header-filters.d.ts.map +0 -1
- package/dist/mobile-Bc3-31-b.cjs.map +0 -1
- package/dist/mobile-Dlwq8dB7.js.map +0 -1
- package/dist/row-reorder.cjs.map +0 -1
- package/dist/row-reorder.js.map +0 -1
- package/dist/side-panel.cjs.map +0 -1
- package/dist/side-panel.js.map +0 -1
package/dist/row-reorder.cjs
CHANGED
|
@@ -1,193 +1,10 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
const require_select = require("./select-C8UKnsWO.cjs");
|
|
4
|
-
const require_modalEscape = require("./modalEscape-aYoIK8OW.cjs");
|
|
2
|
+
const require_row_reorder = require("./row-reorder-BRySq2FF.cjs");
|
|
5
3
|
let _adapttable_vue = require("@adapttable/vue");
|
|
6
|
-
|
|
7
|
-
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
8
|
-
let vue = require("vue");
|
|
9
|
-
let naive_ui = require("naive-ui");
|
|
10
|
-
//#region src/reorder/NaiveRowMoveMenu.ts
|
|
11
|
-
const NaiveRowMoveMenu = /*#__PURE__*/ (0, vue.defineComponent)((props) => {
|
|
12
|
-
const active = (0, _adapttable_vue_adapter.useScopeActivity)();
|
|
13
|
-
const container = (0, vue.shallowRef)(null);
|
|
14
|
-
const trigger = (0, vue.shallowRef)(null);
|
|
15
|
-
const card = (0, vue.shallowRef)(null);
|
|
16
|
-
const escape = require_modalEscape.useNaiveModalEscape(() => card.value ? require_button.htmlRoot(card.value) : null);
|
|
17
|
-
const descriptionId = (0, vue.useId)();
|
|
18
|
-
let revision = 0;
|
|
19
|
-
(0, vue.watch)([
|
|
20
|
-
active,
|
|
21
|
-
() => props.items,
|
|
22
|
-
() => props.confirmation
|
|
23
|
-
], () => {
|
|
24
|
-
revision++;
|
|
25
|
-
}, { flush: "sync" });
|
|
26
|
-
const restore = () => {
|
|
27
|
-
(0, vue.nextTick)(() => {
|
|
28
|
-
if (active.value && !props.confirmation && trigger.value?.isConnected) trigger.value.focus();
|
|
29
|
-
});
|
|
30
|
-
};
|
|
31
|
-
return () => {
|
|
32
|
-
const ticket = revision;
|
|
33
|
-
const live = active.value;
|
|
34
|
-
const current = () => live && active.value && ticket === revision;
|
|
35
|
-
const confirmation = props.confirmation;
|
|
36
|
-
const finish = (accept) => {
|
|
37
|
-
if (!current() || !confirmation || props.confirmation !== confirmation) return;
|
|
38
|
-
if (accept) confirmation.onConfirm();
|
|
39
|
-
else confirmation.onCancel();
|
|
40
|
-
restore();
|
|
41
|
-
};
|
|
42
|
-
const content = confirmation ? [
|
|
43
|
-
(0, vue.h)("p", { id: descriptionId }, confirmation.description),
|
|
44
|
-
require_button.naiveButton({
|
|
45
|
-
"data-adapttable-part": "row-move-cancel",
|
|
46
|
-
onClick: () => finish(false)
|
|
47
|
-
}, confirmation.cancelLabel),
|
|
48
|
-
require_button.naiveButton({
|
|
49
|
-
"data-adapttable-part": "row-move-confirm",
|
|
50
|
-
onClick: () => finish(true)
|
|
51
|
-
}, confirmation.confirmLabel)
|
|
52
|
-
] : [];
|
|
53
|
-
return (0, vue.h)("span", {
|
|
54
|
-
"data-adapttable-part": "row-move-menu",
|
|
55
|
-
ref: (0, _adapttable_vue_adapter.elementRef)((element) => {
|
|
56
|
-
container.value = element;
|
|
57
|
-
})
|
|
58
|
-
}, [(0, vue.h)("span", { "data-adapttable-part": "row-move-menu-content" }, [require_select.naiveSelect({
|
|
59
|
-
attrs: {
|
|
60
|
-
ref: (element) => {
|
|
61
|
-
trigger.value = element;
|
|
62
|
-
},
|
|
63
|
-
"aria-label": props.label,
|
|
64
|
-
placeholder: props.label,
|
|
65
|
-
"data-adapttable-part": "row-move-menu-trigger",
|
|
66
|
-
disabled: props.items.every((item) => item.disabled)
|
|
67
|
-
},
|
|
68
|
-
value: "",
|
|
69
|
-
optionPart: "row-move-menu-item",
|
|
70
|
-
virtualScroll: false,
|
|
71
|
-
options: props.items.map((item) => ({
|
|
72
|
-
value: item.id,
|
|
73
|
-
label: item.label,
|
|
74
|
-
disabled: item.disabled,
|
|
75
|
-
title: item.disabledReason
|
|
76
|
-
})),
|
|
77
|
-
onChange: (key) => {
|
|
78
|
-
if (!current()) return;
|
|
79
|
-
const item = props.items.find((entry) => entry.id === key);
|
|
80
|
-
if (item && !item.disabled) item.onSelect();
|
|
81
|
-
}
|
|
82
|
-
})]), confirmation && container.value ? (0, vue.h)(naive_ui.NModal, {
|
|
83
|
-
show: live,
|
|
84
|
-
to: container.value,
|
|
85
|
-
autoFocus: true,
|
|
86
|
-
trapFocus: true,
|
|
87
|
-
maskClosable: false,
|
|
88
|
-
"onUpdate:show": (show) => {
|
|
89
|
-
if (!show && escape.allow()) finish(false);
|
|
90
|
-
}
|
|
91
|
-
}, { default: () => (0, vue.h)(naive_ui.NCard, {
|
|
92
|
-
ref: card,
|
|
93
|
-
role: "alertdialog",
|
|
94
|
-
onKeydownCapture: escape.capture,
|
|
95
|
-
"aria-modal": true,
|
|
96
|
-
"aria-label": confirmation.title,
|
|
97
|
-
"aria-describedby": descriptionId,
|
|
98
|
-
"data-adapttable-part": "row-move-confirmation",
|
|
99
|
-
title: confirmation.title,
|
|
100
|
-
style: { width: "min(28rem,calc(100vw - 2rem))" }
|
|
101
|
-
}, { default: () => content }) }) : null]);
|
|
102
|
-
};
|
|
103
|
-
}, {
|
|
104
|
-
name: "NaiveRowMoveMenu",
|
|
105
|
-
props: {
|
|
106
|
-
label: { type: String },
|
|
107
|
-
items: { type: Array },
|
|
108
|
-
confirmation: { type: Object }
|
|
109
|
-
}
|
|
110
|
-
});
|
|
111
|
-
//#endregion
|
|
112
|
-
//#region src/reorder/naiveReorderControls.ts
|
|
113
|
-
const naiveReorderControls = {
|
|
114
|
-
Handle: ({ label, pressed, dragging, disabled, dragProps, onKeyDown, className }) => require_button.naiveButton({
|
|
115
|
-
type: "button",
|
|
116
|
-
"aria-label": label,
|
|
117
|
-
"aria-pressed": pressed,
|
|
118
|
-
"data-dragging": dragging ? "" : void 0,
|
|
119
|
-
"data-adapttable-part": "row-reorder-handle",
|
|
120
|
-
"data-adapttable-grip": "",
|
|
121
|
-
class: className,
|
|
122
|
-
disabled,
|
|
123
|
-
draggable: dragProps.draggable,
|
|
124
|
-
onDragstart: (event) => {
|
|
125
|
-
if (event.dataTransfer) dragProps.onDragStart({
|
|
126
|
-
...event,
|
|
127
|
-
dataTransfer: event.dataTransfer,
|
|
128
|
-
clientY: event.clientY,
|
|
129
|
-
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
130
|
-
preventDefault: () => event.preventDefault()
|
|
131
|
-
});
|
|
132
|
-
},
|
|
133
|
-
onDragend: dragProps.onDragEnd,
|
|
134
|
-
onKeydown: (event) => onKeyDown({
|
|
135
|
-
key: event.key,
|
|
136
|
-
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
137
|
-
preventDefault: () => event.preventDefault()
|
|
138
|
-
})
|
|
139
|
-
}, "↕"),
|
|
140
|
-
Button: ({ label, part, disabled, onClick, className }) => require_button.naiveButton({
|
|
141
|
-
type: "button",
|
|
142
|
-
"aria-label": label,
|
|
143
|
-
"data-adapttable-part": part,
|
|
144
|
-
class: className,
|
|
145
|
-
disabled,
|
|
146
|
-
onClick
|
|
147
|
-
}, label),
|
|
148
|
-
Menu: (props) => (0, vue.h)(NaiveRowMoveMenu, props)
|
|
149
|
-
};
|
|
150
|
-
//#endregion
|
|
151
|
-
//#region src/reorder/NaiveRowReorder.vue
|
|
152
|
-
const _sfc_main = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
153
|
-
__name: "NaiveRowReorder",
|
|
154
|
-
props: {
|
|
155
|
-
model: {},
|
|
156
|
-
labels: {},
|
|
157
|
-
mobile: { type: Boolean },
|
|
158
|
-
classNames: {},
|
|
159
|
-
rowId: {},
|
|
160
|
-
localIndex: {},
|
|
161
|
-
row: {},
|
|
162
|
-
windowStart: {},
|
|
163
|
-
rowCount: {}
|
|
164
|
-
},
|
|
165
|
-
setup(__props) {
|
|
166
|
-
const props = __props;
|
|
167
|
-
const names = (0, _adapttable_vue_adapter.useDataTableClassNames)();
|
|
168
|
-
const Render = () => (0, _adapttable_vue_adapter.RowReorderChrome)({
|
|
169
|
-
...props,
|
|
170
|
-
classNames: { ...names.value },
|
|
171
|
-
slots: naiveReorderControls
|
|
172
|
-
});
|
|
173
|
-
Render.props = [];
|
|
174
|
-
return (_ctx, _cache) => {
|
|
175
|
-
return (0, vue.openBlock)(), (0, vue.createBlock)(Render);
|
|
176
|
-
};
|
|
177
|
-
}
|
|
178
|
-
});
|
|
179
|
-
//#endregion
|
|
180
|
-
//#region src/row-reorder.ts
|
|
181
|
-
function rowReorder(onRowReorder, options) {
|
|
182
|
-
return (0, _adapttable_vue_adapter.extendFeature)((0, _adapttable_vue_features.rowReorder)(onRowReorder, options), [(0, _adapttable_vue_adapter.slotRender)((0, _adapttable_vue_adapter.rowReorderControlKey)(), (props) => (0, vue.h)(_sfc_main, { ...props }))]);
|
|
183
|
-
}
|
|
184
|
-
//#endregion
|
|
185
|
-
exports.rowReorder = rowReorder;
|
|
4
|
+
exports.rowReorder = require_row_reorder.rowReorder;
|
|
186
5
|
Object.defineProperty(exports, "useRowReorder", {
|
|
187
6
|
enumerable: true,
|
|
188
7
|
get: function() {
|
|
189
8
|
return _adapttable_vue.useRowReorder;
|
|
190
9
|
}
|
|
191
10
|
});
|
|
192
|
-
|
|
193
|
-
//# sourceMappingURL=row-reorder.cjs.map
|
package/dist/row-reorder.js
CHANGED
|
@@ -1,186 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { t as naiveSelect } from "./select-Bgc5ttop.js";
|
|
3
|
-
import { t as useNaiveModalEscape } from "./modalEscape-CP6_uqjE.js";
|
|
4
|
-
import { useRowReorder } from "@adapttable/vue";
|
|
5
|
-
import { RowReorderChrome, elementRef, extendFeature, rowReorderControlKey, slotRender, useDataTableClassNames, useScopeActivity } from "@adapttable/vue/adapter";
|
|
6
|
-
import { rowReorder as rowReorder$1 } from "@adapttable/vue/features";
|
|
7
|
-
import { createBlock, defineComponent, h, nextTick, openBlock, shallowRef, useId, watch } from "vue";
|
|
8
|
-
import { NCard, NModal } from "naive-ui";
|
|
9
|
-
//#region src/reorder/NaiveRowMoveMenu.ts
|
|
10
|
-
const NaiveRowMoveMenu = /*#__PURE__*/ defineComponent((props) => {
|
|
11
|
-
const active = useScopeActivity();
|
|
12
|
-
const container = shallowRef(null);
|
|
13
|
-
const trigger = shallowRef(null);
|
|
14
|
-
const card = shallowRef(null);
|
|
15
|
-
const escape = useNaiveModalEscape(() => card.value ? htmlRoot(card.value) : null);
|
|
16
|
-
const descriptionId = useId();
|
|
17
|
-
let revision = 0;
|
|
18
|
-
watch([
|
|
19
|
-
active,
|
|
20
|
-
() => props.items,
|
|
21
|
-
() => props.confirmation
|
|
22
|
-
], () => {
|
|
23
|
-
revision++;
|
|
24
|
-
}, { flush: "sync" });
|
|
25
|
-
const restore = () => {
|
|
26
|
-
nextTick(() => {
|
|
27
|
-
if (active.value && !props.confirmation && trigger.value?.isConnected) trigger.value.focus();
|
|
28
|
-
});
|
|
29
|
-
};
|
|
30
|
-
return () => {
|
|
31
|
-
const ticket = revision;
|
|
32
|
-
const live = active.value;
|
|
33
|
-
const current = () => live && active.value && ticket === revision;
|
|
34
|
-
const confirmation = props.confirmation;
|
|
35
|
-
const finish = (accept) => {
|
|
36
|
-
if (!current() || !confirmation || props.confirmation !== confirmation) return;
|
|
37
|
-
if (accept) confirmation.onConfirm();
|
|
38
|
-
else confirmation.onCancel();
|
|
39
|
-
restore();
|
|
40
|
-
};
|
|
41
|
-
const content = confirmation ? [
|
|
42
|
-
h("p", { id: descriptionId }, confirmation.description),
|
|
43
|
-
naiveButton({
|
|
44
|
-
"data-adapttable-part": "row-move-cancel",
|
|
45
|
-
onClick: () => finish(false)
|
|
46
|
-
}, confirmation.cancelLabel),
|
|
47
|
-
naiveButton({
|
|
48
|
-
"data-adapttable-part": "row-move-confirm",
|
|
49
|
-
onClick: () => finish(true)
|
|
50
|
-
}, confirmation.confirmLabel)
|
|
51
|
-
] : [];
|
|
52
|
-
return h("span", {
|
|
53
|
-
"data-adapttable-part": "row-move-menu",
|
|
54
|
-
ref: elementRef((element) => {
|
|
55
|
-
container.value = element;
|
|
56
|
-
})
|
|
57
|
-
}, [h("span", { "data-adapttable-part": "row-move-menu-content" }, [naiveSelect({
|
|
58
|
-
attrs: {
|
|
59
|
-
ref: (element) => {
|
|
60
|
-
trigger.value = element;
|
|
61
|
-
},
|
|
62
|
-
"aria-label": props.label,
|
|
63
|
-
placeholder: props.label,
|
|
64
|
-
"data-adapttable-part": "row-move-menu-trigger",
|
|
65
|
-
disabled: props.items.every((item) => item.disabled)
|
|
66
|
-
},
|
|
67
|
-
value: "",
|
|
68
|
-
optionPart: "row-move-menu-item",
|
|
69
|
-
virtualScroll: false,
|
|
70
|
-
options: props.items.map((item) => ({
|
|
71
|
-
value: item.id,
|
|
72
|
-
label: item.label,
|
|
73
|
-
disabled: item.disabled,
|
|
74
|
-
title: item.disabledReason
|
|
75
|
-
})),
|
|
76
|
-
onChange: (key) => {
|
|
77
|
-
if (!current()) return;
|
|
78
|
-
const item = props.items.find((entry) => entry.id === key);
|
|
79
|
-
if (item && !item.disabled) item.onSelect();
|
|
80
|
-
}
|
|
81
|
-
})]), confirmation && container.value ? h(NModal, {
|
|
82
|
-
show: live,
|
|
83
|
-
to: container.value,
|
|
84
|
-
autoFocus: true,
|
|
85
|
-
trapFocus: true,
|
|
86
|
-
maskClosable: false,
|
|
87
|
-
"onUpdate:show": (show) => {
|
|
88
|
-
if (!show && escape.allow()) finish(false);
|
|
89
|
-
}
|
|
90
|
-
}, { default: () => h(NCard, {
|
|
91
|
-
ref: card,
|
|
92
|
-
role: "alertdialog",
|
|
93
|
-
onKeydownCapture: escape.capture,
|
|
94
|
-
"aria-modal": true,
|
|
95
|
-
"aria-label": confirmation.title,
|
|
96
|
-
"aria-describedby": descriptionId,
|
|
97
|
-
"data-adapttable-part": "row-move-confirmation",
|
|
98
|
-
title: confirmation.title,
|
|
99
|
-
style: { width: "min(28rem,calc(100vw - 2rem))" }
|
|
100
|
-
}, { default: () => content }) }) : null]);
|
|
101
|
-
};
|
|
102
|
-
}, {
|
|
103
|
-
name: "NaiveRowMoveMenu",
|
|
104
|
-
props: {
|
|
105
|
-
label: { type: String },
|
|
106
|
-
items: { type: Array },
|
|
107
|
-
confirmation: { type: Object }
|
|
108
|
-
}
|
|
109
|
-
});
|
|
110
|
-
//#endregion
|
|
111
|
-
//#region src/reorder/naiveReorderControls.ts
|
|
112
|
-
const naiveReorderControls = {
|
|
113
|
-
Handle: ({ label, pressed, dragging, disabled, dragProps, onKeyDown, className }) => naiveButton({
|
|
114
|
-
type: "button",
|
|
115
|
-
"aria-label": label,
|
|
116
|
-
"aria-pressed": pressed,
|
|
117
|
-
"data-dragging": dragging ? "" : void 0,
|
|
118
|
-
"data-adapttable-part": "row-reorder-handle",
|
|
119
|
-
"data-adapttable-grip": "",
|
|
120
|
-
class: className,
|
|
121
|
-
disabled,
|
|
122
|
-
draggable: dragProps.draggable,
|
|
123
|
-
onDragstart: (event) => {
|
|
124
|
-
if (event.dataTransfer) dragProps.onDragStart({
|
|
125
|
-
...event,
|
|
126
|
-
dataTransfer: event.dataTransfer,
|
|
127
|
-
clientY: event.clientY,
|
|
128
|
-
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
129
|
-
preventDefault: () => event.preventDefault()
|
|
130
|
-
});
|
|
131
|
-
},
|
|
132
|
-
onDragend: dragProps.onDragEnd,
|
|
133
|
-
onKeydown: (event) => onKeyDown({
|
|
134
|
-
key: event.key,
|
|
135
|
-
currentTarget: event.currentTarget instanceof HTMLElement ? event.currentTarget : null,
|
|
136
|
-
preventDefault: () => event.preventDefault()
|
|
137
|
-
})
|
|
138
|
-
}, "↕"),
|
|
139
|
-
Button: ({ label, part, disabled, onClick, className }) => naiveButton({
|
|
140
|
-
type: "button",
|
|
141
|
-
"aria-label": label,
|
|
142
|
-
"data-adapttable-part": part,
|
|
143
|
-
class: className,
|
|
144
|
-
disabled,
|
|
145
|
-
onClick
|
|
146
|
-
}, label),
|
|
147
|
-
Menu: (props) => h(NaiveRowMoveMenu, props)
|
|
148
|
-
};
|
|
149
|
-
//#endregion
|
|
150
|
-
//#region src/reorder/NaiveRowReorder.vue
|
|
151
|
-
const _sfc_main = /*@__PURE__*/ defineComponent({
|
|
152
|
-
__name: "NaiveRowReorder",
|
|
153
|
-
props: {
|
|
154
|
-
model: {},
|
|
155
|
-
labels: {},
|
|
156
|
-
mobile: { type: Boolean },
|
|
157
|
-
classNames: {},
|
|
158
|
-
rowId: {},
|
|
159
|
-
localIndex: {},
|
|
160
|
-
row: {},
|
|
161
|
-
windowStart: {},
|
|
162
|
-
rowCount: {}
|
|
163
|
-
},
|
|
164
|
-
setup(__props) {
|
|
165
|
-
const props = __props;
|
|
166
|
-
const names = useDataTableClassNames();
|
|
167
|
-
const Render = () => RowReorderChrome({
|
|
168
|
-
...props,
|
|
169
|
-
classNames: { ...names.value },
|
|
170
|
-
slots: naiveReorderControls
|
|
171
|
-
});
|
|
172
|
-
Render.props = [];
|
|
173
|
-
return (_ctx, _cache) => {
|
|
174
|
-
return openBlock(), createBlock(Render);
|
|
175
|
-
};
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
//#endregion
|
|
179
|
-
//#region src/row-reorder.ts
|
|
180
|
-
function rowReorder(onRowReorder, options) {
|
|
181
|
-
return extendFeature(rowReorder$1(onRowReorder, options), [slotRender(rowReorderControlKey(), (props) => h(_sfc_main, { ...props }))]);
|
|
182
|
-
}
|
|
183
|
-
//#endregion
|
|
1
|
+
import { n as useRowReorder, t as rowReorder } from "./row-reorder-BNYYEL8w.js";
|
|
184
2
|
export { rowReorder, useRowReorder };
|
|
185
|
-
|
|
186
|
-
//# sourceMappingURL=row-reorder.js.map
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
const require_button = require("./button-CaakTzYM.cjs");
|
|
2
|
+
require("@adapttable/vue");
|
|
3
|
+
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
4
|
+
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
5
|
+
let vue = require("vue");
|
|
6
|
+
let naive_ui = require("naive-ui");
|
|
7
|
+
//#region src/actions/sidePanelControls.ts
|
|
8
|
+
const naiveSidePanelSlots = (names = {}) => ({
|
|
9
|
+
Frame: (props) => (0, vue.h)(naive_ui.NCard, {
|
|
10
|
+
tag: "aside",
|
|
11
|
+
size: "small",
|
|
12
|
+
"data-adapttable-part": "side-panel",
|
|
13
|
+
class: props.className,
|
|
14
|
+
"data-side": props.side,
|
|
15
|
+
style: {
|
|
16
|
+
minWidth: "min(18rem,100%)",
|
|
17
|
+
maxWidth: "100%"
|
|
18
|
+
}
|
|
19
|
+
}, { default: () => props.children }),
|
|
20
|
+
Tab: (props) => require_button.naiveButton({
|
|
21
|
+
...(0, _adapttable_vue_adapter.toVueAttrs)(props.buttonProps),
|
|
22
|
+
class: names.sidePanelTab
|
|
23
|
+
}, props.panel.label),
|
|
24
|
+
Close: (props) => require_button.naiveButton({
|
|
25
|
+
"aria-label": props.label,
|
|
26
|
+
"data-adapttable-part": "side-panel-close",
|
|
27
|
+
class: names.sidePanelClose,
|
|
28
|
+
onClick: props.onClose
|
|
29
|
+
}, props.label)
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/side-panel.ts
|
|
33
|
+
const NaiveSidePanel = /*#__PURE__*/ (0, vue.defineComponent)((props) => {
|
|
34
|
+
const slots = {
|
|
35
|
+
Frame: (control) => naiveSidePanelSlots(props.classNames).Frame(control),
|
|
36
|
+
Tab: (control) => naiveSidePanelSlots(props.classNames).Tab(control),
|
|
37
|
+
Close: (control) => naiveSidePanelSlots(props.classNames).Close(control)
|
|
38
|
+
};
|
|
39
|
+
return () => (0, vue.h)(_adapttable_vue_adapter.SidePanelChrome, {
|
|
40
|
+
...props,
|
|
41
|
+
slots
|
|
42
|
+
});
|
|
43
|
+
}, {
|
|
44
|
+
name: "NaiveSidePanel",
|
|
45
|
+
props: {
|
|
46
|
+
model: { type: Object },
|
|
47
|
+
labels: { type: Object },
|
|
48
|
+
dir: { type: String },
|
|
49
|
+
classNames: { type: Object },
|
|
50
|
+
container: { type: Object }
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
function sidePanel(options) {
|
|
54
|
+
return (0, _adapttable_vue_adapter.extendFeature)((0, _adapttable_vue_features.sidePanel)(options), [(0, _adapttable_vue_adapter.slotRender)(_adapttable_vue_adapter.SIDE_PANEL_CONTROL, (props) => (0, vue.h)(NaiveSidePanel, { ...props }))]);
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
Object.defineProperty(exports, "sidePanel", {
|
|
58
|
+
enumerable: true,
|
|
59
|
+
get: function() {
|
|
60
|
+
return sidePanel;
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
//# sourceMappingURL=side-panel-Bf4zBlYZ.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-panel-Bf4zBlYZ.cjs","names":["h","NCard","naiveButton","toVueAttrs","h","SidePanelChrome","extendFeature","bindingSidePanel","slotRender","SIDE_PANEL_CONTROL"],"sources":["../src/actions/sidePanelControls.ts","../src/side-panel.ts"],"sourcesContent":["import { type SidePanelSlots, toVueAttrs } from \"@adapttable/vue/adapter\";\nimport { NCard } from \"naive-ui\";\nimport { h } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\nexport const naiveSidePanelSlots = (\n names: Readonly<Record<string, string | undefined>> = {}\n): SidePanelSlots => ({\n Frame: (props) =>\n h(\n NCard,\n {\n tag: \"aside\",\n size: \"small\",\n \"data-adapttable-part\": \"side-panel\",\n class: props.className,\n \"data-side\": props.side,\n style: { minWidth: \"min(18rem,100%)\", maxWidth: \"100%\" },\n },\n { default: () => props.children }\n ),\n Tab: (props) =>\n naiveButton(\n { ...toVueAttrs(props.buttonProps), class: names.sidePanelTab },\n props.panel.label\n ),\n Close: (props) =>\n naiveButton(\n {\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"side-panel-close\",\n class: names.sidePanelClose,\n onClick: props.onClose,\n },\n props.label\n ),\n});\n","import { type StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SIDE_PANEL_CONTROL,\n SidePanelChrome,\n type SidePanelChromeProps,\n type SidePanelSlots,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { sidePanel as bindingSidePanel } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { naiveSidePanelSlots } from \"./actions/sidePanelControls\";\nconst NaiveSidePanel = /*#__PURE__*/ defineComponent(\n (props: Omit<SidePanelChromeProps, \"slots\" | \"presentation\">) => {\n const slots: SidePanelSlots = {\n Frame: (control) => naiveSidePanelSlots(props.classNames).Frame(control),\n Tab: (control) => naiveSidePanelSlots(props.classNames).Tab(control),\n Close: (control) => naiveSidePanelSlots(props.classNames).Close(control),\n };\n return () => h(SidePanelChrome, { ...props, slots });\n },\n {\n name: \"NaiveSidePanel\",\n props: {\n model: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"model\"]\n >,\n },\n labels: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"labels\"]\n >,\n },\n dir: {\n type: String as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"dir\"]\n >,\n },\n classNames: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"classNames\"]\n >,\n },\n container: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"container\"]\n >,\n },\n },\n }\n);\nexport function sidePanel(\n options: Parameters<typeof bindingSidePanel>[0]\n): StaticTableFeature {\n return extendFeature(bindingSidePanel(options), [\n slotRender(SIDE_PANEL_CONTROL, (props) => h(NaiveSidePanel, { ...props })),\n ]);\n}\nexport type {\n SidePanelOptions,\n SidePanelPanel,\n} from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;AAMA,MAAa,uBACX,QAAsD,CAAC,OACnC;CACpB,QAAQ,WAAA,GACNA,IAAAA,EAAAA,CACEC,SAAAA,OACA;EACE,KAAK;EACL,MAAM;EACN,wBAAwB;EACxB,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO;GAAE,UAAU;GAAmB,UAAU;EAAO;CACzD,GACA,EAAE,eAAe,MAAM,SAAS,CAClC;CACF,MAAM,UACJC,eAAAA,YACE;EAAE,IAAA,GAAGC,wBAAAA,WAAAA,CAAW,MAAM,WAAW;EAAG,OAAO,MAAM;CAAa,GAC9D,MAAM,MAAM,KACd;CACF,QAAQ,UACND,eAAAA,YACE;EACE,cAAc,MAAM;EACpB,wBAAwB;EACxB,OAAO,MAAM;EACb,SAAS,MAAM;CACjB,GACA,MAAM,KACR;AACJ;;;ACxBA,MAAM,iBAA+B,eAAA,GAAA,IAAA,gBAAA,EAClC,UAAgE;CAC/D,MAAM,QAAwB;EAC5B,QAAQ,YAAY,oBAAoB,MAAM,UAAU,CAAC,CAAC,MAAM,OAAO;EACvE,MAAM,YAAY,oBAAoB,MAAM,UAAU,CAAC,CAAC,IAAI,OAAO;EACnE,QAAQ,YAAY,oBAAoB,MAAM,UAAU,CAAC,CAAC,MAAM,OAAO;CACzE;CACA,cAAA,GAAaE,IAAAA,EAAAA,CAAEC,wBAAAA,iBAAiB;EAAE,GAAG;EAAO;CAAM,CAAC;AACrD,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EACL,MAAM,OAGR;EACA,QAAQ,EACN,MAAM,OAGR;EACA,KAAK,EACH,MAAM,OAGR;EACA,YAAY,EACV,MAAM,OAGR;EACA,WAAW,EACT,MAAM,OAGR;CACF;AACF,CACF;AACA,SAAgB,UACd,SACoB;CACpB,QAAA,GAAOC,wBAAAA,cAAAA,EAAAA,GAAcC,yBAAAA,UAAAA,CAAiB,OAAO,GAAG,EAAA,GAC9CC,wBAAAA,WAAAA,CAAWC,wBAAAA,qBAAqB,WAAA,GAAUL,IAAAA,EAAAA,CAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC,CAAC,CAC3E,CAAC;AACH"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import { t as naiveButton } from "./button-BxXdDW7A.js";
|
|
2
|
+
import "@adapttable/vue";
|
|
3
|
+
import { SIDE_PANEL_CONTROL, SidePanelChrome, extendFeature, slotRender, toVueAttrs } from "@adapttable/vue/adapter";
|
|
4
|
+
import { sidePanel } from "@adapttable/vue/features";
|
|
5
|
+
import { defineComponent, h } from "vue";
|
|
6
|
+
import { NCard } from "naive-ui";
|
|
7
|
+
//#region src/actions/sidePanelControls.ts
|
|
8
|
+
const naiveSidePanelSlots = (names = {}) => ({
|
|
9
|
+
Frame: (props) => h(NCard, {
|
|
10
|
+
tag: "aside",
|
|
11
|
+
size: "small",
|
|
12
|
+
"data-adapttable-part": "side-panel",
|
|
13
|
+
class: props.className,
|
|
14
|
+
"data-side": props.side,
|
|
15
|
+
style: {
|
|
16
|
+
minWidth: "min(18rem,100%)",
|
|
17
|
+
maxWidth: "100%"
|
|
18
|
+
}
|
|
19
|
+
}, { default: () => props.children }),
|
|
20
|
+
Tab: (props) => naiveButton({
|
|
21
|
+
...toVueAttrs(props.buttonProps),
|
|
22
|
+
class: names.sidePanelTab
|
|
23
|
+
}, props.panel.label),
|
|
24
|
+
Close: (props) => naiveButton({
|
|
25
|
+
"aria-label": props.label,
|
|
26
|
+
"data-adapttable-part": "side-panel-close",
|
|
27
|
+
class: names.sidePanelClose,
|
|
28
|
+
onClick: props.onClose
|
|
29
|
+
}, props.label)
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
//#region src/side-panel.ts
|
|
33
|
+
const NaiveSidePanel = /*#__PURE__*/ defineComponent((props) => {
|
|
34
|
+
const slots = {
|
|
35
|
+
Frame: (control) => naiveSidePanelSlots(props.classNames).Frame(control),
|
|
36
|
+
Tab: (control) => naiveSidePanelSlots(props.classNames).Tab(control),
|
|
37
|
+
Close: (control) => naiveSidePanelSlots(props.classNames).Close(control)
|
|
38
|
+
};
|
|
39
|
+
return () => h(SidePanelChrome, {
|
|
40
|
+
...props,
|
|
41
|
+
slots
|
|
42
|
+
});
|
|
43
|
+
}, {
|
|
44
|
+
name: "NaiveSidePanel",
|
|
45
|
+
props: {
|
|
46
|
+
model: { type: Object },
|
|
47
|
+
labels: { type: Object },
|
|
48
|
+
dir: { type: String },
|
|
49
|
+
classNames: { type: Object },
|
|
50
|
+
container: { type: Object }
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
function sidePanel$1(options) {
|
|
54
|
+
return extendFeature(sidePanel(options), [slotRender(SIDE_PANEL_CONTROL, (props) => h(NaiveSidePanel, { ...props }))]);
|
|
55
|
+
}
|
|
56
|
+
//#endregion
|
|
57
|
+
export { sidePanel$1 as t };
|
|
58
|
+
|
|
59
|
+
//# sourceMappingURL=side-panel-CLTgXUnb.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"side-panel-CLTgXUnb.js","names":["sidePanel","bindingSidePanel"],"sources":["../src/actions/sidePanelControls.ts","../src/side-panel.ts"],"sourcesContent":["import { type SidePanelSlots, toVueAttrs } from \"@adapttable/vue/adapter\";\nimport { NCard } from \"naive-ui\";\nimport { h } from \"vue\";\n\nimport { naiveButton } from \"../controls/button\";\n\nexport const naiveSidePanelSlots = (\n names: Readonly<Record<string, string | undefined>> = {}\n): SidePanelSlots => ({\n Frame: (props) =>\n h(\n NCard,\n {\n tag: \"aside\",\n size: \"small\",\n \"data-adapttable-part\": \"side-panel\",\n class: props.className,\n \"data-side\": props.side,\n style: { minWidth: \"min(18rem,100%)\", maxWidth: \"100%\" },\n },\n { default: () => props.children }\n ),\n Tab: (props) =>\n naiveButton(\n { ...toVueAttrs(props.buttonProps), class: names.sidePanelTab },\n props.panel.label\n ),\n Close: (props) =>\n naiveButton(\n {\n \"aria-label\": props.label,\n \"data-adapttable-part\": \"side-panel-close\",\n class: names.sidePanelClose,\n onClick: props.onClose,\n },\n props.label\n ),\n});\n","import { type StaticTableFeature } from \"@adapttable/vue\";\nimport {\n extendFeature,\n SIDE_PANEL_CONTROL,\n SidePanelChrome,\n type SidePanelChromeProps,\n type SidePanelSlots,\n slotRender,\n} from \"@adapttable/vue/adapter\";\nimport { sidePanel as bindingSidePanel } from \"@adapttable/vue/features\";\nimport { defineComponent, h, type PropType } from \"vue\";\n\nimport { naiveSidePanelSlots } from \"./actions/sidePanelControls\";\nconst NaiveSidePanel = /*#__PURE__*/ defineComponent(\n (props: Omit<SidePanelChromeProps, \"slots\" | \"presentation\">) => {\n const slots: SidePanelSlots = {\n Frame: (control) => naiveSidePanelSlots(props.classNames).Frame(control),\n Tab: (control) => naiveSidePanelSlots(props.classNames).Tab(control),\n Close: (control) => naiveSidePanelSlots(props.classNames).Close(control),\n };\n return () => h(SidePanelChrome, { ...props, slots });\n },\n {\n name: \"NaiveSidePanel\",\n props: {\n model: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"model\"]\n >,\n },\n labels: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"labels\"]\n >,\n },\n dir: {\n type: String as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"dir\"]\n >,\n },\n classNames: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"classNames\"]\n >,\n },\n container: {\n type: Object as PropType<\n Omit<SidePanelChromeProps, \"slots\" | \"presentation\">[\"container\"]\n >,\n },\n },\n }\n);\nexport function sidePanel(\n options: Parameters<typeof bindingSidePanel>[0]\n): StaticTableFeature {\n return extendFeature(bindingSidePanel(options), [\n slotRender(SIDE_PANEL_CONTROL, (props) => h(NaiveSidePanel, { ...props })),\n ]);\n}\nexport type {\n SidePanelOptions,\n SidePanelPanel,\n} from \"@adapttable/vue/features\";\n"],"mappings":";;;;;;;AAMA,MAAa,uBACX,QAAsD,CAAC,OACnC;CACpB,QAAQ,UACN,EACE,OACA;EACE,KAAK;EACL,MAAM;EACN,wBAAwB;EACxB,OAAO,MAAM;EACb,aAAa,MAAM;EACnB,OAAO;GAAE,UAAU;GAAmB,UAAU;EAAO;CACzD,GACA,EAAE,eAAe,MAAM,SAAS,CAClC;CACF,MAAM,UACJ,YACE;EAAE,GAAG,WAAW,MAAM,WAAW;EAAG,OAAO,MAAM;CAAa,GAC9D,MAAM,MAAM,KACd;CACF,QAAQ,UACN,YACE;EACE,cAAc,MAAM;EACpB,wBAAwB;EACxB,OAAO,MAAM;EACb,SAAS,MAAM;CACjB,GACA,MAAM,KACR;AACJ;;;ACxBA,MAAM,iBAA+B,+BAClC,UAAgE;CAC/D,MAAM,QAAwB;EAC5B,QAAQ,YAAY,oBAAoB,MAAM,UAAU,CAAC,CAAC,MAAM,OAAO;EACvE,MAAM,YAAY,oBAAoB,MAAM,UAAU,CAAC,CAAC,IAAI,OAAO;EACnE,QAAQ,YAAY,oBAAoB,MAAM,UAAU,CAAC,CAAC,MAAM,OAAO;CACzE;CACA,aAAa,EAAE,iBAAiB;EAAE,GAAG;EAAO;CAAM,CAAC;AACrD,GACA;CACE,MAAM;CACN,OAAO;EACL,OAAO,EACL,MAAM,OAGR;EACA,QAAQ,EACN,MAAM,OAGR;EACA,KAAK,EACH,MAAM,OAGR;EACA,YAAY,EACV,MAAM,OAGR;EACA,WAAW,EACT,MAAM,OAGR;CACF;AACF,CACF;AACA,SAAgBA,YACd,SACoB;CACpB,OAAO,cAAcC,UAAiB,OAAO,GAAG,CAC9C,WAAW,qBAAqB,UAAU,EAAE,gBAAgB,EAAE,GAAG,MAAM,CAAC,CAAC,CAC3E,CAAC;AACH"}
|
package/dist/side-panel.cjs
CHANGED
|
@@ -1,60 +1,3 @@
|
|
|
1
1
|
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
2
|
-
const
|
|
3
|
-
|
|
4
|
-
let _adapttable_vue_adapter = require("@adapttable/vue/adapter");
|
|
5
|
-
let _adapttable_vue_features = require("@adapttable/vue/features");
|
|
6
|
-
let vue = require("vue");
|
|
7
|
-
let naive_ui = require("naive-ui");
|
|
8
|
-
//#region src/actions/sidePanelControls.ts
|
|
9
|
-
const naiveSidePanelSlots = (names = {}) => ({
|
|
10
|
-
Frame: (props) => (0, vue.h)(naive_ui.NCard, {
|
|
11
|
-
tag: "aside",
|
|
12
|
-
size: "small",
|
|
13
|
-
"data-adapttable-part": "side-panel",
|
|
14
|
-
class: props.className,
|
|
15
|
-
"data-side": props.side,
|
|
16
|
-
style: {
|
|
17
|
-
minWidth: "min(18rem,100%)",
|
|
18
|
-
maxWidth: "100%"
|
|
19
|
-
}
|
|
20
|
-
}, { default: () => props.children }),
|
|
21
|
-
Tab: (props) => require_button.naiveButton({
|
|
22
|
-
...(0, _adapttable_vue_adapter.toVueAttrs)(props.buttonProps),
|
|
23
|
-
class: names.sidePanelTab
|
|
24
|
-
}, props.panel.label),
|
|
25
|
-
Close: (props) => require_button.naiveButton({
|
|
26
|
-
"aria-label": props.label,
|
|
27
|
-
"data-adapttable-part": "side-panel-close",
|
|
28
|
-
class: names.sidePanelClose,
|
|
29
|
-
onClick: props.onClose
|
|
30
|
-
}, props.label)
|
|
31
|
-
});
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/side-panel.ts
|
|
34
|
-
const NaiveSidePanel = /*#__PURE__*/ (0, vue.defineComponent)((props) => {
|
|
35
|
-
const slots = {
|
|
36
|
-
Frame: (control) => naiveSidePanelSlots(props.classNames).Frame(control),
|
|
37
|
-
Tab: (control) => naiveSidePanelSlots(props.classNames).Tab(control),
|
|
38
|
-
Close: (control) => naiveSidePanelSlots(props.classNames).Close(control)
|
|
39
|
-
};
|
|
40
|
-
return () => (0, vue.h)(_adapttable_vue_adapter.SidePanelChrome, {
|
|
41
|
-
...props,
|
|
42
|
-
slots
|
|
43
|
-
});
|
|
44
|
-
}, {
|
|
45
|
-
name: "NaiveSidePanel",
|
|
46
|
-
props: {
|
|
47
|
-
model: { type: Object },
|
|
48
|
-
labels: { type: Object },
|
|
49
|
-
dir: { type: String },
|
|
50
|
-
classNames: { type: Object },
|
|
51
|
-
container: { type: Object }
|
|
52
|
-
}
|
|
53
|
-
});
|
|
54
|
-
function sidePanel(options) {
|
|
55
|
-
return (0, _adapttable_vue_adapter.extendFeature)((0, _adapttable_vue_features.sidePanel)(options), [(0, _adapttable_vue_adapter.slotRender)(_adapttable_vue_adapter.SIDE_PANEL_CONTROL, (props) => (0, vue.h)(NaiveSidePanel, { ...props }))]);
|
|
56
|
-
}
|
|
57
|
-
//#endregion
|
|
58
|
-
exports.sidePanel = sidePanel;
|
|
59
|
-
|
|
60
|
-
//# sourceMappingURL=side-panel.cjs.map
|
|
2
|
+
const require_side_panel = require("./side-panel-Bf4zBlYZ.cjs");
|
|
3
|
+
exports.sidePanel = require_side_panel.sidePanel;
|
package/dist/side-panel.js
CHANGED
|
@@ -1,59 +1,2 @@
|
|
|
1
|
-
import { t as
|
|
2
|
-
import "@adapttable/vue";
|
|
3
|
-
import { SIDE_PANEL_CONTROL, SidePanelChrome, extendFeature, slotRender, toVueAttrs } from "@adapttable/vue/adapter";
|
|
4
|
-
import { sidePanel as sidePanel$1 } from "@adapttable/vue/features";
|
|
5
|
-
import { defineComponent, h } from "vue";
|
|
6
|
-
import { NCard } from "naive-ui";
|
|
7
|
-
//#region src/actions/sidePanelControls.ts
|
|
8
|
-
const naiveSidePanelSlots = (names = {}) => ({
|
|
9
|
-
Frame: (props) => h(NCard, {
|
|
10
|
-
tag: "aside",
|
|
11
|
-
size: "small",
|
|
12
|
-
"data-adapttable-part": "side-panel",
|
|
13
|
-
class: props.className,
|
|
14
|
-
"data-side": props.side,
|
|
15
|
-
style: {
|
|
16
|
-
minWidth: "min(18rem,100%)",
|
|
17
|
-
maxWidth: "100%"
|
|
18
|
-
}
|
|
19
|
-
}, { default: () => props.children }),
|
|
20
|
-
Tab: (props) => naiveButton({
|
|
21
|
-
...toVueAttrs(props.buttonProps),
|
|
22
|
-
class: names.sidePanelTab
|
|
23
|
-
}, props.panel.label),
|
|
24
|
-
Close: (props) => naiveButton({
|
|
25
|
-
"aria-label": props.label,
|
|
26
|
-
"data-adapttable-part": "side-panel-close",
|
|
27
|
-
class: names.sidePanelClose,
|
|
28
|
-
onClick: props.onClose
|
|
29
|
-
}, props.label)
|
|
30
|
-
});
|
|
31
|
-
//#endregion
|
|
32
|
-
//#region src/side-panel.ts
|
|
33
|
-
const NaiveSidePanel = /*#__PURE__*/ defineComponent((props) => {
|
|
34
|
-
const slots = {
|
|
35
|
-
Frame: (control) => naiveSidePanelSlots(props.classNames).Frame(control),
|
|
36
|
-
Tab: (control) => naiveSidePanelSlots(props.classNames).Tab(control),
|
|
37
|
-
Close: (control) => naiveSidePanelSlots(props.classNames).Close(control)
|
|
38
|
-
};
|
|
39
|
-
return () => h(SidePanelChrome, {
|
|
40
|
-
...props,
|
|
41
|
-
slots
|
|
42
|
-
});
|
|
43
|
-
}, {
|
|
44
|
-
name: "NaiveSidePanel",
|
|
45
|
-
props: {
|
|
46
|
-
model: { type: Object },
|
|
47
|
-
labels: { type: Object },
|
|
48
|
-
dir: { type: String },
|
|
49
|
-
classNames: { type: Object },
|
|
50
|
-
container: { type: Object }
|
|
51
|
-
}
|
|
52
|
-
});
|
|
53
|
-
function sidePanel(options) {
|
|
54
|
-
return extendFeature(sidePanel$1(options), [slotRender(SIDE_PANEL_CONTROL, (props) => h(NaiveSidePanel, { ...props }))]);
|
|
55
|
-
}
|
|
56
|
-
//#endregion
|
|
1
|
+
import { t as sidePanel } from "./side-panel-CLTgXUnb.js";
|
|
57
2
|
export { sidePanel };
|
|
58
|
-
|
|
59
|
-
//# sourceMappingURL=side-panel.js.map
|