@progress/kendo-react-editor 14.4.1-develop.9 → 14.5.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/index.d.mts CHANGED
@@ -6,16 +6,16 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { Editor } from './Editor.js';
9
- import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorIFrameInitEvent } from './EditorProps.js';
9
+ import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorIFrameInitEvent } from './EditorProps';
10
10
  import { EditorTools } from './tools/index.js';
11
11
  import { EditorToolsSettings } from './config/toolsSettings.js';
12
12
  import { EditorUtils } from './utils/index.js';
13
13
  import { EditorDialogs } from './dialogs/index.js';
14
14
  import { editorPropsKey } from './utils/props-key.js';
15
- import { nodes, marks } from './config/schema.js';
15
+ import { nodes, marks } from './config/schema';
16
16
  import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, MarkSpec, Schema, NodeType, NodeSpec, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undoDepth, redoDepth, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, rowIsHeader, addRow, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, goToNextCell, deleteTable, getHtml, parseContent } from '@progress/kendo-editor-common';
17
17
  export { type Shortcuts } from './config/shortcuts.js';
18
- export { type PasteCleanupSettings } from './config/pasteSettings.js';
18
+ export { type PasteCleanupSettings } from './config/pasteSettings';
19
19
  /**
20
20
  * An object containing the content of ProseMirror packages used at the Editor component.
21
21
  *
package/index.d.ts CHANGED
@@ -6,16 +6,16 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { Editor } from './Editor.js';
9
- import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorIFrameInitEvent } from './EditorProps.js';
9
+ import { EditorProps, EditorMountEvent, EditorPasteEvent, EditorChangeEvent, EditorExecuteEvent, EditorFocusEvent, EditorBlurEvent, EditorIFrameInitEvent } from './EditorProps';
10
10
  import { EditorTools } from './tools/index.js';
11
11
  import { EditorToolsSettings } from './config/toolsSettings.js';
12
12
  import { EditorUtils } from './utils/index.js';
13
13
  import { EditorDialogs } from './dialogs/index.js';
14
14
  import { editorPropsKey } from './utils/props-key.js';
15
- import { nodes, marks } from './config/schema.js';
15
+ import { nodes, marks } from './config/schema';
16
16
  import { Selection, SelectionRange, TextSelection, NodeSelection, AllSelection, EditorState, Plugin, PluginKey, Transaction, Decoration, DecorationSet, EditorView, Node, ResolvedPos, NodeRange, Fragment, Slice, ReplaceError, Mark, MarkSpec, Schema, NodeType, NodeSpec, MarkType, ContentMatch, DOMParser, DOMSerializer, Transform, Step, StepResult, joinPoint, canJoin, canSplit, insertPoint, dropPoint, liftTarget, findWrapping, StepMap, MapResult, Mapping, AddMarkStep, RemoveMarkStep, ReplaceStep, ReplaceAroundStep, replaceStep, wrapIn, setBlockType, toggleMark, autoJoin, chainCommands, history, undoDepth, redoDepth, InputRule, inputRules, wrappingInputRule, textblockTypeInputRule, keymap, keydownHandler, addListNodes, wrapInList, splitListItem, liftListItem, sinkListItem, dropCursor, gapCursor, tableEditing, fixTables, cellAround, isInTable, selectionCell, moveCellForward, inSameTable, findCell, colCount, nextCell, removeColSpan, addColSpan, columnIsHeader, tableNodes, tableNodeTypes, CellSelection, TableMap, columnResizing, updateColumnsOnResize, selectedRect, addColumn, rowIsHeader, addRow, deleteRow, mergeCells, splitCell, splitCellWithType, setCellAttr, toggleHeader, goToNextCell, deleteTable, getHtml, parseContent } from '@progress/kendo-editor-common';
17
17
  export { type Shortcuts } from './config/shortcuts.js';
18
- export { type PasteCleanupSettings } from './config/pasteSettings.js';
18
+ export { type PasteCleanupSettings } from './config/pasteSettings';
19
19
  /**
20
20
  * An object containing the content of ProseMirror packages used at the Editor component.
21
21
  *
@@ -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=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1776955090,version:"14.4.1-develop.9",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=Object.freeze({name:"@progress/kendo-react-editor",productName:"KendoReact",productCode:"KENDOUIREACT",productCodes:["KENDOUIREACT"],publishDate: 1777910184,version:"14.5.0-develop.1",licensingDocsUrl:"https://www.telerik.com/kendo-react-ui/components/my-license/"});exports.packageMetadata=e;
@@ -7,7 +7,7 @@ export const packageMetadata = Object.freeze({
7
7
  productName: 'KendoReact',
8
8
  productCode: 'KENDOUIREACT',
9
9
  productCodes: ['KENDOUIREACT'],
10
- publishDate: 1776955090,
11
- version: '14.4.1-develop.9',
10
+ publishDate: 1777910184,
11
+ version: '14.5.0-develop.1',
12
12
  licensingDocsUrl: 'https://www.telerik.com/kendo-react-ui/components/my-license/'
13
13
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@progress/kendo-react-editor",
3
- "version": "14.4.1-develop.9",
3
+ "version": "14.5.0-develop.1",
4
4
  "description": "React Editor enables users to create rich text content through a WYSIWYG interface. KendoReact Editor package",
5
5
  "author": "Progress",
6
6
  "license": "SEE LICENSE IN LICENSE.md",
@@ -27,22 +27,22 @@
27
27
  "peerDependencies": {
28
28
  "@progress/kendo-drawing": "^1.21.2",
29
29
  "@progress/kendo-licensing": "^1.7.2",
30
- "@progress/kendo-react-buttons": "14.4.1-develop.9",
31
- "@progress/kendo-react-common": "14.4.1-develop.9",
32
- "@progress/kendo-react-dialogs": "14.4.1-develop.9",
33
- "@progress/kendo-react-dropdowns": "14.4.1-develop.9",
34
- "@progress/kendo-react-form": "14.4.1-develop.9",
35
- "@progress/kendo-react-inputs": "14.4.1-develop.9",
36
- "@progress/kendo-react-intl": "14.4.1-develop.9",
37
- "@progress/kendo-react-layout": "14.4.1-develop.9",
38
- "@progress/kendo-react-pdf": "14.4.1-develop.9",
39
- "@progress/kendo-react-popup": "14.4.1-develop.9",
30
+ "@progress/kendo-react-buttons": "14.5.0-develop.1",
31
+ "@progress/kendo-react-common": "14.5.0-develop.1",
32
+ "@progress/kendo-react-dialogs": "14.5.0-develop.1",
33
+ "@progress/kendo-react-dropdowns": "14.5.0-develop.1",
34
+ "@progress/kendo-react-form": "14.5.0-develop.1",
35
+ "@progress/kendo-react-inputs": "14.5.0-develop.1",
36
+ "@progress/kendo-react-intl": "14.5.0-develop.1",
37
+ "@progress/kendo-react-layout": "14.5.0-develop.1",
38
+ "@progress/kendo-react-pdf": "14.5.0-develop.1",
39
+ "@progress/kendo-react-popup": "14.5.0-develop.1",
40
40
  "@progress/kendo-svg-icons": "^4.0.0",
41
41
  "react": "^18.0.0 || ^19.0.0",
42
42
  "react-dom": "^18.0.0 || ^19.0.0"
43
43
  },
44
44
  "dependencies": {
45
- "@progress/kendo-editor-common": "1.12.4",
45
+ "@progress/kendo-editor-common": "1.12.5",
46
46
  "prop-types": "^15.6.0"
47
47
  },
48
48
  "keywords": [
@@ -63,7 +63,7 @@
63
63
  "package": {
64
64
  "productName": "KendoReact",
65
65
  "productCode": "KENDOUIREACT",
66
- "publishDate": 1776955090,
66
+ "publishDate": 1777910184,
67
67
  "licensingDocsUrl": "https://www.telerik.com/kendo-react-ui/components/my-license/"
68
68
  }
69
69
  },
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { EditorToolsSettings } from '../config/toolsSettings.js';
9
- import { BasicToolProps } from './ToolProps.js';
9
+ import { BasicToolProps } from './ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ToolProps } from './ToolProps.js';
8
+ import { ToolProps } from './ToolProps';
9
9
  import { EditorToolsSettings } from './../config/toolsSettings.js';
10
10
  import * as React from 'react';
11
11
  /**
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { ButtonProps } from '@progress/kendo-react-buttons';
9
- import { BasicToolProps } from './ToolProps.js';
9
+ import { BasicToolProps } from './ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { DropDownListProps } from '@progress/kendo-react-dropdowns';
9
9
  import { EditorToolsSettings } from '../config/toolsSettings.js';
10
- import { BasicToolProps, ToolRenderProp } from './ToolProps.js';
10
+ import { BasicToolProps, ToolRenderProp } from './ToolProps';
11
11
  import * as React from 'react';
12
12
  /**
13
13
  * @hidden
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { DropDownListProps } from '@progress/kendo-react-dropdowns';
9
9
  import { EditorToolsSettings } from '../config/toolsSettings.js';
10
- import { BasicToolProps, ToolRenderProp } from './ToolProps.js';
10
+ import { BasicToolProps, ToolRenderProp } from './ToolProps';
11
11
  import * as React from 'react';
12
12
  /**
13
13
  * @hidden
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { EditorToolsSettings } from '../config/toolsSettings.js';
9
- import { ToolProps } from './ToolProps.js';
9
+ import { ToolProps } from './ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
package/tools/indent.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { EditorToolsSettings } from '../config/toolsSettings.js';
9
- import { ToolProps } from './ToolProps.js';
9
+ import { ToolProps } from './ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
package/tools/index.d.ts CHANGED
@@ -15,7 +15,7 @@ import { IndentToolNS } from './indent.js';
15
15
  import { InlineFormatToolNS } from './inlineFormat.js';
16
16
  import { LinkToolNS } from './insertLink.js';
17
17
  import { ListToolNS } from './lists.js';
18
- import { ToolProps, BasicToolProps, ToolWithDialogRenderProp } from './ToolProps.js';
18
+ import { ToolProps, BasicToolProps, ToolWithDialogRenderProp } from './ToolProps';
19
19
  import { TableEditNS } from './tableEdit.js';
20
20
  import { UnlinkToolNS } from './unlink.js';
21
21
  import { ViewHtmlToolNS } from './viewHtml.js';
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { EditorToolsSettings } from '../config/toolsSettings.js';
9
- import { ToolProps } from './ToolProps.js';
9
+ import { ToolProps } from './ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { ButtonProps } from '@progress/kendo-react-buttons';
9
9
  import { EditorToolsSettings } from '../config/toolsSettings.js';
10
- import { BasicToolProps, ToolWithDialogRenderProp } from './ToolProps.js';
10
+ import { BasicToolProps, ToolWithDialogRenderProp } from './ToolProps';
11
11
  import * as React from 'react';
12
12
  /**
13
13
  * @hidden
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { ButtonProps } from '@progress/kendo-react-buttons';
9
9
  import { EditorToolsSettings } from './../../config/toolsSettings.js';
10
- import { BasicToolProps, ToolWithDialogRenderProp } from './../ToolProps.js';
10
+ import { BasicToolProps, ToolWithDialogRenderProp } from './../ToolProps';
11
11
  import * as React from 'react';
12
12
  /**
13
13
  * @hidden
package/tools/lists.d.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { EditorToolsSettings } from '../config/toolsSettings.js';
9
- import { ToolProps } from './ToolProps.js';
9
+ import { ToolProps } from './ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
package/tools/pdf.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ToolProps } from './ToolProps.js';
8
+ import { ToolProps } from './ToolProps';
9
9
  import { EditorToolsSettings } from './../config/toolsSettings.js';
10
10
  import { PDFExportProps } from '@progress/kendo-react-pdf';
11
11
  import * as React from 'react';
package/tools/print.d.ts CHANGED
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ToolProps } from './ToolProps.js';
8
+ import { ToolProps } from './ToolProps';
9
9
  import { EditorToolsSettings } from './../config/toolsSettings.js';
10
10
  import * as React from 'react';
11
11
  /**
@@ -7,7 +7,7 @@
7
7
  */
