@progress/kendo-react-spreadsheet 9.4.0-develop.24 → 9.4.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.js +1 -1
- package/FormulaInput.mjs +1 -0
- package/List.js +1 -1
- package/List.mjs +8 -7
- package/NOTICE.txt +51 -40
- package/NameBox.js +1 -1
- package/NameBox.mjs +1 -0
- package/SheetsBar.js +1 -1
- package/SheetsBar.mjs +1 -0
- package/Spreadsheet.js +1 -1
- package/Spreadsheet.mjs +1 -0
- package/dist/cdn/js/kendo-react-spreadsheet.js +1 -8
- package/index.js +1 -2
- package/index.mjs +12 -12
- package/messages.js +1 -1
- package/messages.mjs +1 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +3 -2
- package/package.json +13 -13
- package/tools/adjustDecimals.js +1 -1
- package/tools/adjustDecimals.mjs +6 -5
- package/tools/align.js +1 -1
- package/tools/align.mjs +1 -0
- package/tools/backgroundColor.js +1 -1
- package/tools/backgroundColor.mjs +1 -0
- package/tools/bold.js +1 -1
- package/tools/bold.mjs +5 -4
- package/tools/cleanFormat.js +1 -1
- package/tools/cleanFormat.mjs +7 -6
- package/tools/defaultTools.js +1 -1
- package/tools/defaultTools.mjs +7 -6
- package/tools/export.js +1 -1
- package/tools/export.mjs +1 -0
- package/tools/fontFamily.js +1 -1
- package/tools/fontFamily.mjs +1 -0
- package/tools/fontSize.js +1 -1
- package/tools/fontSize.mjs +13 -12
- package/tools/format.js +1 -1
- package/tools/format.mjs +10 -9
- package/tools/gridLines.js +1 -1
- package/tools/gridLines.mjs +10 -9
- package/tools/italic.js +1 -1
- package/tools/italic.mjs +4 -3
- package/tools/open.js +1 -1
- package/tools/open.mjs +1 -0
- package/tools/redo.js +1 -1
- package/tools/redo.mjs +3 -2
- package/tools/tableTools.js +1 -1
- package/tools/tableTools.mjs +1 -0
- package/tools/textColor.js +1 -1
- package/tools/textColor.mjs +1 -0
- package/tools/textWrap.js +1 -1
- package/tools/textWrap.mjs +13 -12
- package/tools/underline.js +1 -1
- package/tools/underline.mjs +1 -0
- package/tools/undo.js +1 -1
- package/tools/undo.mjs +1 -0
- package/tools/utils.js +1 -1
- package/tools/utils.mjs +1 -0
package/tools/defaultTools.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import { ToolbarSeparator as o } from "@progress/kendo-react-buttons";
|
|
9
10
|
import { ExcelExport as t } from "./export.mjs";
|
|
10
11
|
import { Open as e } from "./open.mjs";
|
|
@@ -12,13 +13,13 @@ import { Bold as m } from "./bold.mjs";
|
|
|
12
13
|
import { Italic as i } from "./italic.mjs";
|
|
13
14
|
import { Underline as l } from "./underline.mjs";
|
|
14
15
|
import { FontFamily as p } from "./fontFamily.mjs";
|
|
15
|
-
import { FontSize as f, IncreaseFontSize as
|
|
16
|
+
import { FontSize as f, IncreaseFontSize as n, DecreaseFontSize as a } from "./fontSize.mjs";
|
|
16
17
|
import { TextColor as d } from "./textColor.mjs";
|
|
17
18
|
import { BackgroundColor as s } from "./backgroundColor.mjs";
|
|
18
19
|
import { AlignHorizontally as c, AlignVertically as x } from "./align.mjs";
|
|
19
20
|
import { TextWrap as y } from "./textWrap.mjs";
|
|
20
|
-
import { GridLines as
|
|
21
|
-
import { Format as
|
|
21
|
+
import { GridLines as u } from "./gridLines.mjs";
|
|
22
|
+
import { Format as A } from "./format.mjs";
|
|
22
23
|
import { AddColumnLeft as D, AddColumnRight as F, AddRowBelow as C, AddRowAbove as R, DeleteColumn as T, DeleteRow as b } from "./tableTools.mjs";
|
|
23
24
|
import { keys as r } from "../messages.mjs";
|
|
24
25
|
import { Undo as g } from "./undo.mjs";
|
|
@@ -37,8 +38,8 @@ const P = [
|
|
|
37
38
|
o,
|
|
38
39
|
p,
|
|
39
40
|
f,
|
|
40
|
-
a,
|
|
41
41
|
n,
|
|
42
|
+
a,
|
|
42
43
|
o,
|
|
43
44
|
[m, i, l],
|
|
44
45
|
d,
|
|
@@ -49,7 +50,7 @@ const P = [
|
|
|
49
50
|
x,
|
|
50
51
|
y,
|
|
51
52
|
o,
|
|
52
|
-
|
|
53
|
+
u
|
|
53
54
|
]
|
|
54
55
|
},
|
|
55
56
|
{
|
|
@@ -58,7 +59,7 @@ const P = [
|
|
|
58
59
|
},
|
|
59
60
|
{
|
|
60
61
|
textKey: r.formatTab,
|
|
61
|
-
tools: [
|
|
62
|
+
tools: [A, [z, K]]
|
|
62
63
|
}
|
|
63
64
|
];
|
|
64
65
|
export {
|
package/tools/export.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),s=require("@progress/kendo-react-buttons"),a=require("@progress/kendo-file-saver"),u=require("@progress/kendo-ooxml"),i=require("@progress/kendo-svg-icons");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const r=d(l),c=e=>{const{spreadsheetRef:t}=e,o=r.useCallback(()=>{t.current&&t.current.saveAsExcel({...t.current.options.excel,saveAs:a.saveAs,Workbook:u.Workbook})},[]);return r.createElement(s.Button,{className:"k-toolbar-button",title:"Export...",icon:"download",fillMode:"flat",svgIcon:i.downloadIcon,onClick:o})};c.displayName="ExcelExport";exports.ExcelExport=c;
|
package/tools/export.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as t from "react";
|
|
9
10
|
import { Button as n } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { saveAs as c } from "@progress/kendo-file-saver";
|
package/tools/fontFamily.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),m=require("@progress/kendo-react-dropdowns"),r=require("./utils.js"),f=require("@progress/kendo-react-intl"),a=require("../messages.js");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=d(u),l=e=>{const{spreadsheetRef:t,value:n}=e,o=s.useCallback(c=>{if(t.current){const i={command:"PropertyChangeCommand",options:{property:"fontFamily",value:c.value||null}};t.current.executeCommand(i)}},[]);return s.createElement(m.DropDownList,{onChange:o,value:n,data:r.FONT_FAMILIES,defaultValue:r.DEFAULT_FONT_FAMILY,fillMode:"flat",title:f.useLocalization().toLanguageString(a.keys.fontName,a.messages[a.keys.fontName]),leftRightKeysNavigation:!1})};l.displayName="FontFamily";exports.FontFamily=l;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),m=require("@progress/kendo-react-dropdowns"),r=require("./utils.js"),f=require("@progress/kendo-react-intl"),a=require("../messages.js");function d(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const o=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,o.get?o:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const s=d(u),l=e=>{const{spreadsheetRef:t,value:n}=e,o=s.useCallback(c=>{if(t.current){const i={command:"PropertyChangeCommand",options:{property:"fontFamily",value:c.value||null}};t.current.executeCommand(i)}},[]);return s.createElement(m.DropDownList,{onChange:o,value:n,data:r.FONT_FAMILIES,defaultValue:r.DEFAULT_FONT_FAMILY,fillMode:"flat",title:f.useLocalization().toLanguageString(a.keys.fontName,a.messages[a.keys.fontName]),leftRightKeysNavigation:!1})};l.displayName="FontFamily";exports.FontFamily=l;
|
package/tools/fontFamily.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as t from "react";
|
|
9
10
|
import { DropDownList as l } from "@progress/kendo-react-dropdowns";
|
|
10
11
|
import { FONT_FAMILIES as s, DEFAULT_FONT_FAMILY as f } from "./utils.mjs";
|
package/tools/fontSize.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),v=require("@progress/kendo-react-dropdowns"),y=require("./utils.js"),i=require("../messages.js"),g=require("@progress/kendo-react-intl"),h=require("@progress/kendo-react-buttons"),z=require("@progress/kendo-svg-icons");function N(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=N(I),d=1,f=409,p=e=>typeof e=="string"?parseFloat(e):e,b=e=>{const{spreadsheetRef:o}=e,t=p(e.value),s=m.useCallback(r=>{var u;let n=r.value?p(r.value):t;n=isNaN(n)?t:n,n=Math.min(f,Math.max(d,n));const c={command:"PropertyChangeCommand",options:{property:"fontSize",value:n}};r.nativeEvent.type==="keydown"||r.nativeEvent.type==="focusout"?(u=o.current)==null||u.executeCommand(c):setTimeout(()=>{var a;(a=o.current)==null||a.executeCommand(c)},0)},[t]),l=g.useLocalization().toLanguageString(i.keys.fontSize,i.messages[i.keys.fontSize]);return m.createElement(v.ComboBox,{onChange:s,value:t,data:y.FONT_SIZES,defaultValue:y.DEFAULT_FONT_SIZE,allowCustom:!0,fillMode:"flat",title:l,tabIndex:-1,clearButton:!1,ariaLabel:l})};b.displayName="FontSize";const k=e=>{const o=t=>{const{property:s,icon:l,svgIcon:r,titleKey:n,step:c}=e,{spreadsheetRef:u}=t,a=p(t.value),F=m.useCallback(()=>{var S;const C={command:"PropertyChangeCommand",options:{property:s,value:Math.min(f,Math.max(d,a+c))}};(S=u.current)==null||S.executeCommand(C)},[a]);return m.createElement(h.Button,{type:"button",icon:l,svgIcon:r,fillMode:"flat",onClick:F,disabled:a+c<d||a+c>f,title:g.useLocalization().toLanguageString(n,i.messages[n])})};return o.displayName=e.displayName,o},x=k({property:"fontSize",icon:"font-grow",svgIcon:z.fontGrowIcon,titleKey:i.keys.fontSizeIncrease,displayName:"IncreaseFontSize",step:1}),T=k({property:"fontSize",icon:"font-shrink",svgIcon:z.fontShrinkIcon,titleKey:i.keys.fontSizeDecrease,displayName:"DecreaseFontSize",step:-1});exports.DecreaseFontSize=T;exports.FontSize=b;exports.IncreaseFontSize=x;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const I=require("react"),v=require("@progress/kendo-react-dropdowns"),y=require("./utils.js"),i=require("../messages.js"),g=require("@progress/kendo-react-intl"),h=require("@progress/kendo-react-buttons"),z=require("@progress/kendo-svg-icons");function N(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(o,t,s.get?s:{enumerable:!0,get:()=>e[t]})}}return o.default=e,Object.freeze(o)}const m=N(I),d=1,f=409,p=e=>typeof e=="string"?parseFloat(e):e,b=e=>{const{spreadsheetRef:o}=e,t=p(e.value),s=m.useCallback(r=>{var u;let n=r.value?p(r.value):t;n=isNaN(n)?t:n,n=Math.min(f,Math.max(d,n));const c={command:"PropertyChangeCommand",options:{property:"fontSize",value:n}};r.nativeEvent.type==="keydown"||r.nativeEvent.type==="focusout"?(u=o.current)==null||u.executeCommand(c):setTimeout(()=>{var a;(a=o.current)==null||a.executeCommand(c)},0)},[t]),l=g.useLocalization().toLanguageString(i.keys.fontSize,i.messages[i.keys.fontSize]);return m.createElement(v.ComboBox,{onChange:s,value:t,data:y.FONT_SIZES,defaultValue:y.DEFAULT_FONT_SIZE,allowCustom:!0,fillMode:"flat",title:l,tabIndex:-1,clearButton:!1,ariaLabel:l})};b.displayName="FontSize";const k=e=>{const o=t=>{const{property:s,icon:l,svgIcon:r,titleKey:n,step:c}=e,{spreadsheetRef:u}=t,a=p(t.value),F=m.useCallback(()=>{var S;const C={command:"PropertyChangeCommand",options:{property:s,value:Math.min(f,Math.max(d,a+c))}};(S=u.current)==null||S.executeCommand(C)},[a]);return m.createElement(h.Button,{type:"button",icon:l,svgIcon:r,fillMode:"flat",onClick:F,disabled:a+c<d||a+c>f,title:g.useLocalization().toLanguageString(n,i.messages[n])})};return o.displayName=e.displayName,o},x=k({property:"fontSize",icon:"font-grow",svgIcon:z.fontGrowIcon,titleKey:i.keys.fontSizeIncrease,displayName:"IncreaseFontSize",step:1}),T=k({property:"fontSize",icon:"font-shrink",svgIcon:z.fontShrinkIcon,titleKey:i.keys.fontSizeDecrease,displayName:"DecreaseFontSize",step:-1});exports.DecreaseFontSize=T;exports.FontSize=b;exports.IncreaseFontSize=x;
|
package/tools/fontSize.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as l from "react";
|
|
9
10
|
import { ComboBox as F } from "@progress/kendo-react-dropdowns";
|
|
10
11
|
import { FONT_SIZES as I, DEFAULT_FONT_SIZE as v } from "./utils.mjs";
|
|
@@ -12,19 +13,19 @@ import { keys as m, messages as y } from "../messages.mjs";
|
|
|
12
13
|
import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
13
14
|
import { Button as x } from "@progress/kendo-react-buttons";
|
|
14
15
|
import { fontGrowIcon as N, fontShrinkIcon as b } from "@progress/kendo-svg-icons";
|
|
15
|
-
const
|
|
16
|
-
const { spreadsheetRef:
|
|
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(
|
|
17
18
|
(a) => {
|
|
18
19
|
var c;
|
|
19
20
|
let t = a.value ? d(a.value) : o;
|
|
20
|
-
t = isNaN(t) ? o : t, t = Math.min(f, Math.max(
|
|
21
|
-
const
|
|
21
|
+
t = isNaN(t) ? o : t, t = Math.min(f, Math.max(p, t));
|
|
22
|
+
const i = {
|
|
22
23
|
command: "PropertyChangeCommand",
|
|
23
24
|
options: { property: "fontSize", value: t }
|
|
24
25
|
};
|
|
25
|
-
a.nativeEvent.type === "keydown" || a.nativeEvent.type === "focusout" ? (c =
|
|
26
|
+
a.nativeEvent.type === "keydown" || a.nativeEvent.type === "focusout" ? (c = r.current) == null || c.executeCommand(i) : setTimeout(() => {
|
|
26
27
|
var n;
|
|
27
|
-
(n =
|
|
28
|
+
(n = r.current) == null || n.executeCommand(i);
|
|
28
29
|
}, 0);
|
|
29
30
|
},
|
|
30
31
|
[o]
|
|
@@ -32,7 +33,7 @@ const u = 1, f = 409, d = (e) => typeof e == "string" ? parseFloat(e) : e, k = (
|
|
|
32
33
|
return /* @__PURE__ */ l.createElement(
|
|
33
34
|
F,
|
|
34
35
|
{
|
|
35
|
-
onChange:
|
|
36
|
+
onChange: u,
|
|
36
37
|
value: o,
|
|
37
38
|
data: I,
|
|
38
39
|
defaultValue: v,
|
|
@@ -47,12 +48,12 @@ const u = 1, f = 409, d = (e) => typeof e == "string" ? parseFloat(e) : e, k = (
|
|
|
47
48
|
};
|
|
48
49
|
k.displayName = "FontSize";
|
|
49
50
|
const g = (e) => {
|
|
50
|
-
const
|
|
51
|
-
const { property:
|
|
51
|
+
const r = (o) => {
|
|
52
|
+
const { property: u, icon: s, svgIcon: a, titleKey: t, step: i } = e, { spreadsheetRef: c } = o, n = d(o.value), C = l.useCallback(() => {
|
|
52
53
|
var S;
|
|
53
54
|
const h = {
|
|
54
55
|
command: "PropertyChangeCommand",
|
|
55
|
-
options: { property:
|
|
56
|
+
options: { property: u, value: Math.min(f, Math.max(p, n + i)) }
|
|
56
57
|
};
|
|
57
58
|
(S = c.current) == null || S.executeCommand(h);
|
|
58
59
|
}, [n]);
|
|
@@ -64,12 +65,12 @@ const g = (e) => {
|
|
|
64
65
|
svgIcon: a,
|
|
65
66
|
fillMode: "flat",
|
|
66
67
|
onClick: C,
|
|
67
|
-
disabled: n +
|
|
68
|
+
disabled: n + i < p || n + i > f,
|
|
68
69
|
title: z().toLanguageString(t, y[t])
|
|
69
70
|
}
|
|
70
71
|
);
|
|
71
72
|
};
|
|
72
|
-
return
|
|
73
|
+
return r.displayName = e.displayName, r;
|
|
73
74
|
}, B = g({
|
|
74
75
|
property: "fontSize",
|
|
75
76
|
icon: "font-grow",
|
package/tools/format.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),m=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-svg-icons"),d=require("./utils.js"),f=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=p(i),c=e=>{const{spreadsheetRef:t}=e,o=a.useCallback(n=>{const s=n.item.value||null;setTimeout(()=>{if(t.current){const u={command:"PropertyChangeCommand",options:{property:"format",value:s}};t.current.executeCommand(u)}},0)},[]);return a.createElement(m.DropDownButton,{icon:"custom-format",svgIcon:l.customFormatIcon,fillMode:"flat",onItemClick:o,items:d.FORMATS,title:g.useLocalization().toLanguageString(r.keys.format,r.messages[r.keys.format]),text:a.createElement(f.IconWrap,{name:"caret-alt-down"})})};c.displayName="Format";exports.Format=c;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react"),m=require("@progress/kendo-react-buttons"),l=require("@progress/kendo-svg-icons"),d=require("./utils.js"),f=require("@progress/kendo-react-common"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function p(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const o in e)if(o!=="default"){const n=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(t,o,n.get?n:{enumerable:!0,get:()=>e[o]})}}return t.default=e,Object.freeze(t)}const a=p(i),c=e=>{const{spreadsheetRef:t}=e,o=a.useCallback(n=>{const s=n.item.value||null;setTimeout(()=>{if(t.current){const u={command:"PropertyChangeCommand",options:{property:"format",value:s}};t.current.executeCommand(u)}},0)},[]);return a.createElement(m.DropDownButton,{icon:"custom-format",svgIcon:l.customFormatIcon,fillMode:"flat",onItemClick:o,items:d.FORMATS,title:g.useLocalization().toLanguageString(r.keys.format,r.messages[r.keys.format]),text:a.createElement(f.IconWrap,{name:"caret-alt-down"})})};c.displayName="Format";exports.Format=c;
|
package/tools/format.mjs
CHANGED
|
@@ -5,36 +5,37 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
9
10
|
import { DropDownButton as s } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { customFormatIcon as i } from "@progress/kendo-svg-icons";
|
|
11
|
-
import { FORMATS as
|
|
12
|
-
import { IconWrap as
|
|
12
|
+
import { FORMATS as l } from "./utils.mjs";
|
|
13
|
+
import { IconWrap as p } from "@progress/kendo-react-common";
|
|
13
14
|
import { useLocalization as f } from "@progress/kendo-react-intl";
|
|
14
15
|
import { keys as e, messages as u } from "../messages.mjs";
|
|
15
16
|
const d = (r) => {
|
|
16
|
-
const { spreadsheetRef:
|
|
17
|
+
const { spreadsheetRef: o } = r, m = t.useCallback((a) => {
|
|
17
18
|
const n = a.item.value || null;
|
|
18
19
|
setTimeout(() => {
|
|
19
|
-
if (
|
|
20
|
+
if (o.current) {
|
|
20
21
|
const c = {
|
|
21
22
|
command: "PropertyChangeCommand",
|
|
22
23
|
options: { property: "format", value: n }
|
|
23
24
|
};
|
|
24
|
-
|
|
25
|
+
o.current.executeCommand(c);
|
|
25
26
|
}
|
|
26
27
|
}, 0);
|
|
27
28
|
}, []);
|
|
28
|
-
return /* @__PURE__ */
|
|
29
|
+
return /* @__PURE__ */ t.createElement(
|
|
29
30
|
s,
|
|
30
31
|
{
|
|
31
32
|
icon: "custom-format",
|
|
32
33
|
svgIcon: i,
|
|
33
34
|
fillMode: "flat",
|
|
34
35
|
onItemClick: m,
|
|
35
|
-
items:
|
|
36
|
+
items: l,
|
|
36
37
|
title: f().toLanguageString(e.format, u[e.format]),
|
|
37
|
-
text: /* @__PURE__ */
|
|
38
|
+
text: /* @__PURE__ */ t.createElement(p, { name: "caret-alt-down" })
|
|
38
39
|
}
|
|
39
40
|
);
|
|
40
41
|
};
|
package/tools/gridLines.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),l=require("@progress/kendo-react-buttons"),d=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function f(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=f(u),i=t=>{const{value:n,spreadsheetRef:e}=t,o=c.useCallback(()=>{if(e.current){const s=e.current.activeSheet();if(s){const a={command:"GridLinesChangeCommand",options:{property:"gridLines",value:!s.showGridLines()}};e.current.executeCommand(a)}}},[]);return c.createElement(l.Button,{type:"button",togglable:!0,icon:"borders-none",svgIcon:d.bordersNoneIcon,fillMode:"flat",title:g.useLocalization().toLanguageString(r.keys.gridLines,r.messages[r.keys.gridLines]),onClick:o,selected:n})};i.displayName="GridLines";exports.GridLines=i;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),l=require("@progress/kendo-react-buttons"),d=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function f(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const o=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,o.get?o:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=f(u),i=t=>{const{value:n,spreadsheetRef:e}=t,o=c.useCallback(()=>{if(e.current){const s=e.current.activeSheet();if(s){const a={command:"GridLinesChangeCommand",options:{property:"gridLines",value:!s.showGridLines()}};e.current.executeCommand(a)}}},[]);return c.createElement(l.Button,{type:"button",togglable:!0,icon:"borders-none",svgIcon:d.bordersNoneIcon,fillMode:"flat",title:g.useLocalization().toLanguageString(r.keys.gridLines,r.messages[r.keys.gridLines]),onClick:o,selected:n})};i.displayName="GridLines";exports.GridLines=i;
|
package/tools/gridLines.mjs
CHANGED
|
@@ -5,25 +5,26 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
|
|
8
|
+
"use client";
|
|
9
|
+
import * as o from "react";
|
|
9
10
|
import { Button as c } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { bordersNoneIcon as m } from "@progress/kendo-svg-icons";
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { keys as n, messages as
|
|
12
|
+
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
13
|
+
import { keys as n, messages as d } from "../messages.mjs";
|
|
13
14
|
const u = (r) => {
|
|
14
|
-
const { value: i, spreadsheetRef: e } = r, s =
|
|
15
|
+
const { value: i, spreadsheetRef: e } = r, s = o.useCallback(() => {
|
|
15
16
|
if (e.current) {
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
17
|
+
const t = e.current.activeSheet();
|
|
18
|
+
if (t) {
|
|
18
19
|
const a = {
|
|
19
20
|
command: "GridLinesChangeCommand",
|
|
20
|
-
options: { property: "gridLines", value: !
|
|
21
|
+
options: { property: "gridLines", value: !t.showGridLines() }
|
|
21
22
|
};
|
|
22
23
|
e.current.executeCommand(a);
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
}, []);
|
|
26
|
-
return /* @__PURE__ */
|
|
27
|
+
return /* @__PURE__ */ o.createElement(
|
|
27
28
|
c,
|
|
28
29
|
{
|
|
29
30
|
type: "button",
|
|
@@ -31,7 +32,7 @@ const u = (r) => {
|
|
|
31
32
|
icon: "borders-none",
|
|
32
33
|
svgIcon: m,
|
|
33
34
|
fillMode: "flat",
|
|
34
|
-
title:
|
|
35
|
+
title: l().toLanguageString(n.gridLines, d[n.gridLines]),
|
|
35
36
|
onClick: s,
|
|
36
37
|
selected: i
|
|
37
38
|
}
|
package/tools/italic.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@progress/kendo-svg-icons"),i=require("./utils.js"),c=require("../messages.js"),o={property:"italic",icon:"italic",svgIcon:e.italicIcon,titleKey:c.keys.italic},t=i.PropertyChangeTool(o);t.displayName="Italic";exports.Italic=t;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("@progress/kendo-svg-icons"),i=require("./utils.js"),c=require("../messages.js"),o={property:"italic",icon:"italic",svgIcon:e.italicIcon,titleKey:c.keys.italic},t=i.PropertyChangeTool(o);t.displayName="Italic";exports.Italic=t;
|
package/tools/italic.mjs
CHANGED
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import { italicIcon as i } from "@progress/kendo-svg-icons";
|
|
9
10
|
import { PropertyChangeTool as t } from "./utils.mjs";
|
|
10
11
|
import { keys as o } from "../messages.mjs";
|
|
11
|
-
const c = { property: "italic", icon: "italic", svgIcon: i, titleKey: o.italic },
|
|
12
|
-
|
|
12
|
+
const c = { property: "italic", icon: "italic", svgIcon: i, titleKey: o.italic }, e = t(c);
|
|
13
|
+
e.displayName = "Italic";
|
|
13
14
|
export {
|
|
14
|
-
|
|
15
|
+
e as Italic
|
|
15
16
|
};
|
package/tools/open.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),p=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-react-upload"),m=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function b(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react"),p=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-react-upload"),m=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),r=require("../messages.js");function b(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const a=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(o,l,a.get?a:{enumerable:!0,get:()=>e[l]})}}return o.default=e,Object.freeze(o)}const n=b(d),u=e=>{const{spreadsheetRef:o}=e,l=n.useCallback(s=>{const t=s.target;if(t instanceof Element&&t.parentNode){const c=t.closest(".k-toolbar"),i=c&&c.querySelector(".k-upload input");i&&i.click()}},[]),a=n.useCallback(s=>{const t=s.newState;if(t[0]&&t[0].getRawFile){const c=t[0].getRawFile();o.current&&o.current.executeCommand({command:"OpenCommand",options:{file:c}})}},[]);return n.createElement(n.Fragment,null,n.createElement(p.Button,{className:"k-toolbar-button",title:g.useLocalization().toLanguageString(r.keys.open,r.messages[r.keys.open]),icon:"folder-open",svgIcon:m.folderOpenIcon,fillMode:"flat",onClick:l}),n.createElement("div",{style:{display:"none"}},n.createElement(f.Upload,{restrictions:{allowedExtensions:[".xlsx"]},onAdd:a,autoUpload:!1,defaultFiles:[],multiple:!1,accept:".xlsx,.XLSX",withCredentials:!1})))};u.displayName="Open";exports.Open=u;
|
package/tools/open.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as t from "react";
|
|
9
10
|
import { Button as m } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { Upload as p } from "@progress/kendo-react-upload";
|
package/tools/redo.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-svg-icons"),t=require("./utils.js"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-svg-icons"),t=require("./utils.js"),s=require("../messages.js"),n={action:"redo",icon:"reload",svgIcon:o.arrowRotateCwIcon,titleKey:s.keys.redo},e=t.UndoRedo(n);e.displayName="Redo";exports.Redo=e;
|
package/tools/redo.mjs
CHANGED
|
@@ -5,10 +5,11 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import { arrowRotateCwIcon as o } from "@progress/kendo-svg-icons";
|
|
9
10
|
import { UndoRedo as e } from "./utils.mjs";
|
|
10
|
-
import { keys as
|
|
11
|
-
const
|
|
11
|
+
import { keys as t } from "../messages.mjs";
|
|
12
|
+
const r = { action: "redo", icon: "reload", svgIcon: o, titleKey: t.redo }, d = e(r);
|
|
12
13
|
d.displayName = "Redo";
|
|
13
14
|
export {
|
|
14
15
|
d as Redo
|
package/tools/tableTools.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),v=require("@progress/kendo-react-buttons"),t=require("@progress/kendo-svg-icons"),o=require("../messages.js"),A=require("@progress/kendo-react-intl");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(a,l,d.get?d:{enumerable:!0,get:()=>e[l]})}}return a.default=e,Object.freeze(a)}const s=g(y),n=e=>l=>{const{spreadsheetRef:d,value:c}=l,R=s.useCallback(()=>{if(d.current){const C={command:e.command,options:{value:e.value}};d.current.executeCommand(C)}},[]);return s.createElement(v.Button,{type:"button",icon:e.icon,svgIcon:e.svgIcon,fillMode:"flat",title:A.useLocalization().toLanguageString(e.titleKey,o.messages[e.titleKey]),onClick:R,disabled:c&&e.disabled(c)})},f={command:"AddColumnCommand",value:"left",icon:"table-column-insert-left",svgIcon:t.tableColumnInsertLeftIcon,titleKey:o.keys.addColumnLeft,disabled:e=>e.allCols,displayName:"AddColumnLeft"},p={command:"AddColumnCommand",value:"right",icon:"table-column-insert-right",svgIcon:t.tableColumnInsertRightIcon,titleKey:o.keys.addColumnRight,disabled:e=>e.allCols,displayName:"AddColumnRight"},I={command:"AddRowCommand",value:"below",icon:"table-row-insert-below",svgIcon:t.tableRowInsertBelowIcon,titleKey:o.keys.addRowBelow,disabled:e=>e.allRows,displayName:"AddRowBelow"},D={command:"AddRowCommand",value:"above",icon:"table-row-insert-above",svgIcon:t.tableRowInsertAboveIcon,titleKey:o.keys.addRowAbove,disabled:e=>e.allRows,displayName:"AddRowAbove"},N={command:"DeleteColumnCommand",icon:"table-column-delete",svgIcon:t.tableColumnDeleteIcon,titleKey:o.keys.deleteColumn,disabled:e=>e.allCols,displayName:"DeleteColumn"},k={command:"DeleteRowCommand",icon:"table-row-delete",svgIcon:t.tableRowDeleteIcon,titleKey:o.keys.deleteRow,disabled:e=>e.allRows,displayName:"DeleteRow"},m=n(f),i=n(p),u=n(I),r=n(D),b=n(N),w=n(k);m.displayName="AddColumnLeft";i.displayName="AddColumnRight";u.displayName="AddRowBelow";r.displayName="AddRowAbove";b.displayName="DeleteColumn";w.displayName="DeleteRow";exports.AddColumnLeft=m;exports.AddColumnRight=i;exports.AddRowAbove=r;exports.AddRowBelow=u;exports.DeleteColumn=b;exports.DeleteRow=w;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),v=require("@progress/kendo-react-buttons"),t=require("@progress/kendo-svg-icons"),o=require("../messages.js"),A=require("@progress/kendo-react-intl");function g(e){const a=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const l in e)if(l!=="default"){const d=Object.getOwnPropertyDescriptor(e,l);Object.defineProperty(a,l,d.get?d:{enumerable:!0,get:()=>e[l]})}}return a.default=e,Object.freeze(a)}const s=g(y),n=e=>l=>{const{spreadsheetRef:d,value:c}=l,R=s.useCallback(()=>{if(d.current){const C={command:e.command,options:{value:e.value}};d.current.executeCommand(C)}},[]);return s.createElement(v.Button,{type:"button",icon:e.icon,svgIcon:e.svgIcon,fillMode:"flat",title:A.useLocalization().toLanguageString(e.titleKey,o.messages[e.titleKey]),onClick:R,disabled:c&&e.disabled(c)})},f={command:"AddColumnCommand",value:"left",icon:"table-column-insert-left",svgIcon:t.tableColumnInsertLeftIcon,titleKey:o.keys.addColumnLeft,disabled:e=>e.allCols,displayName:"AddColumnLeft"},p={command:"AddColumnCommand",value:"right",icon:"table-column-insert-right",svgIcon:t.tableColumnInsertRightIcon,titleKey:o.keys.addColumnRight,disabled:e=>e.allCols,displayName:"AddColumnRight"},I={command:"AddRowCommand",value:"below",icon:"table-row-insert-below",svgIcon:t.tableRowInsertBelowIcon,titleKey:o.keys.addRowBelow,disabled:e=>e.allRows,displayName:"AddRowBelow"},D={command:"AddRowCommand",value:"above",icon:"table-row-insert-above",svgIcon:t.tableRowInsertAboveIcon,titleKey:o.keys.addRowAbove,disabled:e=>e.allRows,displayName:"AddRowAbove"},N={command:"DeleteColumnCommand",icon:"table-column-delete",svgIcon:t.tableColumnDeleteIcon,titleKey:o.keys.deleteColumn,disabled:e=>e.allCols,displayName:"DeleteColumn"},k={command:"DeleteRowCommand",icon:"table-row-delete",svgIcon:t.tableRowDeleteIcon,titleKey:o.keys.deleteRow,disabled:e=>e.allRows,displayName:"DeleteRow"},m=n(f),i=n(p),u=n(I),r=n(D),b=n(N),w=n(k);m.displayName="AddColumnLeft";i.displayName="AddColumnRight";u.displayName="AddRowBelow";r.displayName="AddRowAbove";b.displayName="DeleteColumn";w.displayName="DeleteRow";exports.AddColumnLeft=m;exports.AddColumnRight=i;exports.AddRowAbove=r;exports.AddRowBelow=u;exports.DeleteColumn=b;exports.DeleteRow=w;
|
package/tools/tableTools.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as a from "react";
|
|
9
10
|
import { Button as s } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { tableColumnInsertLeftIcon as i, tableColumnInsertRightIcon as u, tableRowInsertBelowIcon as r, tableRowInsertAboveIcon as w, tableColumnDeleteIcon as b, tableRowDeleteIcon as C } from "@progress/kendo-svg-icons";
|
package/tools/textColor.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../messages.js"),r=require("./utils.js"),t=require("@progress/kendo-svg-icons"),o=r.ColorTool({icon:"foreground-color",svgIcon:t.foregroundColorIcon,view:"palette",property:"color",titleKey:e.keys.textColor,ariaLabel:"Text Color"});o.displayName="TextColor";exports.TextColor=o;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("../messages.js"),r=require("./utils.js"),t=require("@progress/kendo-svg-icons"),o=r.ColorTool({icon:"foreground-color",svgIcon:t.foregroundColorIcon,view:"palette",property:"color",titleKey:e.keys.textColor,ariaLabel:"Text Color"});o.displayName="TextColor";exports.TextColor=o;
|
package/tools/textColor.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import { keys as o } from "../messages.mjs";
|
|
9
10
|
import { ColorTool as r } from "./utils.mjs";
|
|
10
11
|
import { foregroundColorIcon as e } from "@progress/kendo-svg-icons";
|
package/tools/textWrap.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),i=require("@progress/kendo-react-buttons"),p=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),a=require("../messages.js");function d(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=d(l),s=t=>{const{value:n,spreadsheetRef:e}=t,r=c.useCallback(()=>{if(e.current){const o=e.current.activeSheet();if(o){const u={command:"TextWrapCommand",options:{property:"wrap",value:!o.range(o.activeCell()).wrap()}};e.current.executeCommand(u)}}},[]);return c.createElement(i.Button,{type:"button",togglable:!0,icon:"text-wrap",svgIcon:p.textWrapIcon,fillMode:"flat",title:g.useLocalization().toLanguageString(a.keys.textWrap,a.messages[a.keys.textWrap]),onClick:r,selected:n})};s.displayName="TextWrap";exports.TextWrap=s;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react"),i=require("@progress/kendo-react-buttons"),p=require("@progress/kendo-svg-icons"),g=require("@progress/kendo-react-intl"),a=require("../messages.js");function d(t){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const e in t)if(e!=="default"){const r=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,r.get?r:{enumerable:!0,get:()=>t[e]})}}return n.default=t,Object.freeze(n)}const c=d(l),s=t=>{const{value:n,spreadsheetRef:e}=t,r=c.useCallback(()=>{if(e.current){const o=e.current.activeSheet();if(o){const u={command:"TextWrapCommand",options:{property:"wrap",value:!o.range(o.activeCell()).wrap()}};e.current.executeCommand(u)}}},[]);return c.createElement(i.Button,{type:"button",togglable:!0,icon:"text-wrap",svgIcon:p.textWrapIcon,fillMode:"flat",title:g.useLocalization().toLanguageString(a.keys.textWrap,a.messages[a.keys.textWrap]),onClick:r,selected:n})};s.displayName="TextWrap";exports.TextWrap=s;
|
package/tools/textWrap.mjs
CHANGED
|
@@ -5,33 +5,34 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as o from "react";
|
|
9
|
-
import { Button as
|
|
10
|
+
import { Button as p } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { textWrapIcon as i } from "@progress/kendo-svg-icons";
|
|
11
|
-
import { useLocalization as
|
|
12
|
-
import { keys as r, messages as
|
|
12
|
+
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
13
|
+
import { keys as r, messages as m } from "../messages.mjs";
|
|
13
14
|
const u = (a) => {
|
|
14
|
-
const { value: n, spreadsheetRef:
|
|
15
|
-
if (
|
|
16
|
-
const
|
|
17
|
-
if (
|
|
18
|
-
const
|
|
15
|
+
const { value: n, spreadsheetRef: e } = a, c = o.useCallback(() => {
|
|
16
|
+
if (e.current) {
|
|
17
|
+
const t = e.current.activeSheet();
|
|
18
|
+
if (t) {
|
|
19
|
+
const s = {
|
|
19
20
|
command: "TextWrapCommand",
|
|
20
|
-
options: { property: "wrap", value: !
|
|
21
|
+
options: { property: "wrap", value: !t.range(t.activeCell()).wrap() }
|
|
21
22
|
};
|
|
22
|
-
|
|
23
|
+
e.current.executeCommand(s);
|
|
23
24
|
}
|
|
24
25
|
}
|
|
25
26
|
}, []);
|
|
26
27
|
return /* @__PURE__ */ o.createElement(
|
|
27
|
-
|
|
28
|
+
p,
|
|
28
29
|
{
|
|
29
30
|
type: "button",
|
|
30
31
|
togglable: !0,
|
|
31
32
|
icon: "text-wrap",
|
|
32
33
|
svgIcon: i,
|
|
33
34
|
fillMode: "flat",
|
|
34
|
-
title:
|
|
35
|
+
title: l().toLanguageString(r.textWrap, m[r.textWrap]),
|
|
35
36
|
onClick: c,
|
|
36
37
|
selected: n
|
|
37
38
|
}
|
package/tools/underline.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-svg-icons"),r=require("./utils.js"),i=require("../messages.js"),
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@progress/kendo-svg-icons"),r=require("./utils.js"),i=require("../messages.js"),t={property:"underline",icon:"underline",svgIcon:n.underlineIcon,titleKey:i.keys.underline},e=r.PropertyChangeTool(t);e.displayName="Underline";exports.Underline=e;
|
package/tools/underline.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import { underlineIcon as e } from "@progress/kendo-svg-icons";
|
|
9
10
|
import { PropertyChangeTool as n } from "./utils.mjs";
|
|
10
11
|
import { keys as r } from "../messages.mjs";
|
package/tools/undo.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-svg-icons"),n=require("./utils.js"),t=require("../messages.js"),s={action:"undo",icon:"reset",svgIcon:o.arrowRotateCcwIcon,titleKey:t.keys.undo},e=n.UndoRedo(s);e.displayName="Undo";exports.Undo=e;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("@progress/kendo-svg-icons"),n=require("./utils.js"),t=require("../messages.js"),s={action:"undo",icon:"reset",svgIcon:o.arrowRotateCcwIcon,titleKey:t.keys.undo},e=n.UndoRedo(s);e.displayName="Undo";exports.Undo=e;
|
package/tools/undo.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import { arrowRotateCcwIcon as o } from "@progress/kendo-svg-icons";
|
|
9
10
|
import { UndoRedo as t } from "./utils.mjs";
|
|
10
11
|
import { keys as n } from "../messages.mjs";
|
package/tools/utils.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 strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),g=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-react-inputs"),m=require("@progress/kendo-react-intl"),d=require("../messages.js");function v(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=v(y),_=["Arial","Courier New","Georgia","Times New Roman","Trebuchet MS","Verdana"],C="Arial",b=[8,9,10,11,12,13,14,16,18,20,22,24,26,28,36,48,72],k=12,F=[{text:"Automatic",value:null},{text:"Text",value:"@"},{text:"Number",value:"#,0.00"},{text:"Percent",value:"0.00%"},{text:"Financial",value:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)'},{text:"Currency",value:"$#,##0.00;[Red]$#,##0.00"},{text:"Date",value:"m/d/yyyy"},{text:"Time",value:"h:mm:ss AM/PM"},{text:"Date time",value:"m/d/yyyy h:mm"},{text:"Duration",value:"[h]:mm:ss"}],S=e=>t=>{const{property:o,icon:r,svgIcon:u,titleKey:l}=e,{spreadsheetRef:s,value:a}=t,i=c.useCallback(()=>{if(s.current){const p={command:"PropertyChangeCommand",options:{property:o,value:!a}};s.current.executeCommand(p)}},[a]);return c.createElement(g.Button,{type:"button",icon:r,svgIcon:u,fillMode:"flat",togglable:!0,onClick:i,selected:!!a,title:m.useLocalization().toLanguageString(l,d.messages[l])})},O=e=>t=>{const{property:o,titleKey:r,...u}=e,{spreadsheetRef:l,value:s}=t,a=c.useCallback(i=>{if(l.current){const T={command:"PropertyChangeCommand",options:{property:o,value:i.value||null}};l.current.executeCommand(T)}},[o]);return c.createElement(f.ColorPicker,{onChange:a,onActiveColorClick:a,fillMode:"flat",...u,title:m.useLocalization().toLanguageString(r,d.messages[r]),value:s})},A=e=>t=>{const{spreadsheetRef:o}=t,r=c.useCallback(()=>{o.current&&o.current.workbook.undoRedoStack[e.action]()},[]);return c.createElement(g.Button,{type:"button",icon:e.icon,svgIcon:e.svgIcon,fillMode:"flat",title:m.useLocalization().toLanguageString(e.titleKey,d.messages[e.titleKey]),onClick:r,togglable:!0})};exports.ColorTool=O;exports.DEFAULT_FONT_FAMILY=C;exports.DEFAULT_FONT_SIZE=k;exports.FONT_FAMILIES=_;exports.FONT_SIZES=b;exports.FORMATS=F;exports.PropertyChangeTool=S;exports.UndoRedo=A;
|
|
8
|
+
"use client";"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),g=require("@progress/kendo-react-buttons"),f=require("@progress/kendo-react-inputs"),m=require("@progress/kendo-react-intl"),d=require("../messages.js");function v(e){const n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const o=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,o.get?o:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const c=v(y),_=["Arial","Courier New","Georgia","Times New Roman","Trebuchet MS","Verdana"],C="Arial",b=[8,9,10,11,12,13,14,16,18,20,22,24,26,28,36,48,72],k=12,F=[{text:"Automatic",value:null},{text:"Text",value:"@"},{text:"Number",value:"#,0.00"},{text:"Percent",value:"0.00%"},{text:"Financial",value:'_("$"* #,##0.00_);_("$"* (#,##0.00);_("$"* "-"??_);_(@_)'},{text:"Currency",value:"$#,##0.00;[Red]$#,##0.00"},{text:"Date",value:"m/d/yyyy"},{text:"Time",value:"h:mm:ss AM/PM"},{text:"Date time",value:"m/d/yyyy h:mm"},{text:"Duration",value:"[h]:mm:ss"}],S=e=>t=>{const{property:o,icon:r,svgIcon:u,titleKey:l}=e,{spreadsheetRef:s,value:a}=t,i=c.useCallback(()=>{if(s.current){const p={command:"PropertyChangeCommand",options:{property:o,value:!a}};s.current.executeCommand(p)}},[a]);return c.createElement(g.Button,{type:"button",icon:r,svgIcon:u,fillMode:"flat",togglable:!0,onClick:i,selected:!!a,title:m.useLocalization().toLanguageString(l,d.messages[l])})},O=e=>t=>{const{property:o,titleKey:r,...u}=e,{spreadsheetRef:l,value:s}=t,a=c.useCallback(i=>{if(l.current){const T={command:"PropertyChangeCommand",options:{property:o,value:i.value||null}};l.current.executeCommand(T)}},[o]);return c.createElement(f.ColorPicker,{onChange:a,onActiveColorClick:a,fillMode:"flat",...u,title:m.useLocalization().toLanguageString(r,d.messages[r]),value:s})},A=e=>t=>{const{spreadsheetRef:o}=t,r=c.useCallback(()=>{o.current&&o.current.workbook.undoRedoStack[e.action]()},[]);return c.createElement(g.Button,{type:"button",icon:e.icon,svgIcon:e.svgIcon,fillMode:"flat",title:m.useLocalization().toLanguageString(e.titleKey,d.messages[e.titleKey]),onClick:r,togglable:!0})};exports.ColorTool=O;exports.DEFAULT_FONT_FAMILY=C;exports.DEFAULT_FONT_SIZE=k;exports.FONT_FAMILIES=_;exports.FONT_SIZES=b;exports.FORMATS=F;exports.PropertyChangeTool=S;exports.UndoRedo=A;
|
package/tools/utils.mjs
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
+
"use client";
|
|
8
9
|
import * as r from "react";
|
|
9
10
|
import { Button as v } from "@progress/kendo-react-buttons";
|
|
10
11
|
import { ColorPicker as C } from "@progress/kendo-react-inputs";
|