@progress/kendo-react-spreadsheet 9.0.0-develop.2 → 9.0.0-develop.3
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/FormulaInput.mjs +50 -44
- package/List.mjs +1 -3
- package/NameBox.js +1 -1
- package/NameBox.mjs +47 -53
- package/README.md +25 -24
- package/SheetsBar.mjs +100 -50
- package/Spreadsheet.mjs +86 -72
- package/package-metadata.mjs +1 -1
- package/package.json +11 -11
- package/tools/align.mjs +59 -8
- package/tools/defaultTools.mjs +3 -13
- package/tools/fontSize.mjs +16 -13
- package/tools/underline.mjs +6 -1
package/FormulaInput.mjs
CHANGED
|
@@ -29,52 +29,58 @@ const y = t.forwardRef((i, x) => {
|
|
|
29
29
|
o = e === 1 ? r[0] : r[r.length - 1];
|
|
30
30
|
o && o.classList.add("k-focus");
|
|
31
31
|
}, []);
|
|
32
|
-
t.useImperativeHandle(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
32
|
+
t.useImperativeHandle(
|
|
33
|
+
d,
|
|
34
|
+
() => ({
|
|
35
|
+
element: l.current,
|
|
36
|
+
props: i,
|
|
37
|
+
popup: {
|
|
38
|
+
open: () => {
|
|
39
|
+
m(!0);
|
|
40
|
+
},
|
|
41
|
+
close: () => {
|
|
42
|
+
m(!1);
|
|
43
|
+
},
|
|
44
|
+
position: () => {
|
|
45
|
+
b(s.popupContentKey + 1);
|
|
46
|
+
},
|
|
47
|
+
visible: () => s.showPopup
|
|
38
48
|
},
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
const e = n.current && n.current.element;
|
|
71
|
-
e && e.children.length && (h(), e.children.item(e.children.length - 1).classList.add("k-focus"));
|
|
72
|
-
},
|
|
73
|
-
itemClick: (e) => {
|
|
74
|
-
s.itemClick = e;
|
|
49
|
+
list: {
|
|
50
|
+
get element() {
|
|
51
|
+
return n.current && n.current.element;
|
|
52
|
+
},
|
|
53
|
+
data: (e) => {
|
|
54
|
+
if (e)
|
|
55
|
+
v(e);
|
|
56
|
+
else
|
|
57
|
+
return s.data;
|
|
58
|
+
},
|
|
59
|
+
value: () => ({}),
|
|
60
|
+
focus: () => Array.from(
|
|
61
|
+
n.current && n.current.element && n.current.element.children || []
|
|
62
|
+
).indexOf(u()),
|
|
63
|
+
focusNext: () => {
|
|
64
|
+
k(1);
|
|
65
|
+
},
|
|
66
|
+
focusPrev: () => {
|
|
67
|
+
k(-1);
|
|
68
|
+
},
|
|
69
|
+
focusFirst: () => {
|
|
70
|
+
const e = n.current && n.current.element;
|
|
71
|
+
e && e.children.item(0) && (h(), e.children.item(0).classList.add("k-focus"));
|
|
72
|
+
},
|
|
73
|
+
focusLast: () => {
|
|
74
|
+
const e = n.current && n.current.element;
|
|
75
|
+
e && e.children.length && (h(), e.children.item(e.children.length - 1).classList.add("k-focus"));
|
|
76
|
+
},
|
|
77
|
+
itemClick: (e) => {
|
|
78
|
+
s.itemClick = e;
|
|
79
|
+
}
|
|
75
80
|
}
|
|
76
|
-
}
|
|
77
|
-
|
|
81
|
+
}),
|
|
82
|
+
[]
|
|
83
|
+
), t.useImperativeHandle(x, () => d.current, []);
|
|
78
84
|
const g = t.useCallback((e) => {
|
|
79
85
|
s.itemClick && s.itemClick(e);
|
|
80
86
|
}, []);
|
package/List.mjs
CHANGED
|
@@ -22,9 +22,7 @@ const n = e.forwardRef((a, r) => {
|
|
|
22
22
|
onMouseDown: (t) => t.preventDefault(),
|
|
23
23
|
style: { maxHeight: 280 }
|
|
24
24
|
},
|
|
25
|
-
a.data.map(
|
|
26
|
-
(t) => /* @__PURE__ */ e.createElement("li", { key: t.text, className: "k-list-item", onClick: () => a.onItemClick(t.value) }, /* @__PURE__ */ e.createElement(m, { name: "formula-fx", icon: c }), /* @__PURE__ */ e.createElement("span", { className: "k-list-item-text" }, t.text))
|
|
27
|
-
)
|
|
25
|
+
a.data.map((t) => /* @__PURE__ */ e.createElement("li", { key: t.text, className: "k-list-item", onClick: () => a.onItemClick(t.value) }, /* @__PURE__ */ e.createElement(m, { name: "formula-fx", icon: c }), /* @__PURE__ */ e.createElement("span", { className: "k-list-item-text" }, t.text)))
|
|
28
26
|
)));
|
|
29
27
|
});
|
|
30
28
|
n.displayName = "List";
|
package/NameBox.js
CHANGED
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),I=require("@progress/kendo-react-dropdowns"),O=require("@progress/kendo-react-common"),w=require("@progress/kendo-svg-icons"),B=require("@progress/kendo-react-intl"),f=require("./messages.js");function q(a){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(l,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}return l.default=a,Object.freeze(l)}const t=q(N),p=t.forwardRef((a,l)=>{const r=t.useRef(null),s=t.useRef(null),[i,k]=t.useState([]),[v,g]=t.useState(!1),[c,u]=t.useState(""),m=t.useMemo(()=>({}),[]);m.data=i,t.useImperativeHandle(r,()=>({value:e=>{if(e===void 0){const n=s.current&&s.current.value;return n&&(n.name||n)}
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const N=require("react"),I=require("@progress/kendo-react-dropdowns"),O=require("@progress/kendo-react-common"),w=require("@progress/kendo-svg-icons"),B=require("@progress/kendo-react-intl"),f=require("./messages.js");function q(a){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(a){for(const r in a)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(a,r);Object.defineProperty(l,r,s.get?s:{enumerable:!0,get:()=>a[r]})}}return l.default=a,Object.freeze(l)}const t=q(N),p=t.forwardRef((a,l)=>{const r=t.useRef(null),s=t.useRef(null),[i,k]=t.useState([]),[v,g]=t.useState(!1),[c,u]=t.useState(""),m=t.useMemo(()=>({}),[]);m.data=i,t.useImperativeHandle(r,()=>({value:e=>{if(e===void 0){const n=s.current&&s.current.value;return n&&(n.name||n)}u(e||"")}}),[]),t.useImperativeHandle(l,()=>r.current,[]);const y=t.useCallback(e=>{const n=a.nameEditor();n&&n.trigger("delete",{name:e})},[]),E=t.useCallback((e,n)=>{const o=t.createElement(t.Fragment,null,e.props.children,t.createElement("span",{role:"button",className:"k-button-delete",onClick:()=>y(n.dataItem[n.textField]),onMouseDown:d=>d.preventDefault(),onPointerDown:d=>d.preventDefault(),"data-role":"delete"},t.createElement(O.IconWrap,{name:"x",icon:w.xIcon})));return t.cloneElement(e,e.props,o)},[]),C=t.useCallback(e=>t.cloneElement(e,{...e.props},t.createElement("div",null)),[]),D=t.useCallback(e=>{if(e.syntheticEvent&&e.syntheticEvent.type==="change")return;const n=a.nameEditor();n&&(k(n.readData()),g(!0))},[]),x=t.useCallback(()=>{g(!1)},[]),R=t.useCallback(e=>{if(e.syntheticEvent.target.closest("[data-role]"))return;const n=a.nameEditor();if(n&&e.value){const o=e.value.name;o!==c&&(n.trigger("select",{name:o}),u(o))}},[c]),S=t.useCallback(e=>{const n=a.nameEditor();if(n)if(e.key==="Enter"){const o=e.target.value;n.trigger("enter",{value:o}),u(o)}else e.key==="Escape"&&(n.trigger("cancel"),u(m.prevValue))},[]),h=t.useCallback(e=>{m.prevValue=e.value.name},[]),b=B.useLocalization().toLanguageString(f.keys.nameBox,f.messages[f.keys.nameBox]);return t.createElement("div",{className:"k-spreadsheet-name-editor",onKeyDown:S},t.createElement(I.ComboBox,{ref:s,title:b,popupSettings:{className:"k-spreadsheet-names-popup"},fillMode:"flat",clearButton:!1,dataItemKey:"name",textField:"name",itemRender:E,data:i,value:c?i.find(e=>e.name===c)||{name:c}:null,onChange:R,opened:v,onOpen:D,onClose:x,onFocus:h,listNoDataRender:C,allowCustom:!0,ariaLabel:b}))});p.displayName="NameBox";p.propTypes={};exports.NameBox=p;
|
package/NameBox.mjs
CHANGED
|
@@ -14,15 +14,19 @@ import { useLocalization as S } from "@progress/kendo-react-intl";
|
|
|
14
14
|
import { keys as f, messages as F } from "./messages.mjs";
|
|
15
15
|
const g = t.forwardRef((l, E) => {
|
|
16
16
|
const u = t.useRef(null), s = t.useRef(null), [c, k] = t.useState([]), [v, d] = t.useState(!1), [o, r] = t.useState(""), m = t.useMemo(() => ({}), []);
|
|
17
|
-
m.data = c, t.useImperativeHandle(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
17
|
+
m.data = c, t.useImperativeHandle(
|
|
18
|
+
u,
|
|
19
|
+
() => ({
|
|
20
|
+
value: (e) => {
|
|
21
|
+
if (e === void 0) {
|
|
22
|
+
const a = s.current && s.current.value;
|
|
23
|
+
return a && (a.name || a);
|
|
24
|
+
}
|
|
23
25
|
r(e || "");
|
|
24
|
-
|
|
25
|
-
|
|
26
|
+
}
|
|
27
|
+
}),
|
|
28
|
+
[]
|
|
29
|
+
), t.useImperativeHandle(E, () => u.current, []);
|
|
26
30
|
const b = t.useCallback((e) => {
|
|
27
31
|
const a = l.nameEditor();
|
|
28
32
|
a && a.trigger("delete", { name: e });
|
|
@@ -37,13 +41,7 @@ const g = t.forwardRef((l, E) => {
|
|
|
37
41
|
onPointerDown: (i) => i.preventDefault(),
|
|
38
42
|
"data-role": "delete"
|
|
39
43
|
},
|
|
40
|
-
/* @__PURE__ */ t.createElement(
|
|
41
|
-
I,
|
|
42
|
-
{
|
|
43
|
-
name: "x",
|
|
44
|
-
icon: w
|
|
45
|
-
}
|
|
46
|
-
)
|
|
44
|
+
/* @__PURE__ */ t.createElement(I, { name: "x", icon: w })
|
|
47
45
|
));
|
|
48
46
|
return t.cloneElement(e, e.props, n);
|
|
49
47
|
}, []), x = t.useCallback((e) => t.cloneElement(e, { ...e.props }, /* @__PURE__ */ t.createElement("div", null)), []), y = t.useCallback((e) => {
|
|
@@ -53,15 +51,18 @@ const g = t.forwardRef((l, E) => {
|
|
|
53
51
|
a && (k(a.readData()), d(!0));
|
|
54
52
|
}, []), h = t.useCallback(() => {
|
|
55
53
|
d(!1);
|
|
56
|
-
}, []), D = t.useCallback(
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
54
|
+
}, []), D = t.useCallback(
|
|
55
|
+
(e) => {
|
|
56
|
+
if (e.syntheticEvent.target.closest("[data-role]"))
|
|
57
|
+
return;
|
|
58
|
+
const a = l.nameEditor();
|
|
59
|
+
if (a && e.value) {
|
|
60
|
+
const n = e.value.name;
|
|
61
|
+
n !== o && (a.trigger("select", { name: n }), r(n));
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
[o]
|
|
65
|
+
), N = t.useCallback((e) => {
|
|
65
66
|
const a = l.nameEditor();
|
|
66
67
|
if (a)
|
|
67
68
|
if (e.key === "Enter") {
|
|
@@ -72,36 +73,29 @@ const g = t.forwardRef((l, E) => {
|
|
|
72
73
|
}, []), R = t.useCallback((e) => {
|
|
73
74
|
m.prevValue = e.value.name;
|
|
74
75
|
}, []), p = S().toLanguageString(f.nameBox, F[f.nameBox]);
|
|
75
|
-
return /* @__PURE__ */ t.createElement(
|
|
76
|
-
|
|
76
|
+
return /* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-name-editor", onKeyDown: N }, /* @__PURE__ */ t.createElement(
|
|
77
|
+
B,
|
|
77
78
|
{
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
onFocus: R,
|
|
99
|
-
listNoDataRender: x,
|
|
100
|
-
allowCustom: !0,
|
|
101
|
-
ariaLabel: p
|
|
102
|
-
}
|
|
103
|
-
)
|
|
104
|
-
);
|
|
79
|
+
ref: s,
|
|
80
|
+
title: p,
|
|
81
|
+
popupSettings: { className: "k-spreadsheet-names-popup" },
|
|
82
|
+
fillMode: "flat",
|
|
83
|
+
clearButton: !1,
|
|
84
|
+
dataItemKey: "name",
|
|
85
|
+
textField: "name",
|
|
86
|
+
itemRender: C,
|
|
87
|
+
data: c,
|
|
88
|
+
value: o ? c.find((e) => e.name === o) || { name: o } : null,
|
|
89
|
+
onChange: D,
|
|
90
|
+
opened: v,
|
|
91
|
+
onOpen: y,
|
|
92
|
+
onClose: h,
|
|
93
|
+
onFocus: R,
|
|
94
|
+
listNoDataRender: x,
|
|
95
|
+
allowCustom: !0,
|
|
96
|
+
ariaLabel: p
|
|
97
|
+
}
|
|
98
|
+
));
|
|
105
99
|
});
|
|
106
100
|
g.displayName = "NameBox";
|
|
107
101
|
g.propTypes = {};
|
package/README.md
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
# KendoReact Spreadsheet Library for React
|
|
6
6
|
|
|
7
7
|
> **Important**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
10
|
-
>
|
|
11
|
-
>
|
|
8
|
+
>
|
|
9
|
+
> - This package is а part of [KendoReact](https://www.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)—a commercial UI library.
|
|
10
|
+
> - You will need to install a license key when adding the package to your project. For more information, please refer to the [KendoReact My License page](https://www.telerik.com/kendo-react-ui/components/my-license/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet).
|
|
11
|
+
> - To receive a license key, you need to either [purchase a license](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet) or register for a [free trial](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet). Doing so indicates that you [accept the KendoReact License Agreement](https://www.telerik.com/purchase/license-agreement/progress-kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet).
|
|
12
|
+
> - The 30-day free trial gives you access to all the KendoReact components and their full functionality. Additionally, for the period of your license, you get access to our legendary technical support provided directly by the KendoReact dev team!
|
|
12
13
|
>
|
|
13
14
|
> [Start using KendoReact](https://www.telerik.com/try/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet) and speed up your development process!
|
|
14
15
|
|
|
@@ -20,36 +21,36 @@ The [React Spreadsheet library](https://www.telerik.com/kendo-react-ui/spreadshe
|
|
|
20
21
|
|
|
21
22
|
Among the features which the KendoReact Spreadsheet component delivers are:
|
|
22
23
|
|
|
23
|
-
-
|
|
24
|
-
-
|
|
25
|
-
-
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
24
|
+
- Import and export of excel files
|
|
25
|
+
- Set custom styles to cells, rows, columns or regions
|
|
26
|
+
- Resize rows and columns
|
|
27
|
+
- Toolbar and tools configuration
|
|
28
|
+
- Built-in formulas
|
|
29
|
+
- Keyboard navigation
|
|
29
30
|
|
|
30
31
|
## Support Options
|
|
31
32
|
|
|
32
33
|
For any issues you might encounter while working with the KendoReact Spreadsheet, use any of the available support channels:
|
|
33
34
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
- Industry-leading technical support—KendoReact paid license holders and users with an active (free) trial license can take advantage of our outstanding customer support. To submit a ticket, use [the dedicated KendoReact support system](https://www.telerik.com/account/support-tickets?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-listview).
|
|
36
|
+
- Product forums—The [KendoReact forums](https://www.telerik.com/forums/kendo-ui-react?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-listview) are part of the free support you can get from the community and from the KendoReact team.
|
|
37
|
+
- Feedback portal—The [KendoReact feedback portal](https://feedback.telerik.com/kendo-react-ui?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet) is where you can request and vote for new features to be added.
|
|
37
38
|
|
|
38
39
|
## Resources
|
|
39
40
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
- [Getting Started with KendoReact](https://www.telerik.com/kendo-react-ui/components/getting-started/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
42
|
+
- [Get Started with the KendoReact Spreadsheet](https://www.telerik.com/kendo-react-ui/components/spreadsheet/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
43
|
+
- [API Reference of the KendoReact Spreadsheet](https://www.telerik.com/kendo-react-ui/components/spreadsheet/api/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
44
|
+
- [KendoReact Roadmap](https://www.telerik.com/support/whats-new/kendo-react-ui/roadmap?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
45
|
+
- [Blogs](https://www.telerik.com/blogs/tag/kendoreact?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
46
|
+
- [Demos, documentation, and component reference](https://www.telerik.com/kendo-react-ui/components/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
47
|
+
- [KendoReact pricing and licensing](https://www.telerik.com/kendo-react-ui/pricing?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
48
|
+
- [Changelog](https://www.telerik.com/kendo-react-ui/components/changelogs/ui-for-react/?utm_medium=referral&utm_source=npm&utm_campaign=kendo-ui-react-trial-npm-spreadsheet)
|
|
48
49
|
|
|
49
50
|
High-level component overview pages
|
|
50
51
|
|
|
51
|
-
|
|
52
|
+
- [React Spreadsheet Component](https://www.telerik.com/kendo-react-ui/spreadsheet)
|
|
52
53
|
|
|
53
|
-
|
|
54
|
+
_Copyright © 2024 Progress Software Corporation and/or its subsidiaries or affiliates. All Rights Reserved._
|
|
54
55
|
|
|
55
|
-
|
|
56
|
+
_Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries._
|
package/SheetsBar.mjs
CHANGED
|
@@ -27,19 +27,37 @@ const W = {
|
|
|
27
27
|
onEdit: () => {
|
|
28
28
|
}
|
|
29
29
|
}, N = t.createContext(W), z = (u) => {
|
|
30
|
-
const e = u.dataItem, { onSelect: l, onDelete: d, onEnterEdit: a, onExitEdit: h, onCancelEdit: o, onEdit: p } = t.useContext(N), b = t.useCallback(
|
|
31
|
-
n
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
30
|
+
const e = u.dataItem, { onSelect: l, onDelete: d, onEnterEdit: a, onExitEdit: h, onCancelEdit: o, onEdit: p } = t.useContext(N), b = t.useCallback(
|
|
31
|
+
(n) => {
|
|
32
|
+
n.target instanceof HTMLElement && n.target.nodeName === "INPUT" || l.call(void 0, e, n);
|
|
33
|
+
},
|
|
34
|
+
[e, l]
|
|
35
|
+
), v = t.useCallback(
|
|
36
|
+
(n) => {
|
|
37
|
+
d.call(void 0, e, n);
|
|
38
|
+
},
|
|
39
|
+
[e, d]
|
|
40
|
+
), x = t.useCallback(
|
|
41
|
+
(n) => {
|
|
42
|
+
n.target instanceof HTMLElement && n.target.nodeName === "INPUT" || a.call(void 0, e, n);
|
|
43
|
+
},
|
|
44
|
+
[e, a]
|
|
45
|
+
), S = t.useCallback(
|
|
46
|
+
(n) => {
|
|
47
|
+
h.call(void 0, e, n);
|
|
48
|
+
},
|
|
49
|
+
[e, h]
|
|
50
|
+
), C = t.useCallback(
|
|
51
|
+
(n) => {
|
|
52
|
+
n.key === "Enter" ? h.call(void 0, e, n) : n.key === "Escape" && o.call(void 0, e, n);
|
|
53
|
+
},
|
|
54
|
+
[e, h, o]
|
|
55
|
+
), r = t.useCallback(
|
|
56
|
+
(n) => {
|
|
57
|
+
p.call(void 0, { ...e, text: n.target.value }, n);
|
|
58
|
+
},
|
|
59
|
+
[e, p]
|
|
60
|
+
);
|
|
43
61
|
return /* @__PURE__ */ t.createElement(
|
|
44
62
|
"li",
|
|
45
63
|
{
|
|
@@ -73,52 +91,84 @@ const W = {
|
|
|
73
91
|
);
|
|
74
92
|
}, R = t.forwardRef((u, e) => {
|
|
75
93
|
const { children: l, className: d, ...a } = u;
|
|
76
|
-
return /* @__PURE__ */ t.createElement(
|
|
77
|
-
"ul",
|
|
78
|
-
{
|
|
79
|
-
className: w("k-tabstrip-items k-reset", d),
|
|
80
|
-
role: "tablist",
|
|
81
|
-
...a,
|
|
82
|
-
ref: e
|
|
83
|
-
},
|
|
84
|
-
l
|
|
85
|
-
);
|
|
94
|
+
return /* @__PURE__ */ t.createElement("ul", { className: w("k-tabstrip-items k-reset", d), role: "tablist", ...a, ref: e }, l);
|
|
86
95
|
});
|
|
87
96
|
R.displayName = "TabsList";
|
|
88
97
|
const O = (u) => {
|
|
89
98
|
const { sheets: e, setSheets: l, onSheetSelect: d, onSheetDelete: a, onSheetEdit: h, onSheetReorderEnd: o } = u, [p, b] = t.useState(null), v = t.useRef(!1), x = t.useRef(-1), S = t.useCallback((s) => {
|
|
90
|
-
l(
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
l(
|
|
100
|
+
s.map((c, f, i) => ({
|
|
101
|
+
...c,
|
|
102
|
+
first: f === 0,
|
|
103
|
+
last: f === i.length - 1
|
|
104
|
+
}))
|
|
105
|
+
);
|
|
106
|
+
}, []), C = t.useCallback(
|
|
107
|
+
(s) => {
|
|
108
|
+
S(s.newState);
|
|
109
|
+
},
|
|
110
|
+
[S, o]
|
|
111
|
+
), r = t.useCallback(
|
|
112
|
+
(s) => {
|
|
113
|
+
o.call(void 0, s);
|
|
114
|
+
},
|
|
115
|
+
[o]
|
|
116
|
+
), n = t.useCallback((s) => {
|
|
96
117
|
v.current = !0, x.current = s.prevIndex;
|
|
97
118
|
}, []), m = t.useCallback((s) => {
|
|
98
119
|
setTimeout(() => {
|
|
99
120
|
v.current = !1;
|
|
100
121
|
}, 50), o.call(void 0, { ...s, prevIndex: x.current });
|
|
101
|
-
}, []), E = t.useCallback(
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
+
}, []), E = t.useCallback(
|
|
123
|
+
(s, c) => {
|
|
124
|
+
v.current || d.call(void 0, s, c);
|
|
125
|
+
},
|
|
126
|
+
[d]
|
|
127
|
+
), k = t.useCallback(
|
|
128
|
+
(s, c) => {
|
|
129
|
+
c.stopPropagation(), a.call(void 0, s);
|
|
130
|
+
},
|
|
131
|
+
[e, a]
|
|
132
|
+
), g = t.useCallback(
|
|
133
|
+
(s, c) => {
|
|
134
|
+
c.stopPropagation(), c.preventDefault();
|
|
135
|
+
const f = e.map((i) => ({
|
|
136
|
+
...i,
|
|
137
|
+
active: i.id === s.id,
|
|
138
|
+
inEdit: i.id === s.id
|
|
139
|
+
}));
|
|
140
|
+
l(f), b({ ...s });
|
|
141
|
+
},
|
|
142
|
+
[e]
|
|
143
|
+
), y = t.useCallback(
|
|
144
|
+
(s, c) => {
|
|
145
|
+
c.stopPropagation(), c.preventDefault();
|
|
146
|
+
const f = e.map((i) => ({
|
|
147
|
+
...i,
|
|
148
|
+
inEdit: !1,
|
|
149
|
+
text: i.inEdit && p ? p.text : i.text
|
|
150
|
+
}));
|
|
151
|
+
l(f), b(null);
|
|
152
|
+
},
|
|
153
|
+
[e, p]
|
|
154
|
+
), P = t.useCallback(
|
|
155
|
+
(s, c) => {
|
|
156
|
+
c.stopPropagation(), c.preventDefault();
|
|
157
|
+
const f = e.map((D) => ({ ...D, inEdit: !1 })), i = e.findIndex((D) => D.id === s.id);
|
|
158
|
+
l(f), b(null), h.call(void 0, s, i);
|
|
159
|
+
},
|
|
160
|
+
[e, h]
|
|
161
|
+
), T = t.useCallback(
|
|
162
|
+
(s, c) => {
|
|
163
|
+
c.stopPropagation(), c.preventDefault();
|
|
164
|
+
const f = e.map((i) => ({
|
|
165
|
+
...i,
|
|
166
|
+
text: s.id === i.id ? s.text : i.text
|
|
167
|
+
}));
|
|
168
|
+
l(f);
|
|
169
|
+
},
|
|
170
|
+
[e]
|
|
171
|
+
);
|
|
122
172
|
return /* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-sheets-items k-tabstrip k-floatwrap k-tabstrip-bottom" }, /* @__PURE__ */ t.createElement("div", { className: "k-tabstrip-items-wrapper k-hstack" }, /* @__PURE__ */ t.createElement(N.Provider, { value: { onSelect: E, onDelete: k, onEnterEdit: g, onCancelEdit: y, onExitEdit: P, onEdit: T } }, /* @__PURE__ */ t.createElement(
|
|
123
173
|
A,
|
|
124
174
|
{
|
package/Spreadsheet.mjs
CHANGED
|
@@ -23,7 +23,19 @@ import { useLocalization as z, useInternationalization as ge } from "@progress/k
|
|
|
23
23
|
import { saveAs as ke } from "@progress/kendo-file-saver";
|
|
24
24
|
import { Workbook as be } from "@progress/kendo-ooxml";
|
|
25
25
|
import { keys as m, messages as g } from "./messages.mjs";
|
|
26
|
-
const B = [
|
|
26
|
+
const B = [
|
|
27
|
+
"bold",
|
|
28
|
+
"italic",
|
|
29
|
+
"underline",
|
|
30
|
+
"fontFamily",
|
|
31
|
+
"fontSize",
|
|
32
|
+
"color",
|
|
33
|
+
"background",
|
|
34
|
+
"textAlign",
|
|
35
|
+
"verticalAlign",
|
|
36
|
+
"wrap",
|
|
37
|
+
"gridLines"
|
|
38
|
+
], O = {
|
|
27
39
|
Bold: (r) => r.bold,
|
|
28
40
|
Italic: (r) => r.italic,
|
|
29
41
|
Underline: (r) => r.underline,
|
|
@@ -69,56 +81,60 @@ const B = ["bold", "italic", "underline", "fontFamily", "fontSize", "color", "ba
|
|
|
69
81
|
}, []), Q = t.useCallback((e) => {
|
|
70
82
|
s.current.onExcelExport && s.current.onExcelExport.call(void 0, e);
|
|
71
83
|
}, []), w = t.useRef(null);
|
|
72
|
-
t.useImperativeHandle(
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
(
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
84
|
+
t.useImperativeHandle(
|
|
85
|
+
w,
|
|
86
|
+
() => ({
|
|
87
|
+
element: h.current,
|
|
88
|
+
get instance() {
|
|
89
|
+
return a.current;
|
|
90
|
+
},
|
|
91
|
+
props: r,
|
|
92
|
+
get view() {
|
|
93
|
+
return a.current.view;
|
|
94
|
+
},
|
|
95
|
+
get workbook() {
|
|
96
|
+
return a.current.workbook;
|
|
97
|
+
},
|
|
98
|
+
executeCommand(e) {
|
|
99
|
+
var o;
|
|
100
|
+
(o = a.current) == null || o.executeCommand(e);
|
|
101
|
+
},
|
|
102
|
+
fromJSON(e) {
|
|
103
|
+
var o;
|
|
104
|
+
return (o = a.current) == null ? void 0 : o.fromJSON(e);
|
|
105
|
+
},
|
|
106
|
+
toJSON() {
|
|
107
|
+
return a.current.toJSON();
|
|
108
|
+
},
|
|
109
|
+
saveJSON() {
|
|
110
|
+
return a.current.saveJSON();
|
|
111
|
+
},
|
|
112
|
+
fromFile(e) {
|
|
113
|
+
return a.current.fromFile(e);
|
|
114
|
+
},
|
|
115
|
+
saveAsExcel(e) {
|
|
116
|
+
var o;
|
|
117
|
+
(o = a.current) == null || o.saveAsExcel({
|
|
118
|
+
...a.current.options.excel,
|
|
119
|
+
saveAs: ke,
|
|
120
|
+
Workbook: be,
|
|
121
|
+
...e
|
|
122
|
+
});
|
|
123
|
+
},
|
|
124
|
+
activeSheet(e) {
|
|
125
|
+
var o;
|
|
126
|
+
return (o = a.current) == null ? void 0 : o.activeSheet(e);
|
|
127
|
+
},
|
|
128
|
+
sheets() {
|
|
129
|
+
return a.current.sheets();
|
|
130
|
+
},
|
|
131
|
+
refresh() {
|
|
132
|
+
var e;
|
|
133
|
+
return (e = a.current) == null ? void 0 : e.refresh();
|
|
134
|
+
}
|
|
135
|
+
}),
|
|
136
|
+
[r]
|
|
137
|
+
), t.useImperativeHandle(K, () => w.current);
|
|
122
138
|
const X = t.useCallback(() => a.current && a.current.view.nameEditor, []), N = t.useCallback((e) => {
|
|
123
139
|
const o = {};
|
|
124
140
|
B.forEach((n) => {
|
|
@@ -141,7 +157,10 @@ const B = ["bold", "italic", "underline", "fontFamily", "fontSize", "color", "ba
|
|
|
141
157
|
sheets: structuredClone((p = r.defaultProps) == null ? void 0 : p.sheets),
|
|
142
158
|
messages: {
|
|
143
159
|
workbook: {
|
|
144
|
-
defaultSheetName: A.toLanguageString(
|
|
160
|
+
defaultSheetName: A.toLanguageString(
|
|
161
|
+
m.defaultSheetName,
|
|
162
|
+
g[m.defaultSheetName]
|
|
163
|
+
)
|
|
145
164
|
}
|
|
146
165
|
},
|
|
147
166
|
intl: {
|
|
@@ -161,17 +180,20 @@ const B = ["bold", "italic", "underline", "fontFamily", "fontSize", "color", "ba
|
|
|
161
180
|
o.destroy();
|
|
162
181
|
};
|
|
163
182
|
}, []);
|
|
164
|
-
const I = t.useCallback(
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
183
|
+
const I = t.useCallback(
|
|
184
|
+
(e, o) => {
|
|
185
|
+
const n = /* @__PURE__ */ t.createElement(
|
|
186
|
+
e,
|
|
187
|
+
{
|
|
188
|
+
spreadsheetRef: a,
|
|
189
|
+
value: O[e.displayName] ? O[e.displayName](S) : void 0,
|
|
190
|
+
key: o
|
|
191
|
+
}
|
|
192
|
+
);
|
|
193
|
+
return n.type === Z ? /* @__PURE__ */ t.createElement(e, { key: o }) : n;
|
|
194
|
+
},
|
|
195
|
+
[S]
|
|
196
|
+
);
|
|
175
197
|
let F = null;
|
|
176
198
|
return d.length && (F = /* @__PURE__ */ t.createElement(
|
|
177
199
|
re,
|
|
@@ -198,15 +220,7 @@ const B = ["bold", "italic", "underline", "fontFamily", "fontSize", "color", "ba
|
|
|
198
220
|
/* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-action-bar" }, /* @__PURE__ */ t.createElement(le, { ref: C, nameEditor: X }), /* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-formula-bar" }, /* @__PURE__ */ t.createElement(de, { name: "formula-fx", icon: pe }), /* @__PURE__ */ t.createElement(H, { ref: x }))),
|
|
199
221
|
/* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-view" }, /* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-fixed-container" }), /* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-scroller" }, /* @__PURE__ */ t.createElement("div", { className: "k-spreadsheet-view-size" })), /* @__PURE__ */ t.createElement("div", { tabIndex: 0, className: "k-spreadsheet-clipboard", contentEditable: "true" }), /* @__PURE__ */ t.createElement(H, { ref: y, className: "k-spreadsheet-cell-editor" })),
|
|
200
222
|
/* @__PURE__ */ t.createElement(se, { spreadsheetRef: a }),
|
|
201
|
-
c && /* @__PURE__ */ t.createElement(ne, { title: c.title, onClose: R }, /* @__PURE__ */ t.createElement("div", null, c.message), /* @__PURE__ */ t.createElement(ae, { layout: "start" }, /* @__PURE__ */ t.createElement(
|
|
202
|
-
te,
|
|
203
|
-
{
|
|
204
|
-
themeColor: "primary",
|
|
205
|
-
onClick: R,
|
|
206
|
-
autoFocus: !0
|
|
207
|
-
},
|
|
208
|
-
E.toLanguageString(m.ok, g[m.ok])
|
|
209
|
-
))),
|
|
223
|
+
c && /* @__PURE__ */ t.createElement(ne, { title: c.title, onClose: R }, /* @__PURE__ */ t.createElement("div", null, c.message), /* @__PURE__ */ t.createElement(ae, { layout: "start" }, /* @__PURE__ */ t.createElement(te, { themeColor: "primary", onClick: R, autoFocus: !0 }, E.toLanguageString(m.ok, g[m.ok])))),
|
|
210
224
|
P && /* @__PURE__ */ t.createElement(fe, null)
|
|
211
225
|
);
|
|
212
226
|
});
|
package/package-metadata.mjs
CHANGED
|
@@ -10,7 +10,7 @@ const e = {
|
|
|
10
10
|
name: "@progress/kendo-react-spreadsheet",
|
|
11
11
|
productName: "KendoReact",
|
|
12
12
|
productCodes: ["KENDOUIREACT", "KENDOUICOMPLETE"],
|
|
13
|
-
publishDate:
|
|
13
|
+
publishDate: 1729495174,
|
|
14
14
|
version: "",
|
|
15
15
|
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"
|
|
16
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@progress/kendo-react-spreadsheet",
|
|
3
|
-
"version": "9.0.0-develop.
|
|
3
|
+
"version": "9.0.0-develop.3",
|
|
4
4
|
"description": "KendoReact Spreadsheet package",
|
|
5
5
|
"author": "Progress",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -29,16 +29,16 @@
|
|
|
29
29
|
"@progress/kendo-file-saver": "^1.1.1",
|
|
30
30
|
"@progress/kendo-licensing": "^1.3.4",
|
|
31
31
|
"@progress/kendo-ooxml": "^1.7.0",
|
|
32
|
-
"@progress/kendo-react-buttons": "9.0.0-develop.
|
|
33
|
-
"@progress/kendo-react-common": "9.0.0-develop.
|
|
34
|
-
"@progress/kendo-react-dialogs": "9.0.0-develop.
|
|
35
|
-
"@progress/kendo-react-dropdowns": "9.0.0-develop.
|
|
36
|
-
"@progress/kendo-react-inputs": "9.0.0-develop.
|
|
37
|
-
"@progress/kendo-react-intl": "9.0.0-develop.
|
|
38
|
-
"@progress/kendo-react-layout": "9.0.0-develop.
|
|
39
|
-
"@progress/kendo-react-popup": "9.0.0-develop.
|
|
40
|
-
"@progress/kendo-react-sortable": "9.0.0-develop.
|
|
41
|
-
"@progress/kendo-react-upload": "9.0.0-develop.
|
|
32
|
+
"@progress/kendo-react-buttons": "9.0.0-develop.3",
|
|
33
|
+
"@progress/kendo-react-common": "9.0.0-develop.3",
|
|
34
|
+
"@progress/kendo-react-dialogs": "9.0.0-develop.3",
|
|
35
|
+
"@progress/kendo-react-dropdowns": "9.0.0-develop.3",
|
|
36
|
+
"@progress/kendo-react-inputs": "9.0.0-develop.3",
|
|
37
|
+
"@progress/kendo-react-intl": "9.0.0-develop.3",
|
|
38
|
+
"@progress/kendo-react-layout": "9.0.0-develop.3",
|
|
39
|
+
"@progress/kendo-react-popup": "9.0.0-develop.3",
|
|
40
|
+
"@progress/kendo-react-sortable": "9.0.0-develop.3",
|
|
41
|
+
"@progress/kendo-react-upload": "9.0.0-develop.3",
|
|
42
42
|
"@progress/kendo-spreadsheet-common": "v1.1.2",
|
|
43
43
|
"@progress/kendo-svg-icons": "^3.0.0",
|
|
44
44
|
"react": "^16.8.2 || ^17.0.0 || ^18.0.0",
|
package/tools/align.mjs
CHANGED
|
@@ -13,13 +13,62 @@ import { alignLeftIcon as f, caretAltDownIcon as I, alignCenterIcon as h, alignR
|
|
|
13
13
|
import { useLocalization as K } from "@progress/kendo-react-intl";
|
|
14
14
|
import { messages as u, keys as n } from "../messages.mjs";
|
|
15
15
|
const i = [
|
|
16
|
-
{
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
16
|
+
{
|
|
17
|
+
icon: "align-left",
|
|
18
|
+
svgIcon: f,
|
|
19
|
+
textKey: n.alignLeft,
|
|
20
|
+
commandName: "textAlign",
|
|
21
|
+
value: "left",
|
|
22
|
+
selected: !1
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
icon: "align-center",
|
|
26
|
+
svgIcon: h,
|
|
27
|
+
textKey: n.alignCenter,
|
|
28
|
+
commandName: "textAlign",
|
|
29
|
+
value: "center",
|
|
30
|
+
selected: !1
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
icon: "align-right",
|
|
34
|
+
svgIcon: L,
|
|
35
|
+
textKey: n.alignRight,
|
|
36
|
+
commandName: "textAlign",
|
|
37
|
+
value: "right",
|
|
38
|
+
selected: !1
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
icon: "align-justify",
|
|
42
|
+
svgIcon: z,
|
|
43
|
+
textKey: n.alignJustify,
|
|
44
|
+
commandName: "textAlign",
|
|
45
|
+
value: "justify",
|
|
46
|
+
selected: !1
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
icon: "align-top",
|
|
50
|
+
svgIcon: b,
|
|
51
|
+
textKey: n.alignTop,
|
|
52
|
+
commandName: "verticalAlign",
|
|
53
|
+
value: "top",
|
|
54
|
+
selected: !1
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
icon: "align-middle",
|
|
58
|
+
svgIcon: k,
|
|
59
|
+
textKey: n.alignMiddle,
|
|
60
|
+
commandName: "verticalAlign",
|
|
61
|
+
value: "center",
|
|
62
|
+
selected: !1
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
icon: "align-bottom",
|
|
66
|
+
svgIcon: A,
|
|
67
|
+
textKey: n.alignBottom,
|
|
68
|
+
commandName: "verticalAlign",
|
|
69
|
+
value: "bottom",
|
|
70
|
+
selected: !1
|
|
71
|
+
}
|
|
23
72
|
], H = [
|
|
24
73
|
i[0],
|
|
25
74
|
{ ...i[1], textKey: n.center },
|
|
@@ -36,7 +85,9 @@ const i = [
|
|
|
36
85
|
}
|
|
37
86
|
}, []);
|
|
38
87
|
let t = i.slice();
|
|
39
|
-
return t = t.map((e) => ({ ...e, text: s.toLanguageString(e.textKey, u[e.textKey]) })), d && (t = t.map((e) => e.commandName === "textAlign" ? { ...e, selected: e.value === d } : e)), m && (t = t.map(
|
|
88
|
+
return t = t.map((e) => ({ ...e, text: s.toLanguageString(e.textKey, u[e.textKey]) })), d && (t = t.map((e) => e.commandName === "textAlign" ? { ...e, selected: e.value === d } : e)), m && (t = t.map(
|
|
89
|
+
(e) => e.commandName === "verticalAlign" ? { ...e, selected: e.value === m } : e
|
|
90
|
+
)), /* @__PURE__ */ c.createElement(
|
|
40
91
|
v,
|
|
41
92
|
{
|
|
42
93
|
icon: "align-left",
|
package/tools/defaultTools.mjs
CHANGED
|
@@ -28,10 +28,7 @@ import { DecreaseDecimal as z, IncreaseDecimal as K } from "./adjustDecimals.mjs
|
|
|
28
28
|
const P = [
|
|
29
29
|
{
|
|
30
30
|
textKey: r.file,
|
|
31
|
-
tools: [
|
|
32
|
-
e,
|
|
33
|
-
t
|
|
34
|
-
]
|
|
31
|
+
tools: [e, t]
|
|
35
32
|
},
|
|
36
33
|
{
|
|
37
34
|
textKey: r.home,
|
|
@@ -58,18 +55,11 @@ const P = [
|
|
|
58
55
|
},
|
|
59
56
|
{
|
|
60
57
|
textKey: r.insert,
|
|
61
|
-
tools: [
|
|
62
|
-
[D, F, C, R],
|
|
63
|
-
o,
|
|
64
|
-
[T, b]
|
|
65
|
-
]
|
|
58
|
+
tools: [[D, F, C, R], o, [T, b]]
|
|
66
59
|
},
|
|
67
60
|
{
|
|
68
61
|
textKey: r.formatTab,
|
|
69
|
-
tools: [
|
|
70
|
-
A,
|
|
71
|
-
[z, K]
|
|
72
|
-
]
|
|
62
|
+
tools: [A, [z, K]]
|
|
73
63
|
}
|
|
74
64
|
];
|
|
75
65
|
export {
|
package/tools/fontSize.mjs
CHANGED
|
@@ -14,19 +14,22 @@ import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
|
14
14
|
import { Button as x } from "@progress/kendo-react-buttons";
|
|
15
15
|
import { fontGrowIcon as N, fontShrinkIcon as b } from "@progress/kendo-svg-icons";
|
|
16
16
|
const p = 1, f = 409, d = (e) => typeof e == "string" ? parseFloat(e) : e, k = (e) => {
|
|
17
|
-
const { spreadsheetRef: r } = e, o = d(e.value), u = l.useCallback(
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
17
|
+
const { spreadsheetRef: r } = e, o = d(e.value), u = l.useCallback(
|
|
18
|
+
(a) => {
|
|
19
|
+
var c;
|
|
20
|
+
let t = a.value ? d(a.value) : o;
|
|
21
|
+
t = isNaN(t) ? o : t, t = Math.min(f, Math.max(p, t));
|
|
22
|
+
const i = {
|
|
23
|
+
command: "PropertyChangeCommand",
|
|
24
|
+
options: { property: "fontSize", value: t }
|
|
25
|
+
};
|
|
26
|
+
a.nativeEvent.type === "keydown" || a.nativeEvent.type === "focusout" ? (c = r.current) == null || c.executeCommand(i) : setTimeout(() => {
|
|
27
|
+
var n;
|
|
28
|
+
(n = r.current) == null || n.executeCommand(i);
|
|
29
|
+
}, 0);
|
|
30
|
+
},
|
|
31
|
+
[o]
|
|
32
|
+
), s = z().toLanguageString(m.fontSize, y[m.fontSize]);
|
|
30
33
|
return /* @__PURE__ */ l.createElement(
|
|
31
34
|
F,
|
|
32
35
|
{
|
package/tools/underline.mjs
CHANGED
|
@@ -9,7 +9,12 @@
|
|
|
9
9
|
import { underlineIcon as e } from "@progress/kendo-svg-icons";
|
|
10
10
|
import { PropertyChangeTool as n } from "./utils.mjs";
|
|
11
11
|
import { keys as r } from "../messages.mjs";
|
|
12
|
-
const o = {
|
|
12
|
+
const o = {
|
|
13
|
+
property: "underline",
|
|
14
|
+
icon: "underline",
|
|
15
|
+
svgIcon: e,
|
|
16
|
+
titleKey: r.underline
|
|
17
|
+
}, i = n(o);
|
|
13
18
|
i.displayName = "Underline";
|
|
14
19
|
export {
|
|
15
20
|
i as Underline
|