8
8
  import { EditorToolsSettings } from '../config/toolsSettings.js';
9
9
  import { EditorState, Transaction } from '@progress/kendo-editor-common';
10
- import { ToolProps } from './ToolProps.js';
10
+ import { ToolProps } from './ToolProps';
11
11
  import * as React from 'react';
12
12
  /**
13
13
  * @hidden
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ToolProps } from './ToolProps.js';
8
+ import { ToolProps } from './ToolProps';
9
9
  import { EditorToolsSettings } from './../config/toolsSettings.js';
10
10
  import * as React from 'react';
11
11
  /**
@@ -6,7 +6,7 @@
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
8
  import { ListItemProps } from '@progress/kendo-react-dropdowns';
9
- import { ToolProps } from '../ToolProps.js';
9
+ import { ToolProps } from '../ToolProps';
10
10
  import * as React from 'react';
11
11
  /**
12
12
  * @hidden
@@ -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 ke=require("react"),x=require("@progress/kendo-react-buttons"),c=require("@progress/kendo-react-inputs"),g=require("@progress/kendo-react-dropdowns"),X=require("@progress/kendo-react-dialogs"),n=require("@progress/kendo-svg-icons"),o=require("../utils.js"),ee=require("@progress/kendo-react-common"),te=require("@progress/kendo-react-intl"),t=require("../../messages/index.js"),le=require("./cellPropsUtils.js");function ye(r){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(l,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}return l.default=r,Object.freeze(l)}const e=ye(ke),be=r=>{const{view:l,...a}=r,[i,p]=e.useState(!1),f=te.useLocalization(),b=!!(l&&o.parentNode(l.state.selection.$from,m=>m.type.spec.tableRole==="table")),k=e.useCallback(()=>{p(!0)},[]),u=e.useCallback(()=>{p(!1),l==null||l.focus()},[l]),y=e.useCallback(m=>{if(l&&m){const d=le.applyCellsData(l.state,m);d.docChanged&&l.dispatch(d)}u()},[l,u]);return e.createElement(e.Fragment,null,e.createElement(x.Button,{type:"button",title:f.toLanguageString(t.keys.cellProperties,t.messages[t.keys.cellProperties]),icon:"table-cell-properties",svgIcon:n.tableCellPropertiesIcon,onClick:k,disabled:!b,...o.onDownPreventDefault,...a}),i&&l&&e.createElement(ve,{view:l,onCancel:u,onSave:y}))},Y=[{textKey:t.keys.cellPropertiesLeftTop,text:t.messages[t.keys.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:n.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:t.keys.cellPropertiesCenterTop,text:t.messages[t.keys.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:n.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:t.keys.cellPropertiesRightTop,text:t.messages[t.keys.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:n.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:t.keys.cellPropertiesLeftMiddle,text:t.messages[t.keys.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:n.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:t.keys.cellPropertiesCenterMiddle,text:t.messages[t.keys.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:n.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:t.keys.cellPropertiesRightMiddle,text:t.messages[t.keys.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:n.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:t.keys.cellPropertiesLeftBottom,text:t.messages[t.keys.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:n.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:t.keys.cellPropertiesCenterBottom,text:t.messages[t.keys.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:n.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:t.keys.cellPropertiesRightBottom,text:t.messages[t.keys.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:n.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:t.keys.cellPropertiesNoAlignment,text:t.messages[t.keys.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:n.tableAlignRemoveIcon,value:{x:"",y:""}}],Z=[{textKey:t.keys.cellPropertiesWrap,text:t.messages[t.keys.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:n.textWrapIcon},{textKey:t.keys.cellPropertiesFitToCell,text:t.messages[t.keys.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:n.parameterStringIcon}],P=(r,l)=>l?e.createElement(e.Fragment,null,e.createElement(c.InputPrefix,null,e.createElement(ee.IconWrap,{icon:l.svgIcon,name:l.icon})),r):r,E=(r,l)=>{const a=e.createElement(e.Fragment,null,e.createElement(c.InputPrefix,null,e.createElement(ee.IconWrap,{icon:l.dataItem.svgIcon,name:l.dataItem.icon})),r.props.children);return e.cloneElement(r,r.props,a)},ve=r=>{const l=e.useMemo(()=>le.cellsDefaultData(r.view.state),[r.view]),a=te.useLocalization(),i=e.useRef(null),p=l.applyToAll,f=e.useRef(null),b=l.cellWidth,k=e.useRef(null);l.widthUnit&&!o.units.includes(l.widthUnit)&&o.units.push(l.widthUnit);const u=l.widthUnit||"",y=e.useRef(null),m=l.cellHeight,d=e.useRef(null);l.heightUnit&&!o.units.includes(l.heightUnit)&&o.units.push(l.heightUnit);const ae=l.heightUnit||"",C=e.useRef(null),re=Y.find(s=>s.value.x!==void 0&&l.alignment&&s.value.x===l.alignment.x&&s.value.y===l.alignment.y)||null,N=e.useRef(null),se=Z.find(s=>s.value===l.textControl),S=e.useRef(null),oe=l.backgroundColor,v=e.useRef(null),ne=l.cellPadding,h=e.useRef(null),ce=l.borderWidth,I=e.useRef(null),ie=l.borderColor,w=e.useRef(null),me=o.borderStyles.find(s=>s.value===l.borderStyle),R=e.useRef(null),ue=l.id,L=e.useRef(null),de=l.className,ge=e.useCallback(()=>{var D,T,A,B,W,K,U,V,M,q,z,F,H,O,j,_,$,G,J,Q;const s={applyToAll:!!((T=(D=i.current)==null?void 0:D.element)!=null&&T.checked),cellWidth:((A=f.current)==null?void 0:A.value)||null,widthUnit:((B=k.current)==null?void 0:B.value)||"",cellHeight:((W=y.current)==null?void 0:W.value)||null,heightUnit:((K=d.current)==null?void 0:K.value)||"",alignment:(V=(U=C.current)==null?void 0:U.value)==null?void 0:V.value,textControl:(q=(M=N.current)==null?void 0:M.value)==null?void 0:q.value,backgroundColor:(z=S.current)==null?void 0:z.value,cellPadding:typeof((F=v.current)==null?void 0:F.value)=="number"?(H=v.current)==null?void 0:H.value:null,borderWidth:typeof((O=h.current)==null?void 0:O.value)=="number"?(j=h.current)==null?void 0:j.value:null,borderColor:(_=I.current)==null?void 0:_.value,borderStyle:((G=($=w.current)==null?void 0:$.value)==null?void 0:G.value)||null,id:String(((J=R.current)==null?void 0:J.value)||""),className:String(((Q=L.current)==null?void 0:Q.value)||"")};r.onSave.call(void 0,s)},[r.onSave]),pe=e.createElement("div",{className:"k-form k-form-md"},e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("div",{className:"k-form-field-wrap"},e.createElement("span",{className:"k-checkbox-wrap"},e.createElement(c.Checkbox,{ref:i,defaultChecked:p})),e.createElement("label",{className:"k-checkbox-label"},a.toLanguageString(t.keys.cellPropertiesApplyToAllCells,t.messages[t.keys.cellPropertiesApplyToAllCells])))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesWidth,t.messages[t.keys.cellPropertiesWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:f,defaultValue:b,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}),e.createElement("div",{className:"k-form-hint"},a.toLanguageString(t.keys.cellPropertiesApplyToColumn,t.messages[t.keys.cellPropertiesApplyToColumn])))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.AutoComplete,{ref:k,defaultValue:u,data:o.units,popupSettings:o.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesHeight,t.messages[t.keys.cellPropertiesHeight])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:y,defaultValue:m,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}),e.createElement("div",{className:"k-form-hint"},a.toLanguageString(t.keys.cellPropertiesApplyToRow,t.messages[t.keys.cellPropertiesApplyToRow])))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.AutoComplete,{ref:d,defaultValue:ae,data:o.units,popupSettings:o.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesAlignment,t.messages[t.keys.cellPropertiesAlignment])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.DropDownList,{ref:C,defaultValue:re,data:Y.map(s=>({...s,text:a.toLanguageString(s.textKey,s.text)})),textField:"text",dataItemKey:"text",popupSettings:o.popupSettings,valueRender:P,itemRender:E}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesTextControl,t.messages[t.keys.cellPropertiesTextControl])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.DropDownList,{ref:N,defaultValue:se,data:Z.map(s=>({...s,text:a.toLanguageString(s.textKey,s.text)})),textField:"text",dataItemKey:"value",popupSettings:o.popupSettings,valueRender:P,itemRender:E}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesCellPadding,t.messages[t.keys.cellPropertiesCellPadding])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:v,defaultValue:ne,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBackground,t.messages[t.keys.cellPropertiesBackground])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.ColorPicker,{ref:S,defaultValue:oe}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBorderWidth,t.messages[t.keys.cellPropertiesBorderWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:h,defaultValue:ce,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBorderColor,t.messages[t.keys.cellPropertiesBorderColor])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.ColorPicker,{ref:I,defaultValue:ie}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBorderStyle,t.messages[t.keys.cellPropertiesBorderStyle])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.DropDownList,{ref:w,defaultValue:me,popupSettings:o.popupSettings,data:o.borderStyles,textField:"text",dataItemKey:"value"}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesId,t.messages[t.keys.cellPropertiesId])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.TextBox,{ref:R,defaultValue:ue}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesCssClass,t.messages[t.keys.cellPropertiesCssClass])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.TextBox,{ref:L,defaultValue:de})))))),fe=[e.createElement(x.Button,{themeColor:"primary",key:"save",onClick:ge},a.toLanguageString(t.keys.cellPropertiesSave,t.messages[t.keys.cellPropertiesSave])),e.createElement(x.Button,{onClick:r.onCancel,key:"cancel"},a.toLanguageString(t.keys.cellPropertiesCancel,t.messages[t.keys.cellPropertiesCancel]))];return e.createElement(X.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(t.keys.cellProperties,t.messages[t.keys.cellProperties]),onClose:r.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},pe,e.createElement(X.WindowActionsBar,{layout:"start"},...fe))};exports.TableCellProperties=be;exports.itemRenderWithIcon=E;exports.valueRenderWithIcon=P;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const ke=require("react"),x=require("@progress/kendo-react-buttons"),c=require("@progress/kendo-react-inputs"),g=require("@progress/kendo-react-dropdowns"),X=require("@progress/kendo-react-dialogs"),o=require("@progress/kendo-svg-icons"),n=require("../utils.js"),ee=require("@progress/kendo-react-common"),te=require("@progress/kendo-react-intl"),t=require("../../messages/index.js"),le=require("./cellPropsUtils.js");function ye(r){const l=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const i=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(l,a,i.get?i:{enumerable:!0,get:()=>r[a]})}}return l.default=r,Object.freeze(l)}const e=ye(ke),be=r=>{const{view:l,...a}=r,[i,p]=e.useState(!1),f=te.useLocalization(),b=!!(l&&n.parentNode(l.state.selection.$from,m=>m.type.spec.tableRole==="table")),k=e.useCallback(()=>{p(!0)},[]),u=e.useCallback(()=>{p(!1),l==null||l.focus()},[l]),y=e.useCallback(m=>{if(l&&m){const d=le.applyCellsData(l.state,m);d.docChanged&&l.dispatch(d)}u()},[l,u]);return e.createElement(e.Fragment,null,e.createElement(x.Button,{type:"button",title:f.toLanguageString(t.keys.cellProperties,t.messages[t.keys.cellProperties]),icon:"table-cell-properties",svgIcon:o.tableCellPropertiesIcon,onClick:k,disabled:!b,...n.onDownPreventDefault,...a}),i&&l&&e.createElement(ve,{view:l,onCancel:u,onSave:y}))},Y=[{textKey:t.keys.cellPropertiesLeftTop,text:t.messages[t.keys.cellPropertiesLeftTop],icon:"table-align-top-left",svgIcon:o.tableAlignTopLeftIcon,value:{x:"left",y:"top"}},{textKey:t.keys.cellPropertiesCenterTop,text:t.messages[t.keys.cellPropertiesCenterTop],icon:"table-align-top-center",svgIcon:o.tableAlignTopCenterIcon,value:{x:"center",y:"top"}},{textKey:t.keys.cellPropertiesRightTop,text:t.messages[t.keys.cellPropertiesRightTop],icon:"table-align-top-right",svgIcon:o.tableAlignTopRightIcon,value:{x:"right",y:"top"}},{textKey:t.keys.cellPropertiesLeftMiddle,text:t.messages[t.keys.cellPropertiesLeftMiddle],icon:"table-align-middle-left",svgIcon:o.tableAlignMiddleLeftIcon,value:{x:"left",y:"middle"}},{textKey:t.keys.cellPropertiesCenterMiddle,text:t.messages[t.keys.cellPropertiesCenterMiddle],icon:"table-align-middle-center",svgIcon:o.tableAlignMiddleCenterIcon,value:{x:"center",y:"middle"}},{textKey:t.keys.cellPropertiesRightMiddle,text:t.messages[t.keys.cellPropertiesRightMiddle],icon:"table-align-middle-right",svgIcon:o.tableAlignMiddleRightIcon,value:{x:"right",y:"middle"}},{textKey:t.keys.cellPropertiesLeftBottom,text:t.messages[t.keys.cellPropertiesLeftBottom],icon:"table-align-bottom-left",svgIcon:o.tableAlignBottomLeftIcon,value:{x:"left",y:"bottom"}},{textKey:t.keys.cellPropertiesCenterBottom,text:t.messages[t.keys.cellPropertiesCenterBottom],icon:"table-align-bottom-center",svgIcon:o.tableAlignBottomCenterIcon,value:{x:"center",y:"bottom"}},{textKey:t.keys.cellPropertiesRightBottom,text:t.messages[t.keys.cellPropertiesRightBottom],icon:"table-align-bottom-right",svgIcon:o.tableAlignBottomRightIcon,value:{x:"right",y:"bottom"}},{textKey:t.keys.cellPropertiesNoAlignment,text:t.messages[t.keys.cellPropertiesNoAlignment],icon:"align-remove",svgIcon:o.tableAlignRemoveIcon,value:{x:"",y:""}}],Z=[{textKey:t.keys.cellPropertiesWrap,text:t.messages[t.keys.cellPropertiesWrap],value:"",icon:"text-wrap",svgIcon:o.textWrapIcon},{textKey:t.keys.cellPropertiesFitToCell,text:t.messages[t.keys.cellPropertiesFitToCell],value:"nowrap",icon:"parameter-string",svgIcon:o.parameterStringIcon}],P=(r,l)=>l?e.createElement(e.Fragment,null,e.createElement(c.InputPrefix,null,e.createElement(ee.IconWrap,{icon:l.svgIcon,name:l.icon})),r):r,E=(r,l)=>{const a=e.createElement(e.Fragment,null,e.createElement(c.InputPrefix,null,e.createElement(ee.IconWrap,{icon:l.dataItem.svgIcon,name:l.dataItem.icon})),r.props.children);return e.cloneElement(r,r.props,a)},ve=r=>{const l=e.useMemo(()=>le.cellsDefaultData(r.view.state),[r.view]),a=te.useLocalization(),i=e.useRef(null),p=l.applyToAll,f=e.useRef(null),b=l.cellWidth,k=e.useRef(null);l.widthUnit&&!n.units.includes(l.widthUnit)&&n.units.push(l.widthUnit);const u=l.widthUnit||"",y=e.useRef(null),m=l.cellHeight,d=e.useRef(null);l.heightUnit&&!n.units.includes(l.heightUnit)&&n.units.push(l.heightUnit);const ae=l.heightUnit||"",C=e.useRef(null),re=Y.find(s=>s.value.x!==void 0&&l.alignment&&s.value.x===l.alignment.x&&s.value.y===l.alignment.y)||null,N=e.useRef(null),se=Z.find(s=>s.value===l.textControl),S=e.useRef(null),ne=l.backgroundColor,v=e.useRef(null),oe=l.cellPadding,h=e.useRef(null),ce=l.borderWidth,I=e.useRef(null),ie=l.borderColor,w=e.useRef(null),me=n.borderStyles.find(s=>s.value===l.borderStyle),R=e.useRef(null),ue=l.id,L=e.useRef(null),de=l.className,ge=e.useCallback(()=>{var D,T,A,B,W,K,U,V,M,q,z,F,H,O,j,_,$,G,J,Q;const s={applyToAll:!!((T=(D=i.current)==null?void 0:D.element)!=null&&T.checked),cellWidth:((A=f.current)==null?void 0:A.value)||null,widthUnit:((B=k.current)==null?void 0:B.value)||"",cellHeight:((W=y.current)==null?void 0:W.value)||null,heightUnit:((K=d.current)==null?void 0:K.value)||"",alignment:(V=(U=C.current)==null?void 0:U.value)==null?void 0:V.value,textControl:(q=(M=N.current)==null?void 0:M.value)==null?void 0:q.value,backgroundColor:(z=S.current)==null?void 0:z.value,cellPadding:typeof((F=v.current)==null?void 0:F.value)=="number"?(H=v.current)==null?void 0:H.value:null,borderWidth:typeof((O=h.current)==null?void 0:O.value)=="number"?(j=h.current)==null?void 0:j.value:null,borderColor:(_=I.current)==null?void 0:_.value,borderStyle:((G=($=w.current)==null?void 0:$.value)==null?void 0:G.value)||null,id:String(((J=R.current)==null?void 0:J.value)||""),className:String(((Q=L.current)==null?void 0:Q.value)||"")};r.onSave.call(void 0,s)},[r.onSave]),pe=e.createElement("div",{className:"k-form k-form-md"},e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("div",{className:"k-form-field-wrap"},e.createElement("span",{className:"k-checkbox-wrap"},e.createElement(c.Checkbox,{ref:i,defaultChecked:p})),e.createElement("label",{className:"k-checkbox-label"},a.toLanguageString(t.keys.cellPropertiesApplyToAllCells,t.messages[t.keys.cellPropertiesApplyToAllCells])))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesWidth,t.messages[t.keys.cellPropertiesWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:f,defaultValue:b,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}),e.createElement("div",{className:"k-form-hint"},a.toLanguageString(t.keys.cellPropertiesApplyToColumn,t.messages[t.keys.cellPropertiesApplyToColumn])))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.AutoComplete,{ref:k,defaultValue:u,data:n.units,popupSettings:n.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesHeight,t.messages[t.keys.cellPropertiesHeight])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:y,defaultValue:m,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}),e.createElement("div",{className:"k-form-hint"},a.toLanguageString(t.keys.cellPropertiesApplyToRow,t.messages[t.keys.cellPropertiesApplyToRow])))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.AutoComplete,{ref:d,defaultValue:ae,data:n.units,popupSettings:n.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesAlignment,t.messages[t.keys.cellPropertiesAlignment])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.DropDownList,{ref:C,defaultValue:re,data:Y.map(s=>({...s,text:a.toLanguageString(s.textKey,s.text)})),textField:"text",dataItemKey:"text",popupSettings:n.popupSettings,valueRender:P,itemRender:E}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesTextControl,t.messages[t.keys.cellPropertiesTextControl])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.DropDownList,{ref:N,defaultValue:se,data:Z.map(s=>({...s,text:a.toLanguageString(s.textKey,s.text)})),textField:"text",dataItemKey:"value",popupSettings:n.popupSettings,valueRender:P,itemRender:E}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesCellPadding,t.messages[t.keys.cellPropertiesCellPadding])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:v,defaultValue:oe,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBackground,t.messages[t.keys.cellPropertiesBackground])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.ColorPicker,{ref:S,defaultValue:ne}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBorderWidth,t.messages[t.keys.cellPropertiesBorderWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.NumericTextBox,{ref:h,defaultValue:ce,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBorderColor,t.messages[t.keys.cellPropertiesBorderColor])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.ColorPicker,{ref:I,defaultValue:ie}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesBorderStyle,t.messages[t.keys.cellPropertiesBorderStyle])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(g.DropDownList,{ref:w,defaultValue:me,popupSettings:n.popupSettings,data:n.borderStyles,textField:"text",dataItemKey:"value"}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesId,t.messages[t.keys.cellPropertiesId])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.TextBox,{ref:R,defaultValue:ue}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.cellPropertiesCssClass,t.messages[t.keys.cellPropertiesCssClass])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(c.TextBox,{ref:L,defaultValue:de})))))),fe=[e.createElement(x.Button,{onClick:r.onCancel,key:"cancel"},a.toLanguageString(t.keys.cellPropertiesCancel,t.messages[t.keys.cellPropertiesCancel])),e.createElement(x.Button,{themeColor:"primary",key:"save",onClick:ge},a.toLanguageString(t.keys.cellPropertiesSave,t.messages[t.keys.cellPropertiesSave]))];return e.createElement(X.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(t.keys.cellProperties,t.messages[t.keys.cellProperties]),onClose:r.onCancel,key:"dialog",style:{userSelect:"none"},width:408,height:587,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},pe,e.createElement(X.WindowActionsBar,{layout:"end"},...fe))};exports.TableCellProperties=be;exports.itemRenderWithIcon=E;exports.valueRenderWithIcon=P;
@@ -268,8 +268,8 @@ const Ye = (n) => {
268
268
  l.cellPropertiesCssClass,
269
269
  a[l.cellPropertiesCssClass]
270
270
  )), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(Y, { ref: R, defaultValue: be })))))), he = [
271
- /* @__PURE__ */ e.createElement(x, { themeColor: "primary", key: "save", onClick: ke }, r.toLanguageString(l.cellPropertiesSave, a[l.cellPropertiesSave])),
272
- /* @__PURE__ */ e.createElement(x, { onClick: n.onCancel, key: "cancel" }, r.toLanguageString(l.cellPropertiesCancel, a[l.cellPropertiesCancel]))
271
+ /* @__PURE__ */ e.createElement(x, { onClick: n.onCancel, key: "cancel" }, r.toLanguageString(l.cellPropertiesCancel, a[l.cellPropertiesCancel])),
272
+ /* @__PURE__ */ e.createElement(x, { themeColor: "primary", key: "save", onClick: ke }, r.toLanguageString(l.cellPropertiesSave, a[l.cellPropertiesSave]))
273
273
  ];
