@updog/data-editor 0.1.6 → 0.1.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/index.js +51 -51
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -21571,36 +21571,36 @@ async function jS(e, t, n) {
|
|
|
21571
21571
|
//#endregion
|
|
21572
21572
|
//#region src/components/DataEditor/DataSourcesSection/DataSource.tsx
|
|
21573
21573
|
var MS = ({ source: e }) => {
|
|
21574
|
-
let { store: t, scrollToGridTop: n } = X(), { t:
|
|
21575
|
-
n(), t.toggleSourceVisibility(
|
|
21576
|
-
},
|
|
21577
|
-
|
|
21574
|
+
let { store: t, scrollToGridTop: n, readonly: r } = X(), { t: i } = q(), { id: a, name: o, isLoading: s, rowCount: c, isVisible: l, isDeletable: u } = e, { value: d, setTrue: f, setFalse: p } = Ao(!1), m = i("dataEditor.dataSources.show"), h = i("dataEditor.dataSources.hide"), g = i("dataEditor.dataSources.remove"), _ = () => {
|
|
21575
|
+
n(), t.toggleSourceVisibility(a);
|
|
21576
|
+
}, v = () => {
|
|
21577
|
+
p(), n(), t.removeSource(a);
|
|
21578
21578
|
};
|
|
21579
21579
|
return /* @__PURE__ */ w("div", {
|
|
21580
21580
|
className: "updog__data-source",
|
|
21581
21581
|
children: [
|
|
21582
21582
|
/* @__PURE__ */ C(Sa, {
|
|
21583
|
-
className: E(!
|
|
21584
|
-
children:
|
|
21583
|
+
className: E(!l && "updog__data-source__content--hidden"),
|
|
21584
|
+
children: o
|
|
21585
21585
|
}),
|
|
21586
21586
|
/* @__PURE__ */ w("div", {
|
|
21587
21587
|
className: "updog__data-source__actions updog__data-source__actions--default",
|
|
21588
21588
|
children: [
|
|
21589
|
-
|
|
21589
|
+
s && /* @__PURE__ */ C(ai, { size: "xs" }),
|
|
21590
21590
|
/* @__PURE__ */ C(Oa, {
|
|
21591
|
-
text: qo(
|
|
21591
|
+
text: qo(c),
|
|
21592
21592
|
color: "neutral",
|
|
21593
|
-
className: E(!
|
|
21593
|
+
className: E(!l && "updog__data-source__tag--hidden")
|
|
21594
21594
|
}),
|
|
21595
|
-
!
|
|
21596
|
-
content:
|
|
21595
|
+
!l && /* @__PURE__ */ C(la, {
|
|
21596
|
+
content: m,
|
|
21597
21597
|
placement: "bottom-end",
|
|
21598
21598
|
children: /* @__PURE__ */ C(ui, {
|
|
21599
21599
|
variant: "ghost",
|
|
21600
21600
|
color: "neutral",
|
|
21601
|
-
"aria-label":
|
|
21601
|
+
"aria-label": m,
|
|
21602
21602
|
size: "sm",
|
|
21603
|
-
onClick:
|
|
21603
|
+
onClick: _,
|
|
21604
21604
|
children: /* @__PURE__ */ C(ce, {})
|
|
21605
21605
|
})
|
|
21606
21606
|
})
|
|
@@ -21608,57 +21608,57 @@ var MS = ({ source: e }) => {
|
|
|
21608
21608
|
}),
|
|
21609
21609
|
/* @__PURE__ */ w("div", {
|
|
21610
21610
|
className: "updog__data-source__actions updog__data-source__actions--hover",
|
|
21611
|
-
children: [
|
|
21612
|
-
content:
|
|
21611
|
+
children: [u && !r && /* @__PURE__ */ C(la, {
|
|
21612
|
+
content: g,
|
|
21613
21613
|
placement: "bottom-end",
|
|
21614
21614
|
children: /* @__PURE__ */ C(ui, {
|
|
21615
21615
|
variant: "ghost",
|
|
21616
21616
|
color: "danger",
|
|
21617
|
-
"aria-label":
|
|
21617
|
+
"aria-label": g,
|
|
21618
21618
|
size: "sm",
|
|
21619
|
-
onClick:
|
|
21619
|
+
onClick: f,
|
|
21620
21620
|
children: /* @__PURE__ */ C(Me, {})
|
|
21621
21621
|
})
|
|
21622
21622
|
}), /* @__PURE__ */ C(la, {
|
|
21623
|
-
content:
|
|
21623
|
+
content: l ? h : m,
|
|
21624
21624
|
placement: "bottom-end",
|
|
21625
21625
|
children: /* @__PURE__ */ C(ui, {
|
|
21626
21626
|
variant: "ghost",
|
|
21627
21627
|
color: "neutral",
|
|
21628
|
-
"aria-label":
|
|
21628
|
+
"aria-label": l ? h : m,
|
|
21629
21629
|
size: "sm",
|
|
21630
|
-
onClick:
|
|
21631
|
-
children: C(
|
|
21630
|
+
onClick: _,
|
|
21631
|
+
children: C(l ? se : ce, {})
|
|
21632
21632
|
})
|
|
21633
21633
|
})]
|
|
21634
21634
|
}),
|
|
21635
21635
|
/* @__PURE__ */ C(Hi, {
|
|
21636
|
-
open:
|
|
21637
|
-
onOpenChange:
|
|
21638
|
-
submitAction:
|
|
21639
|
-
title:
|
|
21640
|
-
description:
|
|
21641
|
-
submitText:
|
|
21636
|
+
open: d,
|
|
21637
|
+
onOpenChange: p,
|
|
21638
|
+
submitAction: v,
|
|
21639
|
+
title: i("dataEditor.dataSources.confirmRemove.title"),
|
|
21640
|
+
description: i("dataEditor.dataSources.confirmRemove.text"),
|
|
21641
|
+
submitText: i("dataEditor.dataSources.confirmRemove.action")
|
|
21642
21642
|
})
|
|
21643
21643
|
]
|
|
21644
21644
|
});
|
|
21645
21645
|
}, NS = () => {
|
|
21646
|
-
let { store: e, columns: t, navigateToCell: n, navigateToCellRef: r, setShowUploader: i, enableAddRow: a, importFormats: o } = X(), { t:
|
|
21646
|
+
let { store: e, columns: t, navigateToCell: n, navigateToCellRef: r, setShowUploader: i, enableAddRow: a, importFormats: o, readonly: s } = X(), { t: c } = q(), { sources: l, phase: u } = Mo(e), d = u !== "idle", p = v(() => {
|
|
21647
21647
|
let e = [];
|
|
21648
21648
|
return o.length > 0 && e.push({
|
|
21649
21649
|
id: "import_data",
|
|
21650
|
-
text:
|
|
21650
|
+
text: c("dataEditor.dataSources.importData"),
|
|
21651
21651
|
icon: /* @__PURE__ */ C(Ie, { size: "1rem" })
|
|
21652
21652
|
}), a && e.push({
|
|
21653
21653
|
id: "add_row",
|
|
21654
|
-
text:
|
|
21654
|
+
text: c("dataEditor.dataSources.addRow"),
|
|
21655
21655
|
icon: /* @__PURE__ */ C(Se, { size: "1rem" })
|
|
21656
21656
|
}), e;
|
|
21657
21657
|
}, [
|
|
21658
|
-
|
|
21658
|
+
c,
|
|
21659
21659
|
a,
|
|
21660
21660
|
o
|
|
21661
|
-
]),
|
|
21661
|
+
]), m = f(async (a) => {
|
|
21662
21662
|
if (a === "import_data") {
|
|
21663
21663
|
i(!0);
|
|
21664
21664
|
return;
|
|
@@ -21673,7 +21673,7 @@ var MS = ({ source: e }) => {
|
|
|
21673
21673
|
} catch {}
|
|
21674
21674
|
return;
|
|
21675
21675
|
}
|
|
21676
|
-
n(await jS(e, t,
|
|
21676
|
+
n(await jS(e, t, c("dataEditor.dataSources.manuallyAdded")), t[0].id);
|
|
21677
21677
|
}
|
|
21678
21678
|
}, [
|
|
21679
21679
|
i,
|
|
@@ -21681,29 +21681,29 @@ var MS = ({ source: e }) => {
|
|
|
21681
21681
|
t,
|
|
21682
21682
|
n,
|
|
21683
21683
|
r,
|
|
21684
|
-
|
|
21685
|
-
]),
|
|
21686
|
-
options:
|
|
21687
|
-
onSelect:
|
|
21684
|
+
c
|
|
21685
|
+
]), h = c("dataEditor.dataSources.addDataSource"), g = !s && (a || o.length > 0) ? /* @__PURE__ */ C(Ma, {
|
|
21686
|
+
options: p,
|
|
21687
|
+
onSelect: m,
|
|
21688
21688
|
placement: "bottom-end",
|
|
21689
21689
|
children: /* @__PURE__ */ C(la, {
|
|
21690
|
-
content:
|
|
21690
|
+
content: h,
|
|
21691
21691
|
placement: "bottom-end",
|
|
21692
21692
|
children: /* @__PURE__ */ C(ui, {
|
|
21693
|
-
"aria-label":
|
|
21693
|
+
"aria-label": h,
|
|
21694
21694
|
size: "sm",
|
|
21695
|
-
disabled:
|
|
21695
|
+
disabled: d,
|
|
21696
21696
|
children: /* @__PURE__ */ C(Se, {})
|
|
21697
21697
|
})
|
|
21698
21698
|
})
|
|
21699
21699
|
}) : void 0;
|
|
21700
21700
|
return /* @__PURE__ */ C(AS, {
|
|
21701
21701
|
icon: /* @__PURE__ */ C(pe, { size: "1rem" }),
|
|
21702
|
-
title:
|
|
21703
|
-
accessory:
|
|
21704
|
-
children:
|
|
21702
|
+
title: c("dataEditor.dataSources.title"),
|
|
21703
|
+
accessory: g,
|
|
21704
|
+
children: l.length > 0 && /* @__PURE__ */ C("div", {
|
|
21705
21705
|
className: "updog__data-sources-section__list",
|
|
21706
|
-
children:
|
|
21706
|
+
children: l.map((e) => /* @__PURE__ */ C(MS, { source: e }, e.id))
|
|
21707
21707
|
})
|
|
21708
21708
|
});
|
|
21709
21709
|
}, PS = ({ columns: e, resetKey: t }) => {
|
|
@@ -22820,30 +22820,30 @@ var fC = ({ text: e, onSelect: t }) => /* @__PURE__ */ C(Y, {
|
|
|
22820
22820
|
/* @__PURE__ */ C(vC, {})
|
|
22821
22821
|
]
|
|
22822
22822
|
}) }), xC = () => {
|
|
22823
|
-
let {
|
|
22823
|
+
let { store: e, chat: t } = X(), { filteredCount: n, isLoading: r } = Mo(e), { t: i } = q();
|
|
22824
22824
|
return /* @__PURE__ */ w(el, { children: [
|
|
22825
22825
|
/* @__PURE__ */ C(Qc, { children: /* @__PURE__ */ C("div", {
|
|
22826
22826
|
className: "updog__data-editor-aside",
|
|
22827
22827
|
children: /* @__PURE__ */ w("div", {
|
|
22828
22828
|
className: "updog__data-editor-aside__content updog__scrollbar",
|
|
22829
22829
|
children: [
|
|
22830
|
-
|
|
22831
|
-
|
|
22830
|
+
/* @__PURE__ */ C(NS, {}),
|
|
22831
|
+
/* @__PURE__ */ C(Ea, {}),
|
|
22832
22832
|
/* @__PURE__ */ C(XS, {})
|
|
22833
22833
|
]
|
|
22834
22834
|
})
|
|
22835
22835
|
}) }),
|
|
22836
22836
|
/* @__PURE__ */ w($c, { children: [
|
|
22837
22837
|
/* @__PURE__ */ C(kS, {}),
|
|
22838
|
-
!
|
|
22838
|
+
!r && n === 0 && /* @__PURE__ */ C(Da, {
|
|
22839
22839
|
className: "updog-grid__empty-state",
|
|
22840
|
-
title:
|
|
22841
|
-
text:
|
|
22840
|
+
title: i("dataEditor.grid.emptyTitle"),
|
|
22841
|
+
text: i("dataEditor.grid.emptyText")
|
|
22842
22842
|
}),
|
|
22843
22843
|
/* @__PURE__ */ C(tl, {}),
|
|
22844
22844
|
/* @__PURE__ */ C(kh, {})
|
|
22845
22845
|
] }),
|
|
22846
|
-
|
|
22846
|
+
t && /* @__PURE__ */ C(bC, {})
|
|
22847
22847
|
] });
|
|
22848
22848
|
}, SC = () => {
|
|
22849
22849
|
let { t: e } = q();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@updog/data-editor",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.7",
|
|
4
4
|
"description": "Enterprise-grade spreadsheet editor SDK for React. Edit large datasets with validation, undo/redo, CSV/XLSX import, and multi-source merging.",
|
|
5
5
|
"author": "Mikhail Kutateladze <admin@updog.tech>",
|
|
6
6
|
"homepage": "https://updog.tech",
|