@progress/kendo-react-spreadsheet 7.0.0-develop.9 → 7.0.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/index.mjs CHANGED
@@ -2,16 +2,17 @@
2
2
  * Copyright © 2023 Progress Software Corporation. All rights reserved.
3
3
  * Licensed under commercial license. See LICENSE.md in the package root for more information
4
4
  *-------------------------------------------------------------------------------------------*/
5
+ "use client";
5
6
  import * as e from "react";
6
7
  import * as F from "prop-types";
7
8
  import { Button as K, DropDownButton as q, ToolbarSeparator as B, Toolbar as Jt, ButtonGroup as $t } from "@progress/kendo-react-buttons";
8
9
  import { TabStrip as jt, TabStripTab as Gt } from "@progress/kendo-react-layout";
9
10
  import { Dialog as qt, DialogActionsBar as Xt } from "@progress/kendo-react-dialogs";
10
11
  import { Popup as Zt } from "@progress/kendo-react-popup";
11
- import { IconWrap as P, classNames as J, guid as Yt, validatePackage as Qt, shouldShowValidationUI as en, WatermarkOverlay as tn } from "@progress/kendo-react-common";
12
+ import { IconWrap as P, classNames as J, useId as Yt, validatePackage as Qt, shouldShowValidationUI as en, WatermarkOverlay as tn } from "@progress/kendo-react-common";
12
13
  import { formulaFxIcon as me, xIcon as pe, plusIcon as nn, downloadIcon as on, folderOpenIcon as an, boldIcon as ln, italicIcon as sn, underlineIcon as rn, fontGrowIcon as cn, fontShrinkIcon as dn, foregroundColorIcon as un, dropletIcon as mn, alignLeftIcon as X, caretAltDownIcon as fe, alignCenterIcon as pn, alignRightIcon as fn, alignJustifyIcon as gn, alignTopIcon as hn, alignMiddleIcon as Cn, alignBottomIcon as ge, textWrapIcon as vn, bordersNoneIcon as yn, customFormatIcon as bn, tableColumnInsertLeftIcon as kn, tableColumnInsertRightIcon as xn, tableRowInsertBelowIcon as En, tableRowInsertAboveIcon as Sn, tableColumnDeleteIcon as In, tableRowDeleteIcon as wn, arrowRotateCcwIcon as Nn, arrowRotateCwIcon as Rn, decimalIncreaseIcon as le, decimalDecreaseIcon as se, clearCssIcon as An } from "@progress/kendo-svg-icons";
13
14
  import { ComboBox as he, DropDownList as Dn } from "@progress/kendo-react-dropdowns";
14
- import { useLocalization as N, useInternationalization as Tn } from "@progress/kendo-react-intl";
15
+ import { useLocalization as R, useInternationalization as Tn } from "@progress/kendo-react-intl";
15
16
  import { Sortable as Ln } from "@progress/kendo-react-sortable";
16
17
  import { SpreadsheetWidget as Fn } from "@progress/kendo-spreadsheet-common";
17
18
  import { CalcError as Fo, CellRef as Ko, Context as Mo, Matrix as zo, NULLREF as Bo, NameRef as Po, Range as Ho, RangeRef as Oo, Ref as Uo, Sheet as Vo, SpreadsheetWidget as Wo, UnionRef as _o, View as Jo, Workbook as $o, dateToSerial as jo, defineAlias as Go, defineFunction as qo, packDate as Xo, packTime as Zo, serialToDate as Yo, unpackDate as Qo, unpackTime as ea } from "@progress/kendo-spreadsheet-common";