274
274
  return /* @__PURE__ */ e.createElement(
275
275
  Pe,
@@ -287,7 +287,7 @@ const Ye = (n) => {
287
287
  resizable: !1
288
288
  },
289
289
  ve,
290
- /* @__PURE__ */ e.createElement(xe, { layout: "start" }, ...he)
290
+ /* @__PURE__ */ e.createElement(xe, { layout: "end" }, ...he)
291
291
  );
292
292
  };
293
293
  export {
@@ -5,7 +5,7 @@
5
5
  * Licensed under commercial license. See LICENSE.md in the package root for more information
6
6
  *-------------------------------------------------------------------------------------------
7
7
  */
8
- import { ToolProps } from './../ToolProps.js';
8
+ import { ToolProps } from './../ToolProps';
9
9
  import * as React from 'react';
10
10
  /**
11
11
  * @hidden
@@ -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 be=require("react"),A=require("@progress/kendo-react-buttons"),n=require("@progress/kendo-react-inputs"),m=require("@progress/kendo-react-dropdowns"),oe=require("@progress/kendo-react-dialogs"),L=require("@progress/kendo-react-layout"),i=require("@progress/kendo-svg-icons"),o=require("../utils.js"),u=require("./tableCellProperties.js"),ue=require("@progress/kendo-react-intl"),t=require("../../messages/index.js"),E=require("./tablePropsUtils.js");function ve(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const g=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(s,a,g.get?g:{enumerable:!0,get:()=>r[a]})}}return s.default=r,Object.freeze(s)}const e=ve(be),ye=r=>{const{view:s,...a}=r,g=ue.useLocalization(),[P,f]=e.useState(!1),b=!!(s&&o.parentNode(s.state.selection.$from,c=>c.type.spec.tableRole==="table")),v=e.useCallback(()=>{f(!0)},[]),d=e.useCallback(()=>{f(!1),s==null||s.focus()},[s]),k=e.useCallback(c=>{if(s&&c){const p=E.applyTableData(s.state,c);p&&s.dispatch(p)}d()},[s,d]);return e.createElement(e.Fragment,null,e.createElement(A.Button,{type:"button",title:g.toLanguageString(t.keys.tableProperties,t.messages[t.keys.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:v,disabled:!b,...o.onDownPreventDefault,...a}),P&&e.createElement(Ee,{onClose:d,onSave:k,view:s}))},y=[{textKey:t.keys.tablePropertiesAlignLeft,text:t.messages[t.keys.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:t.keys.tablePropertiesAlignCenter,text:t.messages[t.keys.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:t.keys.tablePropertiesAlignRight,text:t.messages[t.keys.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:t.keys.tablePropertiesNoAlignment,text:t.messages[t.keys.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],ie=[{textKey:t.keys.tablePropertiesLeft,text:t.messages[t.keys.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:t.keys.tablePropertiesCenter,text:t.messages[t.keys.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:t.keys.tablePropertiesRight,text:t.messages[t.keys.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map(r=>({...r,style:E.tablePositionStyles[r.value]})),ce=[{textKey:t.keys.tablePropertiesTop,text:t.messages[t.keys.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:t.keys.tablePropertiesBottom,text:t.messages[t.keys.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],me=[{textKey:t.keys.tablePropertiesNone,text:t.messages[t.keys.tablePropertiesNone],value:"none"},{textKey:t.keys.tablePropertiesUsingScopeAttribute,text:t.messages[t.keys.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:t.keys.tablePropertiesUsingIdAttributes,text:t.messages[t.keys.tablePropertiesUsingIdAttributes],value:"id"}],Ee=r=>{const s=e.useMemo(()=>{const l=r.view&&r.view.state;return l?E.tableDefaultData(l):E.initialTableData},[r.view]),a=ue.useLocalization(),[g,P]=e.useState(0),f=e.useCallback(l=>{P(l.selected)},[]),b=e.useRef(null),v=e.useRef(null),d=e.useRef(null),k=e.useRef(null),c=e.useRef(null),p=e.useRef(null),N=e.useRef(null),I=e.useRef(null),B=e.useRef(null),T=e.useRef(null),S=e.useRef(null),x=e.useRef(null),D=e.useRef(null),K=e.useRef(null),V=e.useRef(null),W=e.useRef(null),z=e.useRef(null),q=e.useRef(null),H=e.useRef(null),U=e.useRef(null),h=e.useRef(null),w=e.useRef(null),R=e.useRef(null),de=e.useCallback(()=>{var C,F,M,O,j,_,G,$,J,Q,X,Y,Z,ee,te,ae,le,se,re,ne;const l={rows:((C=b.current)==null?void 0:C.value)||0,columns:((F=v.current)==null?void 0:F.value)||0,width:d.current?d.current.value:null,height:k.current?k.current.value:null,cellSpacing:c.current?c.current.value:null,cellPadding:p.current?p.current.value:null,borderWidth:N.current?N.current.value:null,widthUnit:((M=I.current)==null?void 0:M.value)||"",heightUnit:((O=B.current)==null?void 0:O.value)||"",position:((_=(j=T.current)==null?void 0:j.value)==null?void 0:_.value)||null,textAlign:(G=S.current)!=null&&G.value?S.current.value.value:null,borderStyle:($=x.current)!=null&&$.value?x.current.value.value:null,backgroundColor:(J=D.current)==null?void 0:J.value,borderColor:(Q=K.current)==null?void 0:Q.value,collapseBorders:!!((Y=(X=V.current)==null?void 0:X.element)!=null&&Y.checked),id:String(((Z=W.current)==null?void 0:Z.value)||""),className:String(((ee=z.current)==null?void 0:ee.value)||""),caption:String(((te=q.current)==null?void 0:te.value)||""),headerRows:((ae=H.current)==null?void 0:ae.value)||0,headerColumns:((le=U.current)==null?void 0:le.value)||0,captionAlignment:(se=h.current)!=null&&se.value?h.current.value.value:null,captionPosition:(re=w.current)!=null&&re.value?w.current.value.value:null,associateHeaders:(ne=R.current)!=null&&ne.value?R.current.value.value:"none"};r.onSave.call(void 0,l)},[r.onSave]),ge=e.createElement("div",{className:"k-form k-form-md"},e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesRows,t.messages[t.keys.tablePropertiesRows])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:b,defaultValue:s.rows,min:1}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesColumns,t.messages[t.keys.tablePropertiesColumns])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:v,defaultValue:s.columns,min:1}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesWidth,t.messages[t.keys.tablePropertiesWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:d,defaultValue:s.width,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.AutoComplete,{ref:I,defaultValue:s.widthUnit,data:o.units,popupSettings:o.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesHeight,t.messages[t.keys.tablePropertiesHeight])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:k,defaultValue:s.height,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.AutoComplete,{ref:B,defaultValue:s.heightUnit,data:o.units.filter(l=>l!=="%"),popupSettings:o.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesPosition,t.messages[t.keys.tablePropertiesPosition])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:T,defaultValue:ie.find(l=>l.value===s.position),popupSettings:o.popupSettings,data:ie.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),textField:"text",dataItemKey:"value",valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesAlignment,t.messages[t.keys.tablePropertiesAlignment])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:S,defaultValue:y.find(l=>l.value===s.textAlign),data:y.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),textField:"text",dataItemKey:"value",popupSettings:o.popupSettings,valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCellSpacing,t.messages[t.keys.tablePropertiesCellSpacing])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:c,defaultValue:s.cellSpacing,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto]),min:0}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCellPadding,t.messages[t.keys.tablePropertiesCellPadding])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:p,defaultValue:s.cellPadding,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto]),min:0}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesTableBackground,t.messages[t.keys.tablePropertiesTableBackground])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.ColorPicker,{ref:D,defaultValue:s.backgroundColor}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesBorderWidth,t.messages[t.keys.tablePropertiesBorderWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:N,defaultValue:s.borderWidth,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesBorderColor,t.messages[t.keys.tablePropertiesBorderColor])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.ColorPicker,{ref:K,defaultValue:s.borderColor}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesBorderStyle,t.messages[t.keys.tablePropertiesBorderStyle])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:x,defaultValue:o.borderStyles.find(l=>l.value===s.borderStyle),popupSettings:o.popupSettings,data:o.borderStyles.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),textField:"text",dataItemKey:"value"}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.Checkbox,{ref:V,className:"k-checkbox-wrap",label:a.toLanguageString(t.keys.tablePropertiesCollapseBorders,t.messages[t.keys.tablePropertiesCollapseBorders]),defaultChecked:s.collapseBorders})))))),pe=e.createElement("div",{className:"k-form k-form-md"},e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("div",{className:"k-form-layout k-d-grid"},e.createElement("div",{className:"k-form-field"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesId,t.messages[t.keys.tablePropertiesId])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.TextBox,{ref:W,defaultValue:s.id}))),e.createElement("div",{className:"k-form-field"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCssClass,t.messages[t.keys.tablePropertiesCssClass])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.TextBox,{ref:z,defaultValue:s.className}))),e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("legend",{className:"k-form-legend"},a.toLanguageString(t.keys.tablePropertiesAccessibility,t.messages[t.keys.tablePropertiesAccessibility])),e.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCaption,t.messages[t.keys.tablePropertiesCaption])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.TextBox,{ref:q,defaultValue:s.caption}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCaptionPosition,t.messages[t.keys.tablePropertiesCaptionPosition])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:w,defaultValue:ce.find(l=>l.value===s.captionPosition),data:ce.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),popupSettings:o.popupSettings,textField:"text",dataItemKey:"value",valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCaptionAlignment,t.messages[t.keys.tablePropertiesCaptionAlignment])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:h,defaultValue:y.find(l=>l.value===s.captionAlignment),data:y.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),popupSettings:o.popupSettings,textField:"text",dataItemKey:"value",valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesHeaderRows,t.messages[t.keys.tablePropertiesHeaderRows])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:H,defaultValue:s.headerRows,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesHeaderCols,t.messages[t.keys.tablePropertiesHeaderCols])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:U,defaultValue:s.headerColumns,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesAssociateHeaders,t.messages[t.keys.tablePropertiesAssociateHeaders])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:R,defaultValue:me.find(l=>l.value===s.associateHeaders),data:me.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),popupSettings:o.popupSettings,textField:"text",dataItemKey:"value"})))))))),ke=e.createElement(L.TabStrip,{selected:g,onSelect:f,animation:!1,keepTabsMounted:!0},e.createElement(L.TabStripTab,{title:a.toLanguageString(t.keys.tablePropertiesGeneral,t.messages[t.keys.tablePropertiesGeneral])},ge),e.createElement(L.TabStripTab,{title:a.toLanguageString(t.keys.tablePropertiesAdvanced,t.messages[t.keys.tablePropertiesAdvanced])},pe)),fe=[e.createElement(A.Button,{themeColor:"primary",key:"save",onClick:de},a.toLanguageString(t.keys.tablePropertiesSave,t.messages[t.keys.tablePropertiesSave])),e.createElement(A.Button,{onClick:r.onClose,key:"cancel"},a.toLanguageString(t.keys.tablePropertiesCancel,t.messages[t.keys.tablePropertiesCancel]))];return e.createElement(oe.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(t.keys.tableProperties,t.messages[t.keys.tableProperties]),onClose:r.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},ke,e.createElement(oe.WindowActionsBar,{layout:"start"},...fe))};exports.TableProperties=ye;
8
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const be=require("react"),A=require("@progress/kendo-react-buttons"),n=require("@progress/kendo-react-inputs"),m=require("@progress/kendo-react-dropdowns"),oe=require("@progress/kendo-react-dialogs"),L=require("@progress/kendo-react-layout"),i=require("@progress/kendo-svg-icons"),o=require("../utils.js"),u=require("./tableCellProperties.js"),ue=require("@progress/kendo-react-intl"),t=require("../../messages/index.js"),E=require("./tablePropsUtils.js");function ve(r){const s=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(r){for(const a in r)if(a!=="default"){const g=Object.getOwnPropertyDescriptor(r,a);Object.defineProperty(s,a,g.get?g:{enumerable:!0,get:()=>r[a]})}}return s.default=r,Object.freeze(s)}const e=ve(be),ye=r=>{const{view:s,...a}=r,g=ue.useLocalization(),[P,f]=e.useState(!1),b=!!(s&&o.parentNode(s.state.selection.$from,c=>c.type.spec.tableRole==="table")),v=e.useCallback(()=>{f(!0)},[]),d=e.useCallback(()=>{f(!1),s==null||s.focus()},[s]),k=e.useCallback(c=>{if(s&&c){const p=E.applyTableData(s.state,c);p&&s.dispatch(p)}d()},[s,d]);return e.createElement(e.Fragment,null,e.createElement(A.Button,{type:"button",title:g.toLanguageString(t.keys.tableProperties,t.messages[t.keys.tableProperties]),icon:"table-properties",svgIcon:i.tablePropertiesIcon,onClick:v,disabled:!b,...o.onDownPreventDefault,...a}),P&&e.createElement(Ee,{onClose:d,onSave:k,view:s}))},y=[{textKey:t.keys.tablePropertiesAlignLeft,text:t.messages[t.keys.tablePropertiesAlignLeft],value:"left",icon:"table-align-middle-left",svgIcon:i.tableAlignMiddleLeftIcon},{textKey:t.keys.tablePropertiesAlignCenter,text:t.messages[t.keys.tablePropertiesAlignCenter],value:"center",icon:"table-align-middle-center",svgIcon:i.tableAlignMiddleCenterIcon},{textKey:t.keys.tablePropertiesAlignRight,text:t.messages[t.keys.tablePropertiesAlignRight],value:"right",icon:"table-align-middle-right",svgIcon:i.tableAlignMiddleRightIcon},{textKey:t.keys.tablePropertiesNoAlignment,text:t.messages[t.keys.tablePropertiesNoAlignment],value:"",icon:"align-remove",svgIcon:i.tableAlignRemoveIcon}],ie=[{textKey:t.keys.tablePropertiesLeft,text:t.messages[t.keys.tablePropertiesLeft],value:"left",style:{},icon:"table-position-left",svgIcon:i.tablePositionStartIcon},{textKey:t.keys.tablePropertiesCenter,text:t.messages[t.keys.tablePropertiesCenter],value:"center",style:{},icon:"table-position-center",svgIcon:i.tablePositionCenterIcon},{textKey:t.keys.tablePropertiesRight,text:t.messages[t.keys.tablePropertiesRight],value:"right",style:{},icon:"table-position-right",svgIcon:i.tablePositionEndIcon}].map(r=>({...r,style:E.tablePositionStyles[r.value]})),ce=[{textKey:t.keys.tablePropertiesTop,text:t.messages[t.keys.tablePropertiesTop],value:"top",icon:"position-top",svgIcon:i.positionTopIcon},{textKey:t.keys.tablePropertiesBottom,text:t.messages[t.keys.tablePropertiesBottom],value:"bottom",icon:"position-bottom",svgIcon:i.positionBottomIcon}],me=[{textKey:t.keys.tablePropertiesNone,text:t.messages[t.keys.tablePropertiesNone],value:"none"},{textKey:t.keys.tablePropertiesUsingScopeAttribute,text:t.messages[t.keys.tablePropertiesUsingScopeAttribute],value:"scope"},{textKey:t.keys.tablePropertiesUsingIdAttributes,text:t.messages[t.keys.tablePropertiesUsingIdAttributes],value:"id"}],Ee=r=>{const s=e.useMemo(()=>{const l=r.view&&r.view.state;return l?E.tableDefaultData(l):E.initialTableData},[r.view]),a=ue.useLocalization(),[g,P]=e.useState(0),f=e.useCallback(l=>{P(l.selected)},[]),b=e.useRef(null),v=e.useRef(null),d=e.useRef(null),k=e.useRef(null),c=e.useRef(null),p=e.useRef(null),N=e.useRef(null),I=e.useRef(null),B=e.useRef(null),T=e.useRef(null),S=e.useRef(null),x=e.useRef(null),D=e.useRef(null),K=e.useRef(null),V=e.useRef(null),W=e.useRef(null),z=e.useRef(null),q=e.useRef(null),H=e.useRef(null),U=e.useRef(null),h=e.useRef(null),w=e.useRef(null),R=e.useRef(null),de=e.useCallback(()=>{var C,F,M,O,j,_,G,$,J,Q,X,Y,Z,ee,te,ae,le,se,re,ne;const l={rows:((C=b.current)==null?void 0:C.value)||0,columns:((F=v.current)==null?void 0:F.value)||0,width:d.current?d.current.value:null,height:k.current?k.current.value:null,cellSpacing:c.current?c.current.value:null,cellPadding:p.current?p.current.value:null,borderWidth:N.current?N.current.value:null,widthUnit:((M=I.current)==null?void 0:M.value)||"",heightUnit:((O=B.current)==null?void 0:O.value)||"",position:((_=(j=T.current)==null?void 0:j.value)==null?void 0:_.value)||null,textAlign:(G=S.current)!=null&&G.value?S.current.value.value:null,borderStyle:($=x.current)!=null&&$.value?x.current.value.value:null,backgroundColor:(J=D.current)==null?void 0:J.value,borderColor:(Q=K.current)==null?void 0:Q.value,collapseBorders:!!((Y=(X=V.current)==null?void 0:X.element)!=null&&Y.checked),id:String(((Z=W.current)==null?void 0:Z.value)||""),className:String(((ee=z.current)==null?void 0:ee.value)||""),caption:String(((te=q.current)==null?void 0:te.value)||""),headerRows:((ae=H.current)==null?void 0:ae.value)||0,headerColumns:((le=U.current)==null?void 0:le.value)||0,captionAlignment:(se=h.current)!=null&&se.value?h.current.value.value:null,captionPosition:(re=w.current)!=null&&re.value?w.current.value.value:null,associateHeaders:(ne=R.current)!=null&&ne.value?R.current.value.value:"none"};r.onSave.call(void 0,l)},[r.onSave]),ge=e.createElement("div",{className:"k-form k-form-md"},e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("div",{className:"k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4"},e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesRows,t.messages[t.keys.tablePropertiesRows])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:b,defaultValue:s.rows,min:1}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesColumns,t.messages[t.keys.tablePropertiesColumns])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:v,defaultValue:s.columns,min:1}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesWidth,t.messages[t.keys.tablePropertiesWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:d,defaultValue:s.width,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.AutoComplete,{ref:I,defaultValue:s.widthUnit,data:o.units,popupSettings:o.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesHeight,t.messages[t.keys.tablePropertiesHeight])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:k,defaultValue:s.height,min:0,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto])}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"}," "),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.AutoComplete,{ref:B,defaultValue:s.heightUnit,data:o.units.filter(l=>l!=="%"),popupSettings:o.popupSettings}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesPosition,t.messages[t.keys.tablePropertiesPosition])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:T,defaultValue:ie.find(l=>l.value===s.position),popupSettings:o.popupSettings,data:ie.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),textField:"text",dataItemKey:"value",valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesAlignment,t.messages[t.keys.tablePropertiesAlignment])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:S,defaultValue:y.find(l=>l.value===s.textAlign),data:y.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),textField:"text",dataItemKey:"value",popupSettings:o.popupSettings,valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCellSpacing,t.messages[t.keys.tablePropertiesCellSpacing])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:c,defaultValue:s.cellSpacing,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto]),min:0}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCellPadding,t.messages[t.keys.tablePropertiesCellPadding])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:p,defaultValue:s.cellPadding,placeholder:a.toLanguageString(t.keys.sizeAuto,t.messages[t.keys.sizeAuto]),min:0}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesTableBackground,t.messages[t.keys.tablePropertiesTableBackground])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.ColorPicker,{ref:D,defaultValue:s.backgroundColor}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesBorderWidth,t.messages[t.keys.tablePropertiesBorderWidth])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:N,defaultValue:s.borderWidth,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesBorderColor,t.messages[t.keys.tablePropertiesBorderColor])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.ColorPicker,{ref:K,defaultValue:s.borderColor}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesBorderStyle,t.messages[t.keys.tablePropertiesBorderStyle])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:x,defaultValue:o.borderStyles.find(l=>l.value===s.borderStyle),popupSettings:o.popupSettings,data:o.borderStyles.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),textField:"text",dataItemKey:"value"}))),e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.Checkbox,{ref:V,className:"k-checkbox-wrap",label:a.toLanguageString(t.keys.tablePropertiesCollapseBorders,t.messages[t.keys.tablePropertiesCollapseBorders]),defaultChecked:s.collapseBorders})))))),pe=e.createElement("div",{className:"k-form k-form-md"},e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("div",{className:"k-form-layout k-d-grid"},e.createElement("div",{className:"k-form-field"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesId,t.messages[t.keys.tablePropertiesId])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.TextBox,{ref:W,defaultValue:s.id}))),e.createElement("div",{className:"k-form-field"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCssClass,t.messages[t.keys.tablePropertiesCssClass])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.TextBox,{ref:z,defaultValue:s.className}))),e.createElement("fieldset",{className:"k-form-fieldset"},e.createElement("legend",{className:"k-form-legend"},a.toLanguageString(t.keys.tablePropertiesAccessibility,t.messages[t.keys.tablePropertiesAccessibility])),e.createElement("div",{className:"k-d-grid k-grid-cols-4 k-gap-x-4"},e.createElement("div",{className:"k-form-field k-col-span-full"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCaption,t.messages[t.keys.tablePropertiesCaption])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.TextBox,{ref:q,defaultValue:s.caption}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCaptionPosition,t.messages[t.keys.tablePropertiesCaptionPosition])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:w,defaultValue:ce.find(l=>l.value===s.captionPosition),data:ce.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),popupSettings:o.popupSettings,textField:"text",dataItemKey:"value",valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesCaptionAlignment,t.messages[t.keys.tablePropertiesCaptionAlignment])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:h,defaultValue:y.find(l=>l.value===s.captionAlignment),data:y.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),popupSettings:o.popupSettings,textField:"text",dataItemKey:"value",valueRender:u.valueRenderWithIcon,itemRender:u.itemRenderWithIcon}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesHeaderRows,t.messages[t.keys.tablePropertiesHeaderRows])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:H,defaultValue:s.headerRows,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-1"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesHeaderCols,t.messages[t.keys.tablePropertiesHeaderCols])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(n.NumericTextBox,{ref:U,defaultValue:s.headerColumns,min:0}))),e.createElement("div",{className:"k-form-field k-col-span-2"},e.createElement("label",{className:"k-label k-form-label"},a.toLanguageString(t.keys.tablePropertiesAssociateHeaders,t.messages[t.keys.tablePropertiesAssociateHeaders])),e.createElement("div",{className:"k-form-field-wrap"},e.createElement(m.DropDownList,{ref:R,defaultValue:me.find(l=>l.value===s.associateHeaders),data:me.map(l=>({...l,text:a.toLanguageString(l.textKey,l.text)})),popupSettings:o.popupSettings,textField:"text",dataItemKey:"value"})))))))),ke=e.createElement(L.TabStrip,{selected:g,onSelect:f,animation:!1,keepTabsMounted:!0},e.createElement(L.TabStripTab,{title:a.toLanguageString(t.keys.tablePropertiesGeneral,t.messages[t.keys.tablePropertiesGeneral])},ge),e.createElement(L.TabStripTab,{title:a.toLanguageString(t.keys.tablePropertiesAdvanced,t.messages[t.keys.tablePropertiesAdvanced])},pe)),fe=[e.createElement(A.Button,{onClick:r.onClose,key:"cancel"},a.toLanguageString(t.keys.tablePropertiesCancel,t.messages[t.keys.tablePropertiesCancel])),e.createElement(A.Button,{themeColor:"primary",key:"save",onClick:de},a.toLanguageString(t.keys.tablePropertiesSave,t.messages[t.keys.tablePropertiesSave]))];return e.createElement(oe.Window,{className:"k-editor-window k-editor-table-wizard-window",title:a.toLanguageString(t.keys.tableProperties,t.messages[t.keys.tableProperties]),onClose:r.onClose,key:"dialog",style:{userSelect:"none"},width:480,height:630,modal:!0,minimizeButton:()=>null,maximizeButton:()=>null,resizable:!1},ke,e.createElement(oe.WindowActionsBar,{layout:"end"},...fe))};exports.TableProperties=ye;