@nubisco/ui 5.55.0 → 5.56.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/dist/all.cjs +1 -1
- package/dist/all.mjs +1 -1
- package/dist/components/labs/Spreadsheet.d.ts +14 -0
- package/dist/components/labs/Spreadsheet.vue.d.ts +1 -0
- package/dist/components/labs/Spreadsheet.vue.d.ts.map +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{main-BXz7vG2i.js → main-B-SiH7ks.js} +252 -194
- package/dist/main-CH_BN_4v.cjs +4 -0
- package/dist/styles/main.css +1 -1
- package/dist/ui.css +1 -1
- package/package.json +1 -1
- package/dist/main-BMIeIxGV.cjs +0 -4
|
@@ -3,7 +3,8 @@ import { TOUR_STEP_ATTRIBUTE as i } from "./utils/tourTarget.helper.mjs";
|
|
|
3
3
|
import { NB_COMMAND_PALETTE_KEY as a, createCommandPaletteState as o } from "./composables/useCommandPalette.composable.mjs";
|
|
4
4
|
import { NB_HYDRATION as s } from "./composables/useTeleportReady.composable.mjs";
|
|
5
5
|
import { t as c } from "./_plugin-vue_export-helper-C6QCLu9I.js";
|
|
6
|
-
import {
|
|
6
|
+
import { usePhoneLayout as l } from "./composables/usePhoneLayout.composable.mjs";
|
|
7
|
+
import { Fragment as u, computed as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, defineComponent as h, nextTick as g, normalizeClass as _, normalizeStyle as v, onBeforeUnmount as ee, onMounted as te, openBlock as y, ref as b, renderList as x, renderSlot as ne, toDisplayString as S, useTemplateRef as re, vModelText as ie, watch as ae, withDirectives as oe, withModifiers as se } from "vue";
|
|
7
8
|
//#region src/directives/ContextMenu.directive.ts
|
|
8
9
|
var C = /* @__PURE__ */ r({ default: () => w });
|
|
9
10
|
function w(e) {
|
|
@@ -65,21 +66,21 @@ var D = (e) => {
|
|
|
65
66
|
e.provide(a, t);
|
|
66
67
|
} }, j = /* @__PURE__ */ function(e) {
|
|
67
68
|
return e.Object = "object", e.Array = "array", e.Primitive = "primitive", e;
|
|
68
|
-
}(j || {}),
|
|
69
|
+
}(j || {}), ce = {
|
|
69
70
|
key: 0,
|
|
70
71
|
class: "nb-spreadsheet__toolbar"
|
|
71
|
-
},
|
|
72
|
+
}, le = {
|
|
72
73
|
key: 0,
|
|
73
74
|
class: "nb-spreadsheet__corner",
|
|
74
75
|
style: {
|
|
75
76
|
gridRow: 1,
|
|
76
77
|
gridColumn: 1
|
|
77
78
|
}
|
|
78
|
-
},
|
|
79
|
+
}, ue = ["data-header-col", "onClick"], de = ["title"], fe = {
|
|
79
80
|
key: 0,
|
|
80
81
|
class: "nb-spreadsheet__sort",
|
|
81
82
|
"aria-hidden": "true"
|
|
82
|
-
},
|
|
83
|
+
}, pe = ["onMousedown"], me = [
|
|
83
84
|
"title",
|
|
84
85
|
"data-cell",
|
|
85
86
|
"data-row",
|
|
@@ -87,7 +88,7 @@ var D = (e) => {
|
|
|
87
88
|
"onMousedown",
|
|
88
89
|
"onMouseenter",
|
|
89
90
|
"onDblclick"
|
|
90
|
-
],
|
|
91
|
+
], he = ["inputmode"], ge = 36, _e = 32, ve = 20, M = /* @__PURE__ */ h({
|
|
91
92
|
__name: "Spreadsheet",
|
|
92
93
|
props: {
|
|
93
94
|
columns: {},
|
|
@@ -108,7 +109,11 @@ var D = (e) => {
|
|
|
108
109
|
},
|
|
109
110
|
gutterWidth: { default: 44 },
|
|
110
111
|
windowRows: { default: 80 },
|
|
111
|
-
locale: { default: "pt-PT" }
|
|
112
|
+
locale: { default: "pt-PT" },
|
|
113
|
+
fit: {
|
|
114
|
+
type: Boolean,
|
|
115
|
+
default: !1
|
|
116
|
+
}
|
|
112
117
|
},
|
|
113
118
|
emits: [
|
|
114
119
|
"commit",
|
|
@@ -118,7 +123,7 @@ var D = (e) => {
|
|
|
118
123
|
"row-reorder"
|
|
119
124
|
],
|
|
120
125
|
setup(e, { expose: t, emit: n }) {
|
|
121
|
-
let r = e, i = n, a =
|
|
126
|
+
let r = e, i = n, a = re("scrollerRef"), o = re("editorRef"), s = b({}), c = b(null), h = b(null), C = b(null), w = b(!1), T = b(null), E = b(0), D = b(0), O = "", k = b([]), A = b([]), j = d(() => {
|
|
122
127
|
let e = r.columns.filter((e) => e.pinned === "left"), t = r.columns.filter((e) => e.pinned === "right"), n = r.columns.filter((e) => !e.pinned);
|
|
123
128
|
return [
|
|
124
129
|
...e,
|
|
@@ -126,27 +131,67 @@ var D = (e) => {
|
|
|
126
131
|
...t
|
|
127
132
|
];
|
|
128
133
|
});
|
|
129
|
-
function
|
|
134
|
+
function M(e) {
|
|
130
135
|
return s.value[e.id] ?? e.width ?? 120;
|
|
131
136
|
}
|
|
132
|
-
let
|
|
137
|
+
let { phoneTouch: N } = l(), P = b(null), F = d(() => P.value ?? _e);
|
|
138
|
+
function I() {
|
|
139
|
+
let e = a.value;
|
|
140
|
+
if (!r.fit || N.value || !e || !r.rows.length) {
|
|
141
|
+
P.value = null;
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
let t = X(".nb-spreadsheet__header") || ge, n = Math.floor((e.clientHeight - t) / r.rows.length);
|
|
145
|
+
P.value = Math.min(_e, Math.max(ve, n));
|
|
146
|
+
}
|
|
147
|
+
let L = null;
|
|
148
|
+
ae(() => [
|
|
149
|
+
r.fit,
|
|
150
|
+
r.rows.length,
|
|
151
|
+
N.value
|
|
152
|
+
], () => I());
|
|
153
|
+
let ye = d(() => P.value === null ? void 0 : { "--nbss-row-height": `${P.value}px` }), be = d(() => ({
|
|
154
|
+
gridTemplateColumns: (r.showGutter ? `${r.gutterWidth}px ` : "") + j.value.map((e) => r.fit && !e.pinned ? `minmax(${M(e)}px, 1fr)` : `${M(e)}px`).join(" "),
|
|
155
|
+
gridTemplateRows: "var(--nbss-header-height)"
|
|
156
|
+
})), R = b(/* @__PURE__ */ new Set()), xe = /* @__PURE__ */ new Map();
|
|
157
|
+
function z() {
|
|
158
|
+
let e = a.value;
|
|
159
|
+
if (!e) return;
|
|
160
|
+
let t = [], n = !1, i = !1;
|
|
161
|
+
for (let a of r.columns) {
|
|
162
|
+
if (!a.shortLabel) continue;
|
|
163
|
+
let r = e.querySelector(`[data-header-col="${Y(a.id)}"] .nb-spreadsheet__header-label`);
|
|
164
|
+
if (!r) continue;
|
|
165
|
+
let o = `${a.id}::${a.label}`;
|
|
166
|
+
R.value.has(a.id) || xe.set(o, r.scrollWidth);
|
|
167
|
+
let s = xe.get(o);
|
|
168
|
+
if (s === void 0) {
|
|
169
|
+
i = !0;
|
|
170
|
+
continue;
|
|
171
|
+
}
|
|
172
|
+
t.push(a.id), s > r.clientWidth && (n = !0);
|
|
173
|
+
}
|
|
174
|
+
R.value = new Set(n ? t : []), i && g(z);
|
|
175
|
+
}
|
|
176
|
+
ae(() => [r.columns, s.value], () => void g(z), { deep: !0 });
|
|
177
|
+
let B = d(() => {
|
|
133
178
|
let e = r.rows.filter((e) => !e.pinned);
|
|
134
179
|
if (!c.value) return e;
|
|
135
180
|
let t = r.columns.find((e) => e.id === c.value.columnId);
|
|
136
181
|
if (!t) return e;
|
|
137
182
|
let n = c.value.direction === "asc" ? 1 : -1, i = (e, t) => e == null && t == null ? 0 : e == null ? -1 : t == null ? 1 : typeof e == "number" && typeof t == "number" ? (e - t) * n : String(e).localeCompare(String(t)) * n;
|
|
138
183
|
return [...e].sort((e, n) => i(e.values[t.id], n.values[t.id]));
|
|
139
|
-
}),
|
|
140
|
-
let e = Math.max(1, Math.ceil((a.value?.clientHeight ?? 600) /
|
|
184
|
+
}), V = d(() => r.rows.filter((e) => e.pinned === "top")), H = d(() => r.rows.filter((e) => e.pinned === "bottom")), Se = d(() => {
|
|
185
|
+
let e = Math.max(1, Math.ceil((a.value?.clientHeight ?? 600) / F.value)), t = Math.max(10, Math.floor(r.windowRows / 4)), n = Math.floor(E.value / F.value) - V.value.length - t, i = Math.max(0, n), o = Math.min(B.value.length, i + e + t * 2), s = V.value.map((e, t) => ({
|
|
141
186
|
...e,
|
|
142
187
|
__virtualIndex: t,
|
|
143
188
|
gutterLabel: ""
|
|
144
|
-
})), c =
|
|
189
|
+
})), c = B.value.slice(i, o).map((e, t) => ({
|
|
145
190
|
...e,
|
|
146
|
-
__virtualIndex: i + t +
|
|
147
|
-
})), l =
|
|
191
|
+
__virtualIndex: i + t + V.value.length
|
|
192
|
+
})), l = H.value.map((e, t) => ({
|
|
148
193
|
...e,
|
|
149
|
-
__virtualIndex:
|
|
194
|
+
__virtualIndex: V.value.length + B.value.length + t,
|
|
150
195
|
gutterLabel: ""
|
|
151
196
|
}));
|
|
152
197
|
return [
|
|
@@ -155,7 +200,7 @@ var D = (e) => {
|
|
|
155
200
|
...l
|
|
156
201
|
];
|
|
157
202
|
});
|
|
158
|
-
function
|
|
203
|
+
function Ce(e, t) {
|
|
159
204
|
if (t == null || t === "") return "";
|
|
160
205
|
if (e.type === "number") {
|
|
161
206
|
let e = typeof t == "number" ? t : Number(t);
|
|
@@ -167,7 +212,7 @@ var D = (e) => {
|
|
|
167
212
|
}
|
|
168
213
|
return String(t);
|
|
169
214
|
}
|
|
170
|
-
function
|
|
215
|
+
function we(e, t) {
|
|
171
216
|
if (t === "") return null;
|
|
172
217
|
if (e.type === "number") {
|
|
173
218
|
let e = t.replace(/\s/g, "").replace(",", "."), n = Number(e);
|
|
@@ -181,29 +226,29 @@ var D = (e) => {
|
|
|
181
226
|
}
|
|
182
227
|
return t;
|
|
183
228
|
}
|
|
184
|
-
function
|
|
229
|
+
function U(e, t) {
|
|
185
230
|
let n = r.rows.find((t) => t.id === e);
|
|
186
231
|
if (!n) return;
|
|
187
232
|
let i = n.values[t];
|
|
188
233
|
if (i !== void 0) return i;
|
|
189
|
-
if (r.computed) return r.computed(e, t,
|
|
234
|
+
if (r.computed) return r.computed(e, t, U);
|
|
190
235
|
}
|
|
191
|
-
function
|
|
236
|
+
function W(e, t) {
|
|
192
237
|
return r.cellAttrs ? r.cellAttrs(e.id, t.id, e, t) ?? {} : {};
|
|
193
238
|
}
|
|
194
|
-
function
|
|
195
|
-
let n =
|
|
239
|
+
function Te(e, t) {
|
|
240
|
+
let n = W(e, t);
|
|
196
241
|
if (n.display !== void 0) return n.display;
|
|
197
|
-
let r =
|
|
198
|
-
return t.format ? t.format(r, e) :
|
|
242
|
+
let r = U(e.id, t.id);
|
|
243
|
+
return t.format ? t.format(r, e) : Ce(t, r);
|
|
199
244
|
}
|
|
200
|
-
function
|
|
201
|
-
let n =
|
|
245
|
+
function Ee(e, t) {
|
|
246
|
+
let n = W(e, t), r = h.value?.rowId === e.id && h.value?.columnId === t.id, i = Ie(e.id, t.id);
|
|
202
247
|
return {
|
|
203
248
|
[`nb-spreadsheet__cell--${t.align ?? (t.type === "number" || t.type === "date" ? "right" : "left")}`]: !0,
|
|
204
249
|
"nb-spreadsheet__cell--focused": r,
|
|
205
250
|
"nb-spreadsheet__cell--selected": i,
|
|
206
|
-
"nb-spreadsheet__cell--readonly":
|
|
251
|
+
"nb-spreadsheet__cell--readonly": G(e, t),
|
|
207
252
|
"nb-spreadsheet__cell--computed": !!n.computed || !!e.computed,
|
|
208
253
|
"nb-spreadsheet__cell--pinned-top": e.pinned === "top",
|
|
209
254
|
"nb-spreadsheet__cell--pinned-bottom": e.pinned === "bottom",
|
|
@@ -211,92 +256,93 @@ var D = (e) => {
|
|
|
211
256
|
[e.className ?? ""]: !!e.className
|
|
212
257
|
};
|
|
213
258
|
}
|
|
214
|
-
function
|
|
259
|
+
function G(e, t) {
|
|
215
260
|
if (e.computed || t.readOnly) return !0;
|
|
216
|
-
let n =
|
|
261
|
+
let n = W(e, t);
|
|
217
262
|
return !!n.readOnly || !!n.computed;
|
|
218
263
|
}
|
|
219
|
-
function
|
|
220
|
-
return
|
|
264
|
+
function De(e, t) {
|
|
265
|
+
return W(e, t).tooltip ?? "";
|
|
221
266
|
}
|
|
222
|
-
function
|
|
267
|
+
function Oe(e) {
|
|
223
268
|
return {
|
|
224
269
|
"nb-spreadsheet__header--sortable": !!e.sortable,
|
|
225
270
|
"nb-spreadsheet__header--pinned-left": e.pinned === "left",
|
|
226
|
-
"nb-spreadsheet__header--pinned-right": e.pinned === "right"
|
|
271
|
+
"nb-spreadsheet__header--pinned-right": e.pinned === "right",
|
|
272
|
+
"nb-spreadsheet__header--last": e.id === j.value[j.value.length - 1]?.id
|
|
227
273
|
};
|
|
228
274
|
}
|
|
229
|
-
function
|
|
275
|
+
function ke(e) {
|
|
230
276
|
if (e.pinned !== "left") return 0;
|
|
231
277
|
let t = r.showGutter ? r.gutterWidth : 0;
|
|
232
278
|
for (let n of j.value) {
|
|
233
279
|
if (n.id === e.id) break;
|
|
234
|
-
n.pinned === "left" && (t +=
|
|
280
|
+
n.pinned === "left" && (t += M(n));
|
|
235
281
|
}
|
|
236
282
|
return t;
|
|
237
283
|
}
|
|
238
|
-
function
|
|
284
|
+
function Ae(e) {
|
|
239
285
|
if (e.pinned !== "right") return 0;
|
|
240
286
|
let t = 0, n = [...j.value].reverse();
|
|
241
287
|
for (let r of n) {
|
|
242
288
|
if (r.id === e.id) break;
|
|
243
|
-
r.pinned === "right" && (t +=
|
|
289
|
+
r.pinned === "right" && (t += M(r));
|
|
244
290
|
}
|
|
245
291
|
return t;
|
|
246
292
|
}
|
|
247
|
-
function
|
|
293
|
+
function je(e, t) {
|
|
248
294
|
let n = (r.showGutter ? 2 : 1) + t, i = {};
|
|
249
|
-
return e.pinned === "left" ? (i.position = "sticky", i.left = `${
|
|
295
|
+
return e.pinned === "left" ? (i.position = "sticky", i.left = `${ke(e)}px`, i.zIndex = "3") : e.pinned === "right" && (i.position = "sticky", i.right = `${Ae(e)}px`, i.zIndex = "3"), {
|
|
250
296
|
gridRow: 1,
|
|
251
297
|
gridColumn: n,
|
|
252
298
|
...i
|
|
253
299
|
};
|
|
254
300
|
}
|
|
255
|
-
function
|
|
301
|
+
function Me(e, t, n) {
|
|
256
302
|
let i = (r.showGutter ? 2 : 1) + n, a = e.__virtualIndex + 2, o = {};
|
|
257
|
-
return t.pinned === "left" ? (o.position = "sticky", o.left = `${
|
|
303
|
+
return t.pinned === "left" ? (o.position = "sticky", o.left = `${ke(t)}px`, o.zIndex = "2") : t.pinned === "right" && (o.position = "sticky", o.right = `${Ae(t)}px`, o.zIndex = "2"), (e.pinned === "top" || e.pinned === "bottom") && (o.position = "sticky", o.zIndex = String(Math.max(Number(o.zIndex ?? 0), 2)), Object.assign(o, Ne(e))), {
|
|
258
304
|
gridRow: a,
|
|
259
305
|
gridColumn: i,
|
|
260
306
|
...o
|
|
261
307
|
};
|
|
262
308
|
}
|
|
263
|
-
function
|
|
309
|
+
function Ne(e) {
|
|
264
310
|
if (e.pinned === "top") {
|
|
265
|
-
let t =
|
|
311
|
+
let t = V.value.findIndex((t) => t.id === e.id);
|
|
266
312
|
return { top: `calc(var(--nbss-header-height) + var(--nbss-row-height) * ${Math.max(0, t)})` };
|
|
267
313
|
}
|
|
268
314
|
if (e.pinned === "bottom") {
|
|
269
|
-
let t =
|
|
315
|
+
let t = H.value, n = t.findIndex((t) => t.id === e.id);
|
|
270
316
|
return { bottom: `calc(var(--nbss-row-height) * ${Math.max(0, t.length - 1 - n)})` };
|
|
271
317
|
}
|
|
272
318
|
return {};
|
|
273
319
|
}
|
|
274
|
-
function
|
|
275
|
-
return e.label === void 0 ? e.gutterLabel === void 0 ? String(e.__virtualIndex -
|
|
320
|
+
function Pe(e) {
|
|
321
|
+
return e.label === void 0 ? e.gutterLabel === void 0 ? String(e.__virtualIndex - V.value.length + 1) : e.gutterLabel : e.label;
|
|
276
322
|
}
|
|
277
|
-
function
|
|
323
|
+
function Fe(e) {
|
|
278
324
|
let t = {
|
|
279
325
|
position: "sticky",
|
|
280
326
|
left: "0",
|
|
281
327
|
zIndex: "2"
|
|
282
328
|
};
|
|
283
|
-
return e.pinned && (Object.assign(t,
|
|
329
|
+
return e.pinned && (Object.assign(t, Ne(e)), t.zIndex = "4"), {
|
|
284
330
|
gridRow: e.__virtualIndex + 2,
|
|
285
331
|
gridColumn: 1,
|
|
286
332
|
...t
|
|
287
333
|
};
|
|
288
334
|
}
|
|
289
|
-
function
|
|
335
|
+
function Ie(e, t) {
|
|
290
336
|
if (!C.value) return !1;
|
|
291
337
|
let n = [
|
|
292
|
-
...
|
|
293
|
-
...
|
|
294
|
-
...
|
|
338
|
+
...V.value,
|
|
339
|
+
...B.value,
|
|
340
|
+
...H.value
|
|
295
341
|
].map((e) => e.id), r = j.value.map((e) => e.id), i = n.indexOf(C.value.startRowId), a = n.indexOf(C.value.endRowId), o = r.indexOf(C.value.startColumnId), s = r.indexOf(C.value.endColumnId), c = n.indexOf(e), l = r.indexOf(t);
|
|
296
342
|
return c >= Math.min(i, a) && c <= Math.max(i, a) && l >= Math.min(o, s) && l <= Math.max(o, s);
|
|
297
343
|
}
|
|
298
344
|
function K(e, t, n = !1) {
|
|
299
|
-
|
|
345
|
+
h.value = {
|
|
300
346
|
rowId: e,
|
|
301
347
|
columnId: t
|
|
302
348
|
}, n && C.value ? C.value = {
|
|
@@ -308,72 +354,72 @@ var D = (e) => {
|
|
|
308
354
|
startColumnId: t,
|
|
309
355
|
endRowId: e,
|
|
310
356
|
endColumnId: t
|
|
311
|
-
}, i("focus",
|
|
357
|
+
}, i("focus", h.value), i("selection", C.value);
|
|
312
358
|
}
|
|
313
|
-
function
|
|
359
|
+
function Le(e) {
|
|
314
360
|
O = e.pointerType;
|
|
315
361
|
}
|
|
316
|
-
function
|
|
317
|
-
let r = O === "touch" && !e.shiftKey &&
|
|
318
|
-
if (O = "", T.value &&
|
|
319
|
-
let e =
|
|
320
|
-
|
|
362
|
+
function Re(e, t, n) {
|
|
363
|
+
let r = O === "touch" && !e.shiftKey && h.value?.rowId === t.id && h.value?.columnId === n.id;
|
|
364
|
+
if (O = "", T.value && Q(), w.value = !0, K(t.id, n.id, e.shiftKey), q(), e.preventDefault(), document.addEventListener("mouseup", Be, { once: !0 }), r && !G(t, n)) {
|
|
365
|
+
let e = U(t.id, n.id);
|
|
366
|
+
Z(t, n, e == null ? "" : String(e), "edit");
|
|
321
367
|
}
|
|
322
368
|
}
|
|
323
|
-
function
|
|
369
|
+
function ze(e, t) {
|
|
324
370
|
!w.value || !C.value || (C.value = {
|
|
325
371
|
...C.value,
|
|
326
372
|
endRowId: e.id,
|
|
327
373
|
endColumnId: t.id
|
|
328
374
|
}, i("selection", C.value));
|
|
329
375
|
}
|
|
330
|
-
function
|
|
376
|
+
function Be() {
|
|
331
377
|
w.value = !1;
|
|
332
378
|
}
|
|
333
|
-
function
|
|
334
|
-
if (
|
|
335
|
-
let n =
|
|
336
|
-
|
|
379
|
+
function Ve(e, t) {
|
|
380
|
+
if (G(e, t)) return;
|
|
381
|
+
let n = U(e.id, t.id);
|
|
382
|
+
Z(e, t, n == null ? "" : String(n), "edit");
|
|
337
383
|
}
|
|
338
384
|
function q() {
|
|
339
385
|
a.value?.focus({ preventScroll: !0 });
|
|
340
386
|
}
|
|
341
387
|
function J(e, t, n = !1) {
|
|
342
|
-
if (!
|
|
343
|
-
let e = j.value[0], t =
|
|
388
|
+
if (!h.value) {
|
|
389
|
+
let e = j.value[0], t = Se.value[0];
|
|
344
390
|
e && t && K(t.id, e.id);
|
|
345
391
|
return;
|
|
346
392
|
}
|
|
347
393
|
let r = [
|
|
348
|
-
...
|
|
349
|
-
...
|
|
350
|
-
...
|
|
351
|
-
], i = r.findIndex((e) => e.id ===
|
|
352
|
-
K(c, l, n),
|
|
394
|
+
...V.value,
|
|
395
|
+
...B.value,
|
|
396
|
+
...H.value
|
|
397
|
+
], i = r.findIndex((e) => e.id === h.value.rowId), a = j.value.findIndex((e) => e.id === h.value.columnId), o = Math.max(0, Math.min(r.length - 1, i + e)), s = Math.max(0, Math.min(j.value.length - 1, a + t)), c = r[o].id, l = j.value[s].id;
|
|
398
|
+
K(c, l, n), We(c, l);
|
|
353
399
|
}
|
|
354
|
-
function
|
|
400
|
+
function Y(e) {
|
|
355
401
|
return e.replace(/["\\]/g, "\\$&");
|
|
356
402
|
}
|
|
357
|
-
function
|
|
403
|
+
function X(e) {
|
|
358
404
|
let t = a.value?.querySelector(e);
|
|
359
405
|
return t ? t.offsetHeight : 0;
|
|
360
406
|
}
|
|
361
|
-
function
|
|
407
|
+
function He(e) {
|
|
362
408
|
let t = 0;
|
|
363
|
-
for (let n of e) t +=
|
|
409
|
+
for (let n of e) t += X(`[data-row="${Y(n.id)}"]`);
|
|
364
410
|
return t;
|
|
365
411
|
}
|
|
366
|
-
function
|
|
412
|
+
function Ue(e) {
|
|
367
413
|
let t = e === "left" && r.showGutter ? r.gutterWidth : 0;
|
|
368
|
-
for (let n of j.value) n.pinned === e && (t +=
|
|
414
|
+
for (let n of j.value) n.pinned === e && (t += M(n));
|
|
369
415
|
return t;
|
|
370
416
|
}
|
|
371
|
-
function
|
|
417
|
+
function We(e, t) {
|
|
372
418
|
let n = a.value;
|
|
373
419
|
if (!n) return;
|
|
374
|
-
let i =
|
|
420
|
+
let i = B.value.findIndex((t) => t.id === e);
|
|
375
421
|
if (i >= 0) {
|
|
376
|
-
let e =
|
|
422
|
+
let e = X(".nb-spreadsheet__header") || ge, t = X(".nb-spreadsheet__cell") || F.value, r = e + (V.value.length + i) * t, a = e + He(V.value), o = He(H.value);
|
|
377
423
|
r - a < n.scrollTop ? n.scrollTop = r - a : r + t > n.scrollTop + n.clientHeight - o && (n.scrollTop = r + t - n.clientHeight + o);
|
|
378
424
|
}
|
|
379
425
|
let o = t ? j.value.find((e) => e.id === t) : void 0;
|
|
@@ -381,34 +427,34 @@ var D = (e) => {
|
|
|
381
427
|
let e = r.showGutter ? r.gutterWidth : 0;
|
|
382
428
|
for (let t of j.value) {
|
|
383
429
|
if (t.id === o.id) break;
|
|
384
|
-
e +=
|
|
430
|
+
e += M(t);
|
|
385
431
|
}
|
|
386
|
-
let t =
|
|
432
|
+
let t = M(o), i = Ue("left"), a = Ue("right");
|
|
387
433
|
e - i < n.scrollLeft ? n.scrollLeft = e - i : e + t > n.scrollLeft + n.clientWidth - a && (n.scrollLeft = e + t - n.clientWidth + a);
|
|
388
434
|
}
|
|
389
|
-
|
|
435
|
+
Ge();
|
|
390
436
|
}
|
|
391
|
-
function
|
|
437
|
+
function Ge() {
|
|
392
438
|
E.value = a.value?.scrollTop ?? 0, D.value = a.value?.scrollLeft ?? 0;
|
|
393
439
|
}
|
|
394
|
-
function
|
|
395
|
-
if (!
|
|
396
|
-
let e = r.rows.find((e) => e.id ===
|
|
440
|
+
function Ke() {
|
|
441
|
+
if (!h.value) return null;
|
|
442
|
+
let e = r.rows.find((e) => e.id === h.value.rowId), t = r.columns.find((e) => e.id === h.value.columnId);
|
|
397
443
|
return e && t ? {
|
|
398
444
|
r: e,
|
|
399
445
|
c: t
|
|
400
446
|
} : null;
|
|
401
447
|
}
|
|
402
|
-
function
|
|
448
|
+
function qe(e) {
|
|
403
449
|
return !e.metaKey && !e.ctrlKey && !e.altKey && e.key.length === 1;
|
|
404
450
|
}
|
|
405
|
-
function
|
|
451
|
+
function Je(e) {
|
|
406
452
|
if (T.value) {
|
|
407
|
-
e.target !== o.value && (
|
|
453
|
+
e.target !== o.value && (qe(e) ? (e.preventDefault(), T.value.draft += e.key) : Ze(e));
|
|
408
454
|
return;
|
|
409
455
|
}
|
|
410
456
|
if ((e.metaKey || e.ctrlKey) && e.key.toLowerCase() === "z") {
|
|
411
|
-
e.preventDefault(), e.shiftKey ?
|
|
457
|
+
e.preventDefault(), e.shiftKey ? ot() : at();
|
|
412
458
|
return;
|
|
413
459
|
}
|
|
414
460
|
switch (e.key) {
|
|
@@ -435,31 +481,31 @@ var D = (e) => {
|
|
|
435
481
|
break;
|
|
436
482
|
case "Delete":
|
|
437
483
|
case "Backspace":
|
|
438
|
-
e.preventDefault(),
|
|
484
|
+
e.preventDefault(), $e();
|
|
439
485
|
break;
|
|
440
486
|
case "F2": {
|
|
441
487
|
e.preventDefault();
|
|
442
|
-
let t =
|
|
443
|
-
if (t && !
|
|
444
|
-
let e =
|
|
445
|
-
|
|
488
|
+
let t = Ke();
|
|
489
|
+
if (t && !G(t.r, t.c)) {
|
|
490
|
+
let e = U(t.r.id, t.c.id);
|
|
491
|
+
Z(t.r, t.c, e == null ? "" : String(e), "edit");
|
|
446
492
|
}
|
|
447
493
|
break;
|
|
448
494
|
}
|
|
449
495
|
default: {
|
|
450
|
-
if (!
|
|
451
|
-
let t =
|
|
452
|
-
t && !
|
|
496
|
+
if (!qe(e)) break;
|
|
497
|
+
let t = Ke();
|
|
498
|
+
t && !G(t.r, t.c) && (e.preventDefault(), Z(t.r, t.c, e.key, "enter"));
|
|
453
499
|
}
|
|
454
500
|
}
|
|
455
501
|
}
|
|
456
|
-
function
|
|
457
|
-
|
|
502
|
+
function Z(e, t, n, r) {
|
|
503
|
+
We(e.id, t.id), T.value = {
|
|
458
504
|
rowId: e.id,
|
|
459
505
|
columnId: t.id,
|
|
460
506
|
draft: n,
|
|
461
507
|
mode: r
|
|
462
|
-
},
|
|
508
|
+
}, g(() => {
|
|
463
509
|
let e = o.value;
|
|
464
510
|
if (e) if (e.focus({ preventScroll: !0 }), r === "enter") {
|
|
465
511
|
let t = e.value.length;
|
|
@@ -467,11 +513,11 @@ var D = (e) => {
|
|
|
467
513
|
} else e.select();
|
|
468
514
|
});
|
|
469
515
|
}
|
|
470
|
-
let
|
|
516
|
+
let Ye = d(() => {
|
|
471
517
|
if (T.value) return r.columns.find((e) => e.id === T.value.columnId)?.type === "number" ? "decimal" : "text";
|
|
472
|
-
}),
|
|
518
|
+
}), Xe = d(() => {
|
|
473
519
|
if (!T.value) return { display: "none" };
|
|
474
|
-
let e = a.value, t = e?.querySelector(`[data-cell="${
|
|
520
|
+
let e = a.value, t = e?.querySelector(`[data-cell="${Y(`${T.value.rowId}::${T.value.columnId}`)}"]`);
|
|
475
521
|
if (!e || !t) return { display: "none" };
|
|
476
522
|
let n = t.getBoundingClientRect(), r = e.getBoundingClientRect();
|
|
477
523
|
return {
|
|
@@ -481,7 +527,7 @@ var D = (e) => {
|
|
|
481
527
|
height: `${n.height}px`
|
|
482
528
|
};
|
|
483
529
|
});
|
|
484
|
-
function
|
|
530
|
+
function Ze(e) {
|
|
485
531
|
let t = T.value?.mode, n = null;
|
|
486
532
|
switch (e.key) {
|
|
487
533
|
case "Enter":
|
|
@@ -506,9 +552,9 @@ var D = (e) => {
|
|
|
506
552
|
e.preventDefault(), T.value = null, q();
|
|
507
553
|
return;
|
|
508
554
|
}
|
|
509
|
-
n && (e.preventDefault(),
|
|
555
|
+
n && (e.preventDefault(), Q(), J(n[0], n[1]));
|
|
510
556
|
}
|
|
511
|
-
function
|
|
557
|
+
function Q(e = !0) {
|
|
512
558
|
if (!T.value) return;
|
|
513
559
|
let { rowId: t, columnId: n, draft: a } = T.value;
|
|
514
560
|
T.value = null;
|
|
@@ -516,12 +562,12 @@ var D = (e) => {
|
|
|
516
562
|
if (!o) return;
|
|
517
563
|
let s;
|
|
518
564
|
try {
|
|
519
|
-
s = o.parse ? o.parse(a) :
|
|
565
|
+
s = o.parse ? o.parse(a) : we(o, a);
|
|
520
566
|
} catch {
|
|
521
567
|
e && q();
|
|
522
568
|
return;
|
|
523
569
|
}
|
|
524
|
-
let c =
|
|
570
|
+
let c = U(t, n);
|
|
525
571
|
if (c !== s) {
|
|
526
572
|
let e = {
|
|
527
573
|
rowId: t,
|
|
@@ -529,16 +575,16 @@ var D = (e) => {
|
|
|
529
575
|
before: c,
|
|
530
576
|
after: s
|
|
531
577
|
};
|
|
532
|
-
|
|
578
|
+
$([e]), i("commit", e), i("change", [e]);
|
|
533
579
|
}
|
|
534
580
|
e && q();
|
|
535
581
|
}
|
|
536
|
-
function
|
|
582
|
+
function Qe() {
|
|
537
583
|
if (!C.value) return [];
|
|
538
584
|
let e = [
|
|
539
|
-
...
|
|
540
|
-
...
|
|
541
|
-
...
|
|
585
|
+
...V.value,
|
|
586
|
+
...B.value,
|
|
587
|
+
...H.value
|
|
542
588
|
].map((e) => e.id), t = j.value.map((e) => e.id), n = e.indexOf(C.value.startRowId), r = e.indexOf(C.value.endRowId), i = t.indexOf(C.value.startColumnId), a = t.indexOf(C.value.endColumnId), o = [];
|
|
543
589
|
for (let s = Math.min(n, r); s <= Math.max(n, r); s++) for (let n = Math.min(i, a); n <= Math.max(i, a); n++) o.push({
|
|
544
590
|
rowId: e[s],
|
|
@@ -546,12 +592,12 @@ var D = (e) => {
|
|
|
546
592
|
});
|
|
547
593
|
return o;
|
|
548
594
|
}
|
|
549
|
-
function
|
|
550
|
-
let e =
|
|
595
|
+
function $e() {
|
|
596
|
+
let e = Qe(), t = [];
|
|
551
597
|
for (let { rowId: n, columnId: i } of e) {
|
|
552
598
|
let e = r.rows.find((e) => e.id === n), a = r.columns.find((e) => e.id === i);
|
|
553
|
-
if (!e || !a ||
|
|
554
|
-
let o =
|
|
599
|
+
if (!e || !a || G(e, a)) continue;
|
|
600
|
+
let o = U(n, i);
|
|
555
601
|
o == null || o === "" || t.push({
|
|
556
602
|
rowId: n,
|
|
557
603
|
columnId: i,
|
|
@@ -560,54 +606,54 @@ var D = (e) => {
|
|
|
560
606
|
});
|
|
561
607
|
}
|
|
562
608
|
if (t.length !== 0) {
|
|
563
|
-
|
|
609
|
+
$(t);
|
|
564
610
|
for (let e of t) i("commit", e);
|
|
565
611
|
i("change", t);
|
|
566
612
|
}
|
|
567
613
|
}
|
|
568
|
-
function
|
|
569
|
-
if (
|
|
614
|
+
function et(e) {
|
|
615
|
+
if (Qe().length === 0) return;
|
|
570
616
|
let t = [
|
|
571
|
-
...
|
|
572
|
-
...
|
|
573
|
-
...
|
|
617
|
+
...V.value,
|
|
618
|
+
...B.value,
|
|
619
|
+
...H.value
|
|
574
620
|
].map((e) => e.id), n = j.value.map((e) => e.id), r = Math.min(t.indexOf(C.value.startRowId), t.indexOf(C.value.endRowId)), i = Math.max(t.indexOf(C.value.startRowId), t.indexOf(C.value.endRowId)), a = Math.min(n.indexOf(C.value.startColumnId), n.indexOf(C.value.endColumnId)), o = Math.max(n.indexOf(C.value.startColumnId), n.indexOf(C.value.endColumnId)), s = [];
|
|
575
621
|
for (let e = r; e <= i; e++) {
|
|
576
622
|
let r = [];
|
|
577
623
|
for (let i = a; i <= o; i++) {
|
|
578
|
-
let a =
|
|
624
|
+
let a = U(t[e], n[i]);
|
|
579
625
|
r.push(a == null ? "" : String(a));
|
|
580
626
|
}
|
|
581
627
|
s.push(r.join(" "));
|
|
582
628
|
}
|
|
583
629
|
e.preventDefault(), e.clipboardData?.setData("text/plain", s.join("\n"));
|
|
584
630
|
}
|
|
585
|
-
function
|
|
586
|
-
|
|
631
|
+
function tt(e) {
|
|
632
|
+
et(e), $e();
|
|
587
633
|
}
|
|
588
|
-
function
|
|
589
|
-
if (!
|
|
634
|
+
function nt(e) {
|
|
635
|
+
if (!h.value) return;
|
|
590
636
|
let t = e.clipboardData?.getData("text/plain") ?? "";
|
|
591
637
|
if (!t) return;
|
|
592
638
|
e.preventDefault();
|
|
593
639
|
let n = t.replace(/\r\n?/g, "\n").split("\n").map((e) => e.split(" ")), a = [
|
|
594
|
-
...
|
|
595
|
-
...
|
|
596
|
-
...
|
|
597
|
-
].map((e) => e.id), o = j.value.map((e) => e.id), s = a.indexOf(
|
|
640
|
+
...V.value,
|
|
641
|
+
...B.value,
|
|
642
|
+
...H.value
|
|
643
|
+
].map((e) => e.id), o = j.value.map((e) => e.id), s = a.indexOf(h.value.rowId), c = o.indexOf(h.value.columnId), l = [];
|
|
598
644
|
if (n.forEach((e, t) => {
|
|
599
645
|
e.forEach((e, n) => {
|
|
600
646
|
let i = a[s + t], u = o[c + n];
|
|
601
647
|
if (!i || !u) return;
|
|
602
648
|
let d = r.rows.find((e) => e.id === i), f = r.columns.find((e) => e.id === u);
|
|
603
|
-
if (!d || !f ||
|
|
649
|
+
if (!d || !f || G(d, f)) return;
|
|
604
650
|
let p;
|
|
605
651
|
try {
|
|
606
|
-
p = f.parse ? f.parse(e) :
|
|
652
|
+
p = f.parse ? f.parse(e) : we(f, e);
|
|
607
653
|
} catch {
|
|
608
654
|
return;
|
|
609
655
|
}
|
|
610
|
-
let m =
|
|
656
|
+
let m = U(i, u);
|
|
611
657
|
m !== p && l.push({
|
|
612
658
|
rowId: i,
|
|
613
659
|
columnId: u,
|
|
@@ -616,13 +662,13 @@ var D = (e) => {
|
|
|
616
662
|
});
|
|
617
663
|
});
|
|
618
664
|
}), l.length !== 0) {
|
|
619
|
-
|
|
665
|
+
$(l);
|
|
620
666
|
for (let e of l) i("commit", e);
|
|
621
667
|
i("change", l);
|
|
622
668
|
}
|
|
623
669
|
}
|
|
624
|
-
function
|
|
625
|
-
let n = e.clientX, r =
|
|
670
|
+
function rt(e, t) {
|
|
671
|
+
let n = e.clientX, r = M(t), i = t.minWidth ?? 60, a = (e) => {
|
|
626
672
|
let a = Math.max(i, r + (e.clientX - n));
|
|
627
673
|
s.value = {
|
|
628
674
|
...s.value,
|
|
@@ -633,7 +679,7 @@ var D = (e) => {
|
|
|
633
679
|
};
|
|
634
680
|
window.addEventListener("mousemove", a), window.addEventListener("mouseup", o);
|
|
635
681
|
}
|
|
636
|
-
function
|
|
682
|
+
function it(e) {
|
|
637
683
|
e.sortable && (c.value?.columnId === e.id ? c.value = c.value.direction === "asc" ? {
|
|
638
684
|
columnId: e.id,
|
|
639
685
|
direction: "desc"
|
|
@@ -642,10 +688,10 @@ var D = (e) => {
|
|
|
642
688
|
direction: "asc"
|
|
643
689
|
});
|
|
644
690
|
}
|
|
645
|
-
function
|
|
691
|
+
function $(e) {
|
|
646
692
|
k.value.push(e), A.value = [];
|
|
647
693
|
}
|
|
648
|
-
function
|
|
694
|
+
function at() {
|
|
649
695
|
let e = k.value.pop();
|
|
650
696
|
if (!e) return;
|
|
651
697
|
let t = e.map((e) => ({
|
|
@@ -656,7 +702,7 @@ var D = (e) => {
|
|
|
656
702
|
for (let e of t) i("commit", e);
|
|
657
703
|
i("change", t), A.value.push(e);
|
|
658
704
|
}
|
|
659
|
-
function
|
|
705
|
+
function ot() {
|
|
660
706
|
let e = A.value.pop();
|
|
661
707
|
if (e) {
|
|
662
708
|
for (let t of e) i("commit", t);
|
|
@@ -664,83 +710,95 @@ var D = (e) => {
|
|
|
664
710
|
}
|
|
665
711
|
}
|
|
666
712
|
return te(() => {
|
|
667
|
-
q()
|
|
668
|
-
|
|
713
|
+
q(), I(), z(), typeof ResizeObserver < "u" && a.value && (L = new ResizeObserver(() => {
|
|
714
|
+
I(), z();
|
|
715
|
+
}), L.observe(a.value));
|
|
716
|
+
}), ee(() => L?.disconnect()), t({
|
|
669
717
|
focus: (e, t) => K(e, t),
|
|
670
|
-
undo:
|
|
671
|
-
redo:
|
|
718
|
+
undo: at,
|
|
719
|
+
redo: ot,
|
|
672
720
|
getSelection: () => C.value
|
|
673
|
-
}), (t, n) => (
|
|
721
|
+
}), (t, n) => (y(), p("div", {
|
|
722
|
+
class: _(["nb-spreadsheet", {
|
|
723
|
+
"nb-spreadsheet--editing": !!T.value,
|
|
724
|
+
"nb-spreadsheet--fit": e.fit
|
|
725
|
+
}]),
|
|
726
|
+
style: v(ye.value)
|
|
727
|
+
}, [t.$slots.toolbar ? (y(), p("div", ce, [ne(t.$slots, "toolbar", {}, void 0, !0)])) : f("", !0), m("div", {
|
|
674
728
|
ref_key: "scrollerRef",
|
|
675
729
|
ref: a,
|
|
676
730
|
class: "nb-spreadsheet__scroller",
|
|
677
731
|
tabindex: "0",
|
|
678
|
-
onKeydown:
|
|
679
|
-
onCopy:
|
|
680
|
-
onCut:
|
|
681
|
-
onPaste:
|
|
682
|
-
onScroll:
|
|
683
|
-
}, [
|
|
732
|
+
onKeydown: Je,
|
|
733
|
+
onCopy: et,
|
|
734
|
+
onCut: tt,
|
|
735
|
+
onPaste: nt,
|
|
736
|
+
onScroll: Ge
|
|
737
|
+
}, [m("div", {
|
|
684
738
|
class: "nb-spreadsheet__grid",
|
|
685
|
-
style:
|
|
739
|
+
style: v(be.value)
|
|
686
740
|
}, [
|
|
687
|
-
e.showGutter ? (
|
|
688
|
-
(
|
|
741
|
+
e.showGutter ? (y(), p("div", le)) : f("", !0),
|
|
742
|
+
(y(!0), p(u, null, x(j.value, (t, n) => (y(), p("div", {
|
|
689
743
|
key: `h-${t.id}`,
|
|
690
|
-
class:
|
|
691
|
-
|
|
692
|
-
|
|
744
|
+
class: _(["nb-spreadsheet__header", Oe(t)]),
|
|
745
|
+
"data-header-col": t.id,
|
|
746
|
+
style: v(je(t, n)),
|
|
747
|
+
onClick: (e) => it(t)
|
|
693
748
|
}, [
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
749
|
+
m("span", {
|
|
750
|
+
class: "nb-spreadsheet__header-label",
|
|
751
|
+
title: R.value.has(t.id) ? t.label : void 0
|
|
752
|
+
}, S(R.value.has(t.id) ? t.shortLabel : t.label), 9, de),
|
|
753
|
+
c.value && c.value.columnId === t.id ? (y(), p("span", fe, S(c.value.direction === "asc" ? "▲" : "▼"), 1)) : f("", !0),
|
|
754
|
+
e.resizable ? (y(), p("span", {
|
|
697
755
|
key: 1,
|
|
698
756
|
class: "nb-spreadsheet__resize-handle",
|
|
699
|
-
onMousedown:
|
|
700
|
-
}, null, 40,
|
|
701
|
-
], 14,
|
|
702
|
-
(
|
|
757
|
+
onMousedown: se((e) => rt(e, t), ["stop"])
|
|
758
|
+
}, null, 40, pe)) : f("", !0)
|
|
759
|
+
], 14, ue))), 128)),
|
|
760
|
+
(y(!0), p(u, null, x(Se.value, (t) => (y(), p(u, { key: `r-${t.id}` }, [e.showGutter ? (y(), p("div", {
|
|
703
761
|
key: 0,
|
|
704
|
-
class:
|
|
762
|
+
class: _(["nb-spreadsheet__gutter", {
|
|
705
763
|
"nb-spreadsheet__gutter--pinned-top": t.pinned === "top",
|
|
706
764
|
"nb-spreadsheet__gutter--pinned-bottom": t.pinned === "bottom"
|
|
707
765
|
}]),
|
|
708
|
-
style:
|
|
709
|
-
},
|
|
766
|
+
style: v(Fe(t))
|
|
767
|
+
}, S(Pe(t)), 7)) : f("", !0), (y(!0), p(u, null, x(j.value, (e, r) => (y(), p("div", {
|
|
710
768
|
key: `c-${t.id}-${e.id}`,
|
|
711
|
-
class:
|
|
712
|
-
style:
|
|
713
|
-
title:
|
|
769
|
+
class: _(["nb-spreadsheet__cell", Ee(t, e)]),
|
|
770
|
+
style: v(Me(t, e, r)),
|
|
771
|
+
title: De(t, e),
|
|
714
772
|
"data-cell": `${t.id}::${e.id}`,
|
|
715
773
|
"data-row": t.id,
|
|
716
774
|
"data-col": e.id,
|
|
717
|
-
onPointerdown: n[0] ||= (e) =>
|
|
718
|
-
onMousedown: (n) =>
|
|
719
|
-
onMouseenter: (n) =>
|
|
720
|
-
onDblclick: (n) =>
|
|
721
|
-
}, [
|
|
722
|
-
], 4), T.value ?
|
|
775
|
+
onPointerdown: n[0] ||= (e) => Le(e),
|
|
776
|
+
onMousedown: (n) => Re(n, t, e),
|
|
777
|
+
onMouseenter: (n) => ze(t, e),
|
|
778
|
+
onDblclick: (n) => Ve(t, e)
|
|
779
|
+
}, [m("span", null, S(Te(t, e)), 1)], 46, me))), 128))], 64))), 128))
|
|
780
|
+
], 4), T.value ? oe((y(), p("input", {
|
|
723
781
|
key: 0,
|
|
724
782
|
ref_key: "editorRef",
|
|
725
783
|
ref: o,
|
|
726
784
|
"onUpdate:modelValue": n[1] ||= (e) => T.value.draft = e,
|
|
727
785
|
class: "nb-spreadsheet__editor",
|
|
728
|
-
style:
|
|
729
|
-
inputmode:
|
|
786
|
+
style: v(Xe.value),
|
|
787
|
+
inputmode: Ye.value,
|
|
730
788
|
enterkeyhint: "next",
|
|
731
|
-
onBlur: n[2] ||= (e) =>
|
|
732
|
-
onKeydown:
|
|
733
|
-
}, null, 44,
|
|
789
|
+
onBlur: n[2] ||= (e) => Q(!1),
|
|
790
|
+
onKeydown: se(Ze, ["stop"])
|
|
791
|
+
}, null, 44, he)), [[ie, T.value.draft]]) : f("", !0)], 544)], 6));
|
|
734
792
|
}
|
|
735
|
-
}),
|
|
736
|
-
Object.keys(
|
|
737
|
-
let n = `Nb${t.replace(/(.+\/)(\w+)(\.vue)$/, "$2")}`, r =
|
|
793
|
+
}), N = /* @__PURE__ */ r({ default: () => P }), P = /* @__PURE__ */ c(M, [["__scopeId", "data-v-08b9812f"]]), F = /* @__PURE__ */ Object.assign({ "./components/labs/Spreadsheet.vue": N }), I = { install(e) {
|
|
794
|
+
Object.keys(F).forEach((t) => {
|
|
795
|
+
let n = `Nb${t.replace(/(.+\/)(\w+)(\.vue)$/, "$2")}`, r = F[t];
|
|
738
796
|
e.component(n, r.default);
|
|
739
797
|
});
|
|
740
|
-
} },
|
|
798
|
+
} }, L = { install(e, t = {}) {
|
|
741
799
|
if (t.components) for (let [n, r] of Object.entries(t.components)) e.component(n, r);
|
|
742
800
|
if (e.provide(n, { ...t.button }), t.ssr) {
|
|
743
|
-
let t =
|
|
801
|
+
let t = b(!0);
|
|
744
802
|
e.provide(s, { pending: t });
|
|
745
803
|
let n = e.mount.bind(e);
|
|
746
804
|
e.mount = ((...e) => {
|
|
@@ -751,4 +809,4 @@ var D = (e) => {
|
|
|
751
809
|
e.use(k), e.use(A);
|
|
752
810
|
} };
|
|
753
811
|
//#endregion
|
|
754
|
-
export { A as a, j as i,
|
|
812
|
+
export { A as a, j as i, I as n, D as o, P as r, L as t };
|