@updog/data-editor-wc 0.1.44 → 0.1.46

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.
Files changed (3) hide show
  1. package/index.d.ts +10 -3
  2. package/index.js +184 -111
  3. package/package.json +1 -1
package/index.d.ts CHANGED
@@ -109,6 +109,7 @@ declare var export_default = {
109
109
  modal: {
110
110
  importTitle: "Import Data",
111
111
  editTitle: "Edit Data",
112
+ viewTitle: "View Data",
112
113
  },
113
114
  confirmClose: {
114
115
  title: "Discard changes?",
@@ -1148,7 +1149,7 @@ type RemoteSource = {
1148
1149
  * - `"editor"` — opens directly into the spreadsheet grid.
1149
1150
  * - `"uploader"` — opens the file import wizard first, then transitions to the grid.
1150
1151
  */
1151
- type DataEditorVariant = "editor" | "uploader";
1152
+ type DataEditorVariant = "editor" | "uploader" | "viewer";
1152
1153
  /** Base configuration shared by the public `DataEditorProps` and the internal provider. */
1153
1154
  type DataEditorBaseProps<TRow extends DataEditorRow = DataEditorRow> = {
1154
1155
  /** Column definitions. Each entry describes one column in the grid. */
@@ -1306,14 +1307,20 @@ type DataEditorBaseProps<TRow extends DataEditorRow = DataEditorRow> = {
1306
1307
  */
1307
1308
  onValueMatch?: (valuesToMatch: Record<string, ValueMatchInput>) => ValueMatchOutput | Promise<ValueMatchOutput>;
1308
1309
  /**
1309
- * Extra synonyms for column auto-matching. Keys are column IDs, values are
1310
- * alternative names the matching engine should recognize.
1310
+ * Extra synonyms layered on top of the built-ins for both column matching
1311
+ * (header vs column) and value matching (imported value vs select option).
1312
+ * Each key is the canonical target (a column ID/title, or a select option
1313
+ * value); the array lists aliases the matching engine should treat as
1314
+ * equivalent. Merged with the built-ins as a union per key.
1311
1315
  *
1312
1316
  * @example
1313
1317
  * ```ts
1314
1318
  * synonyms={{
1319
+ * // column aliases
1315
1320
  * productSku: ["sku", "article_no", "item_code"],
1316
1321
  * firstName: ["first", "given_name", "fname"],
1322
+ * // value aliases (e.g. for a "status" select)
1323
+ * Active: ["live", "enabled"],
1317
1324
  * }}
1318
1325
  * ```
1319
1326
  */
package/index.js CHANGED
@@ -8097,7 +8097,8 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
8097
8097
  dataEditor: {
8098
8098
  modal: {
8099
8099
  importTitle: "Import Data",
8100
- editTitle: "Edit Data"
8100
+ editTitle: "Edit Data",
8101
+ viewTitle: "View Data"
8101
8102
  },
8102
8103
  confirmClose: {
8103
8104
  title: "Discard changes?",
@@ -29868,6 +29869,7 @@ function Xm({ columns: e, primaryKey: t, loadData: n, scaleClient: r, onComplete
29868
29869
  setPendingImportFile: ve,
29869
29870
  openUploaderWithFile: ye,
29870
29871
  variant: a ?? "editor",
29872
+ isViewer: a === "viewer",
29871
29873
  search: ne,
29872
29874
  setSearch: re,
29873
29875
  matchCase: ie,
@@ -29883,7 +29885,7 @@ function Xm({ columns: e, primaryKey: t, loadData: n, scaleClient: r, onComplete
29883
29885
  resetScrollRef: z,
29884
29886
  scrollToGridTop: B,
29885
29887
  portalRef: me,
29886
- readonly: _ ?? !1,
29888
+ readonly: a === "viewer" ? !0 : _ ?? !1,
29887
29889
  filtersResetKey: de,
29888
29890
  resetFilters: fe,
29889
29891
  originalColumns: e,
@@ -31766,7 +31768,7 @@ var kg = 9, Ag = 3, jg = [3, 2], Mg = 1, Ng = 6, Pg = .8, Fg = .5, Ig = 4, Lg =
31766
31768
  paintHeaderCell(e, t, n) {
31767
31769
  let { ctx: r, theme: i, layout: a, textCache: o, columns: s, controller: c, sortState: l } = e, u = c.selection, d = a.pinnedCount, f = a.rtl, p = a.getColumnX(t, n), m = a.getColumnWidth(t), h = a.contentToCanvasX(p, m);
31768
31770
  u.isColumnSelected(t) ? (r.fillStyle = i.headerBgSelected, ag(r, h, 0, m, 36)) : u.isColumnHighlighted(t) && (r.fillStyle = i.headerBgActive, ag(r, h, 0, m, 36));
31769
- let g = s[t], _ = t < d, v = l?.columnId === g.id, y = e.store.isColumnLocked(g.id), b = 0;
31771
+ let g = s[t], _ = t < d, v = l?.columnId === g.id, y = !c.readonly && e.store.isColumnLocked(g.id), b = 0;
31770
31772
  y && b++, _ && b++, v && b++;
31771
31773
  let x = b > 0 ? b * 14 + (b - 1) * Ng + Ng : 0, S = m - kg * 2 - x;
31772
31774
  r.font = i.headerFont, r.fillStyle = i.headerContentIdle;
@@ -45475,39 +45477,39 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
45475
45477
  /* @__PURE__ */ (0, O.jsx)(pj, {})
45476
45478
  ]
45477
45479
  }) }), gj = () => {
45478
- let { store: e, columns: t, chat: n, enableAddRow: r, readonly: i, navigateToCell: a, importFormats: o, openUploaderWithFile: s } = $m(), { rowCount: c, filteredCount: l, isLoading: u } = ed(e), { t: d } = j(), f = !u && l === 0, p = r && !i && c === 0, m = o !== !1 && o.length > 0, h = (0, y.useCallback)(async () => {
45479
- a(await sh(e, t, d("dataEditor.dataSources.manuallyAdded")), t[0].id);
45480
+ let { store: e, columns: t, chat: n, enableAddRow: r, readonly: i, isViewer: a, navigateToCell: o, importFormats: s, openUploaderWithFile: c } = $m(), { rowCount: l, filteredCount: u, isLoading: d } = ed(e), { t: f } = j(), p = !d && u === 0, m = r && !i && l === 0, h = s !== !1 && s.length > 0, g = (0, y.useCallback)(async () => {
45481
+ o(await sh(e, t, f("dataEditor.dataSources.manuallyAdded")), t[0].id);
45480
45482
  }, [
45481
45483
  e,
45482
45484
  t,
45483
- a,
45484
- d
45485
- ]), g = (0, y.useMemo)(() => {
45486
- if (p) return {
45487
- content: d("dataEditor.dataSources.addRow"),
45485
+ o,
45486
+ f
45487
+ ]), _ = (0, y.useMemo)(() => {
45488
+ if (m) return {
45489
+ content: f("dataEditor.dataSources.addRow"),
45488
45490
  startIcon: /* @__PURE__ */ (0, O.jsx)(Ae, { size: "1rem" }),
45489
45491
  variant: "filled",
45490
- onClick: h
45492
+ onClick: g
45491
45493
  };
45492
45494
  }, [
45493
- p,
45494
- h,
45495
- d
45496
- ]), _ = (0, y.useMemo)(() => th(o === !1 ? [] : o), [o]), v = (0, y.useCallback)((e) => {
45495
+ m,
45496
+ g,
45497
+ f
45498
+ ]), v = (0, y.useMemo)(() => th(s === !1 ? [] : s), [s]), b = (0, y.useCallback)((e) => {
45497
45499
  let t = e[0];
45498
- t && s(t);
45499
- }, [s]), { getRootProps: b, isDragActive: x } = Xu({
45500
- accept: _,
45500
+ t && c(t);
45501
+ }, [c]), { getRootProps: x, isDragActive: S } = Xu({
45502
+ accept: v,
45501
45503
  maxFiles: 1,
45502
45504
  noClick: !0,
45503
45505
  noKeyboard: !0,
45504
- disabled: i || !m,
45505
- onDrop: v
45506
+ disabled: i || !h,
45507
+ onDrop: b
45506
45508
  });
45507
45509
  return /* @__PURE__ */ (0, O.jsx)(ah, { children: /* @__PURE__ */ (0, O.jsxs)("div", {
45508
- ...b({ className: "updog__data-editor-inner" }),
45510
+ ...x({ className: "updog__data-editor-inner" }),
45509
45511
  children: [
45510
- /* @__PURE__ */ (0, O.jsx)(nh, { children: /* @__PURE__ */ (0, O.jsx)("div", {
45512
+ !a && /* @__PURE__ */ (0, O.jsx)(nh, { children: /* @__PURE__ */ (0, O.jsx)("div", {
45511
45513
  className: "updog__data-editor-aside",
45512
45514
  children: /* @__PURE__ */ (0, O.jsxs)("div", {
45513
45515
  className: "updog__data-editor-aside__content updog__scrollbar",
@@ -45521,18 +45523,18 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
45521
45523
  /* @__PURE__ */ (0, O.jsxs)(rh, { children: [
45522
45524
  /* @__PURE__ */ (0, O.jsxs)("div", {
45523
45525
  className: "updog__data-editor-grid-area",
45524
- children: [/* @__PURE__ */ (0, O.jsx)(TA, {}), f && /* @__PURE__ */ (0, O.jsx)(ac, {
45526
+ children: [/* @__PURE__ */ (0, O.jsx)(TA, {}), p && /* @__PURE__ */ (0, O.jsx)(ac, {
45525
45527
  className: "updog-grid__empty-state",
45526
- title: d("dataEditor.grid.emptyTitle"),
45527
- text: d("dataEditor.grid.emptyText"),
45528
- buttonProps: g
45528
+ title: f("dataEditor.grid.emptyTitle"),
45529
+ text: f("dataEditor.grid.emptyText"),
45530
+ buttonProps: _
45529
45531
  })]
45530
45532
  }),
45531
45533
  /* @__PURE__ */ (0, O.jsx)(oh, {}),
45532
- /* @__PURE__ */ (0, O.jsx)(Yh, {})
45534
+ !a && /* @__PURE__ */ (0, O.jsx)(Yh, {})
45533
45535
  ] }),
45534
- x && /* @__PURE__ */ (0, O.jsx)(ih, {}),
45535
- n && /* @__PURE__ */ (0, O.jsx)(hj, {})
45536
+ S && /* @__PURE__ */ (0, O.jsx)(ih, {}),
45537
+ n && !a && /* @__PURE__ */ (0, O.jsx)(hj, {})
45536
45538
  ]
45537
45539
  }) });
45538
45540
  }, _j = "RENDER_ERROR", vj = (e) => {
@@ -45610,77 +45612,7 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
45610
45612
  ]
45611
45613
  })]
45612
45614
  });
45613
- }, Sj = 60, Cj = (e) => e.toLowerCase().replace(/[\s_\-.]+/g, "").trim(), wj = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[\s_\-.]+/g, " ").toLowerCase().split(" ").filter(Boolean), Tj = (e, t) => {
45614
- let n = new Set(wj(e)), r = new Set(wj(t));
45615
- if (n.size === 0 || r.size === 0) return 0;
45616
- let i = 0;
45617
- for (let e of n) r.has(e) && i++;
45618
- return i / Math.max(n.size, r.size);
45619
- }, Ej = (e, t) => {
45620
- if (e.length === 0) return t.length;
45621
- if (t.length === 0) return e.length;
45622
- e.length > t.length && ([e, t] = [t, e]);
45623
- let n = e.length, r = t.length, i = Array(n + 1);
45624
- for (let e = 0; e <= n; e++) i[e] = e;
45625
- for (let a = 1; a <= r; a++) {
45626
- let r = i[0];
45627
- i[0] = a;
45628
- for (let o = 1; o <= n; o++) {
45629
- let n = e[o - 1] === t[a - 1] ? 0 : 1, s = i[o];
45630
- i[o] = Math.min(i[o] + 1, i[o - 1] + 1, r + n), r = s;
45631
- }
45632
- }
45633
- return i[n];
45634
- }, Dj = (e) => e <= 4 ? 1 : e <= 8 ? 2 : e <= 15 ? 3 : 4, Oj = (e, t) => {
45635
- let n = Math.max(e.length, t.length);
45636
- if (n === 0) return !0;
45637
- let r = Dj(n);
45638
- return Ej(e, t) <= r;
45639
- }, kj = (e, t) => {
45640
- let n = Cj(e), r = Cj(t);
45641
- return (n.length <= r.length ? n : r).length < 4 ? !1 : n.includes(r) || r.includes(n);
45642
- }, Aj = (e, t, n) => {
45643
- let r = Cj(e), i = Cj(t);
45644
- for (let [e, t] of Object.entries(n)) {
45645
- let n = [e, ...t], a = n.includes(r), o = n.includes(i);
45646
- if (a && o) return !0;
45647
- }
45648
- return !1;
45649
- }, jj = (e, t, n) => {
45650
- let r = Cj(e), i = Cj(t);
45651
- if (r === i) return 100;
45652
- if (n && Aj(e, t, n)) return 90;
45653
- if (kj(e, t)) return 80;
45654
- let a = Tj(e, t);
45655
- return a >= .5 ? 70 : Oj(r, i) ? 65 : a > 0 ? Math.round(a * 60) : 0;
45656
- }, Mj = (e, t, n, r) => {
45657
- let i = jj(e, t, r), a = jj(e, n, r);
45658
- return Math.max(i, a);
45659
- }, Nj = (e, t, n = Sj) => {
45660
- let r, i = 0;
45661
- for (let n of t) {
45662
- let t = jj(e, n);
45663
- t > i && (i = t, r = n);
45664
- }
45665
- return i >= n ? r : void 0;
45666
- }, Pj = (e) => {
45667
- let t = {};
45668
- for (let [n, { importedValues: r, options: i }] of Object.entries(e)) {
45669
- let e = {};
45670
- for (let t of r) e[t] = Nj(t, i);
45671
- t[n] = e;
45672
- }
45673
- return t;
45674
- }, Fj = async (e, t) => {
45675
- if (!t) return Pj(e);
45676
- let n = await t(e), r = {};
45677
- for (let [t, { importedValues: i, options: a }] of Object.entries(e)) {
45678
- let e = n[t], o = {};
45679
- for (let t of i) e && t in e ? o[t] = e[t] ?? void 0 : o[t] = Nj(t, a);
45680
- r[t] = o;
45681
- }
45682
- return r;
45683
- }, Ij = "action:create", Lj = {
45615
+ }, Sj = {
45684
45616
  prefix: ["salutation", "honorific"],
45685
45617
  firstname: [
45686
45618
  "fname",
@@ -45876,7 +45808,9 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
45876
45808
  "supervisor",
45877
45809
  "linemanager",
45878
45810
  "reportingmanager",
45879
- "managername"
45811
+ "managername",
45812
+ "mgr",
45813
+ "mngr"
45880
45814
  ],
45881
45815
  managerid: [
45882
45816
  "supervisorid",
@@ -46207,8 +46141,76 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
46207
46141
  "languagespoken",
46208
46142
  "nativelanguage",
46209
46143
  "languageproficiency"
46210
- ]
46211
- }, Rj = (e, t) => {
46144
+ ],
46145
+ male: [
46146
+ "m",
46147
+ "man",
46148
+ "boy"
46149
+ ],
46150
+ female: [
46151
+ "f",
46152
+ "woman",
46153
+ "girl"
46154
+ ],
46155
+ other: [
46156
+ "nonbinary",
46157
+ "nb",
46158
+ "diverse",
46159
+ "prefernottosay"
46160
+ ],
46161
+ junior: [
46162
+ "jr",
46163
+ "jun",
46164
+ "entry",
46165
+ "entrylevel",
46166
+ "grad",
46167
+ "graduate"
46168
+ ],
46169
+ midlevel: [
46170
+ "mid",
46171
+ "intermediate",
46172
+ "middle"
46173
+ ],
46174
+ senior: ["sr", "sen"],
46175
+ associate: ["assoc", "asc"],
46176
+ principal: ["princ", "principle"],
46177
+ lead: [
46178
+ "teamlead",
46179
+ "techlead",
46180
+ "tl"
46181
+ ],
46182
+ director: ["dir"],
46183
+ executive: ["exec"],
46184
+ intern: ["internship", "trainee"],
46185
+ fulltime: ["ft", "full"],
46186
+ parttime: ["pt", "part"],
46187
+ contract: [
46188
+ "contractor",
46189
+ "contractual",
46190
+ "freelance",
46191
+ "freelancer"
46192
+ ],
46193
+ temporary: ["temp"],
46194
+ permanent: ["perm"],
46195
+ active: ["enabled", "current"],
46196
+ inactive: [
46197
+ "disabled",
46198
+ "terminated",
46199
+ "former"
46200
+ ],
46201
+ onleave: ["leave"],
46202
+ pending: ["awaiting"],
46203
+ single: ["unmarried"],
46204
+ married: ["wed"],
46205
+ divorced: ["div"],
46206
+ widowed: ["widow", "widower"],
46207
+ low: ["lo"],
46208
+ medium: ["med"],
46209
+ high: ["hi"],
46210
+ critical: ["crit", "urgent"],
46211
+ yes: ["y", "true"],
46212
+ no: ["n", "false"]
46213
+ }, Cj = (e, t) => {
46212
46214
  if (!t) return e;
46213
46215
  let n = { ...e };
46214
46216
  for (let [e, r] of Object.entries(t)) if (e in n) {
@@ -46217,7 +46219,77 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
46217
46219
  n[e] = [...t];
46218
46220
  } else n[e] = r;
46219
46221
  return n;
46220
- }, zj = (e, t, n) => Mj(e, t.id, t.title, n), Bj = (e, t, n, r, i = 60) => {
46222
+ }, wj = 60, Tj = (e) => e.toLowerCase().replace(/[\s_\-.]+/g, "").trim(), Ej = (e) => e.replace(/([a-z])([A-Z])/g, "$1 $2").replace(/[\s_\-.]+/g, " ").toLowerCase().split(" ").filter(Boolean), Dj = (e, t) => {
46223
+ let n = new Set(Ej(e)), r = new Set(Ej(t));
46224
+ if (n.size === 0 || r.size === 0) return 0;
46225
+ let i = 0;
46226
+ for (let e of n) r.has(e) && i++;
46227
+ return i / Math.max(n.size, r.size);
46228
+ }, Oj = (e, t) => {
46229
+ if (e.length === 0) return t.length;
46230
+ if (t.length === 0) return e.length;
46231
+ e.length > t.length && ([e, t] = [t, e]);
46232
+ let n = e.length, r = t.length, i = Array(n + 1);
46233
+ for (let e = 0; e <= n; e++) i[e] = e;
46234
+ for (let a = 1; a <= r; a++) {
46235
+ let r = i[0];
46236
+ i[0] = a;
46237
+ for (let o = 1; o <= n; o++) {
46238
+ let n = e[o - 1] === t[a - 1] ? 0 : 1, s = i[o];
46239
+ i[o] = Math.min(i[o] + 1, i[o - 1] + 1, r + n), r = s;
46240
+ }
46241
+ }
46242
+ return i[n];
46243
+ }, kj = (e) => e <= 4 ? 1 : e <= 8 ? 2 : e <= 15 ? 3 : 4, Aj = (e, t) => {
46244
+ let n = Math.max(e.length, t.length);
46245
+ if (n === 0) return !0;
46246
+ let r = kj(n);
46247
+ return Oj(e, t) <= r;
46248
+ }, jj = (e, t) => {
46249
+ let n = Tj(e), r = Tj(t);
46250
+ return (n.length <= r.length ? n : r).length < 4 ? !1 : n.includes(r) || r.includes(n);
46251
+ }, Mj = (e, t, n) => {
46252
+ let r = Tj(e), i = Tj(t);
46253
+ for (let [e, t] of Object.entries(n)) {
46254
+ let n = [e, ...t], a = n.includes(r), o = n.includes(i);
46255
+ if (a && o) return !0;
46256
+ }
46257
+ return !1;
46258
+ }, Nj = (e, t, n) => {
46259
+ let r = Tj(e), i = Tj(t);
46260
+ if (r === i) return 100;
46261
+ if (n && Mj(e, t, n)) return 90;
46262
+ if (jj(e, t)) return 80;
46263
+ let a = Dj(e, t);
46264
+ return a >= .5 ? 70 : Aj(r, i) ? 65 : a > 0 ? Math.round(a * 60) : 0;
46265
+ }, Pj = (e, t, n, r) => {
46266
+ let i = Nj(e, t, r), a = Nj(e, n, r);
46267
+ return Math.max(i, a);
46268
+ }, Fj = (e, t, n = Sj, r = wj) => {
46269
+ let i, a = 0;
46270
+ for (let r of t) {
46271
+ let t = Nj(e, r, n);
46272
+ t > a && (a = t, i = r);
46273
+ }
46274
+ return a >= r ? i : void 0;
46275
+ }, Ij = (e, t) => {
46276
+ let n = Cj(Sj, t), r = {};
46277
+ for (let [t, { importedValues: i, options: a }] of Object.entries(e)) {
46278
+ let e = {};
46279
+ for (let t of i) e[t] = Fj(t, a, n);
46280
+ r[t] = e;
46281
+ }
46282
+ return r;
46283
+ }, Lj = async (e, t, n) => {
46284
+ if (!t) return Ij(e, n);
46285
+ let r = Cj(Sj, n), i = await t(e), a = {};
46286
+ for (let [t, { importedValues: n, options: o }] of Object.entries(e)) {
46287
+ let e = i[t], s = {};
46288
+ for (let t of n) e && t in e ? s[t] = e[t] ?? void 0 : s[t] = Fj(t, o, r);
46289
+ a[t] = s;
46290
+ }
46291
+ return a;
46292
+ }, Rj = "action:create", zj = (e, t, n) => Pj(e, t.id, t.title, n), Bj = (e, t, n, r, i = 60) => {
46221
46293
  let a = null, o = 0;
46222
46294
  for (let i of t) {
46223
46295
  if (n.has(i.id)) continue;
@@ -46237,13 +46309,13 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
46237
46309
  ...s
46238
46310
  };
46239
46311
  }, Hj = (e, t, n) => {
46240
- let r = Rj(Lj, n), i = {}, a = /* @__PURE__ */ new Set();
46312
+ let r = Cj(Sj, n), i = {}, a = /* @__PURE__ */ new Set();
46241
46313
  for (let n of e) {
46242
- let e = Cj(n);
46314
+ let e = Tj(n);
46243
46315
  for (let r of t) {
46244
46316
  let t = r.id;
46245
46317
  if (a.has(t)) continue;
46246
- let o = Cj(t), s = Cj(r.title);
46318
+ let o = Tj(t), s = Tj(r.title);
46247
46319
  if (e === o || e === s) {
46248
46320
  i[n] = t, a.add(t);
46249
46321
  break;
@@ -46368,7 +46440,7 @@ var sj = ({ text: e, onSelect: t }) => /* @__PURE__ */ (0, O.jsx)(at, {
46368
46440
  id: `${r}_d`,
46369
46441
  type: "divider"
46370
46442
  }, {
46371
- id: Ij,
46443
+ id: Rj,
46372
46444
  text: a,
46373
46445
  icon: /* @__PURE__ */ (0, O.jsx)(Ae, { size: "1rem" })
46374
46446
  }), [r, c];
@@ -47458,14 +47530,15 @@ function PM() {
47458
47530
  return;
47459
47531
  }
47460
47532
  let t = ++Ne.current;
47461
- Fj(e, c).then((e) => {
47533
+ Lj(e, c, l).then((e) => {
47462
47534
  Ne.current === t && Me(e);
47463
47535
  });
47464
47536
  }, [
47465
47537
  _,
47466
47538
  b,
47467
47539
  n,
47468
- c
47540
+ c,
47541
+ l
47469
47542
  ]);
47470
47543
  let Pe = (0, y.useMemo)(() => {
47471
47544
  let e = {};
@@ -48136,7 +48209,7 @@ function _N(e) {
48136
48209
  g,
48137
48210
  v,
48138
48211
  e.readonly
48139
- ]), x = (0, y.useCallback)(() => v?.(), [v]), S = n(f ? "dataEditor.modal.importTitle" : "dataEditor.modal.editTitle");
48212
+ ]), x = (0, y.useCallback)(() => v?.(), [v]), S = f ? n("dataEditor.modal.importTitle") : e.variant === "viewer" ? n("dataEditor.modal.viewTitle") : n("dataEditor.modal.editTitle");
48140
48213
  (0, y.useEffect)(() => {
48141
48214
  t === "modal" && !o && p(e.variant === "uploader");
48142
48215
  }, [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@updog/data-editor-wc",
3
- "version": "0.1.44",
3
+ "version": "0.1.46",
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",