@ace-grid/vue 1.0.7
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 +42 -0
- package/dist/angularTier-BxO1uxwB.mjs +24085 -0
- package/dist/vue-core.d.ts +5 -0
- package/dist/vue-core.js +18 -0
- package/dist/vue-enterprise.d.ts +5 -0
- package/dist/vue-enterprise.js +18 -0
- package/dist/vue-pro.d.ts +5 -0
- package/dist/vue-pro.js +18 -0
- package/dist/vue.d.ts +17 -0
- package/dist/vue.js +222 -0
- package/package.json +78 -0
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./vue";
|
|
2
|
+
export * from "@ace-grid/core";
|
|
3
|
+
export declare function defineAceGridElement(...args: unknown[]): unknown;
|
|
4
|
+
export declare function defineAceGridUseGridElement(...args: unknown[]): unknown;
|
|
5
|
+
export interface AceGridUseGridElement extends HTMLElement {}
|
package/dist/vue-core.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Grid as e, useGrid as r } from "@ace-grid/core";
|
|
2
|
+
export * from "@ace-grid/core";
|
|
3
|
+
import { r as E } from "./angularTier-BxO1uxwB.mjs";
|
|
4
|
+
import { d as m, a as A } from "./angularTier-BxO1uxwB.mjs";
|
|
5
|
+
import { ACE_GRID_VUE_COMMON_EVENTS as n, ACE_GRID_VUE_DEFAULT_TAG_NAME as f, ACE_GRID_VUE_EVENT_PREFIX as a, AceGridComponent as p, AceGridComponent as s } from "./vue.js";
|
|
6
|
+
E(
|
|
7
|
+
e,
|
|
8
|
+
r
|
|
9
|
+
);
|
|
10
|
+
export {
|
|
11
|
+
n as ACE_GRID_VUE_COMMON_EVENTS,
|
|
12
|
+
f as ACE_GRID_VUE_DEFAULT_TAG_NAME,
|
|
13
|
+
a as ACE_GRID_VUE_EVENT_PREFIX,
|
|
14
|
+
p as AceGridComponent,
|
|
15
|
+
s as default,
|
|
16
|
+
m as defineAceGridElement,
|
|
17
|
+
A as defineAceGridUseGridElement
|
|
18
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./vue";
|
|
2
|
+
export * from "@ace-grid/enterprise";
|
|
3
|
+
export declare function defineAceGridElement(...args: unknown[]): unknown;
|
|
4
|
+
export declare function defineAceGridUseGridElement(...args: unknown[]): unknown;
|
|
5
|
+
export interface AceGridUseGridElement extends HTMLElement {}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Grid as e, useGrid as r } from "@ace-grid/enterprise";
|
|
2
|
+
export * from "@ace-grid/enterprise";
|
|
3
|
+
import { r as E } from "./angularTier-BxO1uxwB.mjs";
|
|
4
|
+
import { d as m, a as A } from "./angularTier-BxO1uxwB.mjs";
|
|
5
|
+
import { ACE_GRID_VUE_COMMON_EVENTS as n, ACE_GRID_VUE_DEFAULT_TAG_NAME as f, ACE_GRID_VUE_EVENT_PREFIX as a, AceGridComponent as p, AceGridComponent as s } from "./vue.js";
|
|
6
|
+
E(
|
|
7
|
+
e,
|
|
8
|
+
r
|
|
9
|
+
);
|
|
10
|
+
export {
|
|
11
|
+
n as ACE_GRID_VUE_COMMON_EVENTS,
|
|
12
|
+
f as ACE_GRID_VUE_DEFAULT_TAG_NAME,
|
|
13
|
+
a as ACE_GRID_VUE_EVENT_PREFIX,
|
|
14
|
+
p as AceGridComponent,
|
|
15
|
+
s as default,
|
|
16
|
+
m as defineAceGridElement,
|
|
17
|
+
A as defineAceGridUseGridElement
|
|
18
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export * from "./vue";
|
|
2
|
+
export * from "@ace-grid/pro";
|
|
3
|
+
export declare function defineAceGridElement(...args: unknown[]): unknown;
|
|
4
|
+
export declare function defineAceGridUseGridElement(...args: unknown[]): unknown;
|
|
5
|
+
export interface AceGridUseGridElement extends HTMLElement {}
|
package/dist/vue-pro.js
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Grid as e, useGrid as r } from "@ace-grid/pro";
|
|
2
|
+
export * from "@ace-grid/pro";
|
|
3
|
+
import { r as E } from "./angularTier-BxO1uxwB.mjs";
|
|
4
|
+
import { d as m, a as A } from "./angularTier-BxO1uxwB.mjs";
|
|
5
|
+
import { ACE_GRID_VUE_COMMON_EVENTS as n, ACE_GRID_VUE_DEFAULT_TAG_NAME as f, ACE_GRID_VUE_EVENT_PREFIX as a, AceGridComponent as p, AceGridComponent as s } from "./vue.js";
|
|
6
|
+
E(
|
|
7
|
+
e,
|
|
8
|
+
r
|
|
9
|
+
);
|
|
10
|
+
export {
|
|
11
|
+
n as ACE_GRID_VUE_COMMON_EVENTS,
|
|
12
|
+
f as ACE_GRID_VUE_DEFAULT_TAG_NAME,
|
|
13
|
+
a as ACE_GRID_VUE_EVENT_PREFIX,
|
|
14
|
+
p as AceGridComponent,
|
|
15
|
+
s as default,
|
|
16
|
+
m as defineAceGridElement,
|
|
17
|
+
A as defineAceGridUseGridElement
|
|
18
|
+
};
|
package/dist/vue.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export interface AceGridVueReadyEvent {
|
|
2
|
+
element: HTMLElement;
|
|
3
|
+
}
|
|
4
|
+
export interface AceGridVueComponentProps {
|
|
5
|
+
props?: unknown;
|
|
6
|
+
hookOptions?: unknown;
|
|
7
|
+
templates?: Record<string, unknown> | null;
|
|
8
|
+
iconTemplates?: Record<string, unknown> | null;
|
|
9
|
+
elementClassName?: string;
|
|
10
|
+
customTagName?: string;
|
|
11
|
+
}
|
|
12
|
+
export declare const AceGridComponent: unknown;
|
|
13
|
+
declare const _default: typeof AceGridComponent;
|
|
14
|
+
export default _default;
|
|
15
|
+
export declare const ACE_GRID_VUE_COMMON_EVENTS: Record<string, string>;
|
|
16
|
+
export declare const ACE_GRID_VUE_DEFAULT_TAG_NAME: string;
|
|
17
|
+
export declare const ACE_GRID_VUE_EVENT_PREFIX: string;
|
package/dist/vue.js
ADDED
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
import { defineComponent as N, ref as h, onMounted as D, onBeforeUnmount as M, watch as p, h as f, toRaw as u, render as _ } from "vue";
|
|
2
|
+
const T = "ace-grid", j = "ace-grid-", r = {
|
|
3
|
+
cellChange: "ace-grid-cell-change",
|
|
4
|
+
rowAdd: "ace-grid-row-add",
|
|
5
|
+
rowDelete: "ace-grid-row-delete",
|
|
6
|
+
selectionChange: "ace-grid-selection-change",
|
|
7
|
+
selectionRangeChange: "ace-grid-selection-range-change",
|
|
8
|
+
sortChange: "ace-grid-sort-change",
|
|
9
|
+
sortModelChange: "ace-grid-sort-model-change",
|
|
10
|
+
filterChange: "ace-grid-filter-change"
|
|
11
|
+
}, K = N({
|
|
12
|
+
name: "AceGridComponent",
|
|
13
|
+
inheritAttrs: !1,
|
|
14
|
+
props: {
|
|
15
|
+
customTagName: {
|
|
16
|
+
type: String,
|
|
17
|
+
default: T
|
|
18
|
+
},
|
|
19
|
+
props: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({})
|
|
22
|
+
},
|
|
23
|
+
hookOptions: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: null
|
|
26
|
+
},
|
|
27
|
+
templates: {
|
|
28
|
+
type: Object,
|
|
29
|
+
default: null
|
|
30
|
+
},
|
|
31
|
+
iconTemplates: {
|
|
32
|
+
type: Object,
|
|
33
|
+
default: null
|
|
34
|
+
},
|
|
35
|
+
elementClassName: {
|
|
36
|
+
type: String,
|
|
37
|
+
default: ""
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
emits: {
|
|
41
|
+
ready: (l) => !0,
|
|
42
|
+
customEvent: (l) => !0,
|
|
43
|
+
cellChange: (l) => !0,
|
|
44
|
+
rowAdd: (l) => !0,
|
|
45
|
+
rowDelete: (l) => !0,
|
|
46
|
+
selectionChange: (l) => !0,
|
|
47
|
+
selectionRangeChange: (l) => !0,
|
|
48
|
+
sortChange: (l) => !0,
|
|
49
|
+
sortModelChange: (l) => !0,
|
|
50
|
+
filterChange: (l) => !0
|
|
51
|
+
},
|
|
52
|
+
setup(l, { emit: k, expose: w }) {
|
|
53
|
+
const o = k, g = h(null), c = h(
|
|
54
|
+
l.iconTemplates ?? null
|
|
55
|
+
), a = h(null);
|
|
56
|
+
let d = null;
|
|
57
|
+
const m = (e) => (e ?? "").trim() || T, y = (e) => {
|
|
58
|
+
o("customEvent", e);
|
|
59
|
+
const t = e.detail;
|
|
60
|
+
switch (e.type) {
|
|
61
|
+
case r.cellChange:
|
|
62
|
+
o("cellChange", t);
|
|
63
|
+
break;
|
|
64
|
+
case r.rowAdd:
|
|
65
|
+
o("rowAdd", t);
|
|
66
|
+
break;
|
|
67
|
+
case r.rowDelete:
|
|
68
|
+
o("rowDelete", t);
|
|
69
|
+
break;
|
|
70
|
+
case r.selectionChange:
|
|
71
|
+
o("selectionChange", t);
|
|
72
|
+
break;
|
|
73
|
+
case r.selectionRangeChange:
|
|
74
|
+
o("selectionRangeChange", t);
|
|
75
|
+
break;
|
|
76
|
+
case r.sortChange:
|
|
77
|
+
o("sortChange", t);
|
|
78
|
+
break;
|
|
79
|
+
case r.sortModelChange:
|
|
80
|
+
o("sortModelChange", t);
|
|
81
|
+
break;
|
|
82
|
+
case r.filterChange:
|
|
83
|
+
o("filterChange", t);
|
|
84
|
+
break;
|
|
85
|
+
}
|
|
86
|
+
}, A = (e) => {
|
|
87
|
+
const t = e.dispatchEvent.bind(e);
|
|
88
|
+
return e.dispatchEvent = ((s) => (s.type.startsWith(j) && y(s), t(s))), () => {
|
|
89
|
+
e.dispatchEvent = t;
|
|
90
|
+
};
|
|
91
|
+
}, v = () => {
|
|
92
|
+
d?.(), d = null, a.value?.remove(), a.value = null;
|
|
93
|
+
}, C = (e, t) => {
|
|
94
|
+
if (!g.value) return;
|
|
95
|
+
const s = a.value?.tagName.toLowerCase();
|
|
96
|
+
if (!a.value || s !== e.toLowerCase()) {
|
|
97
|
+
v();
|
|
98
|
+
const n = document.createElement(e);
|
|
99
|
+
n.style.display = "block", n.style.width = "100%", n.style.height = "100%", n.className = t, g.value.replaceChildren(n), a.value = n, d = A(n), o("ready", { element: n });
|
|
100
|
+
return;
|
|
101
|
+
}
|
|
102
|
+
a.value.className = t;
|
|
103
|
+
}, E = (e, t, s, n) => {
|
|
104
|
+
a.value && (a.value.props = e ? u(e) : {}, a.value.templates = b(
|
|
105
|
+
s ? u(s) : null,
|
|
106
|
+
O(
|
|
107
|
+
n ? u(n) : null
|
|
108
|
+
)
|
|
109
|
+
) ?? {}, "hookOptions" in a.value && (a.value.hookOptions = t ? u(t) : {}));
|
|
110
|
+
};
|
|
111
|
+
w({
|
|
112
|
+
getElement: () => a.value,
|
|
113
|
+
rerender: () => {
|
|
114
|
+
a.value?.rerender();
|
|
115
|
+
},
|
|
116
|
+
setProps: (e) => {
|
|
117
|
+
a.value?.setProps?.(e);
|
|
118
|
+
},
|
|
119
|
+
getProps: () => a.value?.getProps?.() ?? null,
|
|
120
|
+
setTemplates: (e) => {
|
|
121
|
+
a.value?.setTemplates?.(e);
|
|
122
|
+
},
|
|
123
|
+
getTemplates: () => a.value?.getTemplates?.() ?? null,
|
|
124
|
+
setIconTemplates: (e) => {
|
|
125
|
+
c.value = {
|
|
126
|
+
...c.value ?? {},
|
|
127
|
+
...e
|
|
128
|
+
};
|
|
129
|
+
},
|
|
130
|
+
getIconTemplates: () => c.value ?? null,
|
|
131
|
+
setHookOptions: (e) => {
|
|
132
|
+
a.value?.setHookOptions?.(e);
|
|
133
|
+
},
|
|
134
|
+
getHookOptions: () => a.value?.getHookOptions?.() ?? null,
|
|
135
|
+
getRows: () => a.value?.getRows?.() ?? null,
|
|
136
|
+
getActions: () => a.value?.getActions?.() ?? null,
|
|
137
|
+
getApi: () => a.value?.getApi?.() ?? null
|
|
138
|
+
}), D(() => {
|
|
139
|
+
C(
|
|
140
|
+
m(l.customTagName),
|
|
141
|
+
l.elementClassName
|
|
142
|
+
), E(
|
|
143
|
+
l.props,
|
|
144
|
+
l.hookOptions,
|
|
145
|
+
l.templates,
|
|
146
|
+
c.value
|
|
147
|
+
);
|
|
148
|
+
}), M(() => {
|
|
149
|
+
v();
|
|
150
|
+
}), p(
|
|
151
|
+
() => [l.customTagName, l.elementClassName],
|
|
152
|
+
([e, t]) => {
|
|
153
|
+
C(m(e), t ?? "");
|
|
154
|
+
},
|
|
155
|
+
{ flush: "post" }
|
|
156
|
+
), p(
|
|
157
|
+
() => l.iconTemplates,
|
|
158
|
+
(e) => {
|
|
159
|
+
c.value = e ?? null;
|
|
160
|
+
},
|
|
161
|
+
{ deep: !0, flush: "post" }
|
|
162
|
+
), p(
|
|
163
|
+
() => [
|
|
164
|
+
l.props,
|
|
165
|
+
l.hookOptions,
|
|
166
|
+
l.templates,
|
|
167
|
+
c.value
|
|
168
|
+
],
|
|
169
|
+
([e, t, s, n]) => {
|
|
170
|
+
E(
|
|
171
|
+
e ?? {},
|
|
172
|
+
t,
|
|
173
|
+
s,
|
|
174
|
+
n
|
|
175
|
+
);
|
|
176
|
+
},
|
|
177
|
+
{ deep: !0, flush: "post" }
|
|
178
|
+
);
|
|
179
|
+
const O = (e) => {
|
|
180
|
+
if (!e || Object.keys(e).length === 0)
|
|
181
|
+
return null;
|
|
182
|
+
const t = Object.entries(e).filter((s) => !!s[1]).map(([s, n]) => [
|
|
183
|
+
s,
|
|
184
|
+
({ props: R }) => {
|
|
185
|
+
const i = document.createElement("span");
|
|
186
|
+
return i.style.display = "contents", _(f(n, R), i), {
|
|
187
|
+
node: i,
|
|
188
|
+
cleanup: () => {
|
|
189
|
+
_(null, i);
|
|
190
|
+
}
|
|
191
|
+
};
|
|
192
|
+
}
|
|
193
|
+
]);
|
|
194
|
+
return {
|
|
195
|
+
icons: Object.fromEntries(t)
|
|
196
|
+
};
|
|
197
|
+
}, b = (e, t) => !e && !t ? null : {
|
|
198
|
+
...e ?? {},
|
|
199
|
+
...t ?? {},
|
|
200
|
+
icons: {
|
|
201
|
+
...e?.icons ?? {},
|
|
202
|
+
...t?.icons ?? {}
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
return () => f("div", {
|
|
206
|
+
ref: g,
|
|
207
|
+
class: "ace-grid-vue__container",
|
|
208
|
+
style: {
|
|
209
|
+
display: "block",
|
|
210
|
+
width: "100%",
|
|
211
|
+
height: "100%"
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
});
|
|
216
|
+
export {
|
|
217
|
+
r as ACE_GRID_VUE_COMMON_EVENTS,
|
|
218
|
+
T as ACE_GRID_VUE_DEFAULT_TAG_NAME,
|
|
219
|
+
j as ACE_GRID_VUE_EVENT_PREFIX,
|
|
220
|
+
K as AceGridComponent,
|
|
221
|
+
K as default
|
|
222
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@ace-grid/vue",
|
|
3
|
+
"version": "1.0.7",
|
|
4
|
+
"description": "Tier-neutral Vue wrapper for Ace Grid Core, Pro, and Enterprise runtimes.",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"module": "./dist/vue.js",
|
|
7
|
+
"types": "./dist/vue.d.ts",
|
|
8
|
+
"exports": {
|
|
9
|
+
".": {
|
|
10
|
+
"types": "./dist/vue.d.ts",
|
|
11
|
+
"import": "./dist/vue.js"
|
|
12
|
+
},
|
|
13
|
+
"./core": {
|
|
14
|
+
"types": "./dist/vue-core.d.ts",
|
|
15
|
+
"import": "./dist/vue-core.js"
|
|
16
|
+
},
|
|
17
|
+
"./pro": {
|
|
18
|
+
"types": "./dist/vue-pro.d.ts",
|
|
19
|
+
"import": "./dist/vue-pro.js"
|
|
20
|
+
},
|
|
21
|
+
"./enterprise": {
|
|
22
|
+
"types": "./dist/vue-enterprise.d.ts",
|
|
23
|
+
"import": "./dist/vue-enterprise.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"scripts": {
|
|
27
|
+
"build": "vite build && tsc -p tsconfig.build.json && node ../../scripts/protect-wrapper-package.mjs vue"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"files": [
|
|
33
|
+
"dist/vue.js",
|
|
34
|
+
"dist/vue.d.ts",
|
|
35
|
+
"dist/vue-core.js",
|
|
36
|
+
"dist/vue-core.d.ts",
|
|
37
|
+
"dist/vue-pro.js",
|
|
38
|
+
"dist/vue-pro.d.ts",
|
|
39
|
+
"dist/vue-enterprise.js",
|
|
40
|
+
"dist/vue-enterprise.d.ts",
|
|
41
|
+
"dist/angularTier-*.mjs"
|
|
42
|
+
],
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"@ace-grid/core": ">=1.0.6 <2.0.0",
|
|
45
|
+
"@ace-grid/pro": ">=1.0.6 <2.0.0",
|
|
46
|
+
"@ace-grid/enterprise": ">=1.0.6 <2.0.0",
|
|
47
|
+
"react": "19.1.1",
|
|
48
|
+
"react-dom": "19.1.1",
|
|
49
|
+
"vue": "^3.5.0"
|
|
50
|
+
},
|
|
51
|
+
"peerDependenciesMeta": {
|
|
52
|
+
"@ace-grid/core": {
|
|
53
|
+
"optional": true
|
|
54
|
+
},
|
|
55
|
+
"@ace-grid/pro": {
|
|
56
|
+
"optional": true
|
|
57
|
+
},
|
|
58
|
+
"@ace-grid/enterprise": {
|
|
59
|
+
"optional": true
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
"license": "MIT",
|
|
63
|
+
"repository": {
|
|
64
|
+
"type": "git",
|
|
65
|
+
"url": "git+https://github.com/Vitashev/gridix.git"
|
|
66
|
+
},
|
|
67
|
+
"bugs": {
|
|
68
|
+
"url": "https://github.com/Vitashev/gridix/issues"
|
|
69
|
+
},
|
|
70
|
+
"homepage": "https://ace-grid.com",
|
|
71
|
+
"keywords": [
|
|
72
|
+
"ace-grid",
|
|
73
|
+
"vue",
|
|
74
|
+
"data-grid",
|
|
75
|
+
"spreadsheet",
|
|
76
|
+
"typescript"
|
|
77
|
+
]
|
|
78
|
+
}
|