@digitalwalletcorp/vue-core 1.3.0 → 1.4.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 +36 -0
- package/lib/{components-2zQ2SZuY.js → components-B2jz-g6A.js} +1 -1
- package/lib/{components-HaiHcseF.cjs → components-COL2ZbhC.cjs} +1 -1
- package/lib/data-table.d.cts +101 -9
- package/lib/data-table.d.ts +101 -9
- package/lib/helpers/show-floating-component.d.cts +8 -4
- package/lib/helpers/show-floating-component.d.ts +8 -4
- package/lib/helpers/vue-core-options.d.cts +17 -0
- package/lib/helpers/vue-core-options.d.ts +17 -0
- package/lib/index.cjs +1 -1
- package/lib/index.d.cts +5 -2
- package/lib/index.d.ts +5 -2
- package/lib/index.js +79 -78
- package/lib/internal/data-table-controls.d.cts +2 -2
- package/lib/internal/data-table-controls.d.ts +2 -2
- package/lib/nuxt.cjs +1 -1
- package/lib/nuxt.js +1 -1
- package/lib/register.cjs +1 -1
- package/lib/register.js +1 -1
- package/lib/types/data-table.d.cts +1 -94
- package/lib/types/data-table.d.ts +1 -94
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-4FIOsOY5.cjs +1 -0
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-CgXoSjjp.js +1865 -0
- package/package.json +1 -1
- package/src/data-table.vue +210 -65
- package/src/helpers/show-floating-component.ts +22 -14
- package/src/helpers/vue-core-options.ts +20 -0
- package/src/index.ts +5 -2
- package/src/types/data-table.ts +1 -98
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-CxVzqsbn.cjs +0 -1
- package/lib/warning-popper.vue_vue_type_style_index_0_lang-zt-jCsvz.js +0 -1833
package/lib/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { r as
|
|
2
|
-
import { f as Xe, h as Ye, i as Qe, j as Ze, k as en, l as nn, m as tn, o as on, p as an, q as sn, s as ln, t as rn, u as cn, v as dn, w as un } from "./warning-popper.vue_vue_type_style_index_0_lang-
|
|
3
|
-
import { defineComponent as E, ref as
|
|
1
|
+
import { r as J, g as X, n as A, _ as Y, a as Q, c as Z, b as ee, d as ne, e as te } from "./warning-popper.vue_vue_type_style_index_0_lang-CgXoSjjp.js";
|
|
2
|
+
import { f as Xe, h as Ye, i as Qe, j as Ze, k as en, l as nn, m as tn, o as on, p as an, q as sn, s as ln, t as rn, u as cn, v as dn, w as un, x as pn } from "./warning-popper.vue_vue_type_style_index_0_lang-CgXoSjjp.js";
|
|
3
|
+
import { defineComponent as E, ref as C, onMounted as oe, openBlock as p, createBlock as L, Transition as ae, withCtx as b, normalizeStyle as P, normalizeClass as S, createSlots as se, renderSlot as le, createTextVNode as re, toDisplayString as y, createVNode as F, createCommentVNode as g, getCurrentInstance as ie, onBeforeUnmount as ce, render as m, h as u, computed as M, TransitionGroup as de, createElementBlock as f, unref as ue, Fragment as pe, renderList as me, createElementVNode as fe, shallowReactive as we } from "vue";
|
|
4
4
|
import { SvgWastebasket as ge } from "@digitalwalletcorp/vue-svg-icons";
|
|
5
|
-
const he = "$index",
|
|
5
|
+
const he = "$index", H = (n) => {
|
|
6
6
|
const t = [];
|
|
7
7
|
for (const e of n)
|
|
8
8
|
if (e.csv === !0)
|
|
@@ -11,7 +11,7 @@ const he = "$index", F = (n) => {
|
|
|
11
11
|
for (const o of e.csv)
|
|
12
12
|
o.disabled || t.push({ header: e, column: o });
|
|
13
13
|
return t;
|
|
14
|
-
},
|
|
14
|
+
}, De = (n) => H(n).map(({ header: t, column: e }) => J(e.label ?? t.label)), Ae = (n, t, e) => H(n).map(({ header: o, column: a }) => {
|
|
15
15
|
if (a.format)
|
|
16
16
|
return a.format(t);
|
|
17
17
|
const s = a.key ?? o.id;
|
|
@@ -35,8 +35,8 @@ const he = "$index", F = (n) => {
|
|
|
35
35
|
},
|
|
36
36
|
emits: ["update:open", "emit:close"],
|
|
37
37
|
setup(n, { emit: t }) {
|
|
38
|
-
const e = n, o = t, a =
|
|
39
|
-
s.value =
|
|
38
|
+
const e = n, o = t, a = C(), s = C(A()), r = () => {
|
|
39
|
+
s.value = A();
|
|
40
40
|
}, i = () => {
|
|
41
41
|
e.closeOnDblClick && o("update:open", !1);
|
|
42
42
|
}, l = () => {
|
|
@@ -48,38 +48,38 @@ const he = "$index", F = (n) => {
|
|
|
48
48
|
window.innerWidth < w && (w = window.innerWidth * 0.9);
|
|
49
49
|
let h = e.initialSize?.height ?? -1;
|
|
50
50
|
window.innerHeight < h && (h = window.innerHeight * 0.9), c.size.width = w, c.size.height = h;
|
|
51
|
-
const
|
|
51
|
+
const O = document.documentElement.scrollLeft, T = document.documentElement.scrollTop;
|
|
52
52
|
if (e.anchor) {
|
|
53
|
-
const
|
|
53
|
+
const U = {
|
|
54
54
|
width: w,
|
|
55
55
|
height: 0 <= h ? h : d.height
|
|
56
|
-
},
|
|
56
|
+
}, q = {
|
|
57
57
|
width: document.documentElement.clientWidth,
|
|
58
58
|
height: document.documentElement.clientHeight
|
|
59
|
-
},
|
|
59
|
+
}, D = Z(e.anchor.getBoundingClientRect(), U, q, {
|
|
60
60
|
placement: "bottom-start",
|
|
61
61
|
offset: 0,
|
|
62
62
|
margin: 0,
|
|
63
63
|
arrowMargin: 0
|
|
64
64
|
});
|
|
65
|
-
c.position.x =
|
|
65
|
+
c.position.x = D.left + O, c.position.y = D.top + T;
|
|
66
66
|
} else
|
|
67
|
-
c.position.x = 10 +
|
|
67
|
+
c.position.x = 10 + O, c.position.y = 10 + T;
|
|
68
68
|
};
|
|
69
69
|
return oe(() => {
|
|
70
70
|
e.open && l();
|
|
71
|
-
}), (c, d) => (
|
|
71
|
+
}), (c, d) => (p(), L(ae, {
|
|
72
72
|
name: "dwui-floating-component-fade",
|
|
73
73
|
onAfterLeave: d[1] || (d[1] = (w) => o("emit:close"))
|
|
74
74
|
}, {
|
|
75
75
|
default: b(() => [
|
|
76
|
-
e.open ? (
|
|
76
|
+
e.open ? (p(), L(Y, {
|
|
77
77
|
key: 0,
|
|
78
78
|
ref_key: "refWindow",
|
|
79
79
|
ref: a,
|
|
80
80
|
class: S(["dwui-floating-component", { "dwui-lock-scroll": e.lockScroll }]),
|
|
81
81
|
name: "dwui-floating-component",
|
|
82
|
-
style:
|
|
82
|
+
style: P({ "--dwui-order-window": s.value }),
|
|
83
83
|
"drag-mode": e.dragMode,
|
|
84
84
|
loading: e.loading,
|
|
85
85
|
"close-label": e.closeLabel,
|
|
@@ -101,7 +101,7 @@ const he = "$index", F = (n) => {
|
|
|
101
101
|
e.copyValue != null ? {
|
|
102
102
|
name: "actions",
|
|
103
103
|
fn: b(() => [
|
|
104
|
-
|
|
104
|
+
F(Q, {
|
|
105
105
|
class: "dwui-floating-component-copy-button",
|
|
106
106
|
value: e.copyValue,
|
|
107
107
|
"aria-label": e.copyLabel
|
|
@@ -118,7 +118,7 @@ const he = "$index", F = (n) => {
|
|
|
118
118
|
function V(n, t, e) {
|
|
119
119
|
const o = document.createElement("div");
|
|
120
120
|
document.body.appendChild(o);
|
|
121
|
-
const a =
|
|
121
|
+
const a = C(!0), s = C(!1), r = {
|
|
122
122
|
close: () => {
|
|
123
123
|
a.value = !1;
|
|
124
124
|
},
|
|
@@ -134,10 +134,10 @@ function V(n, t, e) {
|
|
|
134
134
|
"onEmit:close": () => {
|
|
135
135
|
e.delete(r), m(null, o), o.remove(), t.onClosed?.(), t.onClose?.();
|
|
136
136
|
}
|
|
137
|
-
}, r)), l =
|
|
137
|
+
}, r)), l = u(i);
|
|
138
138
|
return t.appContext && (l.appContext = t.appContext), m(l, o), e.add(r), r;
|
|
139
139
|
}
|
|
140
|
-
function
|
|
140
|
+
function I(n) {
|
|
141
141
|
const t = ie();
|
|
142
142
|
if (!t)
|
|
143
143
|
throw new Error(`${n}() must be called inside setup().`);
|
|
@@ -155,9 +155,9 @@ function H(n) {
|
|
|
155
155
|
}
|
|
156
156
|
};
|
|
157
157
|
}
|
|
158
|
-
const
|
|
158
|
+
const z = /* @__PURE__ */ new Set(), k = (n, t, e) => {
|
|
159
159
|
const { appContext: o, onClose: a, ...s } = t ?? {};
|
|
160
|
-
return V((r, i) =>
|
|
160
|
+
return V((r, i) => u(be, {
|
|
161
161
|
closeLabel: "Close",
|
|
162
162
|
copyLabel: "Copy",
|
|
163
163
|
closeOnDblClick: !1,
|
|
@@ -166,38 +166,38 @@ const I = /* @__PURE__ */ new Set(), k = (n, t, e) => {
|
|
|
166
166
|
...r
|
|
167
167
|
}, {
|
|
168
168
|
default: () => n(i)
|
|
169
|
-
}), { appContext: o, onClose: a, onClosed: e },
|
|
170
|
-
},
|
|
169
|
+
}), { appContext: o, onClose: a, onClosed: e }, z);
|
|
170
|
+
}, N = (n, t) => (e) => u(n, {
|
|
171
171
|
...t,
|
|
172
172
|
...e
|
|
173
|
-
}),
|
|
173
|
+
}), $ = (n) => typeof n == "string" ? n : JSON.stringify(n, null, 2), R = (n, t) => () => t && typeof n == "string" ? u("div", { class: "dwui-floating-component-message", innerHTML: n }) : u("div", { class: "dwui-floating-component-message" }, $(n));
|
|
174
174
|
function Me(n, t, e) {
|
|
175
|
-
return k(
|
|
175
|
+
return k(N(n, t), e);
|
|
176
176
|
}
|
|
177
177
|
function We(n, t) {
|
|
178
|
-
const e =
|
|
179
|
-
return k(R(e), {
|
|
180
|
-
copyValue:
|
|
181
|
-
...
|
|
178
|
+
const { html: e, ...o } = t ?? {};
|
|
179
|
+
return k(R(n, e), {
|
|
180
|
+
copyValue: $(n),
|
|
181
|
+
...o
|
|
182
182
|
});
|
|
183
183
|
}
|
|
184
184
|
function Pe() {
|
|
185
|
-
for (const n of [...
|
|
185
|
+
for (const n of [...z])
|
|
186
186
|
n.close();
|
|
187
187
|
}
|
|
188
188
|
function Fe() {
|
|
189
|
-
const n =
|
|
189
|
+
const n = I("useFloatingComponent"), t = (e) => ({
|
|
190
190
|
appContext: n.appContext,
|
|
191
191
|
...e
|
|
192
192
|
});
|
|
193
193
|
return {
|
|
194
|
-
showFloatingComponent: (e, o, a) => n.own((s) => k(
|
|
194
|
+
showFloatingComponent: (e, o, a) => n.own((s) => k(N(e, o), t(a), s)),
|
|
195
195
|
showFloatingMessage: (e, o) => {
|
|
196
|
-
const a =
|
|
197
|
-
return n.own((
|
|
198
|
-
copyValue:
|
|
199
|
-
...
|
|
200
|
-
}),
|
|
196
|
+
const { html: a, ...s } = o ?? {};
|
|
197
|
+
return n.own((r) => k(R(e, a), t({
|
|
198
|
+
copyValue: $(e),
|
|
199
|
+
...s
|
|
200
|
+
}), r));
|
|
201
201
|
}
|
|
202
202
|
};
|
|
203
203
|
}
|
|
@@ -206,24 +206,24 @@ function _(n, t) {
|
|
|
206
206
|
return new Promise((s) => {
|
|
207
207
|
const r = document.createElement("div");
|
|
208
208
|
document.body.appendChild(r);
|
|
209
|
-
const i =
|
|
209
|
+
const i = u(ee, {
|
|
210
210
|
...a,
|
|
211
211
|
message: n,
|
|
212
212
|
open: !0,
|
|
213
213
|
"onEmit:close": (l) => {
|
|
214
214
|
m(null, r), r.remove(), s(l);
|
|
215
215
|
}
|
|
216
|
-
}, e ? { icon: () =>
|
|
216
|
+
}, e ? { icon: () => u(e) } : void 0);
|
|
217
217
|
o && (i.appContext = o), m(i, r);
|
|
218
218
|
});
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function He(n, t) {
|
|
221
221
|
return _(n, {
|
|
222
222
|
...t,
|
|
223
223
|
type: "info"
|
|
224
224
|
});
|
|
225
225
|
}
|
|
226
|
-
function
|
|
226
|
+
function Ve(n, t) {
|
|
227
227
|
return _(n, {
|
|
228
228
|
...t,
|
|
229
229
|
type: "confirm"
|
|
@@ -243,11 +243,11 @@ function ze(n, t) {
|
|
|
243
243
|
}
|
|
244
244
|
const j = /* @__PURE__ */ new Set(), G = (n, t, e, o) => {
|
|
245
245
|
const { appContext: a, onClose: s, ...r } = e ?? {};
|
|
246
|
-
return V((i, l) =>
|
|
246
|
+
return V((i, l) => u(ne, {
|
|
247
247
|
...r,
|
|
248
248
|
...i
|
|
249
249
|
}, {
|
|
250
|
-
default: () =>
|
|
250
|
+
default: () => u(n, {
|
|
251
251
|
...t,
|
|
252
252
|
close: l.close,
|
|
253
253
|
setLoading: l.setLoading
|
|
@@ -262,7 +262,7 @@ function Re() {
|
|
|
262
262
|
n.close();
|
|
263
263
|
}
|
|
264
264
|
function je() {
|
|
265
|
-
const n =
|
|
265
|
+
const n = I("useOverlayBox");
|
|
266
266
|
return {
|
|
267
267
|
showOverlayBox: (t, e, o) => n.own((a) => G(t, e, {
|
|
268
268
|
appContext: n.appContext,
|
|
@@ -276,12 +276,12 @@ function Ge(n) {
|
|
|
276
276
|
const e = () => {
|
|
277
277
|
m(null, t), t.remove();
|
|
278
278
|
};
|
|
279
|
-
return m(
|
|
279
|
+
return m(u(te, {
|
|
280
280
|
...n,
|
|
281
281
|
loading: !0
|
|
282
282
|
}), t), { close: e };
|
|
283
283
|
}
|
|
284
|
-
const ye = ["aria-label", "title"],
|
|
284
|
+
const ye = ["aria-label", "title"], ve = ["title", "onClick"], Ce = {
|
|
285
285
|
key: 0,
|
|
286
286
|
class: "dwui-snackbar-header"
|
|
287
287
|
}, ke = {
|
|
@@ -302,15 +302,15 @@ const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
|
|
|
302
302
|
},
|
|
303
303
|
emits: ["emit:close", "emit:clear", "emit:afterLeave"],
|
|
304
304
|
setup(n, { emit: t }) {
|
|
305
|
-
const e = n, o = t, a =
|
|
305
|
+
const e = n, o = t, a = M(() => {
|
|
306
306
|
const [r, i = "center"] = e.placement.split("-");
|
|
307
307
|
return [
|
|
308
308
|
`dwui-snackbar-container-${r}`,
|
|
309
309
|
`dwui-snackbar-container-${i}`,
|
|
310
310
|
`dwui-snackbar-container-${e.direction}`
|
|
311
311
|
];
|
|
312
|
-
}), s =
|
|
313
|
-
return (r, i) => (
|
|
312
|
+
}), s = M(() => e.items.filter((r) => r.clearable).at(-1)?.clearLabel);
|
|
313
|
+
return (r, i) => (p(), L(de, {
|
|
314
314
|
tag: "div",
|
|
315
315
|
name: "dwui-snackbar-fade",
|
|
316
316
|
class: S(["dwui-snackbar-container", a.value]),
|
|
@@ -318,7 +318,7 @@ const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
|
|
|
318
318
|
onAfterLeave: i[1] || (i[1] = (l) => o("emit:afterLeave"))
|
|
319
319
|
}, {
|
|
320
320
|
default: b(() => [
|
|
321
|
-
s.value != null ? (
|
|
321
|
+
s.value != null ? (p(), f("button", {
|
|
322
322
|
key: "clear",
|
|
323
323
|
type: "button",
|
|
324
324
|
class: "dwui-snackbar-clear-button",
|
|
@@ -326,29 +326,29 @@ const ye = ["aria-label", "title"], Ce = ["title", "onClick"], ve = {
|
|
|
326
326
|
title: s.value,
|
|
327
327
|
onClick: i[0] || (i[0] = (l) => o("emit:clear"))
|
|
328
328
|
}, [
|
|
329
|
-
|
|
329
|
+
F(ue(ge))
|
|
330
330
|
], 8, ye)) : g("", !0),
|
|
331
|
-
(
|
|
331
|
+
(p(!0), f(pe, null, me(e.items, (l) => (p(), f("button", {
|
|
332
332
|
key: l.id,
|
|
333
333
|
type: "button",
|
|
334
334
|
class: S(["dwui-snackbar", l.class]),
|
|
335
|
-
style:
|
|
335
|
+
style: P(l.style),
|
|
336
336
|
title: l.message,
|
|
337
337
|
onClick: (c) => o("emit:close", l.id)
|
|
338
338
|
}, [
|
|
339
|
-
l.title || l.label ? (
|
|
340
|
-
l.title ? (
|
|
341
|
-
l.label ? (
|
|
339
|
+
l.title || l.label ? (p(), f("span", Ce, [
|
|
340
|
+
l.title ? (p(), f("span", ke, y(l.title), 1)) : g("", !0),
|
|
341
|
+
l.label ? (p(), f("span", xe, y(l.label), 1)) : g("", !0)
|
|
342
342
|
])) : g("", !0),
|
|
343
343
|
fe("span", _e, y(l.message), 1),
|
|
344
|
-
l.timestamp ? (
|
|
345
|
-
], 14,
|
|
344
|
+
l.timestamp ? (p(), f("span", Le, y(l.timestamp), 1)) : g("", !0)
|
|
345
|
+
], 14, ve))), 128))
|
|
346
346
|
]),
|
|
347
347
|
_: 1
|
|
348
348
|
}, 8, ["class"]));
|
|
349
349
|
}
|
|
350
|
-
}), Be = 50,
|
|
351
|
-
let
|
|
350
|
+
}), Be = 50, v = /* @__PURE__ */ new Map(), B = /* @__PURE__ */ new Map();
|
|
351
|
+
let W = 0;
|
|
352
352
|
const x = (n, t, e) => {
|
|
353
353
|
const o = n.findIndex((s) => s.id === t);
|
|
354
354
|
if (o < 0)
|
|
@@ -356,29 +356,29 @@ const x = (n, t, e) => {
|
|
|
356
356
|
n.splice(o, 1);
|
|
357
357
|
const a = B.get(t);
|
|
358
358
|
B.delete(t), clearTimeout(a?.timer), a?.onClose?.(e);
|
|
359
|
-
},
|
|
359
|
+
}, K = (n) => {
|
|
360
360
|
const t = n.map((e) => e.id);
|
|
361
361
|
for (let e = 0; e < t.length; e++)
|
|
362
362
|
setTimeout(() => x(n, t[e], "clear"), Be * e);
|
|
363
363
|
}, Ee = (n, t) => {
|
|
364
|
-
const e = `${n} ${t}`, o =
|
|
364
|
+
const e = `${n} ${t}`, o = v.get(e);
|
|
365
365
|
if (o)
|
|
366
366
|
return o;
|
|
367
367
|
const a = document.createElement("div");
|
|
368
368
|
document.body.appendChild(a);
|
|
369
369
|
const s = we([]);
|
|
370
|
-
return
|
|
370
|
+
return v.set(e, s), m(u(Se, {
|
|
371
371
|
placement: n,
|
|
372
372
|
direction: t,
|
|
373
373
|
items: s,
|
|
374
374
|
"onEmit:close": (r) => x(s, r, "click"),
|
|
375
|
-
"onEmit:clear": () =>
|
|
375
|
+
"onEmit:clear": () => K(s),
|
|
376
376
|
"onEmit:afterLeave": () => {
|
|
377
|
-
s.length === 0 &&
|
|
377
|
+
s.length === 0 && v.get(e) === s && (v.delete(e), m(null, a), a.remove());
|
|
378
378
|
}
|
|
379
379
|
}), a), s;
|
|
380
380
|
};
|
|
381
|
-
function
|
|
381
|
+
function Ke(n, t) {
|
|
382
382
|
const {
|
|
383
383
|
placement: e = "bottom",
|
|
384
384
|
direction: o = "overlap",
|
|
@@ -388,8 +388,8 @@ function Ue(n, t) {
|
|
|
388
388
|
onClose: i,
|
|
389
389
|
...l
|
|
390
390
|
} = t ?? {}, c = Ee(e, o);
|
|
391
|
-
|
|
392
|
-
const d =
|
|
391
|
+
W += 1;
|
|
392
|
+
const d = W;
|
|
393
393
|
return c.push({
|
|
394
394
|
...l,
|
|
395
395
|
id: d,
|
|
@@ -403,9 +403,9 @@ function Ue(n, t) {
|
|
|
403
403
|
close: () => x(c, d, "handle")
|
|
404
404
|
};
|
|
405
405
|
}
|
|
406
|
-
function
|
|
407
|
-
for (const n of
|
|
408
|
-
|
|
406
|
+
function Ue() {
|
|
407
|
+
for (const n of v.values())
|
|
408
|
+
K(n);
|
|
409
409
|
}
|
|
410
410
|
export {
|
|
411
411
|
Xe as AccordionFieldset,
|
|
@@ -429,19 +429,20 @@ export {
|
|
|
429
429
|
un as WarningPopper,
|
|
430
430
|
Pe as closeAllFloatingComponents,
|
|
431
431
|
Re as closeAllOverlayBoxes,
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
Ue as closeAllSnackbars,
|
|
433
|
+
De as headersToCsvColumns,
|
|
434
434
|
Ae as rowToCsvColumns,
|
|
435
|
-
|
|
435
|
+
Ve as showConfirmationDialog,
|
|
436
436
|
ze as showErrorDialog,
|
|
437
437
|
Me as showFloatingComponent,
|
|
438
438
|
We as showFloatingMessage,
|
|
439
|
-
|
|
439
|
+
He as showInformationDialog,
|
|
440
440
|
_ as showModalDialog,
|
|
441
441
|
Ne as showOverlayBox,
|
|
442
442
|
Ge as showScreenLoading,
|
|
443
|
-
|
|
443
|
+
Ke as showSnackbar,
|
|
444
444
|
Ie as showWarningDialog,
|
|
445
445
|
Fe as useFloatingComponent,
|
|
446
|
-
je as useOverlayBox
|
|
446
|
+
je as useOverlayBox,
|
|
447
|
+
pn as vueCoreOptionsKey
|
|
447
448
|
};
|
|
@@ -28,13 +28,13 @@ interface Props {
|
|
|
28
28
|
formatTotalCount?: (count: number) => string;
|
|
29
29
|
}
|
|
30
30
|
declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
31
|
-
"emit:changeLimit": (limit: number) => any;
|
|
32
31
|
"emit:changePage": (page: number) => any;
|
|
32
|
+
"emit:changeLimit": (limit: number) => any;
|
|
33
33
|
"emit:downloadPage": () => any;
|
|
34
34
|
"emit:downloadAll": () => any;
|
|
35
35
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
36
|
-
"onEmit:changeLimit"?: ((limit: number) => any) | undefined;
|
|
37
36
|
"onEmit:changePage"?: ((page: number) => any) | undefined;
|
|
37
|
+
"onEmit:changeLimit"?: ((limit: number) => any) | undefined;
|
|
38
38
|
"onEmit:downloadPage"?: (() => any) | undefined;
|
|
39
39
|
"onEmit:downloadAll"?: (() => any) | undefined;
|
|
40
40
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
|
@@ -28,13 +28,13 @@ interface Props {
|
|
|
28
28
|
formatTotalCount?: (count: number) => string;
|
|
29
29
|
}
|
|
30
30
|
declare const __VLS_export: import('vue').DefineComponent<Props, {}, {}, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {} & {
|
|
31
|
-
"emit:changeLimit": (limit: number) => any;
|
|
32
31
|
"emit:changePage": (page: number) => any;
|
|
32
|
+
"emit:changeLimit": (limit: number) => any;
|
|
33
33
|
"emit:downloadPage": () => any;
|
|
34
34
|
"emit:downloadAll": () => any;
|
|
35
35
|
}, string, import('vue').PublicProps, Readonly<Props> & Readonly<{
|
|
36
|
-
"onEmit:changeLimit"?: ((limit: number) => any) | undefined;
|
|
37
36
|
"onEmit:changePage"?: ((page: number) => any) | undefined;
|
|
37
|
+
"onEmit:changeLimit"?: ((limit: number) => any) | undefined;
|
|
38
38
|
"onEmit:downloadPage"?: (() => any) | undefined;
|
|
39
39
|
"onEmit:downloadAll"?: (() => any) | undefined;
|
|
40
40
|
}>, {}, {}, {}, {}, string, import('vue').ComponentProvideOptions, false, {}, any>;
|
package/lib/nuxt.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@nuxt/kit"),r=require("./components-
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("@nuxt/kit"),r=require("./components-COL2ZbhC.cjs");var t=typeof document<"u"?document.currentScript:null;const u=e.defineNuxtModule({meta:{name:"@digitalwalletcorp/vue-core",configKey:"vueCore"},setup(){const n=e.createResolver(typeof document>"u"?require("url").pathToFileURL(__filename).href:t&&t.tagName.toUpperCase()==="SCRIPT"&&t.src||new URL("nuxt.cjs",document.baseURI).href);for(const o of Object.keys(r.components))e.addComponent({name:o,export:o,filePath:n.resolve("./index")})}});exports.default=u;
|
package/lib/nuxt.js
CHANGED
package/lib/register.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./components-COL2ZbhC.cjs");function r(e){for(const[o,n]of Object.entries(t.components))e.component(o,n)}exports.registerComponents=r;
|
package/lib/register.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import { ClassValue, StyleValue } from 'vue';
|
|
2
1
|
/** 列の値の型。ソートの比較方法を決める */
|
|
3
2
|
export type DataTableValueType = 'boolean' | 'string' | 'number' | 'object';
|
|
4
|
-
/** ソートの方式。page
|
|
3
|
+
/** ソートの方式。page は表示中の行を並べ替えて表示し、remote はソート条件を通知するだけで利用側が再取得する */
|
|
5
4
|
export type DataTableSortMode = 'page' | 'remote';
|
|
6
5
|
/** コントロール(ページネーション・総件数・表示件数・ダウンロードボタン)を出す位置 */
|
|
7
6
|
export type DataTableControlsPlacement = 'both' | 'top' | 'bottom' | 'none';
|
|
@@ -82,98 +81,6 @@ export interface DataTableLabels {
|
|
|
82
81
|
}
|
|
83
82
|
/** 関数を評価した後の文言 */
|
|
84
83
|
export type DataTableResolvedLabels = Record<keyof DataTableLabels, string>;
|
|
85
|
-
/**
|
|
86
|
-
* DataTable の props
|
|
87
|
-
*/
|
|
88
|
-
export interface DataTableProps<T = unknown> {
|
|
89
|
-
/** 表示している行のデータ。スロットで描画する行と同じ順に並んでいること */
|
|
90
|
-
dataList: T[];
|
|
91
|
-
/** ヘッダ。id は一意であること */
|
|
92
|
-
headers: DataTableHeader<T>[];
|
|
93
|
-
/** 読み込み中。true の間は行を描画せず読み込み中の表示を出す */
|
|
94
|
-
loading?: boolean;
|
|
95
|
-
/** 総件数。未指定なら dataList の件数 */
|
|
96
|
-
totalCount?: number;
|
|
97
|
-
/** 現在ページ(1起点) */
|
|
98
|
-
current?: number;
|
|
99
|
-
/** 1ページあたりの表示件数 */
|
|
100
|
-
limit?: number;
|
|
101
|
-
/** 1ページあたりの表示件数の上限 */
|
|
102
|
-
maxLimit?: number;
|
|
103
|
-
/** ページネーションに並べるページ番号の最大数 */
|
|
104
|
-
maxPagination?: number;
|
|
105
|
-
/** 行をクリックで選択できるか */
|
|
106
|
-
selectable?: boolean;
|
|
107
|
-
/** コントロールを出す位置 */
|
|
108
|
-
controls?: DataTableControlsPlacement;
|
|
109
|
-
/** ページネーションを出す位置。controls が無い側には出ない */
|
|
110
|
-
pagination?: DataTableControlsPlacement;
|
|
111
|
-
/** ページダウンロードボタンを表示するか */
|
|
112
|
-
showDownloadPage?: boolean;
|
|
113
|
-
/** 全件ダウンロードボタンを表示するか */
|
|
114
|
-
showDownloadAll?: boolean;
|
|
115
|
-
/** 総件数を表示するか */
|
|
116
|
-
showTotal?: boolean;
|
|
117
|
-
/** 1ページあたりの表示件数の入力を表示するか */
|
|
118
|
-
showLimit?: boolean;
|
|
119
|
-
/** ページネーションにページ番号の選択を表示するか */
|
|
120
|
-
showPageSelect?: boolean;
|
|
121
|
-
/** dataList が空のときにデータが無い旨の行を表示するか */
|
|
122
|
-
showNoData?: boolean;
|
|
123
|
-
/** ヘッダの境界のドラッグで列幅を変えられるか */
|
|
124
|
-
resizable?: boolean;
|
|
125
|
-
/** ヘッダのクリックでソートできるか */
|
|
126
|
-
sortable?: boolean;
|
|
127
|
-
/** ソートの方式。未指定なら remote */
|
|
128
|
-
sortMode?: DataTableSortMode;
|
|
129
|
-
/** テーブルをスクロールする領域に付ける class */
|
|
130
|
-
contentClass?: ClassValue;
|
|
131
|
-
/** テーブルをスクロールする領域に付ける style */
|
|
132
|
-
contentStyle?: StyleValue;
|
|
133
|
-
/** table に付ける class */
|
|
134
|
-
tableClass?: ClassValue;
|
|
135
|
-
/** table に付ける style */
|
|
136
|
-
tableStyle?: StyleValue;
|
|
137
|
-
/** 表示する文言。未指定の項目は英語 */
|
|
138
|
-
labels?: DataTableLabels;
|
|
139
|
-
/** 総件数の整形。未指定なら en-US の桁区切り。SSR とクライアントで同じ文字列を返すこと */
|
|
140
|
-
formatTotalCount?: (count: number) => string;
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* DataTable が発行するイベント
|
|
144
|
-
*/
|
|
145
|
-
export interface DataTableEmits<T = unknown> {
|
|
146
|
-
/** 選択が変わった。クリックでの選択・解除、カーソルキーでの移動、読み込み完了時の解除で発行する。解除は undefined と -1 */
|
|
147
|
-
(e: 'emit:selectRow', value: T | undefined, index: number): void;
|
|
148
|
-
/** ソートの条件が変わった。sortMode に関わらず発行する */
|
|
149
|
-
(e: 'emit:changeSort', context: DataTableSortContext): void;
|
|
150
|
-
/** sortMode が page のとき、表示中の行を並べ替えた配列を発行する */
|
|
151
|
-
(e: 'emit:sortData', dataList: T[]): void;
|
|
152
|
-
(e: 'emit:updateHeader', headers: DataTableHeader<T>[]): void;
|
|
153
|
-
(e: 'emit:dblclickRow', value: T, index: number): void;
|
|
154
|
-
(e: 'emit:changeLimit', limit: number): void;
|
|
155
|
-
(e: 'emit:changePage', page: number): void;
|
|
156
|
-
(e: 'emit:downloadPage'): void;
|
|
157
|
-
(e: 'emit:downloadAll'): void;
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* DataTable のスロット
|
|
161
|
-
*/
|
|
162
|
-
export interface DataTableSlots<T = unknown> {
|
|
163
|
-
/** 行。tr を dataList と同じ順に並べ、tr の click で clickRow(row, index) を呼ぶ */
|
|
164
|
-
default?(props: {
|
|
165
|
-
/** 行を選択する。選択している行なら選択を解除する */
|
|
166
|
-
clickRow: (row: T, index: number) => void;
|
|
167
|
-
/** 行を選択してダブルクリックを通知する */
|
|
168
|
-
dblclickRow: (row: T, index: number) => void;
|
|
169
|
-
/** 行のインデックスから、ページをまたいだ1起点の行番号を返す */
|
|
170
|
-
rowNumber: (index: number) => number;
|
|
171
|
-
/** 選択している行のインデックス。選択していなければ -1 */
|
|
172
|
-
selectedIndex: number;
|
|
173
|
-
}): unknown;
|
|
174
|
-
/** 読み込み中の表示。未指定なら既定のスピナー */
|
|
175
|
-
loading?(): unknown;
|
|
176
|
-
}
|
|
177
84
|
/**
|
|
178
85
|
* ソートの状態
|
|
179
86
|
*/
|