@progress/kendo-react-spreadsheet 7.2.4-develop.3 → 7.3.0-develop.1
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 +8 -0
- package/FormulaInput.mjs +109 -0
- package/List.js +8 -0
- package/List.mjs +34 -0
- package/NameBox.js +8 -0
- package/NameBox.mjs +109 -0
- package/SheetsBar.js +8 -0
- package/SheetsBar.mjs +211 -0
- package/Spreadsheet.js +8 -0
- package/Spreadsheet.mjs +227 -0
- package/dist/cdn/js/kendo-react-spreadsheet.js +8 -5
- package/index.d.mts +715 -5
- package/index.d.ts +715 -8
- package/index.js +8 -5
- package/index.mjs +77 -1355
- package/messages.js +8 -0
- package/messages.mjs +115 -0
- package/package-metadata.js +8 -0
- package/package-metadata.mjs +19 -0
- package/package.json +11 -11
- package/tools/adjustDecimals.js +8 -0
- package/tools/adjustDecimals.mjs +49 -0
- package/tools/align.js +8 -0
- package/tools/align.mjs +95 -0
- package/tools/backgroundColor.js +8 -0
- package/tools/backgroundColor.mjs +23 -0
- package/tools/bold.js +8 -0
- package/tools/bold.mjs +16 -0
- package/tools/cleanFormat.js +8 -0
- package/tools/cleanFormat.mjs +32 -0
- package/tools/defaultTools.js +8 -0
- package/tools/defaultTools.mjs +77 -0
- package/tools/export.js +8 -0
- package/tools/export.mjs +37 -0
- package/tools/fontFamily.js +8 -0
- package/tools/fontFamily.mjs +40 -0
- package/tools/fontSize.js +8 -0
- package/tools/fontSize.mjs +89 -0
- package/tools/format.js +8 -0
- package/tools/format.mjs +45 -0
- package/tools/gridLines.js +8 -0
- package/tools/gridLines.mjs +44 -0
- package/tools/italic.js +8 -0
- package/tools/italic.mjs +16 -0
- package/tools/open.js +8 -0
- package/tools/open.mjs +55 -0
- package/tools/redo.js +8 -0
- package/tools/redo.mjs +16 -0
- package/tools/tableTools.js +8 -0
- package/tools/tableTools.mjs +96 -0
- package/tools/textColor.js +8 -0
- package/tools/textColor.mjs +23 -0
- package/tools/textWrap.js +8 -0
- package/tools/textWrap.mjs +44 -0
- package/tools/underline.js +8 -0
- package/tools/underline.mjs +16 -0
- package/tools/undo.js +8 -0
- package/tools/undo.mjs +16 -0
- package/tools/utils.js +8 -0
- package/tools/utils.mjs +97 -0
- package/FormulaInput.d.ts +0 -9
- package/List.d.ts +0 -9
- package/NameBox.d.ts +0 -9
- package/SheetsBar.d.ts +0 -8
- package/Spreadsheet.d.ts +0 -51
- package/SpreadsheetProps.d.ts +0 -192
- package/messages.d.ts +0 -114
- package/package-metadata.d.ts +0 -9
- package/tools/adjustDecimals.d.ts +0 -24
- package/tools/align.d.ts +0 -48
- package/tools/backgroundColor.d.ts +0 -14
- package/tools/bold.d.ts +0 -14
- package/tools/cleanFormat.d.ts +0 -15
- package/tools/defaultTools.d.ts +0 -9
- package/tools/export.d.ts +0 -15
- package/tools/fontFamily.d.ts +0 -15
- package/tools/fontSize.d.ts +0 -43
- package/tools/format.d.ts +0 -15
- package/tools/gridLines.d.ts +0 -19
- package/tools/index.d.ts +0 -23
- package/tools/italic.d.ts +0 -14
- package/tools/open.d.ts +0 -15
- package/tools/redo.d.ts +0 -14
- package/tools/tableTools.d.ts +0 -68
- package/tools/textColor.d.ts +0 -14
- package/tools/textWrap.d.ts +0 -19
- package/tools/underline.d.ts +0 -14
- package/tools/undo.d.ts +0 -14
- package/tools/utils.d.ts +0 -95
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { DropDownList as l } from "@progress/kendo-react-dropdowns";
|
|
11
|
+
import { FONT_FAMILIES as s, DEFAULT_FONT_FAMILY as f } from "./utils.mjs";
|
|
12
|
+
import { useLocalization as p } from "@progress/kendo-react-intl";
|
|
13
|
+
import { keys as o, messages as u } from "../messages.mjs";
|
|
14
|
+
const c = (a) => {
|
|
15
|
+
const { spreadsheetRef: e, value: n } = a, r = t.useCallback((m) => {
|
|
16
|
+
if (e.current) {
|
|
17
|
+
const i = {
|
|
18
|
+
command: "PropertyChangeCommand",
|
|
19
|
+
options: { property: "fontFamily", value: m.value || null }
|
|
20
|
+
};
|
|
21
|
+
e.current.executeCommand(i);
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
24
|
+
return /* @__PURE__ */ t.createElement(
|
|
25
|
+
l,
|
|
26
|
+
{
|
|
27
|
+
onChange: r,
|
|
28
|
+
value: n,
|
|
29
|
+
data: s,
|
|
30
|
+
defaultValue: f,
|
|
31
|
+
fillMode: "flat",
|
|
32
|
+
title: p().toLanguageString(o.fontName, u[o.fontName]),
|
|
33
|
+
leftRightKeysNavigation: !1
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
};
|
|
37
|
+
c.displayName = "FontFamily";
|
|
38
|
+
export {
|
|
39
|
+
c as FontFamily
|
|
40
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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"),c=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 n=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const t in e)if(t!=="default"){const a=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,a.get?a:{enumerable:!0,get:()=>e[t]})}}return n.default=e,Object.freeze(n)}const m=N(I),d=1,f=409,p=e=>typeof e=="string"?parseFloat(e):e,b=e=>{const{spreadsheetRef:n}=e,t=p(e.value),a=m.useCallback(s=>{var r;let o=s.value?p(s.value):t;o=isNaN(o)?t:o,o=Math.min(f,Math.max(d,o));const i={command:"PropertyChangeCommand",options:{property:"fontSize",value:o}};s.nativeEvent.type==="keydown"||s.nativeEvent.type==="focusout"?(r=n.current)==null||r.executeCommand(i):setTimeout(()=>{var l;(l=n.current)==null||l.executeCommand(i)},0)},[t]);return m.createElement(v.ComboBox,{onChange:a,value:t,data:y.FONT_SIZES,defaultValue:y.DEFAULT_FONT_SIZE,allowCustom:!0,fillMode:"flat",title:g.useLocalization().toLanguageString(c.keys.fontSize,c.messages[c.keys.fontSize]),tabIndex:-1,clearButton:!1})};b.displayName="FontSize";const k=e=>{const n=t=>{const{property:a,icon:s,svgIcon:o,titleKey:i,step:r}=e,{spreadsheetRef:l}=t,u=p(t.value),F=m.useCallback(()=>{var S;const C={command:"PropertyChangeCommand",options:{property:a,value:Math.min(f,Math.max(d,u+r))}};(S=l.current)==null||S.executeCommand(C)},[u]);return m.createElement(h.Button,{type:"button",icon:s,svgIcon:o,fillMode:"flat",onClick:F,disabled:u+r<d||u+r>f,title:g.useLocalization().toLanguageString(i,c.messages[i])})};return n.displayName=e.displayName,n},x=k({property:"fontSize",icon:"font-grow",svgIcon:z.fontGrowIcon,titleKey:c.keys.fontSizeIncrease,displayName:"IncreaseFontSize",step:1}),D=k({property:"fontSize",icon:"font-shrink",svgIcon:z.fontShrinkIcon,titleKey:c.keys.fontSizeDecrease,displayName:"DecreaseFontSize",step:-1});exports.DecreaseFontSize=D;exports.FontSize=b;exports.IncreaseFontSize=x;
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as m from "react";
|
|
10
|
+
import { ComboBox as F } from "@progress/kendo-react-dropdowns";
|
|
11
|
+
import { FONT_SIZES as I, DEFAULT_FONT_SIZE as v } from "./utils.mjs";
|
|
12
|
+
import { keys as l, messages as y } from "../messages.mjs";
|
|
13
|
+
import { useLocalization as z } from "@progress/kendo-react-intl";
|
|
14
|
+
import { Button as x } from "@progress/kendo-react-buttons";
|
|
15
|
+
import { fontGrowIcon as N, fontShrinkIcon as b } from "@progress/kendo-svg-icons";
|
|
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 = m.useCallback((n) => {
|
|
18
|
+
var a;
|
|
19
|
+
let t = n.value ? d(n.value) : o;
|
|
20
|
+
t = isNaN(t) ? o : t, t = Math.min(f, Math.max(p, t));
|
|
21
|
+
const i = {
|
|
22
|
+
command: "PropertyChangeCommand",
|
|
23
|
+
options: { property: "fontSize", value: t }
|
|
24
|
+
};
|
|
25
|
+
n.nativeEvent.type === "keydown" || n.nativeEvent.type === "focusout" ? (a = r.current) == null || a.executeCommand(i) : setTimeout(() => {
|
|
26
|
+
var s;
|
|
27
|
+
(s = r.current) == null || s.executeCommand(i);
|
|
28
|
+
}, 0);
|
|
29
|
+
}, [o]);
|
|
30
|
+
return /* @__PURE__ */ m.createElement(
|
|
31
|
+
F,
|
|
32
|
+
{
|
|
33
|
+
onChange: u,
|
|
34
|
+
value: o,
|
|
35
|
+
data: I,
|
|
36
|
+
defaultValue: v,
|
|
37
|
+
allowCustom: !0,
|
|
38
|
+
fillMode: "flat",
|
|
39
|
+
title: z().toLanguageString(l.fontSize, y[l.fontSize]),
|
|
40
|
+
tabIndex: -1,
|
|
41
|
+
clearButton: !1
|
|
42
|
+
}
|
|
43
|
+
);
|
|
44
|
+
};
|
|
45
|
+
k.displayName = "FontSize";
|
|
46
|
+
const g = (e) => {
|
|
47
|
+
const r = (o) => {
|
|
48
|
+
const { property: u, icon: n, svgIcon: t, titleKey: i, step: a } = e, { spreadsheetRef: s } = o, c = d(o.value), C = m.useCallback(() => {
|
|
49
|
+
var S;
|
|
50
|
+
const h = {
|
|
51
|
+
command: "PropertyChangeCommand",
|
|
52
|
+
options: { property: u, value: Math.min(f, Math.max(p, c + a)) }
|
|
53
|
+
};
|
|
54
|
+
(S = s.current) == null || S.executeCommand(h);
|
|
55
|
+
}, [c]);
|
|
56
|
+
return /* @__PURE__ */ m.createElement(
|
|
57
|
+
x,
|
|
58
|
+
{
|
|
59
|
+
type: "button",
|
|
60
|
+
icon: n,
|
|
61
|
+
svgIcon: t,
|
|
62
|
+
fillMode: "flat",
|
|
63
|
+
onClick: C,
|
|
64
|
+
disabled: c + a < p || c + a > f,
|
|
65
|
+
title: z().toLanguageString(i, y[i])
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
};
|
|
69
|
+
return r.displayName = e.displayName, r;
|
|
70
|
+
}, B = g({
|
|
71
|
+
property: "fontSize",
|
|
72
|
+
icon: "font-grow",
|
|
73
|
+
svgIcon: N,
|
|
74
|
+
titleKey: l.fontSizeIncrease,
|
|
75
|
+
displayName: "IncreaseFontSize",
|
|
76
|
+
step: 1
|
|
77
|
+
}), K = g({
|
|
78
|
+
property: "fontSize",
|
|
79
|
+
icon: "font-shrink",
|
|
80
|
+
svgIcon: b,
|
|
81
|
+
titleKey: l.fontSizeDecrease,
|
|
82
|
+
displayName: "DecreaseFontSize",
|
|
83
|
+
step: -1
|
|
84
|
+
});
|
|
85
|
+
export {
|
|
86
|
+
K as DecreaseFontSize,
|
|
87
|
+
k as FontSize,
|
|
88
|
+
B as IncreaseFontSize
|
|
89
|
+
};
|
package/tools/format.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { DropDownButton as s } from "@progress/kendo-react-buttons";
|
|
11
|
+
import { customFormatIcon as i } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { FORMATS as l } from "./utils.mjs";
|
|
13
|
+
import { IconWrap as p } from "@progress/kendo-react-common";
|
|
14
|
+
import { useLocalization as f } from "@progress/kendo-react-intl";
|
|
15
|
+
import { keys as e, messages as u } from "../messages.mjs";
|
|
16
|
+
const d = (r) => {
|
|
17
|
+
const { spreadsheetRef: o } = r, m = t.useCallback((a) => {
|
|
18
|
+
const n = a.item.value || null;
|
|
19
|
+
setTimeout(() => {
|
|
20
|
+
if (o.current) {
|
|
21
|
+
const c = {
|
|
22
|
+
command: "PropertyChangeCommand",
|
|
23
|
+
options: { property: "format", value: n }
|
|
24
|
+
};
|
|
25
|
+
o.current.executeCommand(c);
|
|
26
|
+
}
|
|
27
|
+
}, 0);
|
|
28
|
+
}, []);
|
|
29
|
+
return /* @__PURE__ */ t.createElement(
|
|
30
|
+
s,
|
|
31
|
+
{
|
|
32
|
+
icon: "custom-format",
|
|
33
|
+
svgIcon: i,
|
|
34
|
+
fillMode: "flat",
|
|
35
|
+
onItemClick: m,
|
|
36
|
+
items: l,
|
|
37
|
+
title: f().toLanguageString(e.format, u[e.format]),
|
|
38
|
+
text: /* @__PURE__ */ t.createElement(p, { name: "caret-alt-down" })
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
};
|
|
42
|
+
d.displayName = "Format";
|
|
43
|
+
export {
|
|
44
|
+
d as Format
|
|
45
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { Button as c } from "@progress/kendo-react-buttons";
|
|
11
|
+
import { bordersNoneIcon as m } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
13
|
+
import { keys as n, messages as d } from "../messages.mjs";
|
|
14
|
+
const u = (r) => {
|
|
15
|
+
const { value: i, spreadsheetRef: e } = r, s = o.useCallback(() => {
|
|
16
|
+
if (e.current) {
|
|
17
|
+
const t = e.current.activeSheet();
|
|
18
|
+
if (t) {
|
|
19
|
+
const a = {
|
|
20
|
+
command: "GridLinesChangeCommand",
|
|
21
|
+
options: { property: "gridLines", value: !t.showGridLines() }
|
|
22
|
+
};
|
|
23
|
+
e.current.executeCommand(a);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
return /* @__PURE__ */ o.createElement(
|
|
28
|
+
c,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
togglable: !0,
|
|
32
|
+
icon: "borders-none",
|
|
33
|
+
svgIcon: m,
|
|
34
|
+
fillMode: "flat",
|
|
35
|
+
title: l().toLanguageString(n.gridLines, d[n.gridLines]),
|
|
36
|
+
onClick: s,
|
|
37
|
+
selected: i
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
u.displayName = "GridLines";
|
|
42
|
+
export {
|
|
43
|
+
u as GridLines
|
|
44
|
+
};
|
package/tools/italic.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { italicIcon as i } from "@progress/kendo-svg-icons";
|
|
10
|
+
import { PropertyChangeTool as t } from "./utils.mjs";
|
|
11
|
+
import { keys as o } from "../messages.mjs";
|
|
12
|
+
const c = { property: "italic", icon: "italic", svgIcon: i, titleKey: o.italic }, e = t(c);
|
|
13
|
+
e.displayName = "Italic";
|
|
14
|
+
export {
|
|
15
|
+
e as Italic
|
|
16
|
+
};
|
package/tools/open.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as t from "react";
|
|
10
|
+
import { Button as m } from "@progress/kendo-react-buttons";
|
|
11
|
+
import { Upload as p } from "@progress/kendo-react-upload";
|
|
12
|
+
import { folderOpenIcon as f } from "@progress/kendo-svg-icons";
|
|
13
|
+
import { useLocalization as d } from "@progress/kendo-react-intl";
|
|
14
|
+
import { keys as s, messages as u } from "../messages.mjs";
|
|
15
|
+
const g = (r) => {
|
|
16
|
+
const { spreadsheetRef: l } = r, i = t.useCallback((n) => {
|
|
17
|
+
const e = n.target;
|
|
18
|
+
if (e instanceof Element && e.parentNode) {
|
|
19
|
+
const o = e.closest(".k-toolbar"), a = o && o.querySelector(".k-upload input");
|
|
20
|
+
a && a.click();
|
|
21
|
+
}
|
|
22
|
+
}, []), c = t.useCallback((n) => {
|
|
23
|
+
const e = n.newState;
|
|
24
|
+
if (e[0] && e[0].getRawFile) {
|
|
25
|
+
const o = e[0].getRawFile();
|
|
26
|
+
l.current && l.current.executeCommand({ command: "OpenCommand", options: { file: o } });
|
|
27
|
+
}
|
|
28
|
+
}, []);
|
|
29
|
+
return /* @__PURE__ */ t.createElement(t.Fragment, null, /* @__PURE__ */ t.createElement(
|
|
30
|
+
m,
|
|
31
|
+
{
|
|
32
|
+
className: "k-toolbar-button",
|
|
33
|
+
title: d().toLanguageString(s.open, u[s.open]),
|
|
34
|
+
icon: "folder-open",
|
|
35
|
+
svgIcon: f,
|
|
36
|
+
fillMode: "flat",
|
|
37
|
+
onClick: i
|
|
38
|
+
}
|
|
39
|
+
), /* @__PURE__ */ t.createElement("div", { style: { display: "none" } }, /* @__PURE__ */ t.createElement(
|
|
40
|
+
p,
|
|
41
|
+
{
|
|
42
|
+
restrictions: { allowedExtensions: [".xlsx"] },
|
|
43
|
+
onAdd: c,
|
|
44
|
+
autoUpload: !1,
|
|
45
|
+
defaultFiles: [],
|
|
46
|
+
multiple: !1,
|
|
47
|
+
accept: ".xlsx,.XLSX",
|
|
48
|
+
withCredentials: !1
|
|
49
|
+
}
|
|
50
|
+
)));
|
|
51
|
+
};
|
|
52
|
+
g.displayName = "Open";
|
|
53
|
+
export {
|
|
54
|
+
g as Open
|
|
55
|
+
};
|
package/tools/redo.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { arrowRotateCwIcon as o } from "@progress/kendo-svg-icons";
|
|
10
|
+
import { UndoRedo as e } from "./utils.mjs";
|
|
11
|
+
import { keys as t } from "../messages.mjs";
|
|
12
|
+
const r = { action: "redo", icon: "reload", svgIcon: o, titleKey: t.redo }, d = e(r);
|
|
13
|
+
d.displayName = "Redo";
|
|
14
|
+
export {
|
|
15
|
+
d as Redo
|
|
16
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as a from "react";
|
|
10
|
+
import { Button as s } from "@progress/kendo-react-buttons";
|
|
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";
|
|
12
|
+
import { messages as R, keys as o } from "../messages.mjs";
|
|
13
|
+
import { useLocalization as v } from "@progress/kendo-react-intl";
|
|
14
|
+
const l = (e) => (n) => {
|
|
15
|
+
const { spreadsheetRef: t, value: d } = n, m = a.useCallback(() => {
|
|
16
|
+
if (t.current) {
|
|
17
|
+
const c = {
|
|
18
|
+
command: e.command,
|
|
19
|
+
options: { value: e.value }
|
|
20
|
+
};
|
|
21
|
+
t.current.executeCommand(c);
|
|
22
|
+
}
|
|
23
|
+
}, []);
|
|
24
|
+
return /* @__PURE__ */ a.createElement(
|
|
25
|
+
s,
|
|
26
|
+
{
|
|
27
|
+
type: "button",
|
|
28
|
+
icon: e.icon,
|
|
29
|
+
svgIcon: e.svgIcon,
|
|
30
|
+
fillMode: "flat",
|
|
31
|
+
title: v().toLanguageString(e.titleKey, R[e.titleKey]),
|
|
32
|
+
onClick: m,
|
|
33
|
+
disabled: d && e.disabled(d)
|
|
34
|
+
}
|
|
35
|
+
);
|
|
36
|
+
}, p = {
|
|
37
|
+
command: "AddColumnCommand",
|
|
38
|
+
value: "left",
|
|
39
|
+
icon: "table-column-insert-left",
|
|
40
|
+
svgIcon: i,
|
|
41
|
+
titleKey: o.addColumnLeft,
|
|
42
|
+
disabled: (e) => e.allCols,
|
|
43
|
+
displayName: "AddColumnLeft"
|
|
44
|
+
}, y = {
|
|
45
|
+
command: "AddColumnCommand",
|
|
46
|
+
value: "right",
|
|
47
|
+
icon: "table-column-insert-right",
|
|
48
|
+
svgIcon: u,
|
|
49
|
+
titleKey: o.addColumnRight,
|
|
50
|
+
disabled: (e) => e.allCols,
|
|
51
|
+
displayName: "AddColumnRight"
|
|
52
|
+
}, A = {
|
|
53
|
+
command: "AddRowCommand",
|
|
54
|
+
value: "below",
|
|
55
|
+
icon: "table-row-insert-below",
|
|
56
|
+
svgIcon: r,
|
|
57
|
+
titleKey: o.addRowBelow,
|
|
58
|
+
disabled: (e) => e.allRows,
|
|
59
|
+
displayName: "AddRowBelow"
|
|
60
|
+
}, I = {
|
|
61
|
+
command: "AddRowCommand",
|
|
62
|
+
value: "above",
|
|
63
|
+
icon: "table-row-insert-above",
|
|
64
|
+
svgIcon: w,
|
|
65
|
+
titleKey: o.addRowAbove,
|
|
66
|
+
disabled: (e) => e.allRows,
|
|
67
|
+
displayName: "AddRowAbove"
|
|
68
|
+
}, f = {
|
|
69
|
+
command: "DeleteColumnCommand",
|
|
70
|
+
icon: "table-column-delete",
|
|
71
|
+
svgIcon: b,
|
|
72
|
+
titleKey: o.deleteColumn,
|
|
73
|
+
disabled: (e) => e.allCols,
|
|
74
|
+
displayName: "DeleteColumn"
|
|
75
|
+
}, g = {
|
|
76
|
+
command: "DeleteRowCommand",
|
|
77
|
+
icon: "table-row-delete",
|
|
78
|
+
svgIcon: C,
|
|
79
|
+
titleKey: o.deleteRow,
|
|
80
|
+
disabled: (e) => e.allRows,
|
|
81
|
+
displayName: "DeleteRow"
|
|
82
|
+
}, N = l(p), D = l(y), h = l(A), K = l(I), L = l(f), B = l(g);
|
|
83
|
+
N.displayName = "AddColumnLeft";
|
|
84
|
+
D.displayName = "AddColumnRight";
|
|
85
|
+
h.displayName = "AddRowBelow";
|
|
86
|
+
K.displayName = "AddRowAbove";
|
|
87
|
+
L.displayName = "DeleteColumn";
|
|
88
|
+
B.displayName = "DeleteRow";
|
|
89
|
+
export {
|
|
90
|
+
N as AddColumnLeft,
|
|
91
|
+
D as AddColumnRight,
|
|
92
|
+
K as AddRowAbove,
|
|
93
|
+
h as AddRowBelow,
|
|
94
|
+
L as DeleteColumn,
|
|
95
|
+
B as DeleteRow
|
|
96
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { keys as o } from "../messages.mjs";
|
|
10
|
+
import { ColorTool as r } from "./utils.mjs";
|
|
11
|
+
import { foregroundColorIcon as e } from "@progress/kendo-svg-icons";
|
|
12
|
+
const t = r({
|
|
13
|
+
icon: "foreground-color",
|
|
14
|
+
svgIcon: e,
|
|
15
|
+
view: "palette",
|
|
16
|
+
property: "color",
|
|
17
|
+
titleKey: o.textColor,
|
|
18
|
+
ariaLabel: "Text Color"
|
|
19
|
+
});
|
|
20
|
+
t.displayName = "TextColor";
|
|
21
|
+
export {
|
|
22
|
+
t as TextColor
|
|
23
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import * as o from "react";
|
|
10
|
+
import { Button as p } from "@progress/kendo-react-buttons";
|
|
11
|
+
import { textWrapIcon as i } from "@progress/kendo-svg-icons";
|
|
12
|
+
import { useLocalization as l } from "@progress/kendo-react-intl";
|
|
13
|
+
import { keys as r, messages as m } from "../messages.mjs";
|
|
14
|
+
const u = (a) => {
|
|
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 = {
|
|
20
|
+
command: "TextWrapCommand",
|
|
21
|
+
options: { property: "wrap", value: !t.range(t.activeCell()).wrap() }
|
|
22
|
+
};
|
|
23
|
+
e.current.executeCommand(s);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
}, []);
|
|
27
|
+
return /* @__PURE__ */ o.createElement(
|
|
28
|
+
p,
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
togglable: !0,
|
|
32
|
+
icon: "text-wrap",
|
|
33
|
+
svgIcon: i,
|
|
34
|
+
fillMode: "flat",
|
|
35
|
+
title: l().toLanguageString(r.textWrap, m[r.textWrap]),
|
|
36
|
+
onClick: c,
|
|
37
|
+
selected: n
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
};
|
|
41
|
+
u.displayName = "TextWrap";
|
|
42
|
+
export {
|
|
43
|
+
u as TextWrap
|
|
44
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { underlineIcon as e } from "@progress/kendo-svg-icons";
|
|
10
|
+
import { PropertyChangeTool as n } from "./utils.mjs";
|
|
11
|
+
import { keys as r } from "../messages.mjs";
|
|
12
|
+
const o = { property: "underline", icon: "underline", svgIcon: e, titleKey: r.underline }, i = n(o);
|
|
13
|
+
i.displayName = "Underline";
|
|
14
|
+
export {
|
|
15
|
+
i as Underline
|
|
16
|
+
};
|
package/tools/undo.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
"use client";
|
|
9
|
+
import { arrowRotateCcwIcon as o } from "@progress/kendo-svg-icons";
|
|
10
|
+
import { UndoRedo as t } from "./utils.mjs";
|
|
11
|
+
import { keys as n } from "../messages.mjs";
|
|
12
|
+
const e = { action: "undo", icon: "reset", svgIcon: o, titleKey: n.undo }, r = t(e);
|
|
13
|
+
r.displayName = "Undo";
|
|
14
|
+
export {
|
|
15
|
+
r as Undo
|
|
16
|
+
};
|
package/tools/utils.js
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2024 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
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})};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;
|