@@ -40,22 +41,22 @@ const Z = e.forwardRef((t, n) => {
40
41
  Z.displayName = "List";
41
42
  Z.propTypes = {};
42
43
  const _ = e.forwardRef((t, n) => {
43
- const [a, s] = e.useState(!1), [o, l] = e.useState(0), [u, d] = e.useState([]), r = e.useMemo(() => ({}), []);
44
- r.showPopup = a, r.popupContentKey = o, r.data = u;
45
- const v = e.useRef(null), y = e.useRef(null), C = e.useRef(null), g = e.useCallback(() => {
44
+ const [a, s] = e.useState(!1), [o, l] = e.useState(0), [d, u] = e.useState([]), r = e.useMemo(() => ({}), []);
45
+ r.showPopup = a, r.popupContentKey = o, r.data = d;
46
+ const v = e.useRef(null), y = e.useRef(null), C = e.useRef(null), w = e.useCallback(() => {
46
47
  if (C.current && C.current.element)
47
48
  return C.current.element.querySelector(".k-focus");
48
- }, []), S = e.useCallback(() => {
49
- const f = g();
49
+ }, []), b = e.useCallback(() => {
50
+ const f = w();
50
51
  f && f.classList.remove("k-focus");
51
52
  }, []), p = e.useCallback((f) => {
52
- const R = Array.from(C.current && C.current.element.children || []), D = g();
53
+ const I = Array.from(C.current && C.current.element.children || []), D = w();
53
54
  let m;
54
55
  if (D) {
55
- const x = R.indexOf(D);
56
- D.classList.remove("k-focus"), m = R[x + f] ? R[x + f] : f === 1 ? R[0] : R[R.length - 1];
56
+ const x = I.indexOf(D);
57
+ D.classList.remove("k-focus"), m = I[x + f] ? I[x + f] : f === 1 ? I[0] : I[I.length - 1];
57
58
  } else
58
- m = f === 1 ? R[0] : R[R.length - 1];
59
+ m = f === 1 ? I[0] : I[I.length - 1];
59
60
  m && m.classList.add("k-focus");
60
61
  }, []);
61
62
  e.useImperativeHandle(v, () => ({
@@ -79,12 +80,12 @@ const _ = e.forwardRef((t, n) => {
79
80
  },
80
81
  data: (f) => {
81
82
  if (f)
82
- d(f);
83
+ u(f);
83
84
  else
84
85
  return r.data;
85
86
  },
86
87
  value: () => ({}),
87
- focus: () => Array.from(C.current && C.current.element && C.current.element.children || []).indexOf(g()),
88
+ focus: () => Array.from(C.current && C.current.element && C.current.element.children || []).indexOf(w()),
88
89
  // select: (x) => {
89
90
  // console.log('select', x);
90
91
  // },
@@ -96,18 +97,18 @@ const _ = e.forwardRef((t, n) => {
96
97
  },
97
98
  focusFirst: () => {
98
99
  const f = C.current && C.current.element;
99
- f && f.children.item(0) && (S(), f.children.item(0).classList.add("k-focus"));
100
+ f && f.children.item(0) && (b(), f.children.item(0).classList.add("k-focus"));
100
101
  },
101
102
  focusLast: () => {
102
103
  const f = C.current && C.current.element;
103
- f && f.children.length && (S(), f.children.item(f.children.length - 1).classList.add("k-focus"));
104
+ f && f.children.length && (b(), f.children.item(f.children.length - 1).classList.add("k-focus"));
104
105
  },
105
106
  itemClick: (f) => {
106
107
  r.itemClick = f;
107
108
  }
108
109
  }
109
110
  }), []), e.useImperativeHandle(n, () => v.current, []);
110
- const b = e.useCallback((f) => {
111
+ const h = e.useCallback((f) => {
111
112
  r.itemClick && r.itemClick(f);
112
113
  }, []);
113
114
  return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
@@ -128,7 +129,7 @@ const _ = e.forwardRef((t, n) => {
128
129
  contentKey: o,
129
130
  popupClass: "k-list-container"
130
131
  },
131
- /* @__PURE__ */ e.createElement(Z, { data: u, ref: C, onItemClick: b })
132
+ /* @__PURE__ */ e.createElement(Z, { data: d, ref: C, onItemClick: h })
132
133
  ));
133
134
  });
134
135
  _.displayName = "FormulaInput";
@@ -236,7 +237,7 @@ const ye = "spreadsheet.bold", be = "spreadsheet.italic", ke = "spreadsheet.unde
236
237
  duplicateSheetName: ft,
237
238
  formatTab: rt
238
239
  }, Y = e.forwardRef((t, n) => {
239
- const a = e.useRef(null), s = e.useRef(null), [o, l] = e.useState([]), [u, d] = e.useState(!1), [r, v] = e.useState(""), y = e.useMemo(() => ({}), []);
240
+ const a = e.useRef(null), s = e.useRef(null), [o, l] = e.useState([]), [d, u] = e.useState(!1), [r, v] = e.useState(""), y = e.useMemo(() => ({}), []);
240
241
  y.data = o, e.useImperativeHandle(a, () => ({
241
242
  value: (m) => {
242
243
  if (m === void 0) {
@@ -249,7 +250,7 @@ const ye = "spreadsheet.bold", be = "spreadsheet.italic", ke = "spreadsheet.unde
249
250
  const C = e.useCallback((m) => {
250
251
  const x = t.nameEditor();
251
252
  x && x.trigger("delete", { name: m });
252
- }, []), g = e.useCallback((m, x) => {
253
+ }, []), w = e.useCallback((m, x) => {
253
254
  const T = /* @__PURE__ */ e.createElement(e.Fragment, null, m.props.children, /* @__PURE__ */ e.createElement(
254
255
  "span",
255
256
  {
@@ -269,13 +270,13 @@ const ye = "spreadsheet.bold", be = "spreadsheet.italic", ke = "spreadsheet.unde
269
270
  )
270
271
  ));
271
272
  return e.cloneElement(m, m.props, T);
272
- }, []), S = e.useCallback((m) => e.cloneElement(m, { ...m.props }, /* @__PURE__ */ e.createElement("div", null)), []), p = e.useCallback((m) => {
273
+ }, []), b = e.useCallback((m) => e.cloneElement(m, { ...m.props }, /* @__PURE__ */ e.createElement("div", null)), []), p = e.useCallback((m) => {
273
274
  if (m.syntheticEvent && m.syntheticEvent.type === "change")
274
275
  return;
275
276
  const x = t.nameEditor();
276
- x && (l(x.readData()), d(!0));
277
- }, []), b = e.useCallback(() => {
278
- d(!1);
277
+ x && (l(x.readData()), u(!0));
278
+ }, []), h = e.useCallback(() => {
279
+ u(!1);
279
280
  }, []), f = e.useCallback((m) => {
280
281
  if (m.syntheticEvent.target.closest("[data-role]"))
281
282
  return;
@@ -284,7 +285,7 @@ const ye = "spreadsheet.bold", be = "spreadsheet.italic", ke = "spreadsheet.unde
284
285
  const T = m.value.name;
285
286
  T !== r && (x.trigger("select", { name: T }), v(T));
286
287
  }
287
- }, [r]), R = e.useCallback((m) => {
288
+ }, [r]), I = e.useCallback((m) => {
288
289
  const x = t.nameEditor();
289
290
  if (x)
290
291
  if (m.key === "Enter") {
@@ -299,27 +300,27 @@ const ye = "spreadsheet.bold", be = "spreadsheet.italic", ke = "spreadsheet.unde
299
300
  "div",
300
301
  {
301
302
  className: "k-spreadsheet-name-editor",
302
- onKeyDown: R
303
+ onKeyDown: I
303
304
  },
304
305
  /* @__PURE__ */ e.createElement(
305
306
  he,
306
307
  {
307
308
  ref: s,
308
- title: N().toLanguageString(c.nameBox, E[c.nameBox]),
309
+ title: R().toLanguageString(c.nameBox, E[c.nameBox]),
309
310
  popupSettings: { className: "k-spreadsheet-names-popup" },
310
311
  fillMode: "flat",
311
312
  clearButton: !1,
312
313
  dataItemKey: "name",
313
314
  textField: "name",
314
- itemRender: g,
315
+ itemRender: w,
315
316
  data: o,
316
317
  value: r ? o.find((m) => m.name === r) || { name: r } : null,
317
318
  onChange: f,
318
- opened: u,
319
+ opened: d,
319
320
  onOpen: p,
320
- onClose: b,
321
+ onClose: h,
321
322
  onFocus: D,
322
- listNoDataRender: S,
323
+ listNoDataRender: b,
323
324
  allowCustom: !0
324
325
  }
325
326
  )
@@ -341,7 +342,7 @@ const zn = {
341
342
  onEdit: () => {
342
343
  }
343
344
  }, gt = e.createContext(zn), Bn = (t) => {
344
- const n = t.dataItem, { onSelect: a, onDelete: s, onEnterEdit: o, onExitEdit: l, onCancelEdit: u, onEdit: d } = e.useContext(gt), r = e.useCallback((p) => {
345
+ const n = t.dataItem, { onSelect: a, onDelete: s, onEnterEdit: o, onExitEdit: l, onCancelEdit: d, onEdit: u } = e.useContext(gt), r = e.useCallback((p) => {
345
346
  p.target instanceof HTMLElement && p.target.nodeName === "INPUT" || a.call(void 0, n, p);
346
347
  }, [n, a]), v = e.useCallback((p) => {
347
348
  s.call(void 0, n, p);
@@ -349,11 +350,11 @@ const zn = {
349
350
  p.target instanceof HTMLElement && p.target.nodeName === "INPUT" || o.call(void 0, n, p);
350
351
  }, [n, o]), C = e.useCallback((p) => {
351
352
  l.call(void 0, n, p);
352
- }, [n, l]), g = e.useCallback((p) => {
353
- p.key === "Enter" ? l.call(void 0, n, p) : p.key === "Escape" && u.call(void 0, n, p);
354
- }, [n, l, u]), S = e.useCallback((p) => {
355
- d.call(void 0, { ...n, text: p.target.value }, p);
356
- }, [n, d]);
353
+ }, [n, l]), w = e.useCallback((p) => {
354
+ p.key === "Enter" ? l.call(void 0, n, p) : p.key === "Escape" && d.call(void 0, n, p);
355
+ }, [n, l, d]), b = e.useCallback((p) => {
356
+ u.call(void 0, { ...n, text: p.target.value }, p);
357
+ }, [n, u]);
357
358
  return /* @__PURE__ */ e.createElement(
358
359
  "li",
359
360
  {
@@ -377,11 +378,11 @@ const zn = {
377
378
  type: "text",
378
379
  className: "k-textbox k-spreadsheet-sheets-editor",
379
380
  value: n.text,
380
- onChange: S,
381
+ onChange: b,
381
382
  maxLength: 50,
382
383
  autoFocus: !0,
383
384
  onBlur: C,
384
- onKeyDown: g
385
+ onKeyDown: w
385
386
  }
386
387
  ) : /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement("span", { className: "k-link" }, n.text), n.first && n.last ? null : /* @__PURE__ */ e.createElement("span", { className: "k-link k-spreadsheet-sheets-remove", onClick: v }, /* @__PURE__ */ e.createElement(P, { name: "x", icon: pe })))
387
388
  );
@@ -400,102 +401,102 @@ const zn = {
400
401
  });
401
402
  ht.displayName = "TabsList";
402
403
  const Pn = (t) => {
403
- const { sheets: n, setSheets: a, onSheetSelect: s, onSheetDelete: o, onSheetEdit: l, onSheetReorderEnd: u } = t, [d, r] = e.useState(null), v = e.useRef(!1), y = e.useRef(-1), C = e.useCallback((k) => {
404
- a(k.map((w, L, A) => ({ ...w, first: L === 0, last: L === A.length - 1 })));
405
- }, []), g = e.useCallback((k) => {
404
+ const { sheets: n, setSheets: a, onSheetSelect: s, onSheetDelete: o, onSheetEdit: l, onSheetReorderEnd: d } = t, [u, r] = e.useState(null), v = e.useRef(!1), y = e.useRef(-1), C = e.useCallback((k) => {
405
+ a(k.map((N, L, A) => ({ ...N, first: L === 0, last: L === A.length - 1 })));
406
+ }, []), w = e.useCallback((k) => {
406
407
  C(k.newState);
407
- }, [C, u]), S = e.useCallback((k) => {
408
- u.call(void 0, k);
409
- }, [u]), p = e.useCallback((k) => {
408
+ }, [C, d]), b = e.useCallback((k) => {
409
+ d.call(void 0, k);
410
+ }, [d]), p = e.useCallback((k) => {
410
411
  v.current = !0, y.current = k.prevIndex;
411
- }, []), b = e.useCallback((k) => {
412
+ }, []), h = e.useCallback((k) => {
412
413
  setTimeout(() => {
413
414
  v.current = !1;
414
- }, 50), u.call(void 0, { ...k, prevIndex: y.current });
415
- }, []), f = e.useCallback((k, w) => {
416
- v.current || s.call(void 0, k, w);
417
- }, [s]), R = e.useCallback((k, w) => {
418
- w.stopPropagation(), o.call(void 0, k);
419
- }, [n, o]), D = e.useCallback((k, w) => {
420
- w.stopPropagation(), w.preventDefault();
415
+ }, 50), d.call(void 0, { ...k, prevIndex: y.current });
416
+ }, []), f = e.useCallback((k, N) => {
417
+ v.current || s.call(void 0, k, N);
418
+ }, [s]), I = e.useCallback((k, N) => {
419
+ N.stopPropagation(), o.call(void 0, k);
420
+ }, [n, o]), D = e.useCallback((k, N) => {
421
+ N.stopPropagation(), N.preventDefault();
421
422
  const L = n.map((A) => ({ ...A, active: A.id === k.id, inEdit: A.id === k.id }));
422
423
  a(L), r({ ...k });
423
- }, [n]), m = e.useCallback((k, w) => {
424
- w.stopPropagation(), w.preventDefault();
425
- const L = n.map((A) => ({ ...A, inEdit: !1, text: A.inEdit && d ? d.text : A.text }));
424
+ }, [n]), m = e.useCallback((k, N) => {
425
+ N.stopPropagation(), N.preventDefault();
426
+ const L = n.map((A) => ({ ...A, inEdit: !1, text: A.inEdit && u ? u.text : A.text }));
426
427
  a(L), r(null);
427
- }, [n, d]), x = e.useCallback((k, w) => {
428
- w.stopPropagation(), w.preventDefault();
428
+ }, [n, u]), x = e.useCallback((k, N) => {
429
+ N.stopPropagation(), N.preventDefault();
429
430
  const L = n.map((H) => ({ ...H, inEdit: !1 })), A = n.findIndex((H) => H.id === k.id);
430
431
  a(L), r(null), l.call(void 0, k, A);
431
- }, [n, l]), T = e.useCallback((k, w) => {
432
- w.stopPropagation(), w.preventDefault();
432
+ }, [n, l]), T = e.useCallback((k, N) => {
433
+ N.stopPropagation(), N.preventDefault();
433
434
  const L = n.map((A) => ({ ...A, text: k.id === A.id ? k.text : A.text }));
434
435
  a(L);
435
436
  }, [n]);
436
- return /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-sheets-items k-tabstrip k-floatwrap k-tabstrip-bottom" }, /* @__PURE__ */ e.createElement("div", { className: "k-tabstrip-items-wrapper k-hstack" }, /* @__PURE__ */ e.createElement(gt.Provider, { value: { onSelect: f, onDelete: R, onEnterEdit: D, onCancelEdit: m, onExitEdit: x, onEdit: T } }, /* @__PURE__ */ e.createElement(
437
+ return /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-sheets-items k-tabstrip k-floatwrap k-tabstrip-bottom" }, /* @__PURE__ */ e.createElement("div", { className: "k-tabstrip-items-wrapper k-hstack" }, /* @__PURE__ */ e.createElement(gt.Provider, { value: { onSelect: f, onDelete: I, onEnterEdit: D, onCancelEdit: m, onExitEdit: x, onEdit: T } }, /* @__PURE__ */ e.createElement(
437
438
  Ln,
438
439
  {
439
440
  idField: "id",
440
441
  data: n,
441
442
  itemUI: Bn,
442
443
  itemsWrapUI: ht,
443
- onDragOver: g,
444
- onNavigate: S,
444
+ onDragOver: w,
445
+ onNavigate: b,
445
446
  onDragStart: p,
446
- onDragEnd: b
447
+ onDragEnd: h
447
448
  }
448
449
  ))));
449
- }, Hn = (t, n) => t.map((a, s, o) => ({
450
- text: a.name(),
451
- id: Yt(),
452
- first: s === 0,
453
- last: s === o.length - 1,
454
- active: a.name() === n
450
+ }, Hn = (t, n, a) => t.map((s, o, l) => ({
451
+ text: s.name(),
452
+ id: a + "-sheet-" + o,
453
+ first: o === 0,
454
+ last: o === l.length - 1,
455
+ active: s.name() === n
455
456
  })), On = (t) => {
456
- const { spreadsheetRef: n } = t, [a, s] = e.useState([]), o = e.useRef((a.find((g) => g.active) || {}).text), l = e.useCallback(() => {
457
- n.current && (n.current.view.sheetsbar.onSheetSelect(o.current), s(Hn(n.current.sheets(), o.current)));
457
+ const { spreadsheetRef: n } = t, [a, s] = e.useState([]), o = e.useRef((a.find((b) => b.active) || {}).text), l = Yt(), d = e.useCallback(() => {
458
+ n.current && (n.current.view.sheetsbar.onSheetSelect(o.current), s(Hn(n.current.sheets(), o.current, l)));
458
459
  }, []), u = e.useCallback(() => {
459
460
  if (n.current) {
460
- const g = n.current.sheets();
461
- g.find((S) => S.name() === o.current) || (o.current = g[g.length - 1].name()), l();
461
+ const b = n.current.sheets();
462
+ b.find((p) => p.name() === o.current) || (o.current = b[b.length - 1].name()), d();
462
463
  }
463
464
  }, []);
464
- e.useEffect(() => (n.current && (n.current.sheets().length && (o.current = n.current.sheets()[0].name(), l()), n.current.view.bind("update", u)), () => {
465
+ e.useEffect(() => (n.current && (n.current.sheets().length && (o.current = n.current.sheets()[0].name(), d()), n.current.view.bind("update", u)), () => {
465
466
  n.current && n.current.view.unbind("update", u);
466
467
  }), [n.current]);
467
- const d = e.useCallback((g) => {
468
- o.current !== g.text && (o.current = g.text, l());
469
- }, []), r = e.useCallback(() => {
468
+ const r = e.useCallback((b) => {
469
+ o.current !== b.text && (o.current = b.text, d());
470
+ }, []), v = e.useCallback(() => {
470
471
  if (n.current) {
471
472
  n.current.view.sheetsbar.onAddSelect();
472
- const g = n.current.sheets();
473
- o.current = g[g.length - 1].name(), l();
473
+ const b = n.current.sheets();
474
+ o.current = b[b.length - 1].name(), d();
474
475
  }
475
- }, []), v = e.useCallback((g) => {
476
+ }, []), y = e.useCallback((b) => {
476
477
  if (n.current) {
477
- if (o.current === g.text) {
478
- const S = n.current.sheets(), p = S.findIndex((f) => f.name() === g.text), b = S[p + 1] || S[p - 1];
479
- o.current = b ? b.name() : "";
478
+ if (o.current === b.text) {
479
+ const p = n.current.sheets(), h = p.findIndex((I) => I.name() === b.text), f = p[h + 1] || p[h - 1];
480
+ o.current = f ? f.name() : "";
480
481
  }
481
- n.current.view.sheetsbar.onSheetRemove(g.text), l();
482
+ n.current.view.sheetsbar.onSheetRemove(b.text), d();
482
483
  }
483
- }, []), y = e.useCallback((g, S) => {
484
+ }, []), C = e.useCallback((b, p) => {
484
485
  if (n.current) {
485
- let p = g.text;
486
- const b = n.current.sheets(), f = b[S];
487
- if (!p) {
488
- o.current = f.name(), l();
486
+ let h = b.text;
487
+ const f = n.current.sheets(), I = f[p];
488
+ if (!h) {
489
+ o.current = I.name(), d();
489
490
  return;
490
491
  }
491
- if (f && f.name() === p)
492
+ if (I && I.name() === h)
492
493
  return;
493
- b.find((R) => R.name() === p) && (p = f.name()), n.current.view.sheetsbar.onSheetRename(p, S), o.current = p, l();
494
+ f.find((D) => D.name() === h) && (h = I.name()), n.current.view.sheetsbar.onSheetRename(h, p), o.current = h, d();
494
495
  }
495
- }, []), C = e.useCallback((g) => {
496
+ }, []), w = e.useCallback((b) => {
496
497
  if (n.current) {
497
- const { prevIndex: S, nextIndex: p } = g;
498
- o.current = n.current.sheets()[S].name(), n.current.view.sheetsbar.onSheetReorderEnd({ oldIndex: S, newIndex: p }), l();
498
+ const { prevIndex: p, nextIndex: h } = b;
499
+ o.current = n.current.sheets()[p].name(), n.current.view.sheetsbar.onSheetReorderEnd({ oldIndex: p, newIndex: h }), d();
499
500
  }
500
501
  }, []);
501
502
  return /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-sheets-bar k-header" }, /* @__PURE__ */ e.createElement(
@@ -504,19 +505,19 @@ const Pn = (t) => {
504
505
  fillMode: "flat",
505
506
  icon: "plus",
506
507
  className: "k-spreadsheet-sheets-bar-add",
507
- title: N().toLanguageString(c.addNewSheet, E[c.addNewSheet]),
508
+ title: R().toLanguageString(c.addNewSheet, E[c.addNewSheet]),
508
509
  svgIcon: nn,
509
- onClick: r
510
+ onClick: v
510
511
  }
511
512
  ), /* @__PURE__ */ e.createElement(
512
513
  Pn,
513
514
  {
514
515
  sheets: a,
515
516
  setSheets: s,
516
- onSheetSelect: d,
517
- onSheetDelete: v,
518
- onSheetEdit: y,
519
- onSheetReorderEnd: C
517
+ onSheetSelect: r,
518
+ onSheetDelete: y,
519
+ onSheetEdit: C,
520
+ onSheetReorderEnd: w
520
521
  }
521
522
  ));
522
523
  }, Ct = (t) => {
@@ -544,21 +545,21 @@ const vt = (t) => {
544
545
  const { spreadsheetRef: n } = t, a = e.useCallback((o) => {
545
546
  const l = o.target;
546
547
  if (l instanceof Element && l.parentNode) {
547
- const u = l.closest(".k-toolbar"), d = u && u.querySelector(".k-upload input");
548
- d && d.click();
548
+ const d = l.closest(".k-toolbar"), u = d && d.querySelector(".k-upload input");
549
+ u && u.click();
549
550
  }
550
551
  }, []), s = e.useCallback((o) => {
551
552
  const l = o.newState;
552
553
  if (l[0] && l[0].getRawFile) {
553
- const u = l[0].getRawFile();
554
- n.current && n.current.executeCommand({ command: "OpenCommand", options: { file: u } });
554
+ const d = l[0].getRawFile();
555
+ n.current && n.current.executeCommand({ command: "OpenCommand", options: { file: d } });
555
556
  }
556
557
  }, []);
557
558
  return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
558
559
  K,
559
560
  {
560
561
  className: "k-toolbar-button",
561
- title: N().toLanguageString(c.open, E[c.open]),
562
+ title: R().toLanguageString(c.open, E[c.open]),
562
563
  icon: "folder-open",
563
564
  svgIcon: an,
564
565
  fillMode: "flat",
@@ -590,13 +591,13 @@ const Un = ["Arial", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS"
590
591
  { text: "Date time", value: "m/d/yyyy h:mm" },
591
592
  { text: "Duration", value: "[h]:mm:ss" }
592
593
  ], Q = (t) => (a) => {
593
- const { property: s, icon: o, svgIcon: l, titleKey: u } = t, { spreadsheetRef: d, value: r } = a, v = e.useCallback(() => {
594
- if (d.current) {
594
+ const { property: s, icon: o, svgIcon: l, titleKey: d } = t, { spreadsheetRef: u, value: r } = a, v = e.useCallback(() => {
595
+ if (u.current) {
595
596
  const C = {
596
597
  command: "PropertyChangeCommand",
597
598
  options: { property: s, value: !r }
598
599
  };
599
- d.current.executeCommand(C);
600
+ u.current.executeCommand(C);
600
601
  }
601
602
  }, [r]);
602
603
  return /* @__PURE__ */ e.createElement(
@@ -609,18 +610,18 @@ const Un = ["Arial", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS"
609
610
  togglable: !0,
610
611
  onClick: v,
611
612
  selected: r,
612
- title: N().toLanguageString(u, E[u])
613
+ title: R().toLanguageString(d, E[d])
613
614
  }
614
615
  );
615
616
  }, yt = (t) => (a) => {
616
- const { property: s, titleKey: o, ...l } = t, { spreadsheetRef: u, value: d } = a, r = e.useCallback(
617
+ const { property: s, titleKey: o, ...l } = t, { spreadsheetRef: d, value: u } = a, r = e.useCallback(
617
618
  (v) => {
618
- if (u.current) {
619
+ if (d.current) {
619
620
  const y = {
620
621
  command: "PropertyChangeCommand",
621
622
  options: { property: s, value: v.value || null }
622
623
  };
623
- u.current.executeCommand(y);
624
+ d.current.executeCommand(y);
624
625
  }
625
626
  },
626
627
  [s]
@@ -632,8 +633,8 @@ const Un = ["Arial", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS"
632
633
  onActiveColorClick: r,
633
634
  fillMode: "flat",
634
635
  ...l,
635
- title: N().toLanguageString(o, E[o]),
636
- value: d
636
+ title: R().toLanguageString(o, E[o]),
637
+ value: u
637
638
  }
638
639
  );
639
640
  }, bt = (t) => (a) => {
@@ -647,7 +648,7 @@ const Un = ["Arial", "Courier New", "Georgia", "Times New Roman", "Trebuchet MS"
647
648
  icon: t.icon,
648
649
  svgIcon: t.svgIcon,
649
650
  fillMode: "flat",
650
- title: N().toLanguageString(t.titleKey, E[t.titleKey]),
651
+ title: R().toLanguageString(t.titleKey, E[t.titleKey]),
651
652
  onClick: o
652
653
  }
653
654
  );
@@ -675,7 +676,7 @@ const St = (t) => {
675
676
  data: Un,
676
677
  defaultValue: Vn,
677
678
  fillMode: "flat",
678
- title: N().toLanguageString(c.fontName, E[c.fontName]),
679
+ title: R().toLanguageString(c.fontName, E[c.fontName]),
679
680
  leftRightKeysNavigation: !1
680
681
  }
681
682
  );
@@ -683,16 +684,16 @@ const St = (t) => {
683
684
  St.displayName = "FontFamily";
684
685
  const $ = 1, j = 409, G = (t) => typeof t == "string" ? parseFloat(t) : t, It = (t) => {
685
686
  const { spreadsheetRef: n } = t, a = G(t.value), s = e.useCallback((o) => {
686
- var d;
687
+ var u;
687
688
  let l = o.value ? G(o.value) : a;
688
689
  l = isNaN(l) ? a : l, l = Math.min(j, Math.max($, l));
689
- const u = {
690
+ const d = {
690
691
  command: "PropertyChangeCommand",
691
692
  options: { property: "fontSize", value: l }
692
693
  };
693
- o.nativeEvent.type === "keydown" || o.nativeEvent.type === "focusout" ? (d = n.current) == null || d.executeCommand(u) : setTimeout(() => {
694
+ o.nativeEvent.type === "keydown" || o.nativeEvent.type === "focusout" ? (u = n.current) == null || u.executeCommand(d) : setTimeout(() => {
694
695
  var r;
695
- (r = n.current) == null || r.executeCommand(u);
696
+ (r = n.current) == null || r.executeCommand(d);
696
697
  }, 0);
697
698
  }, [a]);
698
699
  return /* @__PURE__ */ e.createElement(
@@ -704,7 +705,7 @@ const $ = 1, j = 409, G = (t) => typeof t == "string" ? parseFloat(t) : t, It =
704
705
  defaultValue: _n,
705
706
  allowCustom: !0,
706
707
  fillMode: "flat",
707
- title: N().toLanguageString(c.fontSize, E[c.fontSize]),
708
+ title: R().toLanguageString(c.fontSize, E[c.fontSize]),
708
709
  tabIndex: -1,
709
710
  clearButton: !1
710
711
  }
@@ -713,13 +714,13 @@ const $ = 1, j = 409, G = (t) => typeof t == "string" ? parseFloat(t) : t, It =
713
714
  It.displayName = "FontSize";
714
715
  const wt = (t) => {
715
716
  const n = (a) => {
716
- const { property: s, icon: o, svgIcon: l, titleKey: u, step: d } = t, { spreadsheetRef: r } = a, v = G(a.value), y = e.useCallback(() => {
717
- var g;
717
+ const { property: s, icon: o, svgIcon: l, titleKey: d, step: u } = t, { spreadsheetRef: r } = a, v = G(a.value), y = e.useCallback(() => {
718
+ var w;
718
719
  const C = {
719
720
  command: "PropertyChangeCommand",
720
- options: { property: s, value: Math.min(j, Math.max($, v + d)) }
721
+ options: { property: s, value: Math.min(j, Math.max($, v + u)) }
721
722
  };
722
- (g = r.current) == null || g.executeCommand(C);
723
+ (w = r.current) == null || w.executeCommand(C);
723
724
  }, [v]);
724
725
  return /* @__PURE__ */ e.createElement(
725
726
  K,
@@ -729,8 +730,8 @@ const wt = (t) => {
729
730
  svgIcon: l,
730
731
  fillMode: "flat",
731
732
  onClick: y,
732
- disabled: v + d < $ || v + d > j,
733
- title: N().toLanguageString(u, E[u])
733
+ disabled: v + u < $ || v + u > j,
734
+ title: R().toLanguageString(d, E[d])
734
735
  }
735
736
  );
736
737
  };
@@ -781,7 +782,7 @@ const O = [
781
782
  O[2],
782
783
  { ...O[3], textKey: c.justify }
783
784
  ], Yn = O.filter((t) => t.commandName === "verticalAlign"), Qn = (t) => {
784
- const { value: n, spreadsheetRef: a } = t, { textAlign: s, verticalAlign: o } = n || {}, l = N(), u = e.useCallback((r) => {
785
+ const { value: n, spreadsheetRef: a } = t, { textAlign: s, verticalAlign: o } = n || {}, l = R(), d = e.useCallback((r) => {
785
786
  if (a.current) {
786
787
  const v = r.item, y = {
787
788
  command: "PropertyChangeCommand",
@@ -790,15 +791,15 @@ const O = [
790
791
  a.current.executeCommand(y);
791
792
  }
792
793
  }, []);
793
- let d = O.slice();
794
- return d = d.map((r) => ({ ...r, text: l.toLanguageString(r.textKey, E[r.textKey]) })), s && (d = d.map((r) => r.commandName === "textAlign" ? { ...r, selected: r.value === s } : r)), o && (d = d.map((r) => r.commandName === "verticalAlign" ? { ...r, selected: r.value === o } : r)), /* @__PURE__ */ e.createElement(
794
+ let u = O.slice();
795
+ return u = u.map((r) => ({ ...r, text: l.toLanguageString(r.textKey, E[r.textKey]) })), s && (u = u.map((r) => r.commandName === "textAlign" ? { ...r, selected: r.value === s } : r)), o && (u = u.map((r) => r.commandName === "verticalAlign" ? { ...r, selected: r.value === o } : r)), /* @__PURE__ */ e.createElement(
795
796
  q,
796
797
  {
797
798
  icon: "align-left",
798
799
  svgIcon: X,
799
- items: d,
800
+ items: u,
800
801
  fillMode: "flat",
801
- onItemClick: u,
802
+ onItemClick: d,
802
803
  title: l.toLanguageString(c.align, E[c.align]),
803
804
  text: /* @__PURE__ */ e.createElement(P, { name: "caret-alt-down", icon: fe })
804
805
  }
@@ -817,25 +818,25 @@ const eo = {
817
818
  titleKey: c.alignVertically
818
819
  }, At = (t) => {
819
820
  const n = (a) => {
820
- const { value: s, spreadsheetRef: o } = a, l = N(), u = e.useCallback((y) => {
821
+ const { value: s, spreadsheetRef: o } = a, l = R(), d = e.useCallback((y) => {
821
822
  if (o.current) {
822
- const C = y.item, g = {
823
+ const C = y.item, w = {
823
824
  command: "PropertyChangeCommand",
824
825
  options: { property: C.commandName, value: C.value || null }
825
826
  };
826
- o.current.executeCommand(g);
827
+ o.current.executeCommand(w);
827
828
  }
828
829
  }, []);
829
- let d = t.items.slice();
830
- d = d.map((y) => ({ ...y, text: l.toLanguageString(y.textKey, E[y.textKey]) })), d = d.map((y) => ({ ...y, selected: y.value === s }));
831
- const r = { ...t.icon }, v = d.find((y) => y.selected);
830
+ let u = t.items.slice();
831
+ u = u.map((y) => ({ ...y, text: l.toLanguageString(y.textKey, E[y.textKey]) })), u = u.map((y) => ({ ...y, selected: y.value === s }));
832
+ const r = { ...t.icon }, v = u.find((y) => y.selected);
832
833
  return v && (r.icon = v.icon, r.svgIcon = v.svgIcon), /* @__PURE__ */ e.createElement(
833
834
  q,
834
835
  {
835
836
  ...r,
836
- items: d,
837
+ items: u,
837
838
  fillMode: "flat",
838
- onItemClick: u,
839
+ onItemClick: d,
839
840
  title: l.toLanguageString(t.titleKey, E[t.titleKey]),
840
841
  text: /* @__PURE__ */ e.createElement(P, { name: "caret-alt-down", icon: fe })
841
842
  }
@@ -847,11 +848,11 @@ const eo = {
847
848
  if (a.current) {
848
849
  const o = a.current.activeSheet();
849
850
  if (o) {
850
- const d = {
851
+ const u = {
851
852
  command: "TextWrapCommand",
852
853
  options: { property: "wrap", value: !o.range(o.activeCell()).wrap() }
853
854
  };
854
- a.current.executeCommand(d);
855
+ a.current.executeCommand(u);
855
856
  }
856
857
  }
857
858
  }, []);
@@ -863,7 +864,7 @@ const eo = {
863
864
  icon: "text-wrap",
864
865
  svgIcon: vn,
865
866
  fillMode: "flat",
866
- title: N().toLanguageString(c.textWrap, E[c.textWrap]),
867
+ title: R().toLanguageString(c.textWrap, E[c.textWrap]),
867
868
  onClick: s,
868
869
  selected: n
869
870
  }
@@ -875,11 +876,11 @@ const Tt = (t) => {
875
876
  if (a.current) {
876
877
  const o = a.current.activeSheet();
877
878
  if (o) {
878
- const u = {
879
+ const d = {
879
880
  command: "GridLinesChangeCommand",
880
881
  options: { property: "gridLines", value: !o.showGridLines() }
881
882
  };
882
- a.current.executeCommand(u);
883
+ a.current.executeCommand(d);
883
884
  }
884
885
  }
885
886
  }, []);
@@ -891,7 +892,7 @@ const Tt = (t) => {
891
892
  icon: "borders-none",
892
893
  svgIcon: yn,
893
894
  fillMode: "flat",
894
- title: N().toLanguageString(c.gridLines, E[c.gridLines]),
895
+ title: R().toLanguageString(c.gridLines, E[c.gridLines]),
895
896
  onClick: s,
896
897
  selected: n
897
898
  }
@@ -919,7 +920,7 @@ const Lt = (t) => {
919
920
  fillMode: "flat",
920
921
  onItemClick: a,
921
922
  items: Jn,
922
- title: N().toLanguageString(c.format, E[c.format]),
923
+ title: R().toLanguageString(c.format, E[c.format]),
923
924
  text: /* @__PURE__ */ e.createElement(P, { name: "caret-alt-down" })
924
925
  }
925
926
  );
@@ -928,11 +929,11 @@ Lt.displayName = "Format";
928
929
  const U = (t) => (a) => {
929
930
  const { spreadsheetRef: s, value: o } = a, l = e.useCallback(() => {
930
931
  if (s.current) {
931
- const u = {
932
+ const d = {
932
933
  command: t.command,
933
934
  options: { value: t.value }
934
935
  };
935
- s.current.executeCommand(u);
936
+ s.current.executeCommand(d);
936
937
  }
937
938
  }, []);
938
939
  return /* @__PURE__ */ e.createElement(
@@ -942,7 +943,7 @@ const U = (t) => (a) => {
942
943
  icon: t.icon,
943
944
  svgIcon: t.svgIcon,
944
945
  fillMode: "flat",
945
- title: N().toLanguageString(t.titleKey, E[t.titleKey]),
946
+ title: R().toLanguageString(t.titleKey, E[t.titleKey]),
946
947
  onClick: l,
947
948
  disabled: o && t.disabled(o)
948
949
  }
@@ -1005,13 +1006,13 @@ Ht.displayName = "Undo";
1005
1006
  const mo = { action: "redo", icon: "reload", svgIcon: Rn, titleKey: c.redo }, Ot = bt(mo);
1006
1007
  Ot.displayName = "Redo";
1007
1008
  const Ut = (t) => (a) => {
1008
- const { icon: s, svgIcon: o, titleKey: l, value: u } = t, { spreadsheetRef: d } = a, r = e.useCallback(() => {
1009
- if (d.current) {
1009
+ const { icon: s, svgIcon: o, titleKey: l, value: d } = t, { spreadsheetRef: u } = a, r = e.useCallback(() => {
1010
+ if (u.current) {
1010
1011
  const v = {
1011
1012
  command: "AdjustDecimalsCommand",
1012
- options: { value: u }
1013
+ options: { value: d }
1013
1014
  };
1014
- d.current.executeCommand(v);
1015
+ u.current.executeCommand(v);
1015
1016
  }
1016
1017
  }, []);
1017
1018
  return /* @__PURE__ */ e.createElement(
@@ -1022,7 +1023,7 @@ const Ut = (t) => (a) => {
1022
1023
  svgIcon: o,
1023
1024
  fillMode: "flat",
1024
1025
  onClick: r,
1025
- title: N().toLanguageString(l, E[l])
1026
+ title: R().toLanguageString(l, E[l])
1026
1027
  }
1027
1028
  );
1028
1029
  }, po = Ut({
@@ -1085,7 +1086,7 @@ const Ut = (t) => (a) => {
1085
1086
  name: "@progress/kendo-react-spreadsheet",
1086
1087
  productName: "KendoReact",
1087
1088
  productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
1088
- publishDate: 1701355177,
1089
+ publishDate: 1702305174,
1089
1090
  version: "",
1090
1091
  licensingDocsUrl: "https://www.telerik.com/kendo-react-ui/my-license/?utm_medium=product&utm_source=kendoreact&utm_campaign=kendo-ui-react-purchase-license-keys-warning"
1091
1092
  }, ie = ["bold", "italic", "underline", "fontFamily", "fontSize", "color", "background", "textAlign", "verticalAlign", "wrap", "gridLines"], de = {
@@ -1119,15 +1120,15 @@ const Ut = (t) => (a) => {
1119
1120
  Qt(ce);
1120
1121
  const a = en(ce), { toolbar: s = re } = t, o = [];
1121
1122
  typeof s == "boolean" ? o.push(...s ? re : []) : o.push(...s);
1122
- const [l, u] = e.useState(null), [d, r] = e.useState(o.findIndex((i) => i.selected) || 0), [v, y] = e.useState(!1), C = e.useRef(null), g = e.useRef(null), S = e.useRef(null), p = e.useRef(null), b = e.useRef(null), [f, R] = e.useState({}), D = e.useRef({});
1123
+ const [l, d] = e.useState(null), [u, r] = e.useState(o.findIndex((i) => i.selected) || 0), [v, y] = e.useState(!1), C = e.useRef(null), w = e.useRef(null), b = e.useRef(null), p = e.useRef(null), h = e.useRef(null), [f, I] = e.useState({}), D = e.useRef({});
1123
1124
  D.current = f;
1124
1125
  const m = e.useRef({});
1125
1126
  m.current = t;
1126
- const x = N(), T = e.useCallback((i) => {
1127
+ const x = R(), T = e.useCallback((i) => {
1127
1128
  m.current.onSelect && m.current.onSelect.call(void 0, i);
1128
1129
  }, []), k = e.useCallback((i) => {
1129
1130
  m.current.onChange && m.current.onChange.call(void 0, i);
1130
- }, []), w = e.useCallback((i) => {
1131
+ }, []), N = e.useCallback((i) => {
1131
1132
  m.current.onChangeFormat && m.current.onChangeFormat.call(void 0, i);
1132
1133
  }, []), L = e.useCallback((i) => {
1133
1134
  m.current.onExcelImport && m.current.onExcelImport.call(void 0, i);
@@ -1137,68 +1138,68 @@ const Ut = (t) => (a) => {
1137
1138
  e.useImperativeHandle(H, () => ({
1138
1139
  element: C.current,
1139
1140
  get instance() {
1140
- return b.current;
1141
+ return h.current;
1141
1142
  },
1142
1143
  props: t,
1143
1144
  get view() {
1144
- return b.current.view;
1145
+ return h.current.view;
1145
1146
  },
1146
1147
  get workbook() {
1147
- return b.current.workbook;
1148
+ return h.current.workbook;
1148
1149
  },
1149
1150
  executeCommand(i) {
1150
- var h;
1151
- (h = b.current) == null || h.executeCommand(i);
1151
+ var g;
1152
+ (g = h.current) == null || g.executeCommand(i);
1152
1153
  },
1153
1154
  fromJSON(i) {
1154
- var h;
1155
- return (h = b.current) == null ? void 0 : h.fromJSON(i);
1155
+ var g;
1156
+ return (g = h.current) == null ? void 0 : g.fromJSON(i);
1156
1157
  },
1157
1158
  toJSON() {
1158
- return b.current.toJSON();
1159
+ return h.current.toJSON();
1159
1160
  },
1160
1161
  saveJSON() {
1161
- return b.current.saveJSON();
1162
+ return h.current.saveJSON();
1162
1163
  },
1163
1164
  fromFile(i) {
1164
- return b.current.fromFile(i);
1165
+ return h.current.fromFile(i);
1165
1166
  },
1166
1167
  saveAsExcel(i) {
1167
- var h;
1168
- (h = b.current) == null || h.saveAsExcel({
1169
- ...b.current.options.excel,
1168
+ var g;
1169
+ (g = h.current) == null || g.saveAsExcel({
1170
+ ...h.current.options.excel,
1170
1171
  saveAs: Ce,
1171
1172
  Workbook: ve,
1172
1173
  ...i
1173
1174
  });
1174
1175
  },
1175
1176
  activeSheet(i) {
1176
- var h;
1177
- return (h = b.current) == null ? void 0 : h.activeSheet(i);
1177
+ var g;
1178
+ return (g = h.current) == null ? void 0 : g.activeSheet(i);
1178
1179
  },
1179
1180
  sheets() {
1180
- return b.current.sheets();
1181
+ return h.current.sheets();
1181
1182
  },
1182
1183
  refresh() {
1183
1184
  var i;
1184
- return (i = b.current) == null ? void 0 : i.refresh();
1185
+ return (i = h.current) == null ? void 0 : i.refresh();
1185
1186
  }
1186
1187
  }), [t]), e.useImperativeHandle(n, () => H.current);
1187
- const Wt = e.useCallback(() => b.current && b.current.view.nameEditor, []), ee = e.useCallback((i) => {
1188
- const h = {};
1189
- ie.forEach((I) => {
1190
- typeof i.range[I] == "function" ? h[I] = i.range[I]() : I === "gridLines" && (h[I] = i.range.sheet().showGridLines());
1191
- }), h.selectedHeaders = i.range.sheet().selectedHeaders(), (ie.some((I) => h[I] !== D.current[I]) || h.selectedHeaders.allCols !== D.current.selectedHeaders.allCols || h.selectedHeaders.allRows !== D.current.selectedHeaders.allRows) && R(h);
1188
+ const Wt = e.useCallback(() => h.current && h.current.view.nameEditor, []), ee = e.useCallback((i) => {
1189
+ const g = {};
1190
+ ie.forEach((S) => {
1191
+ typeof i.range[S] == "function" ? g[S] = i.range[S]() : S === "gridLines" && (g[S] = i.range.sheet().showGridLines());
1192
+ }), g.selectedHeaders = i.range.sheet().selectedHeaders(), (ie.some((S) => g[S] !== D.current[S]) || g.selectedHeaders.allCols !== D.current.selectedHeaders.allCols || g.selectedHeaders.allRows !== D.current.selectedHeaders.allRows) && I(g);
1192
1193
  }, []), _t = e.useCallback((i) => {
1193
- const h = i.name, I = c[h];
1194
- u({
1194
+ const g = i.name, S = c[g];
1195
+ d({
1195
1196
  title: i.title === "Error" ? x.toLanguageString(c.error, E[c.error] || i.title) : i.title,
1196
- message: I ? x.toLanguageString(I, E[I] || i.text) : i.text,
1197
+ message: S ? x.toLanguageString(S, E[S] || i.text) : i.text,
1197
1198
  close: i.close
1198
1199
  });
1199
1200
  }, []), te = e.useCallback(() => {
1200
- u(null), l == null || l.close();
1201
- }, [l]), V = Tn(), ne = N();
1201
+ d(null), l == null || l.close();
1202
+ }, [l]), V = Tn(), ne = R();
1202
1203
  e.useEffect(() => {
1203
1204
  var W;
1204
1205
  const i = {
@@ -1216,40 +1217,40 @@ const Ut = (t) => (a) => {
1216
1217
  toString: (M, z) => V.toString(M, z),
1217
1218
  format: (M, ...z) => V.format(M, ...z)
1218
1219
  },
1219
- formulaBarInputRef: g,
1220
- formulaCellInputRef: S,
1220
+ formulaBarInputRef: w,
1221
+ formulaCellInputRef: b,
1221
1222
  nameBoxRef: p
1222
- }, h = new Fn(C.current, i);
1223
- b.current = h, h.bind("select", T), h.bind("change", k), h.bind("changeFormat", w), h.bind("excelImport", L), h.bind("excelExport", A), h.view.bind("update", ee), h.view.bind("message", _t);
1224
- const I = h.activeSheet();
1225
- return I && ee({ range: I.range(I.activeCell()) }), y(!0), () => {
1226
- h.destroy();
1223
+ }, g = new Fn(C.current, i);
1224
+ h.current = g, g.bind("select", T), g.bind("change", k), g.bind("changeFormat", N), g.bind("excelImport", L), g.bind("excelExport", A), g.view.bind("update", ee), g.view.bind("message", _t);
1225
+ const S = g.activeSheet();
1226
+ return S && ee({ range: S.range(S.activeCell()) }), y(!0), () => {
1227
+ g.destroy();
1227
1228
  };
1228
1229
  }, []);
1229
- const oe = e.useCallback((i, h) => {
1230
- const I = /* @__PURE__ */ e.createElement(
1230
+ const oe = e.useCallback((i, g) => {
1231
+ const S = /* @__PURE__ */ e.createElement(
1231
1232
  i,
1232
1233
  {
1233
- spreadsheetRef: b,
1234
+ spreadsheetRef: h,
1234
1235
  value: de[i.displayName] ? de[i.displayName](f) : void 0,
1235
- key: h
1236
+ key: g
1236
1237
  }
1237
1238
  );
1238
- return I.type === B ? /* @__PURE__ */ e.createElement(i, { key: h }) : I;
1239
+ return S.type === B ? /* @__PURE__ */ e.createElement(i, { key: g }) : S;
1239
1240
  }, [f]);
1240
1241
  let ae = null;
1241
1242
  return o.length && (ae = /* @__PURE__ */ e.createElement(
1242
1243
  jt,
1243
1244
  {
1244
- selected: d,
1245
+ selected: u,
1245
1246
  animation: !1,
1246
1247
  className: "k-floatwrap k-spreadsheet-tabstrip",
1247
1248
  style: { minHeight: "auto" },
1248
1249
  onSelect: (i) => r(i.selected)
1249
1250
  },
1250
1251
  o.map((i) => {
1251
- const h = i.textKey ? ne.toLanguageString(i.textKey, E[i.textKey]) : i.text;
1252
- return /* @__PURE__ */ e.createElement(Gt, { key: i.textKey || i.text, title: h }, /* @__PURE__ */ e.createElement(Jt, { buttons: go, className: "k-spreadsheet-toolbar" }, i.tools.map((I, W) => Array.isArray(I) ? /* @__PURE__ */ e.createElement($t, { key: W }, I.map((M, z) => oe(M, z))) : oe(I, W))));
1252
+ const g = i.textKey ? ne.toLanguageString(i.textKey, E[i.textKey]) : i.text;
1253
+ return /* @__PURE__ */ e.createElement(Gt, { key: i.textKey || i.text, title: g }, /* @__PURE__ */ e.createElement(Jt, { buttons: go, className: "k-spreadsheet-toolbar" }, i.tools.map((S, W) => Array.isArray(S) ? /* @__PURE__ */ e.createElement($t, { key: W }, S.map((M, z) => oe(M, z))) : oe(S, W))));
1253
1254
  })
1254
1255
  )), /* @__PURE__ */ e.createElement(
1255
1256
  "div",
@@ -1260,9 +1261,9 @@ const Ut = (t) => (a) => {
1260
1261
  role: "application"
1261
1262
  },
1262
1263
  ae,
1263
- /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-action-bar" }, /* @__PURE__ */ e.createElement(Y, { ref: p, nameEditor: Wt }), /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-formula-bar" }, /* @__PURE__ */ e.createElement(P, { name: "formula-fx", icon: me }), /* @__PURE__ */ e.createElement(_, { ref: g }))),
1264
- /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-view" }, /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-fixed-container" }), /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-scroller" }, /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-view-size" })), /* @__PURE__ */ e.createElement("div", { tabIndex: 0, className: "k-spreadsheet-clipboard", contentEditable: "true" }), /* @__PURE__ */ e.createElement(_, { ref: S, className: "k-spreadsheet-cell-editor" })),
1265
- /* @__PURE__ */ e.createElement(On, { spreadsheetRef: b }),
1264
+ /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-action-bar" }, /* @__PURE__ */ e.createElement(Y, { ref: p, nameEditor: Wt }), /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-formula-bar" }, /* @__PURE__ */ e.createElement(P, { name: "formula-fx", icon: me }), /* @__PURE__ */ e.createElement(_, { ref: w }))),
1265
+ /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-view" }, /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-fixed-container" }), /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-scroller" }, /* @__PURE__ */ e.createElement("div", { className: "k-spreadsheet-view-size" })), /* @__PURE__ */ e.createElement("div", { tabIndex: 0, className: "k-spreadsheet-clipboard", contentEditable: "true" }), /* @__PURE__ */ e.createElement(_, { ref: b, className: "k-spreadsheet-cell-editor" })),
1266
+ /* @__PURE__ */ e.createElement(On, { spreadsheetRef: h }),
1266
1267
  l && /* @__PURE__ */ e.createElement(qt, { title: l.title, onClose: te }, /* @__PURE__ */ e.createElement("div", null, l.message), /* @__PURE__ */ e.createElement(Xt, { layout: "start" }, /* @__PURE__ */ e.createElement(
1267
1268
  K,
1268
1269
  {
@@ -1299,7 +1300,7 @@ const Do = (t) => {
1299
1300
  svgIcon: An,
1300
1301
  fillMode: "flat",
1301
1302
  onClick: a,
1302
- title: N().toLanguageString(c.cleanFormatting, E[c.cleanFormatting])
1303
+ title: R().toLanguageString(c.cleanFormatting, E[c.cleanFormatting])
1303
1304
  }
1304
1305
  );
1305
1306
  };