@updog/data-editor-wc 0.1.60 → 0.1.61
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/index.js +56 -53
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -26046,6 +26046,7 @@ var Qp = class {
|
|
|
26046
26046
|
phase: "idle",
|
|
26047
26047
|
processing: null,
|
|
26048
26048
|
sources: [],
|
|
26049
|
+
hasBaselineData: !1,
|
|
26049
26050
|
canUndo: !1,
|
|
26050
26051
|
canRedo: !1,
|
|
26051
26052
|
version: 0,
|
|
@@ -26106,9 +26107,9 @@ var Qp = class {
|
|
|
26106
26107
|
return;
|
|
26107
26108
|
}
|
|
26108
26109
|
this._countsDirty && (this.recomputeVisibleCounts(e), this._filteredCountsDirty = !0), this._filteredCountsDirty && this.recomputeFilteredCounts(e);
|
|
26109
|
-
let t = e.getFilteredRowIds()?.length ?? e.getRowCount(), n = e.getPendingValidationCount(), r = e.getShowOnlyDeletedRows(), i = e.getServerDeletedCount ? e.getServerDeletedCount() : e.getDeletedCount();
|
|
26110
|
+
let t = e.getFilteredRowIds()?.length ?? e.getRowCount(), n = e.getPendingValidationCount(), r = e.getShowOnlyDeletedRows(), i = e.getServerDeletedCount ? e.getServerDeletedCount() : e.getDeletedCount(), a = r ? i : e.getRowCount(), o = e.getSources(), s = o.some((e) => e.isInitialData && e.rowCount > 0);
|
|
26110
26111
|
this.snapshot = {
|
|
26111
|
-
rowCount:
|
|
26112
|
+
rowCount: a,
|
|
26112
26113
|
filteredCount: t,
|
|
26113
26114
|
newRowCount: this._visibleNewCount,
|
|
26114
26115
|
editedRowCount: this._visibleEditedCount,
|
|
@@ -26129,7 +26130,8 @@ var Qp = class {
|
|
|
26129
26130
|
isFiltering: e.isFiltering(),
|
|
26130
26131
|
phase: this._phase,
|
|
26131
26132
|
processing: this._processingInfo,
|
|
26132
|
-
sources:
|
|
26133
|
+
sources: o,
|
|
26134
|
+
hasBaselineData: s,
|
|
26133
26135
|
canUndo: e.canUndo(),
|
|
26134
26136
|
canRedo: e.canRedo(),
|
|
26135
26137
|
version: e.getVersion(),
|
|
@@ -32122,18 +32124,18 @@ var i_ = [3, 2], a_ = .8, o_ = .5, s_ = 1500;
|
|
|
32122
32124
|
//#endregion
|
|
32123
32125
|
//#region src/components/DataEditor/DataEditorGrid/engine/paint/FrameState.ts
|
|
32124
32126
|
function c_(e) {
|
|
32125
|
-
let { controller: t, layout: n, viewport: r, store: i, columns: a } = e, o = t.selection, s = t.clipboard.getClipboardOperation(), c = t.clipboard.getClipboardBounds(), l = i.getSnapshot().filteredCount,
|
|
32126
|
-
start:
|
|
32127
|
-
end:
|
|
32128
|
-
},
|
|
32129
|
-
start:
|
|
32130
|
-
end:
|
|
32131
|
-
},
|
|
32132
|
-
if (
|
|
32127
|
+
let { controller: t, layout: n, viewport: r, store: i, columns: a } = e, o = t.selection, s = t.clipboard.getClipboardOperation(), c = t.clipboard.getClipboardBounds(), l = i.getSnapshot(), u = l.filteredCount, d = r.getVisibleRowRange(u), f = {
|
|
32128
|
+
start: d.start,
|
|
32129
|
+
end: d.end
|
|
32130
|
+
}, p = r.getVisibleColRange(n, a.length), m = {
|
|
32131
|
+
start: p.start,
|
|
32132
|
+
end: p.end
|
|
32133
|
+
}, h = n.pinnedCount, g = null;
|
|
32134
|
+
if (h > 0) {
|
|
32133
32135
|
let e = n.getPinnedWidth(), t = n.contentToCanvasX(76, e);
|
|
32134
|
-
|
|
32136
|
+
g = {
|
|
32135
32137
|
colStart: 0,
|
|
32136
|
-
colEnd:
|
|
32138
|
+
colEnd: h,
|
|
32137
32139
|
scrollLeft: 0,
|
|
32138
32140
|
clip: {
|
|
32139
32141
|
x: t,
|
|
@@ -32159,10 +32161,10 @@ function c_(e) {
|
|
|
32159
32161
|
findReplace: e.findReplace,
|
|
32160
32162
|
time: e.time,
|
|
32161
32163
|
resizeGuideX: e.resizeGuideX,
|
|
32162
|
-
totalRows:
|
|
32164
|
+
totalRows: u,
|
|
32163
32165
|
totalWidth: n.getTotalWidth(),
|
|
32164
|
-
rowRange:
|
|
32165
|
-
colRange:
|
|
32166
|
+
rowRange: f,
|
|
32167
|
+
colRange: m,
|
|
32166
32168
|
selection: o.getSnapshot(),
|
|
32167
32169
|
rowSelected: (e) => o.isRowSelected(e),
|
|
32168
32170
|
rowHighlighted: (e) => o.isRowHighlighted(e),
|
|
@@ -32178,17 +32180,18 @@ function c_(e) {
|
|
|
32178
32180
|
searchLength: e.findReplace?.getSearchLength() ?? 0,
|
|
32179
32181
|
panes: {
|
|
32180
32182
|
scrollable: {
|
|
32181
|
-
colStart:
|
|
32182
|
-
colEnd:
|
|
32183
|
+
colStart: m.start,
|
|
32184
|
+
colEnd: m.end,
|
|
32183
32185
|
scrollLeft: r.scrollLeft,
|
|
32184
32186
|
clip: null,
|
|
32185
32187
|
shimmerWidth: r.viewportWidth,
|
|
32186
32188
|
shimmerOffsetX: 0
|
|
32187
32189
|
},
|
|
32188
|
-
pinned:
|
|
32190
|
+
pinned: g
|
|
32189
32191
|
},
|
|
32190
32192
|
hasSkeletons: !1,
|
|
32191
|
-
hasPendingCells: !1
|
|
32193
|
+
hasPendingCells: !1,
|
|
32194
|
+
hasBaselineData: l.hasBaselineData
|
|
32192
32195
|
};
|
|
32193
32196
|
}
|
|
32194
32197
|
function l_(e, t, n) {
|
|
@@ -32405,26 +32408,26 @@ var b_ = class {
|
|
|
32405
32408
|
}
|
|
32406
32409
|
}, x_ = class {
|
|
32407
32410
|
paint(e) {
|
|
32408
|
-
let { ctx: t, theme: n, layout: r, viewport: i, textCache: a, store: o, rowRange: s } = e, { scrollTop:
|
|
32409
|
-
t.fillStyle = n.markerBgIdle, Ng(t,
|
|
32411
|
+
let { ctx: t, theme: n, layout: r, viewport: i, textCache: a, store: o, rowRange: s, hasBaselineData: c } = e, { scrollTop: l, viewportHeight: u } = i, d = r.rtl, f = r.getMarkerCanvasX(), p = o.getFilters().showOnlyDeletedRows;
|
|
32412
|
+
t.fillStyle = n.markerBgIdle, Ng(t, f, 36, 76, u - 36);
|
|
32410
32413
|
for (let i = s.start; i < s.end; i++) {
|
|
32411
|
-
let s = r.getRowY(i,
|
|
32412
|
-
if (e.rowSelected(i) ? (t.fillStyle = n.markerBgSelected, Ng(t,
|
|
32413
|
-
let e =
|
|
32414
|
-
if (o.hasRowErrors(
|
|
32415
|
-
else if (!
|
|
32414
|
+
let s = r.getRowY(i, l), u = o.getRowId(i);
|
|
32415
|
+
if (e.rowSelected(i) ? (t.fillStyle = n.markerBgSelected, Ng(t, f, s, 76, 34)) : e.rowHighlighted(i) && (t.fillStyle = n.markerBgActive, Ng(t, f, s, 76, 34)), u !== void 0) {
|
|
32416
|
+
let e = d ? f : 73;
|
|
32417
|
+
if (o.hasRowErrors(u)) t.fillStyle = n.statusBarBgError, Ng(t, e, s, 3, 34);
|
|
32418
|
+
else if (!p && o.hasRowMisplaced(u)) {
|
|
32416
32419
|
let r = Fg(e + 3 / 2, 0, 3).x;
|
|
32417
32420
|
t.strokeStyle = n.cellBorderMisplaced, t.lineWidth = 3, t.setLineDash(i_), t.beginPath(), t.moveTo(r, s), t.lineTo(r, s + 34), t.stroke(), t.setLineDash([]);
|
|
32418
|
-
} else o.isEdited(
|
|
32421
|
+
} else o.isEdited(u) ? (t.fillStyle = n.statusBarBgEdited, Ng(t, e, s, 3, 34)) : c && o.isNew(u) ? (t.fillStyle = n.statusBarBgNew, Ng(t, e, s, 3, 34)) : o.hasEmptyCells(u) && (t.fillStyle = n.statusBarBgEmpty, Ng(t, e, s, 3, 34));
|
|
32419
32422
|
}
|
|
32420
|
-
t.font = n.font, t.fillStyle = n.markerContentIdle, Rg(t, String(i + 1),
|
|
32423
|
+
t.font = n.font, t.fillStyle = n.markerContentIdle, Rg(t, String(i + 1), f + 76 / 2, s + 34 / 2 + 2, 58, a, "center");
|
|
32421
32424
|
}
|
|
32422
32425
|
t.strokeStyle = n.cellBorderIdle, t.lineWidth = 1, t.beginPath();
|
|
32423
|
-
let
|
|
32424
|
-
t.moveTo(
|
|
32426
|
+
let m = d ? Fg(f, 0, 1).x : Fg(76, 0, 1).x;
|
|
32427
|
+
t.moveTo(m, 36), t.lineTo(m, u);
|
|
32425
32428
|
for (let e = s.start; e <= s.end; e++) {
|
|
32426
|
-
let n = Fg(0, r.getRowY(e,
|
|
32427
|
-
t.moveTo(
|
|
32429
|
+
let n = Fg(0, r.getRowY(e, l), 1).y;
|
|
32430
|
+
t.moveTo(f, n), t.lineTo(f + 76, n);
|
|
32428
32431
|
}
|
|
32429
32432
|
t.stroke();
|
|
32430
32433
|
}
|
|
@@ -45556,21 +45559,21 @@ var mj = {
|
|
|
45556
45559
|
})
|
|
45557
45560
|
});
|
|
45558
45561
|
}, Oj = () => {
|
|
45559
|
-
let { store: e, scrollToGridTop: t, filtersResetKey: n, enableDeleteRow: r } = wh(), { t: i } = j(), { filteredNewRowCount: a, filteredEditedRowCount: o, filteredEmptyRowCount: s, misplacedRowCount: c, deletedRowCount: l } = td(e), [
|
|
45562
|
+
let { store: e, scrollToGridTop: t, filtersResetKey: n, enableDeleteRow: r } = wh(), { t: i } = j(), { filteredNewRowCount: a, filteredEditedRowCount: o, filteredEmptyRowCount: s, misplacedRowCount: c, deletedRowCount: l, hasBaselineData: u } = td(e), [d, f] = (0, y.useState)(() => e.getFilters().showOnlyEditedRows), [p, m] = (0, y.useState)(() => e.getFilters().showOnlyNewRows), [h, g] = (0, y.useState)(() => e.getFilters().showOnlyEmptyCells), [_, v] = (0, y.useState)(() => e.getFilters().showOnlyMisplacedRows), [b, x] = (0, y.useState)(() => e.getFilters().showOnlyDeletedRows);
|
|
45560
45563
|
(0, y.useEffect)(() => {
|
|
45561
45564
|
let t = e.getFilters();
|
|
45562
|
-
|
|
45565
|
+
f(t.showOnlyEditedRows), m(t.showOnlyNewRows), g(t.showOnlyEmptyCells), v(t.showOnlyMisplacedRows), x(t.showOnlyDeletedRows);
|
|
45563
45566
|
}, [n, e]);
|
|
45564
|
-
let
|
|
45565
|
-
|
|
45566
|
-
}, [t, e]), S = (0, y.useCallback)((n) => {
|
|
45567
|
-
p(n), t(), e.setFilters({ showOnlyNewRows: n });
|
|
45567
|
+
let S = (0, y.useCallback)((n) => {
|
|
45568
|
+
f(n), t(), e.setFilters({ showOnlyEditedRows: n });
|
|
45568
45569
|
}, [t, e]), C = (0, y.useCallback)((n) => {
|
|
45569
|
-
|
|
45570
|
+
m(n), t(), e.setFilters({ showOnlyNewRows: n });
|
|
45570
45571
|
}, [t, e]), w = (0, y.useCallback)((n) => {
|
|
45571
|
-
|
|
45572
|
+
g(n), t(), e.setFilters({ showOnlyEmptyCells: n });
|
|
45572
45573
|
}, [t, e]), T = (0, y.useCallback)((n) => {
|
|
45573
|
-
|
|
45574
|
+
v(n), t(), e.setFilters({ showOnlyMisplacedRows: n });
|
|
45575
|
+
}, [t, e]), E = (0, y.useCallback)((n) => {
|
|
45576
|
+
x(n), t(), e.setFilters({ showOnlyDeletedRows: n });
|
|
45574
45577
|
}, [t, e]);
|
|
45575
45578
|
return /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
45576
45579
|
className: "updog__rows-section",
|
|
@@ -45582,8 +45585,8 @@ var mj = {
|
|
|
45582
45585
|
children: [
|
|
45583
45586
|
/* @__PURE__ */ (0, O.jsx)(Dj, { filtersResetKey: n }),
|
|
45584
45587
|
/* @__PURE__ */ (0, O.jsx)(jt, {
|
|
45585
|
-
checked:
|
|
45586
|
-
onChange:
|
|
45588
|
+
checked: d,
|
|
45589
|
+
onChange: S,
|
|
45587
45590
|
checkboxPosition: "start",
|
|
45588
45591
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
45589
45592
|
className: "updog__rows-section__checkbox-label",
|
|
@@ -45597,9 +45600,9 @@ var mj = {
|
|
|
45597
45600
|
})]
|
|
45598
45601
|
})
|
|
45599
45602
|
}),
|
|
45600
|
-
/* @__PURE__ */ (0, O.jsx)(jt, {
|
|
45601
|
-
checked:
|
|
45602
|
-
onChange:
|
|
45603
|
+
u && /* @__PURE__ */ (0, O.jsx)(jt, {
|
|
45604
|
+
checked: p,
|
|
45605
|
+
onChange: C,
|
|
45603
45606
|
checkboxPosition: "start",
|
|
45604
45607
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
45605
45608
|
className: "updog__rows-section__checkbox-label",
|
|
@@ -45614,8 +45617,8 @@ var mj = {
|
|
|
45614
45617
|
})
|
|
45615
45618
|
}),
|
|
45616
45619
|
/* @__PURE__ */ (0, O.jsx)(jt, {
|
|
45617
|
-
checked:
|
|
45618
|
-
onChange:
|
|
45620
|
+
checked: h,
|
|
45621
|
+
onChange: w,
|
|
45619
45622
|
checkboxPosition: "start",
|
|
45620
45623
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
45621
45624
|
className: "updog__rows-section__checkbox-label",
|
|
@@ -45630,8 +45633,8 @@ var mj = {
|
|
|
45630
45633
|
})
|
|
45631
45634
|
}),
|
|
45632
45635
|
/* @__PURE__ */ (0, O.jsx)(jt, {
|
|
45633
|
-
checked:
|
|
45634
|
-
onChange:
|
|
45636
|
+
checked: _,
|
|
45637
|
+
onChange: T,
|
|
45635
45638
|
checkboxPosition: "start",
|
|
45636
45639
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
45637
45640
|
className: "updog__rows-section__checkbox-label",
|
|
@@ -45646,8 +45649,8 @@ var mj = {
|
|
|
45646
45649
|
})
|
|
45647
45650
|
}),
|
|
45648
45651
|
r !== !1 && /* @__PURE__ */ (0, O.jsx)(jt, {
|
|
45649
|
-
checked:
|
|
45650
|
-
onChange:
|
|
45652
|
+
checked: b,
|
|
45653
|
+
onChange: E,
|
|
45651
45654
|
checkboxPosition: "start",
|
|
45652
45655
|
children: /* @__PURE__ */ (0, O.jsxs)("div", {
|
|
45653
45656
|
className: "updog__rows-section__checkbox-label",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@updog/data-editor-wc",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.61",
|
|
4
4
|
"description": "Client-side CSV importer and spreadsheet editor as a Web Component. Drop into Vue, Angular, Svelte, or vanilla JS. Import CSV, Excel, JSON; edit 1M+ rows entirely in the browser.",
|
|
5
5
|
"author": "Mikhail Kutateladze <admin@updog.tech>",
|
|
6
6
|
"homepage": "https://updog.tech",
|