@progress/kendo-react-editor 13.3.0 → 13.4.0-develop.2
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/Editor.d.ts +125 -0
- package/Editor.js +1 -1
- package/Editor.mjs +77 -77
- package/EditorProps.d.ts +406 -0
- package/config/defaultStyles.d.ts +19 -0
- package/config/pasteSettings.d.ts +13 -0
- package/config/schema.d.ts +8 -0
- package/config/shortcuts.d.ts +31 -0
- package/config/shortcuts.mjs +7 -7
- package/config/toolsSettings.d.ts +496 -0
- package/dialogs/EditorDialogProps.d.ts +33 -0
- package/dialogs/FindReplace.d.ts +79 -0
- package/dialogs/FindReplace.mjs +3 -3
- package/dialogs/index.d.ts +56 -0
- package/dialogs/insertImage.d.ts +35 -0
- package/dialogs/insertImage.mjs +3 -3
- package/dialogs/insertLink.d.ts +33 -0
- package/dialogs/insertLink.mjs +3 -3
- package/dialogs/viewHtml.d.ts +32 -0
- package/dialogs/viewHtml.mjs +3 -3
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/index.d.mts +176 -3134
- package/index.d.ts +176 -3134
- package/index.mjs +139 -139
- package/messages/index.d.ts +359 -0
- package/package-metadata.d.ts +12 -0
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +10 -16
- package/package.json +12 -12
- package/tools/ToolProps.d.ts +41 -0
- package/tools/align.d.ts +14 -0
- package/tools/applyColor.d.ts +19 -0
- package/tools/cleanFormatting.d.ts +23 -0
- package/tools/findReplace.d.ts +36 -0
- package/tools/findReplace.mjs +3 -3
- package/tools/fontStyle.d.ts +35 -0
- package/tools/fontStyle.mjs +3 -3
- package/tools/formatBlock.d.ts +25 -0
- package/tools/formatBlock.mjs +3 -3
- package/tools/history.d.ts +33 -0
- package/tools/indent.d.ts +24 -0
- package/tools/index.d.ts +717 -0
- package/tools/index.mjs +1 -1
- package/tools/inlineFormat.d.ts +54 -0
- package/tools/inlineFormat.mjs +3 -3
- package/tools/insertImage.d.ts +20 -0
- package/tools/insertLink.d.ts +31 -0
- package/tools/insertTable/index.d.ts +10 -0
- package/tools/insertTable/popup.d.ts +100 -0
- package/tools/insertTable/popupGrid.d.ts +38 -0
- package/tools/insertTable/tool.d.ts +31 -0
- package/tools/lists-styled.d.ts +12 -0
- package/tools/lists.d.ts +34 -0
- package/tools/outdent.d.ts +24 -0
- package/tools/pdf.d.ts +32 -0
- package/tools/print.d.ts +23 -0
- package/tools/proseMirrorTool.d.ts +19 -0
- package/tools/selectAll.d.ts +23 -0
- package/tools/table-wizard/cellPropsUtils.d.ts +43 -0
- package/tools/table-wizard/cellPropsUtils.mjs +5 -5
- package/tools/table-wizard/tableCellProperties.d.ts +27 -0
- package/tools/table-wizard/tableProperties.d.ts +18 -0
- package/tools/table-wizard/tableProperties.mjs +13 -13
- package/tools/table-wizard/tablePropsUtils.d.ts +59 -0
- package/tools/table-wizard/tablePropsUtils.mjs +9 -9
- package/tools/table-wizard/utils.d.ts +46 -0
- package/tools/tableEdit.d.ts +105 -0
- package/tools/tableEdit.mjs +3 -3
- package/tools/unlink.d.ts +24 -0
- package/tools/utils.d.ts +57 -0
- package/tools/utils.mjs +1 -1
- package/tools/viewHtml.d.ts +31 -0
- package/utils/browser-detection.d.ts +11 -0
- package/utils/controlled-value.d.ts +12 -0
- package/utils/index.d.ts +370 -0
- package/utils/props-key.d.ts +12 -0
|
@@ -12,11 +12,11 @@ import { AutoComplete as ie, DropDownList as d } from "@progress/kendo-react-dro
|
|
|
12
12
|
import { Window as Se, WindowActionsBar as xe } from "@progress/kendo-react-dialogs";
|
|
13
13
|
import { TabStrip as he, TabStripTab as ce } from "@progress/kendo-react-layout";
|
|
14
14
|
import { tablePropertiesIcon as Ce, tablePositionStartIcon as we, tablePositionCenterIcon as ye, tablePositionEndIcon as Re, tableAlignMiddleLeftIcon as Le, tableAlignMiddleCenterIcon as Ae, tableAlignMiddleRightIcon as Ie, tableAlignRemoveIcon as Be, positionTopIcon as Ke, positionBottomIcon as Ve } from "@progress/kendo-svg-icons";
|
|
15
|
-
import { parentNode as Te, onDownPreventDefault as De,
|
|
16
|
-
import {
|
|
15
|
+
import { parentNode as Te, onDownPreventDefault as De, popupSettings as c, units as me, borderStyles as ue } from "../utils.mjs";
|
|
16
|
+
import { itemRenderWithIcon as k, valueRenderWithIcon as v } from "./tableCellProperties.mjs";
|
|
17
17
|
import { useLocalization as ge } from "@progress/kendo-react-intl";
|
|
18
18
|
import { keys as t, messages as l } from "../../messages/index.mjs";
|
|
19
|
-
import { applyTableData as ze,
|
|
19
|
+
import { applyTableData as ze, tableDefaultData as He, initialTableData as We, tablePositionStyles as Ue } from "./tablePropsUtils.mjs";
|
|
20
20
|
const _e = (n) => {
|
|
21
21
|
const { view: o, ...r } = n, P = ge(), [N, b] = e.useState(!1), g = !!(o && Te(o.state.selection.$from, (i) => i.type.spec.tableRole === "table")), p = e.useCallback(() => {
|
|
22
22
|
b(!0);
|
|
@@ -99,7 +99,7 @@ const _e = (n) => {
|
|
|
99
99
|
icon: "table-position-right",
|
|
100
100
|
svgIcon: Re
|
|
101
101
|
}
|
|
102
|
-
].map((n) => ({ ...n, style:
|
|
102
|
+
].map((n) => ({ ...n, style: Ue[n.value] })), fe = [
|
|
103
103
|
{
|
|
104
104
|
textKey: t.tablePropertiesTop,
|
|
105
105
|
text: l[t.tablePropertiesTop],
|
|
@@ -129,7 +129,7 @@ const _e = (n) => {
|
|
|
129
129
|
], Fe = (n) => {
|
|
130
130
|
const o = e.useMemo(() => {
|
|
131
131
|
const a = n.view && n.view.state;
|
|
132
|
-
return a ?
|
|
132
|
+
return a ? He(a) : We;
|
|
133
133
|
}, [n.view]), r = ge(), [P, N] = e.useState(0), b = e.useCallback((a) => {
|
|
134
134
|
N(a.selected);
|
|
135
135
|
}, []), g = e.useRef(null), p = e.useRef(null), m = e.useRef(null), f = e.useRef(null), i = e.useRef(null), u = e.useRef(null), S = e.useRef(null), I = e.useRef(null), B = e.useRef(null), K = e.useRef(null), x = e.useRef(null), h = e.useRef(null), V = e.useRef(null), T = e.useRef(null), D = e.useRef(null), z = e.useRef(null), H = e.useRef(null), W = e.useRef(null), U = e.useRef(null), F = e.useRef(null), C = e.useRef(null), w = e.useRef(null), y = e.useRef(null), pe = e.useCallback(() => {
|
|
@@ -219,8 +219,8 @@ const _e = (n) => {
|
|
|
219
219
|
})),
|
|
220
220
|
textField: "text",
|
|
221
221
|
dataItemKey: "value",
|
|
222
|
-
valueRender:
|
|
223
|
-
itemRender:
|
|
222
|
+
valueRender: v,
|
|
223
|
+
itemRender: k
|
|
224
224
|
}
|
|
225
225
|
))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
226
226
|
t.tablePropertiesAlignment,
|
|
@@ -234,8 +234,8 @@ const _e = (n) => {
|
|
|
234
234
|
textField: "text",
|
|
235
235
|
dataItemKey: "value",
|
|
236
236
|
popupSettings: c,
|
|
237
|
-
valueRender:
|
|
238
|
-
itemRender:
|
|
237
|
+
valueRender: v,
|
|
238
|
+
itemRender: k
|
|
239
239
|
}
|
|
240
240
|
))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
241
241
|
t.tablePropertiesCellSpacing,
|
|
@@ -321,8 +321,8 @@ const _e = (n) => {
|
|
|
321
321
|
popupSettings: c,
|
|
322
322
|
textField: "text",
|
|
323
323
|
dataItemKey: "value",
|
|
324
|
-
valueRender:
|
|
325
|
-
itemRender:
|
|
324
|
+
valueRender: v,
|
|
325
|
+
itemRender: k
|
|
326
326
|
}
|
|
327
327
|
))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
328
328
|
t.tablePropertiesCaptionAlignment,
|
|
@@ -339,8 +339,8 @@ const _e = (n) => {
|
|
|
339
339
|
popupSettings: c,
|
|
340
340
|
textField: "text",
|
|
341
341
|
dataItemKey: "value",
|
|
342
|
-
valueRender:
|
|
343
|
-
itemRender:
|
|
342
|
+
valueRender: v,
|
|
343
|
+
itemRender: k
|
|
344
344
|
}
|
|
345
345
|
))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-1" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
346
346
|
t.tablePropertiesHeaderRows,
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { EditorState, Transaction } from '@progress/kendo-editor-common';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
type TablePosition = 'left' | 'right' | 'center' | '';
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
interface TableData {
|
|
17
|
+
rows: number;
|
|
18
|
+
columns: number;
|
|
19
|
+
width: number | null;
|
|
20
|
+
widthUnit: string;
|
|
21
|
+
height: number | null;
|
|
22
|
+
heightUnit: string;
|
|
23
|
+
position: TablePosition | null;
|
|
24
|
+
textAlign: string;
|
|
25
|
+
cellPadding: number | null;
|
|
26
|
+
cellSpacing: number | null;
|
|
27
|
+
backgroundColor: string | undefined;
|
|
28
|
+
borderWidth: number | null;
|
|
29
|
+
borderColor: string | undefined;
|
|
30
|
+
borderStyle: string | null;
|
|
31
|
+
collapseBorders: boolean;
|
|
32
|
+
id: string;
|
|
33
|
+
className: string;
|
|
34
|
+
caption?: string;
|
|
35
|
+
captionPosition: string | null;
|
|
36
|
+
captionAlignment: string | null;
|
|
37
|
+
headerRows: number;
|
|
38
|
+
headerColumns: number;
|
|
39
|
+
associateHeaders: 'none' | 'scope' | 'id';
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* @hidden
|
|
43
|
+
*/
|
|
44
|
+
declare const initialTableData: TableData;
|
|
45
|
+
/**
|
|
46
|
+
* @hidden
|
|
47
|
+
*/
|
|
48
|
+
declare const tablePositionStyles: Record<TablePosition, {
|
|
49
|
+
[styleName: string]: string;
|
|
50
|
+
}>;
|
|
51
|
+
/**
|
|
52
|
+
* @hidden
|
|
53
|
+
*/
|
|
54
|
+
declare const tableDefaultData: (state: EditorState) => TableData;
|
|
55
|
+
/**
|
|
56
|
+
* @hidden
|
|
57
|
+
*/
|
|
58
|
+
declare const applyTableData: (state: EditorState, data: TableData) => Transaction | undefined;
|
|
59
|
+
export { TableData, initialTableData, tablePositionStyles, TablePosition, tableDefaultData, applyTableData };
|
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import {
|
|
8
|
+
import { Selection as F, TextSelection as j, TableMap as A, pmDocToFragment as O, fragmentToHtml as B, CellSelection as U, parseContent as q, addColumnAfter as G, addRowAfter as J } from "@progress/kendo-editor-common";
|
|
9
9
|
import { deleteColumnCmd as K, deleteRowCmd as L } from "../tableEdit.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { tableCells as P, setNodeStyle as h, parseStyle as S, selectedCells as Q, nodeSize as _ } from "./utils.mjs";
|
|
11
11
|
import { parentNode as T } from "../utils.mjs";
|
|
12
12
|
const N = {
|
|
13
13
|
rows: 0,
|
|
@@ -81,15 +81,15 @@ const N = {
|
|
|
81
81
|
}), t ? "scope" : s ? "id" : "none";
|
|
82
82
|
}, ce = (o) => {
|
|
83
83
|
var p, a, b;
|
|
84
|
-
const t =
|
|
84
|
+
const t = Q(o), s = o.selection.$from, l = t.length ? T(s, (f) => f.type.spec.tableRole === "table") : null;
|
|
85
85
|
if (!l)
|
|
86
86
|
return N;
|
|
87
87
|
const e = T(s, (f) => f.type.name === "table_wrapper");
|
|
88
88
|
let n = "", i = {}, r = {};
|
|
89
89
|
e && (r = S(e.node.attrs.style), e.node.content.forEach((f) => {
|
|
90
90
|
if (f.type.name === "table_caption_external") {
|
|
91
|
-
const y =
|
|
92
|
-
n =
|
|
91
|
+
const y = O(f);
|
|
92
|
+
n = B(y), n = n === "<img>" ? "" : n, i = S(f.attrs.style);
|
|
93
93
|
}
|
|
94
94
|
}));
|
|
95
95
|
const c = S(((p = l.node.attrs) == null ? void 0 : p.style) || ""), u = A.get(l.node), d = r["margin-left"] === "auto" && r["margin-right"] === "auto" ? "center" : r["margin-right"] === "auto" ? "left" : r["margin-left"] === "auto" ? "right" : null, g = V(l.node, u), m = X(l.node);
|
|
@@ -149,7 +149,7 @@ const N = {
|
|
|
149
149
|
if (!n)
|
|
150
150
|
return e;
|
|
151
151
|
let i = A.get(n);
|
|
152
|
-
return i.width === l && i.height === s || (l > i.width ? e = R(e, t, n, l - i.width,
|
|
152
|
+
return i.width === l && i.height === s || (l > i.width ? e = R(e, t, n, l - i.width, G) : l < i.width && (e = x(e, t, i.width - l, K)), n = e.doc.nodeAt(t), !n) || (i = A.get(n), s > i.height ? e = R(e, t, n, s - i.height, J) : s < i.height && (e = x(e, t, i.height - s, L))), e;
|
|
153
153
|
}, W = (o, t, s) => {
|
|
154
154
|
const l = o.doc.nodeAt(s);
|
|
155
155
|
if (!l)
|
|
@@ -204,7 +204,7 @@ const N = {
|
|
|
204
204
|
return e = h(e, "margin-left", ""), e = h(e, "margin-right", ""), Object.keys(l || {}).forEach((n) => {
|
|
205
205
|
e = h(e, n, (l || {})[n] || "");
|
|
206
206
|
}), o.apply(o.tr.setNodeMarkup(s, null, e));
|
|
207
|
-
}, v = (o, t) =>
|
|
207
|
+
}, v = (o, t) => q("<p>" + o + "</p>", t).content.firstChild.content, M = (o, t) => {
|
|
208
208
|
if (!o.caption)
|
|
209
209
|
return;
|
|
210
210
|
let s = { caption: "", style: "display: table-caption" };
|
|
@@ -271,7 +271,7 @@ const N = {
|
|
|
271
271
|
if (!n)
|
|
272
272
|
return;
|
|
273
273
|
const i = n.tr;
|
|
274
|
-
|
|
274
|
+
P(n).forEach((f) => {
|
|
275
275
|
let y = { ...f.node.attrs };
|
|
276
276
|
y = h(y, "padding", typeof t.cellPadding == "number" ? t.cellPadding + "px" : ""), i.setNodeMarkup(f.pos, null, y);
|
|
277
277
|
}), n = n.apply(i), n = W(n, t, e), n = ee(n, t, e);
|
|
@@ -280,7 +280,7 @@ const N = {
|
|
|
280
280
|
const d = u.pos, g = n.doc.nodeAt(u.pos);
|
|
281
281
|
if (!g)
|
|
282
282
|
return;
|
|
283
|
-
const m = d + (r || l).node.content.size, p = o.tr.replaceWith(d, m, g), a =
|
|
283
|
+
const m = d + (r || l).node.content.size, p = o.tr.replaceWith(d, m, g), a = F.atEnd(g), b = j.create(p.doc, d + a.to + 1);
|
|
284
284
|
return p.setSelection(b), p;
|
|
285
285
|
};
|
|
286
286
|
export {
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { EditorState, Node } from '@progress/kendo-editor-common';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const reUnit: RegExp;
|
|
13
|
+
/**
|
|
14
|
+
* @hidden
|
|
15
|
+
*/
|
|
16
|
+
export declare const getUnit: (value: string) => string;
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
export declare const nodeSize: (node: Node, style: string) => {
|
|
21
|
+
[x: string]: string | number | null;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* @hidden
|
|
25
|
+
*/
|
|
26
|
+
export declare const parseStyle: (styleText: string | null) => {
|
|
27
|
+
[x: string]: string;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
export declare function setNodeStyle(nodeAttrs: any, styleType: string, value: string): any;
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
export declare const selectedCells: (state: EditorState) => Array<{
|
|
37
|
+
node: Node;
|
|
38
|
+
pos: number;
|
|
39
|
+
}>;
|
|
40
|
+
/**
|
|
41
|
+
* @hidden
|
|
42
|
+
*/
|
|
43
|
+
export declare const tableCells: (state: EditorState) => Array<{
|
|
44
|
+
node: Node;
|
|
45
|
+
pos: number;
|
|
46
|
+
}>;
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ComponentClass } from 'react';
|
|
9
|
+
import { EditorState, Transaction } from '@progress/kendo-editor-common';
|
|
10
|
+
import { EditorToolsSettings } from '../config/toolsSettings.js';
|
|
11
|
+
import { ToolProps } from './ToolProps.js';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare const deleteColumnCmd: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
export declare const deleteRowCmd: (state: EditorState, dispatch?: ((tr: Transaction) => void) | undefined) => boolean;
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
export declare namespace TableEditNS {
|
|
24
|
+
/**
|
|
25
|
+
* @hidden
|
|
26
|
+
*/
|
|
27
|
+
interface AddRowBeforeProps extends ToolProps {
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
interface AddRowAfterProps extends ToolProps {
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* @hidden
|
|
36
|
+
*/
|
|
37
|
+
interface AddColumnBeforeProps extends ToolProps {
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* @hidden
|
|
41
|
+
*/
|
|
42
|
+
interface AddColumnAfterProps extends ToolProps {
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* @hidden
|
|
46
|
+
*/
|
|
47
|
+
interface DeleteRowProps extends ToolProps {
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* @hidden
|
|
51
|
+
*/
|
|
52
|
+
interface DeleteColumnProps extends ToolProps {
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* @hidden
|
|
56
|
+
*/
|
|
57
|
+
interface DeleteTableProps extends ToolProps {
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* @hidden
|
|
61
|
+
*/
|
|
62
|
+
interface MergeCellsProps extends ToolProps {
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* @hidden
|
|
66
|
+
*/
|
|
67
|
+
interface SplitCellProps extends ToolProps {
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* @hidden
|
|
71
|
+
*/
|
|
72
|
+
const createAddRowBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps, any>;
|
|
73
|
+
/**
|
|
74
|
+
* @hidden
|
|
75
|
+
*/
|
|
76
|
+
const createAddRowAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
77
|
+
/**
|
|
78
|
+
* @hidden
|
|
79
|
+
*/
|
|
80
|
+
const createAddColumnBeforeTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
81
|
+
/**
|
|
82
|
+
* @hidden
|
|
83
|
+
*/
|
|
84
|
+
const createAddColumnAfterTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
85
|
+
/**
|
|
86
|
+
* @hidden
|
|
87
|
+
*/
|
|
88
|
+
const createDeleteRowTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
89
|
+
/**
|
|
90
|
+
* @hidden
|
|
91
|
+
*/
|
|
92
|
+
const createDeleteColumnTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
93
|
+
/**
|
|
94
|
+
* @hidden
|
|
95
|
+
*/
|
|
96
|
+
const createDeleteTableTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
97
|
+
/**
|
|
98
|
+
* @hidden
|
|
99
|
+
*/
|
|
100
|
+
const createMergeCellsTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
101
|
+
/**
|
|
102
|
+
* @hidden
|
|
103
|
+
*/
|
|
104
|
+
const createSplitCellTool: (settings: EditorToolsSettings.ToolSettings) => ComponentClass<ToolProps>;
|
|
105
|
+
}
|
package/tools/tableEdit.mjs
CHANGED
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
|
-
import { addRowBefore as d, addRowAfter as f, addColumnBefore as C, addColumnAfter as s, deleteTable as m, mergeCells as a, splitCell as w,
|
|
8
|
+
import { addRowBefore as d, addRowAfter as f, addColumnBefore as C, addColumnAfter as s, deleteTable as m, mergeCells as a, splitCell as w, deleteRow as A, selectionCell as c, deleteColumn as p } from "@progress/kendo-editor-common";
|
|
9
9
|
import { createProseMirrorTool as r } from "./proseMirrorTool.mjs";
|
|
10
10
|
const R = (o, e) => {
|
|
11
|
-
const l =
|
|
11
|
+
const l = p(o, e);
|
|
12
12
|
if (l && !e) {
|
|
13
13
|
const t = c(o), n = t && t.node(t.depth);
|
|
14
14
|
if (n && n.content.childCount === 1)
|
|
@@ -16,7 +16,7 @@ const R = (o, e) => {
|
|
|
16
16
|
}
|
|
17
17
|
return l;
|
|
18
18
|
}, T = (o, e) => {
|
|
19
|
-
const l =
|
|
19
|
+
const l = A(o, e);
|
|
20
20
|
if (l && !e) {
|
|
21
21
|
const t = c(o), n = t && t.node(t.depth - 1);
|
|
22
22
|
if (n && n.content.childCount === 1)
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { EditorToolsSettings } from '../config/toolsSettings.js';
|
|
9
|
+
import { ToolProps } from './ToolProps.js';
|
|
10
|
+
import * as React from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* @hidden
|
|
13
|
+
*/
|
|
14
|
+
export declare namespace UnlinkToolNS {
|
|
15
|
+
/**
|
|
16
|
+
* @hidden
|
|
17
|
+
*/
|
|
18
|
+
interface UnlinkProps extends ToolProps {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* @hidden
|
|
22
|
+
*/
|
|
23
|
+
const createUnlinkTool: (settings: EditorToolsSettings.UnlinkSettings) => React.ComponentClass<UnlinkProps, any>;
|
|
24
|
+
}
|
package/tools/utils.d.ts
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Node, ResolvedPos } from '@progress/kendo-editor-common';
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* @hidden
|
|
12
|
+
*/
|
|
13
|
+
declare const onDownPreventDefault: {
|
|
14
|
+
onMouseDown: (e: any) => any;
|
|
15
|
+
onPointerDown: (e: any) => any;
|
|
16
|
+
};
|
|
17
|
+
/**
|
|
18
|
+
* @hidden
|
|
19
|
+
*/
|
|
20
|
+
declare const userSelectNone: React.CSSProperties;
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
declare const formatString: (input: string, ...args: Array<any>) => string;
|
|
25
|
+
/**
|
|
26
|
+
* @hidden
|
|
27
|
+
*/
|
|
28
|
+
declare const itemRender: (li: any, itemProps: any) => any;
|
|
29
|
+
/**
|
|
30
|
+
* @hidden
|
|
31
|
+
*/
|
|
32
|
+
declare const units: string[];
|
|
33
|
+
/**
|
|
34
|
+
* @hidden
|
|
35
|
+
*/
|
|
36
|
+
declare const popupSettings: {
|
|
37
|
+
animate: {
|
|
38
|
+
openDuration: number;
|
|
39
|
+
closeDuration: number;
|
|
40
|
+
};
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* @hidden
|
|
44
|
+
*/
|
|
45
|
+
declare const borderStyles: {
|
|
46
|
+
textKey: string;
|
|
47
|
+
text: any;
|
|
48
|
+
value: string;
|
|
49
|
+
}[];
|
|
50
|
+
/**
|
|
51
|
+
* @hidden
|
|
52
|
+
*/
|
|
53
|
+
declare function parentNode(pos: ResolvedPos, predicate: (node: Node) => boolean): {
|
|
54
|
+
node: Node;
|
|
55
|
+
depth: number;
|
|
56
|
+
} | null;
|
|
57
|
+
export { onDownPreventDefault, formatString, itemRender, units, borderStyles, popupSettings, userSelectNone, parentNode };
|
package/tools/utils.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*-------------------------------------------------------------------------------------------
|
|
7
7
|
*/
|
|
8
8
|
import * as d from "react";
|
|
9
|
-
import {
|
|
9
|
+
import { messages as r, keys as e } from "../messages/index.mjs";
|
|
10
10
|
const a = {
|
|
11
11
|
onMouseDown: (t) => t.preventDefault(),
|
|
12
12
|
onPointerDown: (t) => t.preventDefault()
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { ButtonProps } from '@progress/kendo-react-buttons';
|
|
9
|
+
import { EditorToolsSettings } from '../config/toolsSettings.js';
|
|
10
|
+
import { BasicToolProps, ToolWithDialogRenderProp } from './ToolProps.js';
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
/**
|
|
13
|
+
* @hidden
|
|
14
|
+
*/
|
|
15
|
+
export declare namespace ViewHtmlToolNS {
|
|
16
|
+
/**
|
|
17
|
+
* @hidden
|
|
18
|
+
*/
|
|
19
|
+
interface ViewHtmlProps extends BasicToolProps, ToolWithDialogRenderProp, ButtonProps {
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* @hidden
|
|
23
|
+
*/
|
|
24
|
+
interface ViewHtmlState {
|
|
25
|
+
openedDialog: boolean;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* @hidden
|
|
29
|
+
*/
|
|
30
|
+
const createViewHtmlTool: (settings: EditorToolsSettings.ViewHtmlSettings) => React.ComponentClass<ViewHtmlProps, ViewHtmlState>;
|
|
31
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* @hidden
|
|
10
|
+
*/
|
|
11
|
+
export declare const firefox: boolean;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @license
|
|
3
|
+
*-------------------------------------------------------------------------------------------
|
|
4
|
+
* Copyright © 2026 Progress Software Corporation. All rights reserved.
|
|
5
|
+
* Licensed under commercial license. See LICENSE.md in the package root for more information
|
|
6
|
+
*-------------------------------------------------------------------------------------------
|
|
7
|
+
*/
|
|
8
|
+
import { Transaction, EditorView, Node } from '@progress/kendo-editor-common';
|
|
9
|
+
/**
|
|
10
|
+
* @hidden
|
|
11
|
+
*/
|
|
12
|
+
export declare const updateEditorValue: (view: EditorView, value: Node | string, prevValue: Node | string | undefined, trOnChange: Transaction | null, htmlOnChange: string | null) => void;
|