@progress/kendo-react-editor 14.4.1 → 14.5.0-develop.10
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/config/toolsSettings.js +1 -1
- package/config/toolsSettings.mjs +2 -2
- package/dist/cdn/js/kendo-react-editor.js +1 -1
- package/package-metadata.js +1 -1
- package/package-metadata.mjs +2 -2
- package/package.json +18 -13
- package/tools/index.js +1 -1
- package/tools/index.mjs +78 -78
- package/tools/table-wizard/tableCellProperties.js +1 -1
- package/tools/table-wizard/tableCellProperties.mjs +9 -9
- package/tools/table-wizard/tableProperties.js +1 -1
- package/tools/table-wizard/tableProperties.mjs +46 -46
|
@@ -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;
|
|
@@ -17,20 +17,20 @@ import { itemRenderWithIcon as k, valueRenderWithIcon as v } from "./tableCellPr
|
|
|
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
19
|
import { applyTableData as ze, tableDefaultData as He, initialTableData as We, tablePositionStyles as Ue } from "./tablePropsUtils.mjs";
|
|
20
|
-
const _e = (
|
|
21
|
-
const { view:
|
|
20
|
+
const _e = (o) => {
|
|
21
|
+
const { view: n, ...r } = o, P = ge(), [N, b] = e.useState(!1), g = !!(n && Te(n.state.selection.$from, (i) => i.type.spec.tableRole === "table")), p = e.useCallback(() => {
|
|
22
22
|
b(!0);
|
|
23
23
|
}, []), m = e.useCallback(() => {
|
|
24
|
-
b(!1),
|
|
25
|
-
}, [
|
|
24
|
+
b(!1), n == null || n.focus();
|
|
25
|
+
}, [n]), f = e.useCallback(
|
|
26
26
|
(i) => {
|
|
27
|
-
if (
|
|
28
|
-
const u = ze(
|
|
29
|
-
u &&
|
|
27
|
+
if (n && i) {
|
|
28
|
+
const u = ze(n.state, i);
|
|
29
|
+
u && n.dispatch(u);
|
|
30
30
|
}
|
|
31
31
|
m();
|
|
32
32
|
},
|
|
33
|
-
[
|
|
33
|
+
[n, m]
|
|
34
34
|
);
|
|
35
35
|
return /* @__PURE__ */ e.createElement(e.Fragment, null, /* @__PURE__ */ e.createElement(
|
|
36
36
|
A,
|
|
@@ -44,7 +44,7 @@ const _e = (n) => {
|
|
|
44
44
|
...De,
|
|
45
45
|
...r
|
|
46
46
|
}
|
|
47
|
-
), N && /* @__PURE__ */ e.createElement(Fe, { onClose: m, onSave: f, view:
|
|
47
|
+
), N && /* @__PURE__ */ e.createElement(Fe, { onClose: m, onSave: f, view: n }));
|
|
48
48
|
}, E = [
|
|
49
49
|
{
|
|
50
50
|
textKey: t.tablePropertiesAlignLeft,
|
|
@@ -99,7 +99,7 @@ const _e = (n) => {
|
|
|
99
99
|
icon: "table-position-right",
|
|
100
100
|
svgIcon: Ve
|
|
101
101
|
}
|
|
102
|
-
].map((
|
|
102
|
+
].map((o) => ({ ...o, style: Ue[o.value] })), fe = [
|
|
103
103
|
{
|
|
104
104
|
textKey: t.tablePropertiesTop,
|
|
105
105
|
text: l[t.tablePropertiesTop],
|
|
@@ -126,14 +126,14 @@ const _e = (n) => {
|
|
|
126
126
|
text: l[t.tablePropertiesUsingIdAttributes],
|
|
127
127
|
value: "id"
|
|
128
128
|
}
|
|
129
|
-
], Fe = (
|
|
130
|
-
const
|
|
131
|
-
const a =
|
|
129
|
+
], Fe = (o) => {
|
|
130
|
+
const n = e.useMemo(() => {
|
|
131
|
+
const a = o.view && o.view.state;
|
|
132
132
|
return a ? He(a) : We;
|
|
133
|
-
}, [
|
|
133
|
+
}, [o.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(() => {
|
|
136
|
-
var R, M, G, $, j, q, J, O, Q, X, Y, Z, _, ee, te, ae, le, re,
|
|
136
|
+
var R, M, G, $, j, q, J, O, Q, X, Y, Z, _, ee, te, ae, le, re, ne, oe;
|
|
137
137
|
const a = {
|
|
138
138
|
rows: ((R = g.current) == null ? void 0 : R.value) || 0,
|
|
139
139
|
columns: ((M = p.current) == null ? void 0 : M.value) || 0,
|
|
@@ -156,24 +156,24 @@ const _e = (n) => {
|
|
|
156
156
|
headerRows: ((ae = U.current) == null ? void 0 : ae.value) || 0,
|
|
157
157
|
headerColumns: ((le = F.current) == null ? void 0 : le.value) || 0,
|
|
158
158
|
captionAlignment: (re = C.current) != null && re.value ? C.current.value.value : null,
|
|
159
|
-
captionPosition: (
|
|
160
|
-
associateHeaders: (
|
|
159
|
+
captionPosition: (ne = w.current) != null && ne.value ? w.current.value.value : null,
|
|
160
|
+
associateHeaders: (oe = y.current) != null && oe.value ? y.current.value.value : "none"
|
|
161
161
|
};
|
|
162
|
-
|
|
163
|
-
}, [
|
|
162
|
+
o.onSave.call(void 0, a);
|
|
163
|
+
}, [o.onSave]), ke = /* @__PURE__ */ e.createElement("div", { className: "k-form k-form-md" }, /* @__PURE__ */ e.createElement("fieldset", { className: "k-form-fieldset" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-layout k-d-grid k-grid-cols-4 k-gap-x-4" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
164
164
|
t.tablePropertiesRows,
|
|
165
165
|
l[t.tablePropertiesRows]
|
|
166
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: g, defaultValue:
|
|
166
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: g, defaultValue: n.rows, min: 1 }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
167
167
|
t.tablePropertiesColumns,
|
|
168
168
|
l[t.tablePropertiesColumns]
|
|
169
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: p, defaultValue:
|
|
169
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: p, defaultValue: n.columns, min: 1 }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-1" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
170
170
|
t.tablePropertiesWidth,
|
|
171
171
|
l[t.tablePropertiesWidth]
|
|
172
172
|
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
|
|
173
173
|
s,
|
|
174
174
|
{
|
|
175
175
|
ref: m,
|
|
176
|
-
defaultValue:
|
|
176
|
+
defaultValue: n.width,
|
|
177
177
|
min: 0,
|
|
178
178
|
placeholder: r.toLanguageString(t.sizeAuto, l[t.sizeAuto])
|
|
179
179
|
}
|
|
@@ -181,7 +181,7 @@ const _e = (n) => {
|
|
|
181
181
|
ie,
|
|
182
182
|
{
|
|
183
183
|
ref: I,
|
|
184
|
-
defaultValue:
|
|
184
|
+
defaultValue: n.widthUnit,
|
|
185
185
|
data: me,
|
|
186
186
|
popupSettings: c
|
|
187
187
|
}
|
|
@@ -192,7 +192,7 @@ const _e = (n) => {
|
|
|
192
192
|
s,
|
|
193
193
|
{
|
|
194
194
|
ref: f,
|
|
195
|
-
defaultValue:
|
|
195
|
+
defaultValue: n.height,
|
|
196
196
|
min: 0,
|
|
197
197
|
placeholder: r.toLanguageString(t.sizeAuto, l[t.sizeAuto])
|
|
198
198
|
}
|
|
@@ -200,7 +200,7 @@ const _e = (n) => {
|
|
|
200
200
|
ie,
|
|
201
201
|
{
|
|
202
202
|
ref: B,
|
|
203
|
-
defaultValue:
|
|
203
|
+
defaultValue: n.heightUnit,
|
|
204
204
|
data: me.filter((a) => a !== "%"),
|
|
205
205
|
popupSettings: c
|
|
206
206
|
}
|
|
@@ -211,7 +211,7 @@ const _e = (n) => {
|
|
|
211
211
|
d,
|
|
212
212
|
{
|
|
213
213
|
ref: K,
|
|
214
|
-
defaultValue: de.find((a) => a.value ===
|
|
214
|
+
defaultValue: de.find((a) => a.value === n.position),
|
|
215
215
|
popupSettings: c,
|
|
216
216
|
data: de.map((a) => ({
|
|
217
217
|
...a,
|
|
@@ -229,7 +229,7 @@ const _e = (n) => {
|
|
|
229
229
|
d,
|
|
230
230
|
{
|
|
231
231
|
ref: x,
|
|
232
|
-
defaultValue: E.find((a) => a.value ===
|
|
232
|
+
defaultValue: E.find((a) => a.value === n.textAlign),
|
|
233
233
|
data: E.map((a) => ({ ...a, text: r.toLanguageString(a.textKey, a.text) })),
|
|
234
234
|
textField: "text",
|
|
235
235
|
dataItemKey: "value",
|
|
@@ -244,7 +244,7 @@ const _e = (n) => {
|
|
|
244
244
|
s,
|
|
245
245
|
{
|
|
246
246
|
ref: i,
|
|
247
|
-
defaultValue:
|
|
247
|
+
defaultValue: n.cellSpacing,
|
|
248
248
|
placeholder: r.toLanguageString(t.sizeAuto, l[t.sizeAuto]),
|
|
249
249
|
min: 0
|
|
250
250
|
}
|
|
@@ -255,27 +255,27 @@ const _e = (n) => {
|
|
|
255
255
|
s,
|
|
256
256
|
{
|
|
257
257
|
ref: u,
|
|
258
|
-
defaultValue:
|
|
258
|
+
defaultValue: n.cellPadding,
|
|
259
259
|
placeholder: r.toLanguageString(t.sizeAuto, l[t.sizeAuto]),
|
|
260
260
|
min: 0
|
|
261
261
|
}
|
|
262
262
|
))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-full" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
263
263
|
t.tablePropertiesTableBackground,
|
|
264
264
|
l[t.tablePropertiesTableBackground]
|
|
265
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(se, { ref: V, defaultValue:
|
|
265
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(se, { ref: V, defaultValue: n.backgroundColor }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-1" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
266
266
|
t.tablePropertiesBorderWidth,
|
|
267
267
|
l[t.tablePropertiesBorderWidth]
|
|
268
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: S, defaultValue:
|
|
268
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: S, defaultValue: n.borderWidth, min: 0 }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-1" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
269
269
|
t.tablePropertiesBorderColor,
|
|
270
270
|
l[t.tablePropertiesBorderColor]
|
|
271
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(se, { ref: T, defaultValue:
|
|
271
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(se, { ref: T, defaultValue: n.borderColor }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
272
272
|
t.tablePropertiesBorderStyle,
|
|
273
273
|
l[t.tablePropertiesBorderStyle]
|
|
274
274
|
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
|
|
275
275
|
d,
|
|
276
276
|
{
|
|
277
277
|
ref: h,
|
|
278
|
-
defaultValue: ue.find((a) => a.value ===
|
|
278
|
+
defaultValue: ue.find((a) => a.value === n.borderStyle),
|
|
279
279
|
popupSettings: c,
|
|
280
280
|
data: ue.map((a) => ({
|
|
281
281
|
...a,
|
|
@@ -293,18 +293,18 @@ const _e = (n) => {
|
|
|
293
293
|
t.tablePropertiesCollapseBorders,
|
|
294
294
|
l[t.tablePropertiesCollapseBorders]
|
|
295
295
|
),
|
|
296
|
-
defaultChecked:
|
|
296
|
+
defaultChecked: n.collapseBorders
|
|
297
297
|
}
|
|
298
|
-
)))))), ve = /* @__PURE__ */ e.createElement("div", { className: "k-form k-form-md" }, /* @__PURE__ */ e.createElement("fieldset", { className: "k-form-fieldset" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-layout k-d-grid" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(t.tablePropertiesId, l[t.tablePropertiesId])), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(L, { ref: z, defaultValue:
|
|
298
|
+
)))))), ve = /* @__PURE__ */ e.createElement("div", { className: "k-form k-form-md" }, /* @__PURE__ */ e.createElement("fieldset", { className: "k-form-fieldset" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-layout k-d-grid" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(t.tablePropertiesId, l[t.tablePropertiesId])), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(L, { ref: z, defaultValue: n.id }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
299
299
|
t.tablePropertiesCssClass,
|
|
300
300
|
l[t.tablePropertiesCssClass]
|
|
301
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(L, { ref: H, defaultValue:
|
|
301
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(L, { ref: H, defaultValue: n.className }))), /* @__PURE__ */ e.createElement("fieldset", { className: "k-form-fieldset" }, /* @__PURE__ */ e.createElement("legend", { className: "k-form-legend" }, r.toLanguageString(
|
|
302
302
|
t.tablePropertiesAccessibility,
|
|
303
303
|
l[t.tablePropertiesAccessibility]
|
|
304
304
|
)), /* @__PURE__ */ e.createElement("div", { className: "k-d-grid k-grid-cols-4 k-gap-x-4" }, /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-full" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
305
305
|
t.tablePropertiesCaption,
|
|
306
306
|
l[t.tablePropertiesCaption]
|
|
307
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(L, { ref: W, defaultValue:
|
|
307
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(L, { ref: W, defaultValue: n.caption }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
308
308
|
t.tablePropertiesCaptionPosition,
|
|
309
309
|
l[t.tablePropertiesCaptionPosition]
|
|
310
310
|
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
|
|
@@ -312,7 +312,7 @@ const _e = (n) => {
|
|
|
312
312
|
{
|
|
313
313
|
ref: w,
|
|
314
314
|
defaultValue: fe.find(
|
|
315
|
-
(a) => a.value ===
|
|
315
|
+
(a) => a.value === n.captionPosition
|
|
316
316
|
),
|
|
317
317
|
data: fe.map((a) => ({
|
|
318
318
|
...a,
|
|
@@ -331,7 +331,7 @@ const _e = (n) => {
|
|
|
331
331
|
d,
|
|
332
332
|
{
|
|
333
333
|
ref: C,
|
|
334
|
-
defaultValue: E.find((a) => a.value ===
|
|
334
|
+
defaultValue: E.find((a) => a.value === n.captionAlignment),
|
|
335
335
|
data: E.map((a) => ({
|
|
336
336
|
...a,
|
|
337
337
|
text: r.toLanguageString(a.textKey, a.text)
|
|
@@ -345,10 +345,10 @@ const _e = (n) => {
|
|
|
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,
|
|
347
347
|
l[t.tablePropertiesHeaderRows]
|
|
348
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: U, defaultValue:
|
|
348
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: U, defaultValue: n.headerRows, min: 0 }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-1" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
349
349
|
t.tablePropertiesHeaderCols,
|
|
350
350
|
l[t.tablePropertiesHeaderCols]
|
|
351
|
-
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: F, defaultValue:
|
|
351
|
+
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(s, { ref: F, defaultValue: n.headerColumns, min: 0 }))), /* @__PURE__ */ e.createElement("div", { className: "k-form-field k-col-span-2" }, /* @__PURE__ */ e.createElement("label", { className: "k-label k-form-label" }, r.toLanguageString(
|
|
352
352
|
t.tablePropertiesAssociateHeaders,
|
|
353
353
|
l[t.tablePropertiesAssociateHeaders]
|
|
354
354
|
)), /* @__PURE__ */ e.createElement("div", { className: "k-form-field-wrap" }, /* @__PURE__ */ e.createElement(
|
|
@@ -356,7 +356,7 @@ const _e = (n) => {
|
|
|
356
356
|
{
|
|
357
357
|
ref: y,
|
|
358
358
|
defaultValue: be.find(
|
|
359
|
-
(a) => a.value ===
|
|
359
|
+
(a) => a.value === n.associateHeaders
|
|
360
360
|
),
|
|
361
361
|
data: be.map((a) => ({
|
|
362
362
|
...a,
|
|
@@ -385,15 +385,15 @@ const _e = (n) => {
|
|
|
385
385
|
},
|
|
386
386
|
ve
|
|
387
387
|
)), Pe = [
|
|
388
|
-
/* @__PURE__ */ e.createElement(A, {
|
|
389
|
-
/* @__PURE__ */ e.createElement(A, {
|
|
388
|
+
/* @__PURE__ */ e.createElement(A, { onClick: o.onClose, key: "cancel" }, r.toLanguageString(t.tablePropertiesCancel, l[t.tablePropertiesCancel])),
|
|
389
|
+
/* @__PURE__ */ e.createElement(A, { themeColor: "primary", key: "save", onClick: pe }, r.toLanguageString(t.tablePropertiesSave, l[t.tablePropertiesSave]))
|
|
390
390
|
];
|
|
391
391
|
return /* @__PURE__ */ e.createElement(
|
|
392
392
|
Se,
|
|
393
393
|
{
|
|
394
394
|
className: "k-editor-window k-editor-table-wizard-window",
|
|
395
395
|
title: r.toLanguageString(t.tableProperties, l[t.tableProperties]),
|
|
396
|
-
onClose:
|
|
396
|
+
onClose: o.onClose,
|
|
397
397
|
key: "dialog",
|
|
398
398
|
style: { userSelect: "none" },
|
|
399
399
|
width: 480,
|
|
@@ -404,7 +404,7 @@ const _e = (n) => {
|
|
|
404
404
|
resizable: !1
|
|
405
405
|
},
|
|
406
406
|
Ee,
|
|
407
|
-
/* @__PURE__ */ e.createElement(xe, { layout: "
|
|
407
|
+
/* @__PURE__ */ e.createElement(xe, { layout: "end" }, ...Pe)
|
|
408
408
|
);
|
|
409
409
|
};
|
|
410
410
|
export {
|