@affino/datagrid-vue-app 0.1.37 → 0.1.38
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/dist/DataGrid.d.ts +1 -1
- package/dist/advanced-filter.js +1 -1
- package/dist/aggregations.js +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover-CXT1rG40.js → DataGridAdvancedFilterPopover-JFXqnOOj.js} +1 -1
- package/dist/chunks/{DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-BshOPOFV.js → DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-CDuio50U.js} +1 -1
- package/dist/chunks/{DataGridAggregationsPopover-BRVx8c_y.js → DataGridAggregationsPopover-DS5swHvj.js} +1 -1
- package/dist/chunks/{DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-CsQpLONh.js → DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-Ct7ZV2zk.js} +1 -1
- package/dist/chunks/{DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-Dc5SowKk.js → DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-DOWIAEUl.js} +45 -43
- package/dist/chunks/DataGridGanttStageEntry-jFh25aC1.js +9638 -0
- package/dist/chunks/{useDataGridAppRowModel-JUDjg-Fq.js → useDataGridAppRowModel-CQEe1pSs.js} +1614 -1597
- package/dist/gantt.js +4 -4
- package/dist/index.js +413 -397
- package/dist/internal.js +28 -29
- package/dist/stage/dataGridTableStage.types.d.ts +1 -0
- package/package.json +4 -4
- package/dist/chunks/DataGridGanttStage.vue_vue_type_script_setup_true_lang-DJ72Tgpd.js +0 -1007
- package/dist/chunks/DataGridGanttStageEntry-C4qhNhnp.js +0 -40
- package/dist/chunks/DataGridTableStage.vue_vue_type_script_setup_true_lang-Q2ri6J1V.js +0 -8604
package/dist/DataGrid.d.ts
CHANGED
|
@@ -932,8 +932,8 @@ declare const DataGridRuntimeComponent: import("vue").DefineComponent<{
|
|
|
932
932
|
readonly virtualization: DataGridVirtualizationProp | undefined;
|
|
933
933
|
readonly pagination: DataGridPaginationProp | undefined;
|
|
934
934
|
readonly rowModel: DataGridRowModel<unknown> | undefined;
|
|
935
|
-
readonly aggregations: DataGridAggregationsProp | undefined;
|
|
936
935
|
readonly baseRowHeight: number;
|
|
936
|
+
readonly aggregations: DataGridAggregationsProp | undefined;
|
|
937
937
|
readonly sortModel: readonly DataGridSortState[] | undefined;
|
|
938
938
|
readonly filterModel: DataGridFilterSnapshot | null | undefined;
|
|
939
939
|
readonly groupBy: DataGridGroupByProp | undefined;
|
package/dist/advanced-filter.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as e } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as e } from "./chunks/DataGridAdvancedFilterPopover.vue_vue_type_script_setup_true_lang-CDuio50U.js";
|
|
2
2
|
export {
|
|
3
3
|
e as DataGridAdvancedFilterPopover
|
|
4
4
|
};
|
package/dist/aggregations.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as a } from "./chunks/DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-
|
|
1
|
+
import { _ as a } from "./chunks/DataGridAggregationsPopover.vue_vue_type_script_setup_true_lang-Ct7ZV2zk.js";
|
|
2
2
|
export {
|
|
3
3
|
a as DataGridAggregationsPopover
|
|
4
4
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as j, inject as q, ref as w, computed as v, watch as y, nextTick as P, openBlock as o, createElementBlock as n, Fragment as h, createElementVNode as e, mergeProps as I, unref as s, createCommentVNode as A, createTextVNode as G, toDisplayString as C, createBlock as L, Teleport as z, renderList as T, createVNode as O } from "vue";
|
|
2
2
|
import { usePopoverController as J, useFloatingPopover as K } from "@affino/popover-vue";
|
|
3
|
-
import { _ as k } from "./DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as k } from "./DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-DOWIAEUl.js";
|
|
4
4
|
import { d as M, r as Z } from "./dataGridOverlayThemeVars-vzY74EIz.js";
|
|
5
5
|
import { u as H } from "./useDataGridDraggableOverlaySurface-BgkSR_nl.js";
|
|
6
6
|
const Q = ["data-datagrid-advanced-filter-active"], U = {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { defineComponent as V, inject as E, ref as b, computed as d, watch as _, nextTick as m, openBlock as l, createElementBlock as i, Fragment as y, createElementVNode as e, mergeProps as k, unref as f, toDisplayString as h, createBlock as G, Teleport as D, createVNode as C, renderList as I, createCommentVNode as L } from "vue";
|
|
2
2
|
import { usePopoverController as j, useFloatingPopover as z } from "@affino/popover-vue";
|
|
3
|
-
import { _ as O } from "./DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-
|
|
3
|
+
import { _ as O } from "./DataGridFilterableCombobox.vue_vue_type_script_setup_true_lang-DOWIAEUl.js";
|
|
4
4
|
import { d as q, r as K } from "./dataGridOverlayThemeVars-vzY74EIz.js";
|
|
5
5
|
const U = ["disabled", "title"], H = { class: "datagrid-aggregations__header" }, J = /* @__PURE__ */ e("div", null, [
|
|
6
6
|
/* @__PURE__ */ e("div", { class: "datagrid-aggregations__eyebrow" }, "Aggregations"),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as Ce, inject as ke, ref as v, useAttrs as Le, computed as s, watch as
|
|
1
|
+
import { defineComponent as Ce, inject as ke, ref as v, useAttrs as Le, computed as s, watch as V, nextTick as m, onMounted as Fe, onBeforeUnmount as Se, openBlock as b, createElementBlock as h, createElementVNode as ne, mergeProps as Ae, withModifiers as k, createBlock as Re, Teleport as Me, normalizeStyle as Be, normalizeClass as oe, Fragment as le, renderList as Ve, toDisplayString as De, createCommentVNode as U } from "vue";
|
|
2
2
|
import { d as Te, r as Pe } from "./dataGridOverlayThemeVars-vzY74EIz.js";
|
|
3
3
|
function Ne(n = {}) {
|
|
4
4
|
return {
|
|
@@ -7,7 +7,7 @@ function Ne(n = {}) {
|
|
|
7
7
|
activeIndex: n.activeIndex ?? -1
|
|
8
8
|
};
|
|
9
9
|
}
|
|
10
|
-
function
|
|
10
|
+
function L(n, o) {
|
|
11
11
|
return n.open === o ? n : {
|
|
12
12
|
...n,
|
|
13
13
|
open: o
|
|
@@ -19,7 +19,7 @@ function X(n, o) {
|
|
|
19
19
|
filter: o
|
|
20
20
|
};
|
|
21
21
|
}
|
|
22
|
-
function
|
|
22
|
+
function F(n, o, t) {
|
|
23
23
|
const r = $e(o, t);
|
|
24
24
|
return r === n.activeIndex ? n : {
|
|
25
25
|
...n,
|
|
@@ -30,9 +30,9 @@ function ae(n, o, t, r = !0) {
|
|
|
30
30
|
if (t <= 0 || o === 0)
|
|
31
31
|
return n;
|
|
32
32
|
if (n.activeIndex < 0)
|
|
33
|
-
return
|
|
33
|
+
return F(n, o > 0 ? 0 : t - 1, t);
|
|
34
34
|
const u = n.activeIndex + Math.trunc(o);
|
|
35
|
-
return r ?
|
|
35
|
+
return r ? F(n, Ge(u, t), t) : F(n, u, t);
|
|
36
36
|
}
|
|
37
37
|
function $e(n, o) {
|
|
38
38
|
if (o <= 0)
|
|
@@ -101,8 +101,8 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
101
101
|
},
|
|
102
102
|
emits: ["commit", "cancel", "optionsResolved"],
|
|
103
103
|
setup(n, { emit: o }) {
|
|
104
|
-
const t = n, r = o, u = ke(Te, v(null)), c = Le(), w = v(null), d = v(null), I = v(null), q = v({}), D = v({}),
|
|
105
|
-
let
|
|
104
|
+
const t = n, r = o, u = ke(Te, v(null)), c = Le(), w = v(null), d = v(null), I = v(null), q = v({}), D = v({}), S = v("below"), E = v(""), T = v(!1), P = v([]), l = v(Ne({ open: !1 })), O = `datagrid-filterable-combobox-${Math.random().toString(36).slice(2, 10)}`, ue = `${O}-input`, se = `${O}-field`;
|
|
105
|
+
let A = 0;
|
|
106
106
|
const ce = s(() => {
|
|
107
107
|
const {
|
|
108
108
|
class: e,
|
|
@@ -128,7 +128,7 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
128
128
|
]), pe = s(() => c.style), me = s(() => {
|
|
129
129
|
if (!t.inlinePanel)
|
|
130
130
|
return "body";
|
|
131
|
-
}), N = s(() => j.value.find((e) => e.value === t.value) ?? null), j = s(() => t.loadOptions && P.value.length > 0 ? P.value : t.options), p = s(() => Je(j.value, l.value.filter)), _ = s(() => l.value.activeIndex),
|
|
131
|
+
}), N = s(() => j.value.find((e) => e.value === t.value) ?? null), j = s(() => t.loadOptions && P.value.length > 0 ? P.value : t.options), p = s(() => Je(j.value, l.value.filter)), _ = s(() => l.value.activeIndex), R = s(() => _.value >= 0 ? p.value[_.value] ?? null : null), be = s(() => _.value >= 0 ? J(_.value) : void 0), $ = s(() => l.value.open);
|
|
132
132
|
function J(e) {
|
|
133
133
|
return `${O}-option-${e}`;
|
|
134
134
|
}
|
|
@@ -155,27 +155,27 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
155
155
|
const f = a.findIndex((y) => y.value === N.value?.value);
|
|
156
156
|
f >= 0 && (i = f);
|
|
157
157
|
}
|
|
158
|
-
l.value =
|
|
158
|
+
l.value = F(l.value, i, a.length);
|
|
159
159
|
}
|
|
160
160
|
async function H(e) {
|
|
161
161
|
if (!t.loadOptions)
|
|
162
162
|
return;
|
|
163
|
-
const a =
|
|
164
|
-
|
|
163
|
+
const a = A + 1;
|
|
164
|
+
A = a, T.value = !0;
|
|
165
165
|
try {
|
|
166
166
|
const i = await t.loadOptions(e);
|
|
167
|
-
if (a !==
|
|
167
|
+
if (a !== A)
|
|
168
168
|
return;
|
|
169
169
|
P.value = i, r("optionsResolved", i), C(!0), m(() => {
|
|
170
170
|
g(), x();
|
|
171
171
|
});
|
|
172
172
|
} finally {
|
|
173
|
-
a ===
|
|
173
|
+
a === A && (T.value = !1);
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
function g() {
|
|
177
177
|
if (t.inlinePanel) {
|
|
178
|
-
|
|
178
|
+
S.value = "below", D.value = {
|
|
179
179
|
position: "absolute",
|
|
180
180
|
top: "calc(100% - 1px)",
|
|
181
181
|
left: "0px",
|
|
@@ -188,7 +188,7 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
188
188
|
if (typeof window > "u" || !d.value)
|
|
189
189
|
return;
|
|
190
190
|
const e = d.value.getBoundingClientRect(), a = Math.max(e.width, 160), i = Math.min(I.value?.offsetHeight ?? 220, 260), y = window.innerHeight - e.bottom - 8 < Math.min(180, i) && e.top > i + 12;
|
|
191
|
-
|
|
191
|
+
S.value = y ? "above" : "below";
|
|
192
192
|
const ee = y ? Math.max(8, e.top - i + 1) : Math.min(window.innerHeight - i - 8, e.bottom - 1), te = Math.min(
|
|
193
193
|
Math.max(8, e.left),
|
|
194
194
|
Math.max(8, window.innerWidth - a - 8)
|
|
@@ -208,7 +208,7 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
208
208
|
I.value.querySelector(`[data-option-index="${_.value}"]`)?.scrollIntoView({ block: "nearest" });
|
|
209
209
|
}
|
|
210
210
|
function W() {
|
|
211
|
-
t.disabled || (l.value =
|
|
211
|
+
t.disabled || (l.value = L(l.value, !0), C(!0), m(() => {
|
|
212
212
|
if (g(), x(), d.value?.focus({ preventScroll: !0 }), !!d.value) {
|
|
213
213
|
if (l.value.filter.length > 0) {
|
|
214
214
|
const e = d.value.value.length;
|
|
@@ -219,8 +219,8 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
219
219
|
}
|
|
220
220
|
}), t.loadOptions && H(l.value.filter));
|
|
221
221
|
}
|
|
222
|
-
function
|
|
223
|
-
l.value =
|
|
222
|
+
function M() {
|
|
223
|
+
l.value = L(l.value, !1);
|
|
224
224
|
}
|
|
225
225
|
function _e(e) {
|
|
226
226
|
return e instanceof Node && (w.value?.contains(e) === !0 || I.value?.contains(e) === !0);
|
|
@@ -228,19 +228,19 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
228
228
|
function xe() {
|
|
229
229
|
if (l.value.filter.trim().length === 0)
|
|
230
230
|
return t.value;
|
|
231
|
-
if (
|
|
232
|
-
return
|
|
231
|
+
if (R.value)
|
|
232
|
+
return R.value.value;
|
|
233
233
|
const e = E.value.trim().toLocaleLowerCase();
|
|
234
234
|
return e.length === 0 ? t.value : p.value.find((i) => i.label.trim().toLocaleLowerCase() === e || i.value.trim().toLocaleLowerCase() === e)?.value ?? t.value;
|
|
235
235
|
}
|
|
236
236
|
function Z(e = "stay") {
|
|
237
|
-
|
|
237
|
+
M(), r("commit", xe(), e);
|
|
238
238
|
}
|
|
239
239
|
function Q(e, a = "stay") {
|
|
240
|
-
|
|
240
|
+
M(), r("commit", e, a);
|
|
241
241
|
}
|
|
242
242
|
function K(e) {
|
|
243
|
-
l.value =
|
|
243
|
+
l.value = F(l.value, e, p.value.length), m(x);
|
|
244
244
|
}
|
|
245
245
|
function ye() {
|
|
246
246
|
t.openOnFocus && W();
|
|
@@ -252,7 +252,7 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
252
252
|
if (t.disabled)
|
|
253
253
|
return;
|
|
254
254
|
const a = e.target.value;
|
|
255
|
-
E.value = a, l.value = X(l.value, a), l.value =
|
|
255
|
+
E.value = a, l.value = X(l.value, a), l.value = L(l.value, !0), C(!1), m(() => {
|
|
256
256
|
g(), x();
|
|
257
257
|
}), t.loadOptions && H(a);
|
|
258
258
|
}
|
|
@@ -264,11 +264,11 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
264
264
|
function Ee(e) {
|
|
265
265
|
if (!t.disabled) {
|
|
266
266
|
if (e.key === "ArrowDown") {
|
|
267
|
-
e.preventDefault(), l.value =
|
|
267
|
+
e.preventDefault(), l.value = L(l.value, !0), l.value = ae(l.value, 1, p.value.length, !0), m(x);
|
|
268
268
|
return;
|
|
269
269
|
}
|
|
270
270
|
if (e.key === "ArrowUp") {
|
|
271
|
-
e.preventDefault(), l.value =
|
|
271
|
+
e.preventDefault(), l.value = L(l.value, !0), l.value = ae(l.value, -1, p.value.length, !0), m(x);
|
|
272
272
|
return;
|
|
273
273
|
}
|
|
274
274
|
if (e.key === "Home") {
|
|
@@ -280,33 +280,33 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
280
280
|
return;
|
|
281
281
|
}
|
|
282
282
|
if (e.key === "Enter" || e.key === "Tab") {
|
|
283
|
-
if (e.preventDefault(),
|
|
284
|
-
Q(
|
|
283
|
+
if (e.preventDefault(), R.value) {
|
|
284
|
+
Q(R.value.value, e.shiftKey ? "previous" : "next");
|
|
285
285
|
return;
|
|
286
286
|
}
|
|
287
287
|
Z(e.shiftKey ? "previous" : "next");
|
|
288
288
|
return;
|
|
289
289
|
}
|
|
290
|
-
e.key === "Escape" && (e.preventDefault(),
|
|
290
|
+
e.key === "Escape" && (e.preventDefault(), M(), r("cancel"));
|
|
291
291
|
}
|
|
292
292
|
}
|
|
293
|
-
function
|
|
293
|
+
function B() {
|
|
294
294
|
$.value && g();
|
|
295
295
|
}
|
|
296
|
-
return
|
|
296
|
+
return V(() => t.options, () => {
|
|
297
297
|
t.loadOptions || (C(!0), m(g));
|
|
298
|
-
}, { immediate: !0 }),
|
|
298
|
+
}, { immediate: !0 }), V(() => t.value, () => {
|
|
299
299
|
G();
|
|
300
|
-
}),
|
|
300
|
+
}), V(() => t.initialFilter, (e) => {
|
|
301
301
|
document.activeElement !== d.value && (l.value = X(l.value, e), e.length > 0 ? (Y(), H(e)) : G(), C(!0), m(() => {
|
|
302
302
|
g(), x();
|
|
303
303
|
}));
|
|
304
|
-
}),
|
|
305
|
-
e &&
|
|
304
|
+
}), V(() => t.disabled, (e) => {
|
|
305
|
+
e && M();
|
|
306
306
|
}), Fe(() => {
|
|
307
|
-
he(), t.initialFilter.length > 0 ? (l.value = X(l.value, t.initialFilter), Y()) : G(), t.openOnMount && W(), typeof window < "u" && (window.addEventListener("resize",
|
|
307
|
+
he(), t.initialFilter.length > 0 ? (l.value = X(l.value, t.initialFilter), Y()) : G(), t.openOnMount && W(), typeof window < "u" && (window.addEventListener("resize", B), window.addEventListener("scroll", B, !0));
|
|
308
308
|
}), Se(() => {
|
|
309
|
-
typeof window < "u" && (window.removeEventListener("resize",
|
|
309
|
+
typeof window < "u" && (window.removeEventListener("resize", B), window.removeEventListener("scroll", B, !0));
|
|
310
310
|
}), (e, a) => (b(), h("div", {
|
|
311
311
|
ref_key: "rootEl",
|
|
312
312
|
ref: w,
|
|
@@ -330,9 +330,11 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
330
330
|
"aria-autocomplete": "list",
|
|
331
331
|
"aria-activedescendant": be.value,
|
|
332
332
|
onFocus: ye,
|
|
333
|
-
|
|
333
|
+
onMousedown: a[0] || (a[0] = k(() => {
|
|
334
|
+
}, ["stop"])),
|
|
335
|
+
onClick: k(ge, ["stop"]),
|
|
334
336
|
onInput: we,
|
|
335
|
-
onKeydown:
|
|
337
|
+
onKeydown: k(Ee, ["stop"]),
|
|
336
338
|
onBlur: Ie
|
|
337
339
|
}), null, 16, Ze),
|
|
338
340
|
(b(), Re(Me, {
|
|
@@ -346,13 +348,13 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
346
348
|
ref: I,
|
|
347
349
|
class: oe(["datagrid-cell-combobox__panel", {
|
|
348
350
|
"datagrid-cell-combobox__panel--inline": e.inlinePanel,
|
|
349
|
-
"datagrid-cell-combobox__panel--attached-below":
|
|
350
|
-
"datagrid-cell-combobox__panel--attached-above":
|
|
351
|
+
"datagrid-cell-combobox__panel--attached-below": S.value === "below",
|
|
352
|
+
"datagrid-cell-combobox__panel--attached-above": S.value === "above"
|
|
351
353
|
}]),
|
|
352
354
|
"data-affino-popover-sticky": e.stickyPopoverId || void 0,
|
|
353
355
|
style: Be([q.value, D.value]),
|
|
354
356
|
role: "listbox",
|
|
355
|
-
onMousedown: a[
|
|
357
|
+
onMousedown: a[1] || (a[1] = k(() => {
|
|
356
358
|
}, ["prevent"]))
|
|
357
359
|
}, [
|
|
358
360
|
T.value ? (b(), h("div", et, "Loading options...")) : (b(), h(le, { key: 1 }, [
|
|
@@ -368,7 +370,7 @@ const Ze = ["id", "name", "value", "placeholder", "disabled", "aria-expanded", "
|
|
|
368
370
|
"aria-selected": i.value === e.value ? "true" : "false",
|
|
369
371
|
"data-option-index": f,
|
|
370
372
|
onMousemove: (y) => K(f),
|
|
371
|
-
onClick:
|
|
373
|
+
onClick: k((y) => Q(i.value), ["stop"])
|
|
372
374
|
}, [
|
|
373
375
|
ne("span", nt, De(i.label), 1),
|
|
374
376
|
i.value === e.value ? (b(), h("span", ot)) : U("", !0)